Public Member Functions | Protected Member Functions | Static Protected Member Functions | Static Protected Attributes

FCam::F2::PhidgetDevice Class Reference

A manager and base class for Phidgets based devices. More...

#include <PhidgetDevice.h>

Inheritance diagram for FCam::F2::PhidgetDevice:
Inheritance graph
[legend]
Collaboration diagram for FCam::F2::PhidgetDevice:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 PhidgetDevice ()
 The constructor for PhidgetDevices automatically searches for and attaches the Phidget interface kit if a previous device has not already done so.
virtual void tagFrame (Frame)
 PhidgetDevices subclasses are free to override this function to tag frames like other devices.

Protected Member Functions

virtual int handleInputChange (CPhidgetInterfaceKitHandle IFK, int index, int state)
 This method gets called by the Phidget event dispatcher if this PhidgetDevice has registered to recieve input change events for this input index.
virtual int handleOutputChange (CPhidgetInterfaceKitHandle IFK, int index, int state)
 This method gets called by the Phidget event dispatcher if this PhidgetDevice has registered to recieve output change events for this output index.
virtual int handleSensorChange (CPhidgetInterfaceKitHandle IFK, int index, int state)
 This method gets called by the Phidget event dispatcher if this PhidgetDevice has registered to recieve sensor change events for this sensor index.

Static Protected Member Functions

static void registerInputChangeHandler (int index, PhidgetDevice *device)
 Use this method to register a PhidgetDevice to receive input change Phidget events.
static void registerOutputChangeHandler (int index, PhidgetDevice *device)
 Use this method to register a PhidgetDevice to receive output change Phidget events.
static void registerSensorChangeHandler (int index, PhidgetDevice *device)
 Use this method to register a PhidgetDevice to receive sensor (analog input) change Phidget events.

Static Protected Attributes

static CPhidgetInterfaceKitHandle ifKit
 This is the shared interface kit handle for all Phidget devices.
static bool phidgetsAvailable
 Set to true when a Phidget interface kit is successfully attached.

Detailed Description

A manager and base class for Phidgets based devices.

This class provides convenience methods for attaching Phidget interface kits to the running process and registering handler functions for Phidget events. In order to register a device as a Phidget event handler, it must be a PhidgetDevice or one of its subclasses. Note that this class itself does not define any actions, and cannot tag frames.

Definition at line 23 of file PhidgetDevice.h.


Constructor & Destructor Documentation

FCam::F2::PhidgetDevice::PhidgetDevice (  ) 

The constructor for PhidgetDevices automatically searches for and attaches the Phidget interface kit if a previous device has not already done so.

Subclasses of PhidgetDevice must call the super constructor to maintain this functionality.

Definition at line 18 of file PhidgetDevice.cpp.


Member Function Documentation

int FCam::F2::PhidgetDevice::handleInputChange ( CPhidgetInterfaceKitHandle  IFK,
int  index,
int  state 
) [protected, virtual]

This method gets called by the Phidget event dispatcher if this PhidgetDevice has registered to recieve input change events for this input index.

Subclasses should override this method to perform custom behavior in response to events.

Definition at line 126 of file PhidgetDevice.cpp.

int FCam::F2::PhidgetDevice::handleOutputChange ( CPhidgetInterfaceKitHandle  IFK,
int  index,
int  state 
) [protected, virtual]

This method gets called by the Phidget event dispatcher if this PhidgetDevice has registered to recieve output change events for this output index.

Subclasses should override this method to perform custom behavior in response to events.

Definition at line 130 of file PhidgetDevice.cpp.

int FCam::F2::PhidgetDevice::handleSensorChange ( CPhidgetInterfaceKitHandle  IFK,
int  index,
int  state 
) [protected, virtual]

This method gets called by the Phidget event dispatcher if this PhidgetDevice has registered to recieve sensor change events for this sensor index.

Subclasses should override this method to perform custom behavior in response to events.

Definition at line 134 of file PhidgetDevice.cpp.


Member Data Documentation

CPhidgetInterfaceKitHandle FCam::F2::PhidgetDevice::ifKit [static, protected]

This is the shared interface kit handle for all Phidget devices.

Subclasses of PhidgetDevice can use this handle for other Phidget actions, such as changing an output value.

Definition at line 37 of file PhidgetDevice.h.


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