coder.Dictionary.getSections - Return coder.dictionary.Section objects of an Embedded Coder

  Dictionary - MATLAB ([original](https://www.mathworks.com/help/ecoder/ref/coder.dictionary.getsections.html)) ([raw](?raw))

Main Content

Class: coder.Dictionary
Namespace: coder

Return coder.dictionary.Section objects of an Embedded Coder Dictionary

Syntax

sections = getSections(coderDictionaryObj)

Description

[sections](#mw%5Fb61b1a9c-6215-4195-af8e-88bde87cb68b) = getSections([coderDictionaryObj](#mw%5F3368990f-0a30-4f2c-a0fc-21b355ef35b6)) returns the coder.dictionary.Section objects contained in the Embedded Coder Dictionary thatcoderDictionaryObj represents. Use the section objects to access code definitions of different types identified by the section names.

Input Arguments

Output Arguments

expand all

Sections of the Embedded Coder Dictionary, returned as an array ofcoder.dictionary.Section objects. The sections in the dictionary depend on the code interface configuration type of the dictionary.

A service interface configuration contains these sections:

A data interface configuration contains these sections:

Examples

expand all

Open the model RollAxisAutopilot and represent the Embedded Coder Dictionary by using a coder.Dictionary object. Assign thecoder.Dictionary object to the variablecoderDictObj.

openExample("RollAxisAutopilot") coderDictObj = coder.dictionary.open("RollAxisAutopilot")

coderDictObj =

Dictionary with Sections:

                StorageClasses: [1×1 coder.dictionary.Section]
                MemorySections: [1×1 coder.dictionary.Section]
FunctionCustomizationTemplates: [1×1 coder.dictionary.Section]

Access the sections of the dictionary by using an array of the correspondingcoder.dictionary.Section objects.

sectionsArray = getSections(coderDictObj)

sectionsArray =

1×3 Section array with properties:

Name

Use each coder.dictionary.Section object to access the entries in that section of the dictionary. The first section contains entries that represent function customization template definitions.

sectObj = sectionsArray(1)

sectObj =

Section with properties:

Name: 'FunctionCustomizationTemplates'

Version History

Introduced in R2019b

expand all

Access the sections of Embedded Coder Dictionaries that use the service interface configuration. You can still access sections in Embedded Coder Dictionaries that use the data interface configuration.