This is the default implementation of the ros::CallbackQueueInterface.
More...
#include <callback_queue.h>
|
virtual void | addCallback (const CallbackInterfacePtr &callback, uint64_t removal_id=0) |
| Add a callback, with an optional owner id. The owner id can be used to remove a set of callbacks from this queue. More...
|
|
void | callAvailable () |
| Invoke all callbacks currently in the queue. If a callback was not ready to be called, pushes it back onto the queue. More...
|
|
void | callAvailable (ros::WallDuration timeout) |
| Invoke all callbacks currently in the queue. If a callback was not ready to be called, pushes it back onto the queue. This version includes a timeout which lets you specify the amount of time to wait for a callback to be available before returning. More...
|
|
| CallbackQueue (bool enabled=true) |
|
CallOneResult | callOne () |
| Pop a single callback off the front of the queue and invoke it. If the callback was not ready to be called, pushes it back onto the queue. More...
|
|
CallOneResult | callOne (ros::WallDuration timeout) |
| Pop a single callback off the front of the queue and invoke it. If the callback was not ready to be called, pushes it back onto the queue. This version includes a timeout which lets you specify the amount of time to wait for a callback to be available before returning. More...
|
|
void | clear () |
| Removes all callbacks from the queue. Does not wait for calls currently in progress to finish. More...
|
|
void | disable () |
| Disable the queue, meaning any calls to addCallback() will have no effect. More...
|
|
bool | empty () |
| returns whether or not the queue is empty More...
|
|
void | enable () |
| Enable the queue (queue is enabled by default) More...
|
|
bool | isEmpty () |
| returns whether or not the queue is empty More...
|
|
bool | isEnabled () |
| Returns whether or not this queue is enabled. More...
|
|
virtual void | removeByID (uint64_t removal_id) |
| Remove all callbacks associated with an owner id. More...
|
|
virtual | ~CallbackQueue () |
|
virtual | ~CallbackQueueInterface () |
|
This is the default implementation of the ros::CallbackQueueInterface.
Definition at line 58 of file callback_queue.h.
◆ D_CallbackInfo
◆ IDInfoPtr
◆ L_CallbackInfo
◆ M_IDInfo
◆ CallOneResult
◆ CallbackQueue()
roswrap::CallbackQueue::CallbackQueue |
( |
bool |
enabled = true | ) |
|
◆ ~CallbackQueue()
virtual roswrap::CallbackQueue::~CallbackQueue |
( |
| ) |
|
|
virtual |
◆ addCallback()
Add a callback, with an optional owner id. The owner id can be used to remove a set of callbacks from this queue.
Implements roswrap::CallbackQueueInterface.
◆ callAvailable() [1/2]
void roswrap::CallbackQueue::callAvailable |
( |
| ) |
|
|
inline |
Invoke all callbacks currently in the queue. If a callback was not ready to be called, pushes it back onto the queue.
Definition at line 97 of file callback_queue.h.
◆ callAvailable() [2/2]
Invoke all callbacks currently in the queue. If a callback was not ready to be called, pushes it back onto the queue. This version includes a timeout which lets you specify the amount of time to wait for a callback to be available before returning.
- Parameters
-
timeout | The amount of time to wait for at least one callback to be available. If there is already at least one callback available, this parameter does nothing. |
◆ callOne() [1/2]
Pop a single callback off the front of the queue and invoke it. If the callback was not ready to be called, pushes it back onto the queue.
Definition at line 79 of file callback_queue.h.
◆ callOne() [2/2]
Pop a single callback off the front of the queue and invoke it. If the callback was not ready to be called, pushes it back onto the queue. This version includes a timeout which lets you specify the amount of time to wait for a callback to be available before returning.
- Parameters
-
timeout | The amount of time to wait for a callback to be available. If there is already a callback available, this parameter does nothing. |
◆ callOneCB()
◆ clear()
void roswrap::CallbackQueue::clear |
( |
| ) |
|
Removes all callbacks from the queue. Does not wait for calls currently in progress to finish.
◆ disable()
void roswrap::CallbackQueue::disable |
( |
| ) |
|
Disable the queue, meaning any calls to addCallback() will have no effect.
◆ empty()
bool roswrap::CallbackQueue::empty |
( |
| ) |
|
|
inline |
◆ enable()
void roswrap::CallbackQueue::enable |
( |
| ) |
|
Enable the queue (queue is enabled by default)
◆ getIDInfo()
IDInfoPtr roswrap::CallbackQueue::getIDInfo |
( |
uint64_t |
id | ) |
|
|
protected |
◆ isEmpty()
bool roswrap::CallbackQueue::isEmpty |
( |
| ) |
|
returns whether or not the queue is empty
◆ isEnabled()
bool roswrap::CallbackQueue::isEnabled |
( |
| ) |
|
Returns whether or not this queue is enabled.
◆ removeByID()
virtual void roswrap::CallbackQueue::removeByID |
( |
uint64_t |
owner_id | ) |
|
|
virtual |
◆ setupTLS()
void roswrap::CallbackQueue::setupTLS |
( |
| ) |
|
|
protected |
◆ callbacks_
◆ calling_
size_t roswrap::CallbackQueue::calling_ |
|
protected |
◆ condition_
std::condition_variable roswrap::CallbackQueue::condition_ |
|
protected |
◆ enabled_
bool roswrap::CallbackQueue::enabled_ |
|
protected |
◆ id_info_
M_IDInfo roswrap::CallbackQueue::id_info_ |
|
protected |
◆ id_info_mutex_
std::mutex roswrap::CallbackQueue::id_info_mutex_ |
|
protected |
◆ mutex_
std::mutex roswrap::CallbackQueue::mutex_ |
|
protected |
◆ tls_
boost::thread_specific_ptr<TLS> roswrap::CallbackQueue::tls_ |
|
protected |
The documentation for this class was generated from the following file: