What does the fourth position mean here?
Show older comments
I'm doing a .tlc file and I have a situation like this in a random model:

Looping over: CompiledModel.DWorks, I'm getting a this_dwork for eah interation:
%foreach i = CompiledModel.DWorks.NumDWorks
%assign this_dwork = CompiledModel.DWorks.DWork[i]
I'm in the DWork shown above (memory_2) for the first signal (I'll have one DWork for each signal arriving in the memory block), then I get this memory block with:
%assign grBlock = SLibGrBlock(this_dwork.GrSrc)
This DWork value (this_dwork) for curiosity:
{ GrSrc [0, 4]; LogStateName "PreviousInput"; LogicalSrc D2; MemoryMapIdx [2, 0, 2]; Name "PreviousInput"; SigSrc [0, -1, 1, 2]; TID 1; VarGroupIdx [2, 2]; flatElemIdx 0; hierInfoIdx -1 }
In this block (grBlock), I'll have two Regions, one for each signal:
> grBlock.DataInputPort.Region[0]
{ MemoryMapIdx [0, 0, 4]; _Source [B5] }
> grBlock.DataInputPort.Region[1]
{ MemoryMapIdx [0, 0, 5]; _Source [B6] }
From the this_dwork variable, how can I know which region (signal input) this dwork belongs?
I have this this_dwork.SigSrc[3], the fourth position of SigSrc, what this fourth position means?
(Is there a place where I can find a reference for these things?)
Answers (0)
Categories
Find more on Simulink Coder in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!