coder.dictionary.Entry.get - Get value of code definition property - MATLAB (original) (raw)

Main Content

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

Get value of code definition property

Syntax

propValue = get(entryObj,propName)

Description

[propValue](#mw%5F0fe1c2e9-9552-40f5-a3be-80ba4bc73e5f) = get([entryObj](#mw%5Ff28486c7-e212-4afd-844e-a3dd0a9deb46),[propName](#mw%5F8c1124c2-206e-4b26-aa4f-2c1ef5fb8879)) returns the value of the property propName for the code definition thatentryObj represents.

Input Arguments

expand all

Embedded Coder Dictionary entry that represents the code definition, specified as acoder.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 thatentryObj represents, returned as a string or acoder.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 acoder.dictionary.Section object.

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

Represent the example storage class ParamStruct by using acoder.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')

Version History

Introduced in R2019b