40.1.1 Method 1—Change the Participant QoS to Automatically Load the Dynamic Monitoring Library

If all of the following are true, you can enable monitoring simply by changing your participant QoS (otherwise, use 40.1.2 Method 2—Change the Participant QoS to Specify the Monitoring Library Create Function Pointer and Explicitly Load the Monitoring Library):

If you change the QoS in an XML file as shown below, you can enable/disable monitoring without recompiling. If you change the QoS in your source code, you may need to recompile every time you enable/disable monitoring.

If you need to change the participant QoS by hand, refer to the definition of BuiltinQosLib::Generic.Monitoring.Common in <NDDSHOME>/resource/xml/BuiltinProfiles.documentationONLY.xml for the values you should set.

Example XML to enable monitoring:

<participant_qos>
    <property>
        <value>
            <element>
               <name>rti.monitor.library</name>
               <value>rtimonitoring</value>
            </element>
            <element>
                <name>rti.monitor.create_function</name>
                <value>RTIDefaultMonitor_create</value>
            </element>
        </value>
    </property>
</participant_qos>

© 2020 RTI