Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

CameraDriverPtGrey Class Reference

description of CameraDriverPtGrey More...

#include <CameraDriverPtGrey.h>

Inheritance diagram for CameraDriverPtGrey:

Detailed Description

description of CameraDriverPtGrey

Definition at line 13 of file CameraDriverPtGrey.h.

List of all members.

Public Member Functions

 CameraDriverPtGrey (const std::string &name)
 ~CameraDriverPtGrey ()
virtual std::string getClassName () const
 Returns the name of the class (aka its type).
virtual void getImageSources (std::map< std::string, DataSource * > &sources)
virtual unsigned int nextTimestamp ()
 Returns the simulator time of the next data segment.
virtual const std::string & nextName ()
 Returns a descriptive name of the next data segment for user feedback (e.g. a filename for logged data).
virtual bool advance ()
 Called when the simulator is stepping while paused or advancing a frozen data source, return true if successful, or false if no more data is available.
virtual void registerSource ()
 User hook, called when the data source should claim which outputs it provides feedback (providingOuput()).
virtual void deregisterSource ()
 User hook, called when the data source should release its claim on outputs with feedback (ignoringOuput()).
virtual void plistValueChanged (const plist::PrimitiveBase &pl)
 watches index, triggers a close() and re-open() if it changes

Public Attributes

plist::Primitive< unsigned int > index

Protected Member Functions

void threadrun ()
void doFreeze ()
 user hook for when frozen is set to true; advance() will be called by simulator at user discretion.
void doUnfreeze ()
 user hook for when frozen is set to false; if enteringRealtime() has been called then you should resume sending data.
void openCam ()
void closeCam ()
bool convertImage (FlyCapture2::Image &rawImage)

Protected Attributes

CallbackThread thread
Thread::Lock lock
FlyCapture2::Camera cam
unsigned int frameCount
unsigned int timestamp

Static Private Attributes

static const std::string autoRegisterCameraDriverPtGrey
 holds the class name, set via registration with the DeviceDriver registry

Constructor & Destructor Documentation

CameraDriverPtGrey ( const std::string &  name  )  [explicit]

Definition at line 16 of file CameraDriverPtGrey.h.

Definition at line 25 of file CameraDriverPtGrey.h.


Member Function Documentation

virtual bool advance (  )  [virtual]

Called when the simulator is stepping while paused or advancing a frozen data source, return true if successful, or false if no more data is available.

Implements DataSource.

void closeCam (  )  [protected]
bool convertImage ( FlyCapture2::Image &  rawImage  )  [protected]
virtual void deregisterSource (  )  [virtual]

User hook, called when the data source should release its claim on outputs with feedback (ignoringOuput()).

It would be wise to call this from your destructor as well.

Reimplemented from DataSource.

void doFreeze (  )  [protected, virtual]

user hook for when frozen is set to true; advance() will be called by simulator at user discretion.

Reimplemented from DataSource.

void doUnfreeze (  )  [protected, virtual]

user hook for when frozen is set to false; if enteringRealtime() has been called then you should resume sending data.

Reimplemented from DataSource.

virtual std::string getClassName (  )  const [virtual]

Returns the name of the class (aka its type).

Suggested implementation is to declare a static string member, set it to the result of calling the registry's registerType, and then return that member here

Implements DeviceDriver.

Definition at line 29 of file CameraDriverPtGrey.h.

virtual void getImageSources ( std::map< std::string, DataSource * > &  sources  )  [virtual]

Reimplemented from DeviceDriver.

Definition at line 31 of file CameraDriverPtGrey.h.

virtual const std::string& nextName (  )  [virtual]

Returns a descriptive name of the next data segment for user feedback (e.g. a filename for logged data).

Just use your class name if you don't have a useful name for individual samples.

Implements DataSource.

Definition at line 36 of file CameraDriverPtGrey.h.

virtual unsigned int nextTimestamp (  )  [virtual]

Returns the simulator time of the next data segment.

Should be in the future if nothing new since last data segment, otherwise should be the timestamp of the most recent data segment (older segments are skipped), return -1U if there is no more data

Implements DataSource.

Definition at line 35 of file CameraDriverPtGrey.h.

void openCam (  )  [protected]
virtual void plistValueChanged ( const plist::PrimitiveBase pl  )  [virtual]

watches index, triggers a close() and re-open() if it changes

Implements PrimitiveListener.

virtual void registerSource (  )  [virtual]

User hook, called when the data source should claim which outputs it provides feedback (providingOuput()).

Does not indicate the data source should start sending updates yet — wait for enteringRealtime() or advance() to be called

Reimplemented from DataSource.

void threadrun (  )  [protected]

Member Data Documentation

const std::string autoRegisterCameraDriverPtGrey [static, private]

holds the class name, set via registration with the DeviceDriver registry

Definition at line 67 of file CameraDriverPtGrey.h.

Referenced by getClassName().

FlyCapture2::Camera cam [protected]

Definition at line 60 of file CameraDriverPtGrey.h.

unsigned int frameCount [protected]

Definition at line 62 of file CameraDriverPtGrey.h.

plist::Primitive<unsigned int> index

Definition at line 45 of file CameraDriverPtGrey.h.

Referenced by CameraDriverPtGrey(), and ~CameraDriverPtGrey().

Thread::Lock lock [protected]

Definition at line 50 of file CameraDriverPtGrey.h.

CallbackThread thread [protected]

Definition at line 49 of file CameraDriverPtGrey.h.

unsigned int timestamp [protected]

Definition at line 63 of file CameraDriverPtGrey.h.


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

Tekkotsu Hardware Abstraction Layer 5.1CVS
Generated Mon May 9 05:01:40 2016 by Doxygen 1.6.3