3.4 Enable LBED Plugin on Each DomainParticipant

The next step is to tell each DomainParticipant that it should use the Limited Bandwidth Endpoint Discovery Plugin instead of Simple Endpoint Discovery. There are two ways of doing this, and both require configuring the DomainParticipant QoS in the USER_QOS_PROFILES.xml file.

The options described below (3.4.1 Using the Builtin Discovery Plugins Mask (Recommended) or 3.4.2 Using the LBED Plugin Properties) are mutually exclusive, which means that it is not possible to enable the plugin for the same DomainParticipant using both of these mechanisms at the same time. If you do, an error will be displayed and DomainParticipant creation will fail.

3.4.1 Using the Builtin Discovery Plugins Mask (Recommended)

The builtin_discovery_plugins mask (set in the DomainParticipant’s DISCOVERY_CONFIG QosPolicy (DDS Extension), in the RTI Connext Core Libraries User's Manual) can be used to select the built-in discovery plugins a DomainParticipant should use. This mask can be used to enable the LBED plugin in a DomainParticipant if its value is set to DPSE (Dynamic Participant discovery, Static Endpoint discovery).

Copy and paste the following XML snippet into the <domain_participant_qos> tag of both QoS profiles: “ExampleLBED_Publisher_Profile” and “ExampleLBED_Subscriber_Profile”:

<discovery_config>
    <builtin_discovery_plugins>DPSE</builtin_discovery_plugins>
</discovery_config>

Using DPSE automatically configures the DomainParticipant properties and QoS in the same way as described in 3.4.2 Using the LBED Plugin Properties.

 

Along with the DPSE value, the following optional LBED properties can be specified:

dds.discovery.endpoint.lbediscovery.config_file
dds.discovery.endpoint.lbediscovery.verbosity
dds.discovery.endpoint.lbediscovery.property_validation_action

See Table 4.1 LBED Configuration Properties for Connext for further information.

DPSE (Dynamic Participant discovery, Static Endpoint discovery) and SEDP (Simple Endpoint Discovery Protocol) cannot be specified simultaneously in the builtin_discovery_plugins mask.

If you are using both the LBED plugin and the LBPD plugin, this mask needs to be set to MASK_NONE. Therefore, in that case, DPSE cannot be used for enabling LBED. You must use the LBED plugin properties to enable it (see 3.4.2 Using the LBED Plugin Properties).

3.4.2 Using the LBED Plugin Properties

Connext provides a mechanism to dynamically load an external plugin from an XML QoS profile, i.e., the USER_QOS_PROFILES.xml file we have been modifying. That mechanism is PROPERTY QosPolicy (DDS Extension), in the RTI Connext Core Libraries User's Manual.

The PROPERTY QoS policy stores name/value (string) pairs that can be used to configure certain parameters of Connext that are not exposed through formal QoS policies. Connext uses this mechanism, for example, to configure external transports and plugins.

To enable LBED using these properties, add the following XML snippet into the <domain_participant_qos> tag of both QoS profiles “ExampleLBED_Publisher_Profile'' and “ExampleLBED_Subscriber_Profile”. This snippet shows the minimum required properties for enabling the plugin:

<property>
    <value>
        <element>
            <name>dds.discovery.endpoint.lbediscovery.library</name>
            <value>rtilbedisc</value>
        </element>
        <element>
            <name>dds.discovery.endpoint.lbediscovery.create_function</name>
            <value>DDS_LBEDiscoveryPlugin_create</value>
        </element>
        <element>
            <name>dds.discovery.endpoint.load_plugins</name>
            <value>dds.discovery.endpoint.lbediscovery</value>
        </element>
    </value>
</property>

For more information about the meaning of the properties above, their values, and other LBED properties that can be specified, see Table 4.1 LBED Configuration Properties for Connext.

In addition to setting the properties described above, set the builtin_discovery_plugins mask (using the DomainParticipant’s DISCOVERY_CONFIG QosPolicy (DDS Extension), in the RTI Connext Core Libraries User's Manual) to SPDP as shown in the XML excerpt below. The default value of this mask is SDP (Simple Discovery Protocol), which consists of two parts, Simple Participant Discovery Protocol (SPDP) and Simple Endpoint Discovery Protocol (SEDP). Set the builtin_discovery_plugins to just SPDP to indicate that SPDP is the only default plugin you'll be using, since you will be replacing the SEDP portion with the LBED plugin:

<discovery_config>
    <builtin_discovery_plugins>SPDP</builtin_discovery_plugins>
</discovery_config>

If you are using both the LBED plugin and the LBPD plugin, set this mask to MASK_NONE. An example of this configuration is shown in <path to examples>/connext_dds/c++11/limited_bandwidth_plugins/dil-stacking.