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.
- Data interface — The code generator creates a program intended to run on the target device. You define the code interfaces by using storage classes, memory sections, and function customization templates.
- Service interface — The code generator creates an algorithm that you intend to deploy within a larger application for a target platform. The platform middleware calls the algorithm code and defines services for the target device. You define how the generated code calls the services by creating function and service interface definitions in the dictionary.
Input Arguments
Embedded Coder dictionary, specified as a coder.Dictionary
object.
Output Arguments
Code interface configuration type of the coder dictionary, returned as a string. The interface type is either 'ServiceInterface'
or'DataInterface'
.
Examples
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