From ca93da05ff321265b291382c9ed8c7230f6935cd Mon Sep 17 00:00:00 2001 From: Yuanyao Zhong Date: Fri, 26 Apr 2024 15:25:08 -0400 Subject: [PATCH] Add virtual function in CommandHandler::Callback in CommandResponseSender --- src/app/CommandResponseSender.cpp | 5 +++++ src/app/CommandResponseSender.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/app/CommandResponseSender.cpp b/src/app/CommandResponseSender.cpp index d7f40caa476c8e..76595985a787e8 100644 --- a/src/app/CommandResponseSender.cpp +++ b/src/app/CommandResponseSender.cpp @@ -138,6 +138,11 @@ Status CommandResponseSender::CommandExists(const ConcreteCommandPath & aCommand return mpCommandHandlerCallback->CommandExists(aCommandPath); } +uint32_t CommandResponseSender::GetInteractionModelEngineGeneration() const { + VerifyOrReturnValue(mpCommandHandlerCallback, 0); + return mpCommandHandlerCallback->GetInteractionModelEngineGeneration(); +} + CHIP_ERROR CommandResponseSender::SendCommandResponse() { VerifyOrReturnError(HasMoreToSend(), CHIP_ERROR_INCORRECT_STATE); diff --git a/src/app/CommandResponseSender.h b/src/app/CommandResponseSender.h index a89970ddec6c92..7eabbc40c8628c 100644 --- a/src/app/CommandResponseSender.h +++ b/src/app/CommandResponseSender.h @@ -66,6 +66,8 @@ class CommandResponseSender : public Messaging::ExchangeDelegate, Protocols::InteractionModel::Status CommandExists(const ConcreteCommandPath & aCommandPath) override; + uint32_t GetInteractionModelEngineGeneration() const override; + /** * Gets the inner exchange context object, without ownership. *