diff --git a/algos/RAPDENSobs/.gitignore b/algos/RAPDENSobs/.gitignore deleted file mode 100644 index 27b8ecde3f5587d757b18322acda03f94558ff64..0000000000000000000000000000000000000000 --- a/algos/RAPDENSobs/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.sldd diff --git a/algos/RAPTORobs/.gitignore b/algos/RAPTORobs/.gitignore deleted file mode 100644 index 27b8ecde3f5587d757b18322acda03f94558ff64..0000000000000000000000000000000000000000 --- a/algos/RAPTORobs/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.sldd diff --git a/algos/SCDalgo_template/SCDalgo_template.slx b/algos/SCDalgo_template/SCDalgo_template.slx deleted file mode 100644 index 03946e08b3e5f717be9d8a6d43cdc132ef82eff0..0000000000000000000000000000000000000000 Binary files a/algos/SCDalgo_template/SCDalgo_template.slx and /dev/null differ diff --git a/algos/SCDalgo_template/SCDalgo_template_harness_run.m b/algos/SCDalgo_template/SCDalgo_template_harness_run.m deleted file mode 100644 index e24e436422b44ab76c101f74c3633ba651251df2..0000000000000000000000000000000000000000 --- a/algos/SCDalgo_template/SCDalgo_template_harness_run.m +++ /dev/null @@ -1,58 +0,0 @@ -function SCDalgo_template_harness_run(obj) -% run harness and check the result - -% load tunable control parameters from mds -shot = 100; % shot reference -obj.actualizeparameters(shot); - -% Input Data - must be structure of timeseries matching input bus structure -time = 0:obj.gettiming.dt:1; -data = single(sin(2*pi*time*10)'); -% NB: these struct name and types must match the corresponding data bus -tsStructData = struct('simple_signal',timeseries(data,time,'Name','Test Input Data')); - -% SimIn object to customize configuration of Simulation run for test -SimIn = Simulink.SimulationInput(obj.getname); - -% Create template Input dataset for this model -Dataset = createInputDataset(obj.getname); - -% assign input data signal to Simulink.Signal object -DataIn = Simulink.SimulationData.Signal; -DataIn.Values = tsStructData; - -% assign as first element in input data set -isig = find(contains(Dataset.getElementNames,'signal_in')); % find input signal index -Dataset = Dataset.setElement(isig,DataIn); %#ok<FNDSB> -SimIn.ExternalInput = Dataset; % assign this as external input for simulation - -% Custom parameters for this run to save outport data -SimIn = SimIn.setModelParameter('SaveOutput','on'); % set to save outport signals -SimIn = SimIn.setModelParameter('SignalLogging','on'); % set to save log signals -SimIn = SimIn.setModelParameter('OutputSaveName','SimOut'); -SimIn = SimIn.setModelParameter('SaveFormat','Dataset'); -SimIn = SimIn.setModelParameter('StartTime',num2str(time(1))); -SimIn = SimIn.setModelParameter('StopTime',num2str(time(end))); -SimIn = SimIn.setModelParameter('FixedStep',num2str(mean(diff(time)))); - -% simulate - simulate only single types to save time -result = sim(SimIn); - -% check output port data -tp = SCDalgo_template_loadtp; -output = result.SimOut{1}.Values.SCDsignal_example_3.Value; -assert(max(output) == 7,'Wrong output!'); - -% check logs which contain a SCDsignal type data -logsout = result.logsout; - -signal = logsout.getElement('SCDsignal type bus').Values.Value; -Quality = logsout.getElement('SCDsignal type bus').Values.QualityTag; -State = logsout.getElement('SCDsignal type bus').Values.ProductionState; - -assert(all(signal.Data(:,1) == tp.gain*tsStructData.simple_signal.Data),... - 'Logged signal does not match input!'); - -assert(all(State .Data == ProductionState.RUNNING),'ProductionState must be RUNNING'); -assert(all(Quality.Data == QualityTag.GOOD ),'QualityTag must be RUNNING' ); -end diff --git a/algos/SCDalgo_template/SCDalgo_template_inBus_def.m b/algos/SCDalgo_template/SCDalgo_template_inBus_def.m deleted file mode 100644 index b92922ad302308e7c7dafb19d5ed8f1782dc9ed9..0000000000000000000000000000000000000000 --- a/algos/SCDalgo_template/SCDalgo_template_inBus_def.m +++ /dev/null @@ -1,21 +0,0 @@ -% Bus object: SCDalgo_template_inBus -clear elems; -elems(1) = Simulink.BusElement; -elems(1).Name = 'simple_signal'; -elems(1).Dimensions = 1; -elems(1).DimensionsMode = 'Fixed'; -elems(1).DataType = 'single'; -elems(1).SampleTime = -1; -elems(1).Complexity = 'real'; -elems(1).Min = []; -elems(1).Max = []; -elems(1).DocUnits = ''; -elems(1).Description = ''; - -SCDalgo_template_inBus = Simulink.Bus; -SCDalgo_template_inBus.HeaderFile = ''; -SCDalgo_template_inBus.Description = ''; -SCDalgo_template_inBus.DataScope = 'Auto'; -SCDalgo_template_inBus.Alignment = -1; -SCDalgo_template_inBus.Elements = elems; -clear elems; diff --git a/algos/SCDalgo_template/SCDalgo_template_loadfp.m b/algos/SCDalgo_template/SCDalgo_template_loadfp.m deleted file mode 100644 index bcd889550bdd862e7f88a932798c06f813198317..0000000000000000000000000000000000000000 --- a/algos/SCDalgo_template/SCDalgo_template_loadfp.m +++ /dev/null @@ -1,6 +0,0 @@ -function fp = SCDalgo_template_loadfp(obj) - -%% Load other fixed parameters -fp.timing = obj.gettiming; -fp.refmodel.offset = 1; % a fixed parameter -end \ No newline at end of file diff --git a/algos/SCDalgo_template/SCDalgo_template_loadtp.m b/algos/SCDalgo_template/SCDalgo_template_loadtp.m deleted file mode 100644 index 74aa12bf3b0ff81dfe7224508a5e508a2aba704c..0000000000000000000000000000000000000000 --- a/algos/SCDalgo_template/SCDalgo_template_loadtp.m +++ /dev/null @@ -1,6 +0,0 @@ -function TP = SCDalgo_template_loadtp() -% Setup tunable control params - -TP.gain = single(2); -TP.refmodel.gain = 4; % another gain used in referenced model -end diff --git a/algos/SCDalgo_template/SCDalgo_template_outBus_def.m b/algos/SCDalgo_template/SCDalgo_template_outBus_def.m deleted file mode 100644 index d0671ae67a3fb86e825722a6466898532343d9ca..0000000000000000000000000000000000000000 --- a/algos/SCDalgo_template/SCDalgo_template_outBus_def.m +++ /dev/null @@ -1,21 +0,0 @@ -% Bus object: SCDalgo_template_outBus -clear elems; -elems(1) = Simulink.BusElement; -elems(1).Name = 'signal'; -elems(1).Dimensions = 1; -elems(1).DimensionsMode = 'Fixed'; -elems(1).DataType = 'single'; -elems(1).SampleTime = -1; -elems(1).Complexity = 'real'; -elems(1).Min = []; -elems(1).Max = []; -elems(1).DocUnits = ''; -elems(1).Description = ''; - -SCDalgo_template_outBus = Simulink.Bus; -SCDalgo_template_outBus.HeaderFile = ''; -SCDalgo_template_outBus.Description = ''; -SCDalgo_template_outBus.DataScope = 'Auto'; -SCDalgo_template_outBus.Alignment = -1; -SCDalgo_template_outBus.Elements = elems; -clear elems; diff --git a/algos/SCDalgo_template/SCDalgo_template_signal_buses.m b/algos/SCDalgo_template/SCDalgo_template_signal_buses.m deleted file mode 100644 index d5284fc2dd74e10fe0cf20544dcedd2b37fe4fbd..0000000000000000000000000000000000000000 --- a/algos/SCDalgo_template/SCDalgo_template_signal_buses.m +++ /dev/null @@ -1,47 +0,0 @@ -function [busNames,Buses] = SCDalgo_template_signal_buses() -% [busNames,Buses] = SCDalgo_template_signal_buses() -% Define some buses needed for the template - -%% Define signal buses for various SCDsignal types -% Data examples for which to create buses -D = {... - ones(11,1,'single'),... - ones(3,3,'single'),... - int32(1)}; - -% Create buses for these signals and add them to the list -[Buses,busNames] = deal(cell(numel(D),1)); % init -for ii = 1:numel(D) - mydata = D{ii}; - mysig = SCDsignal(mydata); % create SCDsignal object for this data example - mybus = mysig.createBus; % create Bus for this signal using object method - % Store - Buses{ii} = mybus; - busNames{ii} = mybus.Description; -end - -%% Add output structure: a bus that includes only SCDsignal data types - -% First add 3 busElements for the three signals defined above -for ii=1:3 -elems(ii) = Simulink.BusElement; -elems(ii).Name = sprintf('SCDsignal_example_%d',ii); -elems(ii).Dimensions = 1; -elems(ii).DimensionsMode = 'Fixed'; -elems(ii).DataType = sprintf('Bus: %s',busNames{ii}); -end - -% Define output bus with these elements -outBus = Simulink.Bus; -outBus.HeaderFile = ''; -outBus.Description = ''; -outBus.DataScope = 'Auto'; -outBus.Alignment = -1; -outBus.Elements = elems; -clear elems; - -% append to list -busNames{end+1} = 'SCDalgo_template_outBus'; -Buses{end+1} = outBus; - -end diff --git a/algos/SCDalgo_template/SCDalgo_template_test.m b/algos/SCDalgo_template/SCDalgo_template_test.m deleted file mode 100644 index bf6edcf3069b556c49d234aa19b286789b510abb..0000000000000000000000000000000000000000 --- a/algos/SCDalgo_template/SCDalgo_template_test.m +++ /dev/null @@ -1,7 +0,0 @@ -classdef SCDalgo_template_test < SCDalgo_test - - properties - algoobj = SCDalgoobj_template(); - end - -end \ No newline at end of file diff --git a/algos/SCDalgo_template/SCDsignal_tester.cfg b/algos/SCDalgo_template/SCDsignal_tester.cfg deleted file mode 100644 index 2bc2061acbd9978a3b92ec38036ebfe00e5dfef1..0000000000000000000000000000000000000000 --- a/algos/SCDalgo_template/SCDsignal_tester.cfg +++ /dev/null @@ -1,129 +0,0 @@ - -+MDSParameters = { - Class=MDSObjLoader - Shot=-1 -/* - +Connection_tcvdata_tcv_shot_vista = { - Class=MDSObjConnection - Server=tcvdata.epfl.ch - Tree=tcv_shot - +SCDnode02_tp-ADCgains-RVLOOP_gains = { Class=MDSParVector Path="mag_live_gains('RVLOOP','GAIN')" } - } -*/ - +Connection_spcpc171 = { - Class=MDSObjConnection - Server=spcpc171.epfl.ch - Tree=martetest - Shot=1 - +testenum = { Class=MDSParEnum Path="ENUM1" EnumCode = {0,1,2,3} EnumVal = {"ZHHFS","ZHLFS","Z0HFS","Z0LFS"} } - } -} - - -$TestApp = { - Class = RealTimeApplication - +Functions = { - Class = ReferenceContainer - +GAMTimer = { - Class = IOGAM - InputSignals = { - Counter = { DataSource = Timer Type = uint32 } - Time = { Frequency = 1 DataSource = Timer Type = uint32 } - } - OutputSignals = { - Counter = { DataSource = DDB1 Type = uint32 } - Time = { DataSource = DDB1 Type = uint32 } - } - } - +Constants = { - Class = ConstantGAM - OutputSignals = { - it = { DataSource = DDB1 Type = int32 NumberOfElements = 1 NumberOfDimensions=1 } - time = { DataSource = DDB1 Type = float32 NumberOfElements = 1 NumberOfDimensions=1 } - data = { DataSource = DDB1 Type = int16 NumberOfElements = 528 NumberOfDimensions=1 } - realtime = { DataSource = DDB1 Type = float32 NumberOfElements = 1 NumberOfDimensions=1 } - input = { DataSource = DDB1 Type = float32 NumberOfElements = 1 NumberOfDimensions=1 Default={1.5} } - - - } - } - +GAMSimulink1 = { - Class = SimulinkWrapperGAM - Library = "/root/SCDalgo_template.so" - SymbolPrefix = "SCDalgo_template" - - Verbosity = 2 - TunParSourceGAM = MDSParameters - SkipNotOkTunParams = 1 - InputSignals = { - realtime = { DataSource = DDB1 Type = float32 NumberOfElements = 1 NumberOfDimensions=1 } - input = { DataSource = DDB1 Type = float32 NumberOfElements = 1 NumberOfDimensions=1 } - } - OutputSignals = { - output = { DataSource = DDB1 Type = uint8 NumberOfElements = 96 NumberOfDimensions=1 } - } - } - +LoggerBroker = { - Class = IOGAM - InputSignals = { - output1 = { DataSource = DDB1 Type = uint8 NumberOfElements = 96 Ranges={{0,3}} Alias=output } - output11 = { DataSource = DDB1 Type = uint8 NumberOfElements = 96 Ranges={{40,43}} Alias=output } - qtag1 = { DataSource = DDB1 Type = uint8 NumberOfElements = 96 Ranges={{44,44}} Alias=output } - pstate1 = { DataSource = DDB1 Type = uint8 NumberOfElements = 96 Ranges={{45,45}} Alias=output } - outputint = { DataSource = DDB1 Type = uint8 NumberOfElements = 96 Ranges={{88,91}} Alias=output } - qtag3 = { DataSource = DDB1 Type = uint8 NumberOfElements = 96 Ranges={{92,92}} Alias=output } - pstate3 = { DataSource = DDB1 Type = uint8 NumberOfElements = 96 Ranges={{93,93}} Alias=output } - } - OutputSignals = - { - output1= { DataSource = LoggerDataSource Type = float32 } - output11= { DataSource = LoggerDataSource Type = float32 } - qtag1= { DataSource = LoggerDataSource Type = int8 } - pstate1= { DataSource = LoggerDataSource Type = int8 } - - outputint= { DataSource = LoggerDataSource Type = int32 } - qtag3= { DataSource = LoggerDataSource Type = int8 } - pstate3= { DataSource = LoggerDataSource Type = int8 } - - } - } - } - +Data = { - Class = ReferenceContainer - DefaultDataSource = DDB1 - +DDB1 = { Class = GAMDataSource } - +LoggerDataSource = { Class = LoggerDataSource } - +Timings = { Class = TimingDataSource } - +Timer = { - Class = LinuxTimer - SleepNature = "Default" - Signals = { - Counter = { Type = uint32 } - Time = { Type = uint32 } - } - } - } - +States = { - Class = ReferenceContainer - +Run = { - Class = RealTimeState - +Threads = { - Class = ReferenceContainer - +Thread1 = { - Class = RealTimeThread - CPUs = 0x1 - Functions = { - GAMTimer - Constants - GAMSimulink1 - LoggerBroker - } - } - } - } - } - +Scheduler = { - Class = GAMScheduler - TimingDataSource = Timings - } -} diff --git a/algos/SCDalgo_template/referenced_model_example.slx b/algos/SCDalgo_template/referenced_model_example.slx deleted file mode 100644 index 1ca144dd15cbb88b4e6ae299fa60492d96cf2177..0000000000000000000000000000000000000000 Binary files a/algos/SCDalgo_template/referenced_model_example.slx and /dev/null differ diff --git a/algos/SCDcalib02/.gitignore b/algos/SCDcalib02/.gitignore deleted file mode 100644 index 27b8ecde3f5587d757b18322acda03f94558ff64..0000000000000000000000000000000000000000 --- a/algos/SCDcalib02/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.sldd diff --git a/algos/SCDlih/.gitignore b/algos/SCDlih/.gitignore deleted file mode 100644 index 27b8ecde3f5587d757b18322acda03f94558ff64..0000000000000000000000000000000000000000 --- a/algos/SCDlih/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.sldd diff --git a/algos/SCDliuqe/.gitignore b/algos/SCDliuqe/.gitignore deleted file mode 100644 index 27b8ecde3f5587d757b18322acda03f94558ff64..0000000000000000000000000000000000000000 --- a/algos/SCDliuqe/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.sldd diff --git a/algos/SCDliuqe/SCDalgo_liuqe_test.m b/algos/SCDliuqe/SCDalgo_liuqe_test.m deleted file mode 100644 index 855a49e938671b6a6018aa476dfefd2239ec8c40..0000000000000000000000000000000000000000 --- a/algos/SCDliuqe/SCDalgo_liuqe_test.m +++ /dev/null @@ -1,7 +0,0 @@ -classdef SCDalgo_liuqe_test < SCDalgo_test - - properties - algoobj = SCDalgoobj_liuqe(); - end - -end \ No newline at end of file