From 647c69e507da12e68ff811021b84fe95d91387db Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 20 Jan 2023 21:26:36 -0500 Subject: [PATCH] Add a way for Darwin invokes to specify a server-side processing timeout. (#24552) The default 2s timeout is way too low for some commands (like ScanNetworks). Fixes https://github.com/project-chip/connectedhomeip/issues/24333 --- .../Framework/CHIP/MTRBaseClusterUtils.h | 16 +- src/darwin/Framework/CHIP/MTRBaseDevice.mm | 7 +- .../CHIP/templates/MTRBaseClusters-src.zapt | 16 +- .../CHIP/templates/MTRClusters-src.zapt | 19 +- .../templates/MTRCommandPayloadsObjc-src.zapt | 6 + .../templates/MTRCommandPayloadsObjc.zapt | 9 + .../CHIP/zap-generated/MTRBaseClusters.mm | 2608 +++++++++++--- .../CHIP/zap-generated/MTRClusters.mm | 3168 ++++++++++++++--- .../zap-generated/MTRCommandPayloadsObjc.h | 1705 ++++++++- .../zap-generated/MTRCommandPayloadsObjc.mm | 378 ++ 10 files changed, 6806 insertions(+), 1126 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRBaseClusterUtils.h b/src/darwin/Framework/CHIP/MTRBaseClusterUtils.h index 97251162f5162b..4e0ce0af79e069 100644 --- a/src/darwin/Framework/CHIP/MTRBaseClusterUtils.h +++ b/src/darwin/Framework/CHIP/MTRBaseClusterUtils.h @@ -25,6 +25,7 @@ #include #include #include +#include NS_ASSUME_NONNULL_BEGIN @@ -378,11 +379,18 @@ template class MTRInvokeCallb bool mCalledCallback = false; }; +/** + * timedInvokeTimeoutMs, if provided, is how long the server will wait for us to + * send the invoke after we sent the Timed Request message. + * + * invokeTimeout, if provided, will have possible MRP latency added to it and + * the result is how long we will wait for the server to respond. + */ template CHIP_ERROR MTRStartInvokeInteraction(BridgeType * _Nonnull bridge, const RequestDataType & requestData, chip::Messaging::ExchangeManager & exchangeManager, const chip::SessionHandle & session, typename BridgeType::SuccessCallbackType successCb, MTRErrorCallback failureCb, chip::EndpointId endpoint, - chip::Optional timedInvokeTimeoutMs) + chip::Optional timedInvokeTimeoutMs, chip::Optional invokeTimeout) { auto callback = chip::Platform::MakeUnique>( bridge, successCb, failureCb); @@ -395,7 +403,11 @@ CHIP_ERROR MTRStartInvokeInteraction(BridgeType * _Nonnull bridge, const Request chip::app::CommandPathParams commandPath(endpoint, 0, RequestDataType::GetClusterId(), RequestDataType::GetCommandId(), chip::app::CommandPathFlags::kEndpointIdValid); ReturnErrorOnFailure(commandSender->AddRequestData(commandPath, requestData, timedInvokeTimeoutMs)); - ReturnErrorOnFailure(commandSender->SendCommandRequest(session)); + + if (invokeTimeout.HasValue()) { + invokeTimeout.SetValue(session->ComputeRoundTripTimeout(invokeTimeout.Value())); + } + ReturnErrorOnFailure(commandSender->SendCommandRequest(session, invokeTimeout)); callback->AdoptCommandSender(std::move(commandSender)); callback.release(); diff --git a/src/darwin/Framework/CHIP/MTRBaseDevice.mm b/src/darwin/Framework/CHIP/MTRBaseDevice.mm index e8211845e91cae..3a360307df8fd5 100644 --- a/src/darwin/Framework/CHIP/MTRBaseDevice.mm +++ b/src/darwin/Framework/CHIP/MTRBaseDevice.mm @@ -22,6 +22,7 @@ #import "MTRCluster.h" #import "MTRClusterStateCacheContainer_Internal.h" #import "MTRCluster_Internal.h" +#import "MTRDevice_Internal.h" #import "MTRError_Internal.h" #import "MTREventTLVValueDecoder_Internal.h" #import "MTRLogging_Internal.h" @@ -1132,7 +1133,11 @@ - (void)invokeCommandWithEndpointID:(NSNumber *)endpointID ReturnErrorOnFailure(commandSender->AddRequestData(commandPath, MTRDataValueDictionaryDecodableType(commandFields), (timeoutMs == nil) ? NullOptional : Optional([timeoutMs unsignedShortValue]))); - ReturnErrorOnFailure(commandSender->SendCommandRequest(session)); + + // We don't have a way to communicate a non-default invoke timeout + // here for now. + // TODO: https://github.com/project-chip/connectedhomeip/issues/24563 + ReturnErrorOnFailure(commandSender->SendCommandRequest(session, NullOptional)); decoder.release(); commandSender.release(); diff --git a/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt b/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt index 14bc90e2fc47e4..cc75078bc69730 100644 --- a/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt @@ -9,6 +9,7 @@ #import "MTRCluster_Internal.h" #import "MTRClusterStateCacheContainer_Internal.h" #import "MTRCommandPayloadsObjc.h" +#import "MTRDevice_Internal.h" #import "MTRStructsObjc.h" #include @@ -20,6 +21,9 @@ using chip::Callback::Cancelable; using namespace chip::app::Clusters; using chip::Messaging::ExchangeManager; using chip::SessionHandle; +using chip::Optional; +using chip::System::Clock::Timeout; +using chip::System::Clock::Seconds16; // NOLINTBEGIN(clang-analyzer-cplusplus.NewDeleteLeaks): Linter is unable to locate the delete on these objects. {{#chip_client_clusters includeAll=true}} @@ -80,13 +84,21 @@ MTR{{cluster}}Cluster{{command}}Params {{/if}} ^(ExchangeManager & exchangeManager, const SessionHandle & session, {{>callbackName}}CallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_castcallbackName}}CallbackBridge *>(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; {{asUpperCamelCase parent.name}}::Commands::{{asUpperCamelCase name}}::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)); + } } {{#if mustUseTimedInvoke}} if (!timedInvokeTimeoutMs.HasValue()) { @@ -107,7 +119,7 @@ MTR{{cluster}}Cluster{{command}}Params {{/last}} {{/chip_cluster_command_arguments}} - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } diff --git a/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt b/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt index 9f268b08e81397..d20a01129d4603 100644 --- a/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt @@ -3,6 +3,7 @@ #import #import "MTRAsyncCallbackWorkQueue.h" +#import "MTRBaseClusterUtils.h" #import "MTRBaseDevice_Internal.h" #import "MTRClusterConstants.h" #import "MTRClusters_Internal.h" @@ -22,6 +23,9 @@ using chip::Callback::Cancelable; using namespace chip::app::Clusters; using chip::Messaging::ExchangeManager; using chip::SessionHandle; +using chip::Optional; +using chip::System::Clock::Timeout; +using chip::System::Clock::Seconds16; static void MTRClustersLogEnqueue(NSString *logPrefix, MTRAsyncCallbackWorkQueue *workQueue) { MTR_LOG_INFO("%@ enqueueWorkItem %@", logPrefix, workQueue); @@ -120,12 +124,22 @@ MTRCommandIDTypeCluster{{cluster}}Command{{command}}ID [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, {{>callbackName}}CallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_castcallbackName}}CallbackBridge *>(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; {{asUpperCamelCase parent.name}}::Commands::{{asUpperCamelCase name}}::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)); + } + } {{#if mustUseTimedInvoke}} if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); @@ -145,8 +159,7 @@ MTRCommandIDTypeCluster{{cluster}}Command{{command}}ID {{/last}} {{/chip_cluster_command_arguments}} - chip::Controller::{{asUpperCamelCase parent.name}}Cluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; diff --git a/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc-src.zapt b/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc-src.zapt index 77a2c7b0a26d82..9dfd496b795c7f 100644 --- a/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc-src.zapt @@ -19,6 +19,9 @@ NS_ASSUME_NONNULL_BEGIN {{#if (or (isStrEqual source "client") (wasIntroducedBeforeRelease "First major API revamp" (compatClusterNameRemapping parent.name) command=(compatCommandNameRemapping parent.name name)))}} _timedInvokeTimeoutMs = nil; +{{/if}} +{{#if (isStrEqual source "client")}} + _serverSideProcessingTimeout = nil; {{/if}} } return self; @@ -35,6 +38,9 @@ NS_ASSUME_NONNULL_BEGIN (wasIntroducedBeforeRelease "First major API revamp" (compatClusterNameRemapping parent.name) command=(compatCommandNameRemapping parent.name name)))}} other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; {{/if}} +{{#if (isStrEqual source "client")}} + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; +{{/if}} return other; } diff --git a/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc.zapt b/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc.zapt index 920ad066e14908..708c80299e8a22 100644 --- a/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc.zapt @@ -40,6 +40,15 @@ NS_ASSUME_NONNULL_BEGIN * */ @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; {{! This is using the pre-renaming names for the isAvailableBefore test, because the pre-rename things inherit from the post-rename ones and need to have this selector.}} {{else if (wasIntroducedBeforeRelease "First major API revamp" (compatClusterNameRemapping parent.name) command=(compatCommandNameRemapping parent.name name))}} diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 40e42897be7eb8..7ee53394cf669f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -24,6 +24,7 @@ #import "MTRClusterStateCacheContainer_Internal.h" #import "MTRCluster_Internal.h" #import "MTRCommandPayloadsObjc.h" +#import "MTRDevice_Internal.h" #import "MTRStructsObjc.h" #include @@ -33,8 +34,11 @@ using chip::Callback::Callback; using chip::Callback::Cancelable; using namespace chip::app::Clusters; +using chip::Optional; using chip::SessionHandle; using chip::Messaging::ExchangeManager; +using chip::System::Clock::Seconds16; +using chip::System::Clock::Timeout; // NOLINTBEGIN(clang-analyzer-cplusplus.NewDeleteLeaks): Linter is unable to locate the delete on these objects. @implementation MTRBaseClusterIdentify @@ -64,18 +68,26 @@ - (void)identifyWithParams:(MTRIdentifyClusterIdentifyParams *)params completion ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Identify::Commands::Identify::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.identifyTime = params.identifyTime.unsignedShortValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -92,21 +104,29 @@ - (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Identify::Commands::TriggerEffect::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.effectIdentifier = static_cast>( params.effectIdentifier.unsignedCharValue); request.effectVariant = static_cast>(params.effectVariant.unsignedCharValue); - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -814,19 +834,27 @@ - (void)addGroupWithParams:(MTRGroupsClusterAddGroupParams *)params ^(ExchangeManager & exchangeManager, const SessionHandle & session, GroupsClusterAddGroupResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Groups::Commands::AddGroup::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.groupID = params.groupID.unsignedShortValue; request.groupName = [self asCharSpan:params.groupName]; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -841,18 +869,26 @@ - (void)viewGroupWithParams:(MTRGroupsClusterViewGroupParams *)params ^(ExchangeManager & exchangeManager, const SessionHandle & session, GroupsClusterViewGroupResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Groups::Commands::ViewGroup::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.groupID = params.groupID.unsignedShortValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -868,13 +904,21 @@ - (void)getGroupMembershipWithParams:(MTRGroupsClusterGetGroupMembershipParams * GroupsClusterGetGroupMembershipResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Groups::Commands::GetGroupMembership::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)); + } } { using ListType_0 = std::remove_reference_t; @@ -899,8 +943,8 @@ - (void)getGroupMembershipWithParams:(MTRGroupsClusterGetGroupMembershipParams * } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -915,18 +959,26 @@ - (void)removeGroupWithParams:(MTRGroupsClusterRemoveGroupParams *)params ^(ExchangeManager & exchangeManager, const SessionHandle & session, GroupsClusterRemoveGroupResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Groups::Commands::RemoveGroup::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.groupID = params.groupID.unsignedShortValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -948,17 +1000,25 @@ - (void)removeAllGroupsWithParams:(MTRGroupsClusterRemoveAllGroupsParams * _Null ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Groups::Commands::RemoveAllGroups::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)); + } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -976,19 +1036,27 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Groups::Commands::AddGroupIfIdentifying::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.groupID = params.groupID.unsignedShortValue; request.groupName = [self asCharSpan:params.groupName]; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -1609,13 +1677,21 @@ - (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params ^(ExchangeManager & exchangeManager, const SessionHandle & session, ScenesClusterAddSceneResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Scenes::Commands::AddScene::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.groupId = params.groupId.unsignedShortValue; request.sceneId = params.sceneId.unsignedCharValue; @@ -1695,8 +1771,8 @@ - (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -1711,19 +1787,27 @@ - (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params ^(ExchangeManager & exchangeManager, const SessionHandle & session, ScenesClusterViewSceneResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Scenes::Commands::ViewScene::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.groupId = params.groupId.unsignedShortValue; request.sceneId = params.sceneId.unsignedCharValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -1738,19 +1822,27 @@ - (void)removeSceneWithParams:(MTRScenesClusterRemoveSceneParams *)params ^(ExchangeManager & exchangeManager, const SessionHandle & session, ScenesClusterRemoveSceneResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Scenes::Commands::RemoveScene::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.groupId = params.groupId.unsignedShortValue; request.sceneId = params.sceneId.unsignedCharValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -1766,18 +1858,26 @@ - (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)param ScenesClusterRemoveAllScenesResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Scenes::Commands::RemoveAllScenes::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.groupId = params.groupId.unsignedShortValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -1792,19 +1892,27 @@ - (void)storeSceneWithParams:(MTRScenesClusterStoreSceneParams *)params ^(ExchangeManager & exchangeManager, const SessionHandle & session, ScenesClusterStoreSceneResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Scenes::Commands::StoreScene::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.groupId = params.groupId.unsignedShortValue; request.sceneId = params.sceneId.unsignedCharValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -1821,13 +1929,21 @@ - (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params comple ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Scenes::Commands::RecallScene::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.groupId = params.groupId.unsignedShortValue; request.sceneId = params.sceneId.unsignedCharValue; @@ -1841,8 +1957,8 @@ - (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params comple } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -1858,18 +1974,26 @@ - (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams * ScenesClusterGetSceneMembershipResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Scenes::Commands::GetSceneMembership::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.groupId = params.groupId.unsignedShortValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -1885,13 +2009,21 @@ - (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)par ScenesClusterEnhancedAddSceneResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Scenes::Commands::EnhancedAddScene::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.groupId = params.groupId.unsignedShortValue; request.sceneId = params.sceneId.unsignedCharValue; @@ -1971,8 +2103,8 @@ - (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)par } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -1988,19 +2120,27 @@ - (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)p ScenesClusterEnhancedViewSceneResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Scenes::Commands::EnhancedViewScene::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.groupId = params.groupId.unsignedShortValue; request.sceneId = params.sceneId.unsignedCharValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -2015,13 +2155,21 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params ^(ExchangeManager & exchangeManager, const SessionHandle & session, ScenesClusterCopySceneResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Scenes::Commands::CopyScene::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.mode = static_cast>(params.mode.unsignedCharValue); request.groupIdFrom = params.groupIdFrom.unsignedShortValue; @@ -2029,8 +2177,8 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params request.groupIdTo = params.groupIdTo.unsignedShortValue; request.sceneIdTo = params.sceneIdTo.unsignedCharValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -3129,17 +3277,25 @@ - (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params completion:(M ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; OnOff::Commands::Off::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)); + } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -3160,17 +3316,25 @@ - (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params completion:(MTR ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; OnOff::Commands::On::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)); + } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -3191,17 +3355,25 @@ - (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params complet ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; OnOff::Commands::Toggle::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)); + } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -3218,21 +3390,29 @@ - (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params com ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; OnOff::Commands::OffWithEffect::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.effectIdentifier = static_cast>( params.effectIdentifier.unsignedCharValue); request.effectVariant = static_cast>(params.effectVariant.unsignedCharValue); - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -3254,17 +3434,25 @@ - (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalScen ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; OnOff::Commands::OnWithRecallGlobalScene::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)); + } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -3281,21 +3469,29 @@ - (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params c ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; OnOff::Commands::OnWithTimedOff::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.onOffControl = static_cast>(params.onOffControl.unsignedCharValue); request.onTime = params.onTime.unsignedShortValue; request.offWaitTime = params.offWaitTime.unsignedShortValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -5083,13 +5279,21 @@ - (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; LevelControl::Commands::MoveToLevel::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.level = params.level.unsignedCharValue; if (params.transitionTime == nil) { @@ -5103,8 +5307,8 @@ - (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params request.optionsOverride = static_cast>(params.optionsOverride.unsignedCharValue); - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -5121,13 +5325,21 @@ - (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params completion:(MT ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; LevelControl::Commands::Move::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.moveMode = static_cast>(params.moveMode.unsignedCharValue); if (params.rate == nil) { @@ -5141,8 +5353,8 @@ - (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params completion:(MT request.optionsOverride = static_cast>(params.optionsOverride.unsignedCharValue); - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -5159,13 +5371,21 @@ - (void)stepWithParams:(MTRLevelControlClusterStepParams *)params completion:(MT ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; LevelControl::Commands::Step::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.stepMode = static_cast>(params.stepMode.unsignedCharValue); request.stepSize = params.stepSize.unsignedCharValue; @@ -5180,8 +5400,8 @@ - (void)stepWithParams:(MTRLevelControlClusterStepParams *)params completion:(MT request.optionsOverride = static_cast>(params.optionsOverride.unsignedCharValue); - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -5198,21 +5418,29 @@ - (void)stopWithParams:(MTRLevelControlClusterStopParams *)params completion:(MT ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; LevelControl::Commands::Stop::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.optionsMask = static_cast>(params.optionsMask.unsignedCharValue); request.optionsOverride = static_cast>(params.optionsOverride.unsignedCharValue); - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -5230,13 +5458,21 @@ - (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnO ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; LevelControl::Commands::MoveToLevelWithOnOff::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.level = params.level.unsignedCharValue; if (params.transitionTime == nil) { @@ -5250,8 +5486,8 @@ - (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnO request.optionsOverride = static_cast>(params.optionsOverride.unsignedCharValue); - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -5268,13 +5504,21 @@ - (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)par ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; LevelControl::Commands::MoveWithOnOff::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.moveMode = static_cast>(params.moveMode.unsignedCharValue); if (params.rate == nil) { @@ -5288,8 +5532,8 @@ - (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)par request.optionsOverride = static_cast>(params.optionsOverride.unsignedCharValue); - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -5306,13 +5550,21 @@ - (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)par ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; LevelControl::Commands::StepWithOnOff::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.stepMode = static_cast>(params.stepMode.unsignedCharValue); request.stepSize = params.stepSize.unsignedCharValue; @@ -5327,8 +5579,8 @@ - (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)par request.optionsOverride = static_cast>(params.optionsOverride.unsignedCharValue); - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -5345,21 +5597,29 @@ - (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)par ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; LevelControl::Commands::StopWithOnOff::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.optionsMask = static_cast>(params.optionsMask.unsignedCharValue); request.optionsOverride = static_cast>(params.optionsOverride.unsignedCharValue); - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -5377,18 +5637,26 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; LevelControl::Commands::MoveToClosestFrequency::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.frequency = params.frequency.unsignedShortValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -11577,13 +11845,21 @@ - (void)instantActionWithParams:(MTRActionsClusterInstantActionParams *)params c ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Actions::Commands::InstantAction::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.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { @@ -11591,8 +11867,8 @@ - (void)instantActionWithParams:(MTRActionsClusterInstantActionParams *)params c definedValue_0 = params.invokeID.unsignedIntValue; } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -11610,13 +11886,21 @@ - (void)instantActionWithTransitionWithParams:(MTRActionsClusterInstantActionWit ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Actions::Commands::InstantActionWithTransition::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.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { @@ -11625,8 +11909,8 @@ - (void)instantActionWithTransitionWithParams:(MTRActionsClusterInstantActionWit } request.transitionTime = params.transitionTime.unsignedShortValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -11643,13 +11927,21 @@ - (void)startActionWithParams:(MTRActionsClusterStartActionParams *)params compl ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Actions::Commands::StartAction::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.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { @@ -11657,8 +11949,8 @@ - (void)startActionWithParams:(MTRActionsClusterStartActionParams *)params compl definedValue_0 = params.invokeID.unsignedIntValue; } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -11676,13 +11968,21 @@ - (void)startActionWithDurationWithParams:(MTRActionsClusterStartActionWithDurat ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Actions::Commands::StartActionWithDuration::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.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { @@ -11691,8 +11991,8 @@ - (void)startActionWithDurationWithParams:(MTRActionsClusterStartActionWithDurat } request.duration = params.duration.unsignedIntValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -11709,13 +12009,21 @@ - (void)stopActionWithParams:(MTRActionsClusterStopActionParams *)params complet ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Actions::Commands::StopAction::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.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { @@ -11723,8 +12031,8 @@ - (void)stopActionWithParams:(MTRActionsClusterStopActionParams *)params complet definedValue_0 = params.invokeID.unsignedIntValue; } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -11741,13 +12049,21 @@ - (void)pauseActionWithParams:(MTRActionsClusterPauseActionParams *)params compl ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Actions::Commands::PauseAction::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.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { @@ -11755,8 +12071,8 @@ - (void)pauseActionWithParams:(MTRActionsClusterPauseActionParams *)params compl definedValue_0 = params.invokeID.unsignedIntValue; } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -11774,13 +12090,21 @@ - (void)pauseActionWithDurationWithParams:(MTRActionsClusterPauseActionWithDurat ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Actions::Commands::PauseActionWithDuration::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.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { @@ -11789,8 +12113,8 @@ - (void)pauseActionWithDurationWithParams:(MTRActionsClusterPauseActionWithDurat } request.duration = params.duration.unsignedIntValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -11807,13 +12131,21 @@ - (void)resumeActionWithParams:(MTRActionsClusterResumeActionParams *)params com ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Actions::Commands::ResumeAction::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.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { @@ -11821,8 +12153,8 @@ - (void)resumeActionWithParams:(MTRActionsClusterResumeActionParams *)params com definedValue_0 = params.invokeID.unsignedIntValue; } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -11839,13 +12171,21 @@ - (void)enableActionWithParams:(MTRActionsClusterEnableActionParams *)params com ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Actions::Commands::EnableAction::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.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { @@ -11853,8 +12193,8 @@ - (void)enableActionWithParams:(MTRActionsClusterEnableActionParams *)params com definedValue_0 = params.invokeID.unsignedIntValue; } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -11872,13 +12212,21 @@ - (void)enableActionWithDurationWithParams:(MTRActionsClusterEnableActionWithDur ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Actions::Commands::EnableActionWithDuration::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.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { @@ -11887,8 +12235,8 @@ - (void)enableActionWithDurationWithParams:(MTRActionsClusterEnableActionWithDur } request.duration = params.duration.unsignedIntValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -11905,13 +12253,21 @@ - (void)disableActionWithParams:(MTRActionsClusterDisableActionParams *)params c ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Actions::Commands::DisableAction::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.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { @@ -11919,8 +12275,8 @@ - (void)disableActionWithParams:(MTRActionsClusterDisableActionParams *)params c definedValue_0 = params.invokeID.unsignedIntValue; } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -11938,13 +12294,21 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Actions::Commands::DisableActionWithDuration::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.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { @@ -11953,8 +12317,8 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD } request.duration = params.duration.unsignedIntValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -12755,17 +13119,25 @@ - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nulla ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; BasicInformation::Commands::MfgSpecificPing::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)); + } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -15145,13 +15517,21 @@ - (void)queryImageWithParams:(MTROTASoftwareUpdateProviderClusterQueryImageParam OTASoftwareUpdateProviderClusterQueryImageResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; OtaSoftwareUpdateProvider::Commands::QueryImage::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.vendorID = static_cast>(params.vendorID.unsignedShortValue); request.productID = params.productID.unsignedShortValue; @@ -15196,8 +15576,8 @@ - (void)queryImageWithParams:(MTROTASoftwareUpdateProviderClusterQueryImageParam definedValue_0 = [self asByteSpan:params.metadataForProvider]; } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -15213,19 +15593,27 @@ - (void)applyUpdateRequestWithParams:(MTROTASoftwareUpdateProviderClusterApplyUp OTASoftwareUpdateProviderClusterApplyUpdateResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::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.updateToken = [self asByteSpan:params.updateToken]; request.newVersion = params.newVersion.unsignedIntValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -15243,19 +15631,27 @@ - (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotify ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::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.updateToken = [self asByteSpan:params.updateToken]; request.softwareVersion = params.softwareVersion.unsignedIntValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -15772,13 +16168,21 @@ - (void)announceOTAProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnou ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::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.providerNodeID = params.providerNodeID.unsignedLongLongValue; request.vendorID = static_cast>(params.vendorID.unsignedShortValue); @@ -15790,8 +16194,8 @@ - (void)announceOTAProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnou } request.endpoint = params.endpoint.unsignedShortValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -22584,19 +22988,27 @@ - (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams * GeneralCommissioningClusterArmFailSafeResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; GeneralCommissioning::Commands::ArmFailSafe::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.expiryLengthSeconds = params.expiryLengthSeconds.unsignedShortValue; request.breadcrumb = params.breadcrumb.unsignedLongLongValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -22612,21 +23024,29 @@ - (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulato GeneralCommissioningClusterSetRegulatoryConfigResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; GeneralCommissioning::Commands::SetRegulatoryConfig::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.newRegulatoryConfig = static_cast>( params.newRegulatoryConfig.unsignedCharValue); request.countryCode = [self asCharSpan:params.countryCode]; request.breadcrumb = params.breadcrumb.unsignedLongLongValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -22649,17 +23069,25 @@ - (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissio GeneralCommissioningClusterCommissioningCompleteResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; GeneralCommissioning::Commands::CommissioningComplete::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)); + } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -23699,13 +24127,21 @@ - (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams NetworkCommissioningClusterScanNetworksResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; NetworkCommissioning::Commands::ScanNetworks::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)); + } } if (params != nil) { if (params.ssid != nil) { @@ -23723,8 +24159,8 @@ - (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -23740,13 +24176,21 @@ - (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpd NetworkCommissioningClusterNetworkConfigResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::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.ssid = [self asByteSpan:params.ssid]; request.credentials = [self asByteSpan:params.credentials]; @@ -23755,8 +24199,8 @@ - (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpd definedValue_0 = params.breadcrumb.unsignedLongLongValue; } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -23772,13 +24216,21 @@ - (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrU NetworkCommissioningClusterNetworkConfigResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::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.operationalDataset = [self asByteSpan:params.operationalDataset]; if (params.breadcrumb != nil) { @@ -23786,8 +24238,8 @@ - (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrU definedValue_0 = params.breadcrumb.unsignedLongLongValue; } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -23803,13 +24255,21 @@ - (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkPara NetworkCommissioningClusterNetworkConfigResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; NetworkCommissioning::Commands::RemoveNetwork::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.networkID = [self asByteSpan:params.networkID]; if (params.breadcrumb != nil) { @@ -23817,8 +24277,8 @@ - (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkPara definedValue_0 = params.breadcrumb.unsignedLongLongValue; } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -23834,13 +24294,21 @@ - (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkPa NetworkCommissioningClusterConnectNetworkResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; NetworkCommissioning::Commands::ConnectNetwork::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.networkID = [self asByteSpan:params.networkID]; if (params.breadcrumb != nil) { @@ -23848,8 +24316,8 @@ - (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkPa definedValue_0 = params.breadcrumb.unsignedLongLongValue; } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -23865,13 +24333,21 @@ - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkPa NetworkCommissioningClusterNetworkConfigResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; NetworkCommissioning::Commands::ReorderNetwork::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.networkID = [self asByteSpan:params.networkID]; request.networkIndex = params.networkIndex.unsignedCharValue; @@ -23880,8 +24356,8 @@ - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkPa definedValue_0 = params.breadcrumb.unsignedLongLongValue; } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -25187,21 +25663,29 @@ - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsReque DiagnosticLogsClusterRetrieveLogsResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DiagnosticLogs::Commands::RetrieveLogsRequest::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.intent = static_cast>(params.intent.unsignedCharValue); request.requestedProtocol = static_cast>( params.requestedProtocol.unsignedCharValue); request.transferFileDesignator = [self asByteSpan:params.transferFileDesignator]; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -25696,19 +26180,27 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; GeneralDiagnostics::Commands::TestEventTrigger::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.enableKey = [self asByteSpan:params.enableKey]; request.eventTrigger = params.eventTrigger.unsignedLongLongValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -26994,17 +27486,25 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; SoftwareDiagnostics::Commands::ResetWatermarks::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)); + } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -27855,17 +28355,25 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ThreadNetworkDiagnostics::Commands::ResetCounts::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)); + } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -33947,17 +34455,25 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; WiFiNetworkDiagnostics::Commands::ResetCounts::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)); + } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -35595,17 +36111,25 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; EthernetNetworkDiagnostics::Commands::ResetCounts::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)); + } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -39422,13 +39946,21 @@ - (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterO ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; AdministratorCommissioning::Commands::OpenCommissioningWindow::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)); + } } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); @@ -39439,8 +39971,8 @@ - (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterO request.iterations = params.iterations.unsignedIntValue; request.salt = [self asByteSpan:params.salt]; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -39458,21 +39990,29 @@ - (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClu ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::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)); + } } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); } request.commissioningTimeout = params.commissioningTimeout.unsignedShortValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -39494,20 +40034,28 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; AdministratorCommissioning::Commands::RevokeCommissioning::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)); + } } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -40273,18 +40821,26 @@ - (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestatio OperationalCredentialsClusterAttestationResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; OperationalCredentials::Commands::AttestationRequest::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.attestationNonce = [self asByteSpan:params.attestationNonce]; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -40300,19 +40856,27 @@ - (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCerti OperationalCredentialsClusterCertificateChainResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; OperationalCredentials::Commands::CertificateChainRequest::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.certificateType = static_cast>(params.certificateType.unsignedCharValue); - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -40328,13 +40892,21 @@ - (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams * OperationalCredentialsClusterCSRResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; OperationalCredentials::Commands::CSRRequest::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.CSRNonce = [self asByteSpan:params.csrNonce]; if (params.isForUpdateNOC != nil) { @@ -40342,8 +40914,8 @@ - (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams * definedValue_0 = params.isForUpdateNOC.boolValue; } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -40359,13 +40931,21 @@ - (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params OperationalCredentialsClusterNOCResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; OperationalCredentials::Commands::AddNOC::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.NOCValue = [self asByteSpan:params.nocValue]; if (params.icacValue != nil) { @@ -40377,8 +40957,8 @@ - (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params request.adminVendorId = static_cast>(params.adminVendorId.unsignedShortValue); - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -40394,13 +40974,21 @@ - (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)p OperationalCredentialsClusterNOCResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; OperationalCredentials::Commands::UpdateNOC::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.NOCValue = [self asByteSpan:params.nocValue]; if (params.icacValue != nil) { @@ -40408,8 +40996,8 @@ - (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)p definedValue_0 = [self asByteSpan:params.icacValue]; } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -40425,18 +41013,26 @@ - (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabri OperationalCredentialsClusterNOCResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; OperationalCredentials::Commands::UpdateFabricLabel::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.label = [self asCharSpan:params.label]; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -40452,18 +41048,26 @@ - (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricPara OperationalCredentialsClusterNOCResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; OperationalCredentials::Commands::RemoveFabric::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.fabricIndex = params.fabricIndex.unsignedCharValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -40481,18 +41085,26 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; OperationalCredentials::Commands::AddTrustedRootCertificate::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.rootCACertificate = [self asByteSpan:params.rootCACertificate]; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -41592,13 +42204,21 @@ - (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)p ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; GroupKeyManagement::Commands::KeySetWrite::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.groupKeySet.groupKeySetID = params.groupKeySet.groupKeySetID.unsignedShortValue; request.groupKeySet.groupKeySecurityPolicy @@ -41641,8 +42261,8 @@ - (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)p nonNullValue_1 = params.groupKeySet.epochStartTime2.unsignedLongLongValue; } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -41658,18 +42278,26 @@ - (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)par GroupKeyManagementClusterKeySetReadResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; GroupKeyManagement::Commands::KeySetRead::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.groupKeySetID = params.groupKeySetID.unsignedShortValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -41686,18 +42314,26 @@ - (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams * ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; GroupKeyManagement::Commands::KeySetRemove::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.groupKeySetID = params.groupKeySetID.unsignedShortValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -41713,13 +42349,21 @@ - (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAl GroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; GroupKeyManagement::Commands::KeySetReadAllIndices::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)); + } } { using ListType_0 = std::remove_reference_t; @@ -41744,8 +42388,8 @@ - (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAl } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -44403,18 +45047,26 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ModeSelect::Commands::ChangeToMode::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.newMode = params.newMode.unsignedCharValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -45524,13 +46176,21 @@ - (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DoorLock::Commands::LockDoor::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)); + } } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); @@ -45542,8 +46202,8 @@ - (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -45560,13 +46220,21 @@ - (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)par ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DoorLock::Commands::UnlockDoor::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)); + } } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); @@ -45578,8 +46246,8 @@ - (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)par } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -45596,13 +46264,21 @@ - (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams * ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DoorLock::Commands::UnlockWithTimeout::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)); + } } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); @@ -45613,8 +46289,8 @@ - (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams * definedValue_0 = [self asByteSpan:params.pinCode]; } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -45631,13 +46307,21 @@ - (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DoorLock::Commands::SetWeekDaySchedule::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.weekDayIndex = params.weekDayIndex.unsignedCharValue; request.userIndex = params.userIndex.unsignedShortValue; @@ -45647,8 +46331,8 @@ - (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams request.endHour = params.endHour.unsignedCharValue; request.endMinute = params.endMinute.unsignedCharValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -45664,19 +46348,27 @@ - (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams DoorLockClusterGetWeekDayScheduleResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DoorLock::Commands::GetWeekDaySchedule::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.weekDayIndex = params.weekDayIndex.unsignedCharValue; request.userIndex = params.userIndex.unsignedShortValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -45694,19 +46386,27 @@ - (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDaySchedulePa ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DoorLock::Commands::ClearWeekDaySchedule::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.weekDayIndex = params.weekDayIndex.unsignedCharValue; request.userIndex = params.userIndex.unsignedShortValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -45723,21 +46423,29 @@ - (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DoorLock::Commands::SetYearDaySchedule::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.yearDayIndex = params.yearDayIndex.unsignedCharValue; request.userIndex = params.userIndex.unsignedShortValue; request.localStartTime = params.localStartTime.unsignedIntValue; request.localEndTime = params.localEndTime.unsignedIntValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -45753,19 +46461,27 @@ - (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams DoorLockClusterGetYearDayScheduleResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DoorLock::Commands::GetYearDaySchedule::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.yearDayIndex = params.yearDayIndex.unsignedCharValue; request.userIndex = params.userIndex.unsignedShortValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -45783,19 +46499,27 @@ - (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDaySchedulePa ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DoorLock::Commands::ClearYearDaySchedule::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.yearDayIndex = params.yearDayIndex.unsignedCharValue; request.userIndex = params.userIndex.unsignedShortValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -45812,13 +46536,21 @@ - (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DoorLock::Commands::SetHolidaySchedule::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.holidayIndex = params.holidayIndex.unsignedCharValue; request.localStartTime = params.localStartTime.unsignedIntValue; @@ -45826,8 +46558,8 @@ - (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams request.operatingMode = static_cast>(params.operatingMode.unsignedCharValue); - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -45843,18 +46575,26 @@ - (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams DoorLockClusterGetHolidayScheduleResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DoorLock::Commands::GetHolidaySchedule::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.holidayIndex = params.holidayIndex.unsignedCharValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -45872,18 +46612,26 @@ - (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidaySchedulePa ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DoorLock::Commands::ClearHolidaySchedule::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.holidayIndex = params.holidayIndex.unsignedCharValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -45900,13 +46648,21 @@ - (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params completion:( ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DoorLock::Commands::SetUser::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)); + } } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); @@ -45947,8 +46703,8 @@ - (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params completion:( = static_cast>(params.credentialRule.unsignedCharValue); } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -45962,18 +46718,26 @@ - (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params ^(ExchangeManager & exchangeManager, const SessionHandle & session, DoorLockClusterGetUserResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DoorLock::Commands::GetUser::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.userIndex = params.userIndex.unsignedShortValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -45990,21 +46754,29 @@ - (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params completi ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DoorLock::Commands::ClearUser::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)); + } } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); } request.userIndex = params.userIndex.unsignedShortValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -46020,13 +46792,21 @@ - (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params DoorLockClusterSetCredentialResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DoorLock::Commands::SetCredential::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)); + } } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); @@ -46057,8 +46837,8 @@ - (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params nonNullValue_0 = static_cast>(params.userType.unsignedCharValue); } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -46074,20 +46854,28 @@ - (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusPara DoorLockClusterGetCredentialStatusResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DoorLock::Commands::GetCredentialStatus::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.credential.credentialType = static_cast>( params.credential.credentialType.unsignedCharValue); request.credential.credentialIndex = params.credential.credentialIndex.unsignedShortValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -46104,13 +46892,21 @@ - (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)par ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DoorLock::Commands::ClearCredential::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)); + } } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); @@ -46124,8 +46920,8 @@ - (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)par nonNullValue_0.credentialIndex = params.credential.credentialIndex.unsignedShortValue; } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -50817,17 +51613,25 @@ - (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)p ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; WindowCovering::Commands::UpOrOpen::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)); + } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -50849,17 +51653,25 @@ - (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Null ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; WindowCovering::Commands::DownOrClose::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)); + } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -50880,17 +51692,25 @@ - (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullab ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; WindowCovering::Commands::StopMotion::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)); + } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -50907,18 +51727,26 @@ - (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)p ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; WindowCovering::Commands::GoToLiftValue::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.liftValue = params.liftValue.unsignedShortValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -50936,18 +51764,26 @@ - (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentage ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; WindowCovering::Commands::GoToLiftPercentage::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.liftPercent100thsValue = params.liftPercent100thsValue.unsignedShortValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -50964,18 +51800,26 @@ - (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)p ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; WindowCovering::Commands::GoToTiltValue::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.tiltValue = params.tiltValue.unsignedShortValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -50993,18 +51837,26 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; WindowCovering::Commands::GoToTiltPercentage::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.tiltPercent100thsValue = params.tiltPercent100thsValue.unsignedShortValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -53566,18 +54418,26 @@ - (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierCont ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; BarrierControl::Commands::BarrierControlGoToPercent::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.percentOpen = params.percentOpen.unsignedCharValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -53599,17 +54459,25 @@ - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStop ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; BarrierControl::Commands::BarrierControlStop::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)); + } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -57961,19 +58829,27 @@ - (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerPara ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Thermostat::Commands::SetpointRaiseLower::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.mode = static_cast>(params.mode.unsignedCharValue); request.amount = params.amount.charValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -57990,13 +58866,21 @@ - (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Thermostat::Commands::SetWeeklySchedule::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.numberOfTransitionsForSequence = params.numberOfTransitionsForSequence.unsignedCharValue; request.dayOfWeekForSequence = static_cast>( @@ -58038,8 +58922,8 @@ - (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -58055,21 +58939,29 @@ - (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams ThermostatClusterGetWeeklyScheduleResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Thermostat::Commands::GetWeeklySchedule::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.daysToReturn = static_cast>(params.daysToReturn.unsignedCharValue); request.modeToReturn = static_cast>(params.modeToReturn.unsignedCharValue); - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -58091,17 +58983,25 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Thermostat::Commands::ClearWeeklySchedule::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)); + } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -66889,13 +67789,21 @@ - (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params comp ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::MoveToHue::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.hue = params.hue.unsignedCharValue; request.direction @@ -66904,8 +67812,8 @@ - (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params comp request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -66922,21 +67830,29 @@ - (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params completi ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::MoveHue::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.moveMode = static_cast>(params.moveMode.unsignedCharValue); request.rate = params.rate.unsignedCharValue; request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -66953,13 +67869,21 @@ - (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params completi ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::StepHue::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.stepMode = static_cast>(params.stepMode.unsignedCharValue); request.stepSize = params.stepSize.unsignedCharValue; @@ -66967,8 +67891,8 @@ - (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params completi request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -66985,21 +67909,29 @@ - (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::MoveToSaturation::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.saturation = params.saturation.unsignedCharValue; request.transitionTime = params.transitionTime.unsignedShortValue; request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -67016,21 +67948,29 @@ - (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)p ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::MoveSaturation::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.moveMode = static_cast>(params.moveMode.unsignedCharValue); request.rate = params.rate.unsignedCharValue; request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -67047,13 +67987,21 @@ - (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)p ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::StepSaturation::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.stepMode = static_cast>(params.stepMode.unsignedCharValue); request.stepSize = params.stepSize.unsignedCharValue; @@ -67061,8 +68009,8 @@ - (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)p request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -67080,13 +68028,21 @@ - (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSatu ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::MoveToHueAndSaturation::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.hue = params.hue.unsignedCharValue; request.saturation = params.saturation.unsignedCharValue; @@ -67094,8 +68050,8 @@ - (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSatu request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -67112,13 +68068,21 @@ - (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::MoveToColor::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.colorX = params.colorX.unsignedShortValue; request.colorY = params.colorY.unsignedShortValue; @@ -67126,8 +68090,8 @@ - (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -67144,21 +68108,29 @@ - (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params comp ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::MoveColor::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.rateX = params.rateX.shortValue; request.rateY = params.rateY.shortValue; request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -67175,13 +68147,21 @@ - (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params comp ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::StepColor::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.stepX = params.stepX.shortValue; request.stepY = params.stepY.shortValue; @@ -67189,8 +68169,8 @@ - (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params comp request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -67208,21 +68188,29 @@ - (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTempe ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::MoveToColorTemperature::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.colorTemperatureMireds = params.colorTemperatureMireds.unsignedShortValue; request.transitionTime = params.transitionTime.unsignedShortValue; request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -67240,13 +68228,21 @@ - (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHuePara ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::EnhancedMoveToHue::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.enhancedHue = params.enhancedHue.unsignedShortValue; request.direction @@ -67255,8 +68251,8 @@ - (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHuePara request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -67273,21 +68269,29 @@ - (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams * ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::EnhancedMoveHue::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.moveMode = static_cast>(params.moveMode.unsignedCharValue); request.rate = params.rate.unsignedShortValue; request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -67304,13 +68308,21 @@ - (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams * ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::EnhancedStepHue::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.stepMode = static_cast>(params.stepMode.unsignedCharValue); request.stepSize = params.stepSize.unsignedShortValue; @@ -67318,8 +68330,8 @@ - (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams * request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -67337,13 +68349,21 @@ - (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhanced ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::EnhancedMoveToHueAndSaturation::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.enhancedHue = params.enhancedHue.unsignedShortValue; request.saturation = params.saturation.unsignedCharValue; @@ -67351,8 +68371,8 @@ - (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhanced request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -67369,13 +68389,21 @@ - (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)param ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::ColorLoopSet::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.updateFlags = static_cast>(params.updateFlags.unsignedCharValue); @@ -67387,8 +68415,8 @@ - (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)param request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -67405,19 +68433,27 @@ - (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)param ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::StopMoveStep::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.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -67435,13 +68471,21 @@ - (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatu ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::MoveColorTemperature::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.moveMode = static_cast>(params.moveMode.unsignedCharValue); request.rate = params.rate.unsignedShortValue; @@ -67450,8 +68494,8 @@ - (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatu request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -67469,13 +68513,21 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::StepColorTemperature::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.stepMode = static_cast>(params.stepMode.unsignedCharValue); request.stepSize = params.stepSize.unsignedShortValue; @@ -67485,8 +68537,8 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -82623,18 +83675,26 @@ - (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params ^(ExchangeManager & exchangeManager, const SessionHandle & session, ChannelClusterChangeChannelResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Channel::Commands::ChangeChannel::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.match = [self asCharSpan:params.match]; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -82652,19 +83712,27 @@ - (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberP ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Channel::Commands::ChangeChannelByNumber::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.majorNumber = params.majorNumber.unsignedShortValue; request.minorNumber = params.minorNumber.unsignedShortValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -82681,18 +83749,26 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params compl ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Channel::Commands::SkipChannel::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.count = params.count.unsignedShortValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -83460,13 +84536,21 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams TargetNavigatorClusterNavigateTargetResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; TargetNavigator::Commands::NavigateTarget::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.target = params.target.unsignedCharValue; if (params.data != nil) { @@ -83474,8 +84558,8 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams definedValue_0 = [self asCharSpan:params.data]; } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -84145,17 +85229,25 @@ - (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; MediaPlayback::Commands::Play::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)); + } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -84176,17 +85268,25 @@ - (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; MediaPlayback::Commands::Pause::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)); + } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -84207,17 +85307,25 @@ - (void)stopPlaybackWithParams:(MTRMediaPlaybackClusterStopPlaybackParams * _Nul MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; MediaPlayback::Commands::StopPlayback::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)); + } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -84238,17 +85346,25 @@ - (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable) MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; MediaPlayback::Commands::StartOver::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)); + } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -84269,17 +85385,25 @@ - (void)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)pa MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; MediaPlayback::Commands::Previous::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)); + } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -84300,17 +85424,25 @@ - (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; MediaPlayback::Commands::Next::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)); + } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -84331,17 +85463,25 @@ - (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; MediaPlayback::Commands::Rewind::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)); + } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -84362,17 +85502,25 @@ - (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nulla MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; MediaPlayback::Commands::FastForward::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)); + } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -84388,18 +85536,26 @@ - (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; MediaPlayback::Commands::SkipForward::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.deltaPositionMilliseconds = params.deltaPositionMilliseconds.unsignedLongLongValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -84415,18 +85571,26 @@ - (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)para MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; MediaPlayback::Commands::SkipBackward::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.deltaPositionMilliseconds = params.deltaPositionMilliseconds.unsignedLongLongValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -84442,18 +85606,26 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; MediaPlayback::Commands::Seek::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.position = params.position.unsignedLongLongValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -85697,18 +86869,26 @@ - (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params co ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; MediaInput::Commands::SelectInput::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.index = params.index.unsignedCharValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -85730,17 +86910,25 @@ - (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _ ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; MediaInput::Commands::ShowInputStatus::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)); + } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -85762,17 +86950,25 @@ - (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _ ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; MediaInput::Commands::HideInputStatus::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)); + } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -85789,19 +86985,27 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params co ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; MediaInput::Commands::RenameInput::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.index = params.index.unsignedCharValue; request.name = [self asCharSpan:params.name]; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -86487,17 +87691,25 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params comple ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; LowPower::Commands::Sleep::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)); + } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -86986,18 +88198,26 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params ^(ExchangeManager & exchangeManager, const SessionHandle & session, KeypadInputClusterSendKeyResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; KeypadInput::Commands::SendKey::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.keyCode = static_cast>(params.keyCode.unsignedCharValue); - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -87489,13 +88709,21 @@ - (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *) ContentLauncherClusterLaunchResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ContentLauncher::Commands::LaunchContent::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)); + } } { using ListType_1 = std::remove_reference_t; @@ -87555,8 +88783,8 @@ - (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *) definedValue_0 = [self asCharSpan:params.data]; } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -87572,13 +88800,21 @@ - (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params ContentLauncherClusterLaunchResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ContentLauncher::Commands::LaunchURL::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.contentURL = [self asCharSpan:params.contentURL]; if (params.displayString != nil) { @@ -87680,8 +88916,8 @@ - (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -88409,18 +89645,26 @@ - (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; AudioOutput::Commands::SelectOutput::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.index = params.index.unsignedCharValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -88437,19 +89681,27 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; AudioOutput::Commands::RenameOutput::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.index = params.index.unsignedCharValue; request.name = [self asCharSpan:params.name]; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -89113,13 +90365,21 @@ - (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams *)para ApplicationLauncherClusterLauncherResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ApplicationLauncher::Commands::LaunchApp::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.application.catalogVendorId = params.application.catalogVendorId.unsignedShortValue; request.application.applicationId = [self asCharSpan:params.application.applicationId]; @@ -89128,8 +90388,8 @@ - (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams *)para definedValue_0 = [self asByteSpan:params.data]; } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -89145,19 +90405,27 @@ - (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams *)params ApplicationLauncherClusterLauncherResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ApplicationLauncher::Commands::StopApp::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.application.catalogVendorId = params.application.catalogVendorId.unsignedShortValue; request.application.applicationId = [self asCharSpan:params.application.applicationId]; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -89173,19 +90441,27 @@ - (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams *)params ApplicationLauncherClusterLauncherResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ApplicationLauncher::Commands::HideApp::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.application.catalogVendorId = params.application.catalogVendorId.unsignedShortValue; request.application.applicationId = [self asCharSpan:params.application.applicationId]; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -91110,21 +92386,29 @@ - (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params AccountLoginClusterGetSetupPINResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; AccountLogin::Commands::GetSetupPIN::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)); + } } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); } request.tempAccountIdentifier = [self asCharSpan:params.tempAccountIdentifier]; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -91141,13 +92425,21 @@ - (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params completion:( ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; AccountLogin::Commands::Login::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)); + } } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); @@ -91155,8 +92447,8 @@ - (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params completion:( request.tempAccountIdentifier = [self asCharSpan:params.tempAccountIdentifier]; request.setupPIN = [self asCharSpan:params.setupPIN]; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -91177,20 +92469,28 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; AccountLogin::Commands::Logout::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)); + } } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -91701,17 +93001,25 @@ - (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfi ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ElectricalMeasurement::Commands::GetProfileInfoCommand::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)); + } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -91729,20 +93037,28 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ElectricalMeasurement::Commands::GetMeasurementProfileCommand::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.attributeId = params.attributeId.unsignedShortValue; request.startTime = params.startTime.unsignedIntValue; request.numberOfIntervals = params.numberOfIntervals.unsignedCharValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -104108,17 +105424,25 @@ - (void)testWithParams:(MTRUnitTestingClusterTestParams * _Nullable)params compl ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::Test::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)); + } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -104140,17 +105464,25 @@ - (void)testNotHandledWithParams:(MTRUnitTestingClusterTestNotHandledParams * _N ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestNotHandled::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)); + } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -104171,17 +105503,25 @@ - (void)testSpecificWithParams:(MTRUnitTestingClusterTestSpecificParams * _Nulla UnitTestingClusterTestSpecificResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestSpecific::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)); + } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -104203,17 +105543,25 @@ - (void)testUnknownCommandWithParams:(MTRUnitTestingClusterTestUnknownCommandPar ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestUnknownCommand::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)); + } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -104229,19 +105577,27 @@ - (void)testAddArgumentsWithParams:(MTRUnitTestingClusterTestAddArgumentsParams UnitTestingClusterTestAddArgumentsResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestAddArguments::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.arg1 = params.arg1.unsignedCharValue; request.arg2 = params.arg2.unsignedCharValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -104257,18 +105613,26 @@ - (void)testSimpleArgumentRequestWithParams:(MTRUnitTestingClusterTestSimpleArgu UnitTestingClusterTestSimpleArgumentResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestSimpleArgumentRequest::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.arg1 = params.arg1.boolValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -104285,13 +105649,21 @@ - (void)testStructArrayArgumentRequestWithParams:(MTRUnitTestingClusterTestStruc UnitTestingClusterTestStructArrayArgumentResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestStructArrayArgumentRequest::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)); + } } { using ListType_0 = std::remove_reference_t; @@ -104504,8 +105876,8 @@ - (void)testStructArrayArgumentRequestWithParams:(MTRUnitTestingClusterTestStruc request.arg5 = static_cast>(params.arg5.unsignedCharValue); request.arg6 = params.arg6.boolValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -104520,13 +105892,21 @@ - (void)testStructArgumentRequestWithParams:(MTRUnitTestingClusterTestStructArgu ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestStructArgumentRequest::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.arg1.a = params.arg1.a.unsignedCharValue; request.arg1.b = params.arg1.b.boolValue; @@ -104537,8 +105917,8 @@ - (void)testStructArgumentRequestWithParams:(MTRUnitTestingClusterTestStructArgu request.arg1.g = params.arg1.g.floatValue; request.arg1.h = params.arg1.h.doubleValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -104553,13 +105933,21 @@ - (void)testNestedStructArgumentRequestWithParams:(MTRUnitTestingClusterTestNest ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestNestedStructArgumentRequest::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.arg1.a = params.arg1.a.unsignedCharValue; request.arg1.b = params.arg1.b.boolValue; @@ -104572,8 +105960,8 @@ - (void)testNestedStructArgumentRequestWithParams:(MTRUnitTestingClusterTestNest request.arg1.c.g = params.arg1.c.g.floatValue; request.arg1.c.h = params.arg1.c.h.doubleValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -104588,13 +105976,21 @@ - (void)testListStructArgumentRequestWithParams:(MTRUnitTestingClusterTestListSt ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestListStructArgumentRequest::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)); + } } { using ListType_0 = std::remove_reference_t; @@ -104628,8 +106024,8 @@ - (void)testListStructArgumentRequestWithParams:(MTRUnitTestingClusterTestListSt } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -104644,13 +106040,21 @@ - (void)testListInt8UArgumentRequestWithParams:(MTRUnitTestingClusterTestListInt ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestListInt8UArgumentRequest::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)); + } } { using ListType_0 = std::remove_reference_t; @@ -104675,8 +106079,8 @@ - (void)testListInt8UArgumentRequestWithParams:(MTRUnitTestingClusterTestListInt } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -104691,13 +106095,21 @@ - (void)testNestedStructListArgumentRequestWithParams:(MTRUnitTestingClusterTest ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestNestedStructListArgumentRequest::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.arg1.a = params.arg1.a.unsignedCharValue; request.arg1.b = params.arg1.b.boolValue; @@ -104807,8 +106219,8 @@ - (void)testNestedStructListArgumentRequestWithParams:(MTRUnitTestingClusterTest } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -104824,13 +106236,21 @@ - (void)testListNestedStructListArgumentRequestWithParams: ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestListNestedStructListArgumentRequest::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)); + } } { using ListType_0 = std::remove_reference_t; @@ -104965,8 +106385,8 @@ - (void)testListNestedStructListArgumentRequestWithParams: } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -104982,13 +106402,21 @@ - (void)testListInt8UReverseRequestWithParams:(MTRUnitTestingClusterTestListInt8 UnitTestingClusterTestListInt8UReverseResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestListInt8UReverseRequest::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)); + } } { using ListType_0 = std::remove_reference_t; @@ -105013,8 +106441,8 @@ - (void)testListInt8UReverseRequestWithParams:(MTRUnitTestingClusterTestListInt8 } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -105029,19 +106457,27 @@ - (void)testEnumsRequestWithParams:(MTRUnitTestingClusterTestEnumsRequestParams ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingClusterTestEnumsResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestEnumsRequest::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.arg1 = static_cast>(params.arg1.unsignedShortValue); request.arg2 = static_cast>(params.arg2.unsignedCharValue); - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -105057,13 +106493,21 @@ - (void)testNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestNullable UnitTestingClusterTestNullableOptionalResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestNullableOptionalRequest::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)); + } } if (params != nil) { if (params.arg1 != nil) { @@ -105077,8 +106521,8 @@ - (void)testNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestNullable } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -105096,13 +106540,21 @@ - (void)testComplexNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestC UnitTestingClusterTestComplexNullableOptionalResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestComplexNullableOptionalRequest::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)); + } } if (params.nullableInt == nil) { request.nullableInt.SetNull(); @@ -105274,8 +106726,8 @@ - (void)testComplexNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestC } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -105291,13 +106743,21 @@ - (void)simpleStructEchoRequestWithParams:(MTRUnitTestingClusterSimpleStructEcho UnitTestingClusterSimpleStructResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::SimpleStructEchoRequest::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.arg1.a = params.arg1.a.unsignedCharValue; request.arg1.b = params.arg1.b.boolValue; @@ -105308,8 +106768,8 @@ - (void)simpleStructEchoRequestWithParams:(MTRUnitTestingClusterSimpleStructEcho request.arg1.g = params.arg1.g.floatValue; request.arg1.h = params.arg1.h.doubleValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -105331,20 +106791,28 @@ - (void)timedInvokeRequestWithParams:(MTRUnitTestingClusterTimedInvokeRequestPar ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TimedInvokeRequest::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)); + } } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -105362,13 +106830,21 @@ - (void)testSimpleOptionalArgumentRequestWithParams:(MTRUnitTestingClusterTestSi ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestSimpleOptionalArgumentRequest::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)); + } } if (params != nil) { if (params.arg1 != nil) { @@ -105377,8 +106853,8 @@ - (void)testSimpleOptionalArgumentRequestWithParams:(MTRUnitTestingClusterTestSi } } - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -105394,20 +106870,28 @@ - (void)testEmitTestEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestEve UnitTestingClusterTestEmitTestEventResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestEmitTestEventRequest::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.arg1 = params.arg1.unsignedCharValue; request.arg2 = static_cast>(params.arg2.unsignedCharValue); request.arg3 = params.arg3.boolValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -105426,18 +106910,26 @@ - (void)testEmitTestEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestEve UnitTestingClusterTestEmitTestFabricScopedEventResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); - chip::Optional timedInvokeTimeoutMs; + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestEmitTestFabricScopedEventRequest::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.arg1 = params.arg1.unsignedCharValue; - return MTRStartInvokeInteraction( - typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index c5589bcdae0234..6146420975da40 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -18,6 +18,7 @@ #import #import "MTRAsyncCallbackWorkQueue.h" +#import "MTRBaseClusterUtils.h" #import "MTRBaseDevice_Internal.h" #import "MTRCallbackBridge.h" #import "MTRClusterConstants.h" @@ -35,8 +36,11 @@ using chip::Callback::Callback; using chip::Callback::Cancelable; using namespace chip::app::Clusters; +using chip::Optional; using chip::SessionHandle; using chip::Messaging::ExchangeManager; +using chip::System::Clock::Seconds16; +using chip::System::Clock::Timeout; static void MTRClustersLogEnqueue(NSString * logPrefix, MTRAsyncCallbackWorkQueue * workQueue) { @@ -99,16 +103,27 @@ - (void)identifyWithParams:(MTRIdentifyClusterIdentifyParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Identify::Commands::Identify::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.identifyTime = params.identifyTime.unsignedShortValue; - chip::Controller::IdentifyCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -156,19 +171,30 @@ - (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Identify::Commands::TriggerEffect::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.effectIdentifier = static_cast>( params.effectIdentifier.unsignedCharValue); request.effectVariant = static_cast>(params.effectVariant.unsignedCharValue); - chip::Controller::IdentifyCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -337,17 +363,28 @@ - (void)addGroupWithParams:(MTRGroupsClusterAddGroupParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, GroupsClusterAddGroupResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Groups::Commands::AddGroup::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.groupID = params.groupID.unsignedShortValue; request.groupName = [self asCharSpan:params.groupName]; - chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -396,16 +433,27 @@ - (void)viewGroupWithParams:(MTRGroupsClusterViewGroupParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, GroupsClusterViewGroupResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Groups::Commands::ViewGroup::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.groupID = params.groupID.unsignedShortValue; - chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -455,12 +503,23 @@ - (void)getGroupMembershipWithParams:(MTRGroupsClusterGetGroupMembershipParams * ^(ExchangeManager & exchangeManager, const SessionHandle & session, GroupsClusterGetGroupMembershipResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Groups::Commands::GetGroupMembership::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)); + } + } { using ListType_0 = std::remove_reference_t; using ListMemberType_0 = ListMemberTypeGetter::Type; @@ -484,8 +543,8 @@ - (void)getGroupMembershipWithParams:(MTRGroupsClusterGetGroupMembershipParams * } } - chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -535,16 +594,27 @@ - (void)removeGroupWithParams:(MTRGroupsClusterRemoveGroupParams *)params ^(ExchangeManager & exchangeManager, const SessionHandle & session, GroupsClusterRemoveGroupResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Groups::Commands::RemoveGroup::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.groupID = params.groupID.unsignedShortValue; - chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -601,15 +671,26 @@ - (void)removeAllGroupsWithParams:(MTRGroupsClusterRemoveAllGroupsParams * _Null }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Groups::Commands::RemoveAllGroups::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)); + } + } - chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -657,17 +738,28 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Groups::Commands::AddGroupIfIdentifying::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.groupID = params.groupID.unsignedShortValue; request.groupName = [self asCharSpan:params.groupName]; - chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -875,12 +967,23 @@ - (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, ScenesClusterAddSceneResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Scenes::Commands::AddScene::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.groupId = params.groupId.unsignedShortValue; request.sceneId = params.sceneId.unsignedCharValue; request.transitionTime = params.transitionTime.unsignedShortValue; @@ -960,8 +1063,8 @@ - (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params } } - chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -1010,17 +1113,28 @@ - (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, ScenesClusterViewSceneResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Scenes::Commands::ViewScene::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.groupId = params.groupId.unsignedShortValue; request.sceneId = params.sceneId.unsignedCharValue; - chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -1070,17 +1184,28 @@ - (void)removeSceneWithParams:(MTRScenesClusterRemoveSceneParams *)params ^(ExchangeManager & exchangeManager, const SessionHandle & session, ScenesClusterRemoveSceneResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Scenes::Commands::RemoveScene::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.groupId = params.groupId.unsignedShortValue; request.sceneId = params.sceneId.unsignedCharValue; - chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -1130,16 +1255,27 @@ - (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)param ^(ExchangeManager & exchangeManager, const SessionHandle & session, ScenesClusterRemoveAllScenesResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Scenes::Commands::RemoveAllScenes::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.groupId = params.groupId.unsignedShortValue; - chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -1188,17 +1324,28 @@ - (void)storeSceneWithParams:(MTRScenesClusterStoreSceneParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, ScenesClusterStoreSceneResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Scenes::Commands::StoreScene::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.groupId = params.groupId.unsignedShortValue; request.sceneId = params.sceneId.unsignedCharValue; - chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -1246,12 +1393,23 @@ - (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Scenes::Commands::RecallScene::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.groupId = params.groupId.unsignedShortValue; request.sceneId = params.sceneId.unsignedCharValue; if (params.transitionTime != nil) { @@ -1264,8 +1422,8 @@ - (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params } } - chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -1315,16 +1473,27 @@ - (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams * ^(ExchangeManager & exchangeManager, const SessionHandle & session, ScenesClusterGetSceneMembershipResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Scenes::Commands::GetSceneMembership::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.groupId = params.groupId.unsignedShortValue; - chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -1374,12 +1543,23 @@ - (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)par ^(ExchangeManager & exchangeManager, const SessionHandle & session, ScenesClusterEnhancedAddSceneResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Scenes::Commands::EnhancedAddScene::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.groupId = params.groupId.unsignedShortValue; request.sceneId = params.sceneId.unsignedCharValue; request.transitionTime = params.transitionTime.unsignedShortValue; @@ -1459,8 +1639,8 @@ - (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)par } } - chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -1510,17 +1690,28 @@ - (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)p ^(ExchangeManager & exchangeManager, const SessionHandle & session, ScenesClusterEnhancedViewSceneResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Scenes::Commands::EnhancedViewScene::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.groupId = params.groupId.unsignedShortValue; request.sceneId = params.sceneId.unsignedCharValue; - chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -1569,20 +1760,31 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, ScenesClusterCopySceneResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Scenes::Commands::CopyScene::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.mode = static_cast>(params.mode.unsignedCharValue); request.groupIdFrom = params.groupIdFrom.unsignedShortValue; request.sceneIdFrom = params.sceneIdFrom.unsignedCharValue; request.groupIdTo = params.groupIdTo.unsignedShortValue; request.sceneIdTo = params.sceneIdTo.unsignedCharValue; - chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -1888,15 +2090,26 @@ - (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; OnOff::Commands::Off::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)); + } + } - chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -1950,15 +2163,26 @@ - (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; OnOff::Commands::On::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)); + } + } - chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -2012,15 +2236,26 @@ - (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; OnOff::Commands::Toggle::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)); + } + } - chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -2068,19 +2303,30 @@ - (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; OnOff::Commands::OffWithEffect::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.effectIdentifier = static_cast>( params.effectIdentifier.unsignedCharValue); request.effectVariant = static_cast>(params.effectVariant.unsignedCharValue); - chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -2137,15 +2383,26 @@ - (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalScen }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; OnOff::Commands::OnWithRecallGlobalScene::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)); + } + } - chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -2193,19 +2450,30 @@ - (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; OnOff::Commands::OnWithTimedOff::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.onOffControl = static_cast>(params.onOffControl.unsignedCharValue); request.onTime = params.onTime.unsignedShortValue; request.offWaitTime = params.offWaitTime.unsignedShortValue; - chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -2615,12 +2883,23 @@ - (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; LevelControl::Commands::MoveToLevel::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.level = params.level.unsignedCharValue; if (params.transitionTime == nil) { request.transitionTime.SetNull(); @@ -2633,8 +2912,8 @@ - (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params request.optionsOverride = static_cast>( params.optionsOverride.unsignedCharValue); - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -2682,12 +2961,23 @@ - (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; LevelControl::Commands::Move::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.moveMode = static_cast>(params.moveMode.unsignedCharValue); if (params.rate == nil) { @@ -2701,8 +2991,8 @@ - (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params request.optionsOverride = static_cast>( params.optionsOverride.unsignedCharValue); - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -2750,12 +3040,23 @@ - (void)stepWithParams:(MTRLevelControlClusterStepParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; LevelControl::Commands::Step::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.stepMode = static_cast>(params.stepMode.unsignedCharValue); request.stepSize = params.stepSize.unsignedCharValue; @@ -2770,8 +3071,8 @@ - (void)stepWithParams:(MTRLevelControlClusterStepParams *)params request.optionsOverride = static_cast>( params.optionsOverride.unsignedCharValue); - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -2819,19 +3120,30 @@ - (void)stopWithParams:(MTRLevelControlClusterStopParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; LevelControl::Commands::Stop::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.optionsMask = static_cast>(params.optionsMask.unsignedCharValue); request.optionsOverride = static_cast>( params.optionsOverride.unsignedCharValue); - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -2879,12 +3191,23 @@ - (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnO }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; LevelControl::Commands::MoveToLevelWithOnOff::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.level = params.level.unsignedCharValue; if (params.transitionTime == nil) { request.transitionTime.SetNull(); @@ -2897,8 +3220,8 @@ - (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnO request.optionsOverride = static_cast>( params.optionsOverride.unsignedCharValue); - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -2946,12 +3269,23 @@ - (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)par }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; LevelControl::Commands::MoveWithOnOff::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.moveMode = static_cast>(params.moveMode.unsignedCharValue); if (params.rate == nil) { @@ -2965,8 +3299,8 @@ - (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)par request.optionsOverride = static_cast>( params.optionsOverride.unsignedCharValue); - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -3014,12 +3348,23 @@ - (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)par }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; LevelControl::Commands::StepWithOnOff::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.stepMode = static_cast>(params.stepMode.unsignedCharValue); request.stepSize = params.stepSize.unsignedCharValue; @@ -3034,8 +3379,8 @@ - (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)par request.optionsOverride = static_cast>( params.optionsOverride.unsignedCharValue); - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -3083,19 +3428,30 @@ - (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)par }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; LevelControl::Commands::StopWithOnOff::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.optionsMask = static_cast>(params.optionsMask.unsignedCharValue); request.optionsOverride = static_cast>( params.optionsOverride.unsignedCharValue); - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -3143,16 +3499,27 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; LevelControl::Commands::MoveToClosestFrequency::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.frequency = params.frequency.unsignedShortValue; - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -4209,20 +4576,31 @@ - (void)instantActionWithParams:(MTRActionsClusterInstantActionParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Actions::Commands::InstantAction::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.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { auto & definedValue_0 = request.invokeID.Emplace(); definedValue_0 = params.invokeID.unsignedIntValue; } - chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -4270,12 +4648,23 @@ - (void)instantActionWithTransitionWithParams:(MTRActionsClusterInstantActionWit }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Actions::Commands::InstantActionWithTransition::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.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { auto & definedValue_0 = request.invokeID.Emplace(); @@ -4283,8 +4672,8 @@ - (void)instantActionWithTransitionWithParams:(MTRActionsClusterInstantActionWit } request.transitionTime = params.transitionTime.unsignedShortValue; - chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -4332,20 +4721,31 @@ - (void)startActionWithParams:(MTRActionsClusterStartActionParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Actions::Commands::StartAction::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.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { auto & definedValue_0 = request.invokeID.Emplace(); definedValue_0 = params.invokeID.unsignedIntValue; } - chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -4393,12 +4793,23 @@ - (void)startActionWithDurationWithParams:(MTRActionsClusterStartActionWithDurat }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Actions::Commands::StartActionWithDuration::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.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { auto & definedValue_0 = request.invokeID.Emplace(); @@ -4406,8 +4817,8 @@ - (void)startActionWithDurationWithParams:(MTRActionsClusterStartActionWithDurat } request.duration = params.duration.unsignedIntValue; - chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -4455,20 +4866,31 @@ - (void)stopActionWithParams:(MTRActionsClusterStopActionParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Actions::Commands::StopAction::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.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { auto & definedValue_0 = request.invokeID.Emplace(); definedValue_0 = params.invokeID.unsignedIntValue; } - chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -4516,20 +4938,31 @@ - (void)pauseActionWithParams:(MTRActionsClusterPauseActionParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Actions::Commands::PauseAction::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.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { auto & definedValue_0 = request.invokeID.Emplace(); definedValue_0 = params.invokeID.unsignedIntValue; } - chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -4577,12 +5010,23 @@ - (void)pauseActionWithDurationWithParams:(MTRActionsClusterPauseActionWithDurat }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Actions::Commands::PauseActionWithDuration::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.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { auto & definedValue_0 = request.invokeID.Emplace(); @@ -4590,8 +5034,8 @@ - (void)pauseActionWithDurationWithParams:(MTRActionsClusterPauseActionWithDurat } request.duration = params.duration.unsignedIntValue; - chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -4639,20 +5083,31 @@ - (void)resumeActionWithParams:(MTRActionsClusterResumeActionParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Actions::Commands::ResumeAction::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.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { auto & definedValue_0 = request.invokeID.Emplace(); definedValue_0 = params.invokeID.unsignedIntValue; } - chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -4700,20 +5155,31 @@ - (void)enableActionWithParams:(MTRActionsClusterEnableActionParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Actions::Commands::EnableAction::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.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { auto & definedValue_0 = request.invokeID.Emplace(); definedValue_0 = params.invokeID.unsignedIntValue; } - chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -4761,12 +5227,23 @@ - (void)enableActionWithDurationWithParams:(MTRActionsClusterEnableActionWithDur }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Actions::Commands::EnableActionWithDuration::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.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { auto & definedValue_0 = request.invokeID.Emplace(); @@ -4774,8 +5251,8 @@ - (void)enableActionWithDurationWithParams:(MTRActionsClusterEnableActionWithDur } request.duration = params.duration.unsignedIntValue; - chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -4823,20 +5300,31 @@ - (void)disableActionWithParams:(MTRActionsClusterDisableActionParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Actions::Commands::DisableAction::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.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { auto & definedValue_0 = request.invokeID.Emplace(); definedValue_0 = params.invokeID.unsignedIntValue; } - chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -4884,12 +5372,23 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Actions::Commands::DisableActionWithDuration::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.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { auto & definedValue_0 = request.invokeID.Emplace(); @@ -4897,8 +5396,8 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD } request.duration = params.duration.unsignedIntValue; - chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -5164,15 +5663,26 @@ - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nulla }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; BasicInformation::Commands::MfgSpecificPing::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)); + } + } - chip::Controller::BasicInformationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -5526,12 +6036,23 @@ - (void)queryImageWithParams:(MTROTASoftwareUpdateProviderClusterQueryImageParam ^(ExchangeManager & exchangeManager, const SessionHandle & session, OTASoftwareUpdateProviderClusterQueryImageResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; OtaSoftwareUpdateProvider::Commands::QueryImage::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.vendorID = static_cast>(params.vendorID.unsignedShortValue); request.productID = params.productID.unsignedShortValue; @@ -5576,8 +6097,8 @@ - (void)queryImageWithParams:(MTROTASoftwareUpdateProviderClusterQueryImageParam definedValue_0 = [self asByteSpan:params.metadataForProvider]; } - chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -5627,17 +6148,28 @@ - (void)applyUpdateRequestWithParams:(MTROTASoftwareUpdateProviderClusterApplyUp ^(ExchangeManager & exchangeManager, const SessionHandle & session, OTASoftwareUpdateProviderClusterApplyUpdateResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::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.updateToken = [self asByteSpan:params.updateToken]; request.newVersion = params.newVersion.unsignedIntValue; - chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -5685,17 +6217,28 @@ - (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotify }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::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.updateToken = [self asByteSpan:params.updateToken]; request.softwareVersion = params.softwareVersion.unsignedIntValue; - chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -5854,12 +6397,23 @@ - (void)announceOTAProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnou }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::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.providerNodeID = params.providerNodeID.unsignedLongLongValue; request.vendorID = static_cast>(params.vendorID.unsignedShortValue); @@ -5871,8 +6425,8 @@ - (void)announceOTAProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnou } request.endpoint = params.endpoint.unsignedShortValue; - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -6788,17 +7342,28 @@ - (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams * ^(ExchangeManager & exchangeManager, const SessionHandle & session, GeneralCommissioningClusterArmFailSafeResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; GeneralCommissioning::Commands::ArmFailSafe::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.expiryLengthSeconds = params.expiryLengthSeconds.unsignedShortValue; request.breadcrumb = params.breadcrumb.unsignedLongLongValue; - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -6848,19 +7413,30 @@ - (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulato ^(ExchangeManager & exchangeManager, const SessionHandle & session, GeneralCommissioningClusterSetRegulatoryConfigResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; GeneralCommissioning::Commands::SetRegulatoryConfig::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.newRegulatoryConfig = static_cast>( params.newRegulatoryConfig.unsignedCharValue); request.countryCode = [self asCharSpan:params.countryCode]; request.breadcrumb = params.breadcrumb.unsignedLongLongValue; - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -6923,15 +7499,27 @@ - (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissio ^(ExchangeManager & exchangeManager, const SessionHandle & session, GeneralCommissioningClusterCommissioningCompleteResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge + = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; GeneralCommissioning::Commands::CommissioningComplete::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)); + } + } - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -7168,12 +7756,23 @@ - (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams ^(ExchangeManager & exchangeManager, const SessionHandle & session, NetworkCommissioningClusterScanNetworksResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; NetworkCommissioning::Commands::ScanNetworks::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)); + } + } if (params != nil) { if (params.ssid != nil) { auto & definedValue_0 = request.ssid.Emplace(); @@ -7190,8 +7789,8 @@ - (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams } } - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -7241,12 +7840,23 @@ - (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpd ^(ExchangeManager & exchangeManager, const SessionHandle & session, NetworkCommissioningClusterNetworkConfigResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::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.ssid = [self asByteSpan:params.ssid]; request.credentials = [self asByteSpan:params.credentials]; if (params.breadcrumb != nil) { @@ -7254,8 +7864,8 @@ - (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpd definedValue_0 = params.breadcrumb.unsignedLongLongValue; } - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -7305,20 +7915,31 @@ - (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrU ^(ExchangeManager & exchangeManager, const SessionHandle & session, NetworkCommissioningClusterNetworkConfigResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::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.operationalDataset = [self asByteSpan:params.operationalDataset]; if (params.breadcrumb != nil) { auto & definedValue_0 = request.breadcrumb.Emplace(); definedValue_0 = params.breadcrumb.unsignedLongLongValue; } - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -7368,20 +7989,31 @@ - (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkPara ^(ExchangeManager & exchangeManager, const SessionHandle & session, NetworkCommissioningClusterNetworkConfigResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; NetworkCommissioning::Commands::RemoveNetwork::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.networkID = [self asByteSpan:params.networkID]; if (params.breadcrumb != nil) { auto & definedValue_0 = request.breadcrumb.Emplace(); definedValue_0 = params.breadcrumb.unsignedLongLongValue; } - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -7431,20 +8063,31 @@ - (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkPa ^(ExchangeManager & exchangeManager, const SessionHandle & session, NetworkCommissioningClusterConnectNetworkResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; NetworkCommissioning::Commands::ConnectNetwork::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.networkID = [self asByteSpan:params.networkID]; if (params.breadcrumb != nil) { auto & definedValue_0 = request.breadcrumb.Emplace(); definedValue_0 = params.breadcrumb.unsignedLongLongValue; } - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -7494,12 +8137,23 @@ - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkPa ^(ExchangeManager & exchangeManager, const SessionHandle & session, NetworkCommissioningClusterNetworkConfigResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; NetworkCommissioning::Commands::ReorderNetwork::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.networkID = [self asByteSpan:params.networkID]; request.networkIndex = params.networkIndex.unsignedCharValue; if (params.breadcrumb != nil) { @@ -7507,8 +8161,8 @@ - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkPa definedValue_0 = params.breadcrumb.unsignedLongLongValue; } - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -7801,19 +8455,30 @@ - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsReque ^(ExchangeManager & exchangeManager, const SessionHandle & session, DiagnosticLogsClusterRetrieveLogsResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DiagnosticLogs::Commands::RetrieveLogsRequest::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.intent = static_cast>(params.intent.unsignedCharValue); request.requestedProtocol = static_cast>( params.requestedProtocol.unsignedCharValue); request.transferFileDesignator = [self asByteSpan:params.transferFileDesignator]; - chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -7942,17 +8607,28 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; GeneralDiagnostics::Commands::TestEventTrigger::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.enableKey = [self asByteSpan:params.enableKey]; request.eventTrigger = params.eventTrigger.unsignedLongLongValue; - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -8162,15 +8838,26 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; SoftwareDiagnostics::Commands::ResetWatermarks::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)); + } + } - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -8345,15 +9032,26 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ThreadNetworkDiagnostics::Commands::ResetCounts::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)); + } + } - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -9025,15 +9723,26 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; WiFiNetworkDiagnostics::Commands::ResetCounts::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)); + } + } - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -9292,15 +10001,26 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; EthernetNetworkDiagnostics::Commands::ResetCounts::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)); + } + } - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -9814,12 +10534,23 @@ - (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterO }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; AdministratorCommissioning::Commands::OpenCommissioningWindow::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)); + } + } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); } @@ -9829,8 +10560,8 @@ - (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterO request.iterations = params.iterations.unsignedIntValue; request.salt = [self asByteSpan:params.salt]; - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -9879,19 +10610,30 @@ - (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClu }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::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)); + } + } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); } request.commissioningTimeout = params.commissioningTimeout.unsignedShortValue; - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -9948,18 +10690,29 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; AdministratorCommissioning::Commands::RevokeCommissioning::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)); + } + } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); } - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -10141,16 +10894,27 @@ - (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestatio ^(ExchangeManager & exchangeManager, const SessionHandle & session, OperationalCredentialsClusterAttestationResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; OperationalCredentials::Commands::AttestationRequest::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.attestationNonce = [self asByteSpan:params.attestationNonce]; - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -10200,17 +10964,28 @@ - (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCerti ^(ExchangeManager & exchangeManager, const SessionHandle & session, OperationalCredentialsClusterCertificateChainResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; OperationalCredentials::Commands::CertificateChainRequest::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.certificateType = static_cast>( params.certificateType.unsignedCharValue); - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -10260,20 +11035,31 @@ - (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams * ^(ExchangeManager & exchangeManager, const SessionHandle & session, OperationalCredentialsClusterCSRResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; OperationalCredentials::Commands::CSRRequest::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.CSRNonce = [self asByteSpan:params.csrNonce]; if (params.isForUpdateNOC != nil) { auto & definedValue_0 = request.isForUpdateNOC.Emplace(); definedValue_0 = params.isForUpdateNOC.boolValue; } - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -10323,12 +11109,23 @@ - (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params ^(ExchangeManager & exchangeManager, const SessionHandle & session, OperationalCredentialsClusterNOCResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; OperationalCredentials::Commands::AddNOC::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.NOCValue = [self asByteSpan:params.nocValue]; if (params.icacValue != nil) { auto & definedValue_0 = request.ICACValue.Emplace(); @@ -10339,8 +11136,8 @@ - (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params request.adminVendorId = static_cast>( params.adminVendorId.unsignedShortValue); - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -10390,20 +11187,31 @@ - (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)p ^(ExchangeManager & exchangeManager, const SessionHandle & session, OperationalCredentialsClusterNOCResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; OperationalCredentials::Commands::UpdateNOC::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.NOCValue = [self asByteSpan:params.nocValue]; if (params.icacValue != nil) { auto & definedValue_0 = request.ICACValue.Emplace(); definedValue_0 = [self asByteSpan:params.icacValue]; } - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -10453,16 +11261,27 @@ - (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabri ^(ExchangeManager & exchangeManager, const SessionHandle & session, OperationalCredentialsClusterNOCResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; OperationalCredentials::Commands::UpdateFabricLabel::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.label = [self asCharSpan:params.label]; - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -10512,16 +11331,27 @@ - (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricPara ^(ExchangeManager & exchangeManager, const SessionHandle & session, OperationalCredentialsClusterNOCResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; OperationalCredentials::Commands::RemoveFabric::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.fabricIndex = params.fabricIndex.unsignedCharValue; - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -10570,16 +11400,27 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; OperationalCredentials::Commands::AddTrustedRootCertificate::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.rootCACertificate = [self asByteSpan:params.rootCACertificate]; - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -10857,12 +11698,23 @@ - (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)p }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; GroupKeyManagement::Commands::KeySetWrite::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.groupKeySet.groupKeySetID = params.groupKeySet.groupKeySetID.unsignedShortValue; request.groupKeySet.groupKeySecurityPolicy = static_cast>( @@ -10904,8 +11756,8 @@ - (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)p nonNullValue_1 = params.groupKeySet.epochStartTime2.unsignedLongLongValue; } - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -10955,16 +11807,27 @@ - (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)par ^(ExchangeManager & exchangeManager, const SessionHandle & session, GroupKeyManagementClusterKeySetReadResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; GroupKeyManagement::Commands::KeySetRead::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.groupKeySetID = params.groupKeySetID.unsignedShortValue; - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -11012,16 +11875,27 @@ - (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams * }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; GroupKeyManagement::Commands::KeySetRemove::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.groupKeySetID = params.groupKeySetID.unsignedShortValue; - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -11071,12 +11945,23 @@ - (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAl ^(ExchangeManager & exchangeManager, const SessionHandle & session, GroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; GroupKeyManagement::Commands::KeySetReadAllIndices::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)); + } + } { using ListType_0 = std::remove_reference_t; using ListMemberType_0 = ListMemberTypeGetter::Type; @@ -11100,8 +11985,8 @@ - (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAl } } - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -11557,16 +12442,27 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ModeSelect::Commands::ChangeToMode::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.newMode = params.newMode.unsignedCharValue; - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -11776,12 +12672,23 @@ - (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DoorLock::Commands::LockDoor::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)); + } + } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); } @@ -11792,8 +12699,8 @@ - (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params } } - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -11841,12 +12748,23 @@ - (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)par }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DoorLock::Commands::UnlockDoor::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)); + } + } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); } @@ -11857,8 +12775,8 @@ - (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)par } } - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -11906,12 +12824,23 @@ - (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams * }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DoorLock::Commands::UnlockWithTimeout::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)); + } + } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); } @@ -11921,8 +12850,8 @@ - (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams * definedValue_0 = [self asByteSpan:params.pinCode]; } - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -11970,12 +12899,23 @@ - (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DoorLock::Commands::SetWeekDaySchedule::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.weekDayIndex = params.weekDayIndex.unsignedCharValue; request.userIndex = params.userIndex.unsignedShortValue; request.daysMask @@ -11985,8 +12925,8 @@ - (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams request.endHour = params.endHour.unsignedCharValue; request.endMinute = params.endMinute.unsignedCharValue; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -12036,17 +12976,28 @@ - (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams ^(ExchangeManager & exchangeManager, const SessionHandle & session, DoorLockClusterGetWeekDayScheduleResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DoorLock::Commands::GetWeekDaySchedule::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.weekDayIndex = params.weekDayIndex.unsignedCharValue; request.userIndex = params.userIndex.unsignedShortValue; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -12094,17 +13045,28 @@ - (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDaySchedulePa }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DoorLock::Commands::ClearWeekDaySchedule::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.weekDayIndex = params.weekDayIndex.unsignedCharValue; request.userIndex = params.userIndex.unsignedShortValue; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -12152,19 +13114,30 @@ - (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DoorLock::Commands::SetYearDaySchedule::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.yearDayIndex = params.yearDayIndex.unsignedCharValue; request.userIndex = params.userIndex.unsignedShortValue; request.localStartTime = params.localStartTime.unsignedIntValue; request.localEndTime = params.localEndTime.unsignedIntValue; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -12214,17 +13187,28 @@ - (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams ^(ExchangeManager & exchangeManager, const SessionHandle & session, DoorLockClusterGetYearDayScheduleResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DoorLock::Commands::GetYearDaySchedule::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.yearDayIndex = params.yearDayIndex.unsignedCharValue; request.userIndex = params.userIndex.unsignedShortValue; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -12272,17 +13256,28 @@ - (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDaySchedulePa }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DoorLock::Commands::ClearYearDaySchedule::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.yearDayIndex = params.yearDayIndex.unsignedCharValue; request.userIndex = params.userIndex.unsignedShortValue; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -12330,20 +13325,31 @@ - (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DoorLock::Commands::SetHolidaySchedule::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.holidayIndex = params.holidayIndex.unsignedCharValue; request.localStartTime = params.localStartTime.unsignedIntValue; request.localEndTime = params.localEndTime.unsignedIntValue; request.operatingMode = static_cast>(params.operatingMode.unsignedCharValue); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -12393,16 +13399,27 @@ - (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams ^(ExchangeManager & exchangeManager, const SessionHandle & session, DoorLockClusterGetHolidayScheduleResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DoorLock::Commands::GetHolidaySchedule::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.holidayIndex = params.holidayIndex.unsignedCharValue; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -12450,16 +13467,27 @@ - (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidaySchedulePa }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DoorLock::Commands::ClearHolidaySchedule::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.holidayIndex = params.holidayIndex.unsignedCharValue; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -12507,12 +13535,23 @@ - (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DoorLock::Commands::SetUser::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)); + } + } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); } @@ -12553,8 +13592,8 @@ - (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params = static_cast>(params.credentialRule.unsignedCharValue); } - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -12602,16 +13641,27 @@ - (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DoorLockClusterGetUserResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DoorLock::Commands::GetUser::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.userIndex = params.userIndex.unsignedShortValue; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -12659,19 +13709,30 @@ - (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DoorLock::Commands::ClearUser::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)); + } + } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); } request.userIndex = params.userIndex.unsignedShortValue; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -12721,12 +13782,23 @@ - (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params ^(ExchangeManager & exchangeManager, const SessionHandle & session, DoorLockClusterSetCredentialResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DoorLock::Commands::SetCredential::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)); + } + } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); } @@ -12758,8 +13830,8 @@ - (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params = static_cast>(params.userType.unsignedCharValue); } - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -12809,19 +13881,30 @@ - (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusPara ^(ExchangeManager & exchangeManager, const SessionHandle & session, DoorLockClusterGetCredentialStatusResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DoorLock::Commands::GetCredentialStatus::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.credential.credentialType = static_cast>( params.credential.credentialType.unsignedCharValue); request.credential.credentialIndex = params.credential.credentialIndex.unsignedShortValue; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -12869,12 +13952,23 @@ - (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)par }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; DoorLock::Commands::ClearCredential::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)); + } + } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); } @@ -12887,8 +13981,8 @@ - (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)par nonNullValue_0.credentialIndex = params.credential.credentialIndex.unsignedShortValue; } - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -13863,15 +14957,26 @@ - (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)p }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; WindowCovering::Commands::UpOrOpen::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)); + } + } - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -13928,15 +15033,26 @@ - (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Null }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; WindowCovering::Commands::DownOrClose::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)); + } + } - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -13993,15 +15109,26 @@ - (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullab }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; WindowCovering::Commands::StopMotion::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)); + } + } - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -14049,16 +15176,27 @@ - (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)p }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; WindowCovering::Commands::GoToLiftValue::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.liftValue = params.liftValue.unsignedShortValue; - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -14106,16 +15244,27 @@ - (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentage }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; WindowCovering::Commands::GoToLiftPercentage::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.liftPercent100thsValue = params.liftPercent100thsValue.unsignedShortValue; - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -14163,16 +15312,27 @@ - (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)p }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; WindowCovering::Commands::GoToTiltValue::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.tiltValue = params.tiltValue.unsignedShortValue; - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -14220,16 +15380,27 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; WindowCovering::Commands::GoToTiltPercentage::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.tiltPercent100thsValue = params.tiltPercent100thsValue.unsignedShortValue; - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -14641,16 +15812,27 @@ - (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierCont }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; BarrierControl::Commands::BarrierControlGoToPercent::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.percentOpen = params.percentOpen.unsignedCharValue; - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -14707,15 +15889,26 @@ - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStop }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; BarrierControl::Commands::BarrierControlStop::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)); + } + } - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -15396,17 +16589,28 @@ - (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerPara }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Thermostat::Commands::SetpointRaiseLower::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.mode = static_cast>(params.mode.unsignedCharValue); request.amount = params.amount.charValue; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -15454,12 +16658,23 @@ - (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Thermostat::Commands::SetWeeklySchedule::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.numberOfTransitionsForSequence = params.numberOfTransitionsForSequence.unsignedCharValue; request.dayOfWeekForSequence = static_cast>( params.dayOfWeekForSequence.unsignedCharValue); @@ -15500,8 +16715,8 @@ - (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams } } - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -15551,19 +16766,30 @@ - (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams ^(ExchangeManager & exchangeManager, const SessionHandle & session, ThermostatClusterGetWeeklyScheduleResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Thermostat::Commands::GetWeeklySchedule::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.daysToReturn = static_cast>(params.daysToReturn.unsignedCharValue); request.modeToReturn = static_cast>(params.modeToReturn.unsignedCharValue); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -15620,15 +16846,26 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Thermostat::Commands::ClearWeeklySchedule::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)); + } + } - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -17156,12 +18393,23 @@ - (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::MoveToHue::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.hue = params.hue.unsignedCharValue; request.direction = static_cast>(params.direction.unsignedCharValue); @@ -17169,8 +18417,8 @@ - (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -17218,20 +18466,31 @@ - (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::MoveHue::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.moveMode = static_cast>(params.moveMode.unsignedCharValue); request.rate = params.rate.unsignedCharValue; request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -17279,12 +18538,23 @@ - (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::StepHue::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.stepMode = static_cast>(params.stepMode.unsignedCharValue); request.stepSize = params.stepSize.unsignedCharValue; @@ -17292,8 +18562,8 @@ - (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -17341,19 +18611,30 @@ - (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::MoveToSaturation::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.saturation = params.saturation.unsignedCharValue; request.transitionTime = params.transitionTime.unsignedShortValue; request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -17401,20 +18682,31 @@ - (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)p }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::MoveSaturation::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.moveMode = static_cast>(params.moveMode.unsignedCharValue); request.rate = params.rate.unsignedCharValue; request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -17462,12 +18754,23 @@ - (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)p }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::StepSaturation::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.stepMode = static_cast>(params.stepMode.unsignedCharValue); request.stepSize = params.stepSize.unsignedCharValue; @@ -17475,8 +18778,8 @@ - (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)p request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -17524,20 +18827,31 @@ - (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSatu }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::MoveToHueAndSaturation::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.hue = params.hue.unsignedCharValue; request.saturation = params.saturation.unsignedCharValue; request.transitionTime = params.transitionTime.unsignedShortValue; request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -17585,20 +18899,31 @@ - (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::MoveToColor::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.colorX = params.colorX.unsignedShortValue; request.colorY = params.colorY.unsignedShortValue; request.transitionTime = params.transitionTime.unsignedShortValue; request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -17646,19 +18971,30 @@ - (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::MoveColor::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.rateX = params.rateX.shortValue; request.rateY = params.rateY.shortValue; request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -17706,20 +19042,31 @@ - (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::StepColor::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.stepX = params.stepX.shortValue; request.stepY = params.stepY.shortValue; request.transitionTime = params.transitionTime.unsignedShortValue; request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -17767,19 +19114,30 @@ - (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTempe }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::MoveToColorTemperature::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.colorTemperatureMireds = params.colorTemperatureMireds.unsignedShortValue; request.transitionTime = params.transitionTime.unsignedShortValue; request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -17827,12 +19185,23 @@ - (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHuePara }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::EnhancedMoveToHue::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.enhancedHue = params.enhancedHue.unsignedShortValue; request.direction = static_cast>(params.direction.unsignedCharValue); @@ -17840,8 +19209,8 @@ - (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHuePara request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -17889,20 +19258,31 @@ - (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams * }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::EnhancedMoveHue::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.moveMode = static_cast>(params.moveMode.unsignedCharValue); request.rate = params.rate.unsignedShortValue; request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -17950,12 +19330,23 @@ - (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams * }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::EnhancedStepHue::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.stepMode = static_cast>(params.stepMode.unsignedCharValue); request.stepSize = params.stepSize.unsignedShortValue; @@ -17963,8 +19354,8 @@ - (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams * request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -18012,20 +19403,31 @@ - (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhanced }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::EnhancedMoveToHueAndSaturation::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.enhancedHue = params.enhancedHue.unsignedShortValue; request.saturation = params.saturation.unsignedCharValue; request.transitionTime = params.transitionTime.unsignedShortValue; request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -18073,12 +19475,23 @@ - (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)param }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::ColorLoopSet::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.updateFlags = static_cast>(params.updateFlags.unsignedCharValue); request.action = static_cast>(params.action.unsignedCharValue); @@ -18089,8 +19502,8 @@ - (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)param request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -18138,17 +19551,28 @@ - (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)param }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::StopMoveStep::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.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -18196,12 +19620,23 @@ - (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatu }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::MoveColorTemperature::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.moveMode = static_cast>(params.moveMode.unsignedCharValue); request.rate = params.rate.unsignedShortValue; @@ -18210,8 +19645,8 @@ - (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatu request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -18259,12 +19694,23 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ColorControl::Commands::StepColorTemperature::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.stepMode = static_cast>(params.stepMode.unsignedCharValue); request.stepSize = params.stepSize.unsignedShortValue; @@ -18274,8 +19720,8 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -20667,16 +22113,27 @@ - (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params ^(ExchangeManager & exchangeManager, const SessionHandle & session, ChannelClusterChangeChannelResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Channel::Commands::ChangeChannel::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.match = [self asCharSpan:params.match]; - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -20724,17 +22181,28 @@ - (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberP }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Channel::Commands::ChangeChannelByNumber::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.majorNumber = params.majorNumber.unsignedShortValue; request.minorNumber = params.minorNumber.unsignedShortValue; - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -20782,16 +22250,27 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; Channel::Commands::SkipChannel::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.count = params.count.unsignedShortValue; - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -20965,20 +22444,31 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams ^(ExchangeManager & exchangeManager, const SessionHandle & session, TargetNavigatorClusterNavigateTargetResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; TargetNavigator::Commands::NavigateTarget::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.target = params.target.unsignedCharValue; if (params.data != nil) { auto & definedValue_0 = request.data.Emplace(); definedValue_0 = [self asCharSpan:params.data]; } - chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -21132,15 +22622,26 @@ - (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params ^(ExchangeManager & exchangeManager, const SessionHandle & session, MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; MediaPlayback::Commands::Play::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)); + } + } - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -21197,15 +22698,26 @@ - (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params ^(ExchangeManager & exchangeManager, const SessionHandle & session, MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; MediaPlayback::Commands::Pause::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)); + } + } - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -21265,15 +22777,26 @@ - (void)stopPlaybackWithParams:(MTRMediaPlaybackClusterStopPlaybackParams * _Nul ^(ExchangeManager & exchangeManager, const SessionHandle & session, MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; MediaPlayback::Commands::StopPlayback::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)); + } + } - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -21333,15 +22856,26 @@ - (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable) ^(ExchangeManager & exchangeManager, const SessionHandle & session, MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; MediaPlayback::Commands::StartOver::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)); + } + } - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -21398,15 +22932,26 @@ - (void)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)pa ^(ExchangeManager & exchangeManager, const SessionHandle & session, MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; MediaPlayback::Commands::Previous::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)); + } + } - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -21463,15 +23008,26 @@ - (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params ^(ExchangeManager & exchangeManager, const SessionHandle & session, MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; MediaPlayback::Commands::Next::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)); + } + } - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -21528,15 +23084,26 @@ - (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params ^(ExchangeManager & exchangeManager, const SessionHandle & session, MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; MediaPlayback::Commands::Rewind::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)); + } + } - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -21596,15 +23163,26 @@ - (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nulla ^(ExchangeManager & exchangeManager, const SessionHandle & session, MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; MediaPlayback::Commands::FastForward::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)); + } + } - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -21654,16 +23232,27 @@ - (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params ^(ExchangeManager & exchangeManager, const SessionHandle & session, MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; MediaPlayback::Commands::SkipForward::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.deltaPositionMilliseconds = params.deltaPositionMilliseconds.unsignedLongLongValue; - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -21713,16 +23302,27 @@ - (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)para ^(ExchangeManager & exchangeManager, const SessionHandle & session, MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; MediaPlayback::Commands::SkipBackward::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.deltaPositionMilliseconds = params.deltaPositionMilliseconds.unsignedLongLongValue; - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -21772,16 +23372,27 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params ^(ExchangeManager & exchangeManager, const SessionHandle & session, MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; MediaPlayback::Commands::Seek::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.position = params.position.unsignedLongLongValue; - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -22185,16 +23796,27 @@ - (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; MediaInput::Commands::SelectInput::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.index = params.index.unsignedCharValue; - chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -22251,15 +23873,26 @@ - (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _ }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; MediaInput::Commands::ShowInputStatus::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)); + } + } - chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -22316,15 +23949,26 @@ - (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _ }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; MediaInput::Commands::HideInputStatus::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)); + } + } - chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -22372,17 +24016,28 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; MediaInput::Commands::RenameInput::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.index = params.index.unsignedCharValue; request.name = [self asCharSpan:params.name]; - chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -22576,15 +24231,26 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; LowPower::Commands::Sleep::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)); + } + } - chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -22719,16 +24385,27 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params ^(ExchangeManager & exchangeManager, const SessionHandle & session, KeypadInputClusterSendKeyResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; KeypadInput::Commands::SendKey::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.keyCode = static_cast>(params.keyCode.unsignedCharValue); - chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -22858,12 +24535,23 @@ - (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *) ^(ExchangeManager & exchangeManager, const SessionHandle & session, ContentLauncherClusterLaunchResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ContentLauncher::Commands::LaunchContent::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)); + } + } { using ListType_1 = std::remove_reference_t; using ListMemberType_1 = ListMemberTypeGetter::Type; @@ -22923,8 +24611,8 @@ - (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *) definedValue_0 = [self asCharSpan:params.data]; } - chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -22974,12 +24662,23 @@ - (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params ^(ExchangeManager & exchangeManager, const SessionHandle & session, ContentLauncherClusterLaunchResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ContentLauncher::Commands::LaunchURL::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.contentURL = [self asCharSpan:params.contentURL]; if (params.displayString != nil) { auto & definedValue_0 = request.displayString.Emplace(); @@ -23080,8 +24779,8 @@ - (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params } } - chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -23261,16 +24960,27 @@ - (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; AudioOutput::Commands::SelectOutput::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.index = params.index.unsignedCharValue; - chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -23318,17 +25028,28 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; AudioOutput::Commands::RenameOutput::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.index = params.index.unsignedCharValue; request.name = [self asCharSpan:params.name]; - chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -23480,12 +25201,23 @@ - (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams *)para ^(ExchangeManager & exchangeManager, const SessionHandle & session, ApplicationLauncherClusterLauncherResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ApplicationLauncher::Commands::LaunchApp::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.application.catalogVendorId = params.application.catalogVendorId.unsignedShortValue; request.application.applicationId = [self asCharSpan:params.application.applicationId]; if (params.data != nil) { @@ -23493,8 +25225,8 @@ - (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams *)para definedValue_0 = [self asByteSpan:params.data]; } - chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -23544,17 +25276,28 @@ - (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams *)params ^(ExchangeManager & exchangeManager, const SessionHandle & session, ApplicationLauncherClusterLauncherResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ApplicationLauncher::Commands::StopApp::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.application.catalogVendorId = params.application.catalogVendorId.unsignedShortValue; request.application.applicationId = [self asCharSpan:params.application.applicationId]; - chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -23604,17 +25347,28 @@ - (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams *)params ^(ExchangeManager & exchangeManager, const SessionHandle & session, ApplicationLauncherClusterLauncherResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ApplicationLauncher::Commands::HideApp::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.application.catalogVendorId = params.application.catalogVendorId.unsignedShortValue; request.application.applicationId = [self asCharSpan:params.application.applicationId]; - chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -23937,19 +25691,30 @@ - (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params ^(ExchangeManager & exchangeManager, const SessionHandle & session, AccountLoginClusterGetSetupPINResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; AccountLogin::Commands::GetSetupPIN::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)); + } + } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); } request.tempAccountIdentifier = [self asCharSpan:params.tempAccountIdentifier]; - chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -23997,20 +25762,31 @@ - (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; AccountLogin::Commands::Login::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)); + } + } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); } request.tempAccountIdentifier = [self asCharSpan:params.tempAccountIdentifier]; request.setupPIN = [self asCharSpan:params.setupPIN]; - chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -24064,18 +25840,29 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; AccountLogin::Commands::Logout::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)); + } + } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); } - chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -24241,15 +26028,26 @@ - (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfi }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ElectricalMeasurement::Commands::GetProfileInfoCommand::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)); + } + } - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -24298,18 +26096,29 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; ElectricalMeasurement::Commands::GetMeasurementProfileCommand::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.attributeId = params.attributeId.unsignedShortValue; request.startTime = params.startTime.unsignedIntValue; request.numberOfIntervals = params.numberOfIntervals.unsignedCharValue; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -25695,15 +27504,26 @@ - (void)testWithParams:(MTRUnitTestingClusterTestParams * _Nullable)params }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::Test::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)); + } + } - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -25760,15 +27580,26 @@ - (void)testNotHandledWithParams:(MTRUnitTestingClusterTestNotHandledParams * _N }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestNotHandled::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)); + } + } - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -25828,15 +27659,26 @@ - (void)testSpecificWithParams:(MTRUnitTestingClusterTestSpecificParams * _Nulla ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingClusterTestSpecificResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestSpecific::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)); + } + } - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -25893,15 +27735,26 @@ - (void)testUnknownCommandWithParams:(MTRUnitTestingClusterTestUnknownCommandPar }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestUnknownCommand::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)); + } + } - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -25951,17 +27804,28 @@ - (void)testAddArgumentsWithParams:(MTRUnitTestingClusterTestAddArgumentsParams ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingClusterTestAddArgumentsResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestAddArguments::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.arg1 = params.arg1.unsignedCharValue; request.arg2 = params.arg2.unsignedCharValue; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -26011,16 +27875,27 @@ - (void)testSimpleArgumentRequestWithParams:(MTRUnitTestingClusterTestSimpleArgu ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingClusterTestSimpleArgumentResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestSimpleArgumentRequest::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.arg1 = params.arg1.boolValue; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -26071,12 +27946,23 @@ - (void)testStructArrayArgumentRequestWithParams:(MTRUnitTestingClusterTestStruc ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingClusterTestStructArrayArgumentResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestStructArrayArgumentRequest::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)); + } + } { using ListType_0 = std::remove_reference_t; using ListMemberType_0 = ListMemberTypeGetter::Type; @@ -26290,8 +28176,8 @@ - (void)testStructArrayArgumentRequestWithParams:(MTRUnitTestingClusterTestStruc request.arg5 = static_cast>(params.arg5.unsignedCharValue); request.arg6 = params.arg6.boolValue; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -26341,12 +28227,23 @@ - (void)testStructArgumentRequestWithParams:(MTRUnitTestingClusterTestStructArgu ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestStructArgumentRequest::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.arg1.a = params.arg1.a.unsignedCharValue; request.arg1.b = params.arg1.b.boolValue; request.arg1.c = static_cast>(params.arg1.c.unsignedCharValue); @@ -26356,8 +28253,8 @@ - (void)testStructArgumentRequestWithParams:(MTRUnitTestingClusterTestStructArgu request.arg1.g = params.arg1.g.floatValue; request.arg1.h = params.arg1.h.doubleValue; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -26407,12 +28304,23 @@ - (void)testNestedStructArgumentRequestWithParams:(MTRUnitTestingClusterTestNest ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestNestedStructArgumentRequest::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.arg1.a = params.arg1.a.unsignedCharValue; request.arg1.b = params.arg1.b.boolValue; request.arg1.c.a = params.arg1.c.a.unsignedCharValue; @@ -26426,8 +28334,8 @@ - (void)testNestedStructArgumentRequestWithParams:(MTRUnitTestingClusterTestNest request.arg1.c.g = params.arg1.c.g.floatValue; request.arg1.c.h = params.arg1.c.h.doubleValue; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -26477,12 +28385,23 @@ - (void)testListStructArgumentRequestWithParams:(MTRUnitTestingClusterTestListSt ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestListStructArgumentRequest::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)); + } + } { using ListType_0 = std::remove_reference_t; using ListMemberType_0 = ListMemberTypeGetter::Type; @@ -26515,8 +28434,8 @@ - (void)testListStructArgumentRequestWithParams:(MTRUnitTestingClusterTestListSt } } - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -26566,12 +28485,23 @@ - (void)testListInt8UArgumentRequestWithParams:(MTRUnitTestingClusterTestListInt ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestListInt8UArgumentRequest::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)); + } + } { using ListType_0 = std::remove_reference_t; using ListMemberType_0 = ListMemberTypeGetter::Type; @@ -26595,8 +28525,8 @@ - (void)testListInt8UArgumentRequestWithParams:(MTRUnitTestingClusterTestListInt } } - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -26646,12 +28576,23 @@ - (void)testNestedStructListArgumentRequestWithParams:(MTRUnitTestingClusterTest ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestNestedStructListArgumentRequest::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.arg1.a = params.arg1.a.unsignedCharValue; request.arg1.b = params.arg1.b.boolValue; request.arg1.c.a = params.arg1.c.a.unsignedCharValue; @@ -26762,8 +28703,8 @@ - (void)testNestedStructListArgumentRequestWithParams:(MTRUnitTestingClusterTest } } - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -26815,12 +28756,23 @@ - (void)testListNestedStructListArgumentRequestWithParams: ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestListNestedStructListArgumentRequest::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)); + } + } { using ListType_0 = std::remove_reference_t; using ListMemberType_0 = ListMemberTypeGetter::Type; @@ -26956,8 +28908,8 @@ - (void)testListNestedStructListArgumentRequestWithParams: } } - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -27007,12 +28959,23 @@ - (void)testListInt8UReverseRequestWithParams:(MTRUnitTestingClusterTestListInt8 ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingClusterTestListInt8UReverseResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestListInt8UReverseRequest::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)); + } + } { using ListType_0 = std::remove_reference_t; using ListMemberType_0 = ListMemberTypeGetter::Type; @@ -27036,8 +28999,8 @@ - (void)testListInt8UReverseRequestWithParams:(MTRUnitTestingClusterTestListInt8 } } - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -27087,17 +29050,28 @@ - (void)testEnumsRequestWithParams:(MTRUnitTestingClusterTestEnumsRequestParams ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingClusterTestEnumsResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestEnumsRequest::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.arg1 = static_cast>(params.arg1.unsignedShortValue); request.arg2 = static_cast>(params.arg2.unsignedCharValue); - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -27147,12 +29121,23 @@ - (void)testNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestNullable ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingClusterTestNullableOptionalResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestNullableOptionalRequest::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)); + } + } if (params != nil) { if (params.arg1 != nil) { auto & definedValue_0 = request.arg1.Emplace(); @@ -27165,8 +29150,8 @@ - (void)testNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestNullable } } - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -27218,12 +29203,23 @@ - (void)testComplexNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestC ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingClusterTestComplexNullableOptionalResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestComplexNullableOptionalRequest::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)); + } + } if (params.nullableInt == nil) { request.nullableInt.SetNull(); } else { @@ -27395,8 +29391,8 @@ - (void)testComplexNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestC } } - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -27446,12 +29442,23 @@ - (void)simpleStructEchoRequestWithParams:(MTRUnitTestingClusterSimpleStructEcho ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingClusterSimpleStructResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::SimpleStructEchoRequest::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.arg1.a = params.arg1.a.unsignedCharValue; request.arg1.b = params.arg1.b.boolValue; request.arg1.c = static_cast>(params.arg1.c.unsignedCharValue); @@ -27461,8 +29468,8 @@ - (void)simpleStructEchoRequestWithParams:(MTRUnitTestingClusterSimpleStructEcho request.arg1.g = params.arg1.g.floatValue; request.arg1.h = params.arg1.h.doubleValue; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -27519,18 +29526,29 @@ - (void)timedInvokeRequestWithParams:(MTRUnitTestingClusterTimedInvokeRequestPar }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TimedInvokeRequest::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)); + } + } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); } - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -27578,12 +29596,23 @@ - (void)testSimpleOptionalArgumentRequestWithParams:(MTRUnitTestingClusterTestSi }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestSimpleOptionalArgumentRequest::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)); + } + } if (params != nil) { if (params.arg1 != nil) { auto & definedValue_0 = request.arg1.Emplace(); @@ -27591,8 +29620,8 @@ - (void)testSimpleOptionalArgumentRequestWithParams:(MTRUnitTestingClusterTestSi } } - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -27642,18 +29671,29 @@ - (void)testEmitTestEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestEve ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingClusterTestEmitTestEventResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestEmitTestEventRequest::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.arg1 = params.arg1.unsignedCharValue; request.arg2 = static_cast>(params.arg2.unsignedCharValue); request.arg3 = params.arg3.boolValue; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; @@ -27707,16 +29747,28 @@ - (void)testEmitTestEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestEve ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingClusterTestEmitTestFabricScopedEventResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedInvokeTimeoutMs; + auto * typedBridge + = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; UnitTesting::Commands::TestEmitTestFabricScopedEventRequest::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.arg1 = params.arg1.unsignedCharValue; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(baseDevice); }; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index 97517f2d3d9362..54d329af11ae72 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -39,6 +39,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -62,6 +71,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -85,6 +103,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 @interface MTRGroupsClusterAddGroupParams (Deprecated) @@ -142,6 +169,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 @interface MTRGroupsClusterViewGroupParams (Deprecated) @@ -201,6 +237,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -246,6 +291,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 @interface MTRGroupsClusterRemoveGroupParams (Deprecated) @@ -301,6 +355,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -324,6 +387,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 @interface MTRGroupsClusterAddGroupIfIdentifyingParams (Deprecated) @@ -359,6 +431,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -408,6 +489,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -463,6 +553,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -510,6 +609,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -557,6 +665,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -608,6 +725,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -629,6 +755,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -686,6 +821,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -735,6 +879,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -796,6 +949,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -841,6 +1003,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -860,6 +1031,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -879,6 +1059,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -902,6 +1091,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 @interface MTROnOffClusterOffWithEffectParams (Deprecated) @@ -927,6 +1125,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -952,6 +1159,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -979,6 +1195,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1006,6 +1231,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1035,6 +1269,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1058,6 +1301,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1085,6 +1337,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1112,6 +1373,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1141,6 +1411,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1164,6 +1443,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1185,6 +1473,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1208,6 +1505,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1233,6 +1539,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1256,6 +1571,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1281,6 +1605,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1304,6 +1637,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1327,6 +1669,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1352,6 +1703,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1375,6 +1735,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1398,6 +1767,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1423,6 +1801,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1446,6 +1833,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1471,6 +1867,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1491,6 +1896,15 @@ MTR_NEWLY_DEPRECATED("This command has been removed") * */ @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 @@ -1526,6 +1940,15 @@ MTR_NEWLY_AVAILABLE * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1602,6 +2025,15 @@ MTR_NEWLY_AVAILABLE * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1660,6 +2092,15 @@ MTR_NEWLY_AVAILABLE * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1695,6 +2136,15 @@ MTR_NEWLY_AVAILABLE * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1731,6 +2181,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1781,7 +2240,16 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; -@end + +/** + * 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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams : NSObject @@ -1824,6 +2292,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1871,6 +2348,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1924,6 +2410,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1947,6 +2442,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1970,6 +2474,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2019,6 +2532,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2070,6 +2592,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2096,6 +2627,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2156,6 +2696,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2175,6 +2724,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2194,6 +2752,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2213,6 +2780,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2232,6 +2808,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2257,6 +2842,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2287,6 +2881,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 @interface MTRAdministratorCommissioningClusterOpenCommissioningWindowParams (Deprecated) @@ -2315,6 +2918,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2334,6 +2946,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2355,6 +2976,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2406,6 +3036,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2451,6 +3090,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2504,6 +3152,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2527,6 +3184,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2574,6 +3240,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2595,6 +3270,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2616,6 +3300,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 @interface MTROperationalCredentialsClusterAddTrustedRootCertificateParams (Deprecated) @@ -2644,6 +3337,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2665,6 +3367,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2709,6 +3420,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2730,6 +3450,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2774,6 +3503,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2795,6 +3533,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2816,6 +3563,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2839,6 +3595,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2872,6 +3637,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2895,6 +3669,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2954,6 +3737,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2981,6 +3773,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3004,6 +3805,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3057,6 +3867,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3084,6 +3903,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3105,6 +3933,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3156,6 +3993,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3189,6 +4035,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 @interface MTRDoorLockClusterSetUserParams (Deprecated) @@ -3216,6 +4071,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3284,6 +4148,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3316,6 +4189,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3365,6 +4247,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3419,6 +4310,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3438,6 +4338,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3457,6 +4366,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3476,6 +4394,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3497,6 +4424,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3519,6 +4455,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3540,6 +4485,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3562,6 +4516,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3583,6 +4546,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3602,6 +4574,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3625,6 +4606,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3684,6 +4674,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3707,6 +4706,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3726,6 +4734,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3755,6 +4772,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3782,6 +4808,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3811,6 +4846,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3838,6 +4882,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3865,6 +4918,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3894,6 +4956,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3923,6 +4994,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3952,6 +5032,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3979,6 +5068,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4008,6 +5106,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4035,6 +5142,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 @interface MTRColorControlClusterMoveToColorTemperatureParams (Deprecated) @@ -4070,6 +5186,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4097,6 +5222,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4126,6 +5260,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4155,6 +5298,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4188,6 +5340,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4211,6 +5372,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4244,6 +5414,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4279,6 +5458,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4300,6 +5488,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4347,6 +5544,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4369,6 +5575,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4392,6 +5607,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4435,6 +5659,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4453,7 +5686,16 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; +@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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4473,6 +5715,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4492,6 +5743,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4511,6 +5771,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4530,6 +5799,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4549,6 +5827,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4568,6 +5855,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4590,6 +5886,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4612,6 +5917,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4657,6 +5971,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4678,6 +6001,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4697,6 +6029,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4716,6 +6057,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4739,6 +6089,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4758,6 +6117,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4779,6 +6147,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4827,6 +6204,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4853,6 +6239,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4898,6 +6293,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4921,6 +6325,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4945,6 +6358,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4967,6 +6389,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4989,6 +6420,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5035,6 +6475,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5081,6 +6530,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5100,6 +6558,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5149,6 +6616,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5208,6 +6684,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 @@ -5227,6 +6712,15 @@ MTR_NEWLY_AVAILABLE * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5278,6 +6772,15 @@ MTR_NEWLY_AVAILABLE * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5329,6 +6832,15 @@ MTR_NEWLY_AVAILABLE * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5380,6 +6892,15 @@ MTR_NEWLY_AVAILABLE * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5445,6 +6966,15 @@ MTR_NEWLY_AVAILABLE * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5498,6 +7028,15 @@ MTR_NEWLY_AVAILABLE * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5563,6 +7102,15 @@ MTR_NEWLY_AVAILABLE * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5622,6 +7170,15 @@ MTR_NEWLY_AVAILABLE * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5730,6 +7287,15 @@ MTR_NEWLY_AVAILABLE * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5783,6 +7349,15 @@ MTR_NEWLY_AVAILABLE * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5836,6 +7411,15 @@ MTR_NEWLY_AVAILABLE * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5889,6 +7473,15 @@ MTR_NEWLY_AVAILABLE * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5944,6 +7537,15 @@ MTR_NEWLY_AVAILABLE * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5971,6 +7573,15 @@ MTR_NEWLY_AVAILABLE * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5999,6 +7610,15 @@ MTR_NEWLY_AVAILABLE * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -6025,6 +7645,15 @@ MTR_NEWLY_AVAILABLE * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -6073,6 +7702,15 @@ MTR_NEWLY_AVAILABLE * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -6100,6 +7738,15 @@ MTR_NEWLY_AVAILABLE * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -6124,6 +7771,15 @@ MTR_NEWLY_AVAILABLE * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -6150,6 +7806,15 @@ MTR_NEWLY_AVAILABLE * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -6181,6 +7846,15 @@ MTR_NEWLY_AVAILABLE * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -6207,6 +7881,15 @@ MTR_NEWLY_AVAILABLE * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -6242,6 +7925,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -6267,6 +7959,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * */ @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 NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index a43eb9531d91b4..6e0516dd06bf3f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -26,6 +26,7 @@ - (instancetype)init _identifyTime = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -36,6 +37,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.identifyTime = self.identifyTime; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -57,6 +59,7 @@ - (instancetype)init _effectVariant = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -68,6 +71,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.effectIdentifier = self.effectIdentifier; other.effectVariant = self.effectVariant; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -89,6 +93,7 @@ - (instancetype)init _groupName = @""; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -100,6 +105,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.groupID = self.groupID; other.groupName = self.groupName; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -177,6 +183,7 @@ - (instancetype)init _groupID = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -187,6 +194,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.groupID = self.groupID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -266,6 +274,7 @@ - (instancetype)init _groupList = [NSArray array]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -276,6 +285,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.groupList = self.groupList; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -326,6 +336,7 @@ - (instancetype)init _groupID = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -336,6 +347,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.groupID = self.groupID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -410,6 +422,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -419,6 +432,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRGroupsClusterRemoveAllGroupsParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -439,6 +453,7 @@ - (instancetype)init _groupName = @""; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -450,6 +465,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.groupID = self.groupID; other.groupName = self.groupName; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -490,6 +506,7 @@ - (instancetype)init _extensionFieldSets = [NSArray array]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -504,6 +521,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.sceneName = self.sceneName; other.extensionFieldSets = self.extensionFieldSets; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -561,6 +579,7 @@ - (instancetype)init _sceneId = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -572,6 +591,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.groupId = self.groupId; other.sceneId = self.sceneId; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -638,6 +658,7 @@ - (instancetype)init _sceneId = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -649,6 +670,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.groupId = self.groupId; other.sceneId = self.sceneId; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -703,6 +725,7 @@ - (instancetype)init _groupId = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -713,6 +736,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.groupId = self.groupId; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -765,6 +789,7 @@ - (instancetype)init _sceneId = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -776,6 +801,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.groupId = self.groupId; other.sceneId = self.sceneId; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -834,6 +860,7 @@ - (instancetype)init _transitionTime = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -846,6 +873,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.sceneId = self.sceneId; other.transitionTime = self.transitionTime; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -865,6 +893,7 @@ - (instancetype)init _groupId = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -875,6 +904,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.groupId = self.groupId; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -939,6 +969,7 @@ - (instancetype)init _extensionFieldSets = [NSArray array]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -953,6 +984,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.sceneName = self.sceneName; other.extensionFieldSets = self.extensionFieldSets; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -1010,6 +1042,7 @@ - (instancetype)init _sceneId = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -1021,6 +1054,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.groupId = self.groupId; other.sceneId = self.sceneId; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -1093,6 +1127,7 @@ - (instancetype)init _sceneIdTo = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -1107,6 +1142,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.groupIdTo = self.groupIdTo; other.sceneIdTo = self.sceneIdTo; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -1160,6 +1196,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -1169,6 +1206,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTROnOffClusterOffParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -1185,6 +1223,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -1194,6 +1233,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTROnOffClusterOnParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -1210,6 +1250,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -1219,6 +1260,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTROnOffClusterToggleParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -1239,6 +1281,7 @@ - (instancetype)init _effectVariant = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -1250,6 +1293,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.effectIdentifier = self.effectIdentifier; other.effectVariant = self.effectVariant; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -1280,6 +1324,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -1289,6 +1334,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTROnOffClusterOnWithRecallGlobalSceneParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -1311,6 +1357,7 @@ - (instancetype)init _offWaitTime = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -1323,6 +1370,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.onTime = self.onTime; other.offWaitTime = self.offWaitTime; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -1348,6 +1396,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -1361,6 +1410,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -1387,6 +1437,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -1400,6 +1451,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -1427,6 +1479,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -1441,6 +1494,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -1463,6 +1517,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -1474,6 +1529,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -1499,6 +1555,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -1512,6 +1569,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -1538,6 +1596,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -1551,6 +1610,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -1578,6 +1638,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -1592,6 +1653,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -1614,6 +1676,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -1625,6 +1688,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -1644,6 +1708,7 @@ - (instancetype)init _frequency = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -1654,6 +1719,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.frequency = self.frequency; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -1674,6 +1740,7 @@ - (instancetype)init _invokeID = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -1685,6 +1752,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.actionID = self.actionID; other.invokeID = self.invokeID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -1708,6 +1776,7 @@ - (instancetype)init _transitionTime = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -1720,6 +1789,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.invokeID = self.invokeID; other.transitionTime = self.transitionTime; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -1741,6 +1811,7 @@ - (instancetype)init _invokeID = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -1752,6 +1823,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.actionID = self.actionID; other.invokeID = self.invokeID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -1775,6 +1847,7 @@ - (instancetype)init _duration = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -1787,6 +1860,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.invokeID = self.invokeID; other.duration = self.duration; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -1808,6 +1882,7 @@ - (instancetype)init _invokeID = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -1819,6 +1894,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.actionID = self.actionID; other.invokeID = self.invokeID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -1840,6 +1916,7 @@ - (instancetype)init _invokeID = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -1851,6 +1928,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.actionID = self.actionID; other.invokeID = self.invokeID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -1874,6 +1952,7 @@ - (instancetype)init _duration = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -1886,6 +1965,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.invokeID = self.invokeID; other.duration = self.duration; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -1907,6 +1987,7 @@ - (instancetype)init _invokeID = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -1918,6 +1999,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.actionID = self.actionID; other.invokeID = self.invokeID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -1939,6 +2021,7 @@ - (instancetype)init _invokeID = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -1950,6 +2033,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.actionID = self.actionID; other.invokeID = self.invokeID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -1973,6 +2057,7 @@ - (instancetype)init _duration = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -1985,6 +2070,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.invokeID = self.invokeID; other.duration = self.duration; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -2006,6 +2092,7 @@ - (instancetype)init _invokeID = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -2017,6 +2104,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.actionID = self.actionID; other.invokeID = self.invokeID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -2040,6 +2128,7 @@ - (instancetype)init _duration = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -2052,6 +2141,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.invokeID = self.invokeID; other.duration = self.duration; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -2069,6 +2159,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -2078,6 +2169,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRBasicClusterMfgSpecificPingParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -2110,6 +2202,7 @@ - (instancetype)init _metadataForProvider = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -2127,6 +2220,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.requestorCanConsent = self.requestorCanConsent; other.metadataForProvider = self.metadataForProvider; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -2234,6 +2328,7 @@ - (instancetype)init _newVersion = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -2245,6 +2340,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.updateToken = self.updateToken; other.newVersion = self.newVersion; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -2305,6 +2401,7 @@ - (instancetype)init _softwareVersion = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -2316,6 +2413,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.updateToken = self.updateToken; other.softwareVersion = self.softwareVersion; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -2347,6 +2445,7 @@ - (instancetype)init _endpoint = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -2361,6 +2460,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.metadataForNode = self.metadataForNode; other.endpoint = self.endpoint; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -2410,6 +2510,7 @@ - (instancetype)init _breadcrumb = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -2421,6 +2522,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.expiryLengthSeconds = self.expiryLengthSeconds; other.breadcrumb = self.breadcrumb; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -2476,6 +2578,7 @@ - (instancetype)init _breadcrumb = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -2488,6 +2591,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.countryCode = self.countryCode; other.breadcrumb = self.breadcrumb; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -2537,6 +2641,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -2546,6 +2651,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRGeneralCommissioningClusterCommissioningCompleteParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -2598,6 +2704,7 @@ - (instancetype)init _breadcrumb = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -2609,6 +2716,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.ssid = self.ssid; other.breadcrumb = self.breadcrumb; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -2671,6 +2779,7 @@ - (instancetype)init _breadcrumb = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -2683,6 +2792,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.credentials = self.credentials; other.breadcrumb = self.breadcrumb; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -2705,6 +2815,7 @@ - (instancetype)init _breadcrumb = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -2716,6 +2827,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.operationalDataset = self.operationalDataset; other.breadcrumb = self.breadcrumb; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -2738,6 +2850,7 @@ - (instancetype)init _breadcrumb = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -2749,6 +2862,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.networkID = self.networkID; other.breadcrumb = self.breadcrumb; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -2806,6 +2920,7 @@ - (instancetype)init _breadcrumb = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -2817,6 +2932,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.networkID = self.networkID; other.breadcrumb = self.breadcrumb; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -2876,6 +2992,7 @@ - (instancetype)init _breadcrumb = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -2888,6 +3005,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.networkIndex = self.networkIndex; other.breadcrumb = self.breadcrumb; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -2912,6 +3030,7 @@ - (instancetype)init _transferFileDesignator = [NSData data]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -2924,6 +3043,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.requestedProtocol = self.requestedProtocol; other.transferFileDesignator = self.transferFileDesignator; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -3008,6 +3128,7 @@ - (instancetype)init _eventTrigger = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -3019,6 +3140,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.enableKey = self.enableKey; other.eventTrigger = self.eventTrigger; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -3037,6 +3159,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -3046,6 +3169,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRSoftwareDiagnosticsClusterResetWatermarksParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -3062,6 +3186,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -3071,6 +3196,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRThreadNetworkDiagnosticsClusterResetCountsParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -3087,6 +3213,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -3096,6 +3223,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRWiFiNetworkDiagnosticsClusterResetCountsParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -3112,6 +3240,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -3121,6 +3250,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTREthernetNetworkDiagnosticsClusterResetCountsParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -3143,6 +3273,7 @@ - (instancetype)init _timeSource = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -3155,6 +3286,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.granularity = self.granularity; other.timeSource = self.timeSource; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -3182,6 +3314,7 @@ - (instancetype)init _salt = [NSData data]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -3196,6 +3329,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.iterations = self.iterations; other.salt = self.salt; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -3230,6 +3364,7 @@ - (instancetype)init _commissioningTimeout = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -3240,6 +3375,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.commissioningTimeout = self.commissioningTimeout; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -3257,6 +3393,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -3266,6 +3403,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRAdministratorCommissioningClusterRevokeCommissioningParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -3284,6 +3422,7 @@ - (instancetype)init _attestationNonce = [NSData data]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -3294,6 +3433,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.attestationNonce = self.attestationNonce; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -3359,6 +3499,7 @@ - (instancetype)init _certificateType = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -3369,6 +3510,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.certificateType = self.certificateType; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -3419,6 +3561,7 @@ - (instancetype)init _isForUpdateNOC = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -3430,6 +3573,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.csrNonce = self.csrNonce; other.isForUpdateNOC = self.isForUpdateNOC; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -3491,6 +3635,7 @@ - (instancetype)init _adminVendorId = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -3505,6 +3650,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.caseAdminSubject = self.caseAdminSubject; other.adminVendorId = self.adminVendorId; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -3529,6 +3675,7 @@ - (instancetype)init _icacValue = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -3540,6 +3687,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.nocValue = self.nocValue; other.icacValue = self.icacValue; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -3595,6 +3743,7 @@ - (instancetype)init _label = @""; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -3605,6 +3754,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.label = self.label; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -3623,6 +3773,7 @@ - (instancetype)init _fabricIndex = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -3633,6 +3784,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.fabricIndex = self.fabricIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -3652,6 +3804,7 @@ - (instancetype)init _rootCACertificate = [NSData data]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -3662,6 +3815,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.rootCACertificate = self.rootCACertificate; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -3694,6 +3848,7 @@ - (instancetype)init _groupKeySet = [MTRGroupKeyManagementClusterGroupKeySetStruct new]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -3704,6 +3859,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.groupKeySet = self.groupKeySet; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -3723,6 +3879,7 @@ - (instancetype)init _groupKeySetID = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -3733,6 +3890,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.groupKeySetID = self.groupKeySetID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -3781,6 +3939,7 @@ - (instancetype)init _groupKeySetID = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -3791,6 +3950,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.groupKeySetID = self.groupKeySetID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -3810,6 +3970,7 @@ - (instancetype)init _groupKeySetIDs = [NSArray array]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -3820,6 +3981,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.groupKeySetIDs = self.groupKeySetIDs; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -3868,6 +4030,7 @@ - (instancetype)init _newMode = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -3878,6 +4041,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.newMode = self.newMode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -3896,6 +4060,7 @@ - (instancetype)init _pinCode = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -3906,6 +4071,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.pinCode = self.pinCode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -3925,6 +4091,7 @@ - (instancetype)init _pinCode = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -3935,6 +4102,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.pinCode = self.pinCode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -3956,6 +4124,7 @@ - (instancetype)init _pinCode = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -3967,6 +4136,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.timeout = self.timeout; other.pinCode = self.pinCode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -3998,6 +4168,7 @@ - (instancetype)init _endMinute = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -4014,6 +4185,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.endHour = self.endHour; other.endMinute = self.endMinute; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -4037,6 +4209,7 @@ - (instancetype)init _userIndex = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -4048,6 +4221,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.weekDayIndex = self.weekDayIndex; other.userIndex = self.userIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -4121,6 +4295,7 @@ - (instancetype)init _userIndex = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -4132,6 +4307,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.weekDayIndex = self.weekDayIndex; other.userIndex = self.userIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -4157,6 +4333,7 @@ - (instancetype)init _localEndTime = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -4170,6 +4347,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.localStartTime = self.localStartTime; other.localEndTime = self.localEndTime; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -4192,6 +4370,7 @@ - (instancetype)init _userIndex = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -4203,6 +4382,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.yearDayIndex = self.yearDayIndex; other.userIndex = self.userIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -4266,6 +4446,7 @@ - (instancetype)init _userIndex = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -4277,6 +4458,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.yearDayIndex = self.yearDayIndex; other.userIndex = self.userIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -4302,6 +4484,7 @@ - (instancetype)init _operatingMode = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -4315,6 +4498,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.localEndTime = self.localEndTime; other.operatingMode = self.operatingMode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -4335,6 +4519,7 @@ - (instancetype)init _holidayIndex = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -4345,6 +4530,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.holidayIndex = self.holidayIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -4406,6 +4592,7 @@ - (instancetype)init _holidayIndex = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -4416,6 +4603,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.holidayIndex = self.holidayIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -4447,6 +4635,7 @@ - (instancetype)init _credentialRule = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -4463,6 +4652,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.userType = self.userType; other.credentialRule = self.credentialRule; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -4498,6 +4688,7 @@ - (instancetype)init _userIndex = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -4508,6 +4699,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.userIndex = self.userIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -4598,6 +4790,7 @@ - (instancetype)init _userIndex = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -4608,6 +4801,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.userIndex = self.userIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -4636,6 +4830,7 @@ - (instancetype)init _userType = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -4651,6 +4846,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.userStatus = self.userStatus; other.userType = self.userType; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -4707,6 +4903,7 @@ - (instancetype)init _credential = [MTRDoorLockClusterCredentialStruct new]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -4717,6 +4914,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.credential = self.credential; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -4780,6 +4978,7 @@ - (instancetype)init _credential = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -4790,6 +4989,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.credential = self.credential; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -4807,6 +5007,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -4816,6 +5017,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRWindowCoveringClusterUpOrOpenParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -4832,6 +5034,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -4841,6 +5044,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRWindowCoveringClusterDownOrCloseParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -4857,6 +5061,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -4866,6 +5071,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRWindowCoveringClusterStopMotionParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -4884,6 +5090,7 @@ - (instancetype)init _liftValue = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -4894,6 +5101,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.liftValue = self.liftValue; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -4912,6 +5120,7 @@ - (instancetype)init _liftPercent100thsValue = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -4922,6 +5131,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.liftPercent100thsValue = self.liftPercent100thsValue; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -4941,6 +5151,7 @@ - (instancetype)init _tiltValue = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -4951,6 +5162,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.tiltValue = self.tiltValue; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -4969,6 +5181,7 @@ - (instancetype)init _tiltPercent100thsValue = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -4979,6 +5192,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.tiltPercent100thsValue = self.tiltPercent100thsValue; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -4998,6 +5212,7 @@ - (instancetype)init _percentOpen = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -5008,6 +5223,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.percentOpen = self.percentOpen; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -5025,6 +5241,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -5034,6 +5251,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRBarrierControlClusterBarrierControlStopParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -5054,6 +5272,7 @@ - (instancetype)init _amount = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -5065,6 +5284,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.mode = self.mode; other.amount = self.amount; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -5129,6 +5349,7 @@ - (instancetype)init _transitions = [NSArray array]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -5142,6 +5363,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.modeForSequence = self.modeForSequence; other.transitions = self.transitions; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -5164,6 +5386,7 @@ - (instancetype)init _modeToReturn = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -5175,6 +5398,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.daysToReturn = self.daysToReturn; other.modeToReturn = self.modeToReturn; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -5192,6 +5416,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -5201,6 +5426,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRThermostatClusterClearWeeklyScheduleParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -5227,6 +5453,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -5241,6 +5468,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -5267,6 +5495,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -5280,6 +5509,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -5307,6 +5537,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -5321,6 +5552,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -5347,6 +5579,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -5360,6 +5593,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -5386,6 +5620,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -5399,6 +5634,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -5426,6 +5662,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -5440,6 +5677,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -5468,6 +5706,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -5482,6 +5721,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -5510,6 +5750,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -5524,6 +5765,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -5550,6 +5792,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -5563,6 +5806,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -5590,6 +5834,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -5604,6 +5849,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -5630,6 +5876,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -5643,6 +5890,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -5684,6 +5932,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -5698,6 +5947,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -5724,6 +5974,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -5737,6 +5988,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -5764,6 +6016,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -5778,6 +6031,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -5806,6 +6060,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -5820,6 +6075,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -5852,6 +6108,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -5868,6 +6125,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -5891,6 +6149,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -5902,6 +6161,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -5931,6 +6191,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -5946,6 +6207,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -5980,6 +6242,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -5996,6 +6259,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -6018,6 +6282,7 @@ - (instancetype)init _match = @""; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -6028,6 +6293,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.match = self.match; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -6080,6 +6346,7 @@ - (instancetype)init _minorNumber = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -6091,6 +6358,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.majorNumber = self.majorNumber; other.minorNumber = self.minorNumber; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -6110,6 +6378,7 @@ - (instancetype)init _count = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -6120,6 +6389,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.count = self.count; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -6140,6 +6410,7 @@ - (instancetype)init _data = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -6151,6 +6422,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.target = self.target; other.data = self.data; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -6200,6 +6472,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -6209,6 +6482,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRMediaPlaybackClusterPlayParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -6225,6 +6499,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -6234,6 +6509,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRMediaPlaybackClusterPauseParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -6250,6 +6526,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -6259,6 +6536,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRMediaPlaybackClusterStopPlaybackParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -6275,6 +6553,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -6284,6 +6563,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRMediaPlaybackClusterStartOverParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -6300,6 +6580,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -6309,6 +6590,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRMediaPlaybackClusterPreviousParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -6325,6 +6607,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -6334,6 +6617,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRMediaPlaybackClusterNextParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -6350,6 +6634,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -6359,6 +6644,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRMediaPlaybackClusterRewindParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -6375,6 +6661,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -6384,6 +6671,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRMediaPlaybackClusterFastForwardParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -6402,6 +6690,7 @@ - (instancetype)init _deltaPositionMilliseconds = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -6412,6 +6701,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.deltaPositionMilliseconds = self.deltaPositionMilliseconds; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -6431,6 +6721,7 @@ - (instancetype)init _deltaPositionMilliseconds = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -6441,6 +6732,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.deltaPositionMilliseconds = self.deltaPositionMilliseconds; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -6492,6 +6784,7 @@ - (instancetype)init _position = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -6502,6 +6795,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.position = self.position; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -6520,6 +6814,7 @@ - (instancetype)init _index = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -6530,6 +6825,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.index = self.index; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -6546,6 +6842,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -6555,6 +6852,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRMediaInputClusterShowInputStatusParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -6571,6 +6869,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -6580,6 +6879,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRMediaInputClusterHideInputStatusParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -6600,6 +6900,7 @@ - (instancetype)init _name = @""; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -6611,6 +6912,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.index = self.index; other.name = self.name; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -6628,6 +6930,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -6637,6 +6940,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRLowPowerClusterSleepParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -6655,6 +6959,7 @@ - (instancetype)init _keyCode = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -6665,6 +6970,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.keyCode = self.keyCode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -6715,6 +7021,7 @@ - (instancetype)init _data = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -6727,6 +7034,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.autoPlay = self.autoPlay; other.data = self.data; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -6750,6 +7058,7 @@ - (instancetype)init _brandingInformation = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -6762,6 +7071,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.displayString = self.displayString; other.brandingInformation = self.brandingInformation; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -6813,6 +7123,7 @@ - (instancetype)init _index = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -6823,6 +7134,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.index = self.index; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -6843,6 +7155,7 @@ - (instancetype)init _name = @""; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -6854,6 +7167,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.index = self.index; other.name = self.name; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -6875,6 +7189,7 @@ - (instancetype)init _data = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -6886,6 +7201,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.application = self.application; other.data = self.data; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -6905,6 +7221,7 @@ - (instancetype)init _application = [MTRApplicationLauncherClusterApplication new]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -6915,6 +7232,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.application = self.application; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -6934,6 +7252,7 @@ - (instancetype)init _application = [MTRApplicationLauncherClusterApplication new]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -6944,6 +7263,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.application = self.application; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -6995,6 +7315,7 @@ - (instancetype)init _tempAccountIdentifier = @""; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -7005,6 +7326,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.tempAccountIdentifier = self.tempAccountIdentifier; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -7054,6 +7376,7 @@ - (instancetype)init _setupPIN = @""; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -7065,6 +7388,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.tempAccountIdentifier = self.tempAccountIdentifier; other.setupPIN = self.setupPIN; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -7082,6 +7406,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -7091,6 +7416,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRAccountLoginClusterLogoutParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -7146,6 +7472,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -7155,6 +7482,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRElectricalMeasurementClusterGetProfileInfoCommandParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -7223,6 +7551,7 @@ - (instancetype)init _numberOfIntervals = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -7235,6 +7564,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.startTime = self.startTime; other.numberOfIntervals = self.numberOfIntervals; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -7252,6 +7582,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -7261,6 +7592,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRUnitTestingClusterTestParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -7312,6 +7644,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -7321,6 +7654,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRUnitTestingClusterTestNotHandledParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -7372,6 +7706,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -7381,6 +7716,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRUnitTestingClusterTestSpecificParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -7432,6 +7768,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -7441,6 +7778,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRUnitTestingClusterTestUnknownCommandParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -7511,6 +7849,7 @@ - (instancetype)init _arg2 = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -7522,6 +7861,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.arg1 = self.arg1; other.arg2 = self.arg2; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -7575,6 +7915,7 @@ - (instancetype)init _arg1 = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -7585,6 +7926,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.arg1 = self.arg1; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -7651,6 +7993,7 @@ - (instancetype)init _arg6 = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -7666,6 +8009,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.arg5 = self.arg5; other.arg6 = self.arg6; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -7729,6 +8073,7 @@ - (instancetype)init _arg1 = [MTRUnitTestingClusterSimpleStruct new]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -7739,6 +8084,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.arg1 = self.arg1; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -7887,6 +8233,7 @@ - (instancetype)init _arg1 = [MTRUnitTestingClusterNestedStruct new]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -7897,6 +8244,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.arg1 = self.arg1; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -7949,6 +8297,7 @@ - (instancetype)init _arg1 = [NSArray array]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -7959,6 +8308,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.arg1 = self.arg1; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -8011,6 +8361,7 @@ - (instancetype)init _arg1 = [NSArray array]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -8021,6 +8372,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.arg1 = self.arg1; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -8073,6 +8425,7 @@ - (instancetype)init _arg1 = [MTRUnitTestingClusterNestedStructList new]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -8083,6 +8436,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.arg1 = self.arg1; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -8135,6 +8489,7 @@ - (instancetype)init _arg1 = [NSArray array]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -8145,6 +8500,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.arg1 = self.arg1; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -8166,6 +8522,7 @@ - (instancetype)init _arg1 = [NSArray array]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -8176,6 +8533,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.arg1 = self.arg1; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -8199,6 +8557,7 @@ - (instancetype)init _arg2 = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -8210,6 +8569,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.arg1 = self.arg1; other.arg2 = self.arg2; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -8232,6 +8592,7 @@ - (instancetype)init _arg1 = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -8242,6 +8603,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.arg1 = self.arg1; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -8285,6 +8647,7 @@ - (instancetype)init _nullableOptionalList = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -8306,6 +8669,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionalList = self.optionalList; other.nullableOptionalList = self.nullableOptionalList; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -8333,6 +8697,7 @@ - (instancetype)init _arg1 = [MTRUnitTestingClusterSimpleStruct new]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -8343,6 +8708,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.arg1 = self.arg1; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -8362,6 +8728,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -8371,6 +8738,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRUnitTestingClusterTimedInvokeRequestParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -8392,6 +8760,7 @@ - (instancetype)init _arg1 = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -8402,6 +8771,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.arg1 = self.arg1; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -8427,6 +8797,7 @@ - (instancetype)init _arg3 = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -8439,6 +8810,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.arg2 = self.arg2; other.arg3 = self.arg3; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -8461,6 +8833,7 @@ - (instancetype)init _arg1 = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -8471,6 +8844,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.arg1 = self.arg1; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -8500,6 +8874,7 @@ - (instancetype)init _takeMutex = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -8514,6 +8889,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.numCallsToFail = self.numCallsToFail; other.takeMutex = self.takeMutex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } @@ -8538,6 +8914,7 @@ - (instancetype)init _percentage = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } @@ -8550,6 +8927,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.id = self.id; other.percentage = self.percentage; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; }