Skip to main content

Flex Packages

Info

This page explains how to use Flex packages inside projects. To learn about managing Flex packages and dependencies see Flex Package Management

A Flex Package is a collection of Flex code used in projects to define component interfaces and connections. Packages provide the message and transform definitions used in project designs.

The following types of packages can be added to your projects:

  • Packages provided by Tangram Pro (e.g. OpenUxAS::LMCP::v3)
  • Packages provided by any teams that you are a member of
  • Packages you create

There are two main uses of packages in projects:

UsageExampleContents
Provides message definitions for the connections in project designs.You can add the OpenUxAS::LMCP::v3 package to a project, design a system that communicates with LMCP messages, and automatically generate interface code from the design.Flex code in this package will include message type definitions and any data types they are composed of.
Provides transform definitions for connections between components that use different interface packages.You can add the Transforms::LmcpV3Stanag4586V3 package a project, connect a component that communicates LMCP messages to a component that communicates STANAG4585 messages, and automatically generate the transform code to handle the conversion.Flex code in this package will include transform definitions and any functions or data types they are composed of.

Adding Packages

One or more packages can be added to a project by going to Flex Packages, searching for a package, and clicking the + button.

This will add the latest release of the package and allow you to use its messages or transforms in your design.

Add Package

Creating Packages

The Flex Editor is available in projects so you can create packages, write code and create releases in the same area as your project design. You can also access it outside of projects by going to FlexLang in the top menu.

While inside a project, go to Flex Packages, click the Open Flex Editor button and then Package Manager. From here you can create a package, or fork an existing one. Once created, you can add it your project and use its master branch or a release.

Package Manager

To learn more about managing packages see Flex Package Management

Using Master

The master branch is editable. Use master in a project if you want to design and update Flex code in tandem. Flex code changes on the master branch will automatically update the component interfaces in your project design.

The master branch can be selected by going to Flex Packages and clicking the dropdown beside the package.

Writing Flex Code?

To learn about the Flex language syntax see Flex Docs

Using Releases

Package releases are immutable and read-only. Use a release to prevent effects from future package updates. You can always create a new release and switch your project to use it as needed.

A specific release can be selected by going to Flex Packages and clicking the dropdown beside the package.

You'll be asked to confirm and shown which messages are changing between releases. This will update the component interfaces in your design to the selected release.

Removing Packages

Packages can be removed from projects by going to Flex Packages and clicking the x beside it.

You'll be asked to confirm, and shown the messages that are currently in use in your project design.