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

#include <LogPlay.hh>

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

Public Member Functions

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

Additional Inherited Members

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

Member Function Documentation

bool gazebo::common::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::common::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::common::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::common::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::common::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::common::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::common::LogPlay::IsOpen ( ) const

Return true if a file is open.

Returns
True if a log file is open.
void gazebo::common::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::common::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: