eive-obsw/bsp_q7s/core/CoreController.h

51 lines
1.7 KiB
C++

#ifndef BSP_Q7S_CORE_CORECONTROLLER_H_
#define BSP_Q7S_CORE_CORECONTROLLER_H_
#include "fsfw/controller/ExtendedControllerBase.h"
#include "bsp_q7s/memory/SdCardManager.h"
#include "events/subsystemIdRanges.h"
class CoreController: public ExtendedControllerBase {
public:
static constexpr ActionId_t LIST_DIRECTORY_INTO_FILE = 0;
static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::CORE;
static constexpr Event ALLOC_FAILURE = event::makeEvent(SUBSYSTEM_ID, 0, severity::MEDIUM);
CoreController(object_id_t objectId);
ReturnValue_t initialize() override;
ReturnValue_t initializeAfterTaskCreation() override;
ReturnValue_t executeAction(ActionId_t actionId,
MessageQueueId_t commandedBy, const uint8_t *data, size_t size) override;
ReturnValue_t handleCommandMessage(CommandMessage *message) override;
void performControlOperation() override;
static ReturnValue_t incrementAllocationFailureCount();
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);
ReturnValue_t versionFileInit();
void initPrint();
};
#endif /* BSP_Q7S_CORE_CORECONTROLLER_H_ */