2.4.1. Working with Types

The System Designer Types View lets you explore and manage data types in three ways:

  • Structured View: Explore and modify types in a graphical interface.

  • XML View: Review, edit, and validate types in XML format.

  • IDL View: Review, edit, and download the IDL definition for all types.

    Types views

The Types View is the default. To open it, select the hamburger icon hamburger_icon at the top left and select Types.

2.4.1.1. Structured View

In the Structured View, the following columns display:

  • Item. The element type and name for your XML elements.

  • Annotations. Additional element information. For example, member IDs or keyed members.

  • Location. The file where the type is defined. Helpful in projects with multiple XML files.

  • Edit. Commands to change or delete your elements. Container objects like structs, unions, and modules include a plus_icon button to add a child node.

Structured view

The toolbar in Structured View includes the following commands:

  • expand_icon - expand/collapse the listed objects

  • move_up_down_icon - rearrange selected objects

  • add_type_icon - add a new top-level type

You cannot move elements in or out of a container in this view. For example, moving a struct out of a module is not currently supported. To do that, you can switch to the XML view and modify the XML manually.

2.4.1.2. XML View

The XML View shows the types in XML format. Select a type in the tree panel to highlight it in the code.

XML view

The toolbar in XML View includes the name and location of the active XML file and the following commands:

  • edit_xml_icon - manually edit the XML file

  • codegen_check_icon - use RTI Code Generator to check the XML file for issues

All changes made in XML View are reflected in the Structured and IDL Views.

2.4.1.3. IDL View

The IDL View displays the IDL definition of the types:

Seeing the IDL definition

The toolbar in IDL View includes the following commands:

  • edit_idl_icon - manually edit the IDL file

  • download_idl_icon - download the IDL file or copy it to the clipboard

All changes made in IDL View are reflected in the Structured and XML views.

Tip

The RTI Connext Core Libraries Extensible Types Guide includes a mapping of type names in IDL 4.2. (For example, you may want to know that a long is called int32 in IDL 4.2).

2.4.1.4. Adding Data Types

This section uses an example to detail how to add XML data types to a project in System Designer. In this example, we will add and configure two structures.

Note

For more information on data types, see Introduction to the Type System in the Connext Core Libraries User’s Manual.

  1. In System Designer, create a new project using the Empty template.

    Creating a new project
  2. To add a new top-level type in your project, open the Types view, right-click the Types node in the tree panel, then select Add Struct….

    Selecting a top-level type

    The Add Struct dialog displays to guide you through creating a new type.

  3. In the Add Struct dialog, enter the name NewStruct1.

    Adding a structure

    The Base Type field and annotation checkboxes are optional. For information about the options in this dialog, mouse-over the fields to display tooltips. The text on the right also provides details about the available options.

    By default, the new type is added to the last XML file used.

    • To use a different XML file, use the File drop-down list to select a different file, or use the New… button to add a new XML file to your project.

    • If no XML file has yet been created in the project, select New… to create one.

    In this example, accept the File field default to save the new type to MyNewProject.xml, the file generated when you created this project.

  4. Repeat steps 2 and 3 to add a second type named NewStruct2.

  5. In the tree panel, select NewStruct1, select the Structured View, then click the plus_icon button on the NewStruct1 item.

    Populating a new structure

    The Add Struct Member dialog displays to guide you through populating the selected type.

  6. In the Add Struct Member dialog, add the following members:

    • In NewStruct1, add a uint8 named ‘member1’ and a bounded (255) keyed string named ‘member2’.

    • In NewStruct2, add a byte named ‘member1’ and a char8 named ‘member2’.

    Add members in a structure

    Mouse-over each field and use the text on the right for details about the options in this dialog.

On completing this example, the Structured View should include two structs, each with two members, as pictured below.

Structured view

2.4.1.5. Editing Data Types

To edit a data type, right-click the item in the tree panel and select Edit item…, or double-click the item in the tree panel. In the Structured View, for each listed item you can right-click, double-click, or use the Edit edit_icon icon.

Editing Types Profile

From the right-click context menu, you can also delete or add a member to the selected item. If you right-click a node, the Export XML node option is also available; this command lets you copy or download the node’s XML tree.

The experimental AI command uses Connext AI to provide guidance configuring your system. Use it to get clarification, suggestions for modifications and improvements, or to validate items.

Note

Connext AI is an experimental feature included in this release for evaluation only. Use it to explore the new AI features supported in System Designer.

Carefully review and validate AI-generated suggestions before deploying in production.

2.4.1.6. Using Fully Qualified Names when Referring to Objects

When referring to another type, you can either use the target data type without a namespace (in this case, the search will occur in the same module you are working on), or you must specify the full namespace of the target object. In particular, partial namespace qualification is not supported because it is naturally ambiguous.

For example, suppose you have this type (using IDL syntax):

module MyModule {
    module AnotherModule {
        struct BaseType {
            int16 x;
            int16 y;
        };
    }
}

Then suppose you want to create another structure inside AnotherModule that extends BaseType. You have two choices:

  • Use just the name BaseType to specify the base class

  • Use the fully qualified name MyModule::AnotherModule::BaseType

System Designer does not accept partial qualification, such as AnotherModule::BaseType, because it is ambiguous.