37#define XRT_SYSTEM_ID 1
39#define XRT_MAX_SYSTEM_NAME_SIZE 256
47 char name[XRT_MAX_SYSTEM_NAME_SIZE];
142#define XRT_SYSTEM_MAX_DEVICES (32)
209#define XRT_SYSTEM_ROLES_INIT \
211 0, -1, -1, -1, XRT_DEVICE_INVALID, XRT_DEVICE_INVALID, XRT_DEVICE_INVALID, \
346 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:142
enum xrt_result xrt_result_t
Result type used across Monado.
Main compositor server interface.
Definition: xrt_compositor.h:2233
A single HMD or input device.
Definition: xrt_device.h:244
This interface acts as a root object for Monado.
Definition: xrt_instance.h:114
Session information, mostly overlay extension data.
Definition: xrt_compositor.h:935
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:222
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:357
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:315
size_t xdev_count
The number of elements in xdevs that are valid.
Definition: xrt_system.h:234
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:344
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:306
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:370
void(* destroy)(struct xrt_system_devices *xsysd)
Destroy all the devices that are owned by this system devices.
Definition: xrt_system.h:333
struct xrt_device * head
An observing pointer to the device serving as the "head" (and HMD).
Definition: xrt_system.h:251
struct xrt_device * face
An observing pointer to the device providing face tracking (optional).
Definition: xrt_system.h:263
struct xrt_device * eyes
An observing pointer to the device providing eye tracking (optional).
Definition: xrt_system.h:257
struct xrt_device * xdevs[(32)]
All devices known in the system.
Definition: xrt_system.h:229
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:324
struct xrt_device * left
An observing pointer to the device providing hand tracking for the left hand (optional).
Definition: xrt_system.h:285
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:294
struct xrt_device * body
An observing pointer to the device providing body tracking (optional).
Definition: xrt_system.h:269
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:386
Properties provided by the system.
Definition: xrt_system.h:45
Data associating a device index (in xrt_system_devices::xdevs) with a given "role" for dynamic role s...
Definition: xrt_system.h:162
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:187
uint64_t generation_id
Monotonically increasing generation counter for the association between role and index.
Definition: xrt_system.h:175
int32_t gamepad
Index in xrt_system_devices::xdevs for the user's gamepad device, or negative if none available.
Definition: xrt_system.h:193
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:181
A system is a collection of devices, policies and optionally a compositor that is organised into a ch...
Definition: xrt_system.h:63
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:73
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:99
static void xrt_system_destroy(struct xrt_system **xsys_ptr)
Destroy an xrt_system - helper function.
Definition: xrt_system.h:118
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:86
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:229