Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

DeviceDriver Class Reference

description of DeviceDriver More...

#include <DeviceDriver.h>

Inheritance diagram for DeviceDriver:

Detailed Description

description of DeviceDriver

Definition at line 12 of file DeviceDriver.h.

List of all members.

Classes

class  SourceListener
 allows LoadDataThreads to be notified when a data source is added or removed More...

Public Types

typedef InstanceTracker
< DeviceDriver, std::string,
Factory1Arg< DeviceDriver,
std::string > > 
registry_t

Public Member Functions

virtual ~DeviceDriver ()
 destructor, removes from registry in case we're deleting it from some other source than registry's own destroy()
virtual std::string getClassName () const =0
 Returns the name of the class (aka its type).
virtual std::string getName () const
 Returns the name of the instance (instanceName).
virtual MotionHookgetMotionSink ()
virtual void getSensorSources (std::map< std::string, DataSource * > &sources)
virtual void getImageSources (std::map< std::string, DataSource * > &sources)
virtual void addSourceListener (SourceListener *l)
 add a listener to sourceListeners
virtual void removeSourceListener (SourceListener *l)
 remove a listener from sourceListeners

Static Public Member Functions

static registry_tgetRegistry ()

Protected Member Functions

 DeviceDriver (const std::string &, const std::string &instancename)
 constructor, pass the name of the class's type so we can use it in error messages, and a name for the instance so we can register it for MotionHook's to lookup
virtual void registerInstance ()
 To be called be "deepest" subclass constructor at the end of construction.
virtual void fireDataSourcesUpdated ()
 calls SourceListener::dataSourcesUpdated() for entries registered in sourceListeners

Protected Attributes

const std::string instanceName
 holds the name of this instance of CommPort (mainly for error message reporting by the class itself)
std::set< SourceListener * > sourceListeners
 list (of LoadDataThreads) to be notified when a data source is added or removed

Member Typedef Documentation

typedef InstanceTracker<DeviceDriver,std::string,Factory1Arg<DeviceDriver,std::string> > registry_t

Definition at line 28 of file DeviceDriver.h.


Constructor & Destructor Documentation

virtual ~DeviceDriver (  )  [virtual]

destructor, removes from registry in case we're deleting it from some other source than registry's own destroy()

Definition at line 15 of file DeviceDriver.h.

DeviceDriver ( const std::string &  ,
const std::string &  instancename 
) [protected]

constructor, pass the name of the class's type so we can use it in error messages, and a name for the instance so we can register it for MotionHook's to lookup

Definition at line 45 of file DeviceDriver.h.

Referenced by CameraDriverQTSG::CameraDriverQTSG().


Member Function Documentation

virtual void addSourceListener ( SourceListener l  )  [virtual]

add a listener to sourceListeners

Definition at line 39 of file DeviceDriver.h.

virtual void fireDataSourcesUpdated (  )  [protected, virtual]

calls SourceListener::dataSourcesUpdated() for entries registered in sourceListeners

Definition at line 67 of file DeviceDriver.h.

virtual std::string getClassName (  )  const [pure 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

Implemented in CameraDriverPtGrey, CameraDriverQTKit, CameraDriverQTSG, CameraDriverV4L1, CameraDriverV4L2, CreateDriver, DynamixelDriver, ImageStreamDriver, KinectDriver, KobukiDriver, LoggedDataDriver, MirageDriver, PListSensorDriver, SkewlZoneDriver, SSC32Driver, and WiiMoteDriver.

Referenced by DataStreamDriver::plistValueChanged(), registerInstance(), and MotionMonitorThread::runloop().

virtual MotionHook* getMotionSink (  )  [virtual]
virtual std::string getName (  )  const [virtual]

Returns the name of the instance (instanceName).

Definition at line 22 of file DeviceDriver.h.

Referenced by FileSystemDataSource::nextFrame(), and MotionMonitorThread::runloop().

virtual void registerInstance (  )  [protected, virtual]

To be called be "deepest" subclass constructor at the end of construction.

Don't want to register until completed construction! plist::Collection listeners would be triggered and might start performing operations on instance while partially constructed

Definition at line 54 of file DeviceDriver.h.

virtual void removeSourceListener ( SourceListener l  )  [virtual]

remove a listener from sourceListeners

Definition at line 41 of file DeviceDriver.h.


Member Data Documentation

std::set<SourceListener*> sourceListeners [protected]

list (of LoadDataThreads) to be notified when a data source is added or removed

Definition at line 76 of file DeviceDriver.h.

Referenced by addSourceListener(), fireDataSourcesUpdated(), and removeSourceListener().


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

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