fsfw-example-common/example/controller/FsfwTestController.h

47 lines
1.8 KiB
C
Raw Normal View History

2021-12-14 17:49:19 +01:00
#ifndef EXAMPLE_COMMON_EXAMPLE_CONTROLLER_FSFWTESTCONTROLLER_H_
#define EXAMPLE_COMMON_EXAMPLE_CONTROLLER_FSFWTESTCONTROLLER_H_
#include "fsfw/controller/ExtendedControllerBase.h"
#include "fsfw_tests/integration/controller/TestController.h"
2022-05-05 20:55:28 +02:00
class FsfwTestController : public TestController {
2022-05-22 15:30:08 +02:00
public:
FsfwTestController(object_id_t objectId, object_id_t device0,
object_id_t device1, uint8_t verboseLevel = 0);
2022-05-05 20:55:28 +02:00
virtual ~FsfwTestController();
2022-05-22 15:30:08 +02:00
ReturnValue_t handleCommandMessage(CommandMessage *message) override;
2022-05-05 20:55:28 +02:00
/**
* Periodic helper from ControllerBase, implemented by child class.
*/
void performControlOperation() override;
2022-05-22 15:30:08 +02:00
private:
2022-05-05 20:55:28 +02:00
object_id_t device0Id;
object_id_t device1Id;
testdevice::TestDataSet deviceDataset0;
testdevice::TestDataSet deviceDataset1;
uint8_t verboseLevel = 0;
bool traceVariable = false;
uint8_t traceCycles = 5;
uint8_t traceCounter = traceCycles;
enum TraceTypes { NONE, TRACE_DEV_0_UINT8, TRACE_DEV_0_VECTOR };
TraceTypes currentTraceType = TraceTypes::NONE;
ReturnValue_t initializeAfterTaskCreation() override;
2022-05-22 15:30:08 +02:00
void handleChangedDataset(sid_t sid, store_address_t storeId,
bool *clearMessage) override;
2022-05-05 20:55:28 +02:00
void handleChangedPoolVariable(gp_id_t globPoolId, store_address_t storeId,
2022-05-22 15:30:08 +02:00
bool *clearMessage) override;
ReturnValue_t
initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager &poolManager) override;
LocalPoolDataSetBase *getDataSetHandle(sid_t sid) override;
2022-05-05 20:55:28 +02:00
ReturnValue_t checkModeCommand(Mode_t mode, Submode_t submode,
2022-05-22 15:30:08 +02:00
uint32_t *msToReachTheMode) override;
2021-12-14 17:49:19 +01:00
};
#endif /* EXAMPLE_COMMON_EXAMPLE_CONTROLLER_FSFWTESTCONTROLLER_H_ */