Fawkes API
Fawkes Development Version
|
Thread aspect to acces to SyncPoints Give this aspect to your thread to manage SyncPoints, i.e. More...
#include <>>
Public Member Functions | |
SyncPointAspect (SyncPoint::WakeupType type_in, std::string identifier_in, std::string identifier_out="") | |
Constructor. More... | |
SyncPointAspect (std::string out_identifier) | |
Constructor. More... | |
virtual | ~SyncPointAspect () |
Destructor. More... | |
void | init_SyncPointAspect (Thread *thread, SyncPointManager *syncpoint_manager) |
Init SyncPoint aspect. More... | |
void | finalize_SyncPointAspect (Thread *thread, SyncPointManager *syncpoint_manager) |
Finalize SyncPoint aspect. More... | |
void | pre_loop (Thread *thread) |
Wait for the input syncpoint before loop() More... | |
void | post_loop (Thread *thread) |
Emit the output syncpoint after loop() More... | |
![]() | |
const std::list< const char * > & | get_aspects () const |
Get list of aspect names attached to a aspected thread. More... | |
![]() | |
virtual | ~ThreadLoopListener () |
Virtual empty destructor. More... | |
Additional Inherited Members | |
![]() | |
void | add_aspect (const char *name) |
Add an aspect to a thread. More... | |
Thread aspect to acces to SyncPoints Give this aspect to your thread to manage SyncPoints, i.e.
wait for SyncPoints and emit SyncPoints
Definition at line 34 of file syncpoint.h.
fawkes::SyncPointAspect::SyncPointAspect | ( | SyncPoint::WakeupType | type_in, |
std::string | identifier_in, | ||
std::string | identifier_out = "" |
||
) |
Constructor.
Use this constructor if there should be an input syncpoint. The input syncpoint will be waited for before every loop.
type_in | type of the input syncpoint |
identifier_in | identifier of the input syncpoint |
identifier_out | identifier of the output syncpoint. If this identifier is empty, no output syncpoint will be used. |
Definition at line 43 of file syncpoint.cpp.
References fawkes::Aspect::add_aspect().
fawkes::SyncPointAspect::SyncPointAspect | ( | std::string | identifier_out | ) |
Constructor.
Use this constructor if there should be no input syncpoint, but only an output syncpoint.
identifier_out | identifier of the output syncpoint |
Definition at line 62 of file syncpoint.cpp.
References fawkes::Aspect::add_aspect().
|
virtual |
Destructor.
Definition at line 75 of file syncpoint.cpp.
void fawkes::SyncPointAspect::finalize_SyncPointAspect | ( | Thread * | thread, |
SyncPointManager * | manager | ||
) |
Finalize SyncPoint aspect.
This releases all syncpoints and unregisters the thread as loop listener.
thread | thread which uses this aspect |
manager | SyncPointManager to use |
Definition at line 109 of file syncpoint.cpp.
References fawkes::Thread::name(), fawkes::SyncPointManager::release_syncpoint(), fawkes::Thread::remove_loop_listener(), and fawkes::SyncPoint::unregister_emitter().
Referenced by fawkes::SyncPointAspectIniFin::finalize().
void fawkes::SyncPointAspect::init_SyncPointAspect | ( | Thread * | thread, |
SyncPointManager * | manager | ||
) |
Init SyncPoint aspect.
This initializes the syncpoints and registers the thread as loop listener. Additionally, the thread is registered as emitter for the output syncpoint if an output syncpoint is created.
thread | thread which uses this aspect |
manager | SyncPointManager to use |
Definition at line 87 of file syncpoint.cpp.
References fawkes::Thread::add_loop_listener(), fawkes::SyncPointManager::get_syncpoint(), fawkes::Thread::name(), and fawkes::SyncPoint::register_emitter().
Referenced by fawkes::SyncPointAspectIniFin::init().
|
virtual |
Emit the output syncpoint after loop()
thread | thread which uses this aspect and whose loop() just returned |
Reimplemented from fawkes::ThreadLoopListener.
Definition at line 140 of file syncpoint.cpp.
References fawkes::SyncPoint::emit(), and fawkes::Thread::name().
|
virtual |
Wait for the input syncpoint before loop()
thread | thread which uses this aspect and whose loop() will be called |
Reimplemented from fawkes::ThreadLoopListener.
Definition at line 129 of file syncpoint.cpp.
References fawkes::Thread::name(), and fawkes::SyncPoint::wait().