33#ifndef TF2__TIME_CACHE_HPP_
34#define TF2__TIME_CACHE_HPP_
147 typedef std::list<TransformStorage> L_TransformStorage;
148 L_TransformStorage storage_;
159 inline void interpolate(
Definition time_cache.hpp:167
virtual TimePoint getOldestTimestamp()
Get the oldest timestamp cached.
virtual TimePoint getLatestTimestamp()
Get the latest timestamp cached.
virtual bool insertData(const TransformStorage &new_data)
Insert data into the cache.
virtual unsigned int getListLength()
Debugging information methods.
virtual CompactFrameID getParent(TimePoint time, std::string *error_str=0, TF2Error *error_code=0)
Retrieve the parent at a specific time.
virtual P_TimeAndFrameID getLatestTimeAndParent()
Get the latest time stored in this cache, and the parent associated with it. Returns parent = 0 if no...
virtual bool getData(TimePoint time, TransformStorage &data_out, std::string *error_str=0, TF2Error *error_code=0)
Virtual methods.
virtual void clearList()
Clear the list of stored values.
Definition time_cache.hpp:53
virtual bool getData(tf2::TimePoint time, tf2::TransformStorage &data_out, std::string *error_str=0, TF2Error *error_code=0)=0
Access data from the cache returns false if data unavailable (should be thrown as lookup exception)
virtual CompactFrameID getParent(tf2::TimePoint time, std::string *error_str=0, TF2Error *error_code=0)=0
Retrieve the parent at a specific time.
virtual tf2::TimePoint getOldestTimestamp()=0
Get the oldest timestamp cached.
virtual unsigned int getListLength()=0
Debugging information methods.
virtual void clearList()=0
Clear the list of stored values.
virtual ~TimeCacheInterface()=default
virtual bool insertData(const tf2::TransformStorage &new_data)=0
Insert data into the cache.
virtual P_TimeAndFrameID getLatestTimeAndParent()=0
Get the latest time stored in this cache, and the parent associated with it. Returns parent = 0 if no...
virtual tf2::TimePoint getLatestTimestamp()=0
Get the latest timestamp cached.
A class to keep a sorted linked list in time (newest first, oldest last). This builds and maintains a...
Definition time_cache.hpp:110
virtual TimePoint getOldestTimestamp()
Get the oldest timestamp cached.
const std::list< TransformStorage > & getAllItems() const
virtual P_TimeAndFrameID getLatestTimeAndParent()
Get the latest time stored in this cache, and the parent associated with it. Returns parent = 0 if no...
virtual bool insertData(const tf2::TransformStorage &new_data)
Insert data into the cache.
virtual unsigned int getListLength()
Debugging information methods.
virtual bool getData(tf2::TimePoint time, tf2::TransformStorage &data_out, std::string *error_str=0, TF2Error *error_code=0)
Virtual methods.
virtual void clearList()
Clear the list of stored values.
TimeCache(tf2::Duration max_storage_time=TIMECACHE_DEFAULT_MAX_STORAGE_TIME)
virtual tf2::CompactFrameID getParent(tf2::TimePoint time, std::string *error_str=0, TF2Error *error_code=0)
Retrieve the parent at a specific time.
virtual TimePoint getLatestTimestamp()
Get the latest timestamp cached.
Definition buffer_core.hpp:58
uint32_t CompactFrameID
Definition transform_storage.hpp:44
std::pair< TimePoint, CompactFrameID > P_TimeAndFrameID
Definition buffer_core.hpp:60
B toMsg(const A &a)
Function that converts from one type to a ROS message type. It has to be implemented by each data typ...
TF2Error
Definition exceptions.hpp:46
std::chrono::time_point< std::chrono::system_clock, Duration > TimePoint
Definition time.hpp:41
std::chrono::nanoseconds Duration
Definition time.hpp:40
std::shared_ptr< TimeCacheInterface > TimeCacheInterfacePtr
Definition buffer_core.hpp:64
constexpr tf2::Duration TIMECACHE_DEFAULT_MAX_STORAGE_TIME
default value of 10 seconds storage
Definition time_cache.hpp:102
#define TF2_PUBLIC
Definition visibility_control.h:57