このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。
coder.mapping.api.CodeMapping
説明
コード マッピング オブジェクトおよび関連する関数を使用すると、Simulink® モデルのデータおよび関数の C コード生成を構成できます。モデル データ要素について、コード マッピングは、データ要素をストレージ クラスとストレージ クラス プロパティから成る構成に関連付けます。関数について、コード マッピングは、エントリポイント関数を関数カスタマイズ テンプレートから成る構成に関連付けます。モデル全体のデータ要素および関数のカテゴリに対して既定の構成を指定することにより、C コード生成用にモデルを準備する作業を軽減します。データ要素または関数を個別に構成することにより、既定の構成をオーバーライドします。小規模なモデルでは、各データ要素および関数を個別に構成するよう選択できます。Embedded Coder ディクショナリと接続されているモデルでは、そのディクショナリに定義されているサービス インターフェイスにモデル要素をマッピングできます。
作成
Simulink エディターの [アプリ] タブから [Simulink Coder] アプリや [Embedded Coder] アプリなどのコード生成アプリを選択すると、コード マッピングがまだ存在しない場合は coder.mapping.api.CodeMapping
オブジェクトが作成されます。コード マッピングは、モデルのアクティブなコンフィギュレーション セット オブジェクトに格納されているコードのカスタマイズ設定に基づいて作成されます。コンフィギュレーション セット オブジェクトでは、データと関数に対してメモリ セクションを指定できます。
coder.mapping.api.CodeMapping
オブジェクトをプログラムで作成するには、関数 coder.mapping.utils.create
を呼び出します。マッピングは、アクティブなコンフィギュレーション セット オブジェクトに基づいて、または別のコンフィギュレーション セット オブジェクトのメモリ セクションと共有ユーティリティに関する既定の命名規則構成に基づいて作成します。
オブジェクト関数
addSignal | ブロックの出力信号をモデル コード マッピングに追加する |
coder.mapping.api.get | モデルのコード マッピングの取得 |
coder.mapping.utils.create | Create code mappings object for configuring data and function interface for C and C++ code generation |
find | Get model elements for the category of model code mappings |
getDataDefault | Get default storage class or storage class property setting for model data category |
getDataStore | Get code and calibration configuration from code mappings for local or shared local data store |
getDataTransfer | Get code configuration from code mappings for signal representing data transfer |
getDeploymentType | Get deployment type of model |
getFunction | モデル関数に対するコード マッピングからのコード構成の取得 |
getFunctionDefault | モデル関数カテゴリに対する既定の関数カスタマイズ テンプレートまたはメモリ セクションの取得 |
getInport | Get code and calibration configuration from code mappings for root-level inport |
getModelParameter | Get code and calibration configuration from code mappings for model parameters |
getOutport | Get code and calibration configuration from code mappings for root-level outport |
getSignal | Get code and calibration configuration from code mappings for block output signal |
getState | Get code and calibration configuration from code mappings for block state |
removeSignal | ブロックの出力信号をモデル コード マッピングから削除する |
setDataDefault | Set default storage class and storage class property values for model data category |
setDataStore | コード生成とキャリブレーション ファイル (a2l) 生成用のローカル データ ストアまたは共有ローカル データ ストアを設定する |
setDataTransfer | Set code configuration in code mappings for signal representing data transfer |
setDeploymentType | Set deployment type of model |
setFunction | モデル関数のコード マッピング情報の設定 |
setFunctionDefault | モデル関数カテゴリの既定の関数カスタマイズ テンプレートとメモリ セクションを設定する |
setInport | コードとキャリブレーション ファイル (a2l) の生成用のルートレベルの Inport の構成 |
setModelParameter | コード生成とキャリブレーション ファイル (a2l) 生成用のモデル パラメーターを設定する |
setOutport | Configure root-level outport for code and calibration file (a2l) generation |
setSignal | コード生成とキャリブレーション ファイル (a2l) 生成用のブロック信号データを設定する |
setState | コードとキャリブレーション ファイル (a2l) の生成用のブロック状態の設定 |