Main Content

get

Class: coder.dictionary.Entry
Namespace: coder.dictionary

Get value of code definition property

Since R2019b

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 RollAxisAutopilot 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.

openExample('RollAxisAutopilot')
coderDictionary = coder.dictionary.open('RollAxisAutopilot');
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'

Version History

Introduced in R2019b