Monado OpenXR Runtime
u_system_helpers.c File Reference

Helpers for system objects like xrt_system_devices. More...

#include "xrt/xrt_device.h"
#include "xrt/xrt_prober.h"
#include "util/u_misc.h"
#include "util/u_device.h"
#include "util/u_logging.h"
#include "util/u_system_helpers.h"
#include <assert.h>
#include <limits.h>
#include <inttypes.h>
Include dependency graph for u_system_helpers.c:

Functions

static int32_t get_index_for_device (const struct xrt_system_devices *xsysd, const struct xrt_device *xdev)
 
static void destroy (struct xrt_system_devices *xsysd)
 
static xrt_result_t get_roles (struct xrt_system_devices *xsysd, struct xrt_system_roles *out_roles)
 
struct u_system_devicesu_system_devices_allocate (void)
 Allocates a empty u_system_devices to be filled in by the caller, only the destroy function is filled in. More...
 
void u_system_devices_close (struct xrt_system_devices *xsysd)
 Destroys all devices and clears out the frame context, doesn't free the struct itself, useful for code embedding the system devices struct into other objects where it's not the first member or C++ classes. More...
 
struct u_system_devices_staticu_system_devices_static_allocate (void)
 Allocates a empty u_system_devices to be filled in by the caller, only the destroy function is filled in. More...
 
void u_system_devices_static_finalize (struct u_system_devices_static *usysds, struct xrt_device *left, struct xrt_device *right)
 Finalizes the static struct with the given input devices, the system devices will always return these devices for the left and right role. More...
 
xrt_result_t u_system_devices_create_from_prober (struct xrt_instance *xinst, struct xrt_session_event_sink *broadcast, struct xrt_system_devices **out_xsysd, struct xrt_space_overseer **out_xso)
 Takes a xrt_instance, gets the prober from it and then uses the prober to allocate a filled in u_system_devices. More...
 
struct xrt_deviceu_system_devices_get_ht_device (struct xrt_system_devices *xsysd, enum xrt_input_name name)
 Helper function. More...
 

Detailed Description

Helpers for system objects like xrt_system_devices.

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