37#define XRT_SYSTEM_ID 1
39#define XRT_MAX_SYSTEM_NAME_SIZE 256
47 char name[XRT_MAX_SYSTEM_NAME_SIZE];
118XRT_NONNULL_ALL
static inline void
202#define XRT_SYSTEM_ROLES_INIT \
204 0, -1, -1, -1, XRT_DEVICE_INVALID, XRT_DEVICE_INVALID, XRT_DEVICE_INVALID, \
374 return xsysd->
get_roles(xsysd, out_roles);
426XRT_NONNULL_ALL
static inline void
#define XRT_SYSTEM_MAX_DEVICES
Maximum number of devices simultaneously usable by an implementation of xrt_system_devices.
Definition xrt_limits.h:26
xrt_form_factor
What form factor is this device, mostly maps onto OpenXR's XrFormFactor.
Definition xrt_defines.h:2408
enum xrt_result xrt_result_t
Result type used across Monado.
Main compositor server interface.
Definition xrt_compositor.h:2268
A single HMD or input device.
Definition xrt_device.h:311
Creation parameters for xrt_hand_tracker.
Definition xrt_hand_tracker.h:35
A hand tracker that owns device/source selection policy.
Definition xrt_hand_tracker.h:76
This interface acts as a root object for Monado.
Definition xrt_instance.h:121
Session information, mostly overlay extension data.
Definition xrt_compositor.h:956
The XRT representation of XrSession, this object does not have all of the functionality of a session,...
Definition xrt_session.h:277
A collection of xrt_device, and an interface for identifying the roles they have been assigned.
Definition xrt_system.h:215
xrt_result_t(* feature_inc)(struct xrt_system_devices *xsysd, enum xrt_device_feature_type type)
Increment the usage count of a feature.
Definition xrt_system.h:343
xrt_result_t(* get_roles)(struct xrt_system_devices *xsysd, struct xrt_system_roles *out_roles)
Function to get the dynamic input device roles from this system devices, see xrt_system_roles for mor...
Definition xrt_system.h:323
static XRT_NONNULL_ALL void xrt_system_devices_destroy(struct xrt_system_devices **xsysd_ptr)
Destroy an xrt_system_devices and owned devices - helper function.
Definition xrt_system.h:427
void(* destroy)(struct xrt_system_devices *xsysd)
Destroy all the devices that are owned by this system devices.
Definition xrt_system.h:361
size_t static_xdev_count
The number of elements in static_xdevs that are valid in the static device list.
Definition xrt_system.h:228
struct xrt_device * head
An observing pointer to the device serving as the "head" (and HMD).
Definition xrt_system.h:245
struct xrt_device * face
An observing pointer to the device providing face tracking (optional).
Definition xrt_system.h:257
struct xrt_device * eyes
An observing pointer to the device providing eye tracking (optional).
Definition xrt_system.h:251
static XRT_NONNULL_ALL xrt_result_t xrt_system_devices_feature_dec(struct xrt_system_devices *xsysd, enum xrt_device_feature_type type)
Decrement the usage count of a feature.
Definition xrt_system.h:411
xrt_result_t(* feature_dec)(struct xrt_system_devices *xsysd, enum xrt_device_feature_type type)
Decrement the usage count of a feature.
Definition xrt_system.h:352
xrt_result_t(* create_hand_tracker)(struct xrt_system_devices *xsysd, const struct xrt_hand_tracker_create_info *info, struct xrt_hand_tracker **out_xht)
Create a xrt_hand_tracker from this system devices object.
Definition xrt_system.h:332
static XRT_NONNULL_ALL xrt_result_t xrt_system_devices_create_hand_tracker(struct xrt_system_devices *xsysd, const struct xrt_hand_tracker_create_info *info, struct xrt_hand_tracker **out_xht)
Create a xrt_hand_tracker from this system devices object.
Definition xrt_system.h:383
struct xrt_device * left
An observing pointer to the device providing unobstructed hand-tracking for the left hand (optional).
Definition xrt_system.h:280
static XRT_NONNULL_ALL xrt_result_t xrt_system_devices_get_roles(struct xrt_system_devices *xsysd, struct xrt_system_roles *out_roles)
Function to get the dynamic input device roles from this system devices, see xrt_system_roles for mor...
Definition xrt_system.h:372
struct xrt_device * right
An observing pointer to the device providing unobstructed hand-tracking for the right hand (optional)...
Definition xrt_system.h:289
struct xrt_device * body
An observing pointer to the device providing body tracking (optional).
Definition xrt_system.h:263
static XRT_NONNULL_ALL xrt_result_t xrt_system_devices_feature_inc(struct xrt_system_devices *xsysd, enum xrt_device_feature_type type)
Increment the usage count of a feature.
Definition xrt_system.h:398
Properties provided by the system.
Definition xrt_system.h:45
Data associating a device index (in xrt_system_devices::static_xdevs) with a given "role" for dynamic...
Definition xrt_system.h:155
int32_t right
Index in xrt_system_devices::static_xdevs for the user's right controller/hand, or negative if none a...
Definition xrt_system.h:180
XRT_ALIGNAS(8) uint64_t generation_id
Monotonically increasing generation counter for the association between role and index.
int32_t gamepad
Index in xrt_system_devices::static_xdevs for the user's gamepad device, or negative if none availabl...
Definition xrt_system.h:186
int32_t left
Index in xrt_system_devices::static_xdevs for the user's left controller/hand, or negative if none av...
Definition xrt_system.h:174
A system is a collection of devices, policies and optionally a compositor that is organised into a ch...
Definition xrt_system.h:64
xrt_result_t(* create_session)(struct xrt_system *xsys, const struct xrt_session_info *xsi, struct xrt_session **out_xs, struct xrt_compositor_native **out_xcn)
Create a xrt_session and optionally a xrt_compositor_native for this system.
Definition xrt_system.h:74
static XRT_NONNULL_ALL void xrt_system_destroy(struct xrt_system **xsys_ptr)
Destroy an xrt_system - helper function.
Definition xrt_system.h:119
static xrt_result_t xrt_system_create_session(struct xrt_system *xsys, const struct xrt_session_info *xsi, struct xrt_session **out_xs, struct xrt_compositor_native **out_xcn)
Create a xrt_session and optionally a xrt_compositor_native for this system.
Definition xrt_system.h:100
void(* destroy)(struct xrt_system *xsys)
Destroy the system, must be destroyed after system devices and system compositor has been destroyed.
Definition xrt_system.h:87
Header holding common defines.
Common defines and enums for XRT.
xrt_device_name
A enum that is used to name devices so that the state trackers can reason about the devices easier.
Definition xrt_defines.h:737
Header defining an xrt display or controller device.
xrt_device_feature_type
Higher level features for devices.
Definition xrt_device.h:254
Header defining xrt hand tracker.
Header for limits of the XRT interfaces.