All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
gazebo::util::LogPlay Class Reference

#include <LogPlay.hh>

Inheritance diagram for gazebo::util::LogPlay:
Inheritance graph
[legend]

Public Member Functions

bool GetChunk (unsigned int _index, std::string &_data)
 Get data for a particular chunk index. More...
 
unsigned int GetChunkCount () const
 Get the number of chunks (steps) in the open log file. More...
 
std::string GetEncoding () const
 Get the type of encoding used for current chunck in the open log file. More...
 
std::string GetGazeboVersion () const
 Get the Gazebo version number of the open log file. More...
 
std::string GetHeader () const
 Get the header that was read from a log file. More...
 
std::string GetLogVersion () const
 Get the log version number of the open log file. More...
 
uint32_t GetRandSeed () const
 Get the random number seed of the open log file. More...
 
bool IsOpen () const
 Return true if a file is open. More...
 
void Open (const std::string &_logFile)
 Open a log file for reading. More...
 
bool Step (std::string &_data)
 Step through the open log file. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from SingletonT< T >
static T * Instance ()
 Get an instance of the singleton. More...
 
- Protected Member Functions inherited from SingletonT< T >
 SingletonT ()
 Constructor. More...
 
virtual ~SingletonT ()
 Destructor. More...
 

Member Function Documentation

bool gazebo::util::LogPlay::GetChunk ( unsigned int  _index,
std::string &  _data 
)

Get data for a particular chunk index.

Parameters
[in]_indexIndex of the chunk.
[out]_dataStorage for the chunk's data.
Returns
True if the _index was valid.
unsigned int gazebo::util::LogPlay::GetChunkCount ( ) const

Get the number of chunks (steps) in the open log file.

Returns
The number of recorded states in the log file.
std::string gazebo::util::LogPlay::GetEncoding ( ) const

Get the type of encoding used for current chunck in the open log file.

Returns
The type of encoding. An empty string will be returned if LogPlay::Step has not been called at least once.
std::string gazebo::util::LogPlay::GetGazeboVersion ( ) const

Get the Gazebo version number of the open log file.

Returns
The Gazebo version of the open log file. Empty string if a log file is not open.
std::string gazebo::util::LogPlay::GetHeader ( ) const

Get the header that was read from a log file.

Should call LogPlay::Open first.

Returns
Header of the open log file.
std::string gazebo::util::LogPlay::GetLogVersion ( ) const

Get the log version number of the open log file.

Returns
The log version of the open log file. Empty string if a log file is not open.
uint32_t gazebo::util::LogPlay::GetRandSeed ( ) const

Get the random number seed of the open log file.

Returns
The random number seed the open log file. The current random number seed, as defined in math::Rand::GetSeed.
bool gazebo::util::LogPlay::IsOpen ( ) const

Return true if a file is open.

Returns
True if a log file is open.
void gazebo::util::LogPlay::Open ( const std::string &  _logFile)

Open a log file for reading.

Open a log file that was previously recorded.

Parameters
[in]_logFileThe file to load
Exceptions
Exception
bool gazebo::util::LogPlay::Step ( std::string &  _data)

Step through the open log file.

Parameters
[out]_dataData from next entry in the log file.

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