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);
146 if (wcc->receive_bytes != NULL) {
147 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:812
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:109
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:124
struct xrt_vec3 last_angular_velocity
The last angular velocity from the IMU, for prediction.
Definition wmr_controller_base.h:126
uint64_t last_imu_timestamp_ns
Time of last IMU sample, in CPU time.
Definition wmr_controller_base.h:122
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:113
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:104
Definition wmr_config.h:171
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:310
A 3 element vector with single floats.
Definition xrt_defines.h:289
Misc helpers for device drivers.
Basic logging functionality.
WMR and MS HoloLens configuration structures.
WMR Motion Controller protocol constants, structures and helpers.
Header defining an xrt display or controller device.