メインコンテンツ

このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。

isBreakpointDataInterface

オブジェクトが coder.descriptor.BreakpointDataInterface オブジェクトかどうか確認する

構文

breakpointTableDataInterface = isBreakpointDataInterface(parameterObj)

説明

breakpointTableDataInterface = isBreakpointDataInterface(parameterObj) は、オブジェクトが coder.descriptor.BreakpointDataInterface (Embedded Coder) オブジェクトかどうかを示す logical 値を返します。

入力引数

すべて展開する

モデルのブレークポイント セットを表す coder.descriptor.BreakpointDataInterface オブジェクト。

データ型: string

出力引数

すべて展開する

オブジェクトが coder.descriptor.BreakpointDataInterface かどうかを示す logical 値。

データ型: logical

すべて展開する

この例では、オブジェクトが coder.descriptor.BreakpointDataInterface オブジェクトであるかどうかを判別する方法を説明します。

モデルの作成

ルックアップ テーブル ブロックを含むモデルを開いて、ビルドします。

open_system('ASAP2Demo');
slbuild('ASAP2Demo');
### Searching for referenced models in model 'ASAP2Demo'.
### Total of 2 models to build.
### Starting serial 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 6.0707s 

Top model targets:

Model      Build Reason                                         Status                        Build Duration
============================================================================================================
ASAP2Demo  Information cache folder or artifacts were missing.  Code generated and compiled.  0h 0m 13.278s 

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

ルックアップ テーブルのパラメーターのプロパティを返す

モデルのコード記述子オブジェクトを作成します。

codeDescObj = coder.getCodeDescriptor('ASAP2Demo');

ルックアップ テーブルのパラメーターのプロパティを返します。

params = getDataInterfaces(codeDescObj,'Parameters');

変数 params は、coder.descriptor.DataInterface オブジェクトと coder.descriptor.LookupTableDataInterface オブジェクトからなる配列です。

配列の最初の位置にアクセスして、モデルの Lookup Table ブロックに接続されたブレークポイント セットの詳細を取得します。

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

変数 parameterObj に保存されているオブジェクトが coder.descriptor.BreakpointDataInterface オブジェクトかどうかを確認します。

breakpointDataInterface = isBreakpointDataInterface(parameterObj)
breakpointDataInterface = logical
   1

コード ジェネレーターは、parameterObjcoder.descriptor.BreakpointDataInterface オブジェクトである場合に logical 値 1 を返します。それ以外の場合は、logical 値 0 を返します。

バージョン履歴

R2020a で導入