Skip to main content

Design

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.

Overview

tip

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 Build mode.

Add Components

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.

Rename Components

A component's name can be changed at any time by editing the component and going to the Info tab. The name must contain alphanumeric characters and underscores only.

Name

Delete Components

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.

tip

The Interface Package dropdown includes any Flex Packages that you've added to the project.

Interface

Message API

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
  • DDS
  • Protobuf

Interface Package

The Interface Package 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, and you can also add your own or fork existing ones. For more information see Flex Package Management.

Messages

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.

Lock Component Interfaces

You can prevent changes to a component's interface specification by locking it. Edit the component, go to Interface, and click the Unlocked/Locked button.

Duplicate Components

You can create a copy of a component by clicking the Duplicate button. This will copy an existing component's interface specifications to a new component. It will also copy nested designs, so all of the subsystems inside of the source component (its subcomponents and their connections) will be included in the copy.

Duplicate

Connect Components

Connecting components allows you to define which messages are sent and received between them, and which transport they communicate over.

note

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 Package Management.

To connect components:

  1. Click the Connect button
  2. Select a sender and a receiver component
  3. Choose a Transport
  4. Choose a Message Set from the dropdown
  5. Choose one or more Messages from the dropdown
  6. 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.

Change Direction

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.

Message Path

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.

Transforms

A Flex Package must exist and contain a Transform definition for the two different messages you wish to connect.

To connect with a transform:

  1. First you'll need two objects on the Design Stage (Components, Projects, Inputs or Outputs)
  2. Go to Flex Packages and add the package that contains the desired Transform code
  3. Click the Add Transform button, and click anywhere to add it
  4. Select the sender and receiver components
  5. Choose the input and output Messages
  6. Optionally, choose which Transports to use
  7. Click Apply Transform for the desired Transform
Optional Transports
  • Transports are required for the Transform if you wish to generate Transform Code with Interface Code. (The Build option Generate Transform with CSIs)
  • Transports can be left blank if you only need to generate the Transform Code with no Interface Code. (The Build option Generate Transform)

Transform Selection

All of the transforms that satisfy the conversion between your messages will be shown with the transform's name, package name and file name to help you differentiate between the options. You can also view a transform's Flex code definition by clicking the fx icon.

Working with Transports

A Transport is a property of a connection in Tangram Pro that designates which message delivery service to communicate over. As you design a system and connect components and transforms together, you can choose which transport to use for each connection. All connections in your design can use the same transport (e.g. ZeroMQ), or for more complex systems, you can assign different transports to different connections.

Add Transports

Add a transport to your design by clicking the Transports button at the top of the Navigator, and choosing a type:

  • ZeroMQ
  • ActiveMQ
  • RabbitMQ
  • Kafka
  • UDP
  • TCP

Transports

tip

You can add multiple transports. The first transport that you add is set as the default.

Rename Transports

Transports can be renamed at any time by selecting it in the Navigator, changing the name, and clicking Update. Transport names must be unique.

Delete Transports

Transports can be deleted at any time by selecting it in the Navigator and clicking Delete. Any connections referencing the deleted transport will be changed to the default transport. If the default transport is deleted, all connections referencing it will change to the next transport listed in the Navigator.

Default Transport

The default transport is shown in the Navigator with an asterisk * beside it. All new connections will default to this transport. You can change the default by selecting another transport in the Navigator and clicking Use as default Transport.

Add Project

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.

Nested Designs

If more granular specifications are needed for a component, you can open it and build a system within it.

To design a subsystem:

  1. Select a component
  2. Click the Open Component button. You'll see an empty stage
  3. Design your system
  4. Include an Output object, and define a connection so that the output message matches the message the main component is sending
  5. 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.

Nested

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.

Invalid

Swap Component

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:

  1. Select a component
  2. Click the Swap Component button Swap Component
  3. 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. Swap Select
  4. You'll see the project with a magenta highlight. The color helps differentiate it from components Swapped

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.