Signed-off-by: Bernardo Carvalho <bernardo.carvalho@tecnico.ulisboa.pt>
590 lines
18 KiB
C++
590 lines
18 KiB
C++
+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
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
+Types = {
|
||
Class = ReferenceContainer
|
||
+LangmuirStructure = {
|
||
Class = IntrospectionStructure
|
||
TimeSdas = {
|
||
Type = uint32
|
||
NumberOfElements = 1
|
||
}
|
||
SignalArray = {
|
||
Type = float32
|
||
NumberOfElements = 4
|
||
}
|
||
}
|
||
}
|
||
$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 = {
|
||
Inputs = {
|
||
DataSource = FileReader_DS
|
||
Type = LangmuirStructure
|
||
MemberAliases = {
|
||
Inputs.TimeSdas = TimeSdas
|
||
Inputs.SignalArray = LangmuirSignals
|
||
}
|
||
}
|
||
}
|
||
OutputSignals = {
|
||
LangmuirStrt = {
|
||
DataSource = DDB1
|
||
Type = LangmuirStructure
|
||
MemberAliases = {
|
||
TimeSdasA = "LangmuirStrt.TimeSdas"
|
||
LangmuirSignalsA = "LangmuirStrt.SignalArray"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
+FlatIOGAM = {
|
||
Class = FlattenedStructIOGAM
|
||
InputSignals = {
|
||
LangmuirStrt = { //Exactly one structure signal shall be defined.
|
||
Type = LangmuirStructure //The Type shall be structured and is required.
|
||
DataSource = DDB1 //Compulsory.
|
||
}
|
||
}
|
||
OutputSignals = {
|
||
LangmuirStrt_TimeSdas = {
|
||
Type = uint32
|
||
NumberOfElements = 1
|
||
}
|
||
LangmuirStrt_SignalArray = {
|
||
Type = float32
|
||
NumberOfElements = 4
|
||
}
|
||
}
|
||
}
|
||
|
||
+GAMLangSigs= {
|
||
Class = IOGAM
|
||
InputSignals = {
|
||
LangmuirStrt_SignalArray = {
|
||
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
|
||
}
|
||
}
|
||
}
|
||
/*
|
||
+GAMFileReaderS = {
|
||
Class = IOGAM
|
||
InputSignals = {
|
||
TimeSdas = {
|
||
DataSource = FileReaderS_DS
|
||
Type = uint32
|
||
}
|
||
LangmuirSignals = {
|
||
DataSource = FileReaderS_DS
|
||
Type = float32
|
||
NumberOfElements = 4
|
||
}
|
||
}
|
||
OutputSignals = {
|
||
TimeSdasS = {
|
||
DataSource = "DDB1"
|
||
Type = uint32
|
||
}
|
||
LangmuirS = {
|
||
DataSource = "DDB1"
|
||
Type = float32
|
||
NumberOfElements = 4
|
||
}
|
||
}
|
||
}
|
||
OutMdsW1 = {
|
||
DataSource = FileSignalsWriter
|
||
Type = float32
|
||
}
|
||
OutMdsW2 = {
|
||
DataSource = FileSignalsWriter
|
||
Type = float32
|
||
}
|
||
OutMdsW3 = {
|
||
DataSource = FileSignalsWriter
|
||
Type = float32
|
||
}
|
||
//"LangmuirStrt.SignalsL[0]" = {
|
||
LangmuirStrt_SignalArray = {
|
||
DataSource = "DDB1"
|
||
Type = float32
|
||
NumberOfElements = 4
|
||
}
|
||
*/
|
||
+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 = {
|
||
LangmuirStrt_SignalArray = {
|
||
DataSource = "DDB1"
|
||
Type = float32
|
||
NumberOfElements = 4
|
||
}
|
||
}
|
||
OutputSignals = {
|
||
SignalEP_OutR = {
|
||
DataSource = "DDB1"
|
||
Type = float32
|
||
}
|
||
SignalEP_OutZ = {
|
||
DataSource = "DDB1"
|
||
Type = float32
|
||
}
|
||
}
|
||
}
|
||
+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
|
||
}
|
||
}
|
||
OutputSignals = {
|
||
Time = {
|
||
DataSource = FileWriter_DS
|
||
Type = uint32
|
||
}
|
||
OutMdsW0 = {
|
||
DataSource = FileWriter_DS
|
||
Type = float32
|
||
}
|
||
OutMdsW1 = {
|
||
DataSource = FileWriter_DS
|
||
Type = float32
|
||
}
|
||
OutMdsW2 = {
|
||
DataSource = FileWriter_DS
|
||
Type = float32
|
||
}
|
||
OutMdsW3 = {
|
||
DataSource = FileWriter_DS
|
||
Type = float32
|
||
}
|
||
}
|
||
}
|
||
|
||
}
|
||
+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
|
||
}
|
||
}
|
||
}
|
||
+FileReader_DS = {
|
||
Class = FileDataSource::FileReader
|
||
Filename = "../Analysis/LangmuirSdas_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
|
||
}
|
||
OutMdsW0 = {
|
||
Type = float32
|
||
}
|
||
OutMdsW1 = {
|
||
Type = float32
|
||
}
|
||
OutMdsW2 = {
|
||
Type = float32
|
||
}
|
||
OutMdsW3 = {
|
||
Type = float32
|
||
}
|
||
}
|
||
}
|
||
|
||
}
|
||
+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 FlatIOGAM GAMLangSigs GAMElectricProbes GAMFileWriter }
|
||
}
|
||
}
|
||
}
|
||
}
|
||
+Scheduler = {
|
||
Class = GAMScheduler
|
||
TimingDataSource = Timings
|
||
}
|
||
}
|
||
// vim: syntax=cpp ts=4 sw=4 sts=4 sr et
|