Consider creating model codeDescDemo
or a model with similar
specifications.
The model contains a n-D Lookup Table. The n-D Lookup Table block takes table data
from a model workspace variable named tableData
with value [4
5 6]
. The tableData
is a Simulink.Parameter
object with non-Auto
storage class. The breakpoint set data is
specified as [2 6 10]
.
The model configuration parameter Default parameter behavior is
set to Inlined
.
Build the model and create a coder.codedescriptor.CodeDescriptor
object for the
model.
Retrieve properties of the Lookup Table block and breakpoint set in the generated
code.
The
params
variable is an array of
coder.descriptor.LookupTableDataInterface
and
coder.descriptor.BreakpointDataInterface
objects. LookupTableDataInterface with properties:
Type: [1×1 coder.descriptor.types.Type]
SID: 'demoModel:22'
GraphicalName: 'tableData'
VariantInfo: [1×0 coder.descriptor.VariantInfo]
Implementation: [1×1 coder.descriptor.DataImplementation]
Timing: [1×0 coder.descriptor.TimingInterface]
Unit: ''
Range: [1×1 coder.descriptor.Range]
SupportTunableSize: 0
BreakpointSpecification: 'Even spacing'
Output: [1×1 coder.descriptor.DataInterface]
Breakpoints: [1×1 coder.descriptor.BreakpointDataInterface Sequence]
The Breakpoints
property of the
coder.descriptor.LookupTableDataInterface
object holds a vector of
coder.descriptor.BreakpointDataInterface
objects. Obtain the details of
the breakpoint set attached to the Lookup Table block by accessing the first location in
the
array.
BreakpointDataInterface with properties:
Type: [1×1 coder.descriptor.types.Type]
SID: 'demoModel:22'
GraphicalName: 'n-D Lookup↵Table'
VariantInfo: [1×0 coder.descriptor.VariantInfo]
Implementation: [1×0 coder.descriptor.DataImplementation]
Timing: [1×0 coder.descriptor.TimingInterface]
Unit: ''
Range: [1×1 coder.descriptor.Range]
OperatingPoint: [1×1 coder.descriptor.DataInterface]
SupportTunableSize: 0
FixAxisMetadata: [1×1 coder.descriptor.FixAxisMetadata]
The new coder.descriptor.FixAxisMetadata
object provides more
information about whether the breakpoint set data is evenly spaced or
not.
The
information is returned as a new coder.descriptor.EvenSpacingMetadata
object with these
properties: EvenSpacingMetadata with properties:
StartingValue: 2
StepValue: 2
NumPoints: 3
IsPow2: 1