some improverments for simple helper

This commit is contained in:
Robin Müller 2020-10-29 13:27:41 +01:00
parent 3c1415a4bd
commit edb2d3848d
2 changed files with 12 additions and 9 deletions

View File

@ -1,9 +1,9 @@
#include "HasActionsIF.h" #include "HasActionsIF.h"
#include "SimpleActionHelper.h" #include "SimpleActionHelper.h"
SimpleActionHelper::SimpleActionHelper(HasActionsIF* setOwner, SimpleActionHelper::SimpleActionHelper(HasActionsIF* setOwner,
MessageQueueIF* useThisQueue) : MessageQueueIF* useThisQueue) :
ActionHelper(setOwner, useThisQueue), isExecuting(false), lastCommander( ActionHelper(setOwner, useThisQueue), isExecuting(false) {
0), lastAction(0), stepCount(0) {
} }
SimpleActionHelper::~SimpleActionHelper() { SimpleActionHelper::~SimpleActionHelper() {

View File

@ -1,8 +1,10 @@
#ifndef SIMPLEACTIONHELPER_H_ #ifndef FSFW_ACTION_SIMPLEACTIONHELPER_H_
#define SIMPLEACTIONHELPER_H_ #define FSFW_ACTION_SIMPLEACTIONHELPER_H_
#include "ActionHelper.h" #include "ActionHelper.h"
/**
*/
class SimpleActionHelper: public ActionHelper { class SimpleActionHelper: public ActionHelper {
public: public:
SimpleActionHelper(HasActionsIF* setOwner, MessageQueueIF* useThisQueue); SimpleActionHelper(HasActionsIF* setOwner, MessageQueueIF* useThisQueue);
@ -12,13 +14,14 @@ public:
ReturnValue_t reportData(SerializeIF* data); ReturnValue_t reportData(SerializeIF* data);
protected: protected:
void prepareExecution(MessageQueueId_t commandedBy, ActionId_t actionId, store_address_t dataAddress); void prepareExecution(MessageQueueId_t commandedBy, ActionId_t actionId,
virtual void resetHelper(); store_address_t dataAddress);
virtual void resetHelper();
private: private:
bool isExecuting; bool isExecuting;
MessageQueueId_t lastCommander; MessageQueueId_t lastCommander = MessageQueueIF::NO_QUEUE;
ActionId_t lastAction; ActionId_t lastAction = 0;
uint8_t stepCount; uint8_t stepCount = 0;
}; };
#endif /* SIMPLEACTIONHELPER_H_ */ #endif /* SIMPLEACTIONHELPER_H_ */