Monado OpenXR Runtime
Loading...
Searching...
No Matches

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_future.c
 IPC Client futures.
 
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_tracking_origin.c
 IPC Client tracking origin management.
 
file  ipc_client_tracking_origin.h
 IPC Client tracking origin management.
 
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_tracking_origin_manager
 Tracking origin manager for IPC client. 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.
 
typedef struct ipc_client_xdev ipc_client_hmd_t
 An IPC client proxy for an HMD xrt_device and ipc_client_xdev.
 

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.
 
static void ipc_client_connection_lock (struct ipc_connection *ipc_c)
 Locks the connection, allows sending complex messages.
 
static void ipc_client_connection_unlock (struct ipc_connection *ipc_c)
 Unlocks the connection.
 
void ipc_client_connection_fini (struct ipc_connection *ipc_c)
 Tear down the basics of the client connection: socket and shared mem.
 
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.
 
xrt_result_t ipc_client_tracking_origin_manager_init (struct ipc_client_tracking_origin_manager *manager, struct ipc_connection *ipc_c)
 Initialize a tracking origin manager.
 
xrt_result_t ipc_client_tracking_origin_manager_get (struct ipc_client_tracking_origin_manager *manager, uint32_t tracking_origin_id, struct xrt_tracking_origin **out_xtrack)
 Get a tracking origin by ID.
 
void ipc_client_tracking_origin_manager_fini (struct ipc_client_tracking_origin_manager *manager)
 Finalize the tracking origin manager and all cached tracking origins.
 
static struct ipc_client_xdevipc_client_xdev (struct xrt_device *xdev)
 Convenience helper to go from a xdev to ipc_client_xdev.
 
xrt_result_t ipc_client_xdev::ipc_client_xdev_init (struct ipc_client_xdev *icx, struct ipc_connection *ipc_c, struct ipc_client_tracking_origin_manager *itom, uint32_t device_id, u_device_destroy_function_t destroy_fn)
 Initializes a ipc_client_xdev so that it's basically fully usable as a xrt_device object.
 
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.
 

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?

Referenced by ipc_client_connection_init(), and 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

References xrt_instance_info::app_info, ipc_client_connection_fini(), xrt_instance_info::platform_info, U_LOG_E, U_ZERO, XRT_ERROR_IPC_FAILURE, XRT_IPC_HANDLE_INVALID, and XRT_SUCCESS.

Referenced by mnd_root_create().

◆ 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.

Referenced by xrt_device::ipc_client_xdev_get_plane_detections_ext(), and ipc_client_xdev::ipc_client_xdev_init().

◆ 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.

Referenced by xrt_device::ipc_client_xdev_get_plane_detections_ext(), and ipc_client_xdev::ipc_client_xdev_init().

◆ ipc_client_tracking_origin_manager_fini()

void ipc_client_tracking_origin_manager_fini ( struct ipc_client_tracking_origin_manager manager)

◆ ipc_client_tracking_origin_manager_get()

◆ ipc_client_tracking_origin_manager_init()

xrt_result_t ipc_client_tracking_origin_manager_init ( struct ipc_client_tracking_origin_manager manager,
struct ipc_connection ipc_c 
)

◆ ipc_client_xdev()

static struct ipc_client_xdev * ipc_client_xdev ( struct xrt_device xdev)
inlinestatic

#include <ipc/client/ipc_client_xdev.h>

Convenience helper to go from a xdev to 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()

xrt_result_t ipc_client_xdev_init ( struct ipc_client_xdev icx,
struct ipc_connection ipc_c,
struct ipc_client_tracking_origin_manager itom,
uint32_t  device_id,
u_device_destroy_function_t  destroy_fn 
)

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 xrt_device::begin_plane_detection_ext, xrt_device::binding_profile_count, ipc_device_info::binding_profile_count, xrt_device::destroy_plane_detection_ext, xrt_device::get_body_joints, xrt_device::get_body_skeleton, xrt_device::get_compositor_info, xrt_device::get_face_calibration_state_android, xrt_device::get_face_tracking, xrt_device::get_hand_tracking, xrt_device::get_output_limits, xrt_device::get_plane_detection_state_ext, xrt_device::get_plane_detections_ext, xrt_device::get_presence, xrt_device::input_count, ipc_device_info::input_count, ipc_binding_profile_info::input_count, xrt_device::inputs, ipc_client_connection_lock(), ipc_client_connection_unlock(), ipc_client_tracking_origin_manager_get(), xrt_binding_profile::name, xrt_device::name, ipc_device_info::name, xrt_device::output_count, ipc_device_info::output_count, ipc_binding_profile_info::output_count, xrt_device::outputs, xrt_device::reset_body_tracking_calibration_meta, xrt_device::serial, ipc_device_info::serial, xrt_device::set_body_tracking_calibration_override_meta, xrt_device::set_output, xrt_device::str, ipc_device_info::str, xrt_device::supported, ipc_device_info::supported, ipc_device_info::total_input_pair_count, ipc_device_info::total_output_pair_count, xrt_device::tracking_origin, ipc_device_info::tracking_origin_id, u_device_populate_function_pointers(), U_TYPED_ARRAY_CALLOC, xrt_device::update_inputs, and XRT_SUCCESS.

◆ 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