Main Content

get

Class: coder.dictionary.Entry
Package: coder.dictionary

Get value of code definition property

Syntax

propValue = get(entryObj,propName)

Description

propValue = get(entryObj,propName) returns the value of the property propName for the code definition that entryObj represents.

Input Arguments

expand all

Embedded Coder Dictionary entry that represents the code definition, specified as a coder.dictionary.Entry object. Before you use this function, represent the code definition by using a coder.dictionary.Entry object. Use, for example, the addEntry function.

Property of code definition, specified as a character vector or string scalar.

Output Arguments

expand all

Value of the property propName for the code definition that entryObj represents, returned as a string or a coder.dictionary.Entry object. For storage classes and function customization templates, the MemorySection property can have a value that is a coder.dictionary.Entry object representing a memory section definition.

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 and represent the section with a coder.dictionary.Section object.

rtwdemo_roll
coderDictionary = coder.dictionary.open('rtwdemo_roll');
storageClassesSect = getSection(coderDictionary, 'StorageClasses');

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

entryObj = getEntry(storageClassesSect,'ParamStruct');

Return the value of the DataInit property of the storage class definition. This storage class uses static data initialization.

dataInitVal = get(entryObj,'DataInit')
dataInitVal =

    'Static'
Introduced in R2019b