17 #ifndef _GAZEBO_LOGPLAY_HH_
18 #define _GAZEBO_LOGPLAY_HH_
61 public:
void Open(
const std::string &_logFile);
65 public:
bool IsOpen()
const;
70 public: std::string GetLogVersion()
const;
75 public: std::string GetGazeboVersion()
const;
80 public: uint32_t GetRandSeed()
const;
92 public: std::string GetFilename()
const;
96 public: std::string GetFullPathFilename()
const;
100 public: uintmax_t GetFileSize()
const;
104 public:
bool Step(std::string &_data);
109 public:
bool Rewind();
113 public:
unsigned int GetChunkCount()
const;
119 public:
bool GetChunk(
unsigned int _index, std::string &_data);
125 public: std::string GetEncoding()
const;
134 public: uint64_t GetInitialIterations()
const;
140 public:
bool HasIterations()
const;
146 private:
bool GetChunkData(TiXmlElement *_xml, std::string &_data);
149 private:
void ReadHeader();
153 private:
void ReadLogTimes();
157 private:
bool ReadIterations();
160 private: TiXmlDocument xmlDoc;
163 private: TiXmlElement *logStartXml;
166 private: TiXmlElement *logCurrXml;
169 private: std::string filename;
173 private: std::string logVersion;
176 private: std::string gazeboVersion;
179 private: uint32_t randSeed;
188 private: std::string encoding;
190 private: std::string currentChunk;
193 private: uint64_t initialIterations;
197 private:
bool iterationsFound;
200 private: std::mutex mutex;
GAZEBO_VISIBLE msgs::Header * GetHeader(google::protobuf::Message &_message)
Get the header from a protobuf message.
Singleton template class.
Definition: SingletonT.hh:33
#define GZ_UTIL_VISIBLE
Definition: system.hh:266
Definition: LogPlay.hh:47
A Time class, can be used to hold wall- or sim-time.
Definition: Time.hh:39