Contenido principal

Configure the DDS Interface

R2026b

The DDS interface defines how a Simulink® application communicates on the DDS network. It specifies the Topics and Quality of Service (QoS) settings associated with the model’s inports (DataReaders) and outports (DataWriters).

To configure the DDS interface for the shapesdemo model:

  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 a DataReader. In the Code Mappings editor, click the Inports tab:

    1. Choose a Topic for inport from the drop-down list. For the Square inport, select the Topic as ShapesDomainLibrary/ShapesDomain/Square.

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

    3. Select the Quality of Service (QoS). Under the Reader QoS, select:

      • Default — The default QoS profile is the provided by your target DDS vendor, eProsima.

      • Built-in QoS profiles — These profiles automatically appear when you use the Quick Start default dictionary option.

      • Imported from XML — Imported QoS profiles also appear as options in the drop-down.

      For this example, select Default.

  3. Configure a DataWriter. In the Code Mappings editor, click the Outports tab:

    1. Choose a Topic for the outport from the drop-down list. For the Circle outport, specify the Topic as ShapesDomainLibrary/ShapesDomain/Circle.

    2. Choose the DataWriter source. Under the Writer XML Path, select Auto to have DDS Blockset automatically generate a writer for the application.

    3. Select the Quality of Service (QoS). Under the Writer QoS, select:

      • Default — The default QoS profile is the provided by your target DDS vendor, eProsima.

      • Built-in QoS profiles — These profiles automatically appear when you use the Quick Start default dictionary option.

      • Imported from XML — Imported QoS profiles also appear as options in the drop-down.

      For this example, select Default.

See Also

Topics