diff --git a/examples/ota-requestor-app/linux/main.cpp b/examples/ota-requestor-app/linux/main.cpp index 50cf24191a5a98..0cc7271618b400 100644 --- a/examples/ota-requestor-app/linux/main.cpp +++ b/examples/ota-requestor-app/linux/main.cpp @@ -55,6 +55,9 @@ class CustomOTARequestorDriver : public DeviceLayer::ExtendedOTARequestorDriver public: bool CanConsent() override; void UpdateDownloaded() override; + void UpdateConfirmed(System::Clock::Seconds32 delay) override; + static void AppliedNotifyUpdateTimer(System::Layer * systemLayer, void * appState); + void SendNotifyUpdateApplied(); }; DefaultOTARequestor gRequestorCore; @@ -74,6 +77,7 @@ constexpr uint16_t kOptionOtaDownloadPath = 'f'; constexpr uint16_t kOptionPeriodicQueryTimeout = 'p'; constexpr uint16_t kOptionUserConsentState = 'u'; constexpr uint16_t kOptionWatchdogTimeout = 'w'; +constexpr uint16_t kSkipExecImageFile = 's'; constexpr size_t kMaxFilePathSize = 256; uint32_t gPeriodicQueryTimeoutSec = 0; @@ -82,6 +86,7 @@ chip::Optional gRequestorCanConsent; static char gOtaDownloadPath[kMaxFilePathSize] = "/tmp/test.bin"; bool gAutoApplyImage = false; bool gSendNotifyUpdateApplied = true; +bool gSkipExecImageFile = false; OptionDef cmdLineOptionsDef[] = { { "autoApplyImage", chip::ArgParser::kNoArgument, kOptionAutoApplyImage }, @@ -91,6 +96,7 @@ OptionDef cmdLineOptionsDef[] = { { "periodicQueryTimeout", chip::ArgParser::kArgumentRequired, kOptionPeriodicQueryTimeout }, { "userConsentState", chip::ArgParser::kArgumentRequired, kOptionUserConsentState }, { "watchdogTimeout", chip::ArgParser::kArgumentRequired, kOptionWatchdogTimeout }, + { "skipExecImageFile", chip::ArgParser::kNoArgument, kSkipExecImageFile }, {}, }; @@ -123,6 +129,8 @@ OptionSet cmdLineOptions = { " -w, --watchdogTimeout