BCA_Lib
 All Data Structures Files Functions Pages
USBAntDevice.h
1 #ifndef __USB_ANT_DEVICE__
2 #define __USB_ANT_DEVICE__
3 
4 #include "device.h"
5 #include "lusb0_usb.h"
6 #include <string>
7 
8 class USBAntDevice : public Device
9 {
10 public:
11  USBAntDevice();
12  virtual ~USBAntDevice(void);
13  int open(int number);
14  int close();
15  int read(void* data, int size);
16  int write(void* data, int size);
17 
18 private:
19  int initUSB(int number);
20 
21  struct usb_bus* _bus;
22  struct usb_device* _dev;
23  usb_dev_handle* _handle;
24 
25  int _status;
26 
27  std::string _strData;
28  int _number;
29 
30 };
31 #endif // __USB_ANT_DEVICE__