Public Member Functions | Private Member Functions | Private Attributes | List of all members
generic_control_toolbox::BagManager Class Reference

#include <bag_manager.hpp>

Public Member Functions

 BagManager (const std::string &path, const std::string &default_topic)
template<class T >
void write (const T &msg)
template<class T >
void write (const std::string &topic, const T &msg)
 ~BagManager ()

Private Member Functions

int numOfFiles (const std::string &path) const

Private Attributes

rosbag::Bag bag_
std::string default_topic_

Detailed Description

Produces a rosbag with given message data.

Definition at line 13 of file bag_manager.hpp.

Constructor & Destructor Documentation

generic_control_toolbox::BagManager::BagManager ( const std::string &  path,
const std::string &  default_topic 

Open a bag on the given path.

pathThe path where to record the bag.
default_topicThe default topic name for the bag to record.

Definition at line 5 of file bag_manager.cpp.

generic_control_toolbox::BagManager::~BagManager ( )

Definition at line 16 of file bag_manager.cpp.

Member Function Documentation

int generic_control_toolbox::BagManager::numOfFiles ( const std::string &  path) const

Returns the number of bag files in the recording directory.

pathPath to the recording directory.
Number of files of extension "*.bag" in the directory.

Definition at line 18 of file bag_manager.cpp.

template<class T >
void generic_control_toolbox::BagManager::write ( const T &  msg)

Add a message to the bag file on the default topic.

msgThe message to be written.

Definition at line 56 of file bag_manager.hpp.

template<class T >
void generic_control_toolbox::BagManager::write ( const std::string &  topic,
const T &  msg 

Add a message to the bag file on a given topic.

topicThe topic name.
msgThe message to be written.

Definition at line 62 of file bag_manager.hpp.

Member Data Documentation

rosbag::Bag generic_control_toolbox::BagManager::bag_

Definition at line 43 of file bag_manager.hpp.

std::string generic_control_toolbox::BagManager::default_topic_

Definition at line 44 of file bag_manager.hpp.

The documentation for this class was generated from the following files:

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