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