31 #ifndef PHIDGETS_API_PHIDGET_H 32 #define PHIDGETS_API_PHIDGET_H 34 #include <libphidget21/phidget21.h> 80 void init(CPhidgetHandle handle);
90 static int AttachHandler(CPhidgetHandle handle,
void *userptr);
91 static int DetachHandler(CPhidgetHandle handle,
void *userptr);
92 static int ErrorHandler(CPhidgetHandle handle,
void *userptr,
int ErrorCode,
98 #endif // PHIDGETS_API_PHIDGET_H int openAndWaitForAttachment(int serial_number, int timeout)
Open a connection to a Phidget.
static int DetachHandler(CPhidgetHandle handle, void *userptr)
static int AttachHandler(CPhidgetHandle handle, void *userptr)
int getDeviceSerialNumber()
Get the Phidget's serial number.
virtual void detachHandler()
static int ErrorHandler(CPhidgetHandle handle, void *userptr, int ErrorCode, const char *unknown)
static std::string getErrorDescription(int errorCode)
Lookup the string for a CPhidget Error Code.
int close()
Close the connection to the phidget.
virtual void errorHandler(int error)
virtual void attachHandler()
std::string getDeviceType()
Get the device type string.
std::string getDeviceLabel()
Get the device label string.
std::string getLibraryVersion()
Get the library version string.
int getDeviceVersion()
Get the Phidget's version.
void init(CPhidgetHandle handle)
std::string getDeviceName()
Get the device name string.