141 uint64_t generation_id,
201 return xic->
get_info(xic, out_info);
211 uint64_t generation_id,
270XRT_NONNULL_ALL
static inline void
static struct u_space * create_space(enum u_space_type type, struct u_space *parent)
Creates a space, returns with a reference of one.
Definition b_space_overseer.c:539
#define XRT_SYSTEM_MAX_DEVICES
Maximum number of devices simultaneously usable by an implementation of xrt_system_devices.
Definition xrt_limits.h:26
xrt_input_name
Every internal input source known to monado with a baked in type.
Definition xrt_defines.h:952
enum xrt_result xrt_result_t
Result type used across Monado.
xrt_output_name
Name of a output with a baked in type.
Definition xrt_defines.h:1636
static struct device_info get_info(ohmd_device *dev, const char *prod)
Definition oh_device.c:536
A unique identifier for an xrt_device instance.
Definition xrt_device.h:47
Per-device layout entry describing where a device's inputs and outputs sit in the flattened cache arr...
Definition xrt_io_cache.h:31
uint32_t input_count
Number of inputs contributed by this device.
Definition xrt_io_cache.h:45
XRT_ALIGNAS(8) char str[XRT_DEVICE_NAME_LEN]
Human-readable device name string.
uint32_t first_input
Index of this device's first input in the flattened input array.
Definition xrt_io_cache.h:42
uint32_t first_output
Index of this device's first output in the flattened output array.
Definition xrt_io_cache.h:48
struct xrt_device_id id
Unique identifier for this device.
Definition xrt_io_cache.h:33
uint32_t output_count
Number of outputs contributed by this device.
Definition xrt_io_cache.h:51
Snapshot of the cache layout.
Definition xrt_io_cache.h:75
XRT_ALIGNAS(8) uint32_t device_count
Number of entries in devices that are valid.
uint64_t generation_id
Monotonically increasing layout generation; changes when devices, their input/output counts,...
Definition xrt_io_cache.h:80
A cache of flattened device inputs and outputs.
Definition xrt_io_cache.h:116
xrt_result_t(* get_output_limits)(struct xrt_io_cache *xic, struct xrt_device_id id, struct xrt_output_limits *out_limits)
Query the (device-wide) output limits for a device.
Definition xrt_io_cache.h:181
xrt_result_t(* create_space)(struct xrt_io_cache *xic, struct xrt_device_id id, enum xrt_input_name name, struct xrt_space **out_space)
Create a space for an input on a specific device.
Definition xrt_io_cache.h:156
void(* destroy)(struct xrt_io_cache *xic)
Destroy this cache.
Definition xrt_io_cache.h:190
xrt_result_t(* get_info)(struct xrt_io_cache *xic, struct xrt_io_cache_info *out_info)
Query the current cache layout.
Definition xrt_io_cache.h:123
static XRT_NONNULL_ALL xrt_result_t xrt_io_cache_get_info(struct xrt_io_cache *xic, struct xrt_io_cache_info *out_info)
Query the current cache layout.
Definition xrt_io_cache.h:199
static xrt_result_t xrt_io_cache_read(struct xrt_io_cache *xic, uint64_t generation_id, uint32_t input_count, struct xrt_input *inputs, uint32_t output_count, struct xrt_output *outputs, bool *out_stale)
Read the current input and output values into caller-provided arrays.
Definition xrt_io_cache.h:210
static XRT_NONNULL_ALL void xrt_io_cache_destroy(struct xrt_io_cache **xic_ptr)
Destroy an xrt_io_cache - helper function.
Definition xrt_io_cache.h:271
static XRT_NONNULL_ALL xrt_result_t xrt_io_cache_create_space(struct xrt_io_cache *xic, struct xrt_device_id id, enum xrt_input_name name, struct xrt_space **out_space)
Create a space for an input on a specific device.
Definition xrt_io_cache.h:227
static XRT_NONNULL_ALL xrt_result_t xrt_io_cache_get_output_limits(struct xrt_io_cache *xic, struct xrt_device_id id, struct xrt_output_limits *out_limits)
Query the (device-wide) output limits for a device.
Definition xrt_io_cache.h:255
static XRT_NONNULL_ALL xrt_result_t xrt_io_cache_set_output(struct xrt_io_cache *xic, struct xrt_device_id id, enum xrt_output_name name, const struct xrt_output_value *value)
Set an output value on a specific device.
Definition xrt_io_cache.h:241
xrt_result_t(* read)(struct xrt_io_cache *xic, uint64_t generation_id, uint32_t input_count, struct xrt_input *inputs, uint32_t output_count, struct xrt_output *outputs, bool *out_stale)
Read the current input and output values into caller-provided arrays.
Definition xrt_io_cache.h:140
xrt_result_t(* set_output)(struct xrt_io_cache *xic, struct xrt_device_id id, enum xrt_output_name name, const struct xrt_output_value *value)
Set an output value on a specific device.
Definition xrt_io_cache.h:169
Output limits of a particular device.
Definition xrt_device.h:314
A union of all output types.
Definition xrt_defines.h:2413
A single named output, that sits on a xrt_device.
Definition xrt_device.h:254
Object that oversees and manages spaces, one created for each XR system.
Definition xrt_space.h:97
A space very similar to a OpenXR XrSpace but not a full one-to-one mapping, but used to power XrSpace...
Definition xrt_space.h:32
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:758
Header defining an xrt display or controller device.
Header for limits of the XRT interfaces.
Internal result type for XRT.