Files
MARTe2-isttok/Configurations/RTApp-Isttok-File.cfg
2024-12-09 15:33:14 +00:00

681 lines
21 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
+EPICSCAInterface= {
Class = EPICS::EPICSCAClient
StackSize = 1048576
CPUs = 0x1
AutoStart = 0
+PV_STATUS = {
Class = EPICS::EPICSPV
PVName = "MARTE2-DEMO-APP:STATUS"
PVType = int32
}
+PV_COMMAND = {
Class = EPICS::EPICSPV
PVName = "MARTE2-DEMO-APP:COMMAND"
PVType = uint32
Event = {
Destination = StateMachine
PVValue = Function
FunctionMap = {{"2", "GOTOPULSING"}, {"1", "GOTOWAITING_FOR_PRE"}, {"0", "GOTOIDLE"}}
}
}
}
+WebRoot = {
Class = HttpObjectBrowser
Root = "."
+ObjectBrowse = {
Class = HttpObjectBrowser
Root = "/"
}
+ResourcesHtml = {
Class = HttpDirectoryResource
BaseDir = "../../MARTe2/MARTe2/Resources/HTTP/"
}
+HttpMessageInterface = {
Class = HttpMessageInterface
+GOTOIDLE = {
Class = Message
Destination = StateMachine
Function = GOTOIDLE
Mode = ExpectsReply
}
+GOTOWAITING_FOR_PRE = {
Class = Message
Destination = StateMachine
Function = GOTOWAITING_FOR_PRE
Mode = ExpectsReply
}
+GOTOPULSING = {
Class = Message
Destination = StateMachine
Function = GOTOPULSING
Mode = ExpectsReply
}
+GOTOERR = {
Class = Message
Destination = StateMachineError
Function = GOTOERR
Mode = ExpectsReply
}
}
}
+WebServer = {
Class = HttpService
Port = 8084
WebRoot = WebRoot
Timeout = 0
ListenMaxConnections = 255
AcceptTimeout = 1000
MaxNumberOfThreads = 8
MinNumberOfThreads = 1
}
+StateMachine = {
Class = StateMachine
+INITIAL = {
Class = ReferenceContainer
+START = {
Class = StateMachineEvent
NextState = "IDLE"
NextStateError = "IDLE"
Timeout = 0
+StartHttpServer = {
Class = Message
Destination = "WebServer"
Function = "Start"
Mode = ExpectsReply
}
+StartEPICSCAInterface = {
Class = Message
Destination = "EPICSCAInterface"
Mode = ExpectsReply
Function = "Start"
}
+ChangeToStateIdleMsg = {
Class = Message
Destination = MdsLoopApp
Mode = ExpectsReply
Function = PrepareNextState
+Parameters = {
Class = ConfigurationDatabase
param1 = Idle
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = MdsLoopApp
Function = StartNextStateExecution
Mode = ExpectsReply
}
}
}
+IDLE = {
Class = ReferenceContainer
+GOTOWAITING_FOR_PRE = {
Class = StateMachineEvent
NextState = "WAITING_FOR_PRE"
NextStateError = "IDLE"
Timeout = 0
+ChangeToWaitPreMsg = {
Class = Message
Destination = MdsLoopApp
Mode = ExpectsReply
Function = PrepareNextState
+Parameters = {
Class = ConfigurationDatabase
param1 = Online
}
}
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = MdsLoopApp
Function = StopCurrentStateExecution
Mode = ExpectsReply
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = MdsLoopApp
Function = StartNextStateExecution
Mode = ExpectsReply
}
}
}
+WAITING_FOR_PRE = {
Class = ReferenceContainer
+ENTER = {
Class = ReferenceContainer
+SetStatusPV = {
Class = Message
Destination = "EPICSCAInterface.PV_STATUS"
Function = CAPut
Mode = ExpectsReply
+Parameters = {
Class = ConfigurationDatabase
param1 = 1
}
}
}
+GOTOPULSING = {
Class = StateMachineEvent
NextState = "PULSING"
NextStateError = "IDLE"
Timeout = 0
+ChangeToRunMsg = {
Class = Message
Destination = MdsLoopApp
Mode = ExpectsReply
Function = PrepareNextState
+Parameters = {
Class = ConfigurationDatabase
param1 = Online
}
}
/*
+CalcOffSetsMsg = {
Class = "Message"
Destination = "MdsLoopApp.Functions.GAMElectricProbes"
Function = "CalcOffSets"
Mode = "ExpectsReply"
}
*/
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = MdsLoopApp
Function = StopCurrentStateExecution
Mode = ExpectsReply
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = MdsLoopApp
Function = StartNextStateExecution
Mode = ExpectsReply
}
}
}
+PULSING = {
Class = ReferenceContainer
+ENTER = {
Class = ReferenceContainer
+SetStatusPV = {
Class = Message
Destination = "EPICSCAInterface.PV_STATUS"
Function = CAPut
Mode = ExpectsReply
+Parameters = {
Class = ConfigurationDatabase
param1 = 2
}
}
}
+GOTOIDLE = {
Class = StateMachineEvent
NextState = "IDLE"
NextStateError = "IDLE"
Timeout = 0
+ChangeToIdleMsg = {
Class = Message
Destination = MdsLoopApp
Mode = ExpectsReply
Function = PrepareNextState
+Parameters = {
Class = ConfigurationDatabase
param1 = Idle
}
}
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = MdsLoopApp
Function = StopCurrentStateExecution
Mode = ExpectsReply
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = MdsLoopApp
Function = StartNextStateExecution
Mode = ExpectsReply
}
+SetStatusPV = {
Class = Message
Destination = "EPICSCAInterface.PV_STATUS"
Function = CAPut
Mode = ExpectsReply
+Parameters = {
Class = ConfigurationDatabase
param1 = 0
}
}
}
}
}
$MdsLoopApp = {
Class = RealTimeApplication
+Functions = {
Class = ReferenceContainer
+GAMTimer = {
Class = IOGAM
InputSignals = {
Counter = {
DataSource = Timer
Type = uint32
}
Time = {
Frequency = 10000
DataSource = Timer
Type = uint32
}
Idle_Thread1_CycleTime = {
DataSource = Timings
Alias = "Idle.Thread1_CycleTime"
Type = uint32
}
Run_Thread1_CycleTime = {
DataSource = Timings
Alias = "Online.Thread1_CycleTime"
Type = uint32
}
}
OutputSignals = {
Counter = {
DataSource = DDB1
Type = uint32
}
Time = {
DataSource = DDB1
Type = uint32
}
Idle_Thread1_CycleTime = {
DataSource = DDB1
Type = uint32
}
Run_Thread1_CycleTime = {
DataSource = DDB1
Type = uint32
}
}
}
+GAMFileReader = {
Class = IOGAM
InputSignals = {
TimeSdas = {
DataSource = FileReaderDS
Type = uint32
}
Trigger = {
DataSource = FileReaderDS
Type = uint32
}
LangmuirSignals = {
DataSource = FileReaderDS
Type = float32
}
MagneticSignals = {
DataSource = FileReaderDS
Type = float32
}
}
OutputSignals = {
TimeSdas = {
DataSource = "DDB1"
Type = uint32
}
TriggerSdas = {
DataSource = "DDB1"
Type = uint32
}
LangmuirSigs = {
DataSource = "DDB1"
Type = float32
NumberOfElements = 4
// NumberOfDimensions = 1
}
MagneticSignals = {
DataSource = "DDB1"
Type = float32
NumberOfElements = 12
NumberOfDimensions = 1
}
}
}
+GAMConvert2Double = {
Class = "ConversionGAM"
InputSignals = {
MagneticSignals = {
DataSource = "DDB1"
Type = float32
NumberOfElements = 12
}
}
OutputSignals = {
MagneticSignalsD = {
DataSource = "DDB1"
Type = float64
NumberOfElements = 12
NumberOfDimensions = 1
}
}
}
+GAMLangSigs= {
Class = IOGAM
InputSignals = {
LangmuirSigs = {
DataSource = "DDB1"
Type = float32
NumberOfElements = 4
}
}
OutputSignals = {
Langmuir0 = {
DataSource = "DDB1"
Type = float32
}
Langmuir1 = {
DataSource = "DDB1"
Type = float32
}
Langmuir2 = {
DataSource = "DDB1"
Type = float32
}
Langmuir3 = {
DataSource = "DDB1"
Type = float32
}
}
}
+GAMElectricProbes = {
Class = ElectricProbesGAM
Gain = 5 //Compulsory
NumberOfSamplesAvg = 5 //Compulsory
ResetInEachState = 0 //Compulsory. 1> reset in each state, 0> reset if the previous state is different from the next state
InputSignals = {
TriggerSdas = {
DataSource = "DDB1"
Type = uint32
}
LangmuirSigs = {
DataSource = "DDB1"
Type = float32
NumberOfElements = 4
}
}
OutputSignals = {
SignalEP_OutR = {
DataSource = "DDB1"
Type = float32
}
SignalEP_OutZ = {
DataSource = "DDB1"
Type = float32
}
}
}
+GAMMagSigs= {
Class = IOGAM
InputSignals = {
MagneticSignalsD = {
DataSource = "DDB1"
Type = float64
NumberOfElements = 12
}
}
OutputSignals = {
MirnovD0 = {
DataSource = "DDB1"
Type = float64
}
MirnovD1 = {
DataSource = "DDB1"
Type = float64
}
MirnovD2 = {
DataSource = "DDB1"
Type = float64
}
MirnovD3 = {
DataSource = "DDB1"
Type = float64
}
MirnovD4 = {
DataSource = "DDB1"
Type = float64
}
MirnovD5 = {
DataSource = "DDB1"
Type = float64
}
MirnovD6 = {
DataSource = "DDB1"
Type = float64
}
MirnovD7 = {
DataSource = "DDB1"
Type = float64
}
MirnovD8 = {
DataSource = "DDB1"
Type = float64
}
MirnovD9 = {
DataSource = "DDB1"
Type = float64
}
MirnovD10 = {
DataSource = "DDB1"
Type = float64
}
MirnovD11 = {
DataSource = "DDB1"
Type = float64
}
}
}
+GAMSSM = {
Class = SSMGAM
StateMatrix = {{1.0 0}{0 1.0}} //Compulsory
InputMatrix = {{0 0 0 0}{0 0 0 0}} //Compulsory
OutputMatrix = {{0 0}} //Compulsory
FeedthroughMatrix = {{1 1 1 1}} //Optional
ResetInEachState = 1//Compulsory. 1> reset in each state, 0> reset if the previous state is different from the next state
SampleFrequency = 0.0001 // Currently optional and not used.
InputSignals = {
MirnovD0 = { //input of the SS
DataSource = "DDB1"
Type = float64 //Only supported type.
NumberOfElements = 1
NumberOfDimensions = 1 // or 0
Samples = 1
}
MirnovD1 = {
DataSource = "DDB1"
Type = float64 //Only supported type.
NumberOfElements = 1
NumberOfDimensions = 1
Samples = 1
}
MirnovD2 = {
DataSource = "DDB1"
Type = float64 //Only supported type.
NumberOfElements = 1
NumberOfDimensions = 1
Samples = 1
}
MirnovD3 = {
DataSource = "DDB1"
Type = float64 //Only supported type.
NumberOfElements = 1
NumberOfDimensions = 1
Samples = 1
}
}
OutputSignals = {
OutputSignalSSM = {
DataSource = "DDB1"
Type = float64
}
State0 = {
Type = float64
DataSource = "DDB1"
}
State1 = {
Type = float64
DataSource = "DDB1"
}
}
}
+GAMFileWriter = {
Class = IOGAM
InputSignals = {
Time = {
DataSource = "DDB1"
Type = uint32
}
Langmuir0 = {
DataSource = "DDB1"
Type = float32
}
Langmuir1 = {
DataSource = "DDB1"
Type = float32
}
SignalEP_OutR = {
DataSource = "DDB1"
Type = float32
}
SignalEP_OutZ = {
DataSource = "DDB1"
Type = float32
}
OutputSignalSSM = {
DataSource = "DDB1"
Type = float64
}
}
OutputSignals = {
Time = {
DataSource = FileWriter_DS
Type = uint32
}
OutLangW0 = {
DataSource = FileWriter_DS
Type = float32
}
OutLangW1 = {
DataSource = FileWriter_DS
Type = float32
}
OutLangW2 = {
DataSource = FileWriter_DS
Type = float32
}
OutLangW3 = {
DataSource = FileWriter_DS
Type = float32
}
OutMag0 = {
DataSource = FileWriter_DS
Type = float64
}
}
}
}
+Data = {
Class = ReferenceContainer
DefaultDataSource = DDB1
+DDB1 = {
Class = GAMDataSource
}
+LoggerDataSource = {
Class = LoggerDataSource
}
+Timings = {
Class = TimingDataSource
}
+Timer = {
Class = LinuxTimer
SleepNature = "Default"
ExecutionMode = RealTimeThread
Signals = {
Counter = {
Type = uint32
}
Time = {
Type = uint32
}
}
}
+FileReaderDS = {
Class = FileDataSource::FileReader
// Filename = "../Analysis/LangmuirSdas_46241.csv"
Filename = "../Analysis/SdasData_46241.csv"
FileFormat = "csv"
CSVSeparator = ","
Interpolate = "no"
Preload = "yes" //Optional
EOF = "Last" // "Rewind"
}
+FileWriter_DS = {
Class = FileDataSource::FileWriter
NumberOfBuffers = 10000
CPUMask = 1
StackSize = 10000000
Filename = "IsttokOutput.csv"
Overwrite = "yes"
FileFormat = "csv"
CSVSeparator = ","
StoreOnTrigger = 0 //Compulsory. If 0 all the data in the circular buffer is continuously stored. If 1 data is stored when the Trigger signal is 1 (see below).
Signals = {
Time = {
Type = uint32
}
OutLangW0 = {
Type = float32
}
OutLangW1 = {
Type = float32
}
OutLangW2 = {
Type = float32
}
OutLangW3 = {
Type = float32
}
OutMag0 = {
Type = float64
Format = "e" //Optional. Any format specifier supported by FormatDescriptor (without '')
}
}
}
}
+States = {
Class = ReferenceContainer
+Idle = {
Class = RealTimeState
+Threads = {
Class = ReferenceContainer
+Thread1 = {
Class = RealTimeThread
CPUs = 0x1
Functions = {GAMTimer }
}
}
}
+Online = {
Class = RealTimeState
+Threads = {
Class = ReferenceContainer
+Thread1 = {
Class = RealTimeThread
CPUs = 0x1
Functions = {GAMTimer GAMFileReader GAMConvert2Double GAMMagSigs GAMSSM GAMLangSigs GAMElectricProbes GAMFileWriter }
}
}
}
}
+Scheduler = {
Class = GAMScheduler
TimingDataSource = Timings
}
}
// vim: syntax=cpp ts=4 sw=4 sts=4 sr et