Fawkes API
Fawkes Development Version
|
Aquisition-dependant threads. More...
#include "aqt_vision_threads.h"
Public Member Functions | |
FvAqtVisionThreads (fawkes::Clock *clock) | |
Constructor. More... | |
~FvAqtVisionThreads () | |
Destructor. More... | |
void | add_waiting_thread (fawkes::Thread *thread) |
Add a thread in waiting state. More... | |
void | remove_thread (fawkes::Thread *thread) |
Remove a thread. More... | |
void | remove_waiting_thread (fawkes::Thread *thread) |
Remove waiting thread. More... | |
void | set_thread_running (fawkes::Thread *thread) |
Mark the thread as running. More... | |
bool | empty () |
Check if there is no thread at all. More... | |
float | empty_time () |
Get the empty time. More... | |
bool | has_cyclic_thread () |
Check if there is at least one cyclic thread. More... | |
bool | has_cont_thread () |
Check if there is at least one continuous thread. More... | |
void | wakeup_and_wait_cyclic_threads () |
Wakeup and wait for all cyclic threads. More... | |
void | set_prepfin_hold (bool hold) |
Set prepfin hold fo cyclic threads. More... | |
bool | has_waiting_thread (fawkes::Thread *t) |
Check if the given waiting thread is registered. More... | |
Friends | |
class | FvBaseThread |
class | FvAquisitionThread |
Aquisition-dependant threads.
This class is used for managing the vision threads that depend on a given aquisition thread. Used internally in base vision.
Definition at line 34 of file aqt_vision_threads.h.
FvAqtVisionThreads::FvAqtVisionThreads | ( | fawkes::Clock * | clock | ) |
Constructor.
clock | Clock for timeout handling, system time is used only. |
Definition at line 44 of file aqt_vision_threads.cpp.
References fawkes::Clock::get_systime().
FvAqtVisionThreads::~FvAqtVisionThreads | ( | ) |
Destructor.
Definition at line 61 of file aqt_vision_threads.cpp.
void FvAqtVisionThreads::add_waiting_thread | ( | fawkes::Thread * | thread | ) |
Add a thread in waiting state.
The thread is marked as dependant but it is otherwise ignored.
thread | thread to add for access to the YUV422_PLANAR image. |
Definition at line 79 of file aqt_vision_threads.cpp.
Referenced by FvBaseThread::register_for_camera().
bool FvAqtVisionThreads::empty | ( | ) |
Check if there is no thread at all.
Definition at line 177 of file aqt_vision_threads.cpp.
float FvAqtVisionThreads::empty_time | ( | ) |
Get the empty time.
Definition at line 189 of file aqt_vision_threads.cpp.
References fawkes::Clock::elapsed().
bool FvAqtVisionThreads::has_cont_thread | ( | ) |
Check if there is at least one continuous thread.
Definition at line 155 of file aqt_vision_threads.cpp.
bool FvAqtVisionThreads::has_cyclic_thread | ( | ) |
Check if there is at least one cyclic thread.
Definition at line 145 of file aqt_vision_threads.cpp.
bool FvAqtVisionThreads::has_waiting_thread | ( | fawkes::Thread * | t | ) |
Check if the given waiting thread is registered.
t | thread to check for |
Definition at line 166 of file aqt_vision_threads.cpp.
void FvAqtVisionThreads::remove_thread | ( | fawkes::Thread * | thread | ) |
Remove a thread.
The thread is removed from all internal structures.
thread | thread to remove |
Definition at line 110 of file aqt_vision_threads.cpp.
References fawkes::Clock::get_systime().
void FvAqtVisionThreads::remove_waiting_thread | ( | fawkes::Thread * | thread | ) |
Remove waiting thread.
thread | thread to remove from waiting structures. |
Definition at line 132 of file aqt_vision_threads.cpp.
References fawkes::Clock::get_systime().
void FvAqtVisionThreads::set_prepfin_hold | ( | bool | hold | ) |
Set prepfin hold fo cyclic threads.
Sets prepfin hold for cyclice threads and rolls back if it cannot be set for any of the threads.
hold | prepfin hold value |
Exception | thrown if setting fails |
Definition at line 215 of file aqt_vision_threads.cpp.
Referenced by FvAcquisitionThread::set_vt_prepfin_hold().
void FvAqtVisionThreads::set_thread_running | ( | fawkes::Thread * | thread | ) |
Mark the thread as running.
thread | thread to mark as running |
Definition at line 89 of file aqt_vision_threads.cpp.
References fawkes::VisionAspect::CYCLIC, and fawkes::VisionAspect::vision_thread_mode().
void FvAqtVisionThreads::wakeup_and_wait_cyclic_threads | ( | ) |
Wakeup and wait for all cyclic threads.
Definition at line 197 of file aqt_vision_threads.cpp.
Referenced by FvAcquisitionThread::loop().