Monado OpenXR Runtime
rift_s_radio.c File Reference

Oculus Rift S HMD Radio management. More...

#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "util/u_misc.h"
#include "rift_s.h"
#include "rift_s_radio.h"
#include "rift_s_protocol.h"
Include dependency graph for rift_s_radio.c:

Data Structures

struct  rift_s_radio_command
 
struct  rift_s_radio_json_read_state
 

Macros

#define MAX_JSON_LEN   4096
 

Typedefs

typedef struct rift_s_radio_json_read_state rift_s_radio_json_read_state
 

Functions

static int get_radio_response_report (struct os_hid_device *hid, rift_s_hmd_radio_response_t *radio_response)
 
void rift_s_radio_update (rift_s_radio_state *state, struct os_hid_device *hid)
 
void rift_s_radio_state_init (rift_s_radio_state *state)
 
void rift_s_radio_state_clear (rift_s_radio_state *state)
 
void rift_s_radio_queue_command (rift_s_radio_state *state, const uint64_t device_id, const uint8_t *cmd_bytes, const int cmd_bytes_len, rift_s_radio_completion_fn cb, void *cb_data)
 
static void read_json_cb (bool success, uint8_t *response_bytes, int response_bytes_len, rift_s_radio_json_read_state *json_read)
 
void rift_s_radio_get_json_block (rift_s_radio_state *state, const uint64_t device_id, rift_s_radio_completion_fn cb, void *cb_data)
 

Detailed Description

Oculus Rift S HMD Radio management.

Functions for serialising requests to communicate with Touch controllers over the HMDs wireless radio link, collecting responses and delivering them back via callbacks.

Ported from OpenHMD

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