eive-obsw/dummies/CoreControllerDummy.cpp

55 lines
1.6 KiB
C++
Raw Permalink Normal View History

2022-06-16 08:26:40 +02:00
#include "CoreControllerDummy.h"
2023-07-03 16:55:45 +02:00
#include <bsp_q7s/core/defs.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>
2022-11-02 18:58:29 +01:00
CoreControllerDummy::CoreControllerDummy(object_id_t objectId) : ExtendedControllerBase(objectId) {}
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();
2022-08-24 17:27:47 +02:00
if (result != returnvalue::OK) {
2022-06-16 08:26:40 +02:00
return result;
}
}
2022-08-24 17:27:47 +02:00
return returnvalue::OK;
2022-06-16 08:26:40 +02:00
}
ReturnValue_t CoreControllerDummy::handleCommandMessage(CommandMessage* message) {
2022-08-24 17:27:47 +02:00
return returnvalue::FAILED;
2022-06-16 08:26:40 +02:00
}
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}));
2022-08-24 17:27:47 +02:00
return returnvalue::OK;
2022-06-16 08:26:40 +02:00
}
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;
}
2022-08-24 17:27:47 +02:00
return returnvalue::OK;
2022-06-16 08:26:40 +02:00
}