eive-obsw/mission/controller/ThermalController.cpp

43 lines
1.8 KiB
C++
Raw Normal View History

2021-01-08 09:34:43 +01:00
#include "ThermalController.h"
2022-01-17 15:58:27 +01:00
2021-01-08 09:34:43 +01:00
#include <mission/devices/devicedefinitions/ThermalSensorPacket.h>
2022-01-17 15:58:27 +01:00
ThermalController::ThermalController(object_id_t objectId)
: ExtendedControllerBase(objectId, objects::NO_OBJECT), thermalControllerSet(objectId) {}
2021-01-08 09:34:43 +01:00
2022-01-17 15:58:27 +01:00
ReturnValue_t ThermalController::handleCommandMessage(CommandMessage *message) {
return HasReturnvaluesIF::RETURN_OK;
2021-01-08 09:34:43 +01:00
}
2022-01-17 15:58:27 +01:00
void ThermalController::performControlOperation() {}
2021-01-08 09:34:43 +01:00
2022-01-17 15:58:27 +01:00
void ThermalController::handleChangedDataset(sid_t sid, store_address_t storeId) {
if (sid == sid_t(TSensorDefinitions::ObjIds::TEST_HKB_HANDLER,
TSensorDefinitions::THERMAL_SENSOR_SET_ID)) {
sif::info << "Update registered!" << std::endl;
}
2021-01-08 09:34:43 +01:00
}
ReturnValue_t ThermalController::initializeAfterTaskCreation() {
2022-01-17 15:58:27 +01:00
ReturnValue_t result = ExtendedControllerBase::initializeAfterTaskCreation();
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "ThermalController::initializeAfterTaskCreation: Base"
<< " class initialization failed!" << std::endl;
}
HasLocalDataPoolIF *testHkbHandler = ObjectManager::instance()->get<HasLocalDataPoolIF>(
TSensorDefinitions::ObjIds::TEST_HKB_HANDLER);
if (testHkbHandler == nullptr) {
sif::warning << "ThermalController::initializeAfterTaskCreation: Test"
<< " HKB Handler invalid!" << std::endl;
}
// Test normal notifications without data packet first.
testHkbHandler->getHkManagerHandle()->subscribeForSetUpdateMessages(
TSensorDefinitions::THERMAL_SENSOR_SET_ID, this->getObjectId(), commandQueue->getId(), false);
return result;
2021-01-08 09:34:43 +01:00
}
2022-01-17 15:58:27 +01:00
ReturnValue_t ThermalController::checkModeCommand(Mode_t mode, Submode_t submode,
uint32_t *msToReachTheMode) {
return HasReturnvaluesIF::RETURN_OK;
2021-01-08 09:34:43 +01:00
}