eive-obsw/dummies/CoreControllerDummy.cpp
Robin Mueller 447c4d5c88
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
all retval replacements
2022-08-24 17:27:47 +02:00

56 lines
1.6 KiB
C++

#include "CoreControllerDummy.h"
#include <bsp_q7s/core/CoreDefinitions.h>
#include <objects/systemObjectList.h>
#include <cmath>
#include <cstdlib>
CoreControllerDummy::CoreControllerDummy(object_id_t objectId)
: ExtendedControllerBase(objectId, objects::NO_OBJECT) {}
ReturnValue_t CoreControllerDummy::initialize() {
static bool done = false;
if (not done) {
done = true;
ReturnValue_t result = ExtendedControllerBase::initialize();
if (result != returnvalue::OK) {
return result;
}
}
return returnvalue::OK;
}
ReturnValue_t CoreControllerDummy::handleCommandMessage(CommandMessage* message) {
return returnvalue::FAILED;
}
void CoreControllerDummy::performControlOperation() { return; }
ReturnValue_t CoreControllerDummy::initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
LocalDataPoolManager& poolManager) {
localDataPoolMap.emplace(core::TEMPERATURE, new PoolEntry<float>({0}));
localDataPoolMap.emplace(core::PS_VOLTAGE, new PoolEntry<float>({0}));
localDataPoolMap.emplace(core::PL_VOLTAGE, new PoolEntry<float>({0}));
return returnvalue::OK;
}
LocalPoolDataSetBase* CoreControllerDummy::getDataSetHandle(sid_t sid) {
switch (sid.ownerSetId) {
default:
return nullptr;
}
}
ReturnValue_t CoreControllerDummy::checkModeCommand(Mode_t mode, Submode_t submode,
uint32_t* msToReachTheMode) {
if (submode != SUBMODE_NONE) {
return INVALID_SUBMODE;
}
if ((mode != MODE_OFF) && (mode != MODE_ON) && (mode != MODE_NORMAL)) {
return INVALID_MODE;
}
return returnvalue::OK;
}