Added PSU DS messages

Signed-off-by: Bernardo Carvalho <bernardo.carvalho@tecnico.ulisboa.pt>
This commit is contained in:
2025-10-28 17:17:54 +00:00
parent 90591f504a
commit 9bb3196a23
3 changed files with 34 additions and 12 deletions

View File

@@ -63,7 +63,7 @@
+TriggerPSUMsg = { +TriggerPSUMsg = {
Class = Message Class = Message
Destination = "TestApp.Data.UartOutDS" Destination = "TestApp.Data.UartOutDS"
Function = TriggerPSU Function = GoWaitTrigger
Mode = ExpectsReply Mode = ExpectsReply
} }
} }
@@ -102,6 +102,12 @@
Function = StartNextStateExecution Function = StartNextStateExecution
Mode = ExpectsReply Mode = ExpectsReply
} }
+TriggerPSUMsg = {
Class = Message
Destination = "TestApp.Data.UartOutDS"
Function = TriggerPSU
Mode = ExpectsReply
}
} }
+ERROR = { +ERROR = {
Class = StateMachineEvent Class = StateMachineEvent
@@ -138,6 +144,12 @@
Function = StartNextStateExecution Function = StartNextStateExecution
Mode = ExpectsReply Mode = ExpectsReply
} }
+TriggerPSUMsg = {
Class = Message
Destination = "TestApp.Data.UartOutDS"
Function = GoOnlineIdle
Mode = ExpectsReply
}
} }
+ERROR = { +ERROR = {
Class = StateMachineEvent Class = StateMachineEvent
@@ -363,7 +375,7 @@ $TestApp = {
+Thread1 = { +Thread1 = {
Class = RealTimeThread Class = RealTimeThread
CPUs = 0x1 CPUs = 0x1
Functions = {GAMTimer GAMWF GAMDisplay} Functions = {GAMTimer GAMWF SerialOutGAM GAMDisplay}
} }
} }
} }

View File

@@ -434,6 +434,22 @@ bool PSUCommunicatorTX::Synchronise() {
return ok; return ok;
} }
// Messages // Messages
ErrorManagement::ErrorType PSUCommunicatorTX::GoOnlineIdle() {
ErrorManagement::ErrorType err;
REPORT_ERROR(ErrorManagement::Information,
"PSUCommunicatorTX::GoOnlineIdle. Got Message!");
communicatorOnlineStage = FA_COMMUNICATOR_ONLINE_IDLE;
return err;
}
ErrorManagement::ErrorType PSUCommunicatorTX::GoWaitTrigger() {
ErrorManagement::ErrorType err;
REPORT_ERROR(ErrorManagement::Information,
"PSUCommunicatorTX::GoWaitTrigger. Got Message!");
communicatorOnlineStage = FA_COMMUNICATOR_ONLINE_WAIT_CODAC_TRIGGER;
return err;
}
ErrorManagement::ErrorType PSUCommunicatorTX::TriggerPSU() { ErrorManagement::ErrorType PSUCommunicatorTX::TriggerPSU() {
ErrorManagement::ErrorType err; ErrorManagement::ErrorType err;
REPORT_ERROR(ErrorManagement::Information, REPORT_ERROR(ErrorManagement::Information,
@@ -442,17 +458,10 @@ ErrorManagement::ErrorType PSUCommunicatorTX::TriggerPSU() {
return err; 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_REGISTER(PSUCommunicatorTX, "1.0")
CLASS_METHOD_REGISTER(PSUCommunicatorTX, GoOnlineIdle)
CLASS_METHOD_REGISTER(PSUCommunicatorTX, GoWaitTrigger)
CLASS_METHOD_REGISTER(PSUCommunicatorTX, TriggerPSU) CLASS_METHOD_REGISTER(PSUCommunicatorTX, TriggerPSU)
CLASS_METHOD_REGISTER(PSUCommunicatorTX, GoOnline)
} // namespace MARTe } // namespace MARTe
// vim: syntax=cpp ts=2 sw=2 sts=2 sr et // vim: syntax=cpp ts=2 sw=2 sts=2 sr et

View File

@@ -203,8 +203,9 @@ public:
* It can be called within a * It can be called within a
* MARTe message. * MARTe message.
*/ */
ErrorManagement::ErrorType GoOnlineIdle();
ErrorManagement::ErrorType GoWaitTrigger();
ErrorManagement::ErrorType TriggerPSU(); ErrorManagement::ErrorType TriggerPSU();
ErrorManagement::ErrorType GoOnline();
private: private:
/** /**