v1.9.0 #175
@ -5,14 +5,12 @@ ThermalController::ThermalController(object_id_t objectId, object_id_t parentId)
|
|||||||
sensorTemperatures(this),
|
sensorTemperatures(this),
|
||||||
componentTemperatures(this) {}
|
componentTemperatures(this) {}
|
||||||
|
|
||||||
ReturnValue_t ThermalController::perform() { return HasReturnvaluesIF::RETURN_FAILED; }
|
ReturnValue_t ThermalController::initialize() { return ControllerBase::initialize(); }
|
||||||
|
|
||||||
ReturnValue_t ThermalController::handleCommandMessage(CommandMessage* message) {
|
ReturnValue_t ThermalController::handleCommandMessage(CommandMessage* message) {
|
||||||
return RETURN_FAILED;
|
return RETURN_FAILED;
|
||||||
}
|
}
|
||||||
void ThermalController::performControlOperation() {
|
void ThermalController::performControlOperation() {
|
||||||
sif::info << "tc performOperation()" << std::endl;
|
|
||||||
|
|
||||||
ReturnValue_t result = sensorTemperatures.read();
|
ReturnValue_t result = sensorTemperatures.read();
|
||||||
if (result != RETURN_OK) {
|
if (result != RETURN_OK) {
|
||||||
return;
|
return;
|
||||||
|
@ -8,7 +8,7 @@ class ThermalController : public ExtendedControllerBase {
|
|||||||
public:
|
public:
|
||||||
ThermalController(object_id_t objectId, object_id_t parentId);
|
ThermalController(object_id_t objectId, object_id_t parentId);
|
||||||
|
|
||||||
ReturnValue_t perform();
|
ReturnValue_t initialize() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ReturnValue_t handleCommandMessage(CommandMessage* message) override;
|
virtual ReturnValue_t handleCommandMessage(CommandMessage* message) override;
|
||||||
|
@ -13,8 +13,8 @@ TEST_CASE("Thermal Controller", "[ThermalController]") {
|
|||||||
const object_id_t THERMAL_CONTROLLER_ID = 0x123;
|
const object_id_t THERMAL_CONTROLLER_ID = 0x123;
|
||||||
|
|
||||||
ThermalController controller(THERMAL_CONTROLLER_ID, objects::NO_OBJECT);
|
ThermalController controller(THERMAL_CONTROLLER_ID, objects::NO_OBJECT);
|
||||||
|
REQUIRE(controller.initialize() == HasReturnvaluesIF::RETURN_OK);
|
||||||
controller.initializeAfterTaskCreation();
|
REQUIRE(controller.initializeAfterTaskCreation() == HasReturnvaluesIF::RETURN_OK);
|
||||||
|
|
||||||
EventManagerMock* eventmanager =
|
EventManagerMock* eventmanager =
|
||||||
ObjectManager::instance()->get<EventManagerMock>(objects::EVENT_MANAGER);
|
ObjectManager::instance()->get<EventManagerMock>(objects::EVENT_MANAGER);
|
||||||
@ -34,7 +34,9 @@ TEST_CASE("Thermal Controller", "[ThermalController]") {
|
|||||||
|
|
||||||
REQUIRE(controller.performOperation(0) == HasReturnvaluesIF::RETURN_OK);
|
REQUIRE(controller.performOperation(0) == HasReturnvaluesIF::RETURN_OK);
|
||||||
|
|
||||||
eventmanager->clearEventList();
|
REQUIRE(eventmanager->isEventInEventList(THERMAL_CONTROLLER_ID, HasModesIF::MODE_INFO,
|
||||||
|
ControllerBase::MODE_NORMAL,
|
||||||
|
HasModesIF::SUBMODE_NONE) == true);
|
||||||
|
|
||||||
thermalControllerDefinitions::ComponentTemperatures componentTemperatures(THERMAL_CONTROLLER_ID);
|
thermalControllerDefinitions::ComponentTemperatures componentTemperatures(THERMAL_CONTROLLER_ID);
|
||||||
|
|
||||||
|
@ -23,7 +23,4 @@ enum MESSAGE_TYPE {
|
|||||||
void clearMissionMessage(CommandMessage* message);
|
void clearMissionMessage(CommandMessage* message);
|
||||||
} // namespace messagetypes
|
} // namespace messagetypes
|
||||||
|
|
||||||
|
void messagetypes::clearMissionMessage(CommandMessage* message) {}
|
||||||
void messagetypes::clearMissionMessage(CommandMessage* message) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user