2020-09-16 16:22:36 +02:00
|
|
|
#ifndef TEST_TESTTASK_H_
|
|
|
|
#define TEST_TESTTASK_H_
|
|
|
|
|
|
|
|
#include <fsfw/serialize/SerialBufferAdapter.h>
|
|
|
|
#include <fsfw/serialize/SerialLinkedListAdapter.h>
|
2022-01-18 11:41:19 +01:00
|
|
|
#include <fsfw/serialize/SerializeElement.h>
|
2020-09-16 16:22:36 +02:00
|
|
|
|
|
|
|
#include <cstddef>
|
|
|
|
|
2022-01-18 11:41:19 +01:00
|
|
|
#include "fsfw_tests/integration/task/TestTask.h"
|
2020-09-16 16:22:36 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Test class for general C++ testing.
|
|
|
|
* @details
|
|
|
|
* Should not be used for board specific
|
|
|
|
* tests. Instead, a derived board test class should be used.
|
|
|
|
*/
|
2021-11-19 13:22:20 +01:00
|
|
|
class EiveTestTask : public TestTask {
|
2022-01-18 11:41:19 +01:00
|
|
|
public:
|
|
|
|
EiveTestTask(object_id_t objectId);
|
|
|
|
virtual ~EiveTestTask();
|
|
|
|
virtual ReturnValue_t performOperation(uint8_t operationCode = 0) override;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual ReturnValue_t performOneShotAction();
|
|
|
|
virtual ReturnValue_t performPeriodicAction();
|
|
|
|
virtual ReturnValue_t performActionA();
|
|
|
|
virtual ReturnValue_t performActionB();
|
2020-09-16 16:22:36 +02:00
|
|
|
|
2022-01-18 11:41:19 +01:00
|
|
|
enum testModes : uint8_t { A, B };
|
|
|
|
|
|
|
|
testModes testMode;
|
|
|
|
|
|
|
|
bool testFlag = false;
|
|
|
|
uint8_t counter{1};
|
|
|
|
uint8_t counterTrigger{3};
|
|
|
|
|
|
|
|
void performPusInjectorTest();
|
|
|
|
void examplePacketTest();
|
|
|
|
|
|
|
|
private:
|
|
|
|
// Actually, to be really thread-safe, a mutex should be used as well
|
|
|
|
// Let's keep it simple for now.
|
|
|
|
bool oneShotAction = true;
|
|
|
|
StorageManagerIF* IPCStore;
|
|
|
|
|
|
|
|
void performLwgpsTest();
|
|
|
|
};
|
2020-09-16 16:22:36 +02:00
|
|
|
|
|
|
|
#endif /* TESTTASK_H_ */
|