diff --git a/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/state_machine/0_initial.marte b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/state_machine/0_initial.marte new file mode 100644 index 0000000..f1d10e2 --- /dev/null +++ b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/state_machine/0_initial.marte @@ -0,0 +1,46 @@ +#package jada_gyro.StateMachine + ++INITIAL = { + Class = ReferenceContainer + +Start = { + Class = StateMachineEvent + NextState = "WAITSTANDBY" + NextStateError = "ERROR" + +PrepareNextStateMsg = { + Class = Message + Destination = RTApp + Mode = "ExpectsReply" + Function = "PrepareNextState" + +Parameters = { + Class = ConfigurationDatabase + param1 = WaitStandby + } + } + +StartNextStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StartNextStateExecution" + Mode = "ExpectsReply" + } + +SetState = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_STATE + SignalValue = @state_standby + } + } + +SetFault = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_FAULT + SignalValue = 0 + } + } + } +} diff --git a/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/state_machine/1_waitstandby.marte b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/state_machine/1_waitstandby.marte new file mode 100644 index 0000000..3e7c07e --- /dev/null +++ b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/state_machine/1_waitstandby.marte @@ -0,0 +1,146 @@ +#package jada_gyro.StateMachine + ++WAITSTANDBY = { + Class = ReferenceContainer + +GoWaitReady = { + Class = StateMachineEvent + NextState = WAITREADY + NextStateError = ERROR + +StopCurrentStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StopCurrentStateExecution" + Mode = "ExpectsReply" + } + +PrepareNextStateMsg = { + Class = Message + Destination = RTApp + Mode = "ExpectsReply" + Function = "PrepareNextState" + +Parameters = { + Class = ConfigurationDatabase + param1 = WaitReady + } + } + +StartNextStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StartNextStateExecution" + Mode = "ExpectsReply" + } + +SetState = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_STATE + SignalValue = @state_ready + } + } + +SetFault = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_FAULT + SignalValue = 0 + } + } + } + +GoDisabled = { + Class = StateMachineEvent + NextState = DISABLED + NextStateError = ERROR + +StopCurrentStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StopCurrentStateExecution" + Mode = "ExpectsReply" + } + +PrepareNextStateMsg = { + Class = Message + Destination = RTApp + Mode = "ExpectsReply" + Function = "PrepareNextState" + +Parameters = { + Class = ConfigurationDatabase + param1 = Disabled + } + } + +StartNextStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StartNextStateExecution" + Mode = "ExpectsReply" + } + +SetState = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_STATE + SignalValue = @state_disabled + } + } + +SetFault = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_FAULT + SignalValue = 0 + } + } + } + +GoError = { + Class = StateMachineEvent + NextState = ERROR + NextStateError = ERROR + +StopCurrentStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StopCurrentStateExecution" + Mode = "ExpectsReply" + } + +PrepareNextStateMsg = { + Class = Message + Destination = RTApp + Mode = "ExpectsReply" + Function = "PrepareNextState" + +Parameters = { + Class = ConfigurationDatabase + param1 = Error + } + } + +StartNextStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StartNextStateExecution" + Mode = "ExpectsReply" + } + +SetState = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_STATE + SignalValue = @state_error + } + } + +SetFault = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_FAULT + SignalValue = 1 + } + } + } +} diff --git a/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/state_machine/2_waitready.marte b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/state_machine/2_waitready.marte new file mode 100644 index 0000000..cc4aaa3 --- /dev/null +++ b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/state_machine/2_waitready.marte @@ -0,0 +1,146 @@ +#package jada_gyro.StateMachine + ++WAITREADY = { + Class = ReferenceContainer + +GoWaitStandby = { + Class = StateMachineEvent + NextState = WAITSTANDBY + NextStateError = ERROR + +StopCurrentStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StopCurrentStateExecution" + Mode = "ExpectsReply" + } + +PrepareNextStateMsg = { + Class = Message + Destination = RTApp + Mode = "ExpectsReply" + Function = "PrepareNextState" + +Parameters = { + Class = ConfigurationDatabase + param1 = WaitStandby + } + } + +StartNextStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StartNextStateExecution" + Mode = "ExpectsReply" + } + +SetState = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_STATE + SignalValue = @state_standby + } + } + +SetFault = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_FAULT + SignalValue = 0 + } + } + } + +GoWaitPermit = { + Class = StateMachineEvent + NextState = WAITPERMIT + NextStateError = ERROR + +StopCurrentStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StopCurrentStateExecution" + Mode = "ExpectsReply" + } + +PrepareNextStateMsg = { + Class = Message + Destination = RTApp + Mode = "ExpectsReply" + Function = "PrepareNextState" + +Parameters = { + Class = ConfigurationDatabase + param1 = WaitPermit + } + } + +StartNextStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StartNextStateExecution" + Mode = "ExpectsReply" + } + +SetState = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_STATE + SignalValue = @state_permit + } + } + +SetFault = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_FAULT + SignalValue = 0 + } + } + } + +GoError = { + Class = StateMachineEvent + NextState = ERROR + NextStateError = ERROR + +StopCurrentStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StopCurrentStateExecution" + Mode = "ExpectsReply" + } + +PrepareNextStateMsg = { + Class = Message + Destination = RTApp + Mode = "ExpectsReply" + Function = "PrepareNextState" + +Parameters = { + Class = ConfigurationDatabase + param1 = Error + } + } + +StartNextStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StartNextStateExecution" + Mode = "ExpectsReply" + } + +SetState = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_STATE + SignalValue = @state_error + } + } + +SetFault = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_FAULT + SignalValue = 1 + } + } + } +} diff --git a/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/state_machine/3_waitpermit.marte b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/state_machine/3_waitpermit.marte new file mode 100644 index 0000000..0a3fb10 --- /dev/null +++ b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/state_machine/3_waitpermit.marte @@ -0,0 +1,287 @@ +#package jada_gyro.StateMachine + ++WAITPERMIT = { + Class = ReferenceContainer + +GoWaitReady = { + Class = StateMachineEvent + NextState = WAITREADY + NextStateError = ERROR + +StopCurrentStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StopCurrentStateExecution" + Mode = "ExpectsReply" + } + +PrepareNextStateMsg = { + Class = Message + Destination = RTApp + Mode = "ExpectsReply" + Function = "PrepareNextState" + +Parameters = { + Class = ConfigurationDatabase + param1 = WaitReady + } + } + +StartNextStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StartNextStateExecution" + Mode = "ExpectsReply" + } + +SetState = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_STATE + SignalValue = @state_ready + } + } + +SetFault = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_FAULT + SignalValue = 0 + } + } + } + +GoWaitHVON = { + Class = StateMachineEvent + NextState = WAITHVON + NextStateError = ERROR + +StopCurrentStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StopCurrentStateExecution" + Mode = "ExpectsReply" + } + +PrepareNextStateMsg = { + Class = Message + Destination = RTApp + Mode = "ExpectsReply" + Function = "PrepareNextState" + +Parameters = { + Class = ConfigurationDatabase + param1 = WaitHVON + } + } + +StartNextStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StartNextStateExecution" + Mode = "ExpectsReply" + } + +SetState = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_STATE + SignalValue = @state_hvon + } + } + +SetFault = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_FAULT + SignalValue = 0 + } + } + } + +GoWaitHVON_SDN = { + Class = StateMachineEvent + NextState = WAITHVON_SDN + NextStateError = ERROR + +StopCurrentStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StopCurrentStateExecution" + Mode = "ExpectsReply" + } + +PrepareNextStateMsg = { + Class = Message + Destination = RTApp + Mode = "ExpectsReply" + Function = "PrepareNextState" + +Parameters = { + Class = ConfigurationDatabase + param1 = WaitHVON_SDN + } + } + +StartNextStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StartNextStateExecution" + Mode = "ExpectsReply" + } + +SetState = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_STATE + SignalValue = @state_hvon_sdn + } + } + +SetFault = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_FAULT + SignalValue = 0 + } + } + } + +GoWaitHVON_PREP = { + Class = StateMachineEvent + NextState = WAITHVON_PREP + NextStateError = ERROR + +StopCurrentStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StopCurrentStateExecution" + Mode = "ExpectsReply" + } + +PrepareNextStateMsg = { + Class = Message + Destination = RTApp + Mode = "ExpectsReply" + Function = "PrepareNextState" + +Parameters = { + Class = ConfigurationDatabase + param1 = WaitHVON_PREP + } + } + +StartNextStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StartNextStateExecution" + Mode = "ExpectsReply" + } + +SetState = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_STATE + SignalValue = @state_hvon_prep + } + } + +SetFault = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_FAULT + SignalValue = 0 + } + } + } + +GoWaitHVON_SDN_PREP = { + Class = StateMachineEvent + NextState = WAITHVON_SDN_PREP + NextStateError = ERROR + +StopCurrentStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StopCurrentStateExecution" + Mode = "ExpectsReply" + } + +PrepareNextStateMsg = { + Class = Message + Destination = RTApp + Mode = "ExpectsReply" + Function = "PrepareNextState" + +Parameters = { + Class = ConfigurationDatabase + param1 = WaitHVON_SDN_PREP + } + } + +StartNextStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StartNextStateExecution" + Mode = "ExpectsReply" + } + +SetState = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_STATE + SignalValue = @state_hvon_sdn_prep + } + } + +SetFault = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_FAULT + SignalValue = 0 + } + } + } + +GoError = { + Class = StateMachineEvent + NextState = ERROR + NextStateError = ERROR + +StopCurrentStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StopCurrentStateExecution" + Mode = "ExpectsReply" + } + +PrepareNextStateMsg = { + Class = Message + Destination = RTApp + Mode = "ExpectsReply" + Function = "PrepareNextState" + +Parameters = { + Class = ConfigurationDatabase + param1 = Error + } + } + +StartNextStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StartNextStateExecution" + Mode = "ExpectsReply" + } + +SetState = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_STATE + SignalValue = @state_error + } + } + +SetFault = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_FAULT + SignalValue = 1 + } + } + } +} diff --git a/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/state_machine/4_waithvon.marte b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/state_machine/4_waithvon.marte new file mode 100644 index 0000000..a3891c7 --- /dev/null +++ b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/state_machine/4_waithvon.marte @@ -0,0 +1,146 @@ +#package jada_gyro.StateMachine + ++WAITHVON = { + Class = ReferenceContainer + +GoWaitStandby = { + Class = StateMachineEvent + NextState = WAITSTANDBY + NextStateError = ERROR + +StopCurrentStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StopCurrentStateExecution" + Mode = "ExpectsReply" + } + +PrepareNextStateMsg = { + Class = Message + Destination = RTApp + Mode = "ExpectsReply" + Function = "PrepareNextState" + +Parameters = { + Class = ConfigurationDatabase + param1 = WaitStandby + } + } + +StartNextStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StartNextStateExecution" + Mode = "ExpectsReply" + } + +SetState = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_STATE + SignalValue = @state_standby + } + } + +SetFault = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_FAULT + SignalValue = 0 + } + } + } + +GoWaitPermit = { + Class = StateMachineEvent + NextState = WAITPERMIT + NextStateError = ERROR + +StopCurrentStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StopCurrentStateExecution" + Mode = "ExpectsReply" + } + +PrepareNextStateMsg = { + Class = Message + Destination = RTApp + Mode = "ExpectsReply" + Function = "PrepareNextState" + +Parameters = { + Class = ConfigurationDatabase + param1 = WaitPermit + } + } + +StartNextStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StartNextStateExecution" + Mode = "ExpectsReply" + } + +SetState = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_STATE + SignalValue = @state_permit + } + } + +SetFault = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_FAULT + SignalValue = 0 + } + } + } + +GoError = { + Class = StateMachineEvent + NextState = ERROR + NextStateError = ERROR + +StopCurrentStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StopCurrentStateExecution" + Mode = "ExpectsReply" + } + +PrepareNextStateMsg = { + Class = Message + Destination = RTApp + Mode = "ExpectsReply" + Function = "PrepareNextState" + +Parameters = { + Class = ConfigurationDatabase + param1 = Error + } + } + +StartNextStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StartNextStateExecution" + Mode = "ExpectsReply" + } + +SetState = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_STATE + SignalValue = @state_error + } + } + +SetFault = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_FAULT + SignalValue = 1 + } + } + } +} diff --git a/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/state_machine/5_waithvon_prep.marte b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/state_machine/5_waithvon_prep.marte new file mode 100644 index 0000000..635dfab --- /dev/null +++ b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/state_machine/5_waithvon_prep.marte @@ -0,0 +1,146 @@ +#package jada_gyro.StateMachine + ++WAITHVON_PREP = { + Class = ReferenceContainer + +GoWaitStandby = { + Class = StateMachineEvent + NextState = WAITSTANDBY + NextStateError = ERROR + +StopCurrentStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StopCurrentStateExecution" + Mode = "ExpectsReply" + } + +PrepareNextStateMsg = { + Class = Message + Destination = RTApp + Mode = "ExpectsReply" + Function = "PrepareNextState" + +Parameters = { + Class = ConfigurationDatabase + param1 = WaitStandby + } + } + +StartNextStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StartNextStateExecution" + Mode = "ExpectsReply" + } + +SetState = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_STATE + SignalValue = @state_standby + } + } + +SetFault = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_FAULT + SignalValue = 0 + } + } + } + +GoWaitPermit = { + Class = StateMachineEvent + NextState = WAITPERMIT + NextStateError = ERROR + +StopCurrentStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StopCurrentStateExecution" + Mode = "ExpectsReply" + } + +PrepareNextStateMsg = { + Class = Message + Destination = RTApp + Mode = "ExpectsReply" + Function = "PrepareNextState" + +Parameters = { + Class = ConfigurationDatabase + param1 = WaitPermit + } + } + +StartNextStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StartNextStateExecution" + Mode = "ExpectsReply" + } + +SetState = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_STATE + SignalValue = @state_permit + } + } + +SetFault = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_FAULT + SignalValue = 0 + } + } + } + +GoError = { + Class = StateMachineEvent + NextState = ERROR + NextStateError = ERROR + +StopCurrentStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StopCurrentStateExecution" + Mode = "ExpectsReply" + } + +PrepareNextStateMsg = { + Class = Message + Destination = RTApp + Mode = "ExpectsReply" + Function = "PrepareNextState" + +Parameters = { + Class = ConfigurationDatabase + param1 = Error + } + } + +StartNextStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StartNextStateExecution" + Mode = "ExpectsReply" + } + +SetState = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_STATE + SignalValue = @state_error + } + } + +SetFault = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_FAULT + SignalValue = 1 + } + } + } +} diff --git a/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/state_machine/6_waithvon_sdn.marte b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/state_machine/6_waithvon_sdn.marte new file mode 100644 index 0000000..234c426 --- /dev/null +++ b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/state_machine/6_waithvon_sdn.marte @@ -0,0 +1,146 @@ +#package jada_gyro.StateMachine + ++WAITHVON_SDN = { + Class = ReferenceContainer + +GoWaitStandby = { + Class = StateMachineEvent + NextState = WAITSTANDBY + NextStateError = ERROR + +StopCurrentStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StopCurrentStateExecution" + Mode = "ExpectsReply" + } + +PrepareNextStateMsg = { + Class = Message + Destination = RTApp + Mode = "ExpectsReply" + Function = "PrepareNextState" + +Parameters = { + Class = ConfigurationDatabase + param1 = WaitStandby + } + } + +StartNextStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StartNextStateExecution" + Mode = "ExpectsReply" + } + +SetState = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_STATE + SignalValue = @state_standby + } + } + +SetFault = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_FAULT + SignalValue = 0 + } + } + } + +GoWaitPermit = { + Class = StateMachineEvent + NextState = WAITPERMIT + NextStateError = ERROR + +StopCurrentStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StopCurrentStateExecution" + Mode = "ExpectsReply" + } + +PrepareNextStateMsg = { + Class = Message + Destination = RTApp + Mode = "ExpectsReply" + Function = "PrepareNextState" + +Parameters = { + Class = ConfigurationDatabase + param1 = WaitPermit + } + } + +StartNextStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StartNextStateExecution" + Mode = "ExpectsReply" + } + +SetState = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_STATE + SignalValue = @state_permit + } + } + +SetFault = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_FAULT + SignalValue = 0 + } + } + } + +GoError = { + Class = StateMachineEvent + NextState = ERROR + NextStateError = ERROR + +StopCurrentStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StopCurrentStateExecution" + Mode = "ExpectsReply" + } + +PrepareNextStateMsg = { + Class = Message + Destination = RTApp + Mode = "ExpectsReply" + Function = "PrepareNextState" + +Parameters = { + Class = ConfigurationDatabase + param1 = Error + } + } + +StartNextStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StartNextStateExecution" + Mode = "ExpectsReply" + } + +SetState = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_STATE + SignalValue = @state_error + } + } + +SetFault = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_FAULT + SignalValue = 1 + } + } + } +} diff --git a/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/state_machine/7_waithvon_sdn_prep.marte b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/state_machine/7_waithvon_sdn_prep.marte new file mode 100644 index 0000000..289205b --- /dev/null +++ b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/state_machine/7_waithvon_sdn_prep.marte @@ -0,0 +1,146 @@ +#package jada_gyro.StateMachine + ++WAITHVON_SDN_PREP = { + Class = ReferenceContainer + +GoWaitStandby = { + Class = StateMachineEvent + NextState = WAITSTANDBY + NextStateError = ERROR + +StopCurrentStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StopCurrentStateExecution" + Mode = "ExpectsReply" + } + +PrepareNextStateMsg = { + Class = Message + Destination = RTApp + Mode = "ExpectsReply" + Function = "PrepareNextState" + +Parameters = { + Class = ConfigurationDatabase + param1 = WaitStandby + } + } + +StartNextStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StartNextStateExecution" + Mode = "ExpectsReply" + } + +SetState = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_STATE + SignalValue = @state_standby + } + } + +SetFault = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_FAULT + SignalValue = 0 + } + } + } + +GoWaitPermit = { + Class = StateMachineEvent + NextState = WAITPERMIT + NextStateError = ERROR + +StopCurrentStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StopCurrentStateExecution" + Mode = "ExpectsReply" + } + +PrepareNextStateMsg = { + Class = Message + Destination = RTApp + Mode = "ExpectsReply" + Function = "PrepareNextState" + +Parameters = { + Class = ConfigurationDatabase + param1 = WaitPermit + } + } + +StartNextStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StartNextStateExecution" + Mode = "ExpectsReply" + } + +SetState = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_STATE + SignalValue = @state_permit + } + } + +SetFault = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_FAULT + SignalValue = 0 + } + } + } + +GoError = { + Class = StateMachineEvent + NextState = ERROR + NextStateError = ERROR + +StopCurrentStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StopCurrentStateExecution" + Mode = "ExpectsReply" + } + +PrepareNextStateMsg = { + Class = Message + Destination = RTApp + Mode = "ExpectsReply" + Function = "PrepareNextState" + +Parameters = { + Class = ConfigurationDatabase + param1 = Error + } + } + +StartNextStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StartNextStateExecution" + Mode = "ExpectsReply" + } + +SetState = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_STATE + SignalValue = @state_error + } + } + +SetFault = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_FAULT + SignalValue = 1 + } + } + } +} diff --git a/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/state_machine/8_error.marte b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/state_machine/8_error.marte new file mode 100644 index 0000000..ebd5411 --- /dev/null +++ b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/state_machine/8_error.marte @@ -0,0 +1,53 @@ +#package jada_gyro.StateMachine + +//# Error State (Enter by HVPS errors) ++ERROR = { + Class = ReferenceContainer + +GoWaitStandby = { + Class = StateMachineEvent + NextState = WAITSTANDBY + NextStateError = ERROR + +StopCurrentStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StopCurrentStateExecution" + Mode = "ExpectsReply" + } + +PrepareNextStateMsg = { + Class = Message + Destination = RTApp + Mode = "ExpectsReply" + Function = "PrepareNextState" + +Parameters = { + Class = ConfigurationDatabase + param1 = WaitStandby + } + } + +StartNextStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StartNextStateExecution" + Mode = "ExpectsReply" + } + +SetState = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_STATE + SignalValue = @state_standby + } + } + +SetFault = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_FAULT + SignalValue = 0 + } + } + } +} diff --git a/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/state_machine/9_disabled.marte b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/state_machine/9_disabled.marte new file mode 100644 index 0000000..a96a42a --- /dev/null +++ b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/state_machine/9_disabled.marte @@ -0,0 +1,99 @@ +#package jada_gyro.StateMachine + ++DISABLED = { + Class = ReferenceContainer + +GoWaitStandby = { + Class = StateMachineEvent + NextState = WAITSTANDBY + NextStateError = ERROR + +StopCurrentStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StopCurrentStateExecution" + Mode = "ExpectsReply" + } + +PrepareNextStateMsg = { + Class = Message + Destination = RTApp + Mode = "ExpectsReply" + Function = "PrepareNextState" + +Parameters = { + Class = ConfigurationDatabase + param1 = WaitStandby + } + } + +StartNextStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StartNextStateExecution" + Mode = "ExpectsReply" + } + +SetState = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_STATE + SignalValue = @state_standby + } + } + +SetFault = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_FAULT + SignalValue = 0 + } + } + } + +GoError = { + Class = StateMachineEvent + NextState = "ERROR" + NextStateError = "ERROR" + +StopCurrentStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StopCurrentStateExecution" + Mode = "ExpectsReply" + } + +PrepareNextStateMsg = { + Class = Message + Destination = RTApp + Mode = "ExpectsReply" + Function = "PrepareNextState" + +Parameters = { + Class = ConfigurationDatabase + param1 = Error + } + } + +StartNextStateExecutionMsg = { + Class = Message + Destination = RTApp + Function = "StartNextStateExecution" + Mode = "ExpectsReply" + } + +SetState = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_STATE + SignalValue = @state_error + } + } + +SetFault = { + Class = Message + Destination = RTApp.Functions.StateGAM + Function = "SetOutput" + +Parameters = { + Class = ConfigurationDatabase + SignalName = PCF_FAULT + SignalValue = 1 + } + } + } +}