bag_manager.hpp
Go to the documentation of this file.
1 #ifndef __BAG_MANAGER__
2 #define __BAG_MANAGER__
3 
4 #include <ros/ros.h>
5 #include <rosbag/bag.h>
6 #include <boost/filesystem.hpp>
7 
9 {
14 {
15  public:
22  BagManager(const std::string &path, const std::string &default_topic);
23  ~BagManager();
24 
30  template <class T>
31  void write(const T &msg);
32 
39  template <class T>
40  void write(const std::string &topic, const T &msg);
41 
42  private:
44  std::string default_topic_;
45 
52  int numOfFiles(const std::string &path) const;
53 };
54 
55 template <class T>
56 void BagManager::write(const T &msg)
57 {
59 }
60 
61 template <class T>
62 void BagManager::write(const std::string &topic, const T &msg)
63 {
64  bag_.write(topic, ros::Time::now(), msg);
65 }
66 } // namespace generic_control_toolbox
67 
68 #endif
int numOfFiles(const std::string &path) const
Definition: bag_manager.cpp:18
static Time now()
BagManager(const std::string &path, const std::string &default_topic)
Definition: bag_manager.cpp:5
void write(std::string const &topic, ros::MessageEvent< T > const &event)


generic_control_toolbox
Author(s): diogo
autogenerated on Thu Jun 6 2019 19:54:44