Fawkes API  Fawkes Development Version
FvAqtVisionThreads Class Reference

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
 

Detailed Description

Aquisition-dependant threads.

This class is used for managing the vision threads that depend on a given aquisition thread. Used internally in base vision.

Author
Tim Niemueller

Definition at line 34 of file aqt_vision_threads.h.

Constructor & Destructor Documentation

◆ FvAqtVisionThreads()

FvAqtVisionThreads::FvAqtVisionThreads ( fawkes::Clock clock)

Constructor.

Parameters
clockClock 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::~FvAqtVisionThreads ( )

Destructor.

Definition at line 61 of file aqt_vision_threads.cpp.

Member Function Documentation

◆ add_waiting_thread()

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.

Parameters
threadthread 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().

◆ empty()

bool FvAqtVisionThreads::empty ( )

Check if there is no thread at all.

Returns
true if there is no thread in any of the internal running or waiting lists, false otherwise

Definition at line 177 of file aqt_vision_threads.cpp.

◆ empty_time()

float FvAqtVisionThreads::empty_time ( )

Get the empty time.

Returns
the time in seconds since the last thread has been removed.

Definition at line 189 of file aqt_vision_threads.cpp.

References fawkes::Clock::elapsed().

◆ has_cont_thread()

bool FvAqtVisionThreads::has_cont_thread ( )

Check if there is at least one continuous thread.

Returns
true if there is at least one continuous thread, false otherwise.

Definition at line 155 of file aqt_vision_threads.cpp.

◆ has_cyclic_thread()

bool FvAqtVisionThreads::has_cyclic_thread ( )

Check if there is at least one cyclic thread.

Returns
true if there is at least one cyclic thread, false otherwise.

Definition at line 145 of file aqt_vision_threads.cpp.

◆ has_waiting_thread()

bool FvAqtVisionThreads::has_waiting_thread ( fawkes::Thread t)

Check if the given waiting thread is registered.

Parameters
tthread to check for
Returns
true if the given thread is marked as waiting, false otherwise

Definition at line 166 of file aqt_vision_threads.cpp.

◆ remove_thread()

void FvAqtVisionThreads::remove_thread ( fawkes::Thread thread)

Remove a thread.

The thread is removed from all internal structures.

Parameters
threadthread to remove

Definition at line 110 of file aqt_vision_threads.cpp.

References fawkes::Clock::get_systime().

◆ remove_waiting_thread()

void FvAqtVisionThreads::remove_waiting_thread ( fawkes::Thread thread)

Remove waiting thread.

Parameters
threadthread to remove from waiting structures.

Definition at line 132 of file aqt_vision_threads.cpp.

References fawkes::Clock::get_systime().

◆ set_prepfin_hold()

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.

Parameters
holdprepfin hold value
Exceptions
Exceptionthrown if setting fails
See also
Thread::set_prepfin_hold()
ThreadList::set_prepfin_hold()

Definition at line 215 of file aqt_vision_threads.cpp.

Referenced by FvAcquisitionThread::set_vt_prepfin_hold().

◆ set_thread_running()

void FvAqtVisionThreads::set_thread_running ( fawkes::Thread thread)

Mark the thread as running.

Parameters
threadthread to mark as running

Definition at line 89 of file aqt_vision_threads.cpp.

References fawkes::VisionAspect::CYCLIC, and fawkes::VisionAspect::vision_thread_mode().

◆ wakeup_and_wait_cyclic_threads()

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().


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