From a7d97366e3c0a0a6ff981572b5934423efea6740 Mon Sep 17 00:00:00 2001 From: galperti <cristian.galperti@epfl.ch> Date: Fri, 24 Jun 2022 11:30:58 +0200 Subject: [PATCH] automatic MARTe2 cfg generator begun --- algos/template/marte2cfg/.gitignore | 1 + .../algo_template_create_marte2_cfg.m | 35 +++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 algos/template/marte2cfg/.gitignore create mode 100644 algos/template/marte2cfg/algo_template_create_marte2_cfg.m diff --git a/algos/template/marte2cfg/.gitignore b/algos/template/marte2cfg/.gitignore new file mode 100644 index 0000000..7103328 --- /dev/null +++ b/algos/template/marte2cfg/.gitignore @@ -0,0 +1 @@ +*.cfg diff --git a/algos/template/marte2cfg/algo_template_create_marte2_cfg.m b/algos/template/marte2cfg/algo_template_create_marte2_cfg.m new file mode 100644 index 0000000..4797f21 --- /dev/null +++ b/algos/template/marte2cfg/algo_template_create_marte2_cfg.m @@ -0,0 +1,35 @@ +% This script created a testabe +% MARTe2 cfg file for the template algorithm +% with these specifications: +% +% tunable parameters MDSplus link via MDSObjLoader instatiation +% tunable waveforms MDSplus link via MDSObjWavegen instantiation +% single realtime thread, LinuxTimer synched at 1kHz +% algorithms output MDSplus link via standard MDSWriter + +startpath=pwd; +fcnpath=fileparts(mfilename('fullpath')); +eval(sprintf('cd %s',fcnpath)); + +%% Preclean +system('rm -rf mdsparameters.cfg'); +system('rm -rf mdswavegen.cfg'); + +%% MDSParameters part generation + +diary mdsparameters.cfg +obj.printMARTe2parconfig(-1); +diary off +system('sed -i ''s/obj.printMARTe2parconfig(-1);//g'' mdsparameters.cfg'); + +%% MDSWavegen datasource part generation + +diary mdswavegen.cfg +obj.printMARTe2wgbusconfig(-1,'algo_template_inBus',1000); +diary off +system('sed -i ''s/obj.printMARTe2wgbusconfig(-1,''algo_template_inBus'',1000);//g'' mdswavegen.cfg'); + +%% Input bus expansion + + + -- GitLab