2022-02-18 19:08:06 +01:00
|
|
|
#ifndef FSFW_UNITTEST_TESTS_MOCKS_PERIODICTASKMOCK_H_
|
|
|
|
#define FSFW_UNITTEST_TESTS_MOCKS_PERIODICTASKMOCK_H_
|
|
|
|
|
|
|
|
#include <fsfw/tasks/ExecutableObjectIF.h>
|
2022-05-30 12:12:07 +02:00
|
|
|
#include <fsfw/tasks/PeriodicTaskBase.h>
|
2022-02-18 19:08:06 +01:00
|
|
|
|
2022-05-30 12:12:07 +02:00
|
|
|
class PeriodicTaskMock : public PeriodicTaskBase {
|
2022-02-22 13:42:56 +01:00
|
|
|
public:
|
2022-05-30 12:12:07 +02:00
|
|
|
PeriodicTaskMock(TaskPeriod period, TaskDeadlineMissedFunction dlmFunc)
|
2022-05-30 12:20:05 +02:00
|
|
|
: PeriodicTaskBase(period, dlmFunc) {}
|
2022-05-30 12:12:07 +02:00
|
|
|
|
2022-02-18 19:08:06 +01:00
|
|
|
virtual ~PeriodicTaskMock() {}
|
|
|
|
/**
|
|
|
|
* @brief With the startTask method, a created task can be started
|
|
|
|
* for the first time.
|
|
|
|
*/
|
2022-05-30 12:12:07 +02:00
|
|
|
virtual ReturnValue_t startTask() override {
|
|
|
|
initObjsAfterTaskCreation();
|
2022-08-15 20:28:16 +02:00
|
|
|
return returnvalue::OK;
|
2022-02-18 19:08:06 +01:00
|
|
|
};
|
|
|
|
|
2022-08-15 20:28:16 +02:00
|
|
|
virtual ReturnValue_t sleepFor(uint32_t ms) override { return returnvalue::OK; };
|
2022-02-18 19:08:06 +01:00
|
|
|
};
|
|
|
|
|
2022-05-30 12:12:07 +02:00
|
|
|
#endif // FSFW_UNITTEST_TESTS_MOCKS_PERIODICTASKMOCK_H_
|