Monado OpenXR Runtime
|
Main prober code. More...
#include "xrt/xrt_config_have.h"
#include "xrt/xrt_config_os.h"
#include "xrt/xrt_compiler.h"
#include "xrt/xrt_prober.h"
#include "xrt/xrt_settings.h"
Go to the source code of this file.
Data Structures | |
struct | prober_device |
A prober device. More... | |
struct | prober |
Macros | |
#define | P_SPEW(p, ...) |
#define | P_DEBUG(p, ...) |
#define | P_ERROR(p, ...) |
#define | MAX_AUTO_PROBERS 8 |
Functions | |
cJSON * | p_json_open_or_create_main_file (void) |
Load the JSON config file. More... | |
bool | p_json_get_tracking_settings (cJSON *root, struct xrt_settings_tracking *s) |
Extract tracking settings from the JSON. More... | |
void | p_dump_device (struct prober *p, struct prober_device *pdev, int id) |
Dump the given device to stdout. More... | |
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. More... | |
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. More... | |
int | p_tracking_init (struct prober *p) |
Init the tracking factory. More... | |
void | p_tracking_teardown (struct prober *p) |
Teardown the tracking factory. More... | |
Main prober code.
#define MAX_AUTO_PROBERS 8 |
#define P_DEBUG | ( | p, | |
... | |||
) |
#define P_ERROR | ( | p, | |
... | |||
) |
Referenced by p_dev_get_bluetooth_dev(), p_dev_get_usb_dev(), p_libusb_can_open(), p_libusb_get_string_descriptor(), p_libusb_probe(), p_libuvc_probe(), and p_udev_probe().
#define P_SPEW | ( | p, | |
... | |||
) |
Referenced by p_libusb_probe(), and p_libuvc_probe().
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.
References prober_device::base, prober_device::bluetooth, xrt_prober_device::bus, prober::devices, prober_device::id, prober::num_devices, P_ERROR, xrt_prober_device::product_id, xrt_prober_device::vendor_id, and XRT_BUS_TYPE_BLUETOOTH.
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.
References prober_device::addr, prober_device::base, prober_device::bus, xrt_prober_device::bus, prober::devices, prober::num_devices, P_ERROR, xrt_prober_device::product_id, prober_device::usb, xrt_prober_device::vendor_id, and XRT_BUS_TYPE_USB.
Referenced by p_libusb_probe(), and p_libuvc_probe().
void p_dump_device | ( | struct prober * | p, |
struct prober_device * | pdev, | ||
int | id | ||
) |
Dump the given device to stdout.
References prober_device::addr, prober_device::base, prober_device::bus, xrt_prober_device::product_id, prober_device::usb, and xrt_prober_device::vendor_id.
bool p_json_get_tracking_settings | ( | cJSON * | root, |
struct xrt_settings_tracking * | s | ||
) |
Extract tracking settings from the JSON.
cJSON* p_json_open_or_create_main_file | ( | void | ) |
Load the JSON config file.
References read_content(), and u_file_open_file_in_config_dir().
int p_tracking_init | ( | struct prober * | p | ) |
Init the tracking factory.
References p_factory::base, xrt_tracking_factory::create_tracked_psmv, U_TYPED_CALLOC, p_factory::xfctx, and xrt_tracking_factory::xfctx.
void p_tracking_teardown | ( | struct prober * | p | ) |
Teardown the tracking factory.
References prober::base, and xrt_prober::tracking.