Monado OpenXR Runtime
xrt_builder Struct Reference

Sets up a collection of devices and builds a system, a setter upper. More...

#include <xrt/xrt_prober.h>

Collaboration diagram for xrt_builder:

Public Member Functions

static xrt_result_t xrt_builder_estimate_system (struct xrt_builder *xb, cJSON *config, struct xrt_prober *xp, struct xrt_builder_estimate *out_estimate)
 From the devices found, estimate without opening the devices how good the system will be. More...
 
static xrt_result_t xrt_builder_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)
 We are now committed to opening these devices. More...
 
static void xrt_builder_destroy (struct xrt_builder **xb_ptr)
 Destroy this setter upper. More...
 

Data Fields

const char * identifier
 Short identifier, like "vive", "north_star", "rgb_tracking". More...
 
const char * name
 "Localized" pretty name. More...
 
const char ** driver_identifiers
 List of identifiers for drivers this setter-upper uses/supports. More...
 
size_t driver_identifier_count
 Number of driver identifiers. More...
 
bool exclude_from_automatic_discovery
 Should this builder be excluded from automatic discovery. More...
 
xrt_result_t(* estimate_system )(struct xrt_builder *xb, cJSON *config, struct xrt_prober *xp, struct xrt_builder_estimate *out_estimate)
 From the devices found, estimate without opening the devices how good the system will be. More...
 
xrt_result_t(* 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)
 We are now committed to opening these devices. More...
 
void(* destroy )(struct xrt_builder *xb)
 Destroy this setter upper. More...
 

Detailed Description

Sets up a collection of devices and builds a system, a setter upper.

Member Function Documentation

◆ xrt_builder_destroy()

static void xrt_builder_destroy ( struct xrt_builder **  xb_ptr)
inline

Destroy this setter upper.

Note
Code consuming this interface should use xrt_builder_destroy()

Helper for calling through the function pointer: does a null check and sets xb_ptr to null if freed.

References destroy.

◆ xrt_builder_estimate_system()

static xrt_result_t xrt_builder_estimate_system ( struct xrt_builder xb,
cJSON *  config,
struct xrt_prober xp,
struct xrt_builder_estimate out_estimate 
)
inline

From the devices found, estimate without opening the devices how good the system will be.

Parameters
[in]xbBuilder self parameter.
[in]xpProber
[in]configJSON config object if found for this setter upper.
[out]out_estimateEstimate to be filled out.
Note
Code consuming this interface should use xrt_builder_estimate_system()

Helper function for xrt_builder::estimate_system.

References estimate_system.

◆ xrt_builder_open_system()

static xrt_result_t xrt_builder_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 
)
inline

We are now committed to opening these devices.

Parameters
[in]xbBuilder self parameter.
[in]xpProber
[in]configJSON config object if found for this setter upper.
[in]broadcastEvent sink that broadcasts events to all sessions.
[out]out_xsysdReturn of system devices, the pointed pointer must be NULL.
[out]out_xsoReturn of the xrt_space_overseer, the pointed pointer must be NULL.
Note
Code consuming this interface should use xrt_builder_open_system()

Helper function for xrt_builder::open_system.

References open_system.

Field Documentation

◆ destroy

void(* xrt_builder::destroy) (struct xrt_builder *xb)

Destroy this setter upper.

Note
Code consuming this interface should use xrt_builder_destroy()

Referenced by xrt_builder_destroy().

◆ driver_identifier_count

size_t xrt_builder::driver_identifier_count

Number of driver identifiers.

◆ driver_identifiers

const char** xrt_builder::driver_identifiers

List of identifiers for drivers this setter-upper uses/supports.

◆ estimate_system

xrt_result_t(* xrt_builder::estimate_system) (struct xrt_builder *xb, cJSON *config, struct xrt_prober *xp, struct xrt_builder_estimate *out_estimate)

From the devices found, estimate without opening the devices how good the system will be.

Parameters
[in]xbBuilder self parameter.
[in]xpProber
[in]configJSON config object if found for this setter upper.
[out]out_estimateEstimate to be filled out.
Note
Code consuming this interface should use xrt_builder_estimate_system()

Referenced by rift_s_builder_create(), t_builder_legacy_create(), t_builder_lighthouse_create(), t_builder_north_star_create(), t_builder_qwerty_create(), t_builder_remote_create(), t_builder_rgb_tracking_create(), t_builder_simula_create(), t_builder_simulated_create(), t_builder_steamvr_create(), t_builder_wmr_create(), xreal_air_builder_create(), and xrt_builder_estimate_system().

◆ exclude_from_automatic_discovery

bool xrt_builder::exclude_from_automatic_discovery

Should this builder be excluded from automatic discovery.

◆ identifier

const char* xrt_builder::identifier

Short identifier, like "vive", "north_star", "rgb_tracking".

◆ name

◆ open_system

xrt_result_t(* xrt_builder::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)

We are now committed to opening these devices.

Parameters
[in]xbBuilder self parameter.
[in]xpProber
[in]configJSON config object if found for this setter upper.
[in]broadcastEvent sink that broadcasts events to all sessions.
[out]out_xsysdReturn of system devices, the pointed pointer must be NULL.
[out]out_xsoReturn of the xrt_space_overseer, the pointed pointer must be NULL.
Note
Code consuming this interface should use xrt_builder_open_system()

Referenced by xrt_builder_open_system().


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