13.2.3. Monitor Service Configuration
The Monitor Service can be activated using the -DFASTDDS_STATISTICS=ON
at CMake configuration step
(for further information regarding the Fast DDS compilation, see Linux installation from sources and Windows installation from sources).
Once the Monitor Service feature is activated, it can be programmatically enabled in both DDS Layer and
RTPS Layer through the enable_monitor_service()
and
disable_monitor_service()
calls.
In addition, leveraging the PropertyPolicyQos
there is new Property
defined
for the purpose: fastdds.enable_monitor_service
.
The following table depicts the different ways in which the Monitor Service can be enabled or disabled:
DomainParticipant* participant = DomainParticipantFactory::get_instance()->create_participant(0,
PARTICIPANT_QOS_DEFAULT);
// Obtain pointer to child class
eprosima::fastdds::statistics::dds::DomainParticipant* statistics_participant =
eprosima::fastdds::statistics::dds::DomainParticipant::narrow(participant);
// Enable Fast DDS Monitor Service through API
statistics_participant->enable_monitor_service();
// Disable Fast DDS Monitor Service through API
statistics_participant->disable_monitor_service();
DomainParticipantQos pqos;
// Enable Fast DDS Monitor Service through properties
pqos.properties().properties().emplace_back("fastdds.enable_monitor_service",
"true");
// Enable Fast DDS Monitor Service through statistics properties (other way)
pqos.properties().properties().emplace_back("fastdds.statistics",
"MONITOR_SERVICE_TOPIC");
DomainParticipant* participant_with_mon_srv = DomainParticipantFactory::get_instance()->create_participant(0,
pqos);
<?xml version="1.0" encoding="UTF-8" ?>
<profiles xmlns="http://www.eprosima.com">
<participant profile_name="monitor_service_participant_xml_profile">
<rtps>
<propertiesPolicy>
<properties>
<!-- Enable Monitor Service -->
<property>
<name>fastdds.enable_monitor_service</name>
<value>true</value>
</property>
<!-- Include Monitor Service in the Fast DDS Statistics (other way to enable it) -->
<property>
<name>fastdds.statistics</name>
<value>MONITOR_SERVICE_TOPIC</value>
</property>
</properties>
</propertiesPolicy>
</rtps>
</participant>
</profiles>
export FASTDDS_STATISTICS="MONITOR_SERVICE_TOPIC"
set FASTDDS_STATISTICS=MONITOR_SERVICE_TOPIC
13.2.3.1. Endpoints QoS
For any consumer application of the Monitor Service, the following endpoint QoS of the Monitor Service Status Topic DataWriter should be taken into consideration:
Endpoint |
QoS |
Value |
MONITOR_STATUS_WRITER |
||