Main Content

getEntry

Class: coder.dictionary.Section
Package: coder.dictionary

Return coder.dictionary.Entry object that represents an Embedded Coder Dictionary definition

Syntax

entryObj = getEntry(sectionObj,defName)

Description

entryObj = getEntry(sectionObj,defName) returns a coder.dictionary.Entry object representing the Embedded Coder Dictionary definition that has the name defName found in the section sectionObj, a coder.dictionary.Section object.

Input Arguments

expand all

Embedded Coder Dictionary section containing the code definition, specified as a coder.dictionary.Section object. The section name identifies the type of code definition.

Name of Embedded Coder Dictionary definition, specified as a character vector or string scalar.

Example: 'StorageClass2'

Output Arguments

expand all

Embedded Coder Dictionary entry, returned as a coder.dictionary.Entry object. The entry represents the code definition in the Embedded Coder Dictionary section.

Examples

expand all

Open the model rtwdemo_roll and represent the Embedded Coder Dictionary by using a coder.Dictionary object. Use this object to access the Storage Classes section of the dictionary, which contains the storage class definitions.

rtwdemo_roll
coderDictionary = coder.dictionary.open('rtwdemo_roll');

Create a coder.dictionary.Section object that represents the Storage Classes section of the Embedded Coder Dictionary.

storageClassesSect = getSection(coderDictionary, 'StorageClasses');

Represent the example storage class ParamStruct by using a coder.dictionary.Entry object.

entryObj = getEntry(storageClassesSect,'ParamStruct')
Entry with properties:

          Name: 'ParamStruct'
    DataSource: 'rtwdemo_roll'
Introduced in R2019b