Regilo
A simple C++ library for controlling the Neato XV robot and the Hokuyo scanner.
regilo::ITimedLog Class Referenceabstract

The ITimedLog interface is implemented in TimedLog. More...

#include <log.hpp>

Inheritance diagram for regilo::ITimedLog:
regilo::ILog regilo::TimedLog< DurationT >

Public Member Functions

virtual ~ITimedLog ()=default
 Default destructor.
 
virtual std::chrono::nanoseconds getLastCommandNanoseconds () const =0
 Get the last command time (after reading). More...
 
template<typename Duration >
Duration getLastCommandTimeAs () const
 Get the last command time (after reading). More...
 
virtual void syncTime (bool sync=true)=0
 Sync command times with real time. More...
 
- Public Member Functions inherited from regilo::ILog
virtual ~ILog ()=default
 Default destructor.
 
virtual const std::string & getFilePath () const =0
 Get the path of file if the log was created with a path otherwise the empty string. More...
 
virtual std::iostream & getStream ()=0
 Get the current underlying stream. More...
 
virtual bool isEnd () const =0
 Test if the stream is EOF. More...
 
virtual std::string read ()=0
 Read one command from the log. More...
 
virtual std::string read (std::string &logCommand)=0
 Read one command from the log. More...
 
virtual std::string readCommand (const std::string &command)=0
 Read specified command from the log (the others are skipped). More...
 
virtual std::string readCommand (const std::string &command, std::string &logCommand)=0
 Read specified command from the log (the others are skipped). More...
 
virtual void write (const std::string &command, const std::string &response)=0
 Write a command and response to the log. More...
 

Detailed Description

The ITimedLog interface is implemented in TimedLog.

Member Function Documentation

virtual std::chrono::nanoseconds regilo::ITimedLog::getLastCommandNanoseconds ( ) const
pure virtual

Get the last command time (after reading).

Returns
Time since epoch as std::chrono::nanoseconds.

Implemented in regilo::TimedLog< DurationT >.

template<typename Duration >
Duration regilo::ITimedLog::getLastCommandTimeAs ( ) const
inline

Get the last command time (after reading).

Returns
Time since epoch as Duration.
virtual void regilo::ITimedLog::syncTime ( bool  sync = true)
pure virtual

Sync command times with real time.

It means that all read methods will block their executions until the current time is bigger than the command time.

Implemented in regilo::TimedLog< DurationT >.


The documentation for this class was generated from the following file: