Main Content

getSection

Class: coder.Dictionary
Namespace: coder

Return coder.dictionary.Section object that represents Embedded Coder Dictionary section

Since R2019b

Syntax

sectionObj = getSection(coderDict,sectionName)

Description

sectionObj = getSection(coderDict,sectionName) returns a coder.dictionary.Section object that represents one section, sectionName, of an Embedded Coder Dictionary, which coderDict represents. Use the section to access the code definitions of the type identified by the section name.

Input Arguments

expand all

Embedded Coder® Dictionary that contains the section you want to access, specified as a coder.Dictionary object.

Name of the section you want to access in the Embedded Coder Dictionary, specified as a string scalar or character vector. The section name identifies the type of code definitions that the section contains. The sections in the dictionary depend on the code interface configuration type of the dictionary.

A service interface configuration contains these sections:

  • "InitTermFunctions"

  • "PeriodicAperiodicFunctions"

  • "DataReceiverInterfaces"

  • "DataSenderInterfaces"

  • "DataTransferInterfaces"

  • "TimerInterfaces"

  • "ParameterTuningInterfaces"

  • "ParameterArgumentTuningInterfaces"

  • "MeasurementInterfaces"

  • "SubcomponentInitTermFunctions"

  • "SubcomponentPeriodicAperiodicFunctions"

  • "SharedUtilityFunctions"

  • "InternalData"

  • "Constants"

  • "StorageClasses"

  • "DataMemorySections"

  • "FunctionMemorySections"

A data interface configuration contains these sections:

  • "StorageClasses"

  • "MemorySections"

  • "FunctionCustomizationTemplates"

Output Arguments

expand all

Section in the Embedded Coder Dictionary, returned as a coder.dictionary.Section object. The section contains coder.dictionary.Entry objects that represent code definitions of the type identified by sectionName.

Examples

expand all

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

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]

Represent the Storage Classes section of the Embedded Coder Dictionary by using a coder.dictionary.Section object named SCSectObj.

SCSectObj = getSection(coderDictObj,"StorageClasses")
SCSectObj = 

  Section with properties:

    Name: 'StorageClasses'

Version History

Introduced in R2019b

expand all