Main Content

coder.Dictionary class

Package: coder

Configure Embedded Coder Dictionary

Since R2019b

Description

An object of the coder.Dictionary class represents an Embedded Coder Dictionary. Use the object to perform operations on the Embedded Coder Dictionary, such as load packages of definitions and gain access to sections of the dictionary.

A coder.Dictionary object contains coder.dictionary.Section objects, which represent the categories of an Embedded Coder Dictionary. A coder.dictionary.Section object contains coder.dictionary.Entry objects, which represent the definitions stored in that section of the Embedded Coder Dictionary. The name of the section identifies the type of code definitions that the section contains. To access the sections of an Embedded Coder Dictionary, use a coder.Dictionary object. To access the dictionary entries within the section, use a coder.dictionary.Section object.

Creation

The functions coder.dictionary.create and coder.dictionary.open create a coder.Dictionary object.

Methods

expand all

Examples

collapse all

Create a data dictionary to contain an Embedded Coder Dictionary.

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

Create an Embedded Coder Dictionary in the data dictionary and use a coder.Dictionary object to represent the Embedded Coder Dictionary.

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]

The Embedded Coder Dictionary contains three coder.dictionary.Section objects, each of which represents a section of the dictionary.

Create a data dictionary to contain the Embedded Coder Dictionary.

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

Create an Embedded Coder Dictionary in the data dictionary and use a coder.Dictionary object to represent the Embedded Coder Dictionary. Specify that the interface configuration type is service interface.

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]
           SubcomponentEntryFunctions: [1×1 coder.dictionary.Section]
               SharedUtilityFunctions: [1×1 coder.dictionary.Section]
                       StorageClasses: [1×1 coder.dictionary.Section]
                   DataMemorySections: [1×1 coder.dictionary.Section]
               FunctionMemorySections: [1×1 coder.dictionary.Section]

The Embedded Coder Dictionary contains coder.dictionary.Section objects, each of which represents a category of service interfaces, functions, or code definitions in the dictionary.

Version History

Introduced in R2019b

expand all