12 #include "xrt/xrt_config_have.h" 18 #ifdef XRT_HAVE_LIBUSB 19 #include <libusb-1.0/libusb.h> 22 #ifdef XRT_HAVE_LIBUVC 23 #include <libuvc/libuvc.h> 33 #define P_SPEW(p, ...) \ 35 if (p->print_spew) { \ 36 fprintf(stderr, "%s - ", __func__); \ 37 fprintf(stderr, __VA_ARGS__); \ 38 fprintf(stderr, "\n"); \ 42 #define P_DEBUG(p, ...) \ 44 if (p->print_debug) { \ 45 fprintf(stderr, "%s - ", __func__); \ 46 fprintf(stderr, __VA_ARGS__); \ 47 fprintf(stderr, "\n"); \ 51 #define P_ERROR(p, ...) \ 53 fprintf(stderr, "%s - ", __func__); \ 54 fprintf(stderr, __VA_ARGS__); \ 55 fprintf(stderr, "\n"); \ 58 #define MAX_AUTO_PROBERS 8 96 const char *manufacturer;
104 #ifdef XRT_HAVE_LIBUSB 114 #ifdef XRT_HAVE_LIBUVC 123 struct prober_v4l *v4ls;
126 struct prober_hidraw *hidraws;
141 #ifdef XRT_HAVE_LIBUSB 145 libusb_device **
list;
150 #ifdef XRT_HAVE_LIBUVC 229 #ifdef XRT_HAVE_LIBUSB 243 unsigned char *buffer,
250 #ifdef XRT_HAVE_LIBUVC 261 #ifdef XRT_HAVE_LIBUDEV int p_tracking_init(struct prober *p)
Init the tracking factory.
Definition: p_tracking.c:288
Auto detect OS and certain features.
size_t num_devices
Definition: p_prober.h:161
bool print_spew
Definition: p_prober.h:168
bool print_debug
Definition: p_prober.h:167
uint16_t vendor_id
Definition: xrt_prober.h:50
struct prober_device * devices
Definition: p_prober.h:162
size_t num_entries
Definition: p_prober.h:164
struct cJSON cJSON
Definition: xrt_prober.h:26
uint16_t addr
Definition: p_prober.h:92
int p_libuvc_init(struct prober *p)
Definition: p_libuvc.c:19
void p_libusb_teardown(struct prober *p)
Definition: p_libusb.c:25
xrt_prober_string
String descriptor types.
Definition: xrt_prober.h:107
Common settings structs to be transferred between different parts of Monadon.
uint16_t bus
Definition: p_prober.h:91
Common interface to probe for devices.
cJSON * root
Definition: p_prober.h:138
int p_libusb_get_string_descriptor(struct prober *p, struct prober_device *pdev, enum xrt_prober_string which_string, unsigned char *buffer, int length)
Definition: p_libusb.c:124
The main prober that probes and manages found but not opened HMD devices that are connected to the sy...
Definition: xrt_prober.h:153
void p_dump_device(struct prober *p, struct prober_device *pdev, int id)
Dump the given device to stdout.
Definition: p_dump.c:66
Main root of all of the probing device.
Definition: xrt_prober.h:75
void p_libuvc_teardown(struct prober *p)
Definition: p_libuvc.c:25
A simple prober to probe for a HMD device connected to the system.
Definition: xrt_prober.h:339
uint64_t id
Definition: p_prober.h:111
uint32_t num_ports
Definition: p_prober.h:102
void p_tracking_teardown(struct prober *p)
Teardown the tracking factory.
Definition: p_tracking.c:320
struct xrt_prober_entry_lists list
Definition: cli_prober.c:37
Entry for a single device.
Definition: xrt_prober.h:48
bool p_json_get_tracking_settings(cJSON *root, struct xrt_settings_tracking *s)
Extract tracking settings from the JSON.
Definition: p_json.c:131
int p_libusb_init(struct prober *p)
Definition: p_libusb.c:19
A prober device.
Definition: p_prober.h:85
Holding enough information to recreate a tracking pipeline.
Definition: xrt_settings.h:42
int p_dev_get_usb_dev(struct prober *p, uint16_t bus, uint16_t addr, uint16_t vendor_id, uint16_t product_id, struct prober_device **out_pdev)
Get or create a prober_device from the device.
Definition: p_prober.c:151
Definition: p_prober.h:130
struct xrt_prober_entry ** entries
Definition: p_prober.h:165
int p_dev_get_bluetooth_dev(struct prober *p, uint64_t id, uint16_t vendor_id, uint16_t product_id, struct prober_device **out_pdev)
Get or create a prober_device from the device.
Definition: p_prober.c:196
#define MAX_AUTO_PROBERS
Definition: p_prober.h:58
Header holding common defines.
int p_libuvc_probe(struct prober *p)
Definition: p_libuvc.c:40
cJSON * p_json_open_or_create_main_file(void)
Load the JSON config file.
Definition: p_json.c:47
int p_libusb_probe(struct prober *p)
Definition: p_libusb.c:40
A probed device, may or may not be opened.
Definition: xrt_prober.h:125
uint16_t product_id
Definition: xrt_prober.h:51
int p_udev_probe(struct prober *p)
Definition: p_udev.c:136
struct xrt_prober_entry_lists * lists
Definition: p_prober.h:134
bool p_libusb_can_open(struct prober *p, struct prober_device *pdev)
Definition: p_libusb.c:173