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
Classes | Public Member Functions | List of all members
EventListenerInterface Class Referenceabstract

#include <custom_event_info.hpp>

Inheritance diagram for EventListenerInterface:
Inheritance graph
[legend]

Classes

class  ConditionalScopedLock
 

Public Member Functions

virtual void attachCondition (std::mutex *conditionMutex, std::condition_variable *conditionVariable)=0
 Connect a condition variable so a waiter can be notified of new data. More...
 
virtual void detachCondition ()=0
 Unset the information from attachCondition. More...
 
virtual bool hasEvent (rmw_event_type_t event_type) const =0
 Check if there is new data available for a specific event type. More...
 
virtual bool takeNextEvent (rmw_event_type_t event_type, void *event_info)=0
 Take ready data for an event type. More...
 

Member Function Documentation

◆ attachCondition()

virtual void EventListenerInterface::attachCondition ( std::mutex conditionMutex,
std::condition_variable conditionVariable 
)
pure virtual

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

Implemented in SubListener, and PubListener.

◆ detachCondition()

virtual void EventListenerInterface::detachCondition ( )
pure virtual

Unset the information from attachCondition.

Implemented in SubListener, and PubListener.

◆ hasEvent()

virtual bool EventListenerInterface::hasEvent ( rmw_event_type_t  event_type) const
pure virtual

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.

Implemented in SubListener, and PubListener.

◆ takeNextEvent()

virtual bool EventListenerInterface::takeNextEvent ( rmw_event_type_t  event_type,
void *  event_info 
)
pure virtual

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.

Implemented in SubListener, and PubListener.


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