Skip to content

Commit

Permalink
Feature: Monitor Service (#3894)
Browse files Browse the repository at this point in the history
* Monitor service - high level empty API (#3445)

* Refs #18065: Monitor Service DDS Layer Empty API

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18065: Monitor Service RTPS Layer Empty API

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18065: Mock methods. Avoid test compilation errors

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18065: Linter

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18065: Fix windows compilation - link to foonathan_memory

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18065: Applied revision changes

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Revert commit 94e1529:"Refs #18065: Fix windows compilation - link to foonathan_memory"

This reverts commit 94e1529.

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18065: Remove check_compatible_qos() api - design change

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18065: Removed extra headers and CmakeLists files

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18065: Applied second round of changes

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18065: versions.md

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Monitor Service Data Model  (#3635)

* Refs #18072: Added Monitor Service types

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18072: Added Monitor Service Types automation to idl generator script

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18072: Revision changes

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18072: revision changes and agreements

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Move and complete the Monitor Service High level API to statistics (#3638)

* Refs #19071: Complete and Move High Level empty API to statistics

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19071: Linter

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19071: Revision changes

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Add Monitor Service RTPS interfaces (#3662)

* Refs #18069: Add monitor service RTPS interfaces

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18069: Linter

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* REfs #18069: fix on interfaces include

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Monitor Service & Monitor Service Listener API (#3671)

* Refs #18073: Add MonitorService & MonitorServiceListener class API

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs Refs #18073: Fix of status queryable constness & Avoid unused member variables warning for mac

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs Refs #18073: Revision changes

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* bugfix connection namespace (#3693)

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Unit tests for the Monitor Service main class (#3694)

* Refs #18074: Add MonitorService unittests

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18074: Add source files in test for windows linking

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18074: Add entity removal test case

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18074: minor fix on typo

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18074: Reviewer suggestions

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Deserialization methods for Monitor Service (#3684)

* Refs #19166: Added DDS DomainParticipant methods

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19166: RTPS Layer implementation

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19166: Added CMKale tests and  mock methods for compilation

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19166: Linter

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19166: explicit cast

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19166: Reviewer suggestions

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Remove merging conflicts tag from versions.md (#3742)

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>

* Monitor Service test plan implementation (#3658)

* Refs #18068: Added skeleton for test cases

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18068: DDS and RTPS test implementation

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18068: Added utility conversion functions

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18068: Complete test suite simple and behavioral tests

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18068: Address reviewers comments

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18068: change monitor service topic name

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18068: Linter

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18068: uncomment line

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18068: Apply rev suggestions

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>

* Refs #18068: Include new test

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>

* Refs #18068: Rebase Deserialize methods updated branch and update the tests calls

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>

* Refs #18068: Fix build steps

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>

* Refs #18068: Apply rev suggestions

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>

* Refs #18068: Fix Windows Linkage problems and Warnings

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18068: Fix clang unsused variable warning

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>
Co-authored-by: JesusPoderoso <jesuspoderoso@eprosima.com>

* Update classes to implement interfaces (#3754)

* Refs #18071: Added Interfaces and unittests under WIP

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18071: Add mising method to Monitor service

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>

* Refs #18071: Fix CMakeLists to build tests

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>

* Refs #18071: Update PDP mock

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>

* Refs #18071: Include Matching participants test

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>

* Refs #18071: Please linters

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>

* Refs #18071: Fix statistics if-endif region comment

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>

* Refs #18071: Add PDP interface implementation

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>

* Revert "Refs #18071: Add PDP interface implementation"

This reverts commit ee0572a.

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18071: Proxyqueryable PDP unittests

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18071: StatusQueryable DomainParticipantImpl Tests

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18071: Make RTPSParticipantImpl* protected in RTPSParticipant

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18071: ConnectionsQueryable Interface unittest

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18071: Extend Mock classes and methods

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18071: Complete IProxyqueryable PDP Tests

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18071: Fix windows & mac compilation warnings

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18071: linter

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18071: Windows v141 kit little signed/unsigned fix

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>
Co-authored-by: Mario Dominguez <mariodominguez@eprosima.com>

* Prepare for the monitor service implementation (#3830)

* Refs #19402: Refactor Interface names and completeness

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: Avoid constness on DDS enable/disable monitor_service to accomodate passing itself (this) in the monitor service creation

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: Correct deserialization methods: constness and implementation fix

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: Little fixes on tests

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: linter

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Monitor service implementation (#3865)

* Monitor Service Data Model  (#3635)

* Refs #18072: Added Monitor Service types

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18072: Added Monitor Service Types automation to idl generator script

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18072: Revision changes

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #18072: revision changes and agreements

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Deserialization methods for Monitor Service (#3684)

* Refs #19166: Added DDS DomainParticipant methods

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19166: RTPS Layer implementation

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19166: Added CMKale tests and  mock methods for compilation

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19166: Linter

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19166: explicit cast

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19166: Reviewer suggestions

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: MonitorService class implementation

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: DDS and RTPS API implementations

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: MonitorServiceListener implementation

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: CMakelists.txt adding source files

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: PDP iproxyqueryable methods implementation

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: Modify IConnsQueryable interface to be filled by reference and return bool

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: Prepare methods in RTPSWriter/Reader to get the connection list of the entity

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: iconnections_queryable interface implementation

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: make connections_observer members private in rtpsparticipantimpl

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: iconnections_observer and iproxy_observer interface hooks introduced

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: BB tests sample validator mask and fixes

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: Refactor IStatusQueryable interface

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: IStatusQueryable implementation

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: IStatusObserver hooks

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: enable monitor service via  XML, environment and properties

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: Update Unittests for istatusqueryable

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: Update Unittests for MonitorService class

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: Address compiler warnings

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: Update versions.md

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: Linter

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: Remove unsupported comments

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: Mac CI warning

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: Address revision comments

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: Update types to support FastCDR 2

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: Mitigate Windows v141 warnings and resolved some memory leaks in tests

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: Recover missed scope during rebases

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: Additional protected sections in MonitorService class implementation

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: Additional sanitize protections in tests

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: Wrap observers into std::atomic to protect from getters and asignations without additional mutexes

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: Add MONITOR_SERVICE_DATAREADER_QOS constant to automatically get the recommended qos when defining an application-level monitor service datareader

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: Correct MONITOR_SERVICE_DATAREADER_QOS type

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: Update tests upon Threadsettings QoS

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: doxygen api reference extra comments

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: removed uninstantiated parametrized test

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: Fix compilation with FASTDDS_STATISTICS=OFF

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #19402: Add topic name property so that endpoint registration in a secure participant succeeds

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>
Co-authored-by: Jesús Poderoso <120394830+JesusPoderoso@users.noreply.github.com>
Co-authored-by: JesusPoderoso <jesuspoderoso@eprosima.com>
  • Loading branch information
3 people authored Dec 12, 2023
1 parent 0073aa6 commit e7b326a
Show file tree
Hide file tree
Showing 104 changed files with 15,270 additions and 145 deletions.
7 changes: 7 additions & 0 deletions include/fastdds/dds/core/policy/ParameterTypes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1122,6 +1122,13 @@ const char* const parameter_policy_physical_data_user = "fastdds.physical_data.u
*/
const char* const parameter_policy_physical_data_process = "fastdds.physical_data.process";

/**
* Parameter property value for enabling the monitor service
*
* @ingroup PARAMETER_MODULE
*/
const char* const parameter_enable_monitor_service = "fastdds.enable_monitor_service";

/**
* @ingroup PARAMETER_MODULE
*/
Expand Down
39 changes: 20 additions & 19 deletions include/fastdds/rtps/builtin/data/ParticipantProxyData.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ class ParticipantProxyData
{
public:

ParticipantProxyData(
RTPS_DllAPI ParticipantProxyData(
const RTPSParticipantAllocationAttributes& allocation);

ParticipantProxyData(
RTPS_DllAPI ParticipantProxyData(
const ParticipantProxyData& pdata);

virtual ~ParticipantProxyData();
RTPS_DllAPI virtual ~ParticipantProxyData();

//!Protocol version
ProtocolVersion_t m_protocolVersion;
Expand Down Expand Up @@ -125,92 +125,93 @@ class ParticipantProxyData
* @param pdata Object to copy the data from
* @return True on success
*/
bool updateData(
RTPS_DllAPI bool updateData(
ParticipantProxyData& pdata);

/**
* Get the size in bytes of the CDR serialization of this object.
* @param include_encapsulation Whether to include the size of the encapsulation info.
* @return size in bytes of the CDR serialization.
*/
uint32_t get_serialized_size(
RTPS_DllAPI uint32_t get_serialized_size(
bool include_encapsulation) const;

/**
* Write as a parameter list on a CDRMessage_t
* @return True on success
*/
bool writeToCDRMessage(
RTPS_DllAPI bool writeToCDRMessage(
CDRMessage_t* msg,
bool write_encapsulation);

/**
* Read the parameter list from a received CDRMessage_t
* @return True on success
*/
bool readFromCDRMessage(
RTPS_DllAPI bool readFromCDRMessage(
CDRMessage_t* msg,
bool use_encapsulation,
const NetworkFactory& network,
bool is_shm_transport_available);
bool is_shm_transport_available,
bool should_filter_locators);

//! Clear the data (restore to default state).
void clear();
RTPS_DllAPI void clear();

/**
* Copy the data from another object.
* @param pdata Object to copy the data from
*/
void copy(
RTPS_DllAPI void copy(
const ParticipantProxyData& pdata);

/**
* Set participant persistent GUID_t
* @param guid valid GUID_t
*/
void set_persistence_guid(
RTPS_DllAPI void set_persistence_guid(
const GUID_t& guid);

/**
* Retrieve participant persistent GUID_t
* @return guid persistent GUID_t or c_Guid_Unknown
*/
GUID_t get_persistence_guid() const;
RTPS_DllAPI GUID_t get_persistence_guid() const;

/**
* Set participant client server sample identity
* @param sid valid SampleIdentity
*/
void set_sample_identity(
RTPS_DllAPI void set_sample_identity(
const SampleIdentity& sid);

/**
* Retrieve participant SampleIdentity
* @return SampleIdentity
*/
SampleIdentity get_sample_identity() const;
RTPS_DllAPI SampleIdentity get_sample_identity() const;

/**
* Identifies the participant as client of the given server
* @param guid valid backup server GUID
*/
void set_backup_stamp(
RTPS_DllAPI void set_backup_stamp(
const GUID_t& guid);

/**
* Retrieves BACKUP server stamp. On deserialization hints if lease duration must be enforced
* @return GUID
*/
GUID_t get_backup_stamp() const;
RTPS_DllAPI GUID_t get_backup_stamp() const;

void assert_liveliness();
RTPS_DllAPI void assert_liveliness();

const std::chrono::steady_clock::time_point& last_received_message_tm() const
RTPS_DllAPI const std::chrono::steady_clock::time_point& last_received_message_tm() const
{
return last_received_message_tm_;
}

const std::chrono::microseconds& lease_duration() const
RTPS_DllAPI const std::chrono::microseconds& lease_duration() const
{
return lease_duration_;
}
Expand Down
4 changes: 3 additions & 1 deletion include/fastdds/rtps/builtin/data/ReaderProxyData.h
Original file line number Diff line number Diff line change
Expand Up @@ -430,12 +430,14 @@ class ReaderProxyData
* @param msg Pointer to the message.
* @param network Reference to network factory for locator validation and transformation
* @param is_shm_transport_available Indicates whether the Reader is reachable by SHM.
* @param should_filter_locators Whether to retrieve the locators before the external locators filtering
* @return true on success
*/
bool readFromCDRMessage(
CDRMessage_t* msg,
const NetworkFactory& network,
bool is_shm_transport_available);
bool is_shm_transport_available,
bool should_filter_locators);

//!
bool m_expectsInlineQos;
Expand Down
3 changes: 2 additions & 1 deletion include/fastdds/rtps/builtin/data/WriterProxyData.h
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,8 @@ class WriterProxyData
bool readFromCDRMessage(
CDRMessage_t* msg,
const NetworkFactory& network,
bool is_shm_transport_possible);
bool is_shm_transport_possible,
bool should_filter_locators);

private:

Expand Down
53 changes: 51 additions & 2 deletions include/fastdds/rtps/builtin/discovery/participant/PDP.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@
#include <fastdds/rtps/participant/ParticipantDiscoveryInfo.h>
#include <fastdds/rtps/reader/ReaderDiscoveryInfo.h>
#include <fastdds/rtps/writer/WriterDiscoveryInfo.h>
#include <fastdds/statistics/rtps/monitor_service/interfaces/IProxyObserver.hpp>
#include <fastdds/statistics/rtps/monitor_service/interfaces/IProxyQueryable.hpp>
#include <fastrtps/qos/QosPolicies.h>
#include <fastrtps/utils/ProxyPool.hpp>
#include <fastrtps/utils/collections/ResourceLimitedVector.hpp>
#include <fastrtps/utils/ProxyPool.hpp>

namespace eprosima {

Expand Down Expand Up @@ -79,7 +81,7 @@ class ITopicPayloadPool;
* It also keeps the Participant Discovery Data and provides interfaces to access it
*@ingroup DISCOVERY_MODULE
*/
class PDP
class PDP : public fastdds::statistics::rtps::IProxyQueryable
{
friend class PDPListener;
friend class PDPServerListener;
Expand Down Expand Up @@ -360,6 +362,15 @@ class PDP
return participant_proxies_.end();
}

/**
* Get the number of participant proxies.
* @return size_t.
*/
size_t participant_proxies_number()
{
return participant_proxies_number_;
}

/**
* Assert the liveliness of a Remote Participant.
* @param remote_guid GuidPrefix_t of the participant whose liveliness is being asserted.
Expand Down Expand Up @@ -430,6 +441,38 @@ class PDP
const ReaderProxyData& remote_reader_data);
#endif // HAVE_SECURITY

#ifdef FASTDDS_STATISTICS
bool get_all_local_proxies(
std::vector<GUID_t>& guids) override;

bool get_serialized_proxy(
const GUID_t& guid,
CDRMessage_t* msg) override;

void set_proxy_observer(
const fastdds::statistics::rtps::IProxyObserver* proxy_observer);

const fastdds::statistics::rtps::IProxyObserver* get_proxy_observer()
{
return proxy_observer_.load();
}

#else
bool get_all_local_proxies(
std::vector<GUID_t>&) override
{
return false;
}

bool get_serialized_proxy(
const GUID_t&,
CDRMessage_t*) override
{
return false;
}

#endif // FASTDDS_STATISTICS

protected:

//!Pointer to the builtin protocols object.
Expand Down Expand Up @@ -531,6 +574,12 @@ class PDP
*/
virtual void update_builtin_locators() = 0;

#ifdef FASTDDS_STATISTICS

std::atomic<const fastdds::statistics::rtps::IProxyObserver*> proxy_observer_;

#endif // FASTDDS_STATISTICS

private:

//!TimedEvent to periodically resend the local RTPSParticipant information.
Expand Down
8 changes: 8 additions & 0 deletions include/fastdds/rtps/common/EntityId_t.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ namespace rtps {
#define ENTITYID_DS_SERVER_VIRTUAL_WRITER 0x00030073
#define ENTITYID_DS_SERVER_VIRTUAL_READER 0x00030074

#ifdef FASTDDS_STATISTICS
#define ENTITYID_MONITOR_SERVICE_WRITER 0x004000D2
#endif // ifdef FASTDDS_STATISTICS

//!@brief Structure EntityId_t, entity id part of GUID_t.
//!@ingroup COMMON_MODULE
struct RTPS_DllAPI EntityId_t
Expand Down Expand Up @@ -373,6 +377,10 @@ const EntityId_t c_EntityId_spdp_reliable_participant_secure_writer =
const EntityId_t ds_server_virtual_writer = ENTITYID_DS_SERVER_VIRTUAL_WRITER;
const EntityId_t ds_server_virtual_reader = ENTITYID_DS_SERVER_VIRTUAL_READER;

#ifdef FASTDDS_STATISTICS
const EntityId_t monitor_service_status_writer = ENTITYID_MONITOR_SERVICE_WRITER;
#endif // if FASTDDS_STATISTICS

} // namespace rtps
} // namespace fastrtps
} // namespace eprosima
Expand Down
Loading

0 comments on commit e7b326a

Please sign in to comment.