Skip to content
Snippets Groups Projects
Commit 96e614f1 authored by Federico Felici's avatar Federico Felici
Browse files

Update node masks to show correct node info

parent 06aa15af
No related branches found
No related tags found
No related merge requests found
function str = SCDconf_maskstring(nodenr)
varname = sprintf('SCDnode%02dparams',nodenr);
try
nodeparams = Simulink.data.evalinGlobal('tcv',varname);
varalgo = Simulink.data.evalinGlobal('tcv','SCDvaralgo');
catch ME
if ~isequal(ME.identifier,'SLDD:sldd:InvalidEvalinCommand'), rethrow(ME); end
str = 'Expcode not setup yet'; return;
end
stract = sprintf('Node %02d: ONLINE\n',nodenr);
if nodeparams.active
strthreads = 'CPU Ts [ms]:';
stralgos = 'ALGOCODES: ';
for threadnr = 1:numel(nodeparams.timing.thperiod)
thper = nodeparams.timing.thperiod(threadnr);
varalgonr = varalgo.(sprintf('algo%02d%02d',nodenr,threadnr));
strthreads = sprintf('%s %3.1f,',strthreads,thper*1000);
stralgos = sprintf('%s %3d ,',stralgos,varalgonr);
end
strthreads = strthreads(1:end-1);
stralgos = stralgos(1:end-1);
str = strcat(stract,'\n',strthreads,'\n',stralgos);
else
str = sprintf('Node %02d: OFFLINE',nodenr);
end
end
\ No newline at end of file
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