Monado OpenXR Runtime
sample_interface.h
Go to the documentation of this file.
1// Copyright 2020-2024, Collabora, Ltd.
2// SPDX-License-Identifier: BSL-1.0
3/*!
4 * @file
5 * @brief Interface to Sample HMD driver.
6 * @author Jakob Bornecrantz <jakob@collabora.com>
7 * @author Rylie Pavlik <rylie.pavlik@collabora.com>
8 * @ingroup drv_sample
9 */
10
11#pragma once
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17/*!
18 * @defgroup drv_sample Sample HMD driver
19 * @ingroup drv
20 *
21 * @brief Driver for a Sample HMD.
22 *
23 * Does no actual work.
24 * Assumed to not be detectable by USB VID/PID,
25 * and thus exposes an "auto-prober" to explicitly discover the device.
26 *
27 * See @ref writing-driver for additional information.
28 *
29 * This device has an implementation of @ref xrt_auto_prober to perform hardware
30 * detection, as well as an implementation of @ref xrt_device for the actual device.
31 *
32 * If your device is or has USB HID that **can** be detected based on USB VID/PID,
33 * you can skip the @ref xrt_auto_prober implementation, and instead implement a
34 * "found" function that matches the signature expected by xrt_prober_entry::found.
35 * See for example @ref hdk_found.
36 * Alternately, you might create a builder or an instance implementation directly.
37 */
38
39/*!
40 * Create a auto prober for a Sample HMD.
41 *
42 * @ingroup drv_sample
43 */
44struct xrt_auto_prober *
46
47/*!
48 * Create a Sample HMD.
49 *
50 * This is only exposed so that the prober (in one source file)
51 * can call the construction function (in another)
52 * @ingroup drv_sample
53 */
54struct xrt_device *
56
57/*!
58 * @dir drivers/sample
59 *
60 * @brief @ref drv_sample files.
61 */
62
63
64#ifdef __cplusplus
65}
66#endif
struct xrt_device * sample_hmd_create(void)
Create a Sample HMD.
Definition: sample_hmd.c:165
struct xrt_auto_prober * sample_create_auto_prober(void)
Create a auto prober for a Sample HMD.
Definition: sample_prober.c:62
An interface to be exposed by a device driver that should probe for the existence of its own device o...
Definition: xrt_prober.h:761
A single HMD or input device.
Definition: xrt_device.h:241