The Design mode of a project is where you layout and define your component-based system.
The Navigator on the left displays a list/tree of your components. The Stage on the right is where you interact with components and other objects to model your system.
Changes you make to the design are saved automatically.
Working with Components
Components are the main building blocks of your system. They represent pieces of software, each with their own interface specifications. After a component object is added to the stage, you'll be able to define which messages it sends and receives, and connect it to other design objects.
From the design, which acts a model of your system, interface code can be automatically generated in Workflow mode
New components can be placed anywhere in the design stage, and moved around as needed. The interface specifications (or messages) of the component can be defined after its added to the stage.
A component's name can be changed at any time by editing the component. The name must contain alphanumeric characters and underscores only.
Components can be deleted at any time by pressing the delete key or clicking the trash button. This will remove the component from the project, and remove its associated connections. A warning dialog will display to confirm deletion.
Define Component Interfaces
When you connect two unlocked components, their interfaces (see below for more info) are automatically updated to support the new connection. You can also update a component's interface individually by editing it and clicking the Interface tab.
The Interface determines which set of messages can be applied to a component. The packages shown in the dropdown menu originate from the FlexLang area. There are many built-in packages, but you can also add your own or fork existing ones. For more information see Flex Code Editor.
One or more messages from the selected package can be applied to a component. For each message, you can set the direction to be Input, Output, or Input/Output.
The Message API determines the format of code generated from Tangram Pro. The Tangram Pro Default API option suits most scenarios, and others may be used for special cases.
The following options affect generated component software interface code:
- Tangram Pro Default API
- OMS – Select this option when working with the OMS package
The following options only affect generated transform code, which makes it compatible with the selected option:
- OMS 2.0
Lock Component Interfaces
You can prevent changes to a component's interface specification by locking it. Edit the component, go the Interface, and click the Unlocked/Locked button.
Connecting components allows you to define which messages are sent and received between them.
The selectable messages originate from the Flex Code Editor. There are many built-in messages, but you can also add your own or customize existing ones. For more information see Flex Code Editor.
To connect components:
- Click the Connect button
- Select the sender component
- Select the receiver component
- Choose a Message Set from the dropdown
- Choose one or more Messages from the dropdown
- Click anywhere on the stage to close the Connections panel. Changes are saved automatically
Change Connection Direction
A connection is added in one-direction by default. You can specify the other direction by clicking the Switch Directions button.
See Message Flow
You can view the flow of any particular message in your design. To do this, select a component in the Navigator and hover over any of its messages.
Connect with Transforms
You can also make a connection with a transform. Transforms allow you to connect components that do not share a common message. They do the job of converting message A to message B.
A transform must already be defined in the Flex Code Editor for the two different messages you wish to connect. For more information see Flex Code Editor.
To connect with a transform:
- First you'll need two objects on the stage (components, projects, inputs or outputs)
- Click the Add Transform button
- Click on the stage to add it
- Select the sender object
- Select the receiver object
- Choose the input and output messages in the Transform panel
- Click Apply Transform
Projects can be added to your design by clicking the Add Project button. They represent subsystems in your design. They look and act similar to components, except that they must have an Input object and Output object defined within them in order to connect to other objects.
Define Inputs and Outputs
Input and output specifications can be defined and act like an interface for your project. Inputs are the messages that the project requires, and outputs are the messages that the project provides. A project with defined inputs and outputs can be used like a component in other projects. As your project library grows, the more interchangeable parts you'll have at your disposal.
To add them, use the Define Input and Define Output buttons in the toolbar. Connect the input or output object to a component and select the desired messages.
If more granular specifications are needed for a component, you can open it and build a system within it.
To design a subsystem:
- Select a component
- Click the Open Component button. You'll see an empty stage
- Design your system
- Include an Output object, and define a connection so that the output message matches the message the main component is sending
- Click on the project in the Navigator to return to the top-level system view
For example, if the top-level component ("Sender" in the screenshot below) is sending an "AirVehicleState" message, then the output of the nested design should include an "AirVehicleState" message.
If the output of the subsystem doesn't satify the requirements of the main component, the design will be highlighted red and indicate which message isn't satisfied. In the screenshot below, "AirVehicleConfiguration" needs to be added to the output of the subsystem.
A subsystem designed inside a component sure looks a lot like a separate project. Instead of designing a subsystem, you can swap a component and replace it with an existing project.
To swap a component for a project:
- Select a component
- Click the Swap Component button
- Select a project. A Green Swap button means the inputs and outputs are satisfied. A Yellow Swap button means they are not satisfied. You can still add the project, but you'll need to update its inputs and outputs later for a valid design.
- You'll see the project with a magenta highlight. The color helps differentiate it from components
Export your Design
Save design image
You can save a snapshot of your design by clicking the Export button in the view toolbar. Select either PNG or PDF.
Export as AADL
You can export your project design as AADL files by going to Settings. Exported projects can be imported by going to Projects > New Project and clicking Import Project from AADL.