eive-obsw/dummies/CoreControllerDummy.cpp

56 lines
1.7 KiB
C++
Raw Permalink Normal View History

2022-06-16 08:26:40 +02:00
#include "CoreControllerDummy.h"
#include <bsp_q7s/core/CoreDefinitions.h>
2022-06-17 08:31:36 +02:00
#include <objects/systemObjectList.h>
2022-06-16 08:26:40 +02:00
#include <cmath>
#include <cstdlib>
CoreControllerDummy::CoreControllerDummy(object_id_t objectId)
2022-06-17 08:31:36 +02:00
: ExtendedControllerBase(objectId, objects::NO_OBJECT) {}
2022-06-16 08:26:40 +02:00
ReturnValue_t CoreControllerDummy::initialize() {
static bool done = false;
if (not done) {
done = true;
ReturnValue_t result = ExtendedControllerBase::initialize();
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
}
return HasReturnvaluesIF::RETURN_OK;
}
ReturnValue_t CoreControllerDummy::handleCommandMessage(CommandMessage* message) {
return RETURN_FAILED;
}
2022-06-17 08:31:36 +02:00
void CoreControllerDummy::performControlOperation() { return; }
2022-06-16 08:26:40 +02:00
2022-06-17 08:31:36 +02:00
ReturnValue_t CoreControllerDummy::initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
LocalDataPoolManager& poolManager) {
2022-06-16 08:26:40 +02:00
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 HasReturnvaluesIF::RETURN_OK;
}
LocalPoolDataSetBase* CoreControllerDummy::getDataSetHandle(sid_t sid) {
switch (sid.ownerSetId) {
default:
return nullptr;
}
}
ReturnValue_t CoreControllerDummy::checkModeCommand(Mode_t mode, Submode_t submode,
2022-06-17 08:31:36 +02:00
uint32_t* msToReachTheMode) {
2022-06-16 08:26:40 +02:00
if (submode != SUBMODE_NONE) {
return INVALID_SUBMODE;
}
if ((mode != MODE_OFF) && (mode != MODE_ON) && (mode != MODE_NORMAL)) {
return INVALID_MODE;
}
return RETURN_OK;
}