eive-obsw/mission/pollingSeqTables.h
Robin Mueller 63b50e6101
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-develop Build started...
clean up op done
2023-03-26 16:42:00 +02:00

65 lines
1.9 KiB
C++

#ifndef POLLINGSEQUENCEFACTORY_H_
#define POLLINGSEQUENCEFACTORY_H_
#include "OBSWConfig.h"
#if defined(RASPBERRY_PI)
#include "rpiConfig.h"
#elif defined(XIPHOS_Q7S)
#include "q7sConfig.h"
#endif
#include "fsfw/returnvalues/returnvalue.h"
class FixedTimeslotTaskIF;
/**
* All device handlers are scheduled by adding them into
* Polling Sequence Tables (PST) to satisfy stricter timing requirements of
* device communication, a device handler has four different communication steps:
* 1. DeviceHandlerIF::SEND_WRITE -> Send write via interface
* 2. DeviceHandlerIF::GET_WRITE -> Get confirmation for write
* 3. DeviceHandlerIF::SEND_READ -> Send read request
* 4. DeviceHandlerIF::GET_READ -> Read from interface
* The PST specifies precisely when the respective ComIF functions are called
* during the communication cycle time.
* The task is created using the FixedTimeslotTaskIF,
* which utilises the underlying Operating System Abstraction Layer (OSAL)
*
* @param thisSequence FixedTimeslotTaskIF * object is passed inside the
* Factory class when creating the PST
* @return
*/
namespace pst {
struct AcsPstCfg {
bool scheduleAcsBoard = true;
bool scheduleImtq = true;
bool scheduleRws = true;
bool scheduleSus = true;
bool scheduleStr = true;
};
/**
* @brief This function creates the PST for all gomspace devices.
* @details
* Scheduled in a separate PST because the gomspace library uses blocking calls when requesting
* data from devices.
*/
ReturnValue_t pstGompaceCan(FixedTimeslotTaskIF* thisSequence);
ReturnValue_t pstSyrlinks(FixedTimeslotTaskIF* thisSequence);
ReturnValue_t pstTcsAndAcs(FixedTimeslotTaskIF* thisSequence, AcsPstCfg cfg);
ReturnValue_t pstI2cProcessingSystem(FixedTimeslotTaskIF* thisSequence);
/**
* Generic test PST
* @param thisSequence
* @return
*/
ReturnValue_t pstTest(FixedTimeslotTaskIF* thisSequence);
} // namespace pst
#endif /* POLLINGSEQUENCEINIT_H_ */