Main Content

coder.descriptor.EvenSpacingMetadata クラス

パッケージ:coder.descriptor
スーパークラス:coder.descriptor.FixAxisMetadata

等間隔ブレークポイント セットのデータに関する情報を返す

説明

coder.descriptor.EvenSpacingMetadataオブジェクトは、開始点、ブレークポイントのステップ サイズ、点数など、等間隔のブレークポイント セットのデータを記述します。

作成

params= getDataInterfaces(codeDescObj,dataInterfaceName)は、ルックアップ テーブルの次元ごとにcoder.descriptor.BreakpointDataInterfaceオブジェクトを作成します。codeDescObjオブジェクトは、関数getCodeDescriptorを使用することで、モデル用に作成されたcoder.codedescriptor.CodeDescriptorオブジェクトです。

coder.descriptor.BreakpointDataInterfaceオブジェクトにはcoder.descriptor.FixAxisMetadataオブジェクトが含まれるプロパティFixAxisMetadataがあります。ブレークポイント セットのデータが等間隔の場合、coder.descriptor.FixAxisMetadatacoder.descriptor.EvenSpacingMetadataオブジェクトが含まれます。

入力引数

すべて展開する

Parametersデータ インターフェイスの種類を指定します。

例:Parameters

プロパティ

すべて展開する

等間隔ブレークポイント セットのデータにおける最初の点。

等間隔ブレークポイント セットのデータにおける点の間隔。IsPow21を返す場合、この値は2のべき乗を表します。

等間隔ブレークポイント セットのデータにおける点の総数。

StepValueの値が2のべき乗の場合、1を返します。

データ型:logical

すべて折りたたむ

モデルcodeDescDemoまたは類似する仕様をもつモデルを作成することを検討します。

Model that contains a n-D Lookup Table connected between an Inport and an Outport.

モデルには n-D Lookup Table が含まれます。n-D Lookup Table ブロックは値[4 5 6]をもつtableDataという名前のモデル ワークスペース変数からテーブル データを取得します。tableDataAuto 以外のストレージ クラスをもつSimulink.Parameterオブジェクトです。ブレークポイント セットのデータは[2 6 10]として指定されます。

n-D Loop Table Block Parameters dialog box that shows tableData variable specified as Table data and Breakpoint data set as 2, 6, and 10.

モデル コンフィギュレーション パラメーター[既定のパラメーター動作][インライン]に設定されています。

  1. モデルをビルドし、そのモデルのcoder.codedescriptor.CodeDescriptorオブジェクトを作成します。

    codeDescObj = coder.getCodeDescriptor('codeDescDemo')

  2. 生成されたコード内で Lookup Table ブロックとブレークポイント セットのプロパティを取得します。

    params = getDataInterfaces(codeDescObj,'Parameters')
    変数paramsは、coder.descriptor.LookupTableDataInterfaceオブジェクトとcoder.descriptor.BreakpointDataInterfaceオブジェクトの配列です。
    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]

  3. coder.descriptor.LookupTableDataInterfaceオブジェクトのBreakpointsプロパティは、coder.descriptor.BreakpointDataInterfaceオブジェクトのベクトルを保持します。配列の最初の位置にアクセスして、Lookup Table ブロックに接続されたブレークポイント セットの詳細を取得します。

    params.Breakpoints(1)
    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]

  4. 新しいcoder.descriptor.FixAxisMetadataオブジェクトは,ブレークポイントセットのデータが等間隔であるか否かに関する詳細を提供します。

    params.Breakpoints(1).FixAxisMetadata
    この情報は、以下のプロパティをもつ新しいcoder.descriptor.EvenSpacingMetadataオブジェクトとして返されます。
    EvenSpacingMetadata with properties: StartingValue: 2 StepValue: 2 NumPoints: 3 IsPow2: 1

バージョン履歴

R2020b で導入