Manage Interfaces with Data Dictionaries
Engineering systems often share interface definitions across multiple components or subsystems. Data interfaces in System Composer™ can be stored either locally in a model or in a data dictionary, depending on the maturity of your system. For interfaces terminology, see Define Port Interfaces Between Components.
An interface data dictionary is a consolidated list of all the interfaces and value types in an architecture and where they are used.
Local interfaces on a System Composer model can be saved in an interface data dictionary using the Interface Editor. You can reuse interface dictionaries between models that need to use a given set of interfaces, elements, and value types. Linked data dictionaries are stored in separate SLDD files.
For more advanced dictionary referencing techniques, see Reference Data Dictionaries.
Mobile Robot Architecture Model with Interfaces
This example shows a mobile robot hardware architecture with interfaces defined.
Save, Link, and Delete Interfaces
By default, interfaces are stored within the architecture model and are not visible outside the model. If you are in the initial stages of building a system model, store interfaces locally to limit the number of files that need to be managed. However, if your model is mature to the point of leveraging componentization workflows like reference architectures and behaviors, storing interfaces in a data dictionary gives you the ability to share interface definitions across the model hierarchy.
Use the menu to save a data interface to a new or existing data
dictionary. To create a new data dictionary, select Save to new
dictionary. Provide a dictionary name.
You can also add the interface definitions in the model to an existing data dictionary by selecting Link existing dictionary.
Use the button to import interface definitions from a Simulink® bus object, either from a MAT-file or the workspace.
Delete a data interface from a dictionary using the button. If the data interface is already being used by
ports in a currently open model, the software returns a warning message. The data interface
is then removed from any ports in the open model that are associated with the data
interface.
If a data interface is deleted from a dictionary upon opening another model that shares the dictionary, a warning will be presented on startup if the deleted interface is used by ports in that model. The Diagnostic Viewer offers an option to remove the deleted interface from all ports that are still using it. You can also select ports individually and delete their missing interfaces.
A System Composer model and a data dictionary are separate artifacts. Even when the data
dictionary is linked to the model, changes to the data dictionary (a
.sldd
file) must be saved separately from changes to the model (a
.slx
file). To save changes to a linked data dictionary, use the button and select
Save
dictionary
. Once a data dictionary is saved, other models can use its
interface definitions by linking to the data dictionary, allowing multiple models to share
the same interface definitions.
See Also
createDictionary
| openDictionary
| saveToDictionary
| linkDictionary
| unlinkDictionary
| makeOwnedInterfaceShared