diff --git a/examples/chip-tool/commands/clusters/ModelCommand.h b/examples/chip-tool/commands/clusters/ModelCommand.h index c99bade1633101..b85adb2e9e552e 100644 --- a/examples/chip-tool/commands/clusters/ModelCommand.h +++ b/examples/chip-tool/commands/clusters/ModelCommand.h @@ -38,6 +38,7 @@ class ModelCommand : public CHIPCommand { AddArgument("node-id", 0, UINT64_MAX, &mNodeId); AddArgument("endpoint-id", CHIP_ZCL_ENDPOINT_MIN, CHIP_ZCL_ENDPOINT_MAX, &mEndPointId); + AddArgument("timedInteractionTimeoutMs", 0, UINT16_MAX, &mTimedInteractionTimeoutMs); } /////////// CHIPCommand Interface ///////// @@ -46,6 +47,9 @@ class ModelCommand : public CHIPCommand virtual CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endPointId) = 0; +protected: + chip::Optional mTimedInteractionTimeoutMs; + private: chip::NodeId mNodeId; uint8_t mEndPointId; diff --git a/examples/chip-tool/commands/common/CommandInvoker.h b/examples/chip-tool/commands/common/CommandInvoker.h index 3f7f12f276df80..6583cc9124280e 100644 --- a/examples/chip-tool/commands/common/CommandInvoker.h +++ b/examples/chip-tool/commands/common/CommandInvoker.h @@ -23,6 +23,7 @@ #include #include #include +#include namespace chip { namespace Controller { @@ -84,14 +85,16 @@ class CommandInvoker final : public ResponseReceiver(aContext, aOnSuccess, aOnError); } - CHIP_ERROR InvokeCommand(DeviceProxy * aDevice, EndpointId aEndpoint, const RequestType & aRequestData) + CHIP_ERROR InvokeCommand(DeviceProxy * aDevice, EndpointId aEndpoint, const RequestType & aRequestData, + const Optional & aTimedInvokeTimeoutMs) { app::CommandPathParams commandPath = { aEndpoint, 0 /* groupId */, RequestType::GetClusterId(), RequestType::GetCommandId(), (app::CommandPathFlags::kEndpointIdValid) }; - auto commandSender = Platform::MakeUnique(this, aDevice->GetExchangeManager()); + auto commandSender = + Platform::MakeUnique(this, aDevice->GetExchangeManager(), aTimedInvokeTimeoutMs.HasValue()); VerifyOrReturnError(commandSender != nullptr, CHIP_ERROR_NO_MEMORY); - ReturnErrorOnFailure(commandSender->AddRequestData(commandPath, aRequestData)); + ReturnErrorOnFailure(commandSender->AddRequestDataNoTimedCheck(commandPath, aRequestData, aTimedInvokeTimeoutMs)); ReturnErrorOnFailure(commandSender->SendCommandRequest(aDevice->GetSecureSession().Value())); commandSender.release(); return CHIP_NO_ERROR; @@ -185,16 +188,36 @@ template CHIP_ERROR InvokeCommand(DeviceProxy * aDevice, void * aContext, typename detail::CommandInvoker::SuccessCallback aSuccessCallback, typename detail::CommandInvoker::FailureCallback aFailureCallback, EndpointId aEndpoint, - const RequestType & aRequestData) + const RequestType & aRequestData, const Optional & aTimedInvokeTimeoutMs) { auto invoker = detail::CommandInvoker::Alloc(aContext, aSuccessCallback, aFailureCallback); VerifyOrReturnError(invoker != nullptr, CHIP_ERROR_NO_MEMORY); - ReturnErrorOnFailure(invoker->InvokeCommand(aDevice, aEndpoint, aRequestData)); + ReturnErrorOnFailure(invoker->InvokeCommand(aDevice, aEndpoint, aRequestData, aTimedInvokeTimeoutMs)); invoker.release(); return CHIP_NO_ERROR; } template +CHIP_ERROR InvokeCommand(DeviceProxy * aDevice, void * aContext, + typename detail::CommandInvoker::SuccessCallback aSuccessCallback, + typename detail::CommandInvoker::FailureCallback aFailureCallback, EndpointId aEndpoint, + const RequestType & aRequestData, uint16_t aTimedInvokeTimeoutMs) +{ + return InvokeCommand(aDevice, aContext, aSuccessCallback, aFailureCallback, aEndpoint, aRequestData, + MakeOptional(aTimedInvokeTimeoutMs)); +} + +template = 0> +CHIP_ERROR InvokeCommand(DeviceProxy * aDevice, void * aContext, + typename detail::CommandInvoker::SuccessCallback aSuccessCallback, + typename detail::CommandInvoker::FailureCallback aFailureCallback, EndpointId aEndpoint, + const RequestType & aRequestData) +{ + return InvokeCommand(aDevice, aContext, aSuccessCallback, aFailureCallback, aEndpoint, aRequestData, NullOptional); +} + +// Group commands can't do timed invoke in a meaningful way. +template = 0> CHIP_ERROR InvokeGroupCommand(DeviceProxy * aDevice, void * aContext, typename detail::CommandInvoker::SuccessCallback aSuccessCallback, typename detail::CommandInvoker::FailureCallback aFailureCallback, GroupId groupId, diff --git a/examples/chip-tool/include/CHIPProjectAppConfig.h b/examples/chip-tool/include/CHIPProjectAppConfig.h index 72a5e43927a75d..81010d4cacffad 100644 --- a/examples/chip-tool/include/CHIPProjectAppConfig.h +++ b/examples/chip-tool/include/CHIPProjectAppConfig.h @@ -70,4 +70,7 @@ #define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY 1 +// Enable some test-only interaction model APIs. +#define CONFIG_IM_BUILD_FOR_UNIT_TEST 1 + #endif /* CHIPPROJECTCONFIG_H */ diff --git a/examples/chip-tool/templates/commands.zapt b/examples/chip-tool/templates/commands.zapt index 8902634914b524..70c2a81b73eab6 100644 --- a/examples/chip-tool/templates/commands.zapt +++ b/examples/chip-tool/templates/commands.zapt @@ -445,7 +445,7 @@ public: {{/if}} {{/chip_cluster_command_non_expanded_arguments}} - return chip::Controller::InvokeCommand(device, this, {{#if hasSpecificResponse}}On{{asUpperCamelCase parent.name}}{{asUpperCamelCase response.name}}Success{{else}}OnDefaultSuccess{{/if}}, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, {{#if hasSpecificResponse}}On{{asUpperCamelCase parent.name}}{{asUpperCamelCase response.name}}Success{{else}}OnDefaultSuccess{{/if}}, OnDefaultFailure, endpointId, mRequest, mTimedInteractionTimeoutMs); } private: diff --git a/examples/chip-tool/templates/partials/test_cluster.zapt b/examples/chip-tool/templates/partials/test_cluster.zapt index b20aaf5f662de2..984a57f680bb74 100644 --- a/examples/chip-tool/templates/partials/test_cluster.zapt +++ b/examples/chip-tool/templates/partials/test_cluster.zapt @@ -196,7 +196,24 @@ class {{filename}}: public TestCommand (static_cast<{{filename}} *>(context))->OnFailureResponse_{{index}}(status); }; - ReturnErrorOnFailure(chip::Controller::{{#if isGroupCommand}}InvokeGroupCommand{{else}}InvokeCommand{{/if}}({{>device}}, this, success, failure, {{#if isGroupCommand}}groupId{{else}}endpoint{{/if}}, request)); + ReturnErrorOnFailure(chip::Controller::{{#if isGroupCommand}}InvokeGroupCommand{{else}}InvokeCommand{{/if}}({{>device}}, this, success, failure, + {{#if isGroupCommand}}groupId{{else}}endpoint{{/if}}, + request + {{#if timedInteractionTimeoutMs}} + , {{timedInteractionTimeoutMs}} + {{else if commandObject.mustUseTimedInvoke}} + , chip::NullOptional + {{/if}} + )); + {{#if busyWaitMs}} + { + using namespace chip::System::Clock::Literals; + // Busy-wait for {{busyWaitMs}} milliseconds. + auto & clock = chip::System::SystemClock(); + auto start = clock.GetMonotonicTimestamp(); + while (clock.GetMonotonicTimestamp() - start < {{busyWaitMs}}_ms); + } + {{/if}} {{#unless async}}return CHIP_NO_ERROR;{{/unless}} {{else}} chip::Controller::{{asUpperCamelCase cluster}}ClusterTest cluster; diff --git a/examples/chip-tool/templates/tests-commands.zapt b/examples/chip-tool/templates/tests-commands.zapt index b517d1d2928760..27e6ac1ea84b28 100644 --- a/examples/chip-tool/templates/tests-commands.zapt +++ b/examples/chip-tool/templates/tests-commands.zapt @@ -4,6 +4,9 @@ #include #include +#include +#include + #include // For INFINITY class TestList : public Command diff --git a/src/app/Command.cpp b/src/app/Command.cpp index 22f7198477c68e..1d9d14d68dac6d 100644 --- a/src/app/Command.cpp +++ b/src/app/Command.cpp @@ -106,9 +106,15 @@ const char * Command::GetStateStr() const case CommandState::AddedCommand: return "AddedCommand"; + case CommandState::AwaitingTimedStatus: + return "AwaitingTimedStatus"; + case CommandState::CommandSent: return "CommandSent"; + case CommandState::ResponseReceived: + return "ResponseReceived"; + case CommandState::AwaitingDestruction: return "AwaitingDestruction"; } diff --git a/src/app/Command.h b/src/app/Command.h index 5e8cb64b62f0c8..4e3a698d910f17 100644 --- a/src/app/Command.h +++ b/src/app/Command.h @@ -50,7 +50,9 @@ class Command Idle, ///< Default state that the object starts out in, where no work has commenced AddingCommand, ///< In the process of adding a command. AddedCommand, ///< A command has been completely encoded and is awaiting transmission. + AwaitingTimedStatus, ///< Sent a Timed Request and waiting for response. CommandSent, ///< The command has been sent successfully. + ResponseReceived, ///< Received a response to our invoke and request and processing the response. AwaitingDestruction, ///< The object has completed its work and is awaiting destruction by the application. }; diff --git a/src/app/CommandSender.cpp b/src/app/CommandSender.cpp index e7eaaaeeb6609e..fa6a2e5bf9000e 100644 --- a/src/app/CommandSender.cpp +++ b/src/app/CommandSender.cpp @@ -27,14 +27,15 @@ #include "CommandHandler.h" #include "InteractionModelEngine.h" #include "StatusResponse.h" +#include #include #include namespace chip { namespace app { -CommandSender::CommandSender(Callback * apCallback, Messaging::ExchangeManager * apExchangeMgr) : - mpCallback(apCallback), mpExchangeMgr(apExchangeMgr), mSuppressResponse(false), mTimedRequest(false) +CommandSender::CommandSender(Callback * apCallback, Messaging::ExchangeManager * apExchangeMgr, bool aIsTimedRequest) : + mpCallback(apCallback), mpExchangeMgr(apExchangeMgr), mSuppressResponse(false), mTimedRequest(aIsTimedRequest) {} CHIP_ERROR CommandSender::AllocateBuffer() @@ -64,36 +65,56 @@ CHIP_ERROR CommandSender::AllocateBuffer() CHIP_ERROR CommandSender::SendCommandRequest(SessionHandle session, System::Clock::Timeout timeout) { - CHIP_ERROR err = CHIP_NO_ERROR; - System::PacketBufferHandle commandPacket; - - VerifyOrExit(mState == CommandState::AddedCommand, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mState == CommandState::AddedCommand, CHIP_ERROR_INCORRECT_STATE); - err = Finalize(commandPacket); - SuccessOrExit(err); + ReturnErrorOnFailure(Finalize(mPendingInvokeData)); // Create a new exchange context. mpExchangeCtx = mpExchangeMgr->NewContext(session, this); - VerifyOrExit(mpExchangeCtx != nullptr, err = CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(mpExchangeCtx != nullptr, CHIP_ERROR_NO_MEMORY); mpExchangeCtx->SetResponseTimeout(timeout); - err = mpExchangeCtx->SendMessage(Protocols::InteractionModel::MsgType::InvokeCommandRequest, std::move(commandPacket), - Messaging::SendFlags(Messaging::SendMessageFlags::kExpectResponse)); - SuccessOrExit(err); + if (mTimedInvokeTimeoutMs.HasValue()) + { + return SendTimedRequest(mTimedInvokeTimeoutMs.Value()); + } + + return SendInvokeRequest(); +} + +CHIP_ERROR CommandSender::SendInvokeRequest() +{ + using namespace Protocols::InteractionModel; + using namespace Messaging; + ReturnErrorOnFailure(mpExchangeCtx->SendMessage(MsgType::InvokeCommandRequest, std::move(mPendingInvokeData), + SendMessageFlags::kExpectResponse)); MoveToState(CommandState::CommandSent); -exit: - return err; + return CHIP_NO_ERROR; } CHIP_ERROR CommandSender::OnMessageReceived(Messaging::ExchangeContext * apExchangeContext, const PayloadHeader & aPayloadHeader, System::PacketBufferHandle && aPayload) { + if (mState == CommandState::CommandSent) + { + MoveToState(CommandState::ResponseReceived); + } + CHIP_ERROR err = CHIP_NO_ERROR; StatusIB status(Protocols::InteractionModel::Status::Failure); VerifyOrExit(apExchangeContext == mpExchangeCtx, err = CHIP_ERROR_INCORRECT_STATE); + + if (mState == CommandState::AwaitingTimedStatus) + { + err = HandleTimedStatus(aPayloadHeader, std::move(aPayload), status); + // Skip all other processing here (which is for the response to the + // invoke request), no matter whether err is success or not. + goto exit; + } + if (aPayloadHeader.HasMessageType(Protocols::InteractionModel::MsgType::InvokeCommandResponse)) { err = ProcessInvokeResponse(std::move(aPayload)); @@ -119,7 +140,11 @@ CHIP_ERROR CommandSender::OnMessageReceived(Messaging::ExchangeContext * apExcha } } - Close(); + if (mState != CommandState::CommandSent) + { + Close(); + } + // Else we got a response to a Timed Request and just send the invoke. return err; } @@ -330,5 +355,62 @@ TLV::TLVWriter * CommandSender::GetCommandDataIBTLVWriter() } } +CHIP_ERROR CommandSender::SendTimedRequest(uint16_t aTimeoutMs) +{ + using namespace Protocols::InteractionModel; + using namespace Messaging; + + // The payload is an anonymous struct (2 bytes) containing a single + // 16-bit integer with a context tag (1 control byte, 1 byte tag, at + // most 2 bytes for the integer). Use MessagePacketBuffer::New to + // account for other message-global overheads (MIC, etc). + System::PacketBufferHandle payload = MessagePacketBuffer::New(6); + VerifyOrReturnError(!payload.IsNull(), CHIP_ERROR_NO_MEMORY); + + System::PacketBufferTLVWriter writer; + writer.Init(std::move(payload)); + + TimedRequestMessage::Builder builder; + ReturnErrorOnFailure(builder.Init(&writer)); + + builder.TimeoutMs(aTimeoutMs); + ReturnErrorOnFailure(builder.GetError()); + + ReturnErrorOnFailure(writer.Finalize(&payload)); + + ReturnErrorOnFailure(mpExchangeCtx->SendMessage(MsgType::TimedRequest, std::move(payload), SendMessageFlags::kExpectResponse)); + MoveToState(CommandState::AwaitingTimedStatus); + return CHIP_NO_ERROR; +} + +CHIP_ERROR CommandSender::HandleTimedStatus(const PayloadHeader & aPayloadHeader, System::PacketBufferHandle && aPayload, + StatusIB & aStatusIB) +{ + using namespace Protocols::InteractionModel; + + VerifyOrReturnError(aPayloadHeader.HasMessageType(MsgType::StatusResponse), CHIP_ERROR_INVALID_MESSAGE_TYPE); + + ReturnErrorOnFailure(StatusResponse::ProcessStatusResponse(std::move(aPayload), aStatusIB)); + + VerifyOrReturnError(aStatusIB.mStatus == Status::Success, CHIP_ERROR_IM_STATUS_CODE_RECEIVED); + + return SendInvokeRequest(); +} + +CHIP_ERROR CommandSender::FinishCommand(const Optional & aTimedInvokeTimeoutMs) +{ + ReturnErrorOnFailure(FinishCommand(/* aEndDataStruct = */ false)); + if (!mTimedInvokeTimeoutMs.HasValue()) + { + mTimedInvokeTimeoutMs = aTimedInvokeTimeoutMs; + } + else if (aTimedInvokeTimeoutMs.HasValue()) + { + uint16_t newValue = std::min(mTimedInvokeTimeoutMs.Value(), aTimedInvokeTimeoutMs.Value()); + mTimedInvokeTimeoutMs.SetValue(newValue); + } + return CHIP_NO_ERROR; +} + } // namespace app } // namespace chip diff --git a/src/app/CommandSender.h b/src/app/CommandSender.h index ef52837c19ac06..b017d6ddf2993b 100644 --- a/src/app/CommandSender.h +++ b/src/app/CommandSender.h @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -116,7 +117,7 @@ class CommandSender final : public Command, public Messaging::ExchangeDelegate * * The callback passed in has to outlive this CommandSender object. */ - CommandSender(Callback * apCallback, Messaging::ExchangeManager * apExchangeMgr); + CommandSender(Callback * apCallback, Messaging::ExchangeManager * apExchangeMgr, bool aIsTimedRequest = false); CHIP_ERROR PrepareCommand(const CommandPathParams & aCommandPathParams, bool aStartDataStruct = true); CHIP_ERROR FinishCommand(bool aEndDataStruct = true); TLV::TLVWriter * GetCommandDataIBTLVWriter(); @@ -129,16 +130,53 @@ class CommandSender final : public Command, public Messaging::ExchangeDelegate * @param [in] aCommandPath The path of the command being requested. * @param [in] aData The data for the request. */ - template + template = 0> CHIP_ERROR AddRequestData(const CommandPathParams & aCommandPath, const CommandDataT & aData) + { + return AddRequestData(aCommandPath, aData, NullOptional); + } + + /** + * API for adding a data request that allows caller to provide a timed + * invoke timeout. If provided, this invoke will be a timed invoke, using + * the minimum of the provided timeouts. + */ + template + CHIP_ERROR AddRequestData(const CommandPathParams & aCommandPath, const CommandDataT & aData, + const Optional & aTimedInvokeTimeoutMs) + { + VerifyOrReturnError(!CommandDataT::MustUseTimedInvoke() || aTimedInvokeTimeoutMs.HasValue(), CHIP_ERROR_INVALID_ARGUMENT); + + return AddRequestDataInternal(aCommandPath, aData, aTimedInvokeTimeoutMs); + } + +#if CONFIG_IM_BUILD_FOR_UNIT_TEST + /** + * Version of AddRequestData that allows sending a message that is + * guaranteed to fail due to requiring a timed invoke but not providing a + * timeout parameter. For use in tests only. + */ + template + CHIP_ERROR AddRequestDataNoTimedCheck(const CommandPathParams & aCommandPath, const CommandDataT & aData, + const Optional & aTimedInvokeTimeoutMs) + { + return AddRequestDataInternal(aCommandPath, aData, aTimedInvokeTimeoutMs); + } +#endif // CONFIG_IM_BUILD_FOR_UNIT_TEST + +private: + template + CHIP_ERROR AddRequestDataInternal(const CommandPathParams & aCommandPath, const CommandDataT & aData, + const Optional & aTimedInvokeTimeoutMs) { ReturnErrorOnFailure(PrepareCommand(aCommandPath, /* aStartDataStruct = */ false)); TLV::TLVWriter * writer = GetCommandDataIBTLVWriter(); VerifyOrReturnError(writer != nullptr, CHIP_ERROR_INCORRECT_STATE); ReturnErrorOnFailure(DataModel::Encode(*writer, TLV::ContextTag(to_underlying(CommandDataIB::Tag::kData)), aData)); - return FinishCommand(/* aEndDataStruct = */ false); + return FinishCommand(aTimedInvokeTimeoutMs); } +public: // Sends a queued up command request to the target encapsulated by the secureSession handle. // // Upon successful return from this call, all subsequent errors that occur during this interaction @@ -185,9 +223,35 @@ class CommandSender final : public Command, public Messaging::ExchangeDelegate CHIP_ERROR ProcessInvokeResponse(System::PacketBufferHandle && payload); CHIP_ERROR ProcessInvokeResponseIB(InvokeResponseIB::Parser & aInvokeResponse); + // SendTimedRequest expects to be called after the exchange has already been + // created and we know for sure we need to do a timed invoke. + CHIP_ERROR SendTimedRequest(uint16_t aTimeoutMs); + + // Handle a message received when we are expecting a status response to a + // Timed Request. The caller is assumed to have already checked that our + // exchange context member is the one the message came in on. + // + // aStatusIB will be populated with the returned status if we can parse it + // successfully. + CHIP_ERROR HandleTimedStatus(const PayloadHeader & aPayloadHeader, System::PacketBufferHandle && aPayload, + StatusIB & aStatusIB); + + // Send our queued-up Invoke Request message. Assumes the exchange is ready + // and mPendingInvokeData is populated. + CHIP_ERROR SendInvokeRequest(); + + CHIP_ERROR FinishCommand(const Optional & aTimedInvokeTimeoutMs); + Callback * mpCallback = nullptr; Messaging::ExchangeManager * mpExchangeMgr = nullptr; InvokeRequestMessage::Builder mInvokeRequestBuilder; + // TODO Maybe we should change PacketBufferTLVWriter so we can finalize it + // but have it hold on to the buffer, and get the buffer from it later. + // Then we could avoid this extra pointer-sized member. + System::PacketBufferHandle mPendingInvokeData; + // If mTimedInvokeTimeoutMs has a value, we are expected to do a timed + // invoke. + Optional mTimedInvokeTimeoutMs; TLV::TLVType mDataElementContainerType = TLV::kTLVType_NotSpecified; bool mSuppressResponse = false; bool mTimedRequest = false; diff --git a/src/app/TimedHandler.cpp b/src/app/TimedHandler.cpp index 52400bce8feb71..24281e8a67de62 100644 --- a/src/app/TimedHandler.cpp +++ b/src/app/TimedHandler.cpp @@ -61,7 +61,11 @@ CHIP_ERROR TimedHandler::OnMessageReceived(Messaging::ExchangeContext * aExchang if (mState == State::kExpectingFollowingAction) { - if (System::SystemClock().GetMonotonicTimestamp() > mTimeLimit) + System::Clock::Timestamp now = System::SystemClock().GetMonotonicTimestamp(); + ChipLogDetail(DataManagement, + "Timed following action arrived at 0x" ChipLogFormatX64 ": handler %p exchange " ChipLogFormatExchange, + ChipLogValueX64(now.count()), this, ChipLogValueExchange(aExchangeContext)); + if (now > mTimeLimit) { // Time is up. Spec says to send UNSUPPORTED_ACCESS. ChipLogError(DataManagement, "Timeout expired: handler %p exchange " ChipLogFormatExchange, this, @@ -135,6 +139,8 @@ CHIP_ERROR TimedHandler::HandleTimedRequestAction(Messaging::ExchangeContext * a // Now just wait for the client. mState = State::kExpectingFollowingAction; mTimeLimit = System::SystemClock().GetMonotonicTimestamp() + delay; + ChipLogDetail(DataManagement, "Timed Request time limit 0x" ChipLogFormatX64 ": handler %p exchange " ChipLogFormatExchange, + ChipLogValueX64(mTimeLimit.count()), this, ChipLogValueExchange(aExchangeContext)); return CHIP_NO_ERROR; } diff --git a/src/app/tests/suites/TestCluster.yaml b/src/app/tests/suites/TestCluster.yaml index bdd9fe265f8e63..86d211583b65ce 100644 --- a/src/app/tests/suites/TestCluster.yaml +++ b/src/app/tests/suites/TestCluster.yaml @@ -982,6 +982,7 @@ tests: value: 20003 - name: "arg2" value: 101 + # Tests for Struct - label: "Send Test Command With Struct Argument and arg1.b is true" diff --git a/src/app/tests/suites/TestClusterComplexTypes.yaml b/src/app/tests/suites/TestClusterComplexTypes.yaml index 31afc12ba94677..1118f8b8f51204 100644 --- a/src/app/tests/suites/TestClusterComplexTypes.yaml +++ b/src/app/tests/suites/TestClusterComplexTypes.yaml @@ -42,3 +42,45 @@ tests: value: true - name: "originalValue" value: null + + # The timed invoke tests are not in TestCluster.yaml for now because Darwin + # SDK APIs have not been updated to do timed invoke properly yet. + + - label: "Send command that needs timed invoke without a timeout value" + command: "timedInvokeRequest" + response: + # No timed interaction timeout provided, so not doing a timed interaction. + error: NEEDS_TIMED_INTERACTION + + - label: "Send command that needs timed invoke with a long timeout value" + # Expecting a success response here. + command: "timedInvokeRequest" + timedInteractionTimeoutMs: 10000 + + - label: + "Send command that needs timed invoke with a too-short timeout value" + command: "timedInvokeRequest" + timedInteractionTimeoutMs: 1 + # Try to ensure that we are unresponsive for long enough that the timeout + # expires. + busyWaitMs: 5 + response: + error: UNSUPPORTED_ACCESS + + - label: + "Send command that does not need timed invoke with a long timeout + value" + # Expecting a success response here. + command: "test" + timedInteractionTimeoutMs: 10000 + + - label: + "Send command that does not need timed invoke with a too-short timeout + value" + command: "test" + timedInteractionTimeoutMs: 1 + # Try to ensure that we are unresponsive for long enough that the timeout + # expires. + busyWaitMs: 5 + response: + error: UNSUPPORTED_ACCESS diff --git a/src/controller/CHIPCluster.h b/src/controller/CHIPCluster.h index 2c6d3786b7b6fd..4a3aed96dd8834 100644 --- a/src/controller/CHIPCluster.h +++ b/src/controller/CHIPCluster.h @@ -32,6 +32,7 @@ #include #include #include +#include namespace chip { namespace Controller { @@ -68,7 +69,7 @@ class DLL_EXPORT ClusterBase template CHIP_ERROR InvokeCommand(const RequestDataT & requestData, void * context, CommandResponseSuccessCallback successCb, - CommandResponseFailureCallback failureCb) + CommandResponseFailureCallback failureCb, const Optional & timedInvokeTimeoutMs) { VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); @@ -82,8 +83,24 @@ class DLL_EXPORT ClusterBase }; return InvokeCommandRequest(mDevice->GetExchangeManager(), mDevice->GetSecureSession().Value(), mEndpoint, requestData, - onSuccessCb, onFailureCb); - }; + onSuccessCb, onFailureCb, timedInvokeTimeoutMs); + } + + template + CHIP_ERROR InvokeCommand(const RequestDataT & requestData, void * context, + CommandResponseSuccessCallback successCb, + CommandResponseFailureCallback failureCb, uint16_t timedInvokeTimeoutMs) + { + return InvokeCommand(requestData, context, successCb, failureCb, MakeOptional(timedInvokeTimeoutMs)); + } + + template = 0> + CHIP_ERROR InvokeCommand(const RequestDataT & requestData, void * context, + CommandResponseSuccessCallback successCb, + CommandResponseFailureCallback failureCb) + { + return InvokeCommand(requestData, context, successCb, failureCb, NullOptional); + } /** * Functions for writing attributes. We have lots of different diff --git a/src/controller/InvokeInteraction.h b/src/controller/InvokeInteraction.h index eb96f7c0445f09..d24ad57c64e777 100644 --- a/src/controller/InvokeInteraction.h +++ b/src/controller/InvokeInteraction.h @@ -20,6 +20,7 @@ #include #include +#include namespace chip { namespace Controller { @@ -46,7 +47,8 @@ CHIP_ERROR InvokeCommandRequest(Messaging::ExchangeManager * aExchangeMgr, SessionHandle sessionHandle, chip::EndpointId endpointId, const RequestObjectT & requestCommandData, typename TypedCommandCallback::OnSuccessCallbackType onSuccessCb, - typename TypedCommandCallback::OnErrorCallbackType onErrorCb) + typename TypedCommandCallback::OnErrorCallbackType onErrorCb, + const Optional & timedInvokeTimeoutMs) { app::CommandPathParams commandPath = { endpointId, 0, RequestObjectT::GetClusterId(), RequestObjectT::GetCommandId(), (app::CommandPathFlags::kEndpointIdValid) }; @@ -68,10 +70,11 @@ InvokeCommandRequest(Messaging::ExchangeManager * aExchangeMgr, SessionHandle se decoder->SetOnDoneCallback(onDone); - auto commandSender = chip::Platform::MakeUnique(decoder.get(), aExchangeMgr); + auto commandSender = + chip::Platform::MakeUnique(decoder.get(), aExchangeMgr, timedInvokeTimeoutMs.HasValue()); VerifyOrReturnError(commandSender != nullptr, CHIP_ERROR_NO_MEMORY); - ReturnErrorOnFailure(commandSender->AddRequestData(commandPath, requestCommandData)); + ReturnErrorOnFailure(commandSender->AddRequestData(commandPath, requestCommandData, timedInvokeTimeoutMs)); ReturnErrorOnFailure(commandSender->SendCommandRequest(sessionHandle)); // @@ -86,5 +89,27 @@ InvokeCommandRequest(Messaging::ExchangeManager * aExchangeMgr, SessionHandle se return CHIP_NO_ERROR; } +template +CHIP_ERROR +InvokeCommandRequest(Messaging::ExchangeManager * exchangeMgr, SessionHandle sessionHandle, chip::EndpointId endpointId, + const RequestObjectT & requestCommandData, + typename TypedCommandCallback::OnSuccessCallbackType onSuccessCb, + typename TypedCommandCallback::OnErrorCallbackType onErrorCb, + uint16_t timedInvokeTimeoutMs) +{ + return InvokeCommandRequest(exchangeMgr, sessionHandle, endpointId, requestCommandData, onSuccessCb, onErrorCb, + timedInvokeTimeoutMs); +} + +template = 0> +CHIP_ERROR +InvokeCommandRequest(Messaging::ExchangeManager * exchangeMgr, SessionHandle sessionHandle, chip::EndpointId endpointId, + const RequestObjectT & requestCommandData, + typename TypedCommandCallback::OnSuccessCallbackType onSuccessCb, + typename TypedCommandCallback::OnErrorCallbackType onErrorCb) +{ + return InvokeCommandRequest(exchangeMgr, sessionHandle, endpointId, requestCommandData, onSuccessCb, onErrorCb, NullOptional); +} + } // namespace Controller } // namespace chip diff --git a/src/controller/java/templates/CHIPClusters-JNI.zapt b/src/controller/java/templates/CHIPClusters-JNI.zapt index 60463b0f244fb1..b82200a2a089c1 100644 --- a/src/controller/java/templates/CHIPClusters-JNI.zapt +++ b/src/controller/java/templates/CHIPClusters-JNI.zapt @@ -69,7 +69,12 @@ JNI_METHOD(void, {{asUpperCamelCase ../name}}Cluster, {{asLowerCamelCase name}}) auto successFn = chip::Callback::CallbackcallbackName}}CallbackType>::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall + {{#if mustUseTimedInvoke}} + {{!TODO Fix Java API to pass in this information. For now, 10 seconds.}} + , 10000 + {{/if}} + ); VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); diff --git a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp index 7b28d830baa41d..04008fe91673d2 100644 --- a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp @@ -24915,7 +24915,7 @@ JNI_METHOD(void, TestClusterCluster, timedInvokeRequest)(JNIEnv * env, jobject s auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, 10000); VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); diff --git a/src/darwin/Framework/CHIP/templates/CHIPClustersObjc-src.zapt b/src/darwin/Framework/CHIP/templates/CHIPClustersObjc-src.zapt index 9ffdade3e8569a..452eec55f3bd22 100644 --- a/src/darwin/Framework/CHIP/templates/CHIPClustersObjc-src.zapt +++ b/src/darwin/Framework/CHIP/templates/CHIPClustersObjc-src.zapt @@ -71,7 +71,12 @@ using namespace chip::app::Clusters; ^(Cancelable * success, Cancelable * failure) { auto successFn = CallbackcallbackName}}CallbackType>::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall + {{#if mustUseTimedInvoke}} + {{!TODO Fix Darwin API to pass in this information. For now, 10 seconds.}} + , 10000 + {{/if}} + ); }); } {{/chip_cluster_commands}} diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index f15d688998acdc..669c77ceaa2cc0 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -16999,7 +16999,7 @@ new CHIPCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, 10000); }); } diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 3356369d364e7c..0ea4a7775f0314 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -4170,7 +4170,7 @@ class AccountLoginGetSetupPIN : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x0000050E) command (0x00000000) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnAccountLoginGetSetupPINResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -4194,7 +4194,8 @@ class AccountLoginLogin : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050E) command (0x00000001) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -4315,7 +4316,8 @@ class AdministratorCommissioningOpenBasicCommissioningWindow : public ModelComma { ChipLogProgress(chipTool, "Sending cluster (0x0000003C) command (0x00000001) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -4343,7 +4345,8 @@ class AdministratorCommissioningOpenCommissioningWindow : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000003C) command (0x00000000) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -4362,7 +4365,8 @@ class AdministratorCommissioningRevokeCommissioning : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000003C) command (0x00000002) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -4489,7 +4493,8 @@ class ApplicationBasicChangeStatus : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050D) command (0x00000000) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -5217,7 +5222,7 @@ class ApplicationLauncherLaunchApp : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x0000050C) command (0x00000000) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnApplicationLauncherLaunchAppResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -5547,7 +5552,8 @@ class AudioOutputRenameOutput : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050B) command (0x00000001) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -5570,7 +5576,8 @@ class AudioOutputSelectOutput : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050B) command (0x00000000) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -5816,7 +5823,8 @@ class BarrierControlBarrierControlGoToPercent : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000103) command (0x00000000) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -5835,7 +5843,8 @@ class BarrierControlBarrierControlStop : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000103) command (0x00000001) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -6316,7 +6325,8 @@ class BasicMfgSpecificPing : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000028) command (0x00000000) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -8547,7 +8557,8 @@ class BindingBind : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000F000) command (0x00000000) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -8573,7 +8584,8 @@ class BindingUnbind : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000F000) command (0x00000001) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -8889,7 +8901,8 @@ class BridgedActionsDisableAction : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x0000000A) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -8914,7 +8927,8 @@ class BridgedActionsDisableActionWithDuration : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x0000000B) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -8938,7 +8952,8 @@ class BridgedActionsEnableAction : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000008) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -8963,7 +8978,8 @@ class BridgedActionsEnableActionWithDuration : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000009) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -8987,7 +9003,8 @@ class BridgedActionsInstantAction : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000000) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -9012,7 +9029,8 @@ class BridgedActionsInstantActionWithTransition : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000001) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -9036,7 +9054,8 @@ class BridgedActionsPauseAction : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000005) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -9061,7 +9080,8 @@ class BridgedActionsPauseActionWithDuration : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000006) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -9085,7 +9105,8 @@ class BridgedActionsResumeAction : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000007) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -9109,7 +9130,8 @@ class BridgedActionsStartAction : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000002) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -9134,7 +9156,8 @@ class BridgedActionsStartActionWithDuration : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000003) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -9158,7 +9181,8 @@ class BridgedActionsStopAction : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000004) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -10862,7 +10886,8 @@ class ColorControlColorLoopSet : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000044) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -10889,7 +10914,8 @@ class ColorControlEnhancedMoveHue : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000041) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -10917,7 +10943,8 @@ class ColorControlEnhancedMoveToHue : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000040) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -10944,7 +10971,8 @@ class ColorControlEnhancedMoveToHueAndSaturation : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000043) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -10972,7 +11000,8 @@ class ColorControlEnhancedStepHue : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000042) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -10998,7 +11027,8 @@ class ColorControlMoveColor : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000008) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -11027,7 +11057,8 @@ class ColorControlMoveColorTemperature : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000004B) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -11054,7 +11085,8 @@ class ColorControlMoveHue : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000001) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -11081,7 +11113,8 @@ class ColorControlMoveSaturation : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000004) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -11108,7 +11141,8 @@ class ColorControlMoveToColor : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000007) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -11134,7 +11168,8 @@ class ColorControlMoveToColorTemperature : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000000A) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -11162,7 +11197,8 @@ class ColorControlMoveToHue : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000000) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -11189,7 +11225,8 @@ class ColorControlMoveToHueAndSaturation : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000006) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -11215,7 +11252,8 @@ class ColorControlMoveToSaturation : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000003) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -11242,7 +11280,8 @@ class ColorControlStepColor : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000009) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -11272,7 +11311,8 @@ class ColorControlStepColorTemperature : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000004C) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -11300,7 +11340,8 @@ class ColorControlStepHue : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000002) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -11328,7 +11369,8 @@ class ColorControlStepSaturation : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000005) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -11352,7 +11394,8 @@ class ColorControlStopMoveStep : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000047) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -16401,7 +16444,7 @@ class ContentLauncherLaunchContent : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x0000050A) command (0x00000000) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnContentLauncherLaunchContentResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -16426,7 +16469,7 @@ class ContentLauncherLaunchURL : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x0000050A) command (0x00000001) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnContentLauncherLaunchURLResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -16854,7 +16897,7 @@ class DiagnosticLogsRetrieveLogsRequest : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000032) command (0x00000000) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnDiagnosticLogsRetrieveLogsResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -16909,7 +16952,7 @@ class DoorLockClearAllPins : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000008) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnDoorLockClearAllPinsResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -16929,7 +16972,7 @@ class DoorLockClearAllRfids : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000019) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnDoorLockClearAllRfidsResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -16953,7 +16996,7 @@ class DoorLockClearHolidaySchedule : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000013) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnDoorLockClearHolidayScheduleResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -16977,7 +17020,7 @@ class DoorLockClearPin : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000007) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnDoorLockClearPinResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -17001,7 +17044,7 @@ class DoorLockClearRfid : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000018) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnDoorLockClearRfidResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -17026,7 +17069,7 @@ class DoorLockClearWeekdaySchedule : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000D) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnDoorLockClearWeekdayScheduleResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -17051,7 +17094,7 @@ class DoorLockClearYeardaySchedule : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000010) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnDoorLockClearYeardayScheduleResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -17075,7 +17118,7 @@ class DoorLockGetHolidaySchedule : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000012) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnDoorLockGetHolidayScheduleResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -17099,7 +17142,7 @@ class DoorLockGetLogRecord : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000004) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnDoorLockGetLogRecordResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -17123,7 +17166,7 @@ class DoorLockGetPin : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000006) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnDoorLockGetPinResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -17147,7 +17190,7 @@ class DoorLockGetRfid : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000017) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnDoorLockGetRfidResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -17171,7 +17214,7 @@ class DoorLockGetUserType : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000015) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnDoorLockGetUserTypeResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -17196,7 +17239,7 @@ class DoorLockGetWeekdaySchedule : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000C) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnDoorLockGetWeekdayScheduleResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -17221,7 +17264,7 @@ class DoorLockGetYeardaySchedule : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000F) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnDoorLockGetYeardayScheduleResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -17245,7 +17288,7 @@ class DoorLockLockDoor : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000000) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnDoorLockLockDoorResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -17272,7 +17315,7 @@ class DoorLockSetHolidaySchedule : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000011) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnDoorLockSetHolidayScheduleResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -17301,7 +17344,7 @@ class DoorLockSetPin : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000005) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnDoorLockSetPinResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -17330,7 +17373,7 @@ class DoorLockSetRfid : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000016) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnDoorLockSetRfidResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -17356,7 +17399,7 @@ class DoorLockSetUserType : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000014) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnDoorLockSetUserTypeResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -17388,7 +17431,7 @@ class DoorLockSetWeekdaySchedule : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000B) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnDoorLockSetWeekdayScheduleResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -17415,7 +17458,7 @@ class DoorLockSetYeardaySchedule : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000E) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnDoorLockSetYeardayScheduleResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -17439,7 +17482,7 @@ class DoorLockUnlockDoor : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000001) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnDoorLockUnlockDoorResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -17464,7 +17507,7 @@ class DoorLockUnlockWithTimeout : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000003) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnDoorLockUnlockWithTimeoutResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -18899,7 +18942,8 @@ class EthernetNetworkDiagnosticsResetCounts : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000037) command (0x00000000) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -20408,7 +20452,7 @@ class GeneralCommissioningArmFailSafe : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000030) command (0x00000000) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnGeneralCommissioningArmFailSafeResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -20428,7 +20472,7 @@ class GeneralCommissioningCommissioningComplete : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000030) command (0x00000004) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnGeneralCommissioningCommissioningCompleteResponseSuccess, - OnDefaultFailure, endpointId, mRequest); + OnDefaultFailure, endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -20456,7 +20500,7 @@ class GeneralCommissioningSetRegulatoryConfig : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000030) command (0x00000002) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnGeneralCommissioningSetRegulatoryConfigResponseSuccess, - OnDefaultFailure, endpointId, mRequest); + OnDefaultFailure, endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -21560,7 +21604,7 @@ class GroupsAddGroup : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000000) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnGroupsAddGroupResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -21584,7 +21628,8 @@ class GroupsAddGroupIfIdentifying : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000005) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -21608,7 +21653,7 @@ class GroupsGetGroupMembership : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000002) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnGroupsGetGroupMembershipResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -21627,7 +21672,8 @@ class GroupsRemoveAllGroups : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000004) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -21651,7 +21697,7 @@ class GroupsRemoveGroup : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000003) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnGroupsRemoveGroupResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -21675,7 +21721,7 @@ class GroupsViewGroup : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000001) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnGroupsViewGroupResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -21884,7 +21930,8 @@ class IdentifyIdentify : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000003) command (0x00000000) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -21904,7 +21951,7 @@ class IdentifyIdentifyQuery : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000003) command (0x00000001) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnIdentifyIdentifyQueryResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -21930,7 +21977,8 @@ class IdentifyTriggerEffect : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000003) command (0x00000040) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -22786,7 +22834,7 @@ class KeypadInputSendKey : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000509) command (0x00000000) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnKeypadInputSendKeyResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -22930,7 +22978,8 @@ class LevelControlMove : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000001) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -22956,7 +23005,8 @@ class LevelControlMoveToLevel : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000000) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -22980,7 +23030,8 @@ class LevelControlMoveToLevelWithOnOff : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000004) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -23005,7 +23056,8 @@ class LevelControlMoveWithOnOff : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000005) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -23033,7 +23085,8 @@ class LevelControlStep : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000002) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -23059,7 +23112,8 @@ class LevelControlStepWithOnOff : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000006) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -23083,7 +23137,8 @@ class LevelControlStop : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000003) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -23102,7 +23157,8 @@ class LevelControlStopWithOnOff : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000007) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -24655,7 +24711,8 @@ class LowPowerSleep : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000508) command (0x00000000) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -24775,7 +24832,8 @@ class MediaInputHideInputStatus : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000002) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -24799,7 +24857,8 @@ class MediaInputRenameInput : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000003) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -24822,7 +24881,8 @@ class MediaInputSelectInput : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000000) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -24841,7 +24901,8 @@ class MediaInputShowInputStatus : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000001) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -25097,7 +25158,7 @@ class MediaPlaybackMediaFastForward : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000007) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnMediaPlaybackMediaFastForwardResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -25117,7 +25178,7 @@ class MediaPlaybackMediaNext : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000005) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnMediaPlaybackMediaNextResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -25137,7 +25198,7 @@ class MediaPlaybackMediaPause : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000001) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnMediaPlaybackMediaPauseResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -25157,7 +25218,7 @@ class MediaPlaybackMediaPlay : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000000) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnMediaPlaybackMediaPlayResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -25177,7 +25238,7 @@ class MediaPlaybackMediaPrevious : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000004) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnMediaPlaybackMediaPreviousResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -25197,7 +25258,7 @@ class MediaPlaybackMediaRewind : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000006) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnMediaPlaybackMediaRewindResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -25221,7 +25282,7 @@ class MediaPlaybackMediaSeek : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x0000000A) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnMediaPlaybackMediaSeekResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -25245,7 +25306,7 @@ class MediaPlaybackMediaSkipBackward : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000009) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnMediaPlaybackMediaSkipBackwardResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -25269,7 +25330,7 @@ class MediaPlaybackMediaSkipForward : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000008) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnMediaPlaybackMediaSkipForwardResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -25289,7 +25350,7 @@ class MediaPlaybackMediaStartOver : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000003) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnMediaPlaybackMediaStartOverResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -25309,7 +25370,7 @@ class MediaPlaybackMediaStop : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000002) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnMediaPlaybackMediaStopResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -26122,7 +26183,8 @@ class ModeSelectChangeToMode : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000050) command (0x00000000) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -26664,7 +26726,7 @@ class NetworkCommissioningAddThreadNetwork : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000006) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnNetworkCommissioningAddThreadNetworkResponseSuccess, - OnDefaultFailure, endpointId, mRequest); + OnDefaultFailure, endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -26691,7 +26753,7 @@ class NetworkCommissioningAddWiFiNetwork : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000002) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnNetworkCommissioningAddWiFiNetworkResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -26717,7 +26779,7 @@ class NetworkCommissioningDisableNetwork : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x0000000E) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnNetworkCommissioningDisableNetworkResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -26743,7 +26805,7 @@ class NetworkCommissioningEnableNetwork : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x0000000C) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnNetworkCommissioningEnableNetworkResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -26769,7 +26831,7 @@ class NetworkCommissioningRemoveNetwork : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x0000000A) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnNetworkCommissioningRemoveNetworkResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -26795,7 +26857,7 @@ class NetworkCommissioningScanNetworks : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000000) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnNetworkCommissioningScanNetworksResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -26821,7 +26883,7 @@ class NetworkCommissioningUpdateThreadNetwork : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000008) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnNetworkCommissioningUpdateThreadNetworkResponseSuccess, - OnDefaultFailure, endpointId, mRequest); + OnDefaultFailure, endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -26848,7 +26910,7 @@ class NetworkCommissioningUpdateWiFiNetwork : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000004) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnNetworkCommissioningUpdateWiFiNetworkResponseSuccess, - OnDefaultFailure, endpointId, mRequest); + OnDefaultFailure, endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -27057,7 +27119,7 @@ class OtaSoftwareUpdateProviderApplyUpdateRequest : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000029) command (0x00000001) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnOtaSoftwareUpdateProviderApplyUpdateResponseSuccess, - OnDefaultFailure, endpointId, mRequest); + OnDefaultFailure, endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -27081,7 +27143,8 @@ class OtaSoftwareUpdateProviderNotifyUpdateApplied : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000029) command (0x00000002) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -27112,7 +27175,7 @@ class OtaSoftwareUpdateProviderQueryImage : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000029) command (0x00000000) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnOtaSoftwareUpdateProviderQueryImageResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -27238,7 +27301,8 @@ class OtaSoftwareUpdateRequestorAnnounceOtaProvider : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000002A) command (0x00000000) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -27928,7 +27992,8 @@ class OnOffOff : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000000) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -27954,7 +28019,8 @@ class OnOffOffWithEffect : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000040) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -27973,7 +28039,8 @@ class OnOffOn : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000001) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -27992,7 +28059,8 @@ class OnOffOnWithRecallGlobalScene : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000041) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -28018,7 +28086,8 @@ class OnOffOnWithTimedOff : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000042) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -28037,7 +28106,8 @@ class OnOffToggle : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000002) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -29092,7 +29162,7 @@ class OperationalCredentialsAddNOC : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000006) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnOperationalCredentialsNOCResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -29115,7 +29185,8 @@ class OperationalCredentialsAddTrustedRootCertificate : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x0000000B) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -29139,7 +29210,7 @@ class OperationalCredentialsAttestationRequest : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000000) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnOperationalCredentialsAttestationResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -29163,7 +29234,7 @@ class OperationalCredentialsCertificateChainRequest : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000002) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnOperationalCredentialsCertificateChainResponseSuccess, - OnDefaultFailure, endpointId, mRequest); + OnDefaultFailure, endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -29187,7 +29258,7 @@ class OperationalCredentialsOpCSRRequest : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000004) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnOperationalCredentialsOpCSRResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -29211,7 +29282,7 @@ class OperationalCredentialsRemoveFabric : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x0000000A) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnOperationalCredentialsNOCResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -29234,7 +29305,8 @@ class OperationalCredentialsRemoveTrustedRootCertificate : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x0000000C) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -29258,7 +29330,7 @@ class OperationalCredentialsUpdateFabricLabel : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000009) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnOperationalCredentialsNOCResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -29283,7 +29355,7 @@ class OperationalCredentialsUpdateNOC : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000007) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnOperationalCredentialsNOCResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -33871,7 +33943,7 @@ class ScenesAddScene : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000000) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnScenesAddSceneResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -33895,7 +33967,7 @@ class ScenesGetSceneMembership : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000006) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnScenesGetSceneMembershipResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -33920,7 +33992,8 @@ class ScenesRecallScene : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000005) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -33944,7 +34017,7 @@ class ScenesRemoveAllScenes : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000003) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnScenesRemoveAllScenesResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -33969,7 +34042,7 @@ class ScenesRemoveScene : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000002) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnScenesRemoveSceneResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -33994,7 +34067,7 @@ class ScenesStoreScene : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000004) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnScenesStoreSceneResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -34019,7 +34092,7 @@ class ScenesViewScene : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000001) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnScenesViewSceneResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -34569,7 +34642,8 @@ class SoftwareDiagnosticsResetWatermarks : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000034) command (0x00000000) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -35466,7 +35540,7 @@ class TvChannelChangeChannel : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000000) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnTvChannelChangeChannelResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -35490,7 +35564,8 @@ class TvChannelChangeChannelByNumber : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000001) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -35513,7 +35588,8 @@ class TvChannelSkipChannel : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000002) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -35842,7 +35918,7 @@ class TargetNavigatorNavigateTarget : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x00000505) command (0x00000000) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnTargetNavigatorNavigateTargetResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -36533,7 +36609,7 @@ class TestClusterSimpleStructEchoRequest : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x0000050F) command (0x00000011) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnTestClusterSimpleStructResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -36552,7 +36628,8 @@ class TestClusterTest : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050F) command (0x00000000) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -36577,7 +36654,7 @@ class TestClusterTestAddArguments : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x0000050F) command (0x00000004) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnTestClusterTestAddArgumentsResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -36602,7 +36679,7 @@ class TestClusterTestEnumsRequest : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x0000050F) command (0x0000000E) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnTestClusterTestEnumsResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -36626,7 +36703,7 @@ class TestClusterTestListInt8UArgumentRequest : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x0000050F) command (0x0000000A) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnTestClusterBooleanResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -36650,7 +36727,7 @@ class TestClusterTestListInt8UReverseRequest : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x0000050F) command (0x0000000D) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnTestClusterTestListInt8UReverseResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -36674,7 +36751,7 @@ class TestClusterTestListNestedStructListArgumentRequest : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x0000050F) command (0x0000000C) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnTestClusterBooleanResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -36698,7 +36775,7 @@ class TestClusterTestListStructArgumentRequest : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x0000050F) command (0x00000009) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnTestClusterBooleanResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -36722,7 +36799,7 @@ class TestClusterTestNestedStructArgumentRequest : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x0000050F) command (0x00000008) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnTestClusterBooleanResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -36746,7 +36823,7 @@ class TestClusterTestNestedStructListArgumentRequest : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x0000050F) command (0x0000000B) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnTestClusterBooleanResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -36765,7 +36842,8 @@ class TestClusterTestNotHandled : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050F) command (0x00000001) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -36789,7 +36867,7 @@ class TestClusterTestNullableOptionalRequest : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x0000050F) command (0x0000000F) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnTestClusterTestNullableOptionalResponseSuccess, OnDefaultFailure, - endpointId, mRequest); + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: @@ -36812,7 +36890,8 @@ class TestClusterTestSimpleOptionalArgumentRequest : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050F) command (0x00000013) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -36832,7 +36911,7 @@ class TestClusterTestSpecific : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x0000050F) command (0x00000002) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnTestClusterTestSpecificResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -36856,7 +36935,7 @@ class TestClusterTestStructArgumentRequest : public ModelCommand ChipLogProgress(chipTool, "Sending cluster (0x0000050F) command (0x00000007) on endpoint %" PRIu8, endpointId); return chip::Controller::InvokeCommand(device, this, OnTestClusterBooleanResponseSuccess, OnDefaultFailure, endpointId, - mRequest); + mRequest, mTimedInteractionTimeoutMs); } private: @@ -36875,7 +36954,8 @@ class TestClusterTestUnknownCommand : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050F) command (0x00000003) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -36894,7 +36974,8 @@ class TestClusterTimedInvokeRequest : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050F) command (0x00000012) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -45343,7 +45424,8 @@ class ThermostatClearWeeklySchedule : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000003) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -45362,7 +45444,8 @@ class ThermostatGetRelayStatusLog : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000004) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -45389,7 +45472,8 @@ class ThermostatGetWeeklySchedule : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000002) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -45419,7 +45503,8 @@ class ThermostatSetWeeklySchedule : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000001) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -45443,7 +45528,8 @@ class ThermostatSetpointRaiseLower : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000000) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -47939,7 +48025,8 @@ class ThreadNetworkDiagnosticsResetCounts : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000035) command (0x00000000) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -53467,7 +53554,8 @@ class WiFiNetworkDiagnosticsResetCounts : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000036) command (0x00000000) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -54763,7 +54851,8 @@ class WindowCoveringDownOrClose : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000001) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -54787,7 +54876,8 @@ class WindowCoveringGoToLiftPercentage : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000005) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -54810,7 +54900,8 @@ class WindowCoveringGoToLiftValue : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000004) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -54834,7 +54925,8 @@ class WindowCoveringGoToTiltPercentage : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000008) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -54857,7 +54949,8 @@ class WindowCoveringGoToTiltValue : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000007) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -54876,7 +54969,8 @@ class WindowCoveringStopMotion : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000002) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: @@ -54895,7 +54989,8 @@ class WindowCoveringUpOrOpen : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000000) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); } private: diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 42522606504846..f47595c3b6210e 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -21,6 +21,9 @@ #include #include +#include +#include + #include // For INFINITY class TestList : public Command @@ -42724,6 +42727,28 @@ class TestClusterComplexTypes : public TestCommand ChipLogProgress(chipTool, " ***** Test Step 1 : Send Test Command with optional arg set to null.\n"); err = TestSendTestCommandWithOptionalArgSetToNull_1(); break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Send command that needs timed invoke without a timeout value\n"); + err = TestSendCommandThatNeedsTimedInvokeWithoutATimeoutValue_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Send command that needs timed invoke with a long timeout value\n"); + err = TestSendCommandThatNeedsTimedInvokeWithALongTimeoutValue_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Send command that needs timed invoke with a too-short timeout value\n"); + err = TestSendCommandThatNeedsTimedInvokeWithATooShortTimeoutValue_4(); + break; + case 5: + ChipLogProgress(chipTool, + " ***** Test Step 5 : Send command that does not need timed invoke with a long timeout value\n"); + err = TestSendCommandThatDoesNotNeedTimedInvokeWithALongTimeoutValue_5(); + break; + case 6: + ChipLogProgress(chipTool, + " ***** Test Step 6 : Send command that does not need timed invoke with a too-short timeout value\n"); + err = TestSendCommandThatDoesNotNeedTimedInvokeWithATooShortTimeoutValue_6(); + break; } if (CHIP_NO_ERROR != err) @@ -42735,7 +42760,7 @@ class TestClusterComplexTypes : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 2; + const uint16_t mTestCount = 7; // // Tests methods @@ -42783,6 +42808,154 @@ class TestClusterComplexTypes : public TestCommand NextTest(); } + + CHIP_ERROR TestSendCommandThatNeedsTimedInvokeWithoutATimeoutValue_2() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + using RequestType = chip::app::Clusters::TestCluster::Commands::TimedInvokeRequest::Type; + + RequestType request; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_2(); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_2(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request, + chip::NullOptional)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_2(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_NEEDS_TIMED_INTERACTION)); + NextTest(); + } + + void OnSuccessResponse_2() { ThrowSuccessResponse(); } + + CHIP_ERROR TestSendCommandThatNeedsTimedInvokeWithALongTimeoutValue_3() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + using RequestType = chip::app::Clusters::TestCluster::Commands::TimedInvokeRequest::Type; + + RequestType request; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_3(); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_3(status); + }; + + ReturnErrorOnFailure( + chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request, 10000)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_3(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_3() { NextTest(); } + + CHIP_ERROR TestSendCommandThatNeedsTimedInvokeWithATooShortTimeoutValue_4() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + using RequestType = chip::app::Clusters::TestCluster::Commands::TimedInvokeRequest::Type; + + RequestType request; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_4(); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_4(status); + }; + + ReturnErrorOnFailure( + chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request, 1)); + { + using namespace chip::System::Clock::Literals; + // Busy-wait for 5 milliseconds. + auto & clock = chip::System::SystemClock(); + auto start = clock.GetMonotonicTimestamp(); + while (clock.GetMonotonicTimestamp() - start < 5_ms) + ; + } + return CHIP_NO_ERROR; + } + + void OnFailureResponse_4(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); + NextTest(); + } + + void OnSuccessResponse_4() { ThrowSuccessResponse(); } + + CHIP_ERROR TestSendCommandThatDoesNotNeedTimedInvokeWithALongTimeoutValue_5() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + using RequestType = chip::app::Clusters::TestCluster::Commands::Test::Type; + + RequestType request; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_5(); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_5(status); + }; + + ReturnErrorOnFailure( + chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request, 10000)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_5(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_5() { NextTest(); } + + CHIP_ERROR TestSendCommandThatDoesNotNeedTimedInvokeWithATooShortTimeoutValue_6() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + using RequestType = chip::app::Clusters::TestCluster::Commands::Test::Type; + + RequestType request; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_6(); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_6(status); + }; + + ReturnErrorOnFailure( + chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request, 1)); + { + using namespace chip::System::Clock::Literals; + // Busy-wait for 5 milliseconds. + auto & clock = chip::System::SystemClock(); + auto start = clock.GetMonotonicTimestamp(); + while (clock.GetMonotonicTimestamp() - start < 5_ms) + ; + } + return CHIP_NO_ERROR; + } + + void OnFailureResponse_6(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); + NextTest(); + } + + void OnSuccessResponse_6() { ThrowSuccessResponse(); } }; class TestConstraints : public TestCommand