Monado OpenXR Runtime
Loading...
Searching...
No Matches
ipc_server Struct Reference

Main IPC object for the server. More...

#include </builds/monado/monado/src/xrt/ipc/server/ipc_server.h>

Collaboration diagram for ipc_server:

Public Member Functions

void ipc_server_handle_client_connected (struct ipc_server *vs, xrt_ipc_handle_t ipc_handle)
 Called when a client has connected, it takes the client's ipc handle.
 
void ipc_server_handle_failure (struct ipc_server *vs)
 Perform whatever needs to be done when the mainloop polling encounters a failure.
 
void ipc_server_handle_shutdown_signal (struct ipc_server *vs)
 Perform whatever needs to be done when the mainloop polling identifies that the server should be shut down.
 
int ipc_server_stop (struct ipc_server *s)
 Asks the server to shut down, this call is asynchronous and will return immediately.
 

Data Fields

struct xrt_instancexinst
 
struct u_processprocess
 Handle for the current process, e.g. pidfile on linux.
 
struct u_debug_gui * debug_gui
 
struct xrt_systemxsys
 The XRT interfaces level system.
 
struct xrt_system_devicesxsysd
 System devices.
 
struct xrt_space_overseerxso
 Space overseer.
 
struct xrt_system_compositorxsysc
 System compositor.
 
struct ipc_shared_memoryisms [IPC_MAX_CLIENTS]
 
struct ipc_server_mainloop ml
 
volatile bool running
 
bool exit_on_disconnect
 
bool exit_when_idle
 
uint64_t last_client_disconnect_ns
 
uint64_t exit_when_idle_delay_ns
 
int64_t start_of_time_timestamp_ns
 Global start of time timestamp.
 
enum u_logging_level log_level
 
struct ipc_thread threads [IPC_MAX_CLIENTS]
 
volatile uint32_t current_slot_index
 
uint32_t id_generator
 Generator for IDs.
 
struct { 
 
   int   active_client_index 
 
   int   last_active_client_index 
 
   uint32_t   connected_client_count 
 
   struct os_mutex   lock 
 
global_state 
 
const struct ipc_server_callbackscallbacks
 Callbacks for server events.
 
void * callback_data
 User data passed to callbacks.
 
bool no_stdin
 Disable listening on stdin for server stop.
 

Detailed Description

Main IPC object for the server.

Member Function Documentation

◆ ipc_server_stop()

int ipc_server_stop ( struct ipc_server s)

Asks the server to shut down, this call is asynchronous and will return immediately.

Use callbacks to be notified when the server stops.

Field Documentation

◆ callback_data

void* ipc_server::callback_data

User data passed to callbacks.

◆ callbacks

const struct ipc_server_callbacks* ipc_server::callbacks

Callbacks for server events.

Referenced by ipc_server_main_common().

◆ id_generator

uint32_t ipc_server::id_generator

Generator for IDs.

◆ no_stdin

bool ipc_server::no_stdin

Disable listening on stdin for server stop.

Referenced by ipc_server_main_common().

◆ process

struct u_process* ipc_server::process

Handle for the current process, e.g. pidfile on linux.

◆ start_of_time_timestamp_ns

int64_t ipc_server::start_of_time_timestamp_ns

Global start of time timestamp.

XrTime that is returned to apps start from this timestamps (with an per app offset applied). In order to ensure that all timestamps for events and other data that is tracked by the runtime within the valid range of XrTime it is offset to be 42 minutes in the past from start of the runtime.

Used to get all the client's xrt_instance::startup_timestamp, to be close to each other but not exactly the same, which is then used to be the base of that app's XrTime start of time.

◆ xso

struct xrt_space_overseer* ipc_server::xso

Space overseer.

Referenced by ipc_server_init_system_if_available_locked().

◆ xsys

struct xrt_system* ipc_server::xsys

◆ xsysc

struct xrt_system_compositor* ipc_server::xsysc

System compositor.

Referenced by ipc_server_init_system_if_available_locked().

◆ xsysd

struct xrt_system_devices* ipc_server::xsysd

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