Monado OpenXR Runtime

Client side IPC code. More...

Collaboration diagram for Client IPC:

Files

file  ipc_client.h
 Common client side code.
 
file  ipc_client_compositor.c
 Client side wrapper of compositor.
 
file  ipc_client_connection.c
 Just the client connection setup/teardown bits.
 
file  ipc_client_connection.h
 More-internal client side code.
 
file  ipc_client_device.c
 IPC Client device.
 
file  ipc_client_hmd.c
 IPC Client HMD device.
 
file  ipc_client_instance.c
 Client side wrapper of instance.
 
file  ipc_client_interface.h
 Interface for IPC client instance code.
 
file  ipc_client_session.c
 Client side wrapper of xrt_session.
 
file  ipc_client_space_overseer.c
 IPC Client space overseer.
 
file  ipc_client_system.c
 Client side wrapper of xrt_system.
 
file  ipc_client_system_devices.c
 IPC Client system devices.
 
file  ipc_client_xdev.c
 Shared functions for IPC client xrt_device.
 
file  ipc_client_xdev.h
 Shared functions for IPC client xrt_device.
 

Data Structures

struct  ipc_client_session
 IPC client implementation of xrt_session. More...
 
struct  ipc_client_system
 IPC client implementation of xrt_system. More...
 
struct  ipc_client_xdev
 An IPC client proxy for an xrt_device. More...
 

Typedefs

typedef struct ipc_client_xdev ipc_client_device_t
 An IPC client proxy for an controller or other non-MHD xrt_device and ipc_client_xdev. More...
 
typedef struct ipc_client_xdev ipc_client_hmd_t
 An IPC client proxy for an HMD xrt_device and ipc_client_xdev. More...
 

Functions

xrt_result_t ipc_client_connection_init (struct ipc_connection *ipc_c, enum u_logging_level log_level, const struct xrt_instance_info *i_info)
 Set up the basics of the client connection: socket and shared mem. More...
 
static void ipc_client_connection_lock (struct ipc_connection *ipc_c)
 Locks the connection, allows sending complex messages. More...
 
static void ipc_client_connection_unlock (struct ipc_connection *ipc_c)
 Unlocks the connection. More...
 
void ipc_client_connection_fini (struct ipc_connection *ipc_c)
 Tear down the basics of the client connection: socket and shared mem. More...
 
xrt_result_t ipc_instance_create (const struct xrt_instance_info *i_info, struct xrt_instance **out_xinst)
 Create a IPC client instance, connects to a IPC server. More...
 
static struct ipc_client_xdevipc_client_xdev (struct xrt_device *xdev)
 Convenience helper to go from a xdev to ipc_client_xdev. More...
 
void ipc_client_xdev::ipc_client_xdev_init (struct ipc_client_xdev *icx, struct ipc_connection *ipc_c, struct xrt_tracking_origin *xtrack, uint32_t device_id)
 Initializes a ipc_client_xdev so that it's basically fully usable as a xrt_device object. More...
 
void ipc_client_xdev::ipc_client_xdev_fini (struct ipc_client_xdev *icx)
 Frees any memory that was allocated as part of init and resets some pointers. More...
 

Detailed Description

Client side IPC code.

Typedef Documentation

◆ ipc_client_device_t

#include <ipc/client/ipc_client_device.c>

An IPC client proxy for an controller or other non-MHD xrt_device and ipc_client_xdev.

Using a typedef reduce impact of refactor change.

◆ ipc_client_hmd_t

#include <ipc/client/ipc_client_hmd.c>

An IPC client proxy for an HMD xrt_device and ipc_client_xdev.

Using a typedef reduce impact of refactor change.

Function Documentation

◆ ipc_client_connection_fini()

void ipc_client_connection_fini ( struct ipc_connection ipc_c)

#include <ipc/client/ipc_client_connection.h>

Tear down the basics of the client connection: socket and shared mem.

Parameters
ipc_cinitialized IPC connection struct
Todo:
how to tear down the shared memory?

References ipc_message_channel::ipc_message_channel_close(), os_mutex::os_mutex_destroy(), and xrt_shmem_handle_t::XRT_SHMEM_HANDLE_INVALID.

Referenced by mnd_root_destroy().

◆ ipc_client_connection_init()

xrt_result_t ipc_client_connection_init ( struct ipc_connection ipc_c,
enum u_logging_level  log_level,
const struct xrt_instance_info i_info 
)

#include <ipc/client/ipc_client_connection.h>

Set up the basics of the client connection: socket and shared mem.

Parameters
ipc_cEmpty IPC connection struct
log_levelLog level for IPC messages
i_infoInstance info to send to server
Returns
XRT_SUCCESS on success

◆ ipc_client_connection_lock()

static void ipc_client_connection_lock ( struct ipc_connection ipc_c)
inlinestatic

#include <ipc/client/ipc_client_connection.h>

Locks the connection, allows sending complex messages.

Parameters
ipc_cThe IPC connection to lock.

References os_mutex::os_mutex_lock().

Referenced by xrt_device::ipc_client_xdev_get_plane_detections_ext().

◆ ipc_client_connection_unlock()

static void ipc_client_connection_unlock ( struct ipc_connection ipc_c)
inlinestatic

#include <ipc/client/ipc_client_connection.h>

Unlocks the connection.

Parameters
ipc_cA locked IPC connection to unlock.

References os_mutex::os_mutex_unlock().

◆ ipc_client_xdev()

◆ ipc_client_xdev_fini()

void ipc_client_xdev_fini ( struct ipc_client_xdev icx)

Frees any memory that was allocated as part of init and resets some pointers.

References xrt_device::inputs, and xrt_device::outputs.

◆ ipc_client_xdev_init()

void ipc_client_xdev_init ( struct ipc_client_xdev icx,
struct ipc_connection ipc_c,
struct xrt_tracking_origin xtrack,
uint32_t  device_id 
)

Initializes a ipc_client_xdev so that it's basically fully usable as a xrt_device object.

Does not fill in the destroy function or the any if the HMD components / functions.

References ipc_shared_memory::isdevs, and xrt_device::update_inputs.

◆ ipc_instance_create()

xrt_result_t ipc_instance_create ( const struct xrt_instance_info i_info,
struct xrt_instance **  out_xinst 
)

#include <ipc/client/ipc_client_interface.h>

Create a IPC client instance, connects to a IPC server.

See also
ipc_design