1.2. Stop a monitorΒΆ
Fast DDS Statistics Backend allows for a monitorization to be stopped at any time. Stopping a monitorization merely means that the internal statistics DataReaders are disabled, but the already received data is still accessible to applications through the query API (see Get statistical data). Is is important to note that:
Calls to
stop_monitor()
on an already stopped monitor take no effect.stop_monitor()
must be called before callingclear_monitor()
.stop_monitor()
throwsBadParameter
if the provided monitor ID is not yet registered.
// Init a monitor in DDS domain 0 with no listener associated
EntityId domain_monitor_id = StatisticsBackend::init_monitor(0);
// Stop the monitor
StatisticsBackend::stop_monitor(domain_monitor_id);