coder.Dictionary.getCodeInterfaceType - Determine whether coder.Dictionary object represents a service

  interface configuration or data interface configuration - MATLAB ([original](https://in.mathworks.com/help/ecoder/ref/coder.dictionary.getcodeinterfacetype.html)) ([raw](?raw))

Main Content

Class: coder.Dictionary
Namespace: coder

Determine whether coder.Dictionary object represents a service interface configuration or data interface configuration

Since R2023b

Syntax

interfaceType = getCodeInterfaceType(dict)

Description

[interfaceType](#mw%5F454d338c-1f12-4d57-9dfb-46e128bcd4f4) = getCodeInterfaceType([dict](#mw%5F40c737f8-0eab-43e9-a4b5-504863c506da)) returns the code interface type of the coder.Dictionary object. The type is either ServiceInterface or DataInterface. The interface type determines which types of code definitions you use in the dictionary and how you can deploy the generated code.

Input Arguments

expand all

Embedded Coder dictionary, specified as a coder.Dictionary object.

Output Arguments

expand all

Code interface configuration type of the coder dictionary, returned as a string. The interface type is either 'ServiceInterface' or'DataInterface'.

Examples

expand all

Open the model RollAxisAutopilot. Assign thecoder.Dictionary object for the model to the variablecoderDictObj.

openExample('RollAxisAutopilot') coderDictObj = coder.dictionary.open('RollAxisAutopilot');

Determine the code interface type for the Embedded Coder Dictionary by using thecoder.Dictionary object.

interfaceType = getCodeInterfaceType(coderDictObj)

interfaceType =

'DataInterface'

The dictionary has the data interface type. For the data interface type, you can add storage classes, memory sections, and function customization templates to represent the code interface.

Version History

Introduced in R2023b