18.5.1. DomainParticipant

class DomainParticipant : public eprosima::fastdds::dds::DomainParticipant

Class DomainParticipant: extends standard DDS DomainParticipant class to include specific methods for the Statistics module

Public Functions

ReturnCode_t enable_statistics_datawriter(const std::string &topic_name, const eprosima::fastdds::dds::DataWriterQos &dwqos)

This operation enables a Statistics DataWriter.

Parameters
  • topic_name[in] Name of the topic associated to the Statistics DataWriter

  • dwqos[in] DataWriterQos to be set

Returns

RETCODE_UNSUPPORTED if the FASTDDS_STATISTICS CMake option has not been set, RETCODE_BAD_PARAMETER if the topic name provided does not correspond to any Statistics DataWriter, RETCODE_INCONSISTENT_POLICY if the DataWriterQos provided are inconsistent, RETCODE_OK if the DataWriter has been created or if it has been created previously, and RETCODE_ERROR otherwise

ReturnCode_t enable_statistics_datawriter_with_profile(const std::string &profile_name, const std::string &topic_name)

This operation enables a Statistics DataWriter from a given profile.

Parameters
  • profile_name[in] DataWriter QoS profile name

  • topic_name[in] Name of the statistics topic to be enabled.

Returns

RETCODE_UNSUPPORTED if the FASTDDS_STATISTICS CMake option has not been set, RETCODE_BAD_PARAMETER if the topic name provided does not correspond to any Statistics DataWriter, RETCODE_INCONSISTENT_POLICY if the DataWriterQos provided in profile are inconsistent, RETCODE_OK if the DataWriter has been created or if it has been created previously, and RETCODE_ERROR otherwise

ReturnCode_t disable_statistics_datawriter(const std::string &topic_name)

This operation disables a Statistics DataWriter.

Parameters

topic_name – Name of the topic associated to the Statistics DataWriter

Returns

RETCODE_UNSUPPORTED if the FASTDDS_STATISTICS CMake option has not been set, RETCODE_BAD_PARAMETER if the topic name provided does not correspond to any Statistics DataWriter, RETCODE_OK if the DataWriter has been correctly deleted or does not exist, and RETCODE_ERROR otherwise

ReturnCode_t enable_monitor_service()

Enables the monitor service in the DomainParticipant.

Note

Not supported yet. Currently returns RETCODE_UNSUPPORTED

Returns

RETCODE_OK if the monitor service could be correctly enabled.

Returns

RETCODE_ERROR if the monitor service could not be enabled properly.

Returns

RETCODE_UNSUPPORTED if FASTDDS_STATISTICS is not enabled.

ReturnCode_t disable_monitor_service()

Disables the monitor service in this DomainParticipant. Does nothing if the service was not enabled before.

Note

Not supported yet. Currently returns RETCODE_UNSUPPORTED

Returns

RETCODE_OK if the monitor service could be correctly disabled.

Returns

RETCODE_NOT_ENABLED if the monitor service was not previously enabled.

Returns

RETCODE_ERROR if the service could not be properly disabled.

Returns

RETCODE_UNSUPPORTED if FASTDDS_STATISTICS is not enabled.

ReturnCode_t fill_discovery_data_from_cdr_message(fastrtps::rtps::ParticipantProxyData &data, statistics::MonitorServiceStatusData &msg)

fills in the ParticipantProxyData from a MonitorService Message

Parameters
  • data[out] Proxy to fill

  • msg[in] MonitorService Message to get the proxy information from.

Returns

RETCODE_OK if the operation succeeds.

Returns

RETCODE_ERROR if the operation fails.

ReturnCode_t fill_discovery_data_from_cdr_message(fastrtps::rtps::WriterProxyData &data, statistics::MonitorServiceStatusData &msg)

fills in the WriterProxyData from a MonitorService Message

Parameters
  • data[out] Proxy to fill.

  • msg[in] MonitorService Message to get the proxy information from.

Returns

RETCODE_OK if the operation succeeds.

Returns

RETCODE_ERROR if the operation fails.

ReturnCode_t fill_discovery_data_from_cdr_message(fastrtps::rtps::ReaderProxyData &data, statistics::MonitorServiceStatusData &msg)

fills in the ReaderProxyData from a MonitorService Message

Parameters
  • data[out] Proxy to fill.

  • msg[in] MonitorService Message to get the proxy information from.

Returns

RETCODE_OK if the operation succeeds.

Returns

RETCODE_ERROR if the operation fails.

ReturnCode_t fill_discovery_data_from_cdr_message(fastrtps::rtps::ParticipantProxyData &data, const statistics::MonitorServiceStatusData &msg)

fills in the ParticipantProxyData from a MonitorService Message

Parameters
  • data[out] Proxy to fill

  • msg[in] MonitorService Message to get the proxy information from.

Returns

RETCODE_OK if the operation succeeds.

Returns

RETCODE_ERROR if the operation fails.

ReturnCode_t fill_discovery_data_from_cdr_message(fastrtps::rtps::WriterProxyData &data, const statistics::MonitorServiceStatusData &msg)

fills in the WriterProxyData from a MonitorService Message

Parameters
  • data[out] Proxy to fill.

  • msg[in] MonitorService Message to get the proxy information from.

Returns

RETCODE_OK if the operation succeeds.

Returns

RETCODE_ERROR if the operation fails.

ReturnCode_t fill_discovery_data_from_cdr_message(fastrtps::rtps::ReaderProxyData &data, const statistics::MonitorServiceStatusData &msg)

fills in the ReaderProxyData from a MonitorService Message

Parameters
  • data[out] Proxy to fill.

  • msg[in] MonitorService Message to get the proxy information from.

Returns

RETCODE_OK if the operation succeeds.

Returns

RETCODE_ERROR if the operation fails.

Public Static Functions

static DomainParticipant *narrow(eprosima::fastdds::dds::DomainParticipant *domain_participant)

This operation narrows the DDS DomainParticipant to the Statistics DomainParticipant.

Parameters

domain_participant – Reference to the DDS DomainParticipant

Returns

Reference to the Statistics DomainParticipant if successful. nullptr otherwise.

static const DomainParticipant *narrow(const eprosima::fastdds::dds::DomainParticipant *domain_participant)

This operation narrows the DDS DomainParticipant to the Statistics DomainParticipant.

Parameters

domain_participant – Constant reference to the DDS DomainParticipant

Returns

Constant reference to the Statistics DomainParticipant if successful. nullptr otherwise.