eive-obsw/mission/system/power/EpsSubsystem.cpp

28 lines
776 B
C++
Raw Normal View History

2023-09-27 13:00:29 +02:00
#include <mission/system/power/EpsSubsystem.h>
2023-09-13 14:34:10 +02:00
#include "fsfw/devicehandlers/DeviceHandlerIF.h"
EpsSubsystem::EpsSubsystem(object_id_t objectId, uint32_t maxNumberOfSequences,
uint32_t maxNumberOfTables)
: Subsystem(objectId, maxNumberOfSequences, maxNumberOfTables) {}
void EpsSubsystem::announceMode(bool recursive) {
const char* modeStr = "UNKNOWN";
switch (mode) {
case (HasModesIF::MODE_OFF): {
modeStr = "OFF";
break;
}
case (HasModesIF::MODE_ON): {
modeStr = "ON";
break;
}
case (DeviceHandlerIF::MODE_NORMAL): {
modeStr = "NORMAL";
break;
}
}
sif::info << "EPS subsystem is now in " << modeStr << " mode" << std::endl;
return Subsystem::announceMode(recursive);
}