Main Content

Manage QoS

The DDS middleware platform offers several Quality of Service (QoS) policies that can be applied to control the data connection of your application on the DDS network. QoS policies are grouped into sets called profiles, that can be applied to DataWriters and DataReaders, Publishers and Subscribers, or Topics within the DDS network. When you use DDS Blockset, you can apply QoS profiles at each level of specification. DDS Blockset supports the default QoS profile provided by your DDS vendor, a built-in QoS profile included in DDS Blockset, or imported QoS profiles. You can use the DDS Dictionary to import, view, and edit these QoS profiles to meet your application requirements.

To create and manage the QoS for applications:

To learn how to apply QoS to your applications, see Configure QoS for DataReaders and DataWriters, Configure QoS for Subscribers and Publishers, and Configure QoS for Topics.

Import Quality of Service (QoS)

If you have previously or would like to specify DDS definitions by using IDL or XML, you can use the DDS Application Quick Start to import those definitions into a DDS Dictionary. If you would like to import more than one XML file or you are working in an existing DDS Dictionary, you can use the DDS Dictionary to import additional XML files. To import from the DDS Dictionary, on the dictionary toolstrip, click Import to select and upload additional XML files.

View Quality of Service (QoS)

To open a DDS Dictionary to view QoS profiles and policies, on the DDS tab, click Code Interface and select DDS Dictionary. To view QoS, click the QoS tab in the DDS Dictionary.

Alternatively, you can open the DDS Dictionary from a Simulink® data dictionary. In a Simulink data dictionary, if DDS definitions are available, a DDS Libraries node appears in the dictionary. If you open the DDS Libraries section of the Simulink data dictionary, in the Details pane, you can click Open DDS Libraries to open the graphical interface for the DDS Dictionary.

Edit Quality of Service (QoS)

You can use the DDS Dictionary to view and configure these aspects of the QoS available for your DDS application:

View QoS Libraries, Profiles, and Policies

QoS policies can be grouped into sets called QoS profiles. These profiles can then be grouped into sets of profiles called libraries. You can view imported libraries, profiles, and policies in the DDS Dictionary QoS tab. To adjust the QoS libraries, profiles, and policies available for your application, you must define these definitions in XML and import them into the DDS Dictionary.

Configure Default QoS

The default QoS profile is the default provided by your target DDS vendor (RTI or eProsima). To see details of this profile, refer to your vendor documentation.

Configure Built-In QoS

DDS Blockset provides a built-in QoS library, composed of four QoS profiles specified by application type:

  • Event-based applications

  • Real-time event-based applications

  • Real-time stream applications

  • Stream applications

To access the default QoS profile, if you select the Create and use default dictionary option in the DDS Application Quick Start, the built-in library is included in your created default dictionary. If you use a different source of DDS definitions, you can use the DDS Dictionary to import the built-in QoS profile that is included in DDS Blockset, defaultqos.xml.

Configure QoS Profile Names

To change the name of a QoS profile, in the Name column, click and directly edit the spreadsheet.

Configure the Values of QoS Policies

To adjust the values of certain QoS policies, select a QoS profile. In the Details pane, if a QoS policy is collapsed, you can expand the policy and adjust the value.

Duplicate QoS Profiles

To duplicate QoS profiles, select the profile, and then on the DDS Dictionary toolstrip, click Duplicate.

Delete QoS Profiles

To delete QoS profiles, select the profile, and then on the DDS Dictionary toolstrip, click Delete.

Examples

These examples show how to apply QoS at various levels of your DDS application.

Configure QoS for DataReaders and DataWriters

In DDS Blockset, application model inports and outports behave as DataReaders and DataWriters. To apply QoS to a reader or writer, you can use the Code Mappings editor and Property Inspector to configure the QoS for individual ports.

  1. (Optional) Import QoS. If you would like to import your own QoS or the built-in QoS profile, use the DDS Application Quick Start or DDS Dictionary.

  2. Open the DDS Dictionary to view the QoS profiles available for your application. On the DDS tab, click Code Interface and select DDS Dictionary.

  3. Configure QoS for DataReaders and DataWriters. If you would like to configure QoS from a previously defined and imported reader or writer, use the Reader/Writer XML Path configuration mode and select the reader or writer. Otherwise, use the Topic and QoS configuration mode, and use the Property Inspector to select a QoS profile for your inport or outport.

For more information about how to configure inports and outports, see Interactively Configure DDS Interface.

Configure QoS for Subscribers and Publishers

In DDS Blockset, the application model behaves as a Publisher or Subscriber and the inports and outports as DataReaders and DataWriters. To apply QoS at the Publisher or Subscriber level, you can simulate this effect by using the Code Mappings editor and Property Inspector to configure all the inports or outports to the same QoS profile. To simulate a Subscriber, configure all the inports to the same QoS profile. To simulate a Publisher, configure all the outports to the same QoS profile.

  1. (Optional) Import QoS. If you would like to import your own QoS or the built-in QoS profile, use the DDS Application Quick Start or DDS Dictionary.

  2. Open the DDS Dictionary to view the QoS profiles available for your application. On the DDS tab, click Code Interface and select DDS Dictionary.

  3. Configure QoS for Publishers and Subscribers. If you would like to configure QoS from a previously defined reader or writer, use the Reader/Writer XML Path configuration mode and select the same reader or writer for all inports or outports. Otherwise, use the Topic and QoS configuration mode, and use the Property Inspect to select the same QoS profile for all inports or outports.

For more information about how to configure inports and outports, see Interactively Configure DDS Interface.

Configure QoS for Topics

This example shows how to use the DDS Dictionary to configure the QoS for a Topic.

  1. Open the DDS Dictionary.

  2. Topics are contained within Domains. To configure Topics, click the Domains tab.

  3. Select a Topic.

  4. Configure the QoS for that Topic. In the Details pane, for the Topic QoS, select a QoS profile from the drop-down options. By default, Topics are set to the default QoS for the selected DDS vendor. The other options reflect the QoS available in the DDS Dictionary.

See Also

|

Related Topics