5.2.3. DomainListener

class DomainListener

Subclassed by eprosima::statistics_backend::PhysicalListener

Public Functions

virtual ~DomainListener() = default

Virtual destructor.

inline virtual void on_topic_discovery(EntityId domain_id, EntityId topic_id, const Status &status)

This function is called when a new Topic is discovered by the library.

Parameters
  • domain_id – Entity ID of the domain in which the topic has been discovered.

  • topic_id – Entity ID of the discovered topic.

  • status – The status of the discovered topic.

inline virtual void on_participant_discovery(EntityId domain_id, EntityId participant_id, const Status &status)

This function is called when a new DomainParticipant is discovered by the library, or a previously discovered DomainParticipant changes its QOS or is removed.

Parameters
  • domain_id – Entity ID of the domain in which the DataReader has been discovered.

  • participant_id – Entity ID of the discovered DomainParticipant.

  • status – The status of the discovered DomainParticipants.

inline virtual void on_datareader_discovery(EntityId domain_id, EntityId datareader_id, const Status &status)

This function is called when a new DataReader is discovered by the library, or a previously discovered DataReader changes its QOS or is removed.

Parameters
  • domain_id – Entity ID of the domain in which the DataReader has been discovered.

  • datareader_id – Entity ID of the discovered DataReader.

  • status – The status of the discovered DataReaders.

inline virtual void on_datawriter_discovery(EntityId domain_id, EntityId datawriter_id, const Status &status)

This function is called when a new DataWriter is discovered by the library, or a previously discovered DataWriter changes its QOS or is removed.

Parameters
  • domain_id – Entity ID of the domain in which the DataWriter has been discovered.

  • datawriter_id – Entity ID of the discovered DataWriter.

  • status – The status of the discovered DataWriters.

inline virtual void on_data_available(EntityId domain_id, EntityId entity_id, DataKind data_kind)

This function is called when a new data sample is available.

Parameters
  • domain_id – Entity ID of the domain to which the data belongs.

  • entity_id – Entity ID of the entity to which the data refers.

  • data_kind – Data kind of the received data.

inline virtual void on_domain_view_graph_update(const EntityId &domain_id)

This function is called when the database domain view graph is updated.

Parameters

domain_idEntityId of the domain whose graph has been updated.

inline virtual void on_status_reported(EntityId domain_id, EntityId entity_id, StatusKind status_kind)

This function is called when a new monitor service data sample is available.

Parameters
  • domain_id – Entity ID of the domain to which the data belongs.

  • entity_id – Entity ID of the entity to which the data refers.

  • status_kindStatus kind of the received data.

struct Status

Public Members

int32_t total_count = 0

Total cumulative count of the entities discovered so far.

This value increases monotonically with every new discovered entity.

int32_t total_count_change = 0

The change in total_count since the last time the listener was called.

This value can be positive, negative or zero, depending on the entity being discovered, undiscovered or only the QoS of the entity being changed since the last time the listener was called.

int32_t current_count = 0

The number of currently discovered entities.

This value can only be positive or zero.

int32_t current_count_change = 0

The change in current_count since the last time the listener was called.

This value can be positive, negative or zero, depending on the entity being discovered, undiscovered or only the QoS of the entity being changed since the last time the listener was called.