Fawkes API
Fawkes Development Version
|
TimeSource interface. More...
#include <timesource.h>
Public Member Functions | |
virtual | ~TimeSource () |
Destructor. More... | |
virtual void | get_time (timeval *tv) const =0 |
Get the current time. More... | |
virtual timeval | conv_to_realtime (const timeval *tv) const =0 |
Convert a time given w.r.t. More... | |
virtual timeval | conv_native_to_exttime (const timeval *tv) const =0 |
Convert a native time to the external time. More... | |
TimeSource interface.
This interfaces describes a way to interact with time sources that can be given to a Clock (for instance for simulation environments).
Definition at line 36 of file timesource.h.
|
inlinevirtual |
Destructor.
Definition at line 40 of file timesource.h.
References conv_native_to_exttime(), conv_to_realtime(), and get_time().
|
pure virtual |
Convert a native time to the external time.
When communicating with another instance which provides times in some timeformat native to the underlying time source (e.g. received from a simulation) it must be converted to a Fawkes time.
tv | time in external time source native format |
Implemented in fawkes::GazsimTimesource, and fawkes::SimulatorTimeSource.
Referenced by fawkes::Clock::native_to_time(), and ~TimeSource().
|
pure virtual |
Convert a time given w.r.t.
this time sources into system time.
tv | the time to convert |
Implemented in fawkes::GazsimTimesource, and fawkes::SimulatorTimeSource.
Referenced by fawkes::Clock::ext_to_realtime(), and ~TimeSource().
|
pure virtual |
Get the current time.
tv | the current time is written to this timeval |
Implemented in fawkes::GazsimTimesource, and fawkes::SimulatorTimeSource.
Referenced by fawkes::Clock::get_time(), and ~TimeSource().