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



Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020