Monado OpenXR Runtime
u_builders.h File Reference

Helpers for xrt_builder implementations. More...

#include "xrt/xrt_space.h"
#include "xrt/xrt_prober.h"
Include dependency graph for u_builders.h:

Go to the source code of this file.

Data Structures

struct  u_builder_search_filter
 A filter to match the against. More...
 
struct  u_builder_search_results
 Results of a search of devices. More...
 
struct  u_builder_roles_helper
 This small helper struct is for u_builder_roles_helper_open_system, lets a builder focus on opening devices rather then dealing with Monado structs like xrt_system_devices and the like. More...
 
struct  u_builder
 This helper struct makes it easier to implement the builder interface, but it also comes with a set of integration that may not be what all builders want. More...
 

Macros

#define U_BUILDER_SEARCH_MAX   (16)
 Max return of the number xrt_prober_device. More...
 

Typedefs

typedef xrt_result_t(* u_builder_open_system_fn) (struct xrt_builder *xb, cJSON *config, struct xrt_prober *xp, struct xrt_tracking_origin *origin, struct xrt_system_devices *xsysd, struct xrt_frame_context *xfctx, struct u_builder_roles_helper *ubrh)
 Argument to u_builder_roles_helper_open_system and implemented by u_builder::open_system_static_roles function. More...
 

Functions

struct xrt_prober_deviceu_builder_find_prober_device (struct xrt_prober_device *const *xpdevs, size_t xpdev_count, uint16_t vendor_id, uint16_t product_id, enum xrt_bus_type bus_type)
 Find the first xrt_prober_device in the prober list. More...
 
void u_builder_search (struct xrt_prober *xp, struct xrt_prober_device *const *xpdevs, size_t xpdev_count, const struct u_builder_search_filter *filters, size_t filter_count, struct u_builder_search_results *results)
 Find all of the xrt_prober_device that matches any in the given list of u_builder_search_filter filters. More...
 
void u_builder_setup_tracking_origins (struct xrt_device *head, struct xrt_device *left, struct xrt_device *right, struct xrt_vec3 *global_tracking_origin_offset)
 Helper function for setting up tracking origins. More...
 
void u_builder_create_space_overseer_legacy (struct xrt_session_event_sink *broadcast, struct xrt_device *head, struct xrt_device *left, struct xrt_device *right, struct xrt_device **xdevs, uint32_t xdev_count, bool root_is_unbounded, struct xrt_space_overseer **out_xso)
 Create a legacy space overseer, most builders probably want to have a more advanced setup then this, especially stand alone ones. More...
 
xrt_result_t u_builder_roles_helper_open_system (struct xrt_builder *xb, cJSON *config, struct xrt_prober *xp, struct xrt_session_event_sink *broadcast, struct xrt_system_devices **out_xsysd, struct xrt_space_overseer **out_xso, u_builder_open_system_fn fn)
 Helper to create a system devices that has static roles and a appropriate space overseer. More...
 
xrt_result_t u_builder_open_system_static_roles (struct xrt_builder *xb, cJSON *config, struct xrt_prober *xp, struct xrt_session_event_sink *broadcast, struct xrt_system_devices **out_xsysd, struct xrt_space_overseer **out_xso)
 Implementation for xrt_builder::open_system to be used with u_builder. More...
 

Detailed Description

Helpers for xrt_builder implementations.

Author
Jakob Bornecrantz jakob.nosp@m.@col.nosp@m.labor.nosp@m.a.co.nosp@m.m