From 7ebfcdda60633af8583813489858ccbce362d21c Mon Sep 17 00:00:00 2001 From: Ulrich Mohr Date: Fri, 28 Jul 2023 17:48:47 +0200 Subject: [PATCH] added Action::clear() --- src/fsfw/action/Action.cpp | 7 +++++++ src/fsfw/action/Action.h | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/fsfw/action/Action.cpp b/src/fsfw/action/Action.cpp index 3b97983a9..10cf507d4 100644 --- a/src/fsfw/action/Action.cpp +++ b/src/fsfw/action/Action.cpp @@ -1,6 +1,7 @@ #include "Action.h" #include +#include #undef Action @@ -19,6 +20,12 @@ Action::Action(ActionId_t id) : id(id) {} #endif ActionId_t Action::getId() { return id; } +void Action::clear() { + tc = store_address_t(); + tcOffset = 0; + commandedBy = MessageQueueIF::NO_QUEUE; +} + void Action::registerParameter(ParameterIF *parameter) { parameterList.push_back(parameter); } std::vector const *Action::getParameters() const { return ¶meterList; } diff --git a/src/fsfw/action/Action.h b/src/fsfw/action/Action.h index 89ed34234..5cda1688e 100644 --- a/src/fsfw/action/Action.h +++ b/src/fsfw/action/Action.h @@ -32,10 +32,13 @@ class Action : public SerializeIF, public HasTmTcParametersIF { // TODO integrate with internal commands store_address_t tc; size_t tcOffset; + MessageQueueId_t commandedBy; ActionId_t getId(); - MessageQueueId_t commandedBy; + + + void clear(); [[nodiscard]] virtual ReturnValue_t handle() = 0;