Contenuto principale

isBreakpointDataInterface

R2026b

Determine whether object is a coder.descriptor.BreakpointDataInterface object

Syntax

breakpointTableDataInterface = isBreakpointDataInterface(parameterObj)

Description

breakpointTableDataInterface = isBreakpointDataInterface(parameterObj) returns a logical value indicating whether the object is a coder.descriptor.BreakpointDataInterface object or not.

Input Arguments

expand all

coder.descriptor.BreakpointDataInterface object that represents a breakpoint set in the model.

Data Types: string

Output Arguments

expand all

Logical value indicating whether the object is a coder.descriptor.BreakpointDataInterface.

Data Types: logical

Examples

expand all

This example shows how to determine if an object is coder.descriptor.BreakpointDataInterface object.

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'.
### Total of 2 models to build.
### Starting serial code generation build.
### Starting model reference code generation target build for: ASAP2DemoModelRef
### Successfully updated the model reference code generation target for: ASAP2DemoModelRef
### Starting top model code generation target build 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 31.859s

Top model targets:

Model      Build Reason                         Status                        Build Duration
============================================================================================
ASAP2Demo  Target (ASAP2Demo.c) did not exist.  Code generated and compiled.  0h 0m 28.584s

2 of 2 models built (0 models already up to date)
Build duration: 0h 1m 6.8654s

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.

Obtain the details of the breakpoint set attached to the model Lookup Table block by accessing the first location in the array.

parameterObj = params(6).Breakpoints(1);

Determine if the object stored in parameterObj variable is a coder.descriptor.BreakpointDataInterface object.

breakpointDataInterface = isBreakpointDataInterface(parameterObj)
breakpointDataInterface = logical
   1

The code generator returns a logical value of 1 if parameterObj is a coder.descriptor.BreakpointDataInterface object. Otherwise, the code generator returns a logical value of 0.

Version History

Introduced in R2020a