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();

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

ReliabilityQosPolicyKind

RELIABLE_RELIABILITY_QOS

HistoryQosPolicyKind

KEEP_LAST_HISTORY_QOS 1

DurabilityQosPolicyKind

TRANSIENT_LOCAL_DURABILITY_QOS