Skip to content
Snippets Groups Projects
Commit b136db2e authored by Cristian Galperti's avatar Cristian Galperti
Browse files

mds-matlab-structs based template TCL creator script

parent 9c62c8ff
No related branches found
No related tags found
No related merge requests found
% This script will crate automatically
% the TCL files for building
% parameters, inputs and outputs trees, using SPC mds-matlab-structs
% functions (liked in a git submodule)
%
% it is assumed that the main algo_template_tp
% structure is already present in the base workspace
%
% if successfully executed the three generated TCL scripts:
% /tmp/<username>/template_tp.tcl
% /tmp/<username>/template_inbus.tcl
% /tmp/<username>/template_outbus.tcl
% can be executed by a MDSplus tree edit enabled user via:
% cat /tmp/<username>/template_tp.tcl | mdstcl
% and so on
addpath ../../mds/mds-matlab-structs
%% tunable parameters
tpsrc=Simulink.data.evalinGlobal('algo_template','algo_template_tp_tmpl').Value;
tpsrcpad=struct();
tpsrcpad.template.params=tpsrc;
[status_out,struct_out_ala_mds,fname_out]=...
mds_create_nodes(tpsrcpad,'template_tp.tcl','scdds','value')
clear tpsrc tpsrcpad
%% input bus
inbus=Simulink.data.evalinGlobal('algo_template','algo_template_inBus');
inbussrc=Simulink.Bus.createMATLABStruct('inbus');
inbussrcpad.template.inputs=inbussrc;
[status_out,struct_out_ala_mds,fname_out]=...
mds_create_nodes(inbussrcpad,'template_inbus.tcl','scdds','data','full_name','dim')
clear inbus inbussrc inbussrcpad
%% output bus
outbus=Simulink.data.evalinGlobal('algo_template','algo_template_outBus');
outbussrc=Simulink.Bus.createMATLABStruct('outbus');
outbussrcpad.template.outputs=outbussrc;
[status_out,struct_out_ala_mds,fname_out]=...
mds_create_nodes(outbussrcpad,'template_outbus.tcl','scdds','data','full_name','dim')
clear outbus outbussrc outbussrcpad
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment