fsfw/tests/src/fsfw_tests/integration/task/TestTask.h

38 lines
1.1 KiB
C
Raw Normal View History

2021-10-17 23:27:31 +02:00
#ifndef MISSION_DEMO_TESTTASK_H_
#define MISSION_DEMO_TESTTASK_H_
#include <fsfw/objectmanager/SystemObject.h>
#include <fsfw/storagemanager/StorageManagerIF.h>
2022-02-02 10:29:30 +01:00
#include <fsfw/tasks/ExecutableObjectIF.h>
2021-10-17 23:27:31 +02:00
/**
* @brief Test class for general C++ testing and any other code which will not be part of the
* primary mission software.
* @details
* Should not be used for board specific tests. Instead, a derived board test class should be used.
*/
2022-02-02 10:29:30 +01:00
class TestTask : public SystemObject, public ExecutableObjectIF, public HasReturnvaluesIF {
public:
TestTask(object_id_t objectId);
virtual ~TestTask();
virtual ReturnValue_t performOperation(uint8_t operationCode = 0) override;
2021-10-17 23:27:31 +02:00
2022-02-02 10:29:30 +01:00
protected:
virtual ReturnValue_t performOneShotAction();
virtual ReturnValue_t performPeriodicAction();
virtual ReturnValue_t performActionA();
virtual ReturnValue_t performActionB();
2021-10-17 23:27:31 +02:00
2022-02-02 10:29:30 +01:00
enum testModes : uint8_t { A, B };
2021-10-17 23:27:31 +02:00
2022-02-02 10:29:30 +01:00
testModes testMode;
bool testFlag = false;
2021-10-17 23:27:31 +02:00
2022-02-02 10:29:30 +01:00
private:
static bool oneShotAction;
static MutexIF* testLock;
StorageManagerIF* IPCStore;
2021-10-17 23:27:31 +02:00
};
#endif /* TESTTASK_H_ */