Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Private Member Functions
phidgets::Phidget Class Reference

#include <phidget.h>

Inheritance diagram for phidgets::Phidget:
Inheritance graph
[legend]

List of all members.

Public Member Functions

int close ()
 Close the connection to the phidget.
std::string getDeviceLabel ()
 Get the device label string.
std::string getDeviceName ()
 Get the device name string.
int getDeviceSerialNumber ()
 Get the Phidget's serial number.
std::string getDeviceType ()
 Get the device type string.
int getDeviceVersion ()
 Get the Phidget's version.
std::string getLibraryVersion ()
 Get the library version string.
int open (int serial_number)
 Open a connection to a Phidget.
 Phidget ()
int waitForAttachment (int timeout)
 Block until the unit is attached or timeout occurs.
 ~Phidget ()

Static Public Member Functions

static std::string getErrorDescription (int errorCode)
 Lookup the string for a CPhidget Error Code.

Protected Member Functions

virtual void attachHandler ()
virtual void detachHandler ()
virtual void errorHandler (int error)
void init (CPhidgetHandle handle)
virtual void registerHandlers ()

Protected Attributes

CPhidgetHandle handle_

Static Private Member Functions

static int AttachHandler (CPhidgetHandle handle, void *userptr)
static int DetachHandler (CPhidgetHandle handle, void *userptr)
static int ErrorHandler (CPhidgetHandle handle, void *userptr, int ErrorCode, const char *unknown)

Detailed Description

Definition at line 44 of file phidget.h.


Constructor & Destructor Documentation

Definition at line 5 of file phidget.cpp.

Definition at line 10 of file phidget.cpp.


Member Function Documentation

void phidgets::Phidget::attachHandler ( ) [protected, virtual]

Definition at line 96 of file phidget.cpp.

int phidgets::Phidget::AttachHandler ( CPhidgetHandle  handle,
void *  userptr 
) [static, private]

Definition at line 111 of file phidget.cpp.

Close the connection to the phidget.

Definition at line 33 of file phidget.cpp.

void phidgets::Phidget::detachHandler ( ) [protected, virtual]

Definition at line 101 of file phidget.cpp.

int phidgets::Phidget::DetachHandler ( CPhidgetHandle  handle,
void *  userptr 
) [static, private]

Definition at line 117 of file phidget.cpp.

void phidgets::Phidget::errorHandler ( int  error) [protected, virtual]

Definition at line 106 of file phidget.cpp.

int phidgets::Phidget::ErrorHandler ( CPhidgetHandle  handle,
void *  userptr,
int  ErrorCode,
const char *  unknown 
) [static, private]

Definition at line 123 of file phidget.cpp.

Get the device label string.

Definition at line 59 of file phidget.cpp.

Get the device name string.

Definition at line 51 of file phidget.cpp.

Get the Phidget's serial number.

Definition at line 74 of file phidget.cpp.

Get the device type string.

Definition at line 43 of file phidget.cpp.

Get the Phidget's version.

Definition at line 81 of file phidget.cpp.

std::string phidgets::Phidget::getErrorDescription ( int  errorCode) [static]

Lookup the string for a CPhidget Error Code.

Parameters:
errorCodeThe error code returned from the CPhidget API

Definition at line 88 of file phidget.cpp.

Get the library version string.

Definition at line 67 of file phidget.cpp.

void phidgets::Phidget::init ( CPhidgetHandle  handle) [protected]

Definition at line 23 of file phidget.cpp.

int phidgets::Phidget::open ( int  serial_number)

Open a connection to a Phidget.

Parameters:
serial_numberTHe serial number of the phidget to which to attach (-1 will connect to any)

Definition at line 28 of file phidget.cpp.

void phidgets::Phidget::registerHandlers ( ) [protected, virtual]

Definition at line 16 of file phidget.cpp.

Block until the unit is attached or timeout occurs.

Parameters:
timeoutMilliseconds to wait before timing out

Definition at line 38 of file phidget.cpp.


Member Data Documentation

Definition at line 86 of file phidget.h.


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


phidgets_api
Author(s): Tully Foote, Ivan Dryanovski, Copyright (C) 2010 Phidgets Inc.
autogenerated on Mon Oct 6 2014 03:21:40