Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Private Member Functions | List of all members
phidgets::Phidget Class Reference

#include <phidget.h>

Inheritance diagram for phidgets::Phidget:
Inheritance graph

Public Member Functions

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

Static Public Member Functions

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

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

phidgets::Phidget::Phidget ( )

Definition at line 5 of file phidget.cpp.

phidgets::Phidget::~Phidget ( )

Definition at line 10 of file phidget.cpp.

Member Function Documentation

void phidgets::Phidget::attachHandler ( )

Definition at line 96 of file phidget.cpp.

int phidgets::Phidget::AttachHandler ( CPhidgetHandle  handle,
void *  userptr 

Definition at line 111 of file phidget.cpp.

int phidgets::Phidget::close ( )

Close the connection to the phidget.

Definition at line 33 of file phidget.cpp.

void phidgets::Phidget::detachHandler ( )

Definition at line 101 of file phidget.cpp.

int phidgets::Phidget::DetachHandler ( CPhidgetHandle  handle,
void *  userptr 

Definition at line 117 of file phidget.cpp.

void phidgets::Phidget::errorHandler ( int  error)

Definition at line 106 of file phidget.cpp.

int phidgets::Phidget::ErrorHandler ( CPhidgetHandle  handle,
void *  userptr,
int  ErrorCode,
const char *  unknown 

Definition at line 123 of file phidget.cpp.

std::string phidgets::Phidget::getDeviceLabel ( )

Get the device label string.

Definition at line 59 of file phidget.cpp.

std::string phidgets::Phidget::getDeviceName ( )

Get the device name string.

Definition at line 51 of file phidget.cpp.

int phidgets::Phidget::getDeviceSerialNumber ( )

Get the Phidget's serial number.

Definition at line 74 of file phidget.cpp.

std::string phidgets::Phidget::getDeviceType ( )

Get the device type string.

Definition at line 43 of file phidget.cpp.

int phidgets::Phidget::getDeviceVersion ( )

Get the Phidget's version.

Definition at line 81 of file phidget.cpp.

std::string phidgets::Phidget::getErrorDescription ( int  errorCode)

Lookup the string for a CPhidget Error Code.

errorCodeThe error code returned from the CPhidget API

Definition at line 88 of file phidget.cpp.

std::string phidgets::Phidget::getLibraryVersion ( )

Get the library version string.

Definition at line 67 of file phidget.cpp.

void phidgets::Phidget::init ( CPhidgetHandle  handle)

Definition at line 23 of file phidget.cpp.

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

Open a connection to a Phidget.

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 ( )

Definition at line 16 of file phidget.cpp.

int phidgets::Phidget::waitForAttachment ( int  timeout)

Block until the unit is attached or timeout occurs.

timeoutMilliseconds to wait before timing out
0 on success

Definition at line 38 of file phidget.cpp.

Member Data Documentation

CPhidgetHandle phidgets::Phidget::handle_

Definition at line 87 of file phidget.h.

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

Author(s): Tully Foote, Ivan Dryanovski
autogenerated on Tue May 7 2019 03:19:24