Transformation of Data and Interfaces
Get structured data definition in Simulink® Dictionary from Capella Data definition.
Workflow
The generic workflow is detailed in Getting started.
Below are the specific options to choose in this workflow:
-
Select in the Capella Project Explorer the Data Packages to export.
-
Open the "Capella Export to Simulink®" tool.
-
Select the transformation type "Data Packages sorted by engineering perspective".
-
Generate the export file.
-
Import the Data Packages in the project using the generated .mlcore file.
What are the data transformed?
This transformation computes an extended scope of transformation based on the Data Packages selected for this
transformation.
Additionaly to all the elements contained in the selected Data Packages (the User scope), the transformation
extends
the scope to all the elements required to fully define all the elements of the User scope.
Let's consider the following example where Exchange Items are stored in the "ExchangeItems" data package,
classes
typing some elements of Exchange Items are stored in "Classes" data package and physical quantities and units
used
to define Exchange Items elements and properties of classes are stored in "Physics" data package.
Let's consider the User scope is the "ExchangeItems" data package only, then the extended scope is :
-
all the elements of the "ExchangeItems" data package.
-
the classes used to type the Exchange Items elements. These classes are then stored in their corresponding
Data
Packages.
-
the Physical Quantities used to define Exchange Items elements and properties of classes.These classes are
then
stored in their corresponding Data Packages.
How are the Capella Data elements transformed?
-
Data Package is transformed as a Data Dictionary stored in the "data"
project
folder.
The name of the data dictionary is "<ArcadiaPerspective>_<DataPackageName>.sldd".
-
Exchange Item is transformed as Simulink.Bus.
The bus name is "busEI_<ExchangeItemName>".
It is stored in the data dictionary corresponding to the Data Package where the Exchange Item is stored.
-
Exchange Item element is transformed as Simulink.BusElement.
The bus element is typed with respect to its type defined in Capella.
The Bus element name is the same than the Capella element but potentially transformed to comply with MATLAB
naming
constraints.
-
Class is transformed as Simulink.Bus.
The Bus name is "busClass_<ClassName>"
-
Class element (property or composition) is transformed as Simulink.BusElement.
-
Enumeration is transformed as Simulink.data.dictionary.EnumTypeDefinition.
-
Enumeration literal is transformed as enumeral of Simulink.data.dictionary.EnumTypeDefinition.
-
Physical Quantity is transformed as Simulink.Signal.
Possible values for <ArcadiaPerspective> are:
-
'OA' for the Operational Analysis perspective;
-
'SA' for the System Needs Analysis perspective;
-
'LA' for the Logical Architecture perspective;
-
'PA' for the Physical Architecture perspective.
Assumptions & Limitations
A few limitations are identified, as follows:
Cyclic reference
Depending on where the various data are stored in Data Packages and the dependencies between them, there might
be
cyclic references between data dictionaries.
This is not supported and an error will occurat the model compile time.
Workaround:
organize Data Packages content to avoid cyclic references.
Name conflict
Although Capella allows to have the same name for several elements, this can cause name conflict in MATLAB.
Workaround:
do not name the same elements that will be stored in data dictionaries.