rmw_fastrtps_shared_cpp  master
Code shared on static and dynamic type support of rmw_fastrtps_cpp.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | List of all members
SubListener Class Reference

#include <custom_subscriber_info.hpp>

Inheritance diagram for SubListener:
Inheritance graph
[legend]
Collaboration diagram for SubListener:
Collaboration graph
[legend]

Public Member Functions

 SubListener (CustomSubscriberInfo *info)
 
void onSubscriptionMatched (eprosima::fastrtps::Subscriber *sub, eprosima::fastrtps::rtps::MatchingInfo &info) final
 
void onNewDataMessage (eprosima::fastrtps::Subscriber *sub) final
 
void on_requested_deadline_missed (eprosima::fastrtps::Subscriber *, const eprosima::fastrtps::RequestedDeadlineMissedStatus &) final
 
void on_liveliness_changed (eprosima::fastrtps::Subscriber *, const eprosima::fastrtps::LivelinessChangedStatus &) final
 
bool hasEvent (rmw_event_type_t event_type) const final
 Check if there is new data available for a specific event type. More...
 
bool takeNextEvent (rmw_event_type_t event_type, void *event_info) final
 Take ready data for an event type. More...
 
void attachCondition (std::mutex *conditionMutex, std::condition_variable *conditionVariable)
 Connect a condition variable so a waiter can be notified of new data. More...
 
void detachCondition ()
 Unset the information from attachCondition. More...
 
bool hasData () const
 
void data_taken (eprosima::fastrtps::Subscriber *sub)
 
size_t publisherCount ()
 

Constructor & Destructor Documentation

◆ SubListener()

SubListener::SubListener ( CustomSubscriberInfo info)
inlineexplicit

Member Function Documentation

◆ onSubscriptionMatched()

void SubListener::onSubscriptionMatched ( eprosima::fastrtps::Subscriber *  sub,
eprosima::fastrtps::rtps::MatchingInfo &  info 
)
inlinefinal

◆ onNewDataMessage()

void SubListener::onNewDataMessage ( eprosima::fastrtps::Subscriber *  sub)
inlinefinal

◆ on_requested_deadline_missed()

void SubListener::on_requested_deadline_missed ( eprosima::fastrtps::Subscriber *  ,
const eprosima::fastrtps::RequestedDeadlineMissedStatus &   
)
final

◆ on_liveliness_changed()

void SubListener::on_liveliness_changed ( eprosima::fastrtps::Subscriber *  ,
const eprosima::fastrtps::LivelinessChangedStatus &   
)
final

◆ hasEvent()

bool SubListener::hasEvent ( rmw_event_type_t  event_type) const
finalvirtual

Check if there is new data available for a specific event type.

Parameters
event_typeThe event type to check on.
Returns
true if new data is available.

Implements EventListenerInterface.

◆ takeNextEvent()

bool SubListener::takeNextEvent ( rmw_event_type_t  event_type,
void *  event_info 
)
finalvirtual

Take ready data for an event type.

Parameters
event_typeThe event type to get data for.
event_infoA preallocated event information (from rmw/types.h) to fill with data
Returns
true if data was successfully taken.
false if data was not available, in this case nothing was written to event_info.

Implements EventListenerInterface.

◆ attachCondition()

void SubListener::attachCondition ( std::mutex conditionMutex,
std::condition_variable conditionVariable 
)
inlinevirtual

Connect a condition variable so a waiter can be notified of new data.

Implements EventListenerInterface.

◆ detachCondition()

void SubListener::detachCondition ( )
inlinevirtual

Unset the information from attachCondition.

Implements EventListenerInterface.

◆ hasData()

bool SubListener::hasData ( ) const
inline

◆ data_taken()

void SubListener::data_taken ( eprosima::fastrtps::Subscriber *  sub)
inline

◆ publisherCount()

size_t SubListener::publisherCount ( )
inline

The documentation for this class was generated from the following file: