Fawkes API  Fawkes Development Version
fawkes::VisionAspect Class Reference

Thread aspect to use in FireVision apps. More...

#include <>>

Inheritance diagram for fawkes::VisionAspect:

Public Types

enum  VisionThreadMode { CYCLIC, CONTINUOUS }
 The operation mode of this vision thread. More...
 

Public Member Functions

 VisionAspect (VisionThreadMode mode)
 Constructor. More...
 
virtual ~VisionAspect ()
 Virtual empty Destructor. More...
 
void init_VisionAspect (firevision::VisionMaster *vision_master)
 Set vision master. More...
 
VisionThreadMode vision_thread_mode ()
 Get the vision thread mode of this thread. More...
 
- Public Member Functions inherited from fawkes::Aspect
const std::list< const char * > & get_aspects () const
 Get list of aspect names attached to a aspected thread. More...
 

Protected Attributes

firevision::VisionMastervision_master
 Vision master. More...
 

Additional Inherited Members

- Protected Member Functions inherited from fawkes::Aspect
void add_aspect (const char *name)
 Add an aspect to a thread. More...
 

Detailed Description

Thread aspect to use in FireVision apps.

It is guaranteed that if used properly from within plugins that initVisionAspect() is called before the thread is started and that you can access the vision master via the vision_master member.

A vision thread can be called either cyclic, which means that in every loop the vision master will wait for this vision thread to finish before the next loop. This also means that the thread has to operate in wait-for-wakeup mode. The thread is woken up when a new camera image is available. In general the vision thread should be very fast and under no conditions it should take longer to process an image than to aquire it. The thread can also operate in continuous mode, in this case also the thread has to operate in continuous mode. In this mode the vision application should keep running and the processing is independent from the camera speed. Make sure that you use strict logging on the shared memory camera to ensure healthy pictures.

Author
Tim Niemueller

Definition at line 35 of file vision.h.

Member Enumeration Documentation

◆ VisionThreadMode

The operation mode of this vision thread.

See also
Thread
Enumerator
CYCLIC 

cyclic mode

CONTINUOUS 

continuous mode

Definition at line 41 of file vision.h.

Constructor & Destructor Documentation

◆ VisionAspect()

fawkes::VisionAspect::VisionAspect ( VisionThreadMode  mode)

Constructor.

Parameters
modemode to operate in

Definition at line 55 of file vision.cpp.

References fawkes::Aspect::add_aspect().

◆ ~VisionAspect()

fawkes::VisionAspect::~VisionAspect ( )
virtual

Virtual empty Destructor.

Definition at line 63 of file vision.cpp.

Member Function Documentation

◆ init_VisionAspect()

void fawkes::VisionAspect::init_VisionAspect ( firevision::VisionMaster vision_master)

Set vision master.

Parameters
vision_mastervision master It is guaranteed that this is called for a logging thread before Thread::start() is called (when running regularly inside Fawkes).
See also
VisionMaster

Definition at line 75 of file vision.cpp.

References vision_master.

Referenced by fawkes::VisionAspectIniFin::init().

◆ vision_thread_mode()

VisionAspect::VisionThreadMode fawkes::VisionAspect::vision_thread_mode ( )

Get the vision thread mode of this thread.

Returns
vision thread mode

Definition at line 85 of file vision.cpp.

Referenced by fawkes::VisionAspectIniFin::init(), FvBaseThread::register_for_camera(), and FvAqtVisionThreads::set_thread_running().

Member Data Documentation

◆ vision_master

firevision::VisionMaster* fawkes::VisionAspect::vision_master
protected

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