66 assert(wcc->send_bytes != NULL);
67 return wcc->send_bytes(wcc, buffer, buf_size);
76 return wcc->read_sync(wcc, buffer, buf_size, timeout_ms);
144 if (wcc->receive_bytes != NULL) {
145 wcc->receive_bytes(wcc, time_ns, buffer, buf_size);
u_logging_level
Logging level enum.
Definition: u_logging.h:43
xrt_device_type
How an xrt_device can be used.
Definition: xrt_defines.h:783
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:55
Common base for all WMR controllers.
Definition: wmr_controller_base.h:92
struct os_mutex conn_lock
Mutex protects the controller connection.
Definition: wmr_controller_base.h:97
struct os_mutex data_lock
Mutex protects shared data used from OpenXR callbacks.
Definition: wmr_controller_base.h:108
struct wmr_controller_connection * wcc
The connection for this controller.
Definition: wmr_controller_base.h:100
struct m_imu_3dof fusion
Main fusion calculator.
Definition: wmr_controller_base.h:123
struct xrt_vec3 last_angular_velocity
The last angular velocity from the IMU, for prediction.
Definition: wmr_controller_base.h:125
uint64_t last_imu_timestamp_ns
Time of last IMU sample, in CPU time.
Definition: wmr_controller_base.h:121
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:112
struct xrt_device base
Base struct.
Definition: wmr_controller_base.h:94
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:103
Definition: wmr_config.h:185
A connection for communicating with the controller.
Definition: wmr_controller_base.h:49
struct wmr_controller_base * wcb
The controller this connection is talking to.
Definition: wmr_controller_base.h:51
A single HMD or input device.
Definition: xrt_device.h:241
A 3 element vector with single floats.
Definition: xrt_defines.h:271
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.