Create and edit interface dictionaries
The Interface Editor lets you edit an interface dictionary through a
Simulink.interface.Dictionary object. You can open the Interface Editor from a
system architecture model in the Simulink Editor or from the MATLAB® Command Window. By using the Interface Editor, you can create interface and data
type definitions that can be shared among both Simulink and architecture models and saved to
the interface dictionary
With the Interface Editor, you can:
Support the AUTOSAR Classic Platform:
For more information, see Manage Shared Interfaces and Data Types for AUTOSAR Architecture Models.
While working in the Interface Editor, you can filter, sort, and search design data in the main Contents pane to manage data. See Filter and Manage Design Data in Contents Pane.
Open the Interface Editor
You can open the Interface Editor using any of these methods.
From the Simulink® Editor for a system architecture, select Modeling > Design > Interface Editor.
With the Interface tab open, click the Open Interface Dictionary button.
From an existing interface dictionary file, double-click the
At the MATLAB command prompt, type
If you have opened an interface dictionary object (for example,
dictionaryObjectName), at the MATLAB command prompt, type
Create, Open, and Save an Interface Dictionary
You can create, open, and save an interface dictionary from the Interface Editor.
To create an interface dictionary, from the File section, click
New. You can also create interface dictionaries from an
architecture model or programmatically from the MATLAB Command Window. See Create Interface Dictionary for more information
about creating interface dictionaries from architecture models. Use
Simulink.interface.dictionary.create to create interface
To open one or more interface dictionaries in the Interface Editor, from the File section, click Open. The name of the open dictionary appears in the Sources pane. For information about managing multiple interface dictionaries, see Manage Multiple Interface Dictionaries.
You can also import a MAT file containing design data or import design data from the base workspace to an interface dictionary by using the controls under the Files section.
Manage Multiple Interface Dictionaries
You can open multiple interface dictionaries in a single editor window and switch between them by using the Sources pane.
To manage multiple interface dictionaries:
From the File section, click Open to open existing interface dictionaries or click New to create a new interface dictionary.
From the Sources pane, select an interface dictionary.
Select the Interfaces, Data Types, or platform-specific tabs to view or edit design data. See Create and Configure Interface and Data Type Definitions.
On the Interfaces and Data Types tabs, the Interface Editor provides a DataSource column indicating the source interface dictionary for each interface or data type.
To reference an interface dictionary from another interface dictionary:
Open both interface dictionaries.
From the Sources pane, double-click the name of the interface dictionary to which you want to add a referenced interface dictionary. The Details pane displays the Referenced Dictionaries section.
In the Details pane, click Add to add a referenced dictionary. The design data in the referenced dictionary displays in the main Contents pane.
On the toolstrip, under Settings, select or clear Include content from referenced dictionaries to show or hide the data from referenced interface dictionaries.
Once an interface dictionary is referenced, design data from the
referenced dictionary can be used by the open dictionary that references it. For
example, the image shows that the data element in data interface
MyDataInterface2 hierarchically uses enumeration
OtherEnum from referenced
its data type.
From the Referenced Dictionaries section, you can add additional referenced interface dictionaries, view hierarchical information in the Dependency Analyzer, remove a reference, or open an already referenced interface dictionary.
You cannot add an interface dictionary reference for interface dictionaries mapped to the AUTOSAR Classic Platform. See Configure AUTOSAR Classic Platform Properties in Interface Dictionary for more information about configuring an interface dictionary to support AUTOSAR classic architectures.
Create and Configure Interface and Data Type Definitions
You can create interfaces and data types to be shared among your architecture models and configure their associated properties.
On the toolstrip, in the Create section, add interface and data type definitions on the respective Interfaces and Data Types tabs by clicking the data type and interface icons.
|Supported Data Types||Interface Editor Operations|
Adds a Simulink enumeration data type
|Supported Interface Elements||Interface Editor Operations|
Adds a data interface object to the interface dictionary. For
information about performing this operation programmatically, see
|Data Element||Adds a data element object to the selected data interface. For
information about performing this operation programmatically, see |
To configure interfaces and data types, on the Interfaces or Data Types tab, select an interface or data type object and edit its properties in the main Contents pane and in the Details pane. For more information about interface and data type object properties, use the links in the tables above.
In R2023a: On the Interfaces tab, you can view service
interfaces previously created in System Composer or by using the method
To configure AUTOSAR properties, see Configure AUTOSAR Classic Platform Properties in Interface Dictionary.
When you save the interface dictionary, these properties are set in the interface
Configure AUTOSAR Classic Platform Properties in Interface Dictionary
Once you specify the platform as AUTOSAR Classic, you can:
Define SwAddrMethods on the dedicated SwAddrMethods tab.
Configure the AUTOSAR communication kind and calibration properties for data interfaces and interface elements.
Set XML export options.
Export an interface dictionary to ARXML.
To specify AUTOSAR Classic Platform:
On the toolstrip, in the Platform section, select AUTOSAR Classic. The toolstrip, the main Contents pane, and the Details pane update to display platform-specific options.
To create and configure SwAddrMethods:
On the toolstrip, in the Create section, click SwAddrMethod. A software address method definition is added on the SwAddrMethods tab.
Under SwAddrMethods, set SectionType, Exported XML File, and Package as needed.
For more information about configuring SwAddrMethods, see Configure AUTOSAR SwAddrMethods.
To create and configure data interfaces and data elements:
On the toolstrip, in the Create section, click Data Interface. A data interface object is added under the Interfaces tab.
Under Interfaces, click a data interface and edit its name as needed.
While the interface is selected, configure the attributes of your interface in the main Contents pane and in the Details pane. Platform-specific interface properties InterfaceKind, IsService, and Package are located under the AUTOSAR section in the Details pane.
While the interface is selected, on the toolstrip, in the Create section, click Data Element to add elements to the interface.
Click a data element and edit its name as needed.
While the data element is selected, configure its attributes in the main Contents pane and in the Details pane.
For Type, supported data types include ones you have created, located on the Data Types tab. See Create and Configure Interface and Data Type Definitions.
Platform-specific calibration properties DisplayFormat, SwAddrMethod, SwCalibrationAccess are located under the AUTOSAR section in the Details pane.
When you save the interface dictionary, interface, data type, and platform-specific
design data are saved in the
For more information about AUTOSAR interface and calibration properties, see Configure AUTOSAR Communication Interfaces and Configure AUTOSAR Data for Calibration and Measurement.
For more information about setting AUTOSAR properties programmatically, see
Configure AUTOSAR XML Options in Interface Dictionaries
The XML Options button is available in the Platform section when the development platform is set to AUTOSAR Classic. Component and architecture models linked to the interface dictionary use the same XML export parameter values as defined in the interface dictionary.
On the toolstrip, under Platform, click the XML Options button to configure the export options.
Clicking the XML Options button opens the View and Edit XML Options dialog box and lets you set options for export to ARXML files.
For more information about XML options for classic architecture modeling, see Configure AUTOSAR XML Options.
Export AUTOSAR Definitions to ARXML and Support Files
You can export AUTOSAR interface dictionary contents to ARXML.
On the toolstrip, under Share, click the Export button.
Clicking the Export button exports the interface dictionary
contents to ARXML and RTE stub header files. This operation creates a folder in the
current folder that contains the ARXML files. You can use
exportDictionary to programmatically perform this operation.
Filter and Manage Design Data in Contents Pane
The main Contents pane provides an interactive table with information about the objects, such as hierarchy and properties. You can select which columns appear in the table by selecting Columns in the toolstrip.
Use the main Contents pane to:
Filter objects — Enter a universal filter or a column-specific filter.
Edit objects — Double-click a value in the table and enter a new value. When you enter a value that is not supported, a diagnostic message appears in the pane.
Batch edit objects — Select objects of the same type that you want to edit. Double-click a value of one of the selected objects and enter a new value. The new value applies to all selected objects.
Reorder interface and structure type element objects — Drag the element objects to a new position or click the Move Up and Move Down buttons in the toolstrip.
Cut, copy, and paste objects — Use keyboard shortcuts or click the corresponding buttons in the toolstrip.
Delete objects — Press the Delete key or click the Delete button in the toolstrip. When you delete an interface object, you also delete the interface element objects it contains.
For more information about using the Contents pane, see Manage Interfaces with Data Dictionaries (System Composer).
Introduced in R2022b