36#define XRT_SYSTEM_ID 1
38#define XRT_MAX_SYSTEM_NAME_SIZE 256
46 char name[XRT_MAX_SYSTEM_NAME_SIZE];
141#define XRT_SYSTEM_MAX_DEVICES (32)
206#define XRT_SYSTEM_ROLES_INIT \
208 0, -1, -1, -1, XRT_DEVICE_INVALID, XRT_DEVICE_INVALID, XRT_DEVICE_INVALID, \
343 return xsysd->
get_roles(xsysd, out_roles);
#define XRT_SYSTEM_MAX_DEVICES
Maximum number of devices simultaneously usable by an implementation of xrt_system_devices.
Definition: xrt_system.h:141
enum xrt_result xrt_result_t
Result type used across Monado.
Main compositor server interface.
Definition: xrt_compositor.h:2224
A single HMD or input device.
Definition: xrt_device.h:241
This interface acts as a root object for Monado.
Definition: xrt_instance.h:114
Session information, mostly overlay extension data.
Definition: xrt_compositor.h:930
The XRT representation of XrSession, this object does not have all of the functionality of a session,...
Definition: xrt_session.h:246
A collection of xrt_device, and an interface for identifying the roles they have been assigned.
Definition: xrt_system.h:219
static 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:354
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:312
size_t xdev_count
The number of elements in xdevs that are valid.
Definition: xrt_system.h:231
static 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:341
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:303
static 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:367
void(* destroy)(struct xrt_system_devices *xsysd)
Destroy all the devices that are owned by this system devices.
Definition: xrt_system.h:330
struct xrt_device * head
An observing pointer to the device serving as the "head" (and HMD).
Definition: xrt_system.h:248
struct xrt_device * face
An observing pointer to the device providing face tracking (optional).
Definition: xrt_system.h:260
struct xrt_device * eyes
An observing pointer to the device providing eye tracking (optional).
Definition: xrt_system.h:254
struct xrt_device * xdevs[(32)]
All devices known in the system.
Definition: xrt_system.h:226
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:321
struct xrt_device * left
An observing pointer to the device providing hand tracking for the left hand (optional).
Definition: xrt_system.h:282
struct xrt_system_devices::@239 static_roles
Observing pointers for devices in some static (unchangeable) roles.
struct xrt_system_devices::@239::@240 hand_tracking
Devices providing optical (or otherwise more directly measured than from controller estimation) hand ...
struct xrt_device * right
An observing pointer to the device providing hand tracking for the right hand (optional).
Definition: xrt_system.h:291
struct xrt_device * body
An observing pointer to the device providing body tracking (optional).
Definition: xrt_system.h:266
static 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:383
Properties provided by the system.
Definition: xrt_system.h:44
Data associating a device index (in xrt_system_devices::xdevs) with a given "role" for dynamic role s...
Definition: xrt_system.h:161
int32_t right
Index in xrt_system_devices::xdevs for the user's right controller/hand, or negative if none availabl...
Definition: xrt_system.h:184
uint64_t generation_id
Monotonically increasing generation counter for the association between role and index.
Definition: xrt_system.h:172
int32_t gamepad
Index in xrt_system_devices::xdevs for the user's gamepad device, or negative if none available.
Definition: xrt_system.h:190
int32_t left
Index in xrt_system_devices::xdevs for the user's left controller/hand, or negative if none available...
Definition: xrt_system.h:178
A system is a collection of devices, policies and optionally a compositor that is organised into a ch...
Definition: xrt_system.h:62
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:72
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:98
static void xrt_system_destroy(struct xrt_system **xsys_ptr)
Destroy an xrt_system - helper function.
Definition: xrt_system.h:117
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:85
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:712
Header defining an xrt display or controller device.
xrt_device_feature_type
Higher level features for devices.
Definition: xrt_device.h:226