coder.dictionary.Entry.isDictionaryDefault - Determine if entry is default code definition for a category - MATLAB (original) (raw)

Main Content

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

Determine if entry is default code definition for a category

Since R2023b

Syntax

tf = isDictionaryDefault(entryObj)

Description

[tf](#mw%5F8ee46f33-a9d1-44fe-aedb-ab73fc19a162) = isDictionaryDefault([entryObj](#mw%5Fc810990d-d7f3-4fce-b06d-f6fa6d8b128a)) returns true if the entry is the default code definition for its category.

Input Arguments

expand all

Embedded Coder Dictionary entry, specified as acoder.dictionary.Entry object.

Output Arguments

expand all

True or false result, returned as a 1 or 0 of data type logical.

Examples

expand all

Create a Simulink data dictionary that contains an Embedded Coder Dictionary. Create the Embedded Coder Dictionary so that it represents a service interface configuration.

dictionaryFile = Simulink.data.dictionary.create('codeDefinitions.sldd'); codeDictionary = coder.dictionary.create('codeDefinitions.sldd','ServiceInterface');

Create a coder.dictionary.Section object that represents theMeasurement Interfaces section of the Embedded Coder Dictionary.

measSect = getSection(codeDictionary, 'MeasurementInterfaces');

Get the coder.dictionary.Entry objects that represent the definitions in the Measurement Interfaces section. For this example, there is one measurement interface entry.

entries =

Entry with properties:

        Name: 'MeasurementExample1'
  DataSource: 'C:\work\codeDefinitions.sldd'
StorageClass: 'MeasurementStruct'

Determine if the entry MeasurementExample1 is the default measurement interface for the dictionary.

tf = isDictionaryDefault(entries)

For this example, the measurement interface entry is the default code definition for measurement interfaces.

Version History

Introduced in R2023b