An interface defines the information that flows through a port. The same interface can be assigned to multiple ports. An interface can include elements that describe the properties of an interface signal. Interfaces represent the information that is shared through a connector and enters or exits a component through a port. Use the Interface Editor to create and manage interfaces and interface elements and store them in an interface data dictionary for reuse between models.
An interface element is a piece of data that is transmitted across an interface, such as a communication message, a calculated or measured parameter, or other decomposition of that interface. Examples of interface elements include:
Pins or wires in a connector or harness.
Messages transmitted across a bus.
Data structures shared between components.
A system engineering solution includes a formal definition of the interfaces between components. A connection shows that two components have an output-to-input relationship, and an interface defines the type, dimensions, units, and structure of the data.
To show the Interface Editor, in the Design section, on the Modeling tab, select Interface Editor. The Interface Editor will open along the bottom pane.
The System Composer™ Interface Editor is a web-based widget and might appear blank when you first
launch it. If this occurs, save the model and relaunch MATLAB® with the command line option
To add a new interface definition, click the icon. Name the interface.
To add an element to the interface, click the icon. Interface and element names must be valid variable names.
You can delete interfaces and elements in the Interface Editor using the button.
You can view and edit the properties of an element in the Property Inspector. Right-click the interface element and select Inspect Properties. For interfaces, use the Property Inspector to apply stereotypes.
For a comparative view, you can edit interface element properties from the Interface Editor columns.
A nested interface contains another interface. Create a nested interface by assigning an interface as the type of an interface element. For information about the corresponding bus objects, see Nest Bus Objects Using the Bus Editor.
For example, let
coordinates be an interface that consists of
location and a
timestamp. If the
location element is in the same
format as the
coordinates interface, you can set its type to
location and select
Set 'Type' > coordinates. The available interface options
include all interfaces in the model, except the parent of the element.
The nested interface displays the inherited interface elements.
To change the number of columns that display in the Interface Editor, select the icon. Select or deselect the desired columns to show or hide them.