Monado OpenXR Runtime
prober Struct Reference
Inheritance diagram for prober:
Collaboration diagram for prober:

Public Member Functions

void p_dump_device (struct prober *p, struct prober_device *pdev, int id, bool use_stdout)
 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, const char *product_name, struct prober_device **out_pdev)
 Get or create a prober_device from the device. More...
 
- Public Member Functions inherited from xrt_prober
bool u_prober_match_string (struct xrt_prober *xp, struct xrt_prober_device *dev, enum xrt_prober_string type, const char *to_match)
 Helper to match various strings of a xrt_prober_device to. More...
 
static xrt_result_t xrt_prober_probe (struct xrt_prober *xp)
 Enumerate all connected devices, whether or not we have an associated driver. More...
 
static xrt_result_t xrt_prober_lock_list (struct xrt_prober *xp, struct xrt_prober_device ***out_devices, size_t *out_device_count)
 Locks the prober list of probed devices and returns it. More...
 
static xrt_result_t xrt_prober_unlock_list (struct xrt_prober *xp, struct xrt_prober_device ***devices)
 Unlocks the list, allowing for xrt_prober::probe to be called. More...
 
static int xrt_prober_dump (struct xrt_prober *xp, bool use_stdout)
 Dump a listing of all devices found on the system to logging system or platform dependent output (stdout). More...
 
static xrt_result_t xrt_prober_create_system (struct xrt_prober *xp, struct xrt_session_event_sink *broadcast, struct xrt_system_devices **out_xsysd, struct xrt_space_overseer **out_xso)
 Create system devices. More...
 
static int xrt_prober_select (struct xrt_prober *xp, struct xrt_device **xdevs, size_t xdev_capacity)
 Iterate through drivers (by ID and auto-probers) checking to see if they can handle any connected devices from the last xrt_prober::probe call, opening those devices to create instances of xrt_device implementations. More...
 
static int xrt_prober_open_hid_interface (struct xrt_prober *xp, struct xrt_prober_device *xpdev, int iface, struct os_hid_device **out_hid_dev)
 Open a HID (Human Interface Device) interface using native HID support. More...
 
static int xrt_prober_get_string_descriptor (struct xrt_prober *xp, struct xrt_prober_device *xpdev, enum xrt_prober_string which_string, unsigned char *out_buffer, size_t max_length)
 Returns a string property on the device of the given type which_string in out_buffer. More...
 
static bool xrt_prober_can_open (struct xrt_prober *xp, struct xrt_prober_device *xpdev)
 Determine whether a prober device can be opened. More...
 
static int xrt_prober_open_video_device (struct xrt_prober *xp, struct xrt_prober_device *xpdev, struct xrt_frame_context *xfctx, struct xrt_fs **out_xfs)
 Opens the selected video device and returns a xrt_fs, does not start it. More...
 
static int xrt_prober_list_video_devices (struct xrt_prober *xp, xrt_prober_list_video_func_t cb, void *ptr)
 Iterate through available video devices, calling your callback cb with your userdata ptr. More...
 
static int xrt_prober_get_builders (struct xrt_prober *xp, size_t *out_builder_count, struct xrt_builder ***out_builders, size_t *out_entry_count, struct xrt_prober_entry ***out_entries, struct xrt_auto_prober ***out_auto_probers)
 Retrieve the raw xrt_builder, xrt_prober_entry and xrt_auto_prober arrays. More...
 
static void xrt_prober_destroy (struct xrt_prober **xp_ptr)
 Destroy the prober and set the pointer to null. More...
 
int xrt_prober_create_with_lists (struct xrt_prober **out_xp, struct xrt_prober_entry_lists *list)
 Create a prober with a list of known devices and autoprobers. More...
 

Data Fields

struct xrt_prober base
 
struct xrt_prober_entry_listslists
 
struct u_config_json json
 
struct xrt_builder ** builders
 List of created builder. More...
 
size_t builder_count
 The number of created builders. More...
 
bool list_locked
 Has the list been locked. More...
 
struct {
   libusb_context *   ctx
 
   libusb_device **   list
 
   ssize_t   count
 
usb
 
struct {
   uvc_context_t *   ctx
 
   uvc_device_t **   list
 
   ssize_t   count
 
uvc
 
struct xrt_auto_proberauto_probers [XRT_MAX_AUTO_PROBERS]
 
size_t device_count
 
struct prober_devicedevices
 
size_t num_entries
 
struct xrt_prober_entry ** entries
 
size_t num_disabled_drivers
 
char ** disabled_drivers
 
enum u_logging_level log_level
 
- Data Fields inherited from xrt_prober
struct xrt_tracking_factorytracking
 Factory for producing tracked objects. More...
 
xrt_result_t(* probe )(struct xrt_prober *xp)
 Enumerate all connected devices, whether or not we have an associated driver. More...
 
xrt_result_t(* lock_list )(struct xrt_prober *xp, struct xrt_prober_device ***out_devices, size_t *out_device_count)
 Locks the prober list of probed devices and returns it. More...
 
xrt_result_t(* unlock_list )(struct xrt_prober *xp, struct xrt_prober_device ***devices)
 Unlocks the list, allowing for xrt_prober::probe to be called. More...
 
int(* dump )(struct xrt_prober *xp, bool use_stdout)
 Dump a listing of all devices found on the system to logging system or platform dependent output (stdout). More...
 
xrt_result_t(* create_system )(struct xrt_prober *xp, struct xrt_session_event_sink *broadcast, struct xrt_system_devices **out_xsysd, struct xrt_space_overseer **out_xso)
 Create system devices. More...
 
int(* select )(struct xrt_prober *xp, struct xrt_device **xdevs, size_t xdev_capacity)
 Iterate through drivers (by ID and auto-probers) checking to see if they can handle any connected devices from the last xrt_prober::probe call, opening those devices to create instances of xrt_device implementations. More...
 
int(* open_hid_interface )(struct xrt_prober *xp, struct xrt_prober_device *xpdev, int iface, struct os_hid_device **out_hid_dev)
 Open a HID (Human Interface Device) interface using native HID support. More...
 
int(* open_video_device )(struct xrt_prober *xp, struct xrt_prober_device *xpdev, struct xrt_frame_context *xfctx, struct xrt_fs **out_xfs)
 Opens the selected video device and returns a xrt_fs, does not start it. More...
 
int(* list_video_devices )(struct xrt_prober *xp, xrt_prober_list_video_func_t cb, void *ptr)
 Iterate through available video devices, calling your callback cb with your userdata ptr. More...
 
int(* get_builders )(struct xrt_prober *xp, size_t *out_builder_count, struct xrt_builder ***out_builders, size_t *out_entry_count, struct xrt_prober_entry ***out_entries, struct xrt_auto_prober ***out_auto_probers)
 Retrieve the raw xrt_builder, xrt_prober_entry and xrt_auto_prober arrays. More...
 
int(* get_string_descriptor )(struct xrt_prober *xp, struct xrt_prober_device *xpdev, enum xrt_prober_string which_string, unsigned char *out_buffer, size_t max_length)
 Returns a string property on the device of the given type which_string in out_buffer. More...
 
bool(* can_open )(struct xrt_prober *xp, struct xrt_prober_device *xpdev)
 Determine whether a prober device can be opened. More...
 
void(* destroy )(struct xrt_prober **xp_ptr)
 Destroy the prober and set the pointer to null. More...
 

Member Function Documentation

◆ p_dev_get_bluetooth_dev()

int p_dev_get_bluetooth_dev ( struct prober p,
uint64_t  id,
uint16_t  vendor_id,
uint16_t  product_id,
const char *  product_name,
struct prober_device **  out_pdev 
)

Get or create a prober_device from the device.

References xrt_prober_device::bus.

◆ p_dev_get_usb_dev()

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 xrt_prober_device::bus.

◆ p_dump_device()

void p_dump_device ( struct prober p,
struct prober_device pdev,
int  id,
bool  use_stdout 
)

Dump the given device to stdout.

Field Documentation

◆ builder_count

size_t prober::builder_count

The number of created builders.

◆ builders

struct xrt_builder** prober::builders

List of created builder.

◆ list_locked

bool prober::list_locked

Has the list been locked.


The documentation for this struct was generated from the following file: