Main Content

Import or Create DDS Definitions

To bring DDS concepts such as Domains, Topics, Types, and Quality of Service (QoS) into the Simulink® environment so that you can model and configure DDS applications, use the DDS Application Quick Start. The Quick Start enables you to import XML and IDL definitions or create default definitions and configure your application appropriately for its DDS vendor, RTI or eProsima, to provide the framework to model and build your application in Simulink.

To create DDS definitions and configure your application:

Open the DDS Application Quick Start

When you open a model in the DDS Blockset app, you are directed into the DDS Application Quick Start. The Quick Start enables you to name your application, specify your DDS vendor, and import or create DDS definitions required to configure your DDS application. To update these configuration options after completing the Quick Start, you can reopen the DDS Application Quick Start from the DDS tab by clicking Quick Start.

Specify Application Name and Vendor

On the first page of DDS Application Quick Start, specify the DDS application name and vendor.

By default, the name of your DDS application is set to the name of its application model. To customize the name, in the Application name field, enter a customized name.

To specify your DDS vendor (and set your toolchain), from the Vendor drop-down list, select RTI or eProsima. If you do not intend to generate code, vendor selection does not affect simulation, so you can accept the default vendor. For more information about the vendor setup for DDS Blockset, see DDS Blockset System Requirements.

Specify Source of DDS Definitions

On the second page of the DDS Application Quick Start, specify the source of your DDS definitions for your application. DDS definitions, whether created or imported, are stored in a section of the Simulink data dictionary called the DDS Dictionary. You can create and associate a DDS Dictionary with your application by using one of these options:

  • Use existing dictionary — If you have an existing DDS Dictionary, you can associate that dictionary with your new DDS application and reuse the definitions. This option is ideal for building applications set to similar requirements or standards.

  • Import from IDL/XML or Import from XML— If you have or would like to specify DDS definitions outside of Simulink and bring them into the Simulink environment you can directly import IDL or XML files when you use RTI or you can directly import XML files when you use eProsima. A new DDS Dictionary is created based on these definitions and then associated with your application. IDL and XML specifications enable maximum flexibility and control over your definitions.

  • Create and use default dictionary — If you would like to have a new DDS Dictionary created for you based on your application model, you can select to create and use a default dictionary. This option is the quickest and simplest option to get started.

Transition from DDS to Simulink Environment

To wrap-up, click Finish. The Quick Start creates and associates a DDS Dictionary with your application and configures the application so that you can generate an executable specific to RTI or eProsima.

Review DDS Definitions

Verify Definitions

To verify your DDS definitions, you can use the DDS Dictionary or Code Mappings editor. To verify Domain, Topic, Type, or QoS definitions, you can use the DDS Dictionary to view and edit these definitions. For more information, see Manage DDS Definitions.

To verify imported DataReader and DataWriter definitions, use the Code Mappings editor. To view the readers and writers, open the editor, set the Configuration Mode to Use Reader XML Path or Use Writer XML Path and verify that they appear as drop-down list options for the inports or outports. If you select a reader or writer, you can also verify its Topic and QoS properties loaded in the editor. For more information, see Interactively Configure DDS Interface.

Troubleshoot

If your imported definitions are not correct, examine and correct any errors in the imported IDL/XML or DDS Dictionary, and then associate the new definitions with your DDS application. To update or change vendor information,on the DDS tab, open the Quick Start and update the vendor.

Considerations and Limitations

  • Multiple XML Files — The Quick Start allows you to import one XML file. To import additional files, use the DDS Dictionary.

  • IDL File Import — IDL import is not directly supported for eProsima. To import IDL specifications, convert IDL to XML and import the XML files.

  • Duplicate Data Imported — Imported XML files pull additional XML files referenced by the include mechanism into the DDS Dictionary. If an XML file is referenced multiple times its definitions are imported each time resulting in duplicates.

See Also

|

Related Topics