fsfw/src/fsfw/modes/ModeMessage.cpp
Robin Mueller ddcac2bbac
All checks were successful
fsfw/fsfw/pipeline/pr-development This commit looks good
reapply clang format
2022-02-02 10:29:30 +01:00

27 lines
898 B
C++

#include "fsfw/modes/ModeMessage.h"
Mode_t ModeMessage::getMode(const CommandMessage* message) { return message->getParameter(); }
Submode_t ModeMessage::getSubmode(const CommandMessage* message) {
return message->getParameter2();
}
void ModeMessage::setModeMessage(CommandMessage* message, Command_t command, Mode_t mode,
Submode_t submode) {
message->setCommand(command);
message->setParameter(mode);
message->setParameter2(submode);
}
ReturnValue_t ModeMessage::getCantReachModeReason(const CommandMessage* message) {
return message->getParameter();
}
void ModeMessage::clear(CommandMessage* message) { message->setCommand(CommandMessage::CMD_NONE); }
void ModeMessage::setCantReachMode(CommandMessage* message, ReturnValue_t reason) {
message->setCommand(REPLY_CANT_REACH_MODE);
message->setParameter(reason);
message->setParameter2(0);
}