fsfw/misc/defaultcfg/fsfwconfig/pollingsequence/PollingSequenceFactory.cpp

26 lines
673 B
C++
Raw Normal View History

2020-10-20 17:38:41 +02:00
#include "PollingSequenceFactory.h"
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
#include <fsfw/tasks/FixedTimeslotTaskIF.h>
ReturnValue_t pst::pollingSequenceInitDefault(
FixedTimeslotTaskIF *thisSequence) {
/* Length of a communication cycle */
uint32_t length = thisSequence->getPeriodMs();
/* Add polling sequence table here */
2022-08-16 01:08:26 +02:00
if (thisSequence->checkSequence() == returnvalue::OK) {
return returnvalue::OK;
2020-10-20 17:38:41 +02:00
}
else {
2021-01-03 14:16:52 +01:00
#if FSFW_CPP_OSTREAM_ENABLED == 1
2020-10-20 17:38:41 +02:00
sif::error << "pst::pollingSequenceInitDefault: Sequence invalid!"
<< std::endl;
#endif
2022-08-16 01:08:26 +02:00
return returnvalue::FAILED;
2020-10-20 17:38:41 +02:00
}
}