Class RMWPublisherEvent

Inheritance Relationships

Base Type

Class Documentation

class RMWPublisherEvent : public EventListenerInterface

Public Functions

explicit RMWPublisherEvent(CustomPublisherInfo *info)
virtual eprosima::fastdds::dds::StatusCondition &get_statuscondition() const override
virtual bool take_event(rmw_event_type_t event_type, void *event_info) override

Take ready data for an event type.

Parameters:
  • event_type – The event type to get data for.

  • event_info – A preallocated event information (from rmw/types.h) to fill with data

Returns:

true if data was successfully taken.

Returns:

false if data was not available, in this case nothing was written to event_info.

virtual void set_on_new_event_callback(rmw_event_type_t event_type, const void *user_data, rmw_event_callback_t callback) override

Provide handlers to perform an action when a new event from this listener has occurred.

Parameters:
  • event_type – The event type to set a new callback for.

  • user_data – User data to associated with the event.

  • callback – The callback to call when the event occurs.

virtual void update_inconsistent_topic(uint32_t total_count, uint32_t total_count_change) override

Callback to update the internal inconsistent topic data.

Parameters:
  • total_count – The total number of inconsistent topic events for all time.

  • total_count_change – The number of inconsistent topic events being reported right now.

void track_unique_subscription(eprosima::fastrtps::rtps::GUID_t guid)

Add a GUID to the internal set of unique subscriptions matched to this publisher.

This is so we can provide the RMW layer with an accurate count of matched subscriptions if the user calls rmw_count_subscribers().

Parameters:

guid[in] The GUID of the newly-matched subscription to track.

void untrack_unique_subscription(eprosima::fastrtps::rtps::GUID_t guid)

Remove a GUID from the internal set of unique subscriptions matched to this publisher.

This is so we can provide the RMW layer with an accurate count of matched subscriptions if the user calls rmw_count_subscribers().

Parameters:

guid[in] The GUID of the newly-unmatched subscription to track.

size_t subscription_count() const

Return the number of unique subscriptions matched to this publisher.

Returns:

Number of unique subscriptions matched to this publisher.

void update_deadline(uint32_t total_count, uint32_t total_count_change)
void update_liveliness_lost(uint32_t total_count, uint32_t total_count_change)
void update_offered_incompatible_qos(eprosima::fastdds::dds::QosPolicyId_t last_policy_id, uint32_t total_count, uint32_t total_count_change)
void update_matched(int32_t total_count, int32_t total_count_change, int32_t current_count, int32_t current_count_change)