Monado OpenXR Runtime
|
Client side IPC code. More...
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. | |
Data Structures | |
struct | ipc_client_xdev |
An IPC client proxy for an xrt_device. More... | |
struct | ipc_client_session |
IPC client implementation of xrt_session. More... | |
struct | ipc_client_system |
IPC client implementation of xrt_system. More... | |
Macros | |
#define | IPC_CHK_AND_RET(IPC_C, XRET, FUNC_STR) |
This define will error if XRET is not XRT_SUCCESS , printing out that the FUNC_STR string has failed, then returns XRET . More... | |
#define | IPC_CHK_WITH_GOTO(IPC_C, XRET, FUNC_STR, GOTO) |
This define will error if XRET is not XRT_SUCCESS , printing out that the FUNC_STR string has failed, then gotos GOTO . More... | |
#define | IPC_CHK_WITH_RET(IPC_C, XRET, FUNC_STR, RET) |
This define will error if XRET is not XRT_SUCCESS , printing out that the FUNC_STR string has failed, then returns RET . More... | |
#define | IPC_CHK_ONLY_PRINT(IPC_C, XRET, FUNC_STR) |
This define will error if XRET is not XRT_SUCCESS , printing out that the FUNC_STR string has failed, it only prints and does nothing else. More... | |
#define | IPC_CHK_ALWAYS_RET(IPC_C, XRET, FUNC_STR) |
This define will error if XRET is not XRT_SUCCESS , printing out that the FUNC_STR string has failed, then it will always return the value. 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 | |
static struct ipc_client_xdev * | ipc_client_xdev (struct xrt_device *xdev) |
Convenience helper to go from a xdev to ipc_client_xdev. More... | |
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... | |
Client side IPC code.
#define IPC_CHK_ALWAYS_RET | ( | IPC_C, | |
XRET, | |||
FUNC_STR | |||
) |
#include <ipc/client/ipc_client.h>
This define will error if XRET
is not XRT_SUCCESS
, printing out that the FUNC_STR
string has failed, then it will always return the value.
The argument IPC_C
will be used to look up the cond_level
for the ipc_print_result call.
IPC_C | Client connection, used to look up cond_level . |
XRET | The xrt_result_t to check and always return. |
FUNC_STR | String literal with the function name, used for logging. |
#define IPC_CHK_AND_RET | ( | IPC_C, | |
XRET, | |||
FUNC_STR | |||
) |
#include <ipc/client/ipc_client.h>
This define will error if XRET
is not XRT_SUCCESS
, printing out that the FUNC_STR
string has failed, then returns XRET
.
The argument IPC_C
will be used to look up the cond_level
for the ipc_print_result call.
IPC_C | Client connection, used to look up cond_level . |
XRET | The xrt_result_t to check. |
FUNC_STR | String literal with the function name, used for logging. |
#define IPC_CHK_ONLY_PRINT | ( | IPC_C, | |
XRET, | |||
FUNC_STR | |||
) |
#include <ipc/client/ipc_client.h>
This define will error if XRET
is not XRT_SUCCESS
, printing out that the FUNC_STR
string has failed, it only prints and does nothing else.
The argument IPC_C
will be used to look up the cond_level
for the ipc_print_result call.
IPC_C | Client connection, used to look up cond_level . |
XRET | The xrt_result_t to check. |
FUNC_STR | String literal with the function name, used for logging. |
#define IPC_CHK_WITH_GOTO | ( | IPC_C, | |
XRET, | |||
FUNC_STR, | |||
GOTO | |||
) |
#include <ipc/client/ipc_client.h>
This define will error if XRET
is not XRT_SUCCESS
, printing out that the FUNC_STR
string has failed, then gotos GOTO
.
The argument IPC_C
will be used to look up the cond_level
for the ipc_print_result call.
IPC_C | Client connection, used to look up cond_level . |
XRET | The xrt_result_t to check. |
FUNC_STR | String literal with the function name, used for logging. |
GOTO | Goto label to jump to on error. |
#define IPC_CHK_WITH_RET | ( | IPC_C, | |
XRET, | |||
FUNC_STR, | |||
RET | |||
) |
#include <ipc/client/ipc_client.h>
This define will error if XRET
is not XRT_SUCCESS
, printing out that the FUNC_STR
string has failed, then returns RET
.
The argument IPC_C
will be used to look up the cond_level
for the ipc_print_result call.
IPC_C | Client connection, used to look up cond_level . |
XRET | The xrt_result_t to check. |
FUNC_STR | String literal with the function name, used for logging. |
RET | The value that is returned on error. |
typedef struct ipc_client_xdev 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.
typedef struct ipc_client_xdev 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.
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.
ipc_c | initialized IPC connection struct |
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().
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.
ipc_c | Empty IPC connection struct |
log_level | Log level for IPC messages |
i_info | Instance info to send to server |
|
inlinestatic |
#include <ipc/client/ipc_client_connection.h>
Locks the connection, allows sending complex messages.
ipc_c | The IPC connection to lock. |
References os_mutex::os_mutex_lock().
|
inlinestatic |
#include <ipc/client/ipc_client_connection.h>
Unlocks the connection.
ipc_c | A locked IPC connection to unlock. |
References os_mutex::os_mutex_unlock().
|
inlinestatic |
#include <ipc/client/ipc_client.h>
Convenience helper to go from a xdev to ipc_client_xdev.
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.