coder.descriptor.LookupTableDataInterface class

Package: coder.descriptor
Superclasses: coder.descriptor.DataInterface

Return information about Lookup Table blocks that have tunable parameters

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

  • Direct Lookup Table (n-D)

  • Sine

  • Cosine

Creation

params = getDataInterfaces(codeDescObj, dataInterfaceName) creates a coder.descriptor.LookupTableDataInterface object if the model has a Lookup Table block with tunable parameters. The codeDescObj object is the coder.codedescriptor.CodeDescriptor object created for the model by using the getCodeDescriptor function.

The coder.descriptor.LookupTableDataInterface object is created only if all parameters in the lookup table data and breakpoint set data are tunable. For example, if you have a lookup table with tunable table data, and three breakpoints, two of which have tunable data and one that does not, there is no coder.descriptor.LookupTableDataInterface created.

Input Arguments

expand all

Specify the Parameters data interface type.

Example: Parameters

Properties

expand all

The data type associated with the data such as integer, double, matrix, and its properties.

The Simulink identifier (SID) is a unique number within the model that Simulink assigns to the block.

The name of the associated tunable parameter for the table data.

The variant conditions in the model that interact with the data interface.

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.

The rate at which data is accessed in a run-time environment.

Specified physical units as attributes on signals at the boundaries of model components.

The range of valid values for the block output signals.

Value that represents whether table is enabled for tunability of the effective size of the table, represented as 0 or 1.

Data Types: logical

Source of the breakpoint set information, specified as 'Explicit values' (default), 'Even spacing', or 'Reference'. See the Breakpoints > Specification parameter.

Data Types: char

Return value of the lookup table operation.

Vector of coder.descriptor.BreakpointDataInterface objects that are used in the Lookup Table block. These objects contain the breakpoint set data.

Methods

expand all

Examples

collapse all

  1. Build the model.

    rtwbuild('rtwdemo_asap2')
  2. Create a coder.codedescriptor.CodeDescriptor object for the model.

    codeDescObj = coder.getCodeDescriptor('rtwdemo_asap2')
    
  3. Return properties of the Lookup Table parameters in the model.

    params = getDataInterfaces(codeDescObj, 'Parameters')

    The params variable is an array of coder.descriptor.DataInterface and coder.descriptor.LookupTableDataInterface objects. The model rtwdemo_asap2 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)
    The coder.descriptor.LookupTableDataInterface object with properties is returned.
                           Type: [1×1 coder.descriptor.types.Type]
                            SID: 'rtwdemo_asap2:14'
                  GraphicalName: 'tabledata'
                    VariantInfo: [1×0 coder.descriptor.VariantInfo]
                 Implementation: [1×1 coder.descriptor.DataImplementation]
                         Timing: [1×0 coder.descriptor.TimingInterface]
                           Unit: ''
                          Range: [1×0 coder.descriptor.Range]
             SupportTunableSize: 0
        BreakpointSpecification: 'Explicit values'
                         Output: [1×1 coder.descriptor.DataInterface]
                    Breakpoints: [1×2 coder.descriptor.BreakpointDataInterface Sequence]

Introduced in R2020a