eive-obsw/bsp_q7s/core/CoreController.cpp

45 lines
1.5 KiB
C++

#include "CoreController.h"
#include "../memory/SdCardManager.h"
CoreController::CoreController(object_id_t objectId):
ExtendedControllerBase(objectId, objects::NO_OBJECT, 5) {
}
ReturnValue_t CoreController::handleCommandMessage(CommandMessage *message) {
return HasReturnvaluesIF::RETURN_OK;
}
void CoreController::performControlOperation() {
}
ReturnValue_t CoreController::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager &poolManager) {
return HasReturnvaluesIF::RETURN_OK;
}
LocalPoolDataSetBase* CoreController::getDataSetHandle(sid_t sid) {
return nullptr;
}
ReturnValue_t CoreController::initialize() {
// Find a way to store this non-volatile outside of SD cards (ProASIC?)
sd::SdCard preferredSdCard = sd::SdCard::SLOT_0;
// Creator or update status file
ReturnValue_t result = SdCardManager::instance()->updateSdCardStateFile();
if(result != HasReturnvaluesIF::RETURN_OK) {
sif::warning << "CoreController::initialize: Updating SD card state file failed"
<< std::endl;
}
result = SdCardManager::instance()->switchOnSdCard(preferredSdCard);
if(result != HasReturnvaluesIF::RETURN_OK) {
sif::warning << "CoreController::initialize: Turning SD card on failed"
<< std::endl;
}
return HasReturnvaluesIF::RETURN_OK;
}
ReturnValue_t CoreController::checkModeCommand(Mode_t mode, Submode_t submode,
uint32_t *msToReachTheMode) {
return HasReturnvaluesIF::RETURN_OK;
}