Monado OpenXR Runtime
xreal_air_packet.c File Reference

Xreal Air packet parsing implementation. More...

#include "xrt/xrt_compiler.h"
#include "xreal_air_hmd.h"
#include <cjson/cJSON.h>
#include <string.h>
Include dependency graph for xreal_air_packet.c:

Functions

static void skip (const uint8_t **buffer, size_t num)
 
static void read_i16 (const uint8_t **buffer, int16_t *out_value)
 
static void read_i24_to_i32 (const uint8_t **buffer, int32_t *out_value)
 
static void read_i32 (const uint8_t **buffer, int32_t *out_value)
 
static void read_i16_rev (const uint8_t **buffer, int16_t *out_value)
 
static void read_i15_to_i32 (const uint8_t **buffer, int32_t *out_value)
 
static void read_i32_rev (const uint8_t **buffer, int32_t *out_value)
 
static void read_u8 (const uint8_t **buffer, uint8_t *out_value)
 
static void read_u16 (const uint8_t **buffer, uint16_t *out_value)
 
static XRT_MAYBE_UNUSED void read_u32 (const uint8_t **buffer, uint32_t *out_value)
 
static void read_u64 (const uint8_t **buffer, uint64_t *out_value)
 
static void read_u8_array (const uint8_t **buffer, uint8_t *out_value, size_t num)
 
static void read_json_vec3 (cJSON *object, const char *const string, struct xrt_vec3 *out_vec3)
 
static void read_json_quat (cJSON *object, const char *const string, struct xrt_quat *out_quat)
 
static void read_json_array (cJSON *object, const char *const string, int size, float *out_array)
 
static void read_sample (const uint8_t **buffer, struct xreal_air_parsed_sample *sample)
 
bool xreal_air_parse_calibration_buffer (struct xreal_air_parsed_calibration *calibration, const char *buffer, size_t size)
 
bool xreal_air_parse_sensor_packet (struct xreal_air_parsed_sensor *sensor, const uint8_t *buffer, int size)
 
bool xreal_air_parse_sensor_control_data_packet (struct xreal_air_parsed_sensor_control_data *data, const uint8_t *buffer, int size)
 
bool xreal_air_parse_control_packet (struct xreal_air_parsed_control *control, const uint8_t *buffer, int size)
 

Detailed Description

Xreal Air packet parsing implementation.

Author
Tobias Frisch theja.nosp@m.ckim.nosp@m.onste.nosp@m.r@gm.nosp@m.ail.c.nosp@m.om