Monado OpenXR Runtime
wmr_hmd_controller.c File Reference

Implementation of tunnelled controller connection, that translates messages passing via an HP G2 or Sasmung Odyssey+ HMD. More...

#include "util/u_trace_marker.h"
#include "wmr_hmd_controller.h"
#include "wmr_controller.h"
#include "wmr_hmd.h"
Include dependency graph for wmr_hmd_controller.c:

Macros

#define WMR_TRACE(c, ...)   U_LOG_IFL_T(c->log_level, __VA_ARGS__)
 
#define WMR_DEBUG(c, ...)   U_LOG_IFL_D(c->log_level, __VA_ARGS__)
 
#define WMR_INFO(c, ...)   U_LOG_IFL_I(c->log_level, __VA_ARGS__)
 
#define WMR_WARN(c, ...)   U_LOG_IFL_W(c->log_level, __VA_ARGS__)
 
#define WMR_ERROR(c, ...)   U_LOG_IFL_E(c->log_level, __VA_ARGS__)
 

Functions

static bool send_bytes_to_controller (struct wmr_controller_connection *wcc, const uint8_t *buffer, uint32_t buf_size)
 
static int read_sync_from_controller (struct wmr_controller_connection *wcc, uint8_t *buffer, uint32_t buf_size, int timeout_ms)
 
static void receive_bytes_from_controller (struct wmr_controller_connection *wcc, uint64_t time_ns, uint8_t *buffer, uint32_t buf_size)
 
static void wmr_hmd_controller_connection_destroy (struct wmr_hmd_controller_connection *conn)
 
static void wmr_hmd_controller_connection_disconnect (struct wmr_controller_connection *base)
 
struct wmr_hmd_controller_connectionwmr_hmd_controller_create (struct wmr_hmd *hmd, uint8_t hmd_cmd_base, enum xrt_device_type controller_type, uint16_t vid, uint16_t pid, enum u_logging_level log_level)
 
struct xrt_devicewmr_hmd_controller_connection_get_controller (struct wmr_hmd_controller_connection *wcc)
 

Detailed Description

Implementation of tunnelled controller connection, that translates messages passing via an HP G2 or Sasmung Odyssey+ HMD.

Author
Jan Schmidt jan@c.nosp@m.entr.nosp@m.icula.nosp@m.r.co.nosp@m.m