monado/src/xrt/drivers/remote/r_internal.h

96 lines
1.2 KiB
C
Raw Normal View History

2020-10-13 17:18:33 +00:00
// Copyright 2020, Collabora, Ltd.
// SPDX-License-Identifier: BSL-1.0
/*!
* @file
* @brief Internal stuff in remote driver.
* @author Jakob Bornecrantz <jakob@collabora.com>
* @ingroup drv_remote
*/
#pragma once
#include "xrt/xrt_device.h"
#include "xrt/xrt_tracking.h"
#include "os/os_threading.h"
2020-11-18 17:28:41 +00:00
#include "util/u_hand_tracking.h"
2020-10-13 17:18:33 +00:00
#include "r_interface.h"
#ifdef __cplusplus
extern "C" {
#endif
/*!
* Central object remote object.
*
* @ingroup drv_remote
*/
struct r_hub
{
struct xrt_tracking_origin base;
//! Connection to the controller.
struct r_remote_connection rc;
//! The data that the is the reset position.
struct r_remote_data reset;
//! The latest data received.
struct r_remote_data latest;
int accept_fd;
uint16_t port;
struct os_thread_helper oth;
struct
{
bool hmd, left, right;
} gui;
};
/*!
* HMD
*
* @ingroup drv_remote
*/
struct r_hmd
{
struct xrt_device base;
struct r_hub *r;
};
/*!
* Device
*
* @ingroup drv_remote
*/
struct r_device
{
struct xrt_device base;
struct r_hub *r;
2020-11-18 17:28:41 +00:00
struct u_hand_tracking hand_tracking;
2020-10-13 17:18:33 +00:00
bool is_left;
};
struct xrt_device *
r_hmd_create(struct r_hub *r);
struct xrt_device *
r_device_create(struct r_hub *r, bool is_left);
#ifdef __cplusplus
}
#endif