MRPT  1.9.9
xslibusb.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2019, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #ifndef XSLIBUSB
10 #define XSLIBUSB
11 
12 #include <libusb-1.0/libusb.h>
13 
14 struct XsLibraryLoader;
15 
16 typedef int libUSB_init(libusb_context** ctx);
17 typedef void libUSB_exit(libusb_context* ctx);
18 typedef int libUSB_open(libusb_device* dev, libusb_device_handle** handle);
19 typedef void libUSB_close(libusb_device_handle* dev_handle);
21  libusb_device_handle* dev, int interface_number);
23  libusb_device_handle* dev, int interface_number);
25  libusb_device_handle* dev, int interface_number);
26 typedef libusb_device* libUSB_ref_device(libusb_device* dev);
27 typedef void libUSB_unref_device(libusb_device* dev);
29  libusb_device_handle* dev, int interface_number);
31  libusb_device_handle* dev, int interface_number);
33  libusb_device* dev, struct libusb_config_descriptor** config);
35  struct libusb_config_descriptor* config);
36 typedef uint8_t libUSB_get_bus_number(libusb_device* dev);
37 typedef libusb_device* libUSB_get_device(libusb_device_handle* dev_handle);
38 typedef uint8_t libUSB_get_device_address(libusb_device* dev);
40  libusb_device* dev, struct libusb_device_descriptor* desc);
41 typedef ssize_t libUSB_get_device_list(
42  libusb_context* ctx, libusb_device*** list);
43 typedef void libUSB_free_device_list(libusb_device** list, int unref_devices);
45  libusb_device_handle* dev, uint8_t desc_index, unsigned char* data,
46  int length);
48  libusb_device_handle* dev_handle, unsigned char endpoint,
49  unsigned char* data, int length, int* actual_length, unsigned int timeout);
50 typedef void libUSB_set_debug(libusb_context* ctx, int level);
51 
52 class XsLibUsb
53 {
54  public:
55  XsLibUsb(void);
56  ~XsLibUsb(void);
57 
80 
81  private:
82  typedef struct _LIBUSB_API
83  {
106  } LIBUSB_API;
107 
110 
111  void initLibrary();
112 };
113 
114 #endif // file guard
XsLibraryLoader * m_libraryLoader
Definition: xslibusb.h:109
libUSB_attach_kernel_driver attach_kernel_driver
Definition: xslibusb.h:63
int libUSB_get_device_descriptor(libusb_device *dev, struct libusb_device_descriptor *desc)
Definition: xslibusb.h:39
libUSB_set_debug * set_debug
Definition: xslibusb.h:105
int libUSB_get_active_config_descriptor(libusb_device *dev, struct libusb_config_descriptor **config)
Definition: xslibusb.h:32
libUSB_close close
Definition: xslibusb.h:61
libUSB_unref_device unref_device
Definition: xslibusb.h:66
libUSB_get_bus_number * get_bus_number
Definition: xslibusb.h:97
libUSB_open open
Definition: xslibusb.h:60
XsLibUsb(void)
libUSB_unref_device * unref_device
Definition: xslibusb.h:92
int libUSB_claim_interface(libusb_device_handle *dev, int interface_number)
Definition: xslibusb.h:28
libUSB_init init
Definition: xslibusb.h:58
libUSB_free_config_descriptor free_config_descriptor
Definition: xslibusb.h:70
libUSB_ref_device * ref_device
Definition: xslibusb.h:91
libUSB_init * init
Definition: xslibusb.h:84
struct XsLibUsb::_LIBUSB_API LIBUSB_API
void libUSB_set_debug(libusb_context *ctx, int level)
Definition: xslibusb.h:50
libUSB_get_active_config_descriptor * get_active_config_descriptor
Definition: xslibusb.h:95
void libUSB_close(libusb_device_handle *dev_handle)
Definition: xslibusb.h:19
libUSB_get_string_descriptor_ascii get_string_descriptor_ascii
Definition: xslibusb.h:77
unsigned char uint8_t
Definition: rptypes.h:44
libUSB_free_device_list free_device_list
Definition: xslibusb.h:76
libUSB_bulk_transfer * bulk_transfer
Definition: xslibusb.h:104
void libUSB_free_device_list(libusb_device **list, int unref_devices)
Definition: xslibusb.h:43
LIBUSB_API m_libUsb
Definition: xslibusb.h:108
libUSB_get_string_descriptor_ascii * get_string_descriptor_ascii
Definition: xslibusb.h:103
libUSB_claim_interface * claim_interface
Definition: xslibusb.h:93
The Xsens dynamic library loader base class.
libUSB_open * open
Definition: xslibusb.h:86
libUSB_get_device_list get_device_list
Definition: xslibusb.h:75
libUSB_close * close
Definition: xslibusb.h:87
ssize_t libUSB_get_device_list(libusb_context *ctx, libusb_device ***list)
Definition: xslibusb.h:41
libUSB_get_device_descriptor * get_device_descriptor
Definition: xslibusb.h:100
libUSB_claim_interface claim_interface
Definition: xslibusb.h:67
int libUSB_get_string_descriptor_ascii(libusb_device_handle *dev, uint8_t desc_index, unsigned char *data, int length)
Definition: xslibusb.h:44
void initLibrary()
libUSB_get_device_descriptor get_device_descriptor
Definition: xslibusb.h:74
libUSB_kernel_driver_active * kernel_driver_active
Definition: xslibusb.h:88
int libUSB_detach_kernel_driver(libusb_device_handle *dev, int interface_number)
Definition: xslibusb.h:24
libUSB_detach_kernel_driver * detach_kernel_driver
Definition: xslibusb.h:90
void libUSB_exit(libusb_context *ctx)
Definition: xslibusb.h:17
libUSB_set_debug set_debug
Definition: xslibusb.h:79
libUSB_get_device get_device
Definition: xslibusb.h:72
libUSB_attach_kernel_driver * attach_kernel_driver
Definition: xslibusb.h:89
libUSB_get_device_address * get_device_address
Definition: xslibusb.h:99
libUSB_kernel_driver_active kernel_driver_active
Definition: xslibusb.h:62
void libUSB_unref_device(libusb_device *dev)
Definition: xslibusb.h:27
libUSB_exit exit
Definition: xslibusb.h:59
uint8_t libUSB_get_device_address(libusb_device *dev)
Definition: xslibusb.h:38
void libUSB_free_config_descriptor(struct libusb_config_descriptor *config)
Definition: xslibusb.h:34
~XsLibUsb(void)
libUSB_detach_kernel_driver detach_kernel_driver
Definition: xslibusb.h:64
libUSB_get_device_list * get_device_list
Definition: xslibusb.h:101
libUSB_free_device_list * free_device_list
Definition: xslibusb.h:102
libUSB_exit * exit
Definition: xslibusb.h:85
int libUSB_kernel_driver_active(libusb_device_handle *dev, int interface_number)
Definition: xslibusb.h:20
GLuint GLsizei GLsizei * length
Definition: glext.h:4079
GLint level
Definition: glext.h:3606
libUSB_get_device * get_device
Definition: xslibusb.h:98
int libUSB_attach_kernel_driver(libusb_device_handle *dev, int interface_number)
Definition: xslibusb.h:22
libusb_device * libUSB_get_device(libusb_device_handle *dev_handle)
Definition: xslibusb.h:37
libUSB_get_device_address get_device_address
Definition: xslibusb.h:73
int libUSB_open(libusb_device *dev, libusb_device_handle **handle)
Definition: xslibusb.h:18
int libUSB_bulk_transfer(libusb_device_handle *dev_handle, unsigned char endpoint, unsigned char *data, int length, int *actual_length, unsigned int timeout)
Definition: xslibusb.h:47
libUSB_release_interface release_interface
Definition: xslibusb.h:68
libUSB_get_bus_number get_bus_number
Definition: xslibusb.h:71
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: glext.h:3550
libusb_device * libUSB_ref_device(libusb_device *dev)
Definition: xslibusb.h:26
libUSB_get_active_config_descriptor get_active_config_descriptor
Definition: xslibusb.h:69
libUSB_release_interface * release_interface
Definition: xslibusb.h:94
int libUSB_init(libusb_context **ctx)
Definition: xslibusb.h:16
libUSB_free_config_descriptor * free_config_descriptor
Definition: xslibusb.h:96
uint8_t libUSB_get_bus_number(libusb_device *dev)
Definition: xslibusb.h:36
int libUSB_release_interface(libusb_device_handle *dev, int interface_number)
Definition: xslibusb.h:30
libUSB_bulk_transfer bulk_transfer
Definition: xslibusb.h:78
libUSB_ref_device ref_device
Definition: xslibusb.h:65



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 8fe78517f Sun Jul 14 19:43:28 2019 +0200 at lun oct 28 02:10:00 CET 2019