Added MDS Import files
Signed-off-by: Bernardo Carvalho <bernardo.carvalho@tecnico.ulisboa.pt>
This commit is contained in:
444
Configurations/RTApp-Sdas-to-MDSplus.cfg
Normal file
444
Configurations/RTApp-Sdas-to-MDSplus.cfg
Normal file
@@ -0,0 +1,444 @@
|
||||
+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 = {{"1", "GOTORUN"}, {"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
|
||||
}
|
||||
+GOTORUN = {
|
||||
Class = Message
|
||||
Destination = StateMachine
|
||||
Function = GOTORUN
|
||||
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"
|
||||
}
|
||||
+OpenTreeMsg = {
|
||||
Class = Message
|
||||
Destination = "MdsLoopApp.Data.MDSWriter"
|
||||
Function = OpenTree
|
||||
Mode = ExpectsReply
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
param1 = 1
|
||||
}
|
||||
}
|
||||
+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
|
||||
+GOTORUN = {
|
||||
Class = StateMachineEvent
|
||||
NextState = "RUN"
|
||||
NextStateError = "IDLE"
|
||||
Timeout = 0
|
||||
+ChangeToRunMsg = {
|
||||
Class = Message
|
||||
Destination = MdsLoopApp
|
||||
Mode = ExpectsReply
|
||||
Function = PrepareNextState
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
param1 = Run
|
||||
}
|
||||
}
|
||||
+StopCurrentStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = MdsLoopApp
|
||||
Function = StopCurrentStateExecution
|
||||
Mode = ExpectsReply
|
||||
}
|
||||
+StartNextStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = MdsLoopApp
|
||||
Function = StartNextStateExecution
|
||||
Mode = ExpectsReply
|
||||
}
|
||||
}
|
||||
}
|
||||
+RUN = {
|
||||
Class = ReferenceContainer
|
||||
+ENTER = {
|
||||
Class = ReferenceContainer
|
||||
+SetStatusPV = {
|
||||
Class = Message
|
||||
Destination = "EPICSCAInterface.PV_STATUS"
|
||||
Function = CAPut
|
||||
Mode = ExpectsReply
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
param1 = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
+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 = "Run.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
|
||||
}
|
||||
}
|
||||
}
|
||||
+GAMWF1 = {
|
||||
Class = WaveformGAM::WaveformSin
|
||||
Amplitude = 10.0
|
||||
Frequency = 1.0
|
||||
Phase = 0.0
|
||||
Offset = 1.1
|
||||
InputSignals = {
|
||||
Time = {
|
||||
DataSource = "DDB1"
|
||||
Type = uint32 //Supported type uint32 (int32 also valid since time cannot be negative. uint64 && int64 valid types)
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
Wave = {
|
||||
DataSource = "DDB1"
|
||||
Type = float32
|
||||
}
|
||||
}
|
||||
}
|
||||
+GAMMDSReader = {
|
||||
Class = IOGAM
|
||||
InputSignals = {
|
||||
MirnovMdsR0 = {
|
||||
DataSource = MDSReader
|
||||
Type = float32
|
||||
}
|
||||
MirnovMdsR1 = {
|
||||
DataSource = MDSReader
|
||||
Type = float32
|
||||
}
|
||||
Time = {
|
||||
DataSource = MDSReader
|
||||
Type = uint32
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
Mirnov0 = {
|
||||
DataSource = "DDB1"
|
||||
Type = float32
|
||||
}
|
||||
Mirnov1 = {
|
||||
DataSource = "DDB1"
|
||||
Type = float32
|
||||
}
|
||||
MdsTime = {
|
||||
DataSource = "DDB1"
|
||||
Type = uint32
|
||||
}
|
||||
}
|
||||
}
|
||||
+GAMMDSWriter = {
|
||||
Class = IOGAM
|
||||
InputSignals = {
|
||||
Mirnov0 = {
|
||||
DataSource = "DDB1"
|
||||
Type = float32
|
||||
}
|
||||
Mirnov1 = {
|
||||
DataSource = "DDB1"
|
||||
Type = float32
|
||||
}
|
||||
CycleTime = {
|
||||
DataSource = Timings
|
||||
Alias = Idle.Thread1_CycleTime
|
||||
Type = uint32
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
OutMdsW0 = {
|
||||
DataSource = MDSWriter
|
||||
Type = float32
|
||||
}
|
||||
OutMdsW1 = {
|
||||
DataSource = MDSWriter
|
||||
Type = float32
|
||||
}
|
||||
CycleTime = {
|
||||
DataSource = MDSWriter
|
||||
Type = uint32
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+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
|
||||
}
|
||||
}
|
||||
}
|
||||
+MDSReader = {
|
||||
Class = MDSReader
|
||||
TreeName = "isttoksdas" //Compulsory. Name of the MDSplus tree.
|
||||
//TreeName = "rtappwriter" //Compulsory. Name of the MDSplus tree.
|
||||
ShotNumber = 46241//Compulsory. 0 –> last shot number (to use 0 shotid.sys must exist)
|
||||
Frequency = 10000 // in Hz. Is the cycle time of the real time application.
|
||||
Signals = {
|
||||
MirnovMdsR0 = {
|
||||
NodeName = "\TOP.HARDWARE.ATCA1.IOC1.CHANNELS.INPUT_00.RAW" // node of the tree node
|
||||
Type = "float32" // Can be any of the node supported types
|
||||
NumberOfElements = 1
|
||||
DataManagement = 0 //could be 0, 1 or 2
|
||||
HoleManagement = 1 //could be 0 or 1
|
||||
}
|
||||
MirnovMdsR1 = {
|
||||
NodeName = "\TOP.HARDWARE.ATCA1.IOC1.CHANNELS.INPUT_01.RAW" // node of the tree node
|
||||
Type = "float32" // Can be any of the node supported types
|
||||
NumberOfElements = 1
|
||||
DataManagement = 0 //could be 0, 1 or 2
|
||||
HoleManagement = 1 //could be 0 or 1
|
||||
}
|
||||
Time = { //Compulsory
|
||||
Type = "uint32" //can be any of the supported types
|
||||
NumberOfElements = 1 //must be always one.
|
||||
}
|
||||
}
|
||||
}
|
||||
+MDSWriter = {
|
||||
Class = MDSWriter
|
||||
NumberOfBuffers = 10 //Compulsory. Number of buffers in the circular buffer defined above. Each buffer is capable of holding a copy of all the DataSourceI signals.
|
||||
CPUMask = 2 //Compulsory. Affinity assigned to the threads responsible for asynchronously flush data into the MDSplus database.
|
||||
StackSize = 10000000 //Compulsory. Stack size of the thread above.
|
||||
TreeName = "isttokoutput" //Compulsory. Name of the MDSplus tree.
|
||||
PulseNumber = 1 //Optional. If -1 a new pulse will be created and the MDSplus pulse number incremented.
|
||||
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).
|
||||
EventName = "updatejScope" //Compulsory. Event sent to jScope when TimeRefresh seconds have elapsed.
|
||||
TimeRefresh = 5 //Compulsory. An event with the name set in the property EventName is sent to jScope when TimeRefresh seconds have elapsed.
|
||||
Signals = {
|
||||
OutMdsW0 = { //As many as required.
|
||||
NodeName = "\TOP.OUT.OUT0" // node of the tree node
|
||||
Period = 0.0001 //Compulsory. Period between signal samples.
|
||||
AutomaticSegmentation = 0
|
||||
MakeSegmentAfterNWrites = 100
|
||||
}
|
||||
OutMdsW1 = { //As many as required.
|
||||
NodeName = "\TOP.OUT.OUT1" // node of the tree node
|
||||
Period = 0.0001 //Compulsory. Period between signal samples.
|
||||
AutomaticSegmentation = 0
|
||||
MakeSegmentAfterNWrites = 100
|
||||
}
|
||||
CycleTime = { //As many as required.
|
||||
NodeName = "\TOP.OUT.Cycle_Time" // node of the tree node
|
||||
//NodeName = "Cycle_Time" //Compulsory. MDSplus node name
|
||||
Period = 0.0001 //Compulsory. Period between signal samples.
|
||||
AutomaticSegmentation = 0
|
||||
MakeSegmentAfterNWrites = 100
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+States = {
|
||||
Class = ReferenceContainer
|
||||
+Idle = {
|
||||
Class = RealTimeState
|
||||
+Threads = {
|
||||
Class = ReferenceContainer
|
||||
+Thread1 = {
|
||||
Class = RealTimeThread
|
||||
CPUs = 0x1
|
||||
Functions = {GAMTimer GAMWF1 }
|
||||
}
|
||||
}
|
||||
}
|
||||
+Run = {
|
||||
Class = RealTimeState
|
||||
+Threads = {
|
||||
Class = ReferenceContainer
|
||||
+Thread1 = {
|
||||
Class = RealTimeThread
|
||||
CPUs = 0x1
|
||||
Functions = {GAMTimer GAMWF1 GAMMDSReader GAMMDSWriter}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+Scheduler = {
|
||||
Class = GAMScheduler
|
||||
TimingDataSource = Timings
|
||||
}
|
||||
}
|
||||
// vim: syntax=cpp ts=4 sw=4 sts=4 sr et
|
||||
Reference in New Issue
Block a user