|
Monado OpenXR Runtime
|
A cache of flattened device inputs and outputs. More...
#include <xrt/xrt_io_cache.h>

Static Public Member Functions | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| static XRT_NONNULL_ALL void | xrt_io_cache_destroy (struct xrt_io_cache **xic_ptr) |
| Destroy an xrt_io_cache - helper function. | |
Data Fields | |
| xrt_result_t(* | get_info )(struct xrt_io_cache *xic, struct xrt_io_cache_info *out_info) |
| Query the current cache layout. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| void(* | destroy )(struct xrt_io_cache *xic) |
| Destroy this cache. | |
A cache of flattened device inputs and outputs.
|
inlinestatic |
Create a space for an input on a specific device.
| xic | Pointer to self. |
| id | Device to create the space on. |
| name | Input name to bind the space to. |
| out_space | Created space. |
References create_space.
|
inlinestatic |
Destroy an xrt_io_cache - helper function.
| [in,out] | xic_ptr | A pointer to the xrt_io_cache struct pointer. |
Will destroy the cache if *xic_ptr is not NULL. Will then set *xic_ptr to NULL.
References destroy.
Referenced by ipc_server_objects_destroy_xic().
|
inlinestatic |
Query the current cache layout.
| xic | Pointer to self. |
| out_info | Resulting layout snapshot. |
References get_info.
|
inlinestatic |
Query the (device-wide) output limits for a device.
| xic | Pointer to self. |
| id | Device to query. |
| out_limits | Resulting limits. |
References get_output_limits.
|
inlinestatic |
Read the current input and output values into caller-provided arrays.
| xic | Pointer to self. |
| generation_id | Layout generation from the most recent get_info call. |
| input_count | Capacity of inputs; must match the layout snapshot. |
| inputs | Output array for input values. |
| output_count | Capacity of outputs; must match the layout snapshot. |
| outputs | Output array for output metadata. |
| out_stale | Set to true when generation_id no longer matches the live layout; the arrays are not written in that case. |
input_count or output_count do not match the current layout while the generation still matches. References xrt_io_cache_device::input_count, xrt_io_cache_device::output_count, and read.
|
inlinestatic |
Set an output value on a specific device.
| xic | Pointer to self. |
| id | Device to set the output on. |
| name | Output name. |
| value | Value to write. |
References set_output.
| 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.
| xic | Pointer to self. |
| id | Device to create the space on. |
| name | Input name to bind the space to. |
| out_space | Created space. |
Referenced by xrt_io_cache_create_space().
| void(* xrt_io_cache::destroy) (struct xrt_io_cache *xic) |
Destroy this cache.
Code consuming this interface should use xrt_io_cache_destroy.
Referenced by xrt_io_cache_destroy().
| 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.
| xic | Pointer to self. |
| out_info | Resulting layout snapshot. |
Referenced by xrt_io_cache_get_info().
| 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.
| xic | Pointer to self. |
| id | Device to query. |
| out_limits | Resulting limits. |
Referenced by xrt_io_cache_get_output_limits().
| 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.
| xic | Pointer to self. |
| generation_id | Layout generation from the most recent get_info call. |
| input_count | Capacity of inputs; must match the layout snapshot. |
| inputs | Output array for input values. |
| output_count | Capacity of outputs; must match the layout snapshot. |
| outputs | Output array for output metadata. |
| out_stale | Set to true when generation_id no longer matches the live layout; the arrays are not written in that case. |
input_count or output_count do not match the current layout while the generation still matches. Referenced by xrt_io_cache_read().
| 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.
| xic | Pointer to self. |
| id | Device to set the output on. |
| name | Output name. |
| value | Value to write. |
Referenced by xrt_io_cache_set_output().