Monado OpenXR Runtime
ipc_shared_memory Struct Reference

A big struct that contains all data that is shared to a client, no pointers allowed in this. More...

#include </builds/monado/monado/src/xrt/ipc/shared/ipc_protocol.h>

Collaboration diagram for ipc_shared_memory:

Data Fields

char u_git_tag [64]
 The git revision of the service, used by clients to detect version mismatches. More...
 
uint32_t itrack_count
 Number of elements in itracks that are populated/valid. More...
 
struct ipc_shared_tracking_origin itracks [XRT_SYSTEM_MAX_DEVICES]
 Array of shared tracking origin data. More...
 
uint32_t isdev_count
 Number of elements in isdevs that are populated/valid. More...
 
struct ipc_shared_device isdevs [XRT_SYSTEM_MAX_DEVICES]
 Array of shared data per device. More...
 
struct {
   int32_t   head
 
   int32_t   eyes
 
   int32_t   face
 
   struct {
      int32_t   left
 
      int32_t   right
 
   }   hand_tracking
 
roles
 Various roles for the devices. More...
 
struct {
   struct {
      struct {
         uint32_t   w_pixels
 
         uint32_t   h_pixels
 
      }   display
 Pixel properties of this display, not in absolute screen coordinates that the compositor sees. More...
 
   }   views [2]
 
   uint32_t   view_count
 
   enum xrt_blend_mode   blend_modes [XRT_MAX_DEVICE_BLEND_MODES]
 
   uint32_t   blend_mode_count
 
hmd
 
struct xrt_input inputs [1024]
 
struct xrt_output outputs [128]
 
struct ipc_shared_binding_profile binding_profiles [64]
 
struct xrt_binding_input_pair input_pairs [1024]
 
struct xrt_binding_output_pair output_pairs [128]
 
struct ipc_layer_slot slots [128]
 
uint64_t startup_timestamp
 

Detailed Description

A big struct that contains all data that is shared to a client, no pointers allowed in this.

To get the inputs of a device you go:

{C++}
struct xrt_input *
helper(struct ipc_shared_memory *ism, uint32_t device_id, uint32_t input)
{
uint32_t index = ism->isdevs[device_id]->first_input_index + input;
return &ism->inputs[index];
}
#define C(c)
If COND is not VK_SUCCESS returns false.
Definition: comp_mirror_to_debug_gui.c:25
uint32_t first_input_index
'Offset' into the array of inputs where the inputs starts.
Definition: ipc_protocol.h:124
A big struct that contains all data that is shared to a client, no pointers allowed in this.
Definition: ipc_protocol.h:195
struct ipc_shared_device isdevs[XRT_SYSTEM_MAX_DEVICES]
Array of shared data per device.
Definition: ipc_protocol.h:223
A single named input, that sits on a xrt_device.
Definition: xrt_device.h:161

Field Documentation

◆ 

struct { ... } ipc_shared_memory::display

Pixel properties of this display, not in absolute screen coordinates that the compositor sees.

So before any rotation is applied by xrt_view::rot.

The xrt_view::display::w_pixels & xrt_view::display::h_pixels become the recommended image size for this view.

Todo:
doesn't account for overfill for timewarp or distortion?

◆ isdev_count

uint32_t ipc_shared_memory::isdev_count

Number of elements in isdevs that are populated/valid.

◆ isdevs

struct ipc_shared_device ipc_shared_memory::isdevs[XRT_SYSTEM_MAX_DEVICES]

Array of shared data per device.

Only isdev_count elements are populated/valid.

◆ itrack_count

uint32_t ipc_shared_memory::itrack_count

Number of elements in itracks that are populated/valid.

◆ itracks

struct ipc_shared_tracking_origin ipc_shared_memory::itracks[XRT_SYSTEM_MAX_DEVICES]

Array of shared tracking origin data.

Only itrack_count elements are populated/valid.

◆ 

struct { ... } ipc_shared_memory::roles

Various roles for the devices.

◆ u_git_tag

char ipc_shared_memory::u_git_tag[64]

The git revision of the service, used by clients to detect version mismatches.


The documentation for this struct was generated from the following file: