2016-06-15 23:48:41 +02:00
|
|
|
#ifndef SIMPLEACTIONHELPER_H_
|
|
|
|
#define SIMPLEACTIONHELPER_H_
|
|
|
|
|
|
|
|
#include <framework/action/ActionHelper.h>
|
|
|
|
|
|
|
|
class SimpleActionHelper: public ActionHelper {
|
|
|
|
public:
|
2018-07-12 16:29:32 +02:00
|
|
|
SimpleActionHelper(HasActionsIF* setOwner, MessageQueueIF* useThisQueue);
|
2016-06-15 23:48:41 +02:00
|
|
|
virtual ~SimpleActionHelper();
|
|
|
|
void step(ReturnValue_t result = HasReturnvaluesIF::RETURN_OK);
|
|
|
|
void finish(ReturnValue_t result = HasReturnvaluesIF::RETURN_OK);
|
2018-07-12 16:29:32 +02:00
|
|
|
ReturnValue_t reportData(SerializeIF* data);
|
2018-07-13 18:28:26 +02:00
|
|
|
|
2016-06-15 23:48:41 +02:00
|
|
|
protected:
|
|
|
|
void prepareExecution(MessageQueueId_t commandedBy, ActionId_t actionId, store_address_t dataAddress);
|
2018-07-13 18:28:26 +02:00
|
|
|
virtual void resetHelper();
|
2016-06-15 23:48:41 +02:00
|
|
|
private:
|
|
|
|
bool isExecuting;
|
|
|
|
MessageQueueId_t lastCommander;
|
|
|
|
ActionId_t lastAction;
|
|
|
|
uint8_t stepCount;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* SIMPLEACTIONHELPER_H_ */
|