Thread aspect that allows to provide a time source to the Fawkes clock. More...
#include <aspect/time_source.h>
Public Member Functions | |
| TimeSourceAspect (TimeSource *timesource) __attribute__((nonnull)) | |
| Constructor. | |
| virtual | ~TimeSourceAspect () |
| Virtual empty destructor. | |
| TimeSource * | get_timesource () const |
| Get time source. | |
Thread aspect that allows to provide a time source to the Fawkes clock.
There may be at most one external time source provided by a thread with the TimeSourceAspect at any given time. This is ensured by aspect initializer. This aspect can be used for example to attach Fawkes to a simulator and provide the simulated time to the system.
Definition at line 31 of file time_source.h.
| fawkes::TimeSourceAspect::TimeSourceAspect | ( | TimeSource * | timesource | ) |
Constructor.
| timesource | the time source to provide to Fawkes |
Definition at line 44 of file time_source.cpp.
| fawkes::TimeSourceAspect::~TimeSourceAspect | ( | ) | [virtual] |
Virtual empty destructor.
Definition at line 50 of file time_source.cpp.
| TimeSource * fawkes::TimeSourceAspect::get_timesource | ( | ) | const |
Get time source.
This method is called by the aspect initializer to get the time source the thread with this aspect provides.
Definition at line 61 of file time_source.cpp.
Referenced by fawkes::AspectIniFin::finalize(), and fawkes::AspectIniFin::init().
1.6.1