Handles the playback of Gazebo Transport topics. This class allows you to manage a log playback once it has started. You must hang onto the PlaybackHandle or else the playback will end early. More...
#include <Playback.hh>
Public Member Functions | |
| ~PlaybackHandle () | |
| Destructor.   | |
| std::chrono::nanoseconds | CurrentTime () const | 
| Gets current time of the log being played.   | |
| std::chrono::nanoseconds | EndTime () const | 
| Gets end time of the log being played.   | |
| bool | Finished () const | 
| Check if this playback is finished.   | |
| bool | IsPaused () const | 
| Check pause status.   | |
| void | Pause () | 
| Pauses the playback.   | |
| void | Resume () | 
| Unpauses the playback.   | |
| void | Seek (const std::chrono::nanoseconds &_newElapsedTime) | 
| Jump current playback time to a specific elapsed time.   | |
| std::chrono::nanoseconds | StartTime () const | 
| Gets start time of the log being played.   | |
| void | Step (const std::chrono::nanoseconds &_stepDuration) | 
| Step the playback by a given amount of nanoseconds.   | |
| void | Stop () | 
| Stop playing messages.   | |
| void | WaitUntilFinished () | 
| Block until playback runs out of messages to publish.   | |
Detailed Description
Handles the playback of Gazebo Transport topics. This class allows you to manage a log playback once it has started. You must hang onto the PlaybackHandle or else the playback will end early.
Responsibilities: time keeping, multiple thread safety, publishing data to topics, and stopping playback.
Constructor & Destructor Documentation
◆ ~PlaybackHandle()
| ~PlaybackHandle | ( | ) | 
Destructor.
Member Function Documentation
◆ CurrentTime()
| std::chrono::nanoseconds CurrentTime | ( | ) | const | 
Gets current time of the log being played.
- Returns
 - current time of the log playback, in nanoseconds
 
◆ EndTime()
| std::chrono::nanoseconds EndTime | ( | ) | const | 
Gets end time of the log being played.
- Returns
 - end time of the log, in nanoseconds
 
◆ Finished()
| bool Finished | ( | ) | const | 
Check if this playback is finished.
- Returns
 - true if all messages have finished playing; false otherwise.
 
◆ IsPaused()
| bool IsPaused | ( | ) | const | 
Check pause status.
◆ Pause()
| void Pause | ( | ) | 
Pauses the playback.
◆ Resume()
| void Resume | ( | ) | 
Unpauses the playback.
◆ Seek()
| void Seek | ( | const std::chrono::nanoseconds & | _newElapsedTime | ) | 
Jump current playback time to a specific elapsed time.
- Parameters
 - 
  
[in] _newElapsedTime Elapsed time at which playback will jump  
◆ StartTime()
| std::chrono::nanoseconds StartTime | ( | ) | const | 
Gets start time of the log being played.
- Returns
 - start time of the log, in nanoseconds
 
◆ Step()
| void Step | ( | const std::chrono::nanoseconds & | _stepDuration | ) | 
Step the playback by a given amount of nanoseconds.
- Precondition
 - Playback must be previously paused
 
- Parameters
 - 
  
[in] _stepDuration Length of the step in nanoseconds  
◆ Stop()
| void Stop | ( | ) | 
Stop playing messages.
◆ WaitUntilFinished()
| void WaitUntilFinished | ( | ) | 
Block until playback runs out of messages to publish.
The documentation for this class was generated from the following file: