Monado OpenXR Runtime
wmr_protocol.h File Reference

WMR and MS HoloLens protocol constants, structures and helpers header. More...

#include "math/m_vec2.h"
Include dependency graph for wmr_protocol.h:

Go to the source code of this file.

Data Structures

struct  hololens_sensors_packet
 
struct  wmr_config_header
 

Macros

#define WMR_FEATURE_BUFFER_SIZE   497
 
#define WMR_MS_HOLOLENS_NS_PER_TICK   100
 
#define WMR_MS_HOLOLENS_MSG_SENSORS   0x01
 
#define WMR_MS_HOLOLENS_MSG_CONTROL   0x02
 
#define WMR_MS_HOLOLENS_MSG_DEBUG   0x03
 
#define WMR_MS_HOLOLENS_MSG_BT_IFACE   0x05 /* Bluetooth interface */
 
#define WMR_MS_HOLOLENS_MSG_LEFT_CONTROLLER   0x06 /* Left controller */
 
#define WMR_MS_HOLOLENS_MSG_RIGHT_CONTROLLER   0x0E /* Right controller */
 
#define WMR_MS_HOLOLENS_MSG_BT_CONTROL   0x16 /* BT control message on Reverb G2 & Odyssey+ */
 
#define WMR_MS_HOLOLENS_MSG_CONTROLLER_STATUS   0x17
 
#define WMR_CONTROL_MSG_IPD_VALUE   0x01
 
#define WMR_CONTROL_MSG_UNKNOWN_02   0x02
 
#define WMR_CONTROL_MSG_DEVICE_STATUS   0x05
 
#define WMR_BT_IFACE_MSG_DEBUG   0x19
 
#define WMR_CONTROLLER_STATUS_UNPAIRED   0x0
 
#define WMR_CONTROLLER_STATUS_OFFLINE   0x1
 
#define WMR_CONTROLLER_STATUS_ONLINE   0x2
 
#define STR_TO_U32(s)   ((uint32_t)(((s)[0]) | ((s)[1] << 8) | ((s)[2] << 16) | ((s)[3] << 24)))
 
#define WMR_MAGIC   STR_TO_U32("Dlo+")
 
#define WMR_MIN_EXPOSURE   60
 
#define WMR_MAX_OBSERVED_EXPOSURE   6000
 
#define WMR_MAX_EXPOSURE   9000
 
#define WMR_MIN_GAIN   16
 
#define WMR_MAX_GAIN   255
 

Enumerations

enum  wmr_bt_control_msg {
  WMR_BT_CONTROL_MSG_ONLINE_STATUS = 0x04 , WMR_BT_CONTROL_MSG_PAIR = 0x05 , WMR_BT_CONTROL_MSG_UNPAIR = 0x06 , WMR_BT_CONTROL_MSG_PAIRING_STATUS = 0x08 ,
  WMR_BT_CONTROL_MSG_CMD_STATUS = 0x09
}
 

Functions

void vec3_from_hololens_accel (int32_t sample[3][4], int i, struct xrt_vec3 *out_vec)
 
void vec3_from_hololens_gyro (int16_t sample[3][32], int i, struct xrt_vec3 *out_vec)
 
static uint8_t read8 (const unsigned char **buffer)
 
static int16_t read16 (const unsigned char **buffer)
 
static int32_t read24 (const unsigned char **buffer)
 
static int32_t read32 (const unsigned char **buffer)
 
static uint64_t read64 (const unsigned char **buffer)
 

Variables

static const unsigned char hololens_sensors_imu_on [64] = {0x02, 0x07}
 

Detailed Description

WMR and MS HoloLens protocol constants, structures and helpers header.

Author
Philipp Zabel phili.nosp@m.pp.z.nosp@m.abel@.nosp@m.gmai.nosp@m.l.com
nima01 nima_.nosp@m.zero.nosp@m._one@.nosp@m.prot.nosp@m.onmai.nosp@m.l.co.nosp@m.m