Public Member Functions | Private Member Functions | Private Attributes
generic_control_toolbox::BagManager Class Reference

#include <bag_manager.hpp>

List of all members.

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.

Parameters:
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.

Definition at line 16 of file bag_manager.cpp.


Member Function Documentation

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

Returns the number of bag files in the recording directory.

Parameters:
pathPath to the recording directory.
Returns:
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.

Parameters:
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.

Parameters:
topicThe topic name.
msgThe message to be written.

Definition at line 62 of file bag_manager.hpp.


Member Data Documentation

Definition at line 43 of file bag_manager.hpp.

Definition at line 44 of file bag_manager.hpp.


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


generic_control_toolbox
Author(s): diogo
autogenerated on Thu Jun 6 2019 18:02:57