From 91e05e7bcd7826e969a4da93189f03cd3ad31d01 Mon Sep 17 00:00:00 2001 From: galperti <cristian.galperti@epfl.ch> Date: Fri, 24 Jun 2022 11:10:24 +0200 Subject: [PATCH] MARTe2 param and wavegen cfg printers added to algo class - they were only available in expcode class before --- classes/SCDclass_algo.m | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/classes/SCDclass_algo.m b/classes/SCDclass_algo.m index fc753f7..b25ed01 100644 --- a/classes/SCDclass_algo.m +++ b/classes/SCDclass_algo.m @@ -117,6 +117,33 @@ classdef SCDclass_algo end end end + + function printMARTe2parconfig(obj, shot) + %obj.mdscontainer.modeltogenerate=obj.modelname; + obj.mdscontainer.modeltogenerate='all'; + obj.mdscontainer.printMARTe2parconfig(shot); + end + + function printMARTe2wgbusconfig(obj, shot, busname, frequency, varargin) + % printMARTe2wgbusconfig(obj, shot, busname, frequency, varargin) + % + % prints cfg file for loading busname Simulink.Bus + % as a wavegen (or a set of them) in MARTe2 + % shot can be -1 or a fixed shot (usually -1), but currently + % the Shot= entry is populated by a fixed macro + % frequency is the frequency of signal generation in MARTe2 + % the optional parameter 'ddname' can be given to specify + % the data dictionary where the bus definition is, if omitted + % the default expcode level data dicationary is used + + p=inputParser; + addParameter(p,'ddname',obj.datadictionary,@(x) ischar(x)); + parse(p,varargin{:}); + myddname = p.Results.ddname; + + obj.mdscontainer.printMARTe2wgbusconfig(shot, myddname, busname, frequency); + end + %% General purpose getters -- GitLab