Public Member Functions | Protected Member Functions | Protected Attributes | Static Private Member Functions
PhidgetIK Class Reference

Class for interfacing with the PhidgetInterfaceKit. More...

#include <phidget_ik.h>

List of all members.

Public Member Functions

int getDataRate (int index)
 Gets the Data Rate for an analog input.
int getDataRateMax (int index)
 Gets the maximum supported data rate (in ms) for an analog input.
int getDataRateMin (int index)
 Gets the minimum supported data rate (in ms) for an analog input.
int getInputCount ()
 Gets the number of digital inputs supported by this board.
int getInputState (int index)
 Gets the state of a digital input.
int getLastError ()
 Returns the last error generated by a CPhidget function.
int getOutputCount ()
 Gets the number of digital outputs supported by this board.
int getOutputState (int index)
 Gets the state of a digital output.
int getRatiometric ()
 Gets the ratiometric state for this board.
int getSensorChangeTrigger (int index)
 Gets a sensor change trigger.
int getSensorCount ()
 Gets the number of sensor (analog) inputs supported by this board.
int getSensorRawValue (int index)
 Gets a sensor raw value (12-bit).
int getSensorValue (int index)
 Gets a sensor value (0-1000).
int init (int serial_number)
 Initialize and connect to a device.
 PhidgetIK ()
 The constructor for the PhidgetInterfaceKit.
int setDataRate (int index, int datarate)
 Sets the Data Rate (in ms) for an analog input.
int setOutputState (int index, int state)
 Sets the state of a digital output.
int setRatiometric (int ratiometric)
 Sets the ratiometric state for this board.
int setSensorChangeTrigger (int index, int trigger)
 Sets a sensor change trigger.

Protected Member Functions

virtual int attachHandler ()
 This is called when a PhidgetInterfaceKit is attached.
virtual int inputChangeHandler (int index, int inputState)
 This is called when a digital input changes.
virtual int outputChangeHandler (int index, int outputState)
 This is called when a digital output changes.
virtual int sensorChangeHandler (int index, int sensorValue)
 This is called when a sensor value changes by more then the change trigger.

Protected Attributes

CPhidgetInterfaceKitHandle ik_handle_
 Storage for the CPhidget handle.
int last_error_
 Last error generated by a CPhidget function.

Static Private Member Functions

static int attachDelegate (CPhidgetHandle phid, void *userptr)
 Delegate for calling attachHandler method.
static int inputChangeDelegate (CPhidgetInterfaceKitHandle phid, void *userPtr, int index, int inputState)
 Delegate for calling inputChangeHandler method.
static int outputChangeDelegate (CPhidgetInterfaceKitHandle phid, void *userPtr, int index, int outputState)
 Delegate for calling outputChangeHandler method.
static int sensorChangeDelegate (CPhidgetInterfaceKitHandle phid, void *userPtr, int index, int sensorValue)
 Delegate for calling sensorChangeHandler method.

Detailed Description

Class for interfacing with the PhidgetInterfaceKit.

If you wish to use the InterfaceKit API's callback functions, you should subclass this and override the Handler functions: attachHandler(), inputChangeHandler(), outputChangeHandler() and sensorChangeHandler().

Definition at line 18 of file phidget_ik.h.


Constructor & Destructor Documentation

PhidgetIK::PhidgetIK ( ) [inline]

The constructor for the PhidgetInterfaceKit.

Create a new PhidgetIK interface class

Definition at line 23 of file phidget_ik.h.


Member Function Documentation

static int PhidgetIK::attachDelegate ( CPhidgetHandle  phid,
void *  userptr 
) [inline, static, private]

Delegate for calling attachHandler method.

Definition at line 233 of file phidget_ik.h.

virtual int PhidgetIK::attachHandler ( ) [inline, protected, virtual]

This is called when a PhidgetInterfaceKit is attached.

For overriding.

Definition at line 205 of file phidget_ik.h.

int PhidgetIK::getDataRate ( int  index) [inline]

Gets the Data Rate for an analog input.

Definition at line 155 of file phidget_ik.h.

int PhidgetIK::getDataRateMax ( int  index) [inline]

Gets the maximum supported data rate (in ms) for an analog input.

Definition at line 171 of file phidget_ik.h.

int PhidgetIK::getDataRateMin ( int  index) [inline]

Gets the minimum supported data rate (in ms) for an analog input.

Definition at line 181 of file phidget_ik.h.

int PhidgetIK::getInputCount ( ) [inline]

Gets the number of digital inputs supported by this board.

Definition at line 47 of file phidget_ik.h.

int PhidgetIK::getInputState ( int  index) [inline]

Gets the state of a digital input.

Definition at line 57 of file phidget_ik.h.

int PhidgetIK::getLastError ( ) [inline]

Returns the last error generated by a CPhidget function.

Definition at line 191 of file phidget_ik.h.

int PhidgetIK::getOutputCount ( ) [inline]

Gets the number of digital outputs supported by this board.

Definition at line 67 of file phidget_ik.h.

int PhidgetIK::getOutputState ( int  index) [inline]

Gets the state of a digital output.

Definition at line 77 of file phidget_ik.h.

int PhidgetIK::getRatiometric ( ) [inline]

Gets the ratiometric state for this board.

Definition at line 139 of file phidget_ik.h.

int PhidgetIK::getSensorChangeTrigger ( int  index) [inline]

Gets a sensor change trigger.

Definition at line 123 of file phidget_ik.h.

int PhidgetIK::getSensorCount ( ) [inline]

Gets the number of sensor (analog) inputs supported by this board.

Definition at line 93 of file phidget_ik.h.

int PhidgetIK::getSensorRawValue ( int  index) [inline]

Gets a sensor raw value (12-bit).

Definition at line 113 of file phidget_ik.h.

int PhidgetIK::getSensorValue ( int  index) [inline]

Gets a sensor value (0-1000).

Definition at line 103 of file phidget_ik.h.

int PhidgetIK::init ( int  serial_number) [inline]

Initialize and connect to a device.

This will connect to any or a specific PhidgetInterfaceKit

Parameters:
serial_numberThe serial number to which to connect (-1 for any)

Definition at line 41 of file phidget_ik.h.

static int PhidgetIK::inputChangeDelegate ( CPhidgetInterfaceKitHandle  phid,
void *  userPtr,
int  index,
int  inputState 
) [inline, static, private]

Delegate for calling inputChangeHandler method.

Definition at line 239 of file phidget_ik.h.

virtual int PhidgetIK::inputChangeHandler ( int  index,
int  inputState 
) [inline, protected, virtual]

This is called when a digital input changes.

For overriding.

Definition at line 212 of file phidget_ik.h.

static int PhidgetIK::outputChangeDelegate ( CPhidgetInterfaceKitHandle  phid,
void *  userPtr,
int  index,
int  outputState 
) [inline, static, private]

Delegate for calling outputChangeHandler method.

Definition at line 245 of file phidget_ik.h.

virtual int PhidgetIK::outputChangeHandler ( int  index,
int  outputState 
) [inline, protected, virtual]

This is called when a digital output changes.

For overriding.

Definition at line 219 of file phidget_ik.h.

static int PhidgetIK::sensorChangeDelegate ( CPhidgetInterfaceKitHandle  phid,
void *  userPtr,
int  index,
int  sensorValue 
) [inline, static, private]

Delegate for calling sensorChangeHandler method.

Definition at line 251 of file phidget_ik.h.

virtual int PhidgetIK::sensorChangeHandler ( int  index,
int  sensorValue 
) [inline, protected, virtual]

This is called when a sensor value changes by more then the change trigger.

For overriding.

Definition at line 226 of file phidget_ik.h.

int PhidgetIK::setDataRate ( int  index,
int  datarate 
) [inline]

Sets the Data Rate (in ms) for an analog input.

Definition at line 165 of file phidget_ik.h.

int PhidgetIK::setOutputState ( int  index,
int  state 
) [inline]

Sets the state of a digital output.

Definition at line 87 of file phidget_ik.h.

int PhidgetIK::setRatiometric ( int  ratiometric) [inline]

Sets the ratiometric state for this board.

Definition at line 149 of file phidget_ik.h.

int PhidgetIK::setSensorChangeTrigger ( int  index,
int  trigger 
) [inline]

Sets a sensor change trigger.

Definition at line 133 of file phidget_ik.h.


Member Data Documentation

CPhidgetInterfaceKitHandle PhidgetIK::ik_handle_ [protected]

Storage for the CPhidget handle.

Definition at line 198 of file phidget_ik.h.

int PhidgetIK::last_error_ [protected]

Last error generated by a CPhidget function.

Definition at line 201 of file phidget_ik.h.


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


phidget_ik
Author(s): Wouter Caarls
autogenerated on Sun Jan 5 2014 11:06:43