vrpn  07.33
Virtual Reality Peripheral Network
vrpn_Button_USB.h
Go to the documentation of this file.
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_Filter {
9 public:
10  vrpn_Button_USB(const char *name, const char *deviceName,
11  vrpn_Connection *c);
12  ~vrpn_Button_USB();
13 
14  virtual void mainloop();
15 
16 protected:
17  void read(void);
19  bool USBWrite(const unsigned long &data);
21  bool USBRead(unsigned long &data, int port);
23  bool USB_IO(unsigned long lIn, int lInSize, unsigned long &lOut,
24  int lOutSize);
25  HANDLE m_hDevice;
26 };
27 #endif
28 #endif
vrpn_Button.h
vrpn_BaseClass::mainloop
virtual void mainloop()=0
Called once through each main loop iteration to handle updates. Remote object mainloop() should call ...
vrpn_Connection
Generic connection class not specific to the transport mechanism.
Definition: vrpn_Connection.h:510
VRPN_API
#define VRPN_API
Definition: vrpn_Configure.h:646
vrpn_Button_Filter
All button servers should derive from this class, which provides the ability to turn any of the butto...
Definition: vrpn_Button.h:65