~hitmuri/vjpirate/trunk

« back to all changes in this revision

Viewing changes to os/mac/include/vrpn/vrpn_Button_USB.h

  • Committer: Florent Berthaut
  • Date: 2014-07-26 18:53:16 UTC
  • mfrom: (5.1.12 mac)
  • Revision ID: flo@localhost.localdomain-20140726185316-c2ucnwmgm5kij4e2
Merged mac branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef VRPN_BUTTON_USB_H
 
2
#ifdef  _WIN32
 
3
#include "vrpn_Button.h"
 
4
 
 
5
// USB button code. 
 
6
// This class is derived from the vrpn_Button_Filter class, so that it
 
7
// can be made to toggle its buttons using messages from the client.
 
8
class VRPN_API vrpn_Button_USB : public vrpn_Button {
 
9
  public:
 
10
        vrpn_Button_USB(const char *name, const char *deviceName, vrpn_Connection *c);
 
11
        ~vrpn_Button_USB();
 
12
 
 
13
        virtual void mainloop();
 
14
 
 
15
  protected:
 
16
        void read(void);
 
17
        //! writes data to the device
 
18
        bool USBWrite(const unsigned long &data);
 
19
        //! reads data from the device
 
20
        bool USBRead(unsigned long &data, int port);
 
21
        //! basic io handeling
 
22
        bool USB_IO(unsigned long lIn, int lInSize, unsigned long &lOut, int lOutSize);
 
23
        HANDLE m_hDevice;       //!< the usb device
 
24
};
 
25
#endif
 
26
#endif