coder.descriptor.LookupTableDataInterface Class
Namespace: coder.descriptor
Superclasses: coder.descriptor.DataInterface
Return information about Lookup Table blocks that have tunable parameters
Since R2020a
Description
The coder.descriptor.LookupTableDataInterface
object describes various
properties for these Lookup Table blocks that have tunable parameters in the generated code:
1-D Lookup Table
2-D Lookup Table
n-D Lookup Table
Interpolation Using Prelookup
Sine
Cosine
Creation
creates a params
= getDataInterfaces(codeDescObj
, dataInterfaceName
)coder.descriptor.LookupTableDataInterface
object if the model has
a Lookup Table block that has tunable parameters. The codeDescObj
object is
the coder.codedescriptor.CodeDescriptor
object created for the model by
using the getCodeDescriptor
function.
Input Arguments
dataInterfaceName
— Name of data interface
Parameters
Specify the Parameters
data interface type.
Example: Parameters
Properties
Type
— Type of data
coder.descriptor.types
object
The data type associated with the data such as integer
,
double
, matrix
, and its properties.
Attributes:
GetAccess | public |
SetAccess | public |
SID
— Simulink® identifier
character vector
The Simulink identifier (SID) is a unique number within the model that Simulink assigns to the block.
Attributes:
GetAccess | public |
SetAccess | public |
GraphicalName
— Name of the tunable parameter for the table data
character vector
The name of the associated tunable parameter for the table data.
Attributes:
GetAccess | public |
SetAccess | public |
VariantInfo
— Variant conditions in the model
coder.descriptor.VariantInfo
object
The variant conditions in the model that interact with the data interface.
Attributes:
GetAccess | public |
SetAccess | public |
Implementation
— Description of implementation of data
coder.descriptor.DataImplementation
object
Description of how the data in the generated code is implemented. This property describes characteristics such as data type and size. It also describes how the data is accessed or declared in the code. The property describes if the data is declared as a variable or structure member.
Attributes:
GetAccess | public |
SetAccess | public |
Timing
— Data access rate in run-time environment
coder.descriptor.TimingInterface
object
The rate at which data is accessed in a run-time environment.
Attributes:
GetAccess | public |
SetAccess | public |
Unit
— Physical unit as attribute on signals
character vector
Specified physical units as attributes on signals at the boundaries of model components.
Attributes:
GetAccess | public |
SetAccess | public |
Range
— Range of output value
coder.descriptor.Range
object
The range of valid values for the block output signals.
Attributes:
GetAccess | public |
SetAccess | public |
SupportTunableSize
— Tunability of table size
1
(default) | 0
Value that represents whether table is enabled for tunability of the effective size
of the table, specified as 0
or 1
.
Attributes:
GetAccess | public |
SetAccess | public |
Data Types: logical
BreakpointSpecification
— Source of breakpoint set information in ASAP2 specification
'Explicit values'
(default) | 'Reference'
| 'Even spacing'
Source of the breakpoint set information, specified as 'Explicit
values'
(default), 'Even spacing'
, or
'Reference'
. The breakpoint specification is mapped as:
Explicit values
—STD_AXIS
Reference
—COM_AXIS
Even spacing
—FIX_AXIS
For more information on ASAP2 lookup tables, see Define ASAP2 Information for Lookup Tables.
Attributes:
GetAccess | public |
SetAccess | public |
Data Types: char
Output
— Data interface for the output of Lookup Table block
coder.descriptor.DataInterface
object
Return value of the lookup table operation.
Attributes:
GetAccess | public |
SetAccess | public |
Breakpoints
— Breakpoint set data
coder.descriptor.BreakpointDataInterface
object
Vector of coder.descriptor.BreakpointDataInterface
objects that
are used in the Lookup Table block. These objects contain the breakpoint set
data.
Attributes:
GetAccess | public |
Methods
Public Methods
isLookupTableDataInterface | Determine whether object is a
coder.descriptor.LookupTableDataInterface object |
getAllParameters | Return all associated
coder.descriptor.LookupTableDataInterface and
coder.descriptor.BreakpointDataInterface objects |
Examples
Get Lookup Table Block Information
This example shows how to retrieve the lookup table block information.
Build a model
Open and build a model that contains lookup table blocks.
open_system('ASAP2Demo'); slbuild('ASAP2Demo');
### Searching for referenced models in model 'ASAP2Demo'. ### Found 1 model reference targets to update. ### Starting serial model reference code generation build. ### Successfully updated the model reference code generation target for: ASAP2DemoModelRef ### Starting build procedure for: ASAP2Demo ### Successful completion of build procedure for: ASAP2Demo Build Summary Model reference code generation targets: Model Build Reason Status Build Duration ============================================================================================================ ASAP2DemoModelRef Target (ASAP2DemoModelRef.c) did not exist. Code generated and compiled. 0h 0m 8.2338s Top model targets: Model Build Reason Status Build Duration ============================================================================================================ ASAP2Demo Information cache folder or artifacts were missing. Code generated and compiled. 0h 0m 16.677s 2 of 2 models built (0 models already up to date) Build duration: 0h 0m 26.781s
Return properties of Lookup Table parameter
Create a code descriptor object for the model.
codeDescObj = coder.getCodeDescriptor('ASAP2Demo');
Return properties of the Lookup Table parameter.
params = getDataInterfaces(codeDescObj,'Parameters');
The params
variable is an array of coder.descriptor.DataInterface
and coder.descriptor.LookupTableDataInterface
objects. The model ASAP2Demo
contains three Lookup Table blocks. Only two of them have tunable breakpoint set data. The code generator creates only two corresponding coder.descriptor.LookupTableDataInterface
objects.
Obtain the details of the Standard_Axis block by accessing the sixth location in the array.
params(6)
ans = LookupTableDataInterface with properties: Type: [1x1 coder.descriptor.types.Type] SID: 'ASAP2Demo:12' GraphicalName: 'tabledata' VariantInfo: [1x0 coder.descriptor.VariantInfo] Implementation: [1x1 coder.descriptor.DataImplementation] Timing: [1x0 coder.descriptor.TimingInterface] Unit: 'rpm' Range: [1x1 coder.descriptor.Range] SupportTunableSize: 0 BreakpointSpecification: 'Explicit values' Output: [1x1 coder.descriptor.DataInterface] Breakpoints: [1x2 coder.descriptor.BreakpointDataInterface Sequence]
Version History
Introduced in R2020a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)