From f9e9ff320f52e6a3f86042244b2024c450477668 Mon Sep 17 00:00:00 2001 From: Ulrich Mohr Date: Thu, 28 Jul 2022 14:43:22 +0200 Subject: [PATCH] Small fixes --- src/fsfw/action/Action.h | 2 +- src/fsfw/devicehandlers/DeviceHandlerBase.cpp | 4 ++++ src/fsfw/devicehandlers/DeviceHandlerBase.h | 5 ++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/fsfw/action/Action.h b/src/fsfw/action/Action.h index 4b256d3b..121e4e11 100644 --- a/src/fsfw/action/Action.h +++ b/src/fsfw/action/Action.h @@ -26,7 +26,7 @@ class Action: public SerializeIF { MessageQueueId_t commandedBy; - virtual ReturnValue_t handle() = 0; + [[nodiscard]] virtual ReturnValue_t handle() = 0; void registerParameter(ParameterIF *parameter); diff --git a/src/fsfw/devicehandlers/DeviceHandlerBase.cpp b/src/fsfw/devicehandlers/DeviceHandlerBase.cpp index d3706300..740113ee 100644 --- a/src/fsfw/devicehandlers/DeviceHandlerBase.cpp +++ b/src/fsfw/devicehandlers/DeviceHandlerBase.cpp @@ -1263,6 +1263,10 @@ void DeviceHandlerBase::handleDeviceTM(SerializeIF* dataSet, DeviceCommandId_t r } } +ActionHelper *DeviceHandlerBase::getActionHelper() { + return &actionHelper; +} + ReturnValue_t DeviceHandlerBase::executeAction(Action *action) { ReturnValue_t result = acceptExternalDeviceCommands(); if (result != HasReturnvaluesIF::RETURN_OK) { diff --git a/src/fsfw/devicehandlers/DeviceHandlerBase.h b/src/fsfw/devicehandlers/DeviceHandlerBase.h index 902f4923..a77763ac 100644 --- a/src/fsfw/devicehandlers/DeviceHandlerBase.h +++ b/src/fsfw/devicehandlers/DeviceHandlerBase.h @@ -201,7 +201,8 @@ class DeviceHandlerBase : public DeviceHandlerIF, */ virtual void setParentQueue(MessageQueueId_t parentQueueId); - /** @brief Implementation required for HasActionIF */ + /** @brief Implementations required for HasActionIF */ + ActionHelper* getActionHelper() override; ReturnValue_t executeAction(Action *action) override; Mode_t getTransitionSourceMode() const; @@ -310,6 +311,8 @@ class DeviceHandlerBase : public DeviceHandlerIF, * - Anything else triggers an even with the returnvalue as a parameter */ virtual ReturnValue_t buildTransitionDeviceCommand(DeviceCommandId_t *id) = 0; + + //TODO Remove and update documentation /** * @brief Build a device command packet from data supplied by a direct * command (PUS Service 8)