Go to the documentation of this file.
17 #ifndef _GAZEBO_UTIL_LOGPLAY_HH_
18 #define _GAZEBO_UTIL_LOGPLAY_HH_
64 public:
void Open(
const std::string &_logFile);
107 public:
bool Step(std::string &_data);
116 public:
bool Step(
const int _step, std::string &_data);
141 public:
bool Chunk(
const unsigned int _index, std::string &_data)
const;
165 private:
void ReadHeader();
169 private:
void ReadLogTimes();
175 private:
bool ReadIterations();
180 private:
bool NextChunk();
185 private:
bool PrevChunk();
189 private: std::unique_ptr<LogPlayPrivate> dataPtr;
std::string Encoding() const
Get the type of encoding used for current chunck in the open log file.
unsigned int ChunkCount() const
Get the number of chunks (steps) in the open log file.
void Open(const std::string &_logFile)
Open a log file for reading.
Forward declarations for the common classes.
Definition: Animation.hh:27
gazebo
Definition: LogPlay.hh:28
A Time class, can be used to hold wall- or sim-time.
Definition: Time.hh:48
Singleton template class.
Definition: SingletonT.hh:34
Definition: LogPlay.hh:51
std::string LogVersion() const
Get the log version number of the open log file.
std::string FullPathFilename() const
Get the full path of the log file.
bool IsOpen() const
Return true if a file is open.
std::string Header() const
Get the header that was read from a log file.
bool StepBack(std::string &_data)
Step through the open log file backwards.
bool Chunk(const unsigned int _index, std::string &_data) const
Get data for a particular chunk index.
std::string Filename() const
Get the name of the log file.
util
Definition: LogPlay.hh:28
bool Forward()
Jump to the end of the log file.
uint64_t InitialIterations() const
Get the initial simulation iterations from a log file.
bool Step(const int _step, std::string &_data)
Step through the open log file.
bool HasIterations() const
Return if the log file contains the <iterations> tag.
uintmax_t FileSize() const
Get the size of the log file.
common::Time LogEndTime() const
Get the log end time of the open log file.
bool Seek(const common::Time &_time)
Jump to the closest sample that has its simulation time lower than the time specified as a parameter.
bool Step(std::string &_data)
Step through the open log file.
bool Rewind()
Jump to the beginning of the log file.
common::Time LogStartTime() const
Get the log start time of the open log file.
std::string GazeboVersion() const
Get the Gazebo version number of the open log file.
#define GZ_SINGLETON_DECLARE(visibility, n1, n2, singletonType)
Helper to declare typed SingletonT.
Definition: SingletonT.hh:61
uint32_t RandSeed() const
Get the random number seed of the open log file.