diff --git a/Configurations/RTApp-2-Uart.cfg b/Configurations/RTApp-2-Uart.cfg index e8761f4..c9ec244 100644 --- a/Configurations/RTApp-2-Uart.cfg +++ b/Configurations/RTApp-2-Uart.cfg @@ -63,7 +63,7 @@ +TriggerPSUMsg = { Class = Message Destination = "TestApp.Data.UartOutDS" - Function = TriggerPSU + Function = GoWaitTrigger Mode = ExpectsReply } } @@ -102,6 +102,12 @@ Function = StartNextStateExecution Mode = ExpectsReply } + +TriggerPSUMsg = { + Class = Message + Destination = "TestApp.Data.UartOutDS" + Function = TriggerPSU + Mode = ExpectsReply + } } +ERROR = { Class = StateMachineEvent @@ -138,6 +144,12 @@ Function = StartNextStateExecution Mode = ExpectsReply } + +TriggerPSUMsg = { + Class = Message + Destination = "TestApp.Data.UartOutDS" + Function = GoOnlineIdle + Mode = ExpectsReply + } } +ERROR = { Class = StateMachineEvent @@ -363,7 +375,7 @@ $TestApp = { +Thread1 = { Class = RealTimeThread CPUs = 0x1 - Functions = {GAMTimer GAMWF GAMDisplay} + Functions = {GAMTimer GAMWF SerialOutGAM GAMDisplay} } } } diff --git a/DataSources/PSUCommunicator/PSUCommunicatorTX.cpp b/DataSources/PSUCommunicator/PSUCommunicatorTX.cpp index 94075c5..9ea3fec 100644 --- a/DataSources/PSUCommunicator/PSUCommunicatorTX.cpp +++ b/DataSources/PSUCommunicator/PSUCommunicatorTX.cpp @@ -434,6 +434,22 @@ bool PSUCommunicatorTX::Synchronise() { return ok; } // 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 err; REPORT_ERROR(ErrorManagement::Information, @@ -442,17 +458,10 @@ ErrorManagement::ErrorType PSUCommunicatorTX::TriggerPSU() { 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, GoOnlineIdle) +CLASS_METHOD_REGISTER(PSUCommunicatorTX, GoWaitTrigger) CLASS_METHOD_REGISTER(PSUCommunicatorTX, TriggerPSU) -CLASS_METHOD_REGISTER(PSUCommunicatorTX, GoOnline) } // namespace MARTe // vim: syntax=cpp ts=2 sw=2 sts=2 sr et diff --git a/DataSources/PSUCommunicator/PSUCommunicatorTX.h b/DataSources/PSUCommunicator/PSUCommunicatorTX.h index 10b33ab..60de39e 100644 --- a/DataSources/PSUCommunicator/PSUCommunicatorTX.h +++ b/DataSources/PSUCommunicator/PSUCommunicatorTX.h @@ -203,8 +203,9 @@ public: * It can be called within a * MARTe message. */ + ErrorManagement::ErrorType GoOnlineIdle(); + ErrorManagement::ErrorType GoWaitTrigger(); ErrorManagement::ErrorType TriggerPSU(); - ErrorManagement::ErrorType GoOnline(); private: /**