From 305f9c5985b407216bc3fc2be5c7972d7906fec8 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 20 Jan 2023 10:37:19 -0500 Subject: [PATCH] Add a way for Darwin invokes to specify a server-side processing timeout. 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 | 8 +- .../CHIP/templates/MTRBaseClusters-src.zapt | 14 +- .../CHIP/templates/MTRClusters-src.zapt | 17 +- .../templates/MTRCommandPayloadsObjc-src.zapt | 6 + .../templates/MTRCommandPayloadsObjc.zapt | 9 + .../CHIP/zap-generated/MTRBaseClusters.mm | 2607 +++++++++++--- .../CHIP/zap-generated/MTRClusters.mm | 2981 ++++++++++++++--- .../zap-generated/MTRCommandPayloadsObjc.h | 1705 +++++++++- .../zap-generated/MTRCommandPayloadsObjc.mm | 378 +++ 10 files changed, 6615 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..3cf93a96fd198d 100644 --- a/src/darwin/Framework/CHIP/MTRBaseDevice.mm +++ b/src/darwin/Framework/CHIP/MTRBaseDevice.mm @@ -1132,7 +1132,13 @@ - (void)invokeCommandWithEndpointID:(NSNumber *)endpointID ReturnErrorOnFailure(commandSender->AddRequestData(commandPath, MTRDataValueDictionaryDecodableType(commandFields), (timeoutMs == nil) ? NullOptional : Optional([timeoutMs unsignedShortValue]))); - ReturnErrorOnFailure(commandSender->SendCommandRequest(session)); + + Optional invokeTimeout; + NSNumber * serverSideProcessingTimeoutMs = [commandFields serverSideProcessingTimeoutMs]; + if (serverSideProcessingTimeoutMs != nil) { + invokeTimeout.SetValue(System::Clock::Timeout(serverSideProcessingTimeoutMs.unsignedLongValue)); + } + ReturnErrorOnFailure(commandSender->SendCommandRequest(session, invokeTimeout)); 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..bbc0e0d1b0f2d3 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,8 @@ using chip::Callback::Cancelable; using namespace chip::app::Clusters; using chip::Messaging::ExchangeManager; using chip::SessionHandle; +using chip::Optional; +using chip::System::Clock::Timeout; // NOLINTBEGIN(clang-analyzer-cplusplus.NewDeleteLeaks): Linter is unable to locate the delete on these objects. {{#chip_client_clusters includeAll=true}} @@ -80,13 +83,20 @@ 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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX/2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } {{#if mustUseTimedInvoke}} if (!timedInvokeTimeoutMs.HasValue()) { @@ -107,7 +117,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..43ba36429c1944 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,8 @@ using chip::Callback::Cancelable; using namespace chip::app::Clusters; using chip::Messaging::ExchangeManager; using chip::SessionHandle; +using chip::Optional; +using chip::System::Clock::Timeout; static void MTRClustersLogEnqueue(NSString *logPrefix, MTRAsyncCallbackWorkQueue *workQueue) { MTR_LOG_INFO("%@ enqueueWorkItem %@", logPrefix, workQueue); @@ -120,12 +123,21 @@ 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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX/2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } {{#if mustUseTimedInvoke}} if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); @@ -145,8 +157,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 521a1545088c8a..814a82b851a093 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")}} + _serverSideProcessingTimeoutMs = 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.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; +{{/if}} return other; } diff --git a/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc.zapt b/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc.zapt index 5951653fec9fc7..f920cd054fd116 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 milliseconds, 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 * serverSideProcessingTimeoutMs; {{! 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..d50409091340ab 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,10 @@ 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::Timeout; // NOLINTBEGIN(clang-analyzer-cplusplus.NewDeleteLeaks): Linter is unable to locate the delete on these objects. @implementation MTRBaseClusterIdentify @@ -64,18 +67,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +103,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +833,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +868,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +903,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } { using ListType_0 = std::remove_reference_t; @@ -899,8 +942,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 +958,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +999,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } - 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 +1035,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +1676,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.groupId = params.groupId.unsignedShortValue; request.sceneId = params.sceneId.unsignedCharValue; @@ -1695,8 +1770,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 +1786,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +1821,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +1857,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +1891,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +1928,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.groupId = params.groupId.unsignedShortValue; request.sceneId = params.sceneId.unsignedCharValue; @@ -1841,8 +1956,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 +1973,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +2008,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.groupId = params.groupId.unsignedShortValue; request.sceneId = params.sceneId.unsignedCharValue; @@ -1971,8 +2102,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 +2119,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +2154,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.mode = static_cast>(params.mode.unsignedCharValue); request.groupIdFrom = params.groupIdFrom.unsignedShortValue; @@ -2029,8 +2176,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 +3276,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } - 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 +3315,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } - 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 +3354,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } - 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 +3389,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +3433,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } - 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 +3468,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +5278,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.level = params.level.unsignedCharValue; if (params.transitionTime == nil) { @@ -5103,8 +5306,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 +5324,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.moveMode = static_cast>(params.moveMode.unsignedCharValue); if (params.rate == nil) { @@ -5141,8 +5352,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 +5370,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.stepMode = static_cast>(params.stepMode.unsignedCharValue); request.stepSize = params.stepSize.unsignedCharValue; @@ -5180,8 +5399,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 +5417,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +5457,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.level = params.level.unsignedCharValue; if (params.transitionTime == nil) { @@ -5250,8 +5485,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 +5503,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.moveMode = static_cast>(params.moveMode.unsignedCharValue); if (params.rate == nil) { @@ -5288,8 +5531,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 +5549,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.stepMode = static_cast>(params.stepMode.unsignedCharValue); request.stepSize = params.stepSize.unsignedCharValue; @@ -5327,8 +5578,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 +5596,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +5636,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +11844,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { @@ -11591,8 +11866,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 +11885,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { @@ -11625,8 +11908,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 +11926,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { @@ -11657,8 +11948,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 +11967,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { @@ -11691,8 +11990,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 +12008,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { @@ -11723,8 +12030,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 +12048,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { @@ -11755,8 +12070,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 +12089,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { @@ -11789,8 +12112,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 +12130,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { @@ -11821,8 +12152,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 +12170,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { @@ -11853,8 +12192,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 +12211,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { @@ -11887,8 +12234,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 +12252,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { @@ -11919,8 +12274,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 +12293,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { @@ -11953,8 +12316,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 +13118,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } - 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 +15516,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.vendorID = static_cast>(params.vendorID.unsignedShortValue); request.productID = params.productID.unsignedShortValue; @@ -15196,8 +15575,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 +15592,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +15630,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +16167,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.providerNodeID = params.providerNodeID.unsignedLongLongValue; request.vendorID = static_cast>(params.vendorID.unsignedShortValue); @@ -15790,8 +16193,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 +22987,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +23023,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +23068,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } - 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 +24126,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } if (params != nil) { if (params.ssid != nil) { @@ -23723,8 +24158,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 +24175,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.ssid = [self asByteSpan:params.ssid]; request.credentials = [self asByteSpan:params.credentials]; @@ -23755,8 +24198,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 +24215,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.operationalDataset = [self asByteSpan:params.operationalDataset]; if (params.breadcrumb != nil) { @@ -23786,8 +24237,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 +24254,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.networkID = [self asByteSpan:params.networkID]; if (params.breadcrumb != nil) { @@ -23817,8 +24276,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 +24293,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.networkID = [self asByteSpan:params.networkID]; if (params.breadcrumb != nil) { @@ -23848,8 +24315,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 +24332,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.networkID = [self asByteSpan:params.networkID]; request.networkIndex = params.networkIndex.unsignedCharValue; @@ -23880,8 +24355,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 +25662,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +26179,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +27485,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } - 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 +28354,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } - 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 +34454,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } - 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 +36110,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } - 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 +39945,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); @@ -39439,8 +39970,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 +39989,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +40033,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +40820,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +40855,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +40891,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.CSRNonce = [self asByteSpan:params.csrNonce]; if (params.isForUpdateNOC != nil) { @@ -40342,8 +40913,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 +40930,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.NOCValue = [self asByteSpan:params.nocValue]; if (params.icacValue != nil) { @@ -40377,8 +40956,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 +40973,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.NOCValue = [self asByteSpan:params.nocValue]; if (params.icacValue != nil) { @@ -40408,8 +40995,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 +41012,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +41047,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +41084,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +42203,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.groupKeySet.groupKeySetID = params.groupKeySet.groupKeySetID.unsignedShortValue; request.groupKeySet.groupKeySecurityPolicy @@ -41641,8 +42260,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 +42277,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +42313,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +42348,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } { using ListType_0 = std::remove_reference_t; @@ -41744,8 +42387,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 +45046,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +46175,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); @@ -45542,8 +46201,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 +46219,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); @@ -45578,8 +46245,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 +46263,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); @@ -45613,8 +46288,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 +46306,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.weekDayIndex = params.weekDayIndex.unsignedCharValue; request.userIndex = params.userIndex.unsignedShortValue; @@ -45647,8 +46330,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 +46347,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +46385,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +46422,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +46460,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +46498,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +46535,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.holidayIndex = params.holidayIndex.unsignedCharValue; request.localStartTime = params.localStartTime.unsignedIntValue; @@ -45826,8 +46557,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 +46574,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +46611,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +46647,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); @@ -45947,8 +46702,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 +46717,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +46753,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +46791,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); @@ -46057,8 +46836,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 +46853,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +46891,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); @@ -46124,8 +46919,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 +51612,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } - 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 +51652,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } - 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 +51691,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } - 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 +51726,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +51763,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +51799,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +51836,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +54417,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +54458,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } - 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 +58828,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +58865,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.numberOfTransitionsForSequence = params.numberOfTransitionsForSequence.unsignedCharValue; request.dayOfWeekForSequence = static_cast>( @@ -58038,8 +58921,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 +58938,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +58982,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } - 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 +67788,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.hue = params.hue.unsignedCharValue; request.direction @@ -66904,8 +67811,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 +67829,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +67868,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.stepMode = static_cast>(params.stepMode.unsignedCharValue); request.stepSize = params.stepSize.unsignedCharValue; @@ -66967,8 +67890,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 +67908,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +67947,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +67986,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.stepMode = static_cast>(params.stepMode.unsignedCharValue); request.stepSize = params.stepSize.unsignedCharValue; @@ -67061,8 +68008,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 +68027,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.hue = params.hue.unsignedCharValue; request.saturation = params.saturation.unsignedCharValue; @@ -67094,8 +68049,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 +68067,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.colorX = params.colorX.unsignedShortValue; request.colorY = params.colorY.unsignedShortValue; @@ -67126,8 +68089,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 +68107,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +68146,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.stepX = params.stepX.shortValue; request.stepY = params.stepY.shortValue; @@ -67189,8 +68168,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 +68187,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +68227,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.enhancedHue = params.enhancedHue.unsignedShortValue; request.direction @@ -67255,8 +68250,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 +68268,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +68307,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.stepMode = static_cast>(params.stepMode.unsignedCharValue); request.stepSize = params.stepSize.unsignedShortValue; @@ -67318,8 +68329,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 +68348,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.enhancedHue = params.enhancedHue.unsignedShortValue; request.saturation = params.saturation.unsignedCharValue; @@ -67351,8 +68370,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 +68388,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.updateFlags = static_cast>(params.updateFlags.unsignedCharValue); @@ -67387,8 +68414,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 +68432,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +68470,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.moveMode = static_cast>(params.moveMode.unsignedCharValue); request.rate = params.rate.unsignedShortValue; @@ -67450,8 +68493,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 +68512,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.stepMode = static_cast>(params.stepMode.unsignedCharValue); request.stepSize = params.stepSize.unsignedShortValue; @@ -67485,8 +68536,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 +83674,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +83711,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +83748,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +84535,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.target = params.target.unsignedCharValue; if (params.data != nil) { @@ -83474,8 +84557,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 +85228,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } - 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 +85267,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } - 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 +85306,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } - 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 +85345,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } - 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 +85384,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } - 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 +85423,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } - 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 +85462,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } - 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 +85501,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } - 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 +85535,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +85570,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +85605,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +86868,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +86909,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } - 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 +86949,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } - 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 +86984,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +87690,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } - 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 +88197,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +88708,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } { using ListType_1 = std::remove_reference_t; @@ -87555,8 +88782,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 +88799,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.contentURL = [self asCharSpan:params.contentURL]; if (params.displayString != nil) { @@ -87680,8 +88915,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 +89644,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +89680,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +90364,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.application.catalogVendorId = params.application.catalogVendorId.unsignedShortValue; request.application.applicationId = [self asCharSpan:params.application.applicationId]; @@ -89128,8 +90387,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 +90404,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +90440,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +92385,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +92424,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); @@ -91155,8 +92446,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 +92468,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +93000,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } - 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 +93036,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +105423,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } - 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 +105463,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } - 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 +105502,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } - 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 +105542,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } - 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 +105576,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +105612,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +105648,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } { using ListType_0 = std::remove_reference_t; @@ -104504,8 +105875,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 +105891,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.arg1.a = params.arg1.a.unsignedCharValue; request.arg1.b = params.arg1.b.boolValue; @@ -104537,8 +105916,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 +105932,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.arg1.a = params.arg1.a.unsignedCharValue; request.arg1.b = params.arg1.b.boolValue; @@ -104572,8 +105959,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 +105975,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } { using ListType_0 = std::remove_reference_t; @@ -104628,8 +106023,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 +106039,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } { using ListType_0 = std::remove_reference_t; @@ -104675,8 +106078,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 +106094,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.arg1.a = params.arg1.a.unsignedCharValue; request.arg1.b = params.arg1.b.boolValue; @@ -104807,8 +106218,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 +106235,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } { using ListType_0 = std::remove_reference_t; @@ -104965,8 +106384,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 +106401,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } { using ListType_0 = std::remove_reference_t; @@ -105013,8 +106440,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 +106456,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +106492,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } if (params != nil) { if (params.arg1 != nil) { @@ -105077,8 +106520,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 +106539,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } if (params.nullableInt == nil) { request.nullableInt.SetNull(); @@ -105274,8 +106725,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 +106742,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } request.arg1.a = params.arg1.a.unsignedCharValue; request.arg1.b = params.arg1.b.boolValue; @@ -105308,8 +106767,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 +106790,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +106829,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } if (params != nil) { if (params.arg1 != nil) { @@ -105377,8 +106852,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 +106869,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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 +106909,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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } } 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..659590908e6631 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,10 @@ 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::Timeout; static void MTRClustersLogEnqueue(NSString * logPrefix, MTRAsyncCallbackWorkQueue * workQueue) { @@ -99,16 +102,26 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +169,29 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +360,27 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +429,26 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +498,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } { using ListType_0 = std::remove_reference_t; using ListMemberType_0 = ListMemberTypeGetter::Type; @@ -484,8 +537,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 +588,26 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +664,25 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } - 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 +730,27 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +958,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } request.groupId = params.groupId.unsignedShortValue; request.sceneId = params.sceneId.unsignedCharValue; request.transitionTime = params.transitionTime.unsignedShortValue; @@ -960,8 +1053,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 +1103,27 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +1173,27 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +1243,26 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +1311,27 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +1379,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } request.groupId = params.groupId.unsignedShortValue; request.sceneId = params.sceneId.unsignedCharValue; if (params.transitionTime != nil) { @@ -1264,8 +1407,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 +1458,26 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +1527,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } request.groupId = params.groupId.unsignedShortValue; request.sceneId = params.sceneId.unsignedCharValue; request.transitionTime = params.transitionTime.unsignedShortValue; @@ -1459,8 +1622,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 +1673,27 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +1742,30 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +2071,25 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } - 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 +2143,25 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } - 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 +2215,25 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } - 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 +2281,29 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +2360,25 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } - 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 +2426,29 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +2858,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } request.level = params.level.unsignedCharValue; if (params.transitionTime == nil) { request.transitionTime.SetNull(); @@ -2633,8 +2886,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 +2935,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } request.moveMode = static_cast>(params.moveMode.unsignedCharValue); if (params.rate == nil) { @@ -2701,8 +2964,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 +3013,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } request.stepMode = static_cast>(params.stepMode.unsignedCharValue); request.stepSize = params.stepSize.unsignedCharValue; @@ -2770,8 +3043,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 +3092,29 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +3162,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } request.level = params.level.unsignedCharValue; if (params.transitionTime == nil) { request.transitionTime.SetNull(); @@ -2897,8 +3190,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 +3239,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } request.moveMode = static_cast>(params.moveMode.unsignedCharValue); if (params.rate == nil) { @@ -2965,8 +3268,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 +3317,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } request.stepMode = static_cast>(params.stepMode.unsignedCharValue); request.stepSize = params.stepSize.unsignedCharValue; @@ -3034,8 +3347,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 +3396,29 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +3466,26 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +4542,30 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +4613,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } request.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { auto & definedValue_0 = request.invokeID.Emplace(); @@ -4283,8 +4636,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 +4685,30 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +4756,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } request.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { auto & definedValue_0 = request.invokeID.Emplace(); @@ -4406,8 +4779,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 +4828,30 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +4899,30 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +4970,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } request.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { auto & definedValue_0 = request.invokeID.Emplace(); @@ -4590,8 +4993,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 +5042,30 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +5113,30 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +5184,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } request.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { auto & definedValue_0 = request.invokeID.Emplace(); @@ -4774,8 +5207,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 +5256,30 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +5327,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } request.actionID = params.actionID.unsignedShortValue; if (params.invokeID != nil) { auto & definedValue_0 = request.invokeID.Emplace(); @@ -4897,8 +5350,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 +5617,25 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } - 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 +5989,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } request.vendorID = static_cast>(params.vendorID.unsignedShortValue); request.productID = params.productID.unsignedShortValue; @@ -5576,8 +6049,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 +6100,27 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +6168,27 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +6347,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } request.providerNodeID = params.providerNodeID.unsignedLongLongValue; request.vendorID = static_cast>(params.vendorID.unsignedShortValue); @@ -5871,8 +6374,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 +7291,27 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +7361,29 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +7446,26 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } - 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 +7702,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } if (params != nil) { if (params.ssid != nil) { auto & definedValue_0 = request.ssid.Emplace(); @@ -7190,8 +7734,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 +7785,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } request.ssid = [self asByteSpan:params.ssid]; request.credentials = [self asByteSpan:params.credentials]; if (params.breadcrumb != nil) { @@ -7254,8 +7808,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 +7859,30 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +7932,30 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +8005,30 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +8078,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } request.networkID = [self asByteSpan:params.networkID]; request.networkIndex = params.networkIndex.unsignedCharValue; if (params.breadcrumb != nil) { @@ -7507,8 +8101,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 +8395,29 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +8546,27 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +8776,25 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } - 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 +8969,25 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } - 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 +9659,25 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } - 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 +9936,25 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } - 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 +10468,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); } @@ -9829,8 +10493,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 +10543,29 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +10622,28 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +10825,26 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +10894,27 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +10964,30 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +11037,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } request.NOCValue = [self asByteSpan:params.nocValue]; if (params.icacValue != nil) { auto & definedValue_0 = request.ICACValue.Emplace(); @@ -10339,8 +11063,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 +11114,30 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +11187,26 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +11256,26 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +11324,26 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +11621,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } request.groupKeySet.groupKeySetID = params.groupKeySet.groupKeySetID.unsignedShortValue; request.groupKeySet.groupKeySecurityPolicy = static_cast>( @@ -10904,8 +11678,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 +11729,26 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +11796,26 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +11865,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } { using ListType_0 = std::remove_reference_t; using ListMemberType_0 = ListMemberTypeGetter::Type; @@ -11100,8 +11904,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 +12361,26 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +12590,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); } @@ -11792,8 +12616,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 +12665,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); } @@ -11857,8 +12691,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 +12740,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); } @@ -11921,8 +12765,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 +12814,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } request.weekDayIndex = params.weekDayIndex.unsignedCharValue; request.userIndex = params.userIndex.unsignedShortValue; request.daysMask @@ -11985,8 +12839,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 +12890,27 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +12958,27 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +13026,29 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +13098,27 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +13166,27 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +13234,30 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +13307,26 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +13374,26 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +13441,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); } @@ -12553,8 +13497,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 +13546,26 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +13613,29 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +13685,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); } @@ -12758,8 +13732,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 +13783,29 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +13853,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); } @@ -12887,8 +13881,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 +14857,25 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } - 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 +14932,25 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } - 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 +15007,25 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } - 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 +15073,26 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +15140,26 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +15207,26 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +15274,26 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +15705,26 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +15781,25 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } - 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 +16480,27 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +16548,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } request.numberOfTransitionsForSequence = params.numberOfTransitionsForSequence.unsignedCharValue; request.dayOfWeekForSequence = static_cast>( params.dayOfWeekForSequence.unsignedCharValue); @@ -15500,8 +16604,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 +16655,29 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +16734,25 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } - 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 +18280,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } request.hue = params.hue.unsignedCharValue; request.direction = static_cast>(params.direction.unsignedCharValue); @@ -17169,8 +18303,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 +18352,30 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +18423,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } request.stepMode = static_cast>(params.stepMode.unsignedCharValue); request.stepSize = params.stepSize.unsignedCharValue; @@ -17292,8 +18446,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 +18495,29 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +18565,30 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +18636,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } request.stepMode = static_cast>(params.stepMode.unsignedCharValue); request.stepSize = params.stepSize.unsignedCharValue; @@ -17475,8 +18659,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 +18708,30 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +18779,30 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +18850,29 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +18920,30 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +18991,29 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +19061,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } request.enhancedHue = params.enhancedHue.unsignedShortValue; request.direction = static_cast>(params.direction.unsignedCharValue); @@ -17840,8 +19084,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 +19133,30 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +19204,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } request.stepMode = static_cast>(params.stepMode.unsignedCharValue); request.stepSize = params.stepSize.unsignedShortValue; @@ -17963,8 +19227,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 +19276,30 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +19347,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } request.updateFlags = static_cast>(params.updateFlags.unsignedCharValue); request.action = static_cast>(params.action.unsignedCharValue); @@ -18089,8 +19373,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 +19422,27 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +19490,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } request.moveMode = static_cast>(params.moveMode.unsignedCharValue); request.rate = params.rate.unsignedShortValue; @@ -18210,8 +19514,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 +19563,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } request.stepMode = static_cast>(params.stepMode.unsignedCharValue); request.stepSize = params.stepSize.unsignedShortValue; @@ -18274,8 +19588,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 +21981,26 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +22048,27 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +22116,26 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +22309,30 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +22486,25 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } - 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 +22561,25 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } - 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 +22639,25 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } - 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 +22717,25 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } - 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 +22792,25 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } - 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 +22867,25 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } - 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 +22942,25 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } - 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 +23020,25 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } - 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 +23088,26 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +23157,26 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +23226,26 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +23649,26 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +23725,25 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } - 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 +23800,25 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } - 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 +23866,27 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +24080,25 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } - 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 +24233,26 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +24382,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } { using ListType_1 = std::remove_reference_t; using ListMemberType_1 = ListMemberTypeGetter::Type; @@ -22923,8 +24457,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 +24508,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } request.contentURL = [self asCharSpan:params.contentURL]; if (params.displayString != nil) { auto & definedValue_0 = request.displayString.Emplace(); @@ -23080,8 +24624,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 +24805,26 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +24872,27 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +25044,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } request.application.catalogVendorId = params.application.catalogVendorId.unsignedShortValue; request.application.applicationId = [self asCharSpan:params.application.applicationId]; if (params.data != nil) { @@ -23493,8 +25067,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 +25118,27 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +25188,27 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +25531,29 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +25601,30 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +25678,28 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +25865,25 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } - 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 +25932,28 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +27339,25 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } - 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 +27414,25 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } - 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 +27492,25 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } - 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 +27567,25 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } - 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 +27635,27 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +27705,26 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +27775,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } { using ListType_0 = std::remove_reference_t; using ListMemberType_0 = ListMemberTypeGetter::Type; @@ -26290,8 +28004,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 +28055,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +28080,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 +28131,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +28160,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 +28211,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } { using ListType_0 = std::remove_reference_t; using ListMemberType_0 = ListMemberTypeGetter::Type; @@ -26515,8 +28259,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 +28310,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } { using ListType_0 = std::remove_reference_t; using ListMemberType_0 = ListMemberTypeGetter::Type; @@ -26595,8 +28349,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 +28400,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +28526,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 +28579,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } { using ListType_0 = std::remove_reference_t; using ListMemberType_0 = ListMemberTypeGetter::Type; @@ -26956,8 +28730,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 +28781,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } { using ListType_0 = std::remove_reference_t; using ListMemberType_0 = ListMemberTypeGetter::Type; @@ -27036,8 +28820,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 +28871,27 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +28941,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } if (params != nil) { if (params.arg1 != nil) { auto & definedValue_0 = request.arg1.Emplace(); @@ -27165,8 +28969,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 +29022,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } if (params.nullableInt == nil) { request.nullableInt.SetNull(); } else { @@ -27395,8 +29209,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 +29260,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +29285,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 +29343,28 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +29412,22 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } if (params != nil) { if (params.arg1 != nil) { auto & definedValue_0 = request.arg1.Emplace(); @@ -27591,8 +29435,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 +29486,28 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 +29561,27 @@ - (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.serverSideProcessingTimeoutMs != nil) { + // Clamp to UINT32_MAX/2 to leave room to adjust for MRP later without overflowing. + params.serverSideProcessingTimeoutMs + = MTRClampedNumber(params.serverSideProcessingTimeoutMs, @(0), @(UINT32_MAX / 2)); + invokeTimeout.SetValue(Timeout(params.serverSideProcessingTimeoutMs.unsignedLongValue)); + } + } 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 31885d524ffdbe..b3f851cc6c06ed 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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end MTR_NEWLY_AVAILABLE @@ -1526,6 +1940,15 @@ MTR_NEWLY_AVAILABLE * */ @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1601,6 +2024,15 @@ MTR_NEWLY_AVAILABLE * */ @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1659,6 +2091,15 @@ MTR_NEWLY_AVAILABLE * */ @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1694,6 +2135,15 @@ MTR_NEWLY_AVAILABLE * */ @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1729,6 +2179,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1779,7 +2238,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 milliseconds, 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 * serverSideProcessingTimeoutMs; +@end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams : NSObject @@ -1822,6 +2290,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1869,6 +2346,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1922,6 +2408,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1945,6 +2440,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -1968,6 +2472,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2017,6 +2530,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2068,6 +2590,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2094,6 +2625,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2154,6 +2694,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2173,6 +2722,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2192,6 +2750,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2211,6 +2778,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2230,6 +2806,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2255,6 +2840,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2285,6 +2879,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end @interface MTRAdministratorCommissioningClusterOpenCommissioningWindowParams (Deprecated) @@ -2313,6 +2916,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2332,6 +2944,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2353,6 +2974,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2404,6 +3034,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2449,6 +3088,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2502,6 +3150,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2525,6 +3182,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2572,6 +3238,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2593,6 +3268,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2614,6 +3298,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end @interface MTROperationalCredentialsClusterAddTrustedRootCertificateParams (Deprecated) @@ -2642,6 +3335,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2663,6 +3365,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2707,6 +3418,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2728,6 +3448,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2772,6 +3501,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2793,6 +3531,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2814,6 +3561,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2837,6 +3593,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2870,6 +3635,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2893,6 +3667,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2952,6 +3735,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2979,6 +3771,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3002,6 +3803,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3055,6 +3865,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3082,6 +3901,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3103,6 +3931,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3154,6 +3991,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3187,6 +4033,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end @interface MTRDoorLockClusterSetUserParams (Deprecated) @@ -3214,6 +4069,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3282,6 +4146,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3314,6 +4187,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3363,6 +4245,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3417,6 +4308,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3436,6 +4336,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3455,6 +4364,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3474,6 +4392,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3495,6 +4422,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3517,6 +4453,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3538,6 +4483,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3560,6 +4514,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3581,6 +4544,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3600,6 +4572,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3623,6 +4604,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3682,6 +4672,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3705,6 +4704,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3724,6 +4732,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3753,6 +4770,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3780,6 +4806,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3809,6 +4844,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3836,6 +4880,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3863,6 +4916,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3892,6 +4954,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3921,6 +4992,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3950,6 +5030,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3977,6 +5066,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4006,6 +5104,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4033,6 +5140,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end @interface MTRColorControlClusterMoveToColorTemperatureParams (Deprecated) @@ -4068,6 +5184,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4095,6 +5220,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4124,6 +5258,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4153,6 +5296,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4186,6 +5338,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4209,6 +5370,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4242,6 +5412,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4277,6 +5456,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4298,6 +5486,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4345,6 +5542,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4367,6 +5573,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4390,6 +5605,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4433,6 +5657,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4451,7 +5684,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4471,6 +5713,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4490,6 +5741,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4509,6 +5769,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4528,6 +5797,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4547,6 +5825,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4566,6 +5853,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4588,6 +5884,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4610,6 +5915,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4655,6 +5969,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4676,6 +5999,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4695,6 +6027,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4714,6 +6055,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4737,6 +6087,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4756,6 +6115,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4777,6 +6145,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4825,6 +6202,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4851,6 +6237,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4896,6 +6291,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4919,6 +6323,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4943,6 +6356,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4965,6 +6387,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4987,6 +6418,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5033,6 +6473,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5079,6 +6528,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5098,6 +6556,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5147,6 +6614,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5206,6 +6682,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end MTR_NEWLY_AVAILABLE @@ -5225,6 +6710,15 @@ MTR_NEWLY_AVAILABLE * */ @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5276,6 +6770,15 @@ MTR_NEWLY_AVAILABLE * */ @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5327,6 +6830,15 @@ MTR_NEWLY_AVAILABLE * */ @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5378,6 +6890,15 @@ MTR_NEWLY_AVAILABLE * */ @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5443,6 +6964,15 @@ MTR_NEWLY_AVAILABLE * */ @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5496,6 +7026,15 @@ MTR_NEWLY_AVAILABLE * */ @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5561,6 +7100,15 @@ MTR_NEWLY_AVAILABLE * */ @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5620,6 +7168,15 @@ MTR_NEWLY_AVAILABLE * */ @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5728,6 +7285,15 @@ MTR_NEWLY_AVAILABLE * */ @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5781,6 +7347,15 @@ MTR_NEWLY_AVAILABLE * */ @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5834,6 +7409,15 @@ MTR_NEWLY_AVAILABLE * */ @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5887,6 +7471,15 @@ MTR_NEWLY_AVAILABLE * */ @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5942,6 +7535,15 @@ MTR_NEWLY_AVAILABLE * */ @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5969,6 +7571,15 @@ MTR_NEWLY_AVAILABLE * */ @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5997,6 +7608,15 @@ MTR_NEWLY_AVAILABLE * */ @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -6023,6 +7643,15 @@ MTR_NEWLY_AVAILABLE * */ @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -6071,6 +7700,15 @@ MTR_NEWLY_AVAILABLE * */ @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -6098,6 +7736,15 @@ MTR_NEWLY_AVAILABLE * */ @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -6122,6 +7769,15 @@ MTR_NEWLY_AVAILABLE * */ @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -6148,6 +7804,15 @@ MTR_NEWLY_AVAILABLE * */ @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -6179,6 +7844,15 @@ MTR_NEWLY_AVAILABLE * */ @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -6205,6 +7879,15 @@ MTR_NEWLY_AVAILABLE * */ @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -6240,6 +7923,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -6265,6 +7957,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 milliseconds, 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 * serverSideProcessingTimeoutMs; @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 d897cf6be7ca78..f7e1b221a958ff 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; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -36,6 +37,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.identifyTime = self.identifyTime; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -57,6 +59,7 @@ - (instancetype)init _effectVariant = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = 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.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -89,6 +93,7 @@ - (instancetype)init _groupName = @""; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = 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.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -177,6 +183,7 @@ - (instancetype)init _groupID = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -187,6 +194,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.groupID = self.groupID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -266,6 +274,7 @@ - (instancetype)init _groupList = [NSArray array]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -276,6 +285,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.groupList = self.groupList; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -326,6 +336,7 @@ - (instancetype)init _groupID = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -336,6 +347,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.groupID = self.groupID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -410,6 +422,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -419,6 +432,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRGroupsClusterRemoveAllGroupsParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -439,6 +453,7 @@ - (instancetype)init _groupName = @""; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = 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.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -490,6 +506,7 @@ - (instancetype)init _extensionFieldSets = [NSArray array]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = 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.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -561,6 +579,7 @@ - (instancetype)init _sceneId = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = 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.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -638,6 +658,7 @@ - (instancetype)init _sceneId = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = 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.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -703,6 +725,7 @@ - (instancetype)init _groupId = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -713,6 +736,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.groupId = self.groupId; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -765,6 +789,7 @@ - (instancetype)init _sceneId = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = 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.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -834,6 +860,7 @@ - (instancetype)init _transitionTime = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = 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.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -865,6 +893,7 @@ - (instancetype)init _groupId = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -875,6 +904,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.groupId = self.groupId; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -939,6 +969,7 @@ - (instancetype)init _extensionFieldSets = [NSArray array]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = 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.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -1010,6 +1042,7 @@ - (instancetype)init _sceneId = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = 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.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -1093,6 +1127,7 @@ - (instancetype)init _sceneIdTo = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = 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.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -1160,6 +1196,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -1169,6 +1206,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTROnOffClusterOffParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -1185,6 +1223,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -1194,6 +1233,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTROnOffClusterOnParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -1210,6 +1250,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -1219,6 +1260,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTROnOffClusterToggleParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -1239,6 +1281,7 @@ - (instancetype)init _effectVariant = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = 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.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -1280,6 +1324,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -1289,6 +1334,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTROnOffClusterOnWithRecallGlobalSceneParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -1311,6 +1357,7 @@ - (instancetype)init _offWaitTime = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = 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.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -1348,6 +1396,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = 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.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -1387,6 +1437,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = 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.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -1427,6 +1479,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = 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.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -1463,6 +1517,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = 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.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -1499,6 +1555,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = 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.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -1538,6 +1596,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = 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.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -1578,6 +1638,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = 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.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -1614,6 +1676,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = 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.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -1644,6 +1708,7 @@ - (instancetype)init _frequency = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -1654,6 +1719,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.frequency = self.frequency; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -1674,6 +1740,7 @@ - (instancetype)init _invokeID = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = 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.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -1708,6 +1776,7 @@ - (instancetype)init _transitionTime = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = 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.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -1741,6 +1811,7 @@ - (instancetype)init _invokeID = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = 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.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -1775,6 +1847,7 @@ - (instancetype)init _duration = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = 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.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -1808,6 +1882,7 @@ - (instancetype)init _invokeID = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = 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.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -1840,6 +1916,7 @@ - (instancetype)init _invokeID = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = 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.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -1874,6 +1952,7 @@ - (instancetype)init _duration = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = 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.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -1907,6 +1987,7 @@ - (instancetype)init _invokeID = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = 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.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -1939,6 +2021,7 @@ - (instancetype)init _invokeID = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = 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.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -1973,6 +2057,7 @@ - (instancetype)init _duration = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = 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.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -2006,6 +2092,7 @@ - (instancetype)init _invokeID = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = 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.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -2040,6 +2128,7 @@ - (instancetype)init _duration = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = 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.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -2069,6 +2159,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -2078,6 +2169,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRBasicClusterMfgSpecificPingParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -2110,6 +2202,7 @@ - (instancetype)init _metadataForProvider = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = 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.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -2231,6 +2325,7 @@ - (instancetype)init _newVersion = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -2242,6 +2337,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.updateToken = self.updateToken; other.newVersion = self.newVersion; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -2302,6 +2398,7 @@ - (instancetype)init _softwareVersion = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -2313,6 +2410,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.updateToken = self.updateToken; other.softwareVersion = self.softwareVersion; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -2344,6 +2442,7 @@ - (instancetype)init _endpoint = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -2358,6 +2457,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.metadataForNode = self.metadataForNode; other.endpoint = self.endpoint; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -2404,6 +2504,7 @@ - (instancetype)init _breadcrumb = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -2415,6 +2516,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.expiryLengthSeconds = self.expiryLengthSeconds; other.breadcrumb = self.breadcrumb; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -2470,6 +2572,7 @@ - (instancetype)init _breadcrumb = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -2482,6 +2585,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.countryCode = self.countryCode; other.breadcrumb = self.breadcrumb; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -2531,6 +2635,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -2540,6 +2645,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRGeneralCommissioningClusterCommissioningCompleteParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -2592,6 +2698,7 @@ - (instancetype)init _breadcrumb = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -2603,6 +2710,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.ssid = self.ssid; other.breadcrumb = self.breadcrumb; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -2665,6 +2773,7 @@ - (instancetype)init _breadcrumb = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -2677,6 +2786,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.credentials = self.credentials; other.breadcrumb = self.breadcrumb; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -2699,6 +2809,7 @@ - (instancetype)init _breadcrumb = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -2710,6 +2821,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.operationalDataset = self.operationalDataset; other.breadcrumb = self.breadcrumb; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -2732,6 +2844,7 @@ - (instancetype)init _breadcrumb = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -2743,6 +2856,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.networkID = self.networkID; other.breadcrumb = self.breadcrumb; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -2800,6 +2914,7 @@ - (instancetype)init _breadcrumb = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -2811,6 +2926,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.networkID = self.networkID; other.breadcrumb = self.breadcrumb; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -2870,6 +2986,7 @@ - (instancetype)init _breadcrumb = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -2882,6 +2999,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.networkIndex = self.networkIndex; other.breadcrumb = self.breadcrumb; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -2906,6 +3024,7 @@ - (instancetype)init _transferFileDesignator = [NSData data]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -2918,6 +3037,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.requestedProtocol = self.requestedProtocol; other.transferFileDesignator = self.transferFileDesignator; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -3002,6 +3122,7 @@ - (instancetype)init _eventTrigger = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -3013,6 +3134,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.enableKey = self.enableKey; other.eventTrigger = self.eventTrigger; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -3031,6 +3153,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -3040,6 +3163,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRSoftwareDiagnosticsClusterResetWatermarksParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -3056,6 +3180,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -3065,6 +3190,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRThreadNetworkDiagnosticsClusterResetCountsParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -3081,6 +3207,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -3090,6 +3217,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRWiFiNetworkDiagnosticsClusterResetCountsParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -3106,6 +3234,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -3115,6 +3244,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTREthernetNetworkDiagnosticsClusterResetCountsParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -3137,6 +3267,7 @@ - (instancetype)init _timeSource = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -3149,6 +3280,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.granularity = self.granularity; other.timeSource = self.timeSource; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -3176,6 +3308,7 @@ - (instancetype)init _salt = [NSData data]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -3190,6 +3323,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.iterations = self.iterations; other.salt = self.salt; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -3224,6 +3358,7 @@ - (instancetype)init _commissioningTimeout = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -3234,6 +3369,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.commissioningTimeout = self.commissioningTimeout; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -3251,6 +3387,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -3260,6 +3397,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRAdministratorCommissioningClusterRevokeCommissioningParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -3278,6 +3416,7 @@ - (instancetype)init _attestationNonce = [NSData data]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -3288,6 +3427,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.attestationNonce = self.attestationNonce; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -3353,6 +3493,7 @@ - (instancetype)init _certificateType = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -3363,6 +3504,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.certificateType = self.certificateType; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -3413,6 +3555,7 @@ - (instancetype)init _isForUpdateNOC = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -3424,6 +3567,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.csrNonce = self.csrNonce; other.isForUpdateNOC = self.isForUpdateNOC; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -3485,6 +3629,7 @@ - (instancetype)init _adminVendorId = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -3499,6 +3644,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.caseAdminSubject = self.caseAdminSubject; other.adminVendorId = self.adminVendorId; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -3523,6 +3669,7 @@ - (instancetype)init _icacValue = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -3534,6 +3681,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.nocValue = self.nocValue; other.icacValue = self.icacValue; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -3589,6 +3737,7 @@ - (instancetype)init _label = @""; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -3599,6 +3748,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.label = self.label; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -3617,6 +3767,7 @@ - (instancetype)init _fabricIndex = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -3627,6 +3778,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.fabricIndex = self.fabricIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -3646,6 +3798,7 @@ - (instancetype)init _rootCACertificate = [NSData data]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -3656,6 +3809,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.rootCACertificate = self.rootCACertificate; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -3688,6 +3842,7 @@ - (instancetype)init _groupKeySet = [MTRGroupKeyManagementClusterGroupKeySetStruct new]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -3698,6 +3853,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.groupKeySet = self.groupKeySet; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -3717,6 +3873,7 @@ - (instancetype)init _groupKeySetID = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -3727,6 +3884,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.groupKeySetID = self.groupKeySetID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -3775,6 +3933,7 @@ - (instancetype)init _groupKeySetID = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -3785,6 +3944,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.groupKeySetID = self.groupKeySetID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -3804,6 +3964,7 @@ - (instancetype)init _groupKeySetIDs = [NSArray array]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -3814,6 +3975,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.groupKeySetIDs = self.groupKeySetIDs; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -3862,6 +4024,7 @@ - (instancetype)init _newMode = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -3872,6 +4035,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.newMode = self.newMode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -3890,6 +4054,7 @@ - (instancetype)init _pinCode = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -3900,6 +4065,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.pinCode = self.pinCode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -3919,6 +4085,7 @@ - (instancetype)init _pinCode = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -3929,6 +4096,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.pinCode = self.pinCode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -3950,6 +4118,7 @@ - (instancetype)init _pinCode = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -3961,6 +4130,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.timeout = self.timeout; other.pinCode = self.pinCode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -3992,6 +4162,7 @@ - (instancetype)init _endMinute = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -4008,6 +4179,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.endHour = self.endHour; other.endMinute = self.endMinute; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -4031,6 +4203,7 @@ - (instancetype)init _userIndex = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -4042,6 +4215,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.weekDayIndex = self.weekDayIndex; other.userIndex = self.userIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -4115,6 +4289,7 @@ - (instancetype)init _userIndex = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -4126,6 +4301,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.weekDayIndex = self.weekDayIndex; other.userIndex = self.userIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -4151,6 +4327,7 @@ - (instancetype)init _localEndTime = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -4164,6 +4341,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.localStartTime = self.localStartTime; other.localEndTime = self.localEndTime; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -4186,6 +4364,7 @@ - (instancetype)init _userIndex = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -4197,6 +4376,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.yearDayIndex = self.yearDayIndex; other.userIndex = self.userIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -4260,6 +4440,7 @@ - (instancetype)init _userIndex = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -4271,6 +4452,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.yearDayIndex = self.yearDayIndex; other.userIndex = self.userIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -4296,6 +4478,7 @@ - (instancetype)init _operatingMode = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -4309,6 +4492,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.localEndTime = self.localEndTime; other.operatingMode = self.operatingMode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -4329,6 +4513,7 @@ - (instancetype)init _holidayIndex = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -4339,6 +4524,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.holidayIndex = self.holidayIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -4400,6 +4586,7 @@ - (instancetype)init _holidayIndex = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -4410,6 +4597,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.holidayIndex = self.holidayIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -4441,6 +4629,7 @@ - (instancetype)init _credentialRule = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -4457,6 +4646,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.userType = self.userType; other.credentialRule = self.credentialRule; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -4492,6 +4682,7 @@ - (instancetype)init _userIndex = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -4502,6 +4693,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.userIndex = self.userIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -4592,6 +4784,7 @@ - (instancetype)init _userIndex = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -4602,6 +4795,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.userIndex = self.userIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -4630,6 +4824,7 @@ - (instancetype)init _userType = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -4645,6 +4840,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.userStatus = self.userStatus; other.userType = self.userType; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -4701,6 +4897,7 @@ - (instancetype)init _credential = [MTRDoorLockClusterCredentialStruct new]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -4711,6 +4908,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.credential = self.credential; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -4774,6 +4972,7 @@ - (instancetype)init _credential = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -4784,6 +4983,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.credential = self.credential; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -4801,6 +5001,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -4810,6 +5011,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRWindowCoveringClusterUpOrOpenParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -4826,6 +5028,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -4835,6 +5038,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRWindowCoveringClusterDownOrCloseParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -4851,6 +5055,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -4860,6 +5065,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRWindowCoveringClusterStopMotionParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -4878,6 +5084,7 @@ - (instancetype)init _liftValue = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -4888,6 +5095,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.liftValue = self.liftValue; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -4906,6 +5114,7 @@ - (instancetype)init _liftPercent100thsValue = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -4916,6 +5125,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.liftPercent100thsValue = self.liftPercent100thsValue; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -4935,6 +5145,7 @@ - (instancetype)init _tiltValue = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -4945,6 +5156,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.tiltValue = self.tiltValue; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -4963,6 +5175,7 @@ - (instancetype)init _tiltPercent100thsValue = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -4973,6 +5186,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.tiltPercent100thsValue = self.tiltPercent100thsValue; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -4992,6 +5206,7 @@ - (instancetype)init _percentOpen = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -5002,6 +5217,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.percentOpen = self.percentOpen; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -5019,6 +5235,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -5028,6 +5245,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRBarrierControlClusterBarrierControlStopParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -5048,6 +5266,7 @@ - (instancetype)init _amount = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -5059,6 +5278,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.mode = self.mode; other.amount = self.amount; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -5123,6 +5343,7 @@ - (instancetype)init _transitions = [NSArray array]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -5136,6 +5357,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.modeForSequence = self.modeForSequence; other.transitions = self.transitions; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -5158,6 +5380,7 @@ - (instancetype)init _modeToReturn = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -5169,6 +5392,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.daysToReturn = self.daysToReturn; other.modeToReturn = self.modeToReturn; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -5186,6 +5410,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -5195,6 +5420,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRThermostatClusterClearWeeklyScheduleParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -5221,6 +5447,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -5235,6 +5462,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -5261,6 +5489,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -5274,6 +5503,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -5301,6 +5531,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -5315,6 +5546,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -5341,6 +5573,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -5354,6 +5587,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -5380,6 +5614,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -5393,6 +5628,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -5420,6 +5656,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -5434,6 +5671,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -5462,6 +5700,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -5476,6 +5715,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -5504,6 +5744,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -5518,6 +5759,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -5544,6 +5786,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -5557,6 +5800,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -5584,6 +5828,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -5598,6 +5843,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -5624,6 +5870,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -5637,6 +5884,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -5678,6 +5926,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -5692,6 +5941,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -5718,6 +5968,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -5731,6 +5982,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -5758,6 +6010,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -5772,6 +6025,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -5800,6 +6054,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -5814,6 +6069,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -5846,6 +6102,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -5862,6 +6119,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -5885,6 +6143,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -5896,6 +6155,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -5925,6 +6185,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -5940,6 +6201,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -5974,6 +6236,7 @@ - (instancetype)init _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -5990,6 +6253,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -6012,6 +6276,7 @@ - (instancetype)init _match = @""; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -6022,6 +6287,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.match = self.match; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -6074,6 +6340,7 @@ - (instancetype)init _minorNumber = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -6085,6 +6352,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.majorNumber = self.majorNumber; other.minorNumber = self.minorNumber; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -6104,6 +6372,7 @@ - (instancetype)init _count = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -6114,6 +6383,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.count = self.count; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -6134,6 +6404,7 @@ - (instancetype)init _data = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -6145,6 +6416,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.target = self.target; other.data = self.data; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -6194,6 +6466,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -6203,6 +6476,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRMediaPlaybackClusterPlayParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -6219,6 +6493,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -6228,6 +6503,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRMediaPlaybackClusterPauseParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -6244,6 +6520,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -6253,6 +6530,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRMediaPlaybackClusterStopPlaybackParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -6269,6 +6547,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -6278,6 +6557,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRMediaPlaybackClusterStartOverParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -6294,6 +6574,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -6303,6 +6584,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRMediaPlaybackClusterPreviousParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -6319,6 +6601,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -6328,6 +6611,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRMediaPlaybackClusterNextParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -6344,6 +6628,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -6353,6 +6638,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRMediaPlaybackClusterRewindParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -6369,6 +6655,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -6378,6 +6665,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRMediaPlaybackClusterFastForwardParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -6396,6 +6684,7 @@ - (instancetype)init _deltaPositionMilliseconds = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -6406,6 +6695,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.deltaPositionMilliseconds = self.deltaPositionMilliseconds; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -6425,6 +6715,7 @@ - (instancetype)init _deltaPositionMilliseconds = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -6435,6 +6726,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.deltaPositionMilliseconds = self.deltaPositionMilliseconds; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -6486,6 +6778,7 @@ - (instancetype)init _position = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -6496,6 +6789,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.position = self.position; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -6514,6 +6808,7 @@ - (instancetype)init _index = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -6524,6 +6819,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.index = self.index; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -6540,6 +6836,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -6549,6 +6846,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRMediaInputClusterShowInputStatusParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -6565,6 +6863,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -6574,6 +6873,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRMediaInputClusterHideInputStatusParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -6594,6 +6894,7 @@ - (instancetype)init _name = @""; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -6605,6 +6906,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.index = self.index; other.name = self.name; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -6622,6 +6924,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -6631,6 +6934,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRLowPowerClusterSleepParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -6649,6 +6953,7 @@ - (instancetype)init _keyCode = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -6659,6 +6964,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.keyCode = self.keyCode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -6709,6 +7015,7 @@ - (instancetype)init _data = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -6721,6 +7028,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.autoPlay = self.autoPlay; other.data = self.data; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -6744,6 +7052,7 @@ - (instancetype)init _brandingInformation = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -6756,6 +7065,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.displayString = self.displayString; other.brandingInformation = self.brandingInformation; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -6807,6 +7117,7 @@ - (instancetype)init _index = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -6817,6 +7128,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.index = self.index; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -6837,6 +7149,7 @@ - (instancetype)init _name = @""; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -6848,6 +7161,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.index = self.index; other.name = self.name; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -6869,6 +7183,7 @@ - (instancetype)init _data = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -6880,6 +7195,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.application = self.application; other.data = self.data; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -6899,6 +7215,7 @@ - (instancetype)init _application = [MTRApplicationLauncherClusterApplication new]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -6909,6 +7226,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.application = self.application; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -6928,6 +7246,7 @@ - (instancetype)init _application = [MTRApplicationLauncherClusterApplication new]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -6938,6 +7257,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.application = self.application; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -6989,6 +7309,7 @@ - (instancetype)init _tempAccountIdentifier = @""; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -6999,6 +7320,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.tempAccountIdentifier = self.tempAccountIdentifier; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -7048,6 +7370,7 @@ - (instancetype)init _setupPIN = @""; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -7059,6 +7382,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.tempAccountIdentifier = self.tempAccountIdentifier; other.setupPIN = self.setupPIN; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -7076,6 +7400,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -7085,6 +7410,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRAccountLoginClusterLogoutParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -7140,6 +7466,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -7149,6 +7476,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRElectricalMeasurementClusterGetProfileInfoCommandParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -7217,6 +7545,7 @@ - (instancetype)init _numberOfIntervals = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -7229,6 +7558,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.startTime = self.startTime; other.numberOfIntervals = self.numberOfIntervals; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -7246,6 +7576,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -7255,6 +7586,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRUnitTestingClusterTestParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -7306,6 +7638,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -7315,6 +7648,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRUnitTestingClusterTestNotHandledParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -7366,6 +7700,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -7375,6 +7710,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRUnitTestingClusterTestSpecificParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -7426,6 +7762,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -7435,6 +7772,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRUnitTestingClusterTestUnknownCommandParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -7505,6 +7843,7 @@ - (instancetype)init _arg2 = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -7516,6 +7855,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.arg1 = self.arg1; other.arg2 = self.arg2; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -7569,6 +7909,7 @@ - (instancetype)init _arg1 = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -7579,6 +7920,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.arg1 = self.arg1; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -7645,6 +7987,7 @@ - (instancetype)init _arg6 = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -7660,6 +8003,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.arg5 = self.arg5; other.arg6 = self.arg6; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -7723,6 +8067,7 @@ - (instancetype)init _arg1 = [MTRUnitTestingClusterSimpleStruct new]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -7733,6 +8078,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.arg1 = self.arg1; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -7881,6 +8227,7 @@ - (instancetype)init _arg1 = [MTRUnitTestingClusterNestedStruct new]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -7891,6 +8238,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.arg1 = self.arg1; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -7943,6 +8291,7 @@ - (instancetype)init _arg1 = [NSArray array]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -7953,6 +8302,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.arg1 = self.arg1; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -8005,6 +8355,7 @@ - (instancetype)init _arg1 = [NSArray array]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -8015,6 +8366,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.arg1 = self.arg1; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -8067,6 +8419,7 @@ - (instancetype)init _arg1 = [MTRUnitTestingClusterNestedStructList new]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -8077,6 +8430,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.arg1 = self.arg1; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -8129,6 +8483,7 @@ - (instancetype)init _arg1 = [NSArray array]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -8139,6 +8494,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.arg1 = self.arg1; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -8160,6 +8516,7 @@ - (instancetype)init _arg1 = [NSArray array]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -8170,6 +8527,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.arg1 = self.arg1; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -8193,6 +8551,7 @@ - (instancetype)init _arg2 = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -8204,6 +8563,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.arg1 = self.arg1; other.arg2 = self.arg2; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -8226,6 +8586,7 @@ - (instancetype)init _arg1 = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -8236,6 +8597,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.arg1 = self.arg1; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -8279,6 +8641,7 @@ - (instancetype)init _nullableOptionalList = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -8300,6 +8663,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.optionalList = self.optionalList; other.nullableOptionalList = self.nullableOptionalList; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -8327,6 +8691,7 @@ - (instancetype)init _arg1 = [MTRUnitTestingClusterSimpleStruct new]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -8337,6 +8702,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.arg1 = self.arg1; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -8356,6 +8722,7 @@ - (instancetype)init { if (self = [super init]) { _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -8365,6 +8732,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRUnitTestingClusterTimedInvokeRequestParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -8386,6 +8754,7 @@ - (instancetype)init _arg1 = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -8396,6 +8765,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.arg1 = self.arg1; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -8421,6 +8791,7 @@ - (instancetype)init _arg3 = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -8433,6 +8804,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.arg2 = self.arg2; other.arg3 = self.arg3; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -8455,6 +8827,7 @@ - (instancetype)init _arg1 = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -8465,6 +8838,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.arg1 = self.arg1; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -8494,6 +8868,7 @@ - (instancetype)init _takeMutex = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -8508,6 +8883,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.numCallsToFail = self.numCallsToFail; other.takeMutex = self.takeMutex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; } @@ -8532,6 +8908,7 @@ - (instancetype)init _percentage = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeoutMs = nil; } return self; } @@ -8544,6 +8921,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.id = self.id; other.percentage = self.percentage; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeoutMs = self.serverSideProcessingTimeoutMs; return other; }