fsfw-example-common/example/test/FsfwTestTask.cpp

22 lines
444 B
C++
Raw Normal View History

2021-11-19 14:12:12 +01:00
#include "FsfwTestTask.h"
2022-05-08 02:11:57 +02:00
#include <commonConfig.h>
#if FSFW_ADD_FMT_TESTS == 1
#include "testFmt.h"
#endif
2021-11-19 14:12:12 +01:00
2022-05-05 20:55:28 +02:00
FsfwTestTask::FsfwTestTask(object_id_t objectId, bool periodicEvent)
2022-05-08 02:06:29 +02:00
: TestTask(objectId), periodicEvent(periodicEvent) {
2022-05-08 02:11:57 +02:00
#if FSFW_ADD_FMT_TESTS == 1
2022-05-08 02:06:29 +02:00
fmtTests();
2022-05-08 02:11:57 +02:00
#endif
2022-05-08 02:06:29 +02:00
}
2021-11-19 14:12:12 +01:00
ReturnValue_t FsfwTestTask::performPeriodicAction() {
2022-05-05 20:55:28 +02:00
if (periodicEvent) {
triggerEvent(TEST_EVENT, 0x1234, 0x4321);
}
2022-09-07 17:40:06 +02:00
return returnvalue::OK;
2021-11-19 14:12:12 +01:00
}