Main Content

Configure the DDS Interface

The DDS interface is the connection point between your DDS application and the DDS network. Specifically, the connection point for a DDS application is the specification of the Topic and Quality of Service (QoS) for the DataReaders and DataWriters of the application.

To configure the DDS interface for the Shapes Demo:

  1. Open the Code Mappings editor. On the DDS tab, click Code Interface and select Individual Element Code Mappings.

    Simulink DDS model with Code Mappings pane open.

  2. Configure the Topic, Reader, and QoS for the inport that acts as a DataReader. In the Code Mappings editor, click the Inports tab:

    1. Select the Topic. For the Topic, select the Square Topic specified in the drop-down options by its path (ShapesDomainLibrary/ShapesDomain/Square).

    2. Select the DataReader. For the Reader XML Path, select Auto to have DDS Blockset automatically generate a reader for the application.

    3. Select the Quality of Service (QoS). For the Reader QoS, select from the following list of options:

      • You can leave the QoS policy as the default. The default QoS profile is the default provided by your target DDS vendor, eProsima

      • You can select from built-in QoS profiles. The built-in QoS profiles automatically appear when you use the Quick Start default dictionary option.

      • You can select from QoS profiles imported from XML. Imported QoS profiles also appear as options in this drop-down.

      For this example, select Default.

  3. Configure the Topic and QoS for the outport that acts as a DataWriter. In the Code Mappings editor, click the Outports tab:

    1. Select the Topic. For the Topic, select the Circle Topic specified in the drop-down options by its path (ShapesDomainLibrary/ShapesDomain/Circle).

    2. Select the DataWriter. For the Writer XML Path, select Auto to have DDS Blockset automatically generate a reader for the application.

    3. Select the Quality of Service (QoS). For the Writer QoS, select from the following list of options:

      • You can leave the QoS policy as the default. The default QoS profile is the default provided by your target DDS vendor, eProsima

      • You can select from built-in QoS profiles. The built-in QoS profiles automatically appear when you use the Quick Start default dictionary option.

      • You can select from QoS profiles imported from XML. Imported QoS profiles also appear as options in this drop-down.

      For this example, select Default.

Related Topics