Added PSU DS messages

Signed-off-by: Bernardo Carvalho <bernardo.carvalho@tecnico.ulisboa.pt>
This commit is contained in:
2025-10-26 00:42:25 +01:00
parent cc8cab6d5f
commit 90591f504a
3 changed files with 46 additions and 40 deletions

View File

@@ -433,6 +433,26 @@ bool PSUCommunicatorTX::Synchronise() {
*/
return ok;
}
// Messages
ErrorManagement::ErrorType PSUCommunicatorTX::TriggerPSU() {
ErrorManagement::ErrorType err;
REPORT_ERROR(ErrorManagement::Information,
"PSUCommunicatorTX::TriggerPSU. Got Message!");
communicatorOnlineStage = FA_COMMUNICATOR_ONLINE_DISCHARGE;
return err;
}
ErrorManagement::ErrorType PSUCommunicatorTX::GoOnline() {
ErrorManagement::ErrorType err;
REPORT_ERROR(ErrorManagement::Information,
"PSUCommunicatorTX::GoOnline. Got Message!");
communicatorOnlineStage = FA_COMMUNICATOR_ONLINE_WAIT_CODAC_TRIGGER;
return err;
}
CLASS_REGISTER(PSUCommunicatorTX, "1.0")
CLASS_METHOD_REGISTER(PSUCommunicatorTX, TriggerPSU)
CLASS_METHOD_REGISTER(PSUCommunicatorTX, GoOnline)
} // namespace MARTe
// vim: syntax=cpp ts=2 sw=2 sts=2 sr et

View File

@@ -197,6 +197,14 @@ public:
* @return true if the writing of all the channels is successful.
*/
virtual bool Synchronise();
/**
* @brief
* @details This method
* It can be called within a
* MARTe message.
*/
ErrorManagement::ErrorType TriggerPSU();
ErrorManagement::ErrorType GoOnline();
private:
/**