eive-obsw/mission/pollingSeqTables.h

77 lines
2.2 KiB
C
Raw Permalink Normal View History

2020-09-16 16:22:36 +02:00
#ifndef POLLINGSEQUENCEFACTORY_H_
#define POLLINGSEQUENCEFACTORY_H_
2021-03-07 14:06:29 +01:00
#include "OBSWConfig.h"
#if defined(RASPBERRY_PI)
#include "rpiConfig.h"
#elif defined(XIPHOS_Q7S)
#include "q7sConfig.h"
#endif
2022-08-24 17:27:47 +02:00
#include "fsfw/returnvalues/returnvalue.h"
2020-09-16 16:22:36 +02:00
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 {
2023-02-08 16:45:19 +01:00
struct AcsPstCfg {
bool scheduleAcsBoard = true;
bool scheduleImtq = true;
bool scheduleRws = true;
bool scheduleSus = true;
bool scheduleStr = true;
};
2023-06-17 15:28:05 +02:00
// Default config is for FM.
struct TmpSchedConfig {
bool scheduleTmpDev0 = true;
bool scheduleTmpDev1 = true;
bool schedulePlPcduDev0 = true;
// damaged on FM
bool schedulePlPcduDev1 = false;
bool scheduleIfBoardDev = true;
};
/**
2021-06-23 15:18:31 +02:00
* @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.
*/
2022-01-17 15:58:27 +01:00
ReturnValue_t pstGompaceCan(FixedTimeslotTaskIF* thisSequence);
2021-06-23 15:18:31 +02:00
2023-03-13 11:34:51 +01:00
ReturnValue_t pstSyrlinks(FixedTimeslotTaskIF* thisSequence);
2021-06-23 15:18:31 +02:00
2023-02-13 15:37:42 +01:00
ReturnValue_t pstTcsAndAcs(FixedTimeslotTaskIF* thisSequence, AcsPstCfg cfg);
2022-05-05 02:00:56 +02:00
ReturnValue_t pstI2c(TmpSchedConfig schedConf, FixedTimeslotTaskIF* thisSequence);
2021-06-23 15:18:31 +02:00
2023-11-14 13:25:53 +01:00
ReturnValue_t pstPayload(FixedTimeslotTaskIF* thisSequence);
2021-06-23 15:18:31 +02:00
/**
* Generic test PST
* @param thisSequence
* @return
*/
ReturnValue_t pstTest(FixedTimeslotTaskIF* thisSequence);
2022-01-17 15:58:27 +01:00
} // namespace pst
2020-09-16 16:22:36 +02:00
#endif /* POLLINGSEQUENCEINIT_H_ */