Fawkes API Fawkes Development Version

FvAqtVisionThreads Class Reference

Aquisition-dependant threads. More...

#include <>>

List of all members.

Public Member Functions

 FvAqtVisionThreads (fawkes::Clock *clock)
 Constructor.
 ~FvAqtVisionThreads ()
 Destructor.
void add_waiting_thread (fawkes::Thread *thread)
 Add a thread in waiting state.
void remove_thread (fawkes::Thread *thread)
 Remove a thread.
void remove_waiting_thread (fawkes::Thread *thread)
 Remove waiting thread.
void set_thread_running (fawkes::Thread *thread)
 Mark the thread as running.
bool empty ()
 Check if there is no thread at all.
float empty_time ()
 Get the empty time.
bool has_cyclic_thread ()
 Check if there is at least one cyclic thread.
void wakeup_and_wait_cyclic_threads ()
 Wakeup and wait for all cyclic threads.
void set_prepfin_hold (bool hold)
 Set prepfin hold fo cyclic threads.
bool has_waiting_thread (fawkes::Thread *t)
 Check if the given waiting thread is registered.

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

Destructor.

Definition at line 61 of file aqt_vision_threads.cpp.


Member Function Documentation

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

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 167 of file aqt_vision_threads.cpp.

float FvAqtVisionThreads::empty_time ( )

Get the empty time.

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

Definition at line 179 of file aqt_vision_threads.cpp.

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.

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 156 of file aqt_vision_threads.cpp.

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.

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.

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 205 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.

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

void FvAqtVisionThreads::wakeup_and_wait_cyclic_threads ( )

Wakeup and wait for all cyclic threads.

Definition at line 187 of file aqt_vision_threads.cpp.

Referenced by FvAcquisitionThread::loop().


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends