|
Monado OpenXR Runtime
|


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. | |
| 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. | |
| 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. | |
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 an xrt_prober_device to. | |
| XRT_NONNULL_ALL 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. | |
Data Fields | ||
| struct xrt_prober | base | |
| struct xrt_prober_entry_lists * | lists | |
| struct u_config_json | json | |
| struct xrt_builder ** | builders | |
| List of created builder. | ||
| size_t | builder_count | |
| The number of created builders. | ||
| bool | list_locked | |
| Has the list been locked. | ||
| 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_prober * | auto_probers [XRT_MAX_AUTO_PROBERS] | |
| size_t | device_count | |
| struct prober_device * | devices | |
| 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_factory * | tracking | |
| Factory for producing tracked objects. | ||
| xrt_result_t(* | probe )(struct xrt_prober *xp) | |
| Enumerate all connected devices, whether or not we have an associated driver. | ||
| 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. | ||
| 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. | ||
| 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). | ||
| 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. | ||
| 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. | ||
| 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. | ||
| 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. | ||
| 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. | ||
| 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. | ||
| 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. | ||
| bool(* | can_open )(struct xrt_prober *xp, struct xrt_prober_device *xpdev) | |
| Determine whether a prober device can be opened. | ||
| void(* | destroy )(struct xrt_prober **xp_ptr) | |
| Destroy the prober and set the pointer to null. | ||
Additional Inherited Members | |
Static Public Member Functions inherited from xrt_prober | |
| static XRT_NONNULL_ALL xrt_result_t | xrt_prober_probe (struct xrt_prober *xp) |
| Enumerate all connected devices, whether or not we have an associated driver. | |
| static XRT_NONNULL_ALL 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. | |
| static XRT_NONNULL_ALL 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. | |
| static XRT_NONNULL_ALL 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). | |
| static XRT_NONNULL_ALL 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. | |
| static XRT_NONNULL_ALL 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. | |
| static XRT_NONNULL_ALL 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. | |
| static XRT_NONNULL_ALL 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. | |
| static XRT_NONNULL_ALL bool | xrt_prober_can_open (struct xrt_prober *xp, struct xrt_prober_device *xpdev) |
| Determine whether a prober device can be opened. | |
| static XRT_NONNULL_FIRST 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. | |
| 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. | |
| static XRT_NONNULL_ALL 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. | |
| static XRT_NONNULL_ALL void | xrt_prober_destroy (struct xrt_prober **xp_ptr) |
| Destroy the prober and set the pointer to null. | |
| 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 ARRAY_SIZE, xrt_prober_device::bus, xrt_prober_device::product_id, and xrt_prober_device::vendor_id.
| 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, xrt_prober_device::product_id, and xrt_prober_device::vendor_id.
| void p_dump_device | ( | struct prober * | p, |
| struct prober_device * | pdev, | ||
| int | id, | ||
| bool | use_stdout | ||
| ) |
Dump the given device to stdout.
References ARRAY_SIZE, u_pp_sink_stack_only::buffer, xrt_prober_device::product_id, U_LOG_RAW, xrt_prober_device::usb_dev_class, and xrt_prober_device::vendor_id.
| size_t prober::builder_count |
The number of created builders.
Referenced by p_create_system().
| struct xrt_builder** prober::builders |
List of created builder.
Referenced by p_create_system().
| bool prober::list_locked |
Has the list been locked.