#include <LogPlay.hh>
bool gazebo::util::LogPlay::GetChunk |
( |
unsigned int |
_index, |
|
|
std::string & |
_data |
|
) |
| |
Get data for a particular chunk index.
- Parameters
-
[in] | _index | Index of the chunk. |
[out] | _data | Storage 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::GetFilename |
( |
| ) |
const |
Get the name of the log file.
- Returns
- The filename.
uintmax_t gazebo::util::LogPlay::GetFileSize |
( |
| ) |
const |
Get the size of the log file.
- Returns
- The size of the file in bytes.
std::string gazebo::util::LogPlay::GetFullPathFilename |
( |
| ) |
const |
Get the full path of the log file.
- Returns
- The full path of the log file.
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.
uint64_t gazebo::util::LogPlay::GetInitialIterations |
( |
| ) |
const |
Get the initial simulation iterations from a log file.
- Returns
- Initial simulation iteration contained in the log file.
Get the log end time of the open log file.
- Returns
- End time of the log.
common::Time gazebo::util::LogPlay::GetLogStartTime |
( |
| ) |
const |
Get the log start time of the open log file.
- Returns
- Start time of the log.
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 ignition::math::Rand::Seed.
bool gazebo::util::LogPlay::HasIterations |
( |
| ) |
const |
Return if the log file contains the <iterations> tag.
Old log files may not have the <iterations> tag.
- Returns
- True if <iterations> was found in the log file or false otherwise.
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] | _logFile | The file to load |
- Exceptions
-
Exception | When the log file does not exist, is a directory instead of a regular file, or Gazebo was unable to parse it. |
bool gazebo::util::LogPlay::Rewind |
( |
| ) |
|
Jump to the beginning of the log file.
The next step() call will return the first data "chunk".
- Returns
- True If the function succeed or false otherwise.
bool gazebo::util::LogPlay::Step |
( |
std::string & |
_data | ) |
|
Step through the open log file.
- Parameters
-
[out] | _data | Data from next entry in the log file. |
The documentation for this class was generated from the following file: