rmw_fastrtps_shared_cpp
master
Code shared on static and dynamic type support of rmw_fastrtps_cpp.
|
Go to the documentation of this file.
15 #ifndef RMW_FASTRTPS_SHARED_CPP__CUSTOM_EVENT_INFO_HPP_
16 #define RMW_FASTRTPS_SHARED_CPP__CUSTOM_EVENT_INFO_HPP_
19 #include <condition_variable>
25 #include "fastcdr/FastBuffer.h"
27 #include "fastrtps/subscriber/SampleInfo.h"
28 #include "fastrtps/subscriber/Subscriber.h"
29 #include "fastrtps/subscriber/SubscriberListener.h"
30 #include "fastrtps/participant/Participant.h"
31 #include "fastrtps/publisher/Publisher.h"
32 #include "fastrtps/publisher/PublisherListener.h"
76 : mutex_(mutex), cv_(condition_variable)
78 if (
nullptr != mutex_) {
85 if (
nullptr != mutex_) {
103 #endif // RMW_FASTRTPS_SHARED_CPP__CUSTOM_EVENT_INFO_HPP_
ConditionalScopedLock(std::mutex *mutex, std::condition_variable *condition_variable=nullptr)
Definition: custom_event_info.hpp:73
virtual void attachCondition(std::mutex *conditionMutex, std::condition_variable *conditionVariable)=0
Connect a condition variable so a waiter can be notified of new data.
~ConditionalScopedLock()
Definition: custom_event_info.hpp:83
virtual bool takeNextEvent(rmw_event_type_t event_type, void *event_info)=0
Take ready data for an event type.
Definition: custom_event_info.hpp:70
virtual void detachCondition()=0
Unset the information from attachCondition.
virtual bool hasEvent(rmw_event_type_t event_type) const =0
Check if there is new data available for a specific event type.
virtual EventListenerInterface * getListener() const =0
Definition: custom_event_info.hpp:98
Definition: custom_event_info.hpp:39