message_filters::Cache< M > Class Template Reference
Stores a time history of messages.
More...
#include <cache.h>
List of all members.
Detailed Description
template<class M>
class message_filters::Cache< M >
Stores a time history of messages.
Given a stream of messages, the most recent N messages are cached in a ring buffer, from which time intervals of the cache can then be retrieved by the client.
Cache immediately passes messages through to its output connections.
Cache's input and output connections are both of the same signature as roscpp subscription callbacks, ie.
void callback(const boost::shared_ptr<M const>&);
Definition at line 64 of file cache.h.
Member Typedef Documentation
Constructor & Destructor Documentation
template<class M>
template<class F >
Initializes a Message Cache without specifying a parent filter. This implies that in order to populate the cache, the user then has to call add themselves, or connectInput() is called later
Definition at line 63 of file cache.h.
Member Function Documentation
Add a message to the cache, and pop off any elements that are too old. This method is registered with a data provider when connectTo is called.
Definition at line 107 of file cache.h.
Add a message to the cache, and pop off any elements that are too old. This method is registered with a data provider when connectTo is called.
Definition at line 98 of file cache.h.
template<class M>
template<class F >
Grab the oldest element that occurs right after the specified time.
- Parameters:
-
| time | Time that must occur right before the returned elem |
- Returns:
- shared_ptr to the oldest elem that occurs after 'time'. NULL if doesn't exist
Definition at line 246 of file cache.h.
Grab the newest element that occurs right before the specified time.
- Parameters:
-
| time | Time that must occur right after the returned elem |
- Returns:
- shared_ptr to the newest elem that occurs before 'time'. NULL if doesn't exist
Definition at line 218 of file cache.h.
Receive a vector of messages that occur between a start and end time (inclusive).
This call is non-blocking, and only aggregates messages it has already received. It will not wait for messages have not yet been received, but occur in the interval.
- Parameters:
-
| start | The start of the requested interval |
| end | The end of the requested interval |
Definition at line 145 of file cache.h.
Returns the timestamp associated with the newest packet cache.
Definition at line 274 of file cache.h.
Returns the timestamp associated with the oldest packet cache.
Definition at line 291 of file cache.h.
Retrieve the smallest interval of messages that surrounds an interval from start to end.
If the messages in the cache do not surround (start,end), then this will return the interval that gets closest to surrounding (start,end)
Definition at line 184 of file cache.h.
Set the size of the cache.
- Parameters:
-
| cache_size | The new size the cache should be. Must be > 0 |
Definition at line 83 of file cache.h.
Member Data Documentation
Lock for cache_.
Definition at line 312 of file cache.h.
Maximum number of elements allowed in the cache.
Definition at line 314 of file cache.h.
The documentation for this class was generated from the following file: