The open source OpenXR runtime

u/device: Break out not implemented functions into own file

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2634>

authored by Jakob Bornecrantz and committed by Marge Bot 4afe2862 85b0219d

+2
src/xrt/auxiliary/util/CMakeLists.txt
··· 29 29 u_deque.h 30 30 u_device.c 31 31 u_device.h 32 + u_device_ni.c 33 + u_device_ni.h 32 34 u_distortion.c 33 35 u_distortion.h 34 36 u_distortion_mesh.c
-203
src/xrt/auxiliary/util/u_device.c
··· 507 507 // Empty, should only be used from a device without any inputs. 508 508 return XRT_SUCCESS; 509 509 } 510 - 511 - 512 - /* 513 - * 514 - * Not implemented function helpers. 515 - * 516 - */ 517 - 518 - #define E(FN) U_LOG_E("Function " #FN " is not implemented for '%s'", xdev->str) 519 - 520 - xrt_result_t 521 - u_device_ni_get_hand_tracking(struct xrt_device *xdev, 522 - enum xrt_input_name name, 523 - int64_t desired_timestamp_ns, 524 - struct xrt_hand_joint_set *out_value, 525 - int64_t *out_timestamp_ns) 526 - { 527 - E(get_hand_tracking); 528 - return XRT_ERROR_NOT_IMPLEMENTED; 529 - } 530 - 531 - xrt_result_t 532 - u_device_ni_get_face_tracking(struct xrt_device *xdev, 533 - enum xrt_input_name facial_expression_type, 534 - int64_t at_timestamp_ns, 535 - struct xrt_facial_expression_set *out_value) 536 - { 537 - E(get_face_tracking); 538 - return XRT_ERROR_NOT_IMPLEMENTED; 539 - } 540 - 541 - xrt_result_t 542 - u_device_ni_get_body_skeleton(struct xrt_device *xdev, 543 - enum xrt_input_name body_tracking_type, 544 - struct xrt_body_skeleton *out_value) 545 - { 546 - E(get_body_skeleton); 547 - return XRT_ERROR_NOT_IMPLEMENTED; 548 - } 549 - 550 - xrt_result_t 551 - u_device_ni_get_body_joints(struct xrt_device *xdev, 552 - enum xrt_input_name body_tracking_type, 553 - int64_t desired_timestamp_ns, 554 - struct xrt_body_joint_set *out_value) 555 - { 556 - E(get_body_joints); 557 - return XRT_ERROR_NOT_IMPLEMENTED; 558 - } 559 - 560 - xrt_result_t 561 - u_device_ni_reset_body_tracking_calibration_meta(struct xrt_device *xdev) 562 - { 563 - E(reset_body_tracking_calibration_meta); 564 - return XRT_ERROR_NOT_IMPLEMENTED; 565 - } 566 - 567 - xrt_result_t 568 - u_device_ni_set_body_tracking_calibration_override_meta(struct xrt_device *xdev, float new_body_height) 569 - { 570 - E(set_body_tracking_calibration_override_meta); 571 - return XRT_ERROR_NOT_IMPLEMENTED; 572 - } 573 - 574 - xrt_result_t 575 - u_device_ni_set_output(struct xrt_device *xdev, enum xrt_output_name name, const struct xrt_output_value *value) 576 - { 577 - E(set_output); 578 - return XRT_ERROR_NOT_IMPLEMENTED; 579 - } 580 - 581 - xrt_result_t 582 - u_device_ni_get_output_limits(struct xrt_device *xdev, struct xrt_output_limits *limits) 583 - { 584 - E(get_output_limits); 585 - return XRT_ERROR_NOT_IMPLEMENTED; 586 - } 587 - 588 - xrt_result_t 589 - u_device_ni_get_presence(struct xrt_device *xdev, bool *presence) 590 - { 591 - E(get_presence); 592 - return XRT_ERROR_NOT_IMPLEMENTED; 593 - } 594 - 595 - xrt_result_t 596 - u_device_ni_begin_plane_detection_ext(struct xrt_device *xdev, 597 - const struct xrt_plane_detector_begin_info_ext *begin_info, 598 - uint64_t plane_detection_id, 599 - uint64_t *out_plane_detection_id) 600 - { 601 - E(begin_plane_detection_ext); 602 - return XRT_ERROR_NOT_IMPLEMENTED; 603 - } 604 - 605 - xrt_result_t 606 - u_device_ni_destroy_plane_detection_ext(struct xrt_device *xdev, uint64_t plane_detection_id) 607 - { 608 - E(destroy_plane_detection_ext); 609 - return XRT_ERROR_NOT_IMPLEMENTED; 610 - } 611 - 612 - xrt_result_t 613 - u_device_ni_get_plane_detection_state_ext(struct xrt_device *xdev, 614 - uint64_t plane_detection_id, 615 - enum xrt_plane_detector_state_ext *out_state) 616 - { 617 - E(get_plane_detection_state_ext); 618 - return XRT_ERROR_NOT_IMPLEMENTED; 619 - } 620 - 621 - xrt_result_t 622 - u_device_ni_get_plane_detections_ext(struct xrt_device *xdev, 623 - uint64_t plane_detection_id, 624 - struct xrt_plane_detections_ext *out_detections) 625 - { 626 - E(get_plane_detections_ext); 627 - return XRT_ERROR_NOT_IMPLEMENTED; 628 - } 629 - 630 - xrt_result_t 631 - u_device_ni_get_view_poses(struct xrt_device *xdev, 632 - const struct xrt_vec3 *default_eye_relation, 633 - int64_t at_timestamp_ns, 634 - enum xrt_view_type view_type, 635 - uint32_t view_count, 636 - struct xrt_space_relation *out_head_relation, 637 - struct xrt_fov *out_fovs, 638 - struct xrt_pose *out_poses) 639 - { 640 - E(get_view_poses); 641 - return XRT_ERROR_NOT_IMPLEMENTED; 642 - } 643 - 644 - xrt_result_t 645 - u_device_ni_compute_distortion( 646 - struct xrt_device *xdev, uint32_t view, float u, float v, struct xrt_uv_triplet *out_result) 647 - { 648 - E(compute_distortion); 649 - return XRT_ERROR_NOT_IMPLEMENTED; 650 - } 651 - 652 - xrt_result_t 653 - u_device_ni_get_visibility_mask(struct xrt_device *xdev, 654 - enum xrt_visibility_mask_type type, 655 - uint32_t view_index, 656 - struct xrt_visibility_mask **out_mask) 657 - { 658 - E(get_visibility_mask); 659 - return XRT_ERROR_NOT_IMPLEMENTED; 660 - } 661 - 662 - xrt_result_t 663 - u_device_ni_ref_space_usage(struct xrt_device *xdev, 664 - enum xrt_reference_space_type type, 665 - enum xrt_input_name name, 666 - bool used) 667 - { 668 - E(ref_space_usage); 669 - return XRT_ERROR_NOT_IMPLEMENTED; 670 - } 671 - 672 - bool 673 - u_device_ni_is_form_factor_available(struct xrt_device *xdev, enum xrt_form_factor form_factor) 674 - { 675 - E(is_form_factor_available); 676 - return false; 677 - } 678 - 679 - xrt_result_t 680 - u_device_ni_get_battery_status(struct xrt_device *xdev, bool *out_present, bool *out_charging, float *out_charge) 681 - { 682 - E(get_battery_status); 683 - return XRT_ERROR_NOT_IMPLEMENTED; 684 - } 685 - 686 - xrt_result_t 687 - u_device_ni_get_brightness(struct xrt_device *xdev, float *out_brightness) 688 - { 689 - E(get_brightness); 690 - return XRT_ERROR_NOT_IMPLEMENTED; 691 - } 692 - 693 - xrt_result_t 694 - u_device_ni_set_brightness(struct xrt_device *xdev, float brightness, bool relative) 695 - { 696 - E(set_brightness); 697 - return XRT_ERROR_NOT_IMPLEMENTED; 698 - } 699 - 700 - xrt_result_t 701 - u_device_ni_begin_feature(struct xrt_device *xdev, enum xrt_device_feature_type type) 702 - { 703 - E(begin_feature); 704 - return XRT_ERROR_NOT_IMPLEMENTED; 705 - } 706 - 707 - xrt_result_t 708 - u_device_ni_end_feature(struct xrt_device *xdev, enum xrt_device_feature_type type) 709 - { 710 - E(end_feature); 711 - return XRT_ERROR_NOT_IMPLEMENTED; 712 - }
-224
src/xrt/auxiliary/util/u_device.h
··· 204 204 u_device_noop_update_inputs(struct xrt_device *xdev); 205 205 206 206 207 - /* 208 - * 209 - * Not implemented function helpers. 210 - * 211 - */ 212 - 213 - /*! 214 - * Not implemented function for @ref xrt_device::get_hand_tracking. 215 - * 216 - * @ingroup aux_util 217 - */ 218 - xrt_result_t 219 - u_device_ni_get_hand_tracking(struct xrt_device *xdev, 220 - enum xrt_input_name name, 221 - int64_t desired_timestamp_ns, 222 - struct xrt_hand_joint_set *out_value, 223 - int64_t *out_timestamp_ns); 224 - 225 - /*! 226 - * Not implemented function for @ref xrt_device::get_face_tracking. 227 - * 228 - * @ingroup aux_util 229 - */ 230 - xrt_result_t 231 - u_device_ni_get_face_tracking(struct xrt_device *xdev, 232 - enum xrt_input_name facial_expression_type, 233 - int64_t at_timestamp_ns, 234 - struct xrt_facial_expression_set *out_value); 235 - 236 - /*! 237 - * Not implemented function for @ref xrt_device::get_body_skeleton. 238 - * 239 - * @ingroup aux_util 240 - */ 241 - xrt_result_t 242 - u_device_ni_get_body_skeleton(struct xrt_device *xdev, 243 - enum xrt_input_name body_tracking_type, 244 - struct xrt_body_skeleton *out_value); 245 - 246 - /*! 247 - * Not implemented function for @ref xrt_device::get_body_joints. 248 - * 249 - * @ingroup aux_util 250 - */ 251 - xrt_result_t 252 - u_device_ni_get_body_joints(struct xrt_device *xdev, 253 - enum xrt_input_name body_tracking_type, 254 - int64_t desired_timestamp_ns, 255 - struct xrt_body_joint_set *out_value); 256 - 257 - /*! 258 - * Not implemented function for @ref xrt_device::reset_body_tracking_calibration_meta. 259 - * 260 - * @ingroup aux_util 261 - */ 262 - xrt_result_t 263 - u_device_ni_reset_body_tracking_calibration_meta(struct xrt_device *xdev); 264 - 265 - /*! 266 - * Not implemented function for @ref xrt_device::set_body_tracking_calibration_override_meta. 267 - * 268 - * @ingroup aux_util 269 - */ 270 - xrt_result_t 271 - u_device_ni_set_body_tracking_calibration_override_meta(struct xrt_device *xdev, float new_body_height); 272 - 273 - /*! 274 - * Not implemented function for @ref xrt_device::set_output. 275 - * 276 - * @ingroup aux_util 277 - */ 278 - xrt_result_t 279 - u_device_ni_set_output(struct xrt_device *xdev, enum xrt_output_name name, const struct xrt_output_value *value); 280 - 281 - /*! 282 - * Not implemented function for @ref xrt_device::get_output_limits. 283 - * 284 - * @ingroup aux_util 285 - */ 286 - xrt_result_t 287 - u_device_ni_get_output_limits(struct xrt_device *xdev, struct xrt_output_limits *limits); 288 - 289 - /*! 290 - * Not implemented function for @ref xrt_device::get_presence. 291 - * 292 - * @ingroup aux_util 293 - */ 294 - xrt_result_t 295 - u_device_ni_get_presence(struct xrt_device *xdev, bool *presence); 296 - 297 - /*! 298 - * Not implemented function for @ref xrt_device::begin_plane_detection_ext. 299 - * 300 - * @ingroup aux_util 301 - */ 302 - xrt_result_t 303 - u_device_ni_begin_plane_detection_ext(struct xrt_device *xdev, 304 - const struct xrt_plane_detector_begin_info_ext *begin_info, 305 - uint64_t plane_detection_id, 306 - uint64_t *out_plane_detection_id); 307 - 308 - /*! 309 - * Not implemented function for @ref xrt_device::destroy_plane_detection_ext. 310 - * 311 - * @ingroup aux_util 312 - */ 313 - xrt_result_t 314 - u_device_ni_destroy_plane_detection_ext(struct xrt_device *xdev, uint64_t plane_detection_id); 315 - 316 - /*! 317 - * Not implemented function for @ref xrt_device::get_plane_detection_state_ext. 318 - * 319 - * @ingroup aux_util 320 - */ 321 - xrt_result_t 322 - u_device_ni_get_plane_detection_state_ext(struct xrt_device *xdev, 323 - uint64_t plane_detection_id, 324 - enum xrt_plane_detector_state_ext *out_state); 325 - 326 - /*! 327 - * Not implemented function for @ref xrt_device::get_plane_detections_ext. 328 - * 329 - * @ingroup aux_util 330 - */ 331 - xrt_result_t 332 - u_device_ni_get_plane_detections_ext(struct xrt_device *xdev, 333 - uint64_t plane_detection_id, 334 - struct xrt_plane_detections_ext *out_detections); 335 - 336 - /*! 337 - * Not implemented function for @ref xrt_device::get_view_poses. 338 - * 339 - * @ingroup aux_util 340 - */ 341 - xrt_result_t 342 - u_device_ni_get_view_poses(struct xrt_device *xdev, 343 - const struct xrt_vec3 *default_eye_relation, 344 - int64_t at_timestamp_ns, 345 - enum xrt_view_type view_type, 346 - uint32_t view_count, 347 - struct xrt_space_relation *out_head_relation, 348 - struct xrt_fov *out_fovs, 349 - struct xrt_pose *out_poses); 350 - 351 - /*! 352 - * Not implemented function for @ref xrt_device::compute_distortion. 353 - * 354 - * @ingroup aux_util 355 - */ 356 - xrt_result_t 357 - u_device_ni_compute_distortion( 358 - struct xrt_device *xdev, uint32_t view, float u, float v, struct xrt_uv_triplet *out_result); 359 - 360 - /*! 361 - * Not implemented function for @ref xrt_device::get_visibility_mask. 362 - * 363 - * @ingroup aux_util 364 - */ 365 - xrt_result_t 366 - u_device_ni_get_visibility_mask(struct xrt_device *xdev, 367 - enum xrt_visibility_mask_type type, 368 - uint32_t view_index, 369 - struct xrt_visibility_mask **out_mask); 370 - 371 - /*! 372 - * Not implemented function for @ref xrt_device::ref_space_usage. 373 - * 374 - * @ingroup aux_util 375 - */ 376 - xrt_result_t 377 - u_device_ni_ref_space_usage(struct xrt_device *xdev, 378 - enum xrt_reference_space_type type, 379 - enum xrt_input_name name, 380 - bool used); 381 - 382 - /*! 383 - * Not implemented function for @ref xrt_device::is_form_factor_available. 384 - * 385 - * @ingroup aux_util 386 - */ 387 - bool 388 - u_device_ni_is_form_factor_available(struct xrt_device *xdev, enum xrt_form_factor form_factor); 389 - 390 - /*! 391 - * Not implemented function for @ref xrt_device::get_battery_status. 392 - * 393 - * @ingroup aux_util 394 - */ 395 - xrt_result_t 396 - u_device_ni_get_battery_status(struct xrt_device *xdev, bool *out_present, bool *out_charging, float *out_charge); 397 - 398 - /*! 399 - * Not implemented function for @ref xrt_device::get_brightness. 400 - * 401 - * @ingroup aux_util 402 - */ 403 - xrt_result_t 404 - u_device_ni_get_brightness(struct xrt_device *xdev, float *out_brightness); 405 - 406 - /*! 407 - * Not implemented function for @ref xrt_device::set_brightness. 408 - * 409 - * @ingroup aux_util 410 - */ 411 - xrt_result_t 412 - u_device_ni_set_brightness(struct xrt_device *xdev, float brightness, bool relative); 413 - 414 - /*! 415 - * Not implemented function for @ref xrt_device::begin_feature. 416 - * 417 - * @ingroup aux_util 418 - */ 419 - xrt_result_t 420 - u_device_ni_begin_feature(struct xrt_device *xdev, enum xrt_device_feature_type type); 421 - 422 - /*! 423 - * Not implemented function for @ref xrt_device::end_feature. 424 - * 425 - * @ingroup aux_util 426 - */ 427 - xrt_result_t 428 - u_device_ni_end_feature(struct xrt_device *xdev, enum xrt_device_feature_type type); 429 - 430 - 431 207 #ifdef __cplusplus 432 208 } 433 209 #endif
+217
src/xrt/auxiliary/util/u_device_ni.c
··· 1 + // Copyright 2019-2025, Collabora, Ltd. 2 + // SPDX-License-Identifier: BSL-1.0 3 + /*! 4 + * @file 5 + * @brief Not implemented function helpers for device drivers. 6 + * @author Jakob Bornecrantz <jakob@collabora.com> 7 + * @author Rylie Pavlik <rylie.pavlik@collabora.com> 8 + * @author Moshi Turner <moshiturner@protonmail.com> 9 + * @author Simon Zeni <simon.zeni@collabora.com> 10 + * @ingroup aux_util 11 + */ 12 + 13 + #include "util/u_device_ni.h" 14 + #include "util/u_logging.h" 15 + 16 + 17 + /* 18 + * 19 + * Not implemented function helpers. 20 + * 21 + */ 22 + 23 + #define E(FN) U_LOG_E("Function " #FN " is not implemented for '%s'", xdev->str) 24 + 25 + xrt_result_t 26 + u_device_ni_get_hand_tracking(struct xrt_device *xdev, 27 + enum xrt_input_name name, 28 + int64_t desired_timestamp_ns, 29 + struct xrt_hand_joint_set *out_value, 30 + int64_t *out_timestamp_ns) 31 + { 32 + E(get_hand_tracking); 33 + return XRT_ERROR_NOT_IMPLEMENTED; 34 + } 35 + 36 + xrt_result_t 37 + u_device_ni_get_face_tracking(struct xrt_device *xdev, 38 + enum xrt_input_name facial_expression_type, 39 + int64_t at_timestamp_ns, 40 + struct xrt_facial_expression_set *out_value) 41 + { 42 + E(get_face_tracking); 43 + return XRT_ERROR_NOT_IMPLEMENTED; 44 + } 45 + 46 + xrt_result_t 47 + u_device_ni_get_body_skeleton(struct xrt_device *xdev, 48 + enum xrt_input_name body_tracking_type, 49 + struct xrt_body_skeleton *out_value) 50 + { 51 + E(get_body_skeleton); 52 + return XRT_ERROR_NOT_IMPLEMENTED; 53 + } 54 + 55 + xrt_result_t 56 + u_device_ni_get_body_joints(struct xrt_device *xdev, 57 + enum xrt_input_name body_tracking_type, 58 + int64_t desired_timestamp_ns, 59 + struct xrt_body_joint_set *out_value) 60 + { 61 + E(get_body_joints); 62 + return XRT_ERROR_NOT_IMPLEMENTED; 63 + } 64 + 65 + xrt_result_t 66 + u_device_ni_reset_body_tracking_calibration_meta(struct xrt_device *xdev) 67 + { 68 + E(reset_body_tracking_calibration_meta); 69 + return XRT_ERROR_NOT_IMPLEMENTED; 70 + } 71 + 72 + xrt_result_t 73 + u_device_ni_set_body_tracking_calibration_override_meta(struct xrt_device *xdev, float new_body_height) 74 + { 75 + E(set_body_tracking_calibration_override_meta); 76 + return XRT_ERROR_NOT_IMPLEMENTED; 77 + } 78 + 79 + xrt_result_t 80 + u_device_ni_set_output(struct xrt_device *xdev, enum xrt_output_name name, const struct xrt_output_value *value) 81 + { 82 + E(set_output); 83 + return XRT_ERROR_NOT_IMPLEMENTED; 84 + } 85 + 86 + xrt_result_t 87 + u_device_ni_get_output_limits(struct xrt_device *xdev, struct xrt_output_limits *limits) 88 + { 89 + E(get_output_limits); 90 + return XRT_ERROR_NOT_IMPLEMENTED; 91 + } 92 + 93 + xrt_result_t 94 + u_device_ni_get_presence(struct xrt_device *xdev, bool *presence) 95 + { 96 + E(get_presence); 97 + return XRT_ERROR_NOT_IMPLEMENTED; 98 + } 99 + 100 + xrt_result_t 101 + u_device_ni_begin_plane_detection_ext(struct xrt_device *xdev, 102 + const struct xrt_plane_detector_begin_info_ext *begin_info, 103 + uint64_t plane_detection_id, 104 + uint64_t *out_plane_detection_id) 105 + { 106 + E(begin_plane_detection_ext); 107 + return XRT_ERROR_NOT_IMPLEMENTED; 108 + } 109 + 110 + xrt_result_t 111 + u_device_ni_destroy_plane_detection_ext(struct xrt_device *xdev, uint64_t plane_detection_id) 112 + { 113 + E(destroy_plane_detection_ext); 114 + return XRT_ERROR_NOT_IMPLEMENTED; 115 + } 116 + 117 + xrt_result_t 118 + u_device_ni_get_plane_detection_state_ext(struct xrt_device *xdev, 119 + uint64_t plane_detection_id, 120 + enum xrt_plane_detector_state_ext *out_state) 121 + { 122 + E(get_plane_detection_state_ext); 123 + return XRT_ERROR_NOT_IMPLEMENTED; 124 + } 125 + 126 + xrt_result_t 127 + u_device_ni_get_plane_detections_ext(struct xrt_device *xdev, 128 + uint64_t plane_detection_id, 129 + struct xrt_plane_detections_ext *out_detections) 130 + { 131 + E(get_plane_detections_ext); 132 + return XRT_ERROR_NOT_IMPLEMENTED; 133 + } 134 + 135 + xrt_result_t 136 + u_device_ni_get_view_poses(struct xrt_device *xdev, 137 + const struct xrt_vec3 *default_eye_relation, 138 + int64_t at_timestamp_ns, 139 + enum xrt_view_type view_type, 140 + uint32_t view_count, 141 + struct xrt_space_relation *out_head_relation, 142 + struct xrt_fov *out_fovs, 143 + struct xrt_pose *out_poses) 144 + { 145 + E(get_view_poses); 146 + return XRT_ERROR_NOT_IMPLEMENTED; 147 + } 148 + 149 + xrt_result_t 150 + u_device_ni_compute_distortion( 151 + struct xrt_device *xdev, uint32_t view, float u, float v, struct xrt_uv_triplet *out_result) 152 + { 153 + E(compute_distortion); 154 + return XRT_ERROR_NOT_IMPLEMENTED; 155 + } 156 + 157 + xrt_result_t 158 + u_device_ni_get_visibility_mask(struct xrt_device *xdev, 159 + enum xrt_visibility_mask_type type, 160 + uint32_t view_index, 161 + struct xrt_visibility_mask **out_mask) 162 + { 163 + E(get_visibility_mask); 164 + return XRT_ERROR_NOT_IMPLEMENTED; 165 + } 166 + 167 + xrt_result_t 168 + u_device_ni_ref_space_usage(struct xrt_device *xdev, 169 + enum xrt_reference_space_type type, 170 + enum xrt_input_name name, 171 + bool used) 172 + { 173 + E(ref_space_usage); 174 + return XRT_ERROR_NOT_IMPLEMENTED; 175 + } 176 + 177 + bool 178 + u_device_ni_is_form_factor_available(struct xrt_device *xdev, enum xrt_form_factor form_factor) 179 + { 180 + E(is_form_factor_available); 181 + return false; 182 + } 183 + 184 + xrt_result_t 185 + u_device_ni_get_battery_status(struct xrt_device *xdev, bool *out_present, bool *out_charging, float *out_charge) 186 + { 187 + E(get_battery_status); 188 + return XRT_ERROR_NOT_IMPLEMENTED; 189 + } 190 + 191 + xrt_result_t 192 + u_device_ni_get_brightness(struct xrt_device *xdev, float *out_brightness) 193 + { 194 + E(get_brightness); 195 + return XRT_ERROR_NOT_IMPLEMENTED; 196 + } 197 + 198 + xrt_result_t 199 + u_device_ni_set_brightness(struct xrt_device *xdev, float brightness, bool relative) 200 + { 201 + E(set_brightness); 202 + return XRT_ERROR_NOT_IMPLEMENTED; 203 + } 204 + 205 + xrt_result_t 206 + u_device_ni_begin_feature(struct xrt_device *xdev, enum xrt_device_feature_type type) 207 + { 208 + E(begin_feature); 209 + return XRT_ERROR_NOT_IMPLEMENTED; 210 + } 211 + 212 + xrt_result_t 213 + u_device_ni_end_feature(struct xrt_device *xdev, enum xrt_device_feature_type type) 214 + { 215 + E(end_feature); 216 + return XRT_ERROR_NOT_IMPLEMENTED; 217 + }
+249
src/xrt/auxiliary/util/u_device_ni.h
··· 1 + // Copyright 2019-2025, Collabora, Ltd. 2 + // SPDX-License-Identifier: BSL-1.0 3 + /*! 4 + * @file 5 + * @brief Not implemented function helpers for device drivers. 6 + * @author Jakob Bornecrantz <jakob@collabora.com> 7 + * @author Rylie Pavlik <rylie.pavlik@collabora.com> 8 + * @author Moshi Turner <moshiturner@protonmail.com> 9 + * @author Simon Zeni <simon.zeni@collabora.com> 10 + * @ingroup aux_util 11 + */ 12 + 13 + #pragma once 14 + 15 + #include "xrt/xrt_compiler.h" 16 + #include "xrt/xrt_device.h" 17 + 18 + #ifdef __cplusplus 19 + extern "C" { 20 + #endif 21 + 22 + 23 + /* 24 + * 25 + * Not implemented function helpers. 26 + * 27 + */ 28 + 29 + /*! 30 + * Not implemented function for @ref xrt_device::get_hand_tracking. 31 + * 32 + * @ingroup aux_util 33 + */ 34 + xrt_result_t 35 + u_device_ni_get_hand_tracking(struct xrt_device *xdev, 36 + enum xrt_input_name name, 37 + int64_t desired_timestamp_ns, 38 + struct xrt_hand_joint_set *out_value, 39 + int64_t *out_timestamp_ns); 40 + 41 + /*! 42 + * Not implemented function for @ref xrt_device::get_face_tracking. 43 + * 44 + * @ingroup aux_util 45 + */ 46 + xrt_result_t 47 + u_device_ni_get_face_tracking(struct xrt_device *xdev, 48 + enum xrt_input_name facial_expression_type, 49 + int64_t at_timestamp_ns, 50 + struct xrt_facial_expression_set *out_value); 51 + 52 + /*! 53 + * Not implemented function for @ref xrt_device::get_body_skeleton. 54 + * 55 + * @ingroup aux_util 56 + */ 57 + xrt_result_t 58 + u_device_ni_get_body_skeleton(struct xrt_device *xdev, 59 + enum xrt_input_name body_tracking_type, 60 + struct xrt_body_skeleton *out_value); 61 + 62 + /*! 63 + * Not implemented function for @ref xrt_device::get_body_joints. 64 + * 65 + * @ingroup aux_util 66 + */ 67 + xrt_result_t 68 + u_device_ni_get_body_joints(struct xrt_device *xdev, 69 + enum xrt_input_name body_tracking_type, 70 + int64_t desired_timestamp_ns, 71 + struct xrt_body_joint_set *out_value); 72 + 73 + /*! 74 + * Not implemented function for @ref xrt_device::reset_body_tracking_calibration_meta. 75 + * 76 + * @ingroup aux_util 77 + */ 78 + xrt_result_t 79 + u_device_ni_reset_body_tracking_calibration_meta(struct xrt_device *xdev); 80 + 81 + /*! 82 + * Not implemented function for @ref xrt_device::set_body_tracking_calibration_override_meta. 83 + * 84 + * @ingroup aux_util 85 + */ 86 + xrt_result_t 87 + u_device_ni_set_body_tracking_calibration_override_meta(struct xrt_device *xdev, float new_body_height); 88 + 89 + /*! 90 + * Not implemented function for @ref xrt_device::set_output. 91 + * 92 + * @ingroup aux_util 93 + */ 94 + xrt_result_t 95 + u_device_ni_set_output(struct xrt_device *xdev, enum xrt_output_name name, const struct xrt_output_value *value); 96 + 97 + /*! 98 + * Not implemented function for @ref xrt_device::get_output_limits. 99 + * 100 + * @ingroup aux_util 101 + */ 102 + xrt_result_t 103 + u_device_ni_get_output_limits(struct xrt_device *xdev, struct xrt_output_limits *limits); 104 + 105 + /*! 106 + * Not implemented function for @ref xrt_device::get_presence. 107 + * 108 + * @ingroup aux_util 109 + */ 110 + xrt_result_t 111 + u_device_ni_get_presence(struct xrt_device *xdev, bool *presence); 112 + 113 + /*! 114 + * Not implemented function for @ref xrt_device::begin_plane_detection_ext. 115 + * 116 + * @ingroup aux_util 117 + */ 118 + xrt_result_t 119 + u_device_ni_begin_plane_detection_ext(struct xrt_device *xdev, 120 + const struct xrt_plane_detector_begin_info_ext *begin_info, 121 + uint64_t plane_detection_id, 122 + uint64_t *out_plane_detection_id); 123 + 124 + /*! 125 + * Not implemented function for @ref xrt_device::destroy_plane_detection_ext. 126 + * 127 + * @ingroup aux_util 128 + */ 129 + xrt_result_t 130 + u_device_ni_destroy_plane_detection_ext(struct xrt_device *xdev, uint64_t plane_detection_id); 131 + 132 + /*! 133 + * Not implemented function for @ref xrt_device::get_plane_detection_state_ext. 134 + * 135 + * @ingroup aux_util 136 + */ 137 + xrt_result_t 138 + u_device_ni_get_plane_detection_state_ext(struct xrt_device *xdev, 139 + uint64_t plane_detection_id, 140 + enum xrt_plane_detector_state_ext *out_state); 141 + 142 + /*! 143 + * Not implemented function for @ref xrt_device::get_plane_detections_ext. 144 + * 145 + * @ingroup aux_util 146 + */ 147 + xrt_result_t 148 + u_device_ni_get_plane_detections_ext(struct xrt_device *xdev, 149 + uint64_t plane_detection_id, 150 + struct xrt_plane_detections_ext *out_detections); 151 + 152 + /*! 153 + * Not implemented function for @ref xrt_device::get_view_poses. 154 + * 155 + * @ingroup aux_util 156 + */ 157 + xrt_result_t 158 + u_device_ni_get_view_poses(struct xrt_device *xdev, 159 + const struct xrt_vec3 *default_eye_relation, 160 + int64_t at_timestamp_ns, 161 + enum xrt_view_type view_type, 162 + uint32_t view_count, 163 + struct xrt_space_relation *out_head_relation, 164 + struct xrt_fov *out_fovs, 165 + struct xrt_pose *out_poses); 166 + 167 + /*! 168 + * Not implemented function for @ref xrt_device::compute_distortion. 169 + * 170 + * @ingroup aux_util 171 + */ 172 + xrt_result_t 173 + u_device_ni_compute_distortion( 174 + struct xrt_device *xdev, uint32_t view, float u, float v, struct xrt_uv_triplet *out_result); 175 + 176 + /*! 177 + * Not implemented function for @ref xrt_device::get_visibility_mask. 178 + * 179 + * @ingroup aux_util 180 + */ 181 + xrt_result_t 182 + u_device_ni_get_visibility_mask(struct xrt_device *xdev, 183 + enum xrt_visibility_mask_type type, 184 + uint32_t view_index, 185 + struct xrt_visibility_mask **out_mask); 186 + 187 + /*! 188 + * Not implemented function for @ref xrt_device::ref_space_usage. 189 + * 190 + * @ingroup aux_util 191 + */ 192 + xrt_result_t 193 + u_device_ni_ref_space_usage(struct xrt_device *xdev, 194 + enum xrt_reference_space_type type, 195 + enum xrt_input_name name, 196 + bool used); 197 + 198 + /*! 199 + * Not implemented function for @ref xrt_device::is_form_factor_available. 200 + * 201 + * @ingroup aux_util 202 + */ 203 + bool 204 + u_device_ni_is_form_factor_available(struct xrt_device *xdev, enum xrt_form_factor form_factor); 205 + 206 + /*! 207 + * Not implemented function for @ref xrt_device::get_battery_status. 208 + * 209 + * @ingroup aux_util 210 + */ 211 + xrt_result_t 212 + u_device_ni_get_battery_status(struct xrt_device *xdev, bool *out_present, bool *out_charging, float *out_charge); 213 + 214 + /*! 215 + * Not implemented function for @ref xrt_device::get_brightness. 216 + * 217 + * @ingroup aux_util 218 + */ 219 + xrt_result_t 220 + u_device_ni_get_brightness(struct xrt_device *xdev, float *out_brightness); 221 + 222 + /*! 223 + * Not implemented function for @ref xrt_device::set_brightness. 224 + * 225 + * @ingroup aux_util 226 + */ 227 + xrt_result_t 228 + u_device_ni_set_brightness(struct xrt_device *xdev, float brightness, bool relative); 229 + 230 + /*! 231 + * Not implemented function for @ref xrt_device::begin_feature. 232 + * 233 + * @ingroup aux_util 234 + */ 235 + xrt_result_t 236 + u_device_ni_begin_feature(struct xrt_device *xdev, enum xrt_device_feature_type type); 237 + 238 + /*! 239 + * Not implemented function for @ref xrt_device::end_feature. 240 + * 241 + * @ingroup aux_util 242 + */ 243 + xrt_result_t 244 + u_device_ni_end_feature(struct xrt_device *xdev, enum xrt_device_feature_type type); 245 + 246 + 247 + #ifdef __cplusplus 248 + } 249 + #endif
+1
src/xrt/drivers/android/android_sensors.c
··· 16 16 17 17 #include "util/u_debug.h" 18 18 #include "util/u_device.h" 19 + #include "util/u_device_ni.h" 19 20 #include "util/u_distortion_mesh.h" 20 21 #include "util/u_var.h" 21 22 #include "util/u_visibility_mask.h"
+1
src/xrt/drivers/euroc/euroc_device.c
··· 10 10 #include "util/u_misc.h" 11 11 #include "util/u_debug.h" 12 12 #include "util/u_device.h" 13 + #include "util/u_device_ni.h" 13 14 #include "util/u_distortion_mesh.h" 14 15 #include "util/u_var.h" 15 16 #include "math/m_space.h"
+1
src/xrt/drivers/ht_ctrl_emu/ht_ctrl_emu.cpp
··· 24 24 #include "util/u_misc.h" 25 25 #include "util/u_debug.h" 26 26 #include "util/u_device.h" 27 + #include "util/u_device_ni.h" 27 28 #include "util/u_distortion_mesh.h" 28 29 #include "util/u_config_json.h" 29 30
+1
src/xrt/drivers/hydra/hydra_driver.c
··· 31 31 32 32 #include "util/u_debug.h" 33 33 #include "util/u_device.h" 34 + #include "util/u_device_ni.h" 34 35 #include "util/u_misc.h" 35 36 #include "util/u_time.h" 36 37 #include "util/u_logging.h"
+1
src/xrt/drivers/ohmd/oh_device.c
··· 21 21 #include "util/u_misc.h" 22 22 #include "util/u_debug.h" 23 23 #include "util/u_device.h" 24 + #include "util/u_device_ni.h" 24 25 #include "util/u_time.h" 25 26 #include "util/u_distortion_mesh.h" 26 27 #include "util/u_logging.h"
+1
src/xrt/drivers/realsense/rs_ddev.c
··· 22 22 23 23 #include "util/u_time.h" 24 24 #include "util/u_device.h" 25 + #include "util/u_device_ni.h" 25 26 #include "util/u_logging.h" 26 27 27 28 #include "util/u_json.h"
+1
src/xrt/drivers/remote/r_device.c
··· 15 15 #include "util/u_misc.h" 16 16 #include "util/u_debug.h" 17 17 #include "util/u_device.h" 18 + #include "util/u_device_ni.h" 18 19 #include "util/u_hand_tracking.h" 19 20 20 21 #include "vive/vive_bindings.h"
+1
src/xrt/drivers/remote/r_hmd.c
··· 15 15 #include "util/u_misc.h" 16 16 #include "util/u_debug.h" 17 17 #include "util/u_device.h" 18 + #include "util/u_device_ni.h" 18 19 #include "util/u_distortion_mesh.h" 19 20 20 21 #include "math/m_api.h"
+1
src/xrt/drivers/rift_s/rift_s_controller.c
··· 28 28 #include "os/os_hid.h" 29 29 30 30 #include "util/u_device.h" 31 + #include "util/u_device_ni.h" 31 32 #include "util/u_trace_marker.h" 32 33 #include "util/u_var.h" 33 34
+1
src/xrt/drivers/simulated/simulated_controller.c
··· 19 19 #include "util/u_time.h" 20 20 #include "util/u_debug.h" 21 21 #include "util/u_device.h" 22 + #include "util/u_device_ni.h" 22 23 #include "util/u_logging.h" 23 24 #include "util/u_distortion_mesh.h" 24 25
+1
src/xrt/drivers/twrap/twrap_slam.c
··· 29 29 #include <assert.h> 30 30 31 31 #include "util/u_device.h" 32 + #include "util/u_device_ni.h" 32 33 #include "math/m_space.h" 33 34 #include "util/u_tracked_imu_3dof.h" 34 35
+1
src/xrt/drivers/wmr/wmr_controller_hp.c
··· 11 11 #include "math/m_api.h" 12 12 13 13 #include "util/u_device.h" 14 + #include "util/u_device_ni.h" 14 15 #include "util/u_trace_marker.h" 15 16 #include "util/u_var.h" 16 17
+1
src/xrt/drivers/wmr/wmr_controller_og.c
··· 11 11 #include "math/m_api.h" 12 12 13 13 #include "util/u_device.h" 14 + #include "util/u_device_ni.h" 14 15 #include "util/u_trace_marker.h" 15 16 #include "util/u_var.h" 16 17
+1
src/xrt/ipc/client/ipc_client_xdev.c
··· 20 20 #include "util/u_misc.h" 21 21 #include "util/u_debug.h" 22 22 #include "util/u_device.h" 23 + #include "util/u_device_ni.h" 23 24 24 25 #include "client/ipc_client.h" 25 26 #include "client/ipc_client_connection.h"