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

#include <phidget.h>

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

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 openAndWaitForAttachment (int serial_number, int timeout)
 Open a connection to a Phidget. More...
 
 Phidget ()
 
virtual ~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)
 
void registerHandlers ()
 

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)
 

Private Attributes

CPhidgetHandle handle_
 

Detailed Description

Definition at line 40 of file phidget.h.

Constructor & Destructor Documentation

phidgets::Phidget::Phidget ( )

Definition at line 7 of file phidget.cpp.

phidgets::Phidget::~Phidget ( )
virtual

Definition at line 11 of file phidget.cpp.

Member Function Documentation

void phidgets::Phidget::attachHandler ( )
protectedvirtual

Definition at line 99 of file phidget.cpp.

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

Definition at line 115 of file phidget.cpp.

int phidgets::Phidget::close ( )

Close the connection to the phidget.

Definition at line 40 of file phidget.cpp.

void phidgets::Phidget::detachHandler ( )
protectedvirtual

Definition at line 104 of file phidget.cpp.

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

Definition at line 121 of file phidget.cpp.

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

Definition at line 109 of file phidget.cpp.

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

Definition at line 127 of file phidget.cpp.

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

Get the device label string.

Definition at line 61 of file phidget.cpp.

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

Get the device name string.

Definition at line 53 of file phidget.cpp.

int phidgets::Phidget::getDeviceSerialNumber ( )

Get the Phidget's serial number.

Definition at line 77 of file phidget.cpp.

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

Get the device type string.

Definition at line 45 of file phidget.cpp.

int phidgets::Phidget::getDeviceVersion ( )

Get the Phidget's version.

Definition at line 84 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 91 of file phidget.cpp.

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

Get the library version string.

Definition at line 69 of file phidget.cpp.

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

Definition at line 24 of file phidget.cpp.

int phidgets::Phidget::openAndWaitForAttachment ( int  serial_number,
int  timeout 
)

Open a connection to a Phidget.

Parameters
serial_numberThe serial number of the phidget to which to attach (-1 will connect to any)
timeoutMilliseconds to wait before timing out
Returns
0 on success

Definition at line 29 of file phidget.cpp.

void phidgets::Phidget::registerHandlers ( )
protected

Definition at line 17 of file phidget.cpp.

Member Data Documentation

CPhidgetHandle phidgets::Phidget::handle_
private

Definition at line 88 of file phidget.h.


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


phidgets_api
Author(s): Tully Foote, Ivan Dryanovski
autogenerated on Fri Apr 9 2021 02:56:02