67 assert(wcc->send_bytes != NULL);
68 return wcc->send_bytes(wcc, buffer, buf_size);
77 return wcc->read_sync(wcc, buffer, buf_size, timeout_ms);
147 uint64_t timestamp_ticks,
158 if (wcc->receive_bytes != NULL) {
159 wcc->receive_bytes(wcc, time_ns, buffer, buf_size);
u_logging_level
Logging level enum.
Definition u_logging.h:45
void(* u_device_destroy_function_t)(struct xrt_device *xdev)
Function pointer type for the device's destroy function.
Definition u_device.h:228
xrt_device_type
How an xrt_device can be used.
Definition xrt_defines.h:837
A IMU fusion specially made for 3dof devices.
Wrapper around OS threading native functions.
Definition m_imu_3dof.h:35
A wrapper around a native mutex.
Definition os_threading.h:69
Common base for all WMR controllers.
Definition wmr_controller_base.h:93
struct os_mutex conn_lock
Mutex protects the controller connection.
Definition wmr_controller_base.h:98
struct os_mutex data_lock
Mutex protects shared data used from OpenXR callbacks.
Definition wmr_controller_base.h:112
struct wmr_controller_connection * wcc
The connection for this controller.
Definition wmr_controller_base.h:101
struct m_imu_3dof fusion
Main fusion calculator.
Definition wmr_controller_base.h:127
struct xrt_vec3 last_angular_velocity
The last angular velocity from the IMU, for prediction.
Definition wmr_controller_base.h:129
uint64_t last_imu_timestamp_ns
Time of last IMU sample, in CPU time.
Definition wmr_controller_base.h:125
struct xrt_fs * source
Centralized data source for WMR. Controller will send IMU samples to this.
Definition wmr_controller_base.h:104
bool(* handle_input_packet)(struct wmr_controller_base *wcb, uint64_t time_ns, uint8_t *buffer, uint32_t buf_size)
Callback to parse a controller update packet and update the input / imu info. Called with the.
Definition wmr_controller_base.h:116
struct xrt_device base
Base struct.
Definition wmr_controller_base.h:95
void(* receive_bytes)(struct wmr_controller_base *wcb, uint64_t time_ns, uint8_t *buffer, uint32_t buf_size)
Callback from the connection when a packet has been received.
Definition wmr_controller_base.h:107
Definition wmr_config.h:174
A connection for communicating with the controller.
Definition wmr_controller_base.h:50
struct wmr_controller_base * wcb
The controller this connection is talking to.
Definition wmr_controller_base.h:52
A single HMD or input device.
Definition xrt_device.h:341
Frameserver that generates frames.
Definition xrt_frameserver.h:70
A 3 element vector with single floats.
Definition xrt_defines.h:299
Misc helpers for device drivers.
Basic logging functionality.
WMR and MS HoloLens configuration structures.
void wmr_controller_base_handle_imu_sample(struct wmr_controller_base *wcb, uint64_t time_ns, uint64_t timestamp_ticks, const struct xrt_vec3 *acc, const struct xrt_vec3 *gyro)
Handle IMU sample after packet parsing.
Definition wmr_controller_base.c:495
WMR Motion Controller protocol constants, structures and helpers.
Header defining an xrt display or controller device.