diff --git a/Configurations/RTApp-Isttok-File.cfg b/Configurations/RTApp-Isttok-File.cfg index 6378051..1a9f6a4 100644 --- a/Configurations/RTApp-Isttok-File.cfg +++ b/Configurations/RTApp-Isttok-File.cfg @@ -89,16 +89,6 @@ 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 @@ -243,6 +233,20 @@ } } } ++Types = { + Class = ReferenceContainer + +LangmuirStructure = { + Class = IntrospectionStructure + TimeSdas = { + Type = uint32 + NumberOfElements = 1 + } + SignalArray = { + Type = float32 + NumberOfElements = 4 + } + } +} $MdsLoopApp = { Class = RealTimeApplication +Functions = { @@ -314,7 +318,7 @@ $MdsLoopApp = { } } OutputSignals = { - TimeSdas = { + TimeSdasA = { DataSource = "DDB1" Type = uint32 } @@ -336,41 +340,75 @@ $MdsLoopApp = { } } } + +GAMFileReaderS = { + Class = IOGAM + InputSignals = { + Inputs = { + DataSource = FileReaderS_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 + } + } + } + /* - Langmuir0 = { - DataSource = "DDB1" - Type = float32 + +GAMFileReaderS = { + Class = IOGAM + InputSignals = { + TimeSdas = { + DataSource = FileReaderS_DS + Type = uint32 } - Langmuir1 = { - DataSource = "DDB1" + LangmuirSignals = { + DataSource = FileReaderS_DS Type = float32 + NumberOfElements = 4 } - Langmuir2 = { + } + OutputSignals = { + TimeSdasS = { DataSource = "DDB1" - Type = float32 - } - Langmuir3 = { - DataSource = "DDB1" - Type = float32 + Type = uint32 } LangmuirS = { DataSource = "DDB1" Type = float32 NumberOfElements = 4 - Ranges = {{1,1}} - } - LangmuirS = { - DataSource = "DDB1" - Type = float32 - NumberOfElements = 4 - Ranges = {{2,2}} - } - LangmuirS = { - DataSource = "DDB1" - Type = float32 - NumberOfElements = 4 - Ranges = {{3,3}} } + } + } OutMdsW1 = { DataSource = FileSignalsWriter Type = float32 @@ -384,49 +422,39 @@ $MdsLoopApp = { Type = float32 } */ - +GAMSignalsWriter = { + +GAMFileWriter = { Class = IOGAM InputSignals = { Time = { DataSource = "DDB1" Type = uint32 } - Langmuir0 = { - DataSource = "DDB1" - Type = float32 - } - Langmuir1 = { - DataSource = "DDB1" - Type = float32 - } - Langmuir2 = { - DataSource = "DDB1" - Type = float32 - } - Langmuir3 = { + //"LangmuirStrt.SignalsL[0]" = { + LangmuirStrt_SignalArray = { DataSource = "DDB1" Type = float32 + NumberOfElements = 4 } } OutputSignals = { Time = { - DataSource = FileSignalsWriter + DataSource = FileWriter_DS Type = uint32 } OutMdsW0 = { - DataSource = FileSignalsWriter + DataSource = FileWriter_DS Type = float32 } OutMdsW1 = { - DataSource = FileSignalsWriter + DataSource = FileWriter_DS Type = float32 } OutMdsW2 = { - DataSource = FileSignalsWriter + DataSource = FileWriter_DS Type = float32 } OutMdsW3 = { - DataSource = FileSignalsWriter + DataSource = FileWriter_DS Type = float32 } } @@ -466,46 +494,6 @@ $MdsLoopApp = { } } } - +GAMMDSWriter = { - Class = IOGAM - InputSignals = { - Langmuir0 = { - DataSource = "DDB1" - Type = float32 - } - Langmuir1 = { - DataSource = "DDB1" - Type = float32 - } - Langmuir2 = { - DataSource = "DDB1" - Type = float64 - } - CycleTime = { - DataSource = Timings - Alias = Idle.Thread1_CycleTime - Type = uint32 - } - } - OutputSignals = { - OutMdsW0 = { - DataSource = MDSWriter - Type = float32 - } - OutMdsW1 = { - DataSource = MDSWriter - Type = float32 - } - OutMdsW2 = { - DataSource = MDSWriter - Type = float64 - } - CycleTime = { - DataSource = MDSWriter - Type = uint32 - } - } - } } +Data = { Class = ReferenceContainer @@ -542,7 +530,17 @@ $MdsLoopApp = { EOF = "Last" // "Rewind" } - +FileSignalsWriter = { + +FileReaderS_DS = { + Class = FileDataSource::FileReader + Filename = "../Analysis/LangmuirSdas_46241_strt.csv" + FileFormat = "csv" + CSVSeparator = "," + Interpolate = "no" + Preload = "yes" //Optional + EOF = "Last" // "Rewind" + } + + +FileWriter_DS = { Class = FileDataSource::FileWriter NumberOfBuffers = 10000 CPUMask = 1 @@ -571,43 +569,6 @@ $MdsLoopApp = { } } - +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" - Period = 0.0001 - AutomaticSegmentation = 1 - // MakeSegmentAfterNWrites = 100 - } - OutMdsW2 = { - NodeName = "\TOP.OUT.OUT2" - Period = 0.0001 - AutomaticSegmentation = 0 - MakeSegmentAfterNWrites = 100 - } - CycleTime = { //As many as required. - NodeName = "\TOP.OUT.Cycle_Time" // node of the tree node - Period = 0.0001 - AutomaticSegmentation = 0 - MakeSegmentAfterNWrites = 100 - } - } - } } +States = { Class = ReferenceContainer @@ -629,7 +590,7 @@ $MdsLoopApp = { +Thread1 = { Class = RealTimeThread CPUs = 0x1 - Functions = {GAMTimer GAMFileReader GAMElectricProbes GAMSignalsWriter GAMMDSWriter} + Functions = {GAMTimer GAMFileReader GAMFileReaderS FlatIOGAM GAMElectricProbes GAMFileWriter } } } }