eive-obsw/bsp_q7s/core/CoreController.h

40 lines
1.4 KiB
C
Raw Normal View History

2021-05-26 14:16:16 +02:00
#ifndef BSP_Q7S_CORE_CORECONTROLLER_H_
#define BSP_Q7S_CORE_CORECONTROLLER_H_
#include "fsfw/controller/ExtendedControllerBase.h"
#include "bsp_q7s/memory/SdCardManager.h"
2021-05-26 14:16:16 +02:00
2021-07-19 12:44:43 +02:00
#include "events/subsystemIdRanges.h"
2021-05-26 14:16:16 +02:00
class CoreController: public ExtendedControllerBase {
public:
2021-07-19 12:44:43 +02:00
static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::CORE;
static constexpr Event ALLOC_FAILURE = event::makeEvent(SUBSYSTEM_ID, 0, severity::MEDIUM);
2021-05-26 14:16:16 +02:00
CoreController(object_id_t objectId);
2021-07-08 12:07:39 +02:00
ReturnValue_t initialize() override;
2021-05-26 14:16:16 +02:00
ReturnValue_t handleCommandMessage(CommandMessage *message) override;
void performControlOperation() override;
2021-07-19 12:44:43 +02:00
static ReturnValue_t incrementAllocationFailureCount();
2021-05-26 14:16:16 +02:00
private:
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
LocalDataPoolManager& poolManager) override;
LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override;
ReturnValue_t checkModeCommand(Mode_t mode, Submode_t submode,
uint32_t *msToReachTheMode);
ReturnValue_t sdCardInit();
ReturnValue_t sdCardSetup(SdCardManager& sdcMan, SdCardManager::SdStatusPair& statusPair,
sd::SdCard sdCard, sd::SdStatus status, std::string sdString);
ReturnValue_t sdCardColdRedundantInit(SdCardManager* sdcMan,
SdCardManager::SdStatusPair& statusPair);
2021-05-26 14:16:16 +02:00
};
#endif /* BSP_Q7S_CORE_CORECONTROLLER_H_ */