Main Content

addServiceInterface

Add service interface to Simulink interface dictionary

Since R2023a

In R2023b the Architectural Data section of data dictionaries was introduced. When managing interfaces, data types, constants, and software address methods consider using the Simulink.dictionary.ArchitecturalData programmatic interfaces instead. For more information, see Programmatically Manage AUTOSAR Architectural Data.

Description

serviceInterfaceObj = addServiceInterface(dictObj,serviceInterfaceName) adds a service interface with the specified name in the dictionary and returns the service interface object that represents this interface.

example

Examples

collapse all

To add a service interface with the specified name to a native (unmapped) interface dictionary, use the addServiceInterface function.

dictName = 'MyInterfaces.sldd';
dictAPI = Simulink.interface.dictionary.create(dictName);

serviceInterfObj = addServiceInterface(dictAPI,'ServiceInterface1');

Input Arguments

collapse all

Interface dictionary, specified as a Simulink.interface.Dictionary object. Before you use this function, create or open dictObj by using Simulink.interface.dictionary.create or Simulink.interface.dictionary.open.

Service interface name in Interfaces property array of dictObj, specified as a character vector or a string scalar.

Example: 'ServiceInterface1'

Output Arguments

collapse all

Service interface, returned as a Simulink.interface.dictionary.ServiceInterface object.

Version History

Introduced in R2023a

collapse all

R2023b: Simulink.interface.Dictionary object replaced by Simulink.dictionary.ArchitecturalData object

Starting in R2023b, use the Simulink.dictionary.ArchitecturalData object to programmatically manage architectural data instead of the Simulink.interface.Dictionary object.