Configure Your QoS Through Profiles

For better reusability and maintenance of your code, design your QoS as sets of reusable profiles instead of tuning each data flow separately.

There are several ways to define and use QoS, and regardless of which one you are using, you can use profiles:

  • If you are using the built-in QoS profiles provided with version 5.1.0 and later, you can use the generic profiles that are provided with the product.  Inherit from the built-in profiles when you need QoS that are specific to a single data flow.
  • If your are defining your own QoS in XML files, when you define a QoS profile, name it after the pattern of data flow, if applicable.  Inherit from generic patterns when you need QoS that are specific to a single data flow.
  • If you are defining your QoS in code, create a structure such as a map that will map between a name of your QoS profile and the values of fields.

The built-in QoS profiles that are available with the 5.1.0 release are available by looking in the BuiltinProfiles.documentationONLY.xml file in the resources/qos_profiles_5.1.0/xml directory.  (The builtin profiles are documented here, and the XML QoS file can also be downloaded here.)  A few examples of built-in profiles:

   <!-- A QoS profile for reliable streaming data --> 
   <qos_profile name="Pattern.ReliableStreaming" base_name="Generic.KeepLastReliable">
       ...
   </qos_profile> 

   <!-- A QoS profile for data including alarms that are designed as events --> 
   <qos_profile name="Pattern.AlarmEvent" base_name="Pattern.Event"/> 

   <!-- A QoS profile for data including alarms that are designed as state/status data -->
   <qos_profile name="Pattern.AlarmStatus" base_name="Pattern.Status"/> 

An example of defining QoS in your own XML file and inheriting from a base profile:

    <qos_profile name="HighThroughputMulticast" base_name="Generic.StrictReliable.HighThroughput">
        <!-- Only need to set the QoS that overrides the base QoS --> 
        <datareader_qos>
            <multicast>
                <value>
                    <element>
                        <receive_address>239.255.1.2</receive_address>
                    </element>  
                </value>  
            </multicast>  
        </datareader_qos>
    </qos_profile>