Main Content

coder.Dictionary クラス

名前空間: coder

Embedded Coder ディクショナリの設定

R2019b 以降

説明

coder.Dictionary クラスのオブジェクトは Embedded Coder ディクショナリを表します。このオブジェクトを使用して、定義のパッケージの読み込みやディクショナリのセクションへのアクセス取得など、Embedded Coder ディクショナリに対する操作を実行できます。

coder.Dictionary オブジェクトには coder.dictionary.Section オブジェクトが含まれています。これは、Embedded Coder ディクショナリのカテゴリを表します。coder.dictionary.Section オブジェクトには coder.dictionary.Entry オブジェクトが含まれています。これは、Embedded Coder ディクショナリのそのセクションに格納されている定義を表します。セクションの名前は、セクションに格納されているコード定義の種類を識別します。Embedded Coder ディクショナリのセクションにアクセスするには、coder.Dictionary オブジェクトを使用します。セクション内のディクショナリ エントリにアクセスするには、coder.dictionary.Section オブジェクトを使用します。

作成

coder.Dictionary オブジェクトは関数 coder.dictionary.create および coder.dictionary.open で作成されます。

メソッド

すべて展開する

すべて折りたたむ

Embedded Coder ディクショナリを含めるデータ ディクショナリを作成します。

dataDictionary = Simulink.data.dictionary.create("DataDictionary.sldd");

データ ディクショナリに Embedded Coder ディクショナリを作成し、coder.Dictionary オブジェクトを使用して Embedded Coder ディクショナリを表します。

coderDictionary = coder.dictionary.create(dataDictionary)
coderDictionary = 

  Dictionary with Sections:

                    StorageClasses: [1×1 coder.dictionary.Section]
                    MemorySections: [1×1 coder.dictionary.Section]
    FunctionCustomizationTemplates: [1×1 coder.dictionary.Section]

Embedded Coder ディクショナリには 3 つの coder.dictionary.Section オブジェクトが含まれており、それぞれがディクショナリのセクションを表します。

Embedded Coder ディクショナリを含めるデータ ディクショナリを作成します。

dataDictionary = Simulink.data.dictionary.create("DataDictionary.sldd");

データ ディクショナリに Embedded Coder ディクショナリを作成し、coder.Dictionary オブジェクトを使用して Embedded Coder ディクショナリを表します。インターフェイス構成タイプをサービス インターフェイスとして指定します。

coderDictionary = coder.dictionary.create(dataDictionary,"ServiceInterface")
coderDictionary = 

  Dictionary with properties and Sections:

                    ServicesHeaderFileName: 'services.h'
                         InitTermFunctions: [1×1 coder.dictionary.Section]
                PeriodicAperiodicFunctions: [1×1 coder.dictionary.Section]
                    DataReceiverInterfaces: [1×1 coder.dictionary.Section]
                      DataSenderInterfaces: [1×1 coder.dictionary.Section]
                    DataTransferInterfaces: [1×1 coder.dictionary.Section]
                           TimerInterfaces: [1×1 coder.dictionary.Section]
                 ParameterTuningInterfaces: [1×1 coder.dictionary.Section]
         ParameterArgumentTuningInterfaces: [1×1 coder.dictionary.Section]
                     MeasurementInterfaces: [1×1 coder.dictionary.Section]
             SubcomponentInitTermFunctions: [1×1 coder.dictionary.Section]
    SubcomponentPeriodicAperiodicFunctions: [1×1 coder.dictionary.Section]
                    SharedUtilityFunctions: [1×1 coder.dictionary.Section]
                              InternalData: [1×1 coder.dictionary.Section]
                                 Constants: [1×1 coder.dictionary.Section]
                            StorageClasses: [1×1 coder.dictionary.Section]
                        DataMemorySections: [1×1 coder.dictionary.Section]
                    FunctionMemorySections: [1×1 coder.dictionary.Section]

Embedded Coder ディクショナリには coder.dictionary.Section オブジェクトが含まれています。このオブジェクトのそれぞれが、ディクショナリのサービス インターフェイス、関数、またはコード定義のカテゴリを表します。

バージョン履歴

R2019b で導入

すべて展開する