|
Monado OpenXR Runtime
|

Modules | |
| Server Internals | |
| These are only called by the platform-specific mainloop polling code. | |
Files | |
| file | ipc_server.h |
| Common server side code. | |
| file | ipc_server_handler.c |
| Handling functions called from generated dispatch function. | |
| file | ipc_server_interface.h |
| Interface for IPC server code. | |
| file | ipc_server_mainloop_android.c |
| Server mainloop details on Android. | |
| file | ipc_server_mainloop_android.h |
| Additional server entry points needed for Android. | |
| file | ipc_server_mainloop_linux.c |
| Server mainloop details on Linux. | |
| file | ipc_server_mainloop_windows.cpp |
| Server mainloop details on Windows. | |
| file | ipc_server_objects.c |
| Tracking objects to IDs. | |
| file | ipc_server_objects.h |
| Tracking objects to IDs. | |
| file | ipc_server_per_client_thread.c |
| Per client thread listening on the socket. | |
| file | ipc_server_process.c |
| Server process functions. | |
Data Structures | |
| struct | ipc_swapchain_data |
| Information about a single swapchain. More... | |
| struct | ipc_client_state |
| Holds the state for a single client. More... | |
| struct | ipc_server_mainloop |
| Platform-specific mainloop object for the IPC server. More... | |
| struct | ipc_server |
| Main IPC object for the server. More... | |
| struct | ipc_server_main_info |
| Information passed into the IPC server main function, used for customization of the IPC server. More... | |
| struct | ipc_server_callbacks |
Functions | |
| xrt_result_t | ipc_server_init_system_if_available_locked (struct ipc_server *s, volatile struct ipc_client_state *ics, bool *out_available) |
| Finish setting up the server by creating the system, compositor and devices. | |
| xrt_result_t | ipc_server_get_client_app_state (struct ipc_server *s, uint32_t client_id, struct ipc_app_state *out_ias) |
| Get the current state of a client. | |
| xrt_result_t | ipc_server_set_active_client (struct ipc_server *s, uint32_t client_id) |
| Set the new active client. | |
| xrt_result_t | ipc_server_toggle_io_client (struct ipc_server *s, uint32_t client_id) |
| Toggle the io for this client. | |
| xrt_result_t | ipc_server_set_client_io_blocks (struct ipc_server *s, uint32_t client_id, const struct ipc_client_io_blocks *blocks) |
| Block certain types of IO for this client. | |
| void | ipc_server_activate_session (volatile struct ipc_client_state *ics) |
| Called by client threads to set a session to active. | |
| void | ipc_server_deactivate_session (volatile struct ipc_client_state *ics) |
| Called by client threads to set a session to deactivate. | |
| void | ipc_server_update_state (struct ipc_server *s) |
| Called by client threads to recalculate active client. | |
| void * | ipc_server_client_thread (void *_ics) |
| Thread function for the client side dispatching. | |
| int | ipc_server_main_common (const struct ipc_server_main_info *ismi, const struct ipc_server_callbacks *iscb, void *data) |
| Common main function for starting the IPC service. | |
| int | ipc_server_main (int argc, char **argv, const struct ipc_server_main_info *ismi) |
| Main entrypoint to the compositor process. | |
| xrt_result_t | ipc_server_objects_get_xdev_and_validate (volatile struct ipc_client_state *ics, uint32_t id, struct xrt_device **out_xdev) |
| Device functions. | |
| xrt_result_t | ipc_server_objects_get_xdev_id_or_add (volatile struct ipc_client_state *ics, struct xrt_device *xdev, uint32_t *out_id) |
| Get a device ID for a given device object, must only be called from the per client thread as this function accesses the client state's memory. | |
| xrt_result_t | ipc_server_objects_get_xtrack_and_validate (volatile struct ipc_client_state *ics, uint32_t id, struct xrt_tracking_origin **out_xtrack) |
| Tracking origin functions. | |
| xrt_result_t | ipc_server_objects_get_xtrack_id_or_add (volatile struct ipc_client_state *ics, struct xrt_tracking_origin *xtrack, uint32_t *out_id) |
| Get a tracking origin ID for a given tracking origin object, must only be called from the per client thread as this function accesses the client state's memory. | |
Server side IPC code.
| void ipc_server_activate_session | ( | volatile struct ipc_client_state * | ics | ) |
#include <ipc/server/ipc_server.h>
Called by client threads to set a session to active.
References ipc_client_state::server.
| void * ipc_server_client_thread | ( | void * | _ics | ) |
#include <ipc/server/ipc_server.h>
Thread function for the client side dispatching.
Referenced by ipc_server_handle_client_connected().
| void ipc_server_deactivate_session | ( | volatile struct ipc_client_state * | ics | ) |
#include <ipc/server/ipc_server.h>
Called by client threads to set a session to deactivate.
References ipc_client_state::server.
| xrt_result_t ipc_server_get_client_app_state | ( | struct ipc_server * | s, |
| uint32_t | client_id, | ||
| struct ipc_app_state * | out_ias | ||
| ) |
#include <ipc/server/ipc_server.h>
Get the current state of a client.
| xrt_result_t ipc_server_init_system_if_available_locked | ( | struct ipc_server * | s, |
| volatile struct ipc_client_state * | ics, | ||
| bool * | out_available | ||
| ) |
#include <ipc/server/ipc_server.h>
Finish setting up the server by creating the system, compositor and devices.
References ipc_client_state::has_init_shm_system, XRT_SUCCESS, xso, xsys, xsysc, and xsysd.
Referenced by ipc_server_main_common().
| int ipc_server_main | ( | int | argc, |
| char ** | argv, | ||
| const struct ipc_server_main_info * | ismi | ||
| ) |
#include <ipc/server/ipc_server_interface.h>
Main entrypoint to the compositor process.
References ipc_server_callbacks::client_connected, ipc_server_callbacks::client_disconnected, ipc_server_callbacks::init_failed, ipc_server_main_common(), ipc_server_callbacks::mainloop_entering, and ipc_server_callbacks::mainloop_leaving.
| int ipc_server_main_common | ( | const struct ipc_server_main_info * | ismi, |
| const struct ipc_server_callbacks * | iscb, | ||
| void * | data | ||
| ) |
#include <ipc/server/ipc_server_interface.h>
Common main function for starting the IPC service.
References callbacks, ipc_server_main_info::exit_on_disconnect, ipc_server_callbacks::init_failed, ipc_server_init_system_if_available_locked(), ipc_server_callbacks::mainloop_entering, ipc_server_callbacks::mainloop_leaving, no_stdin, ipc_server_main_info::no_stdin, u_debug_gui_create(), u_debug_gui_start(), u_debug_gui_stop(), U_LOG_CHK_ONLY_PRINT, U_LOG_IFL_I, U_TYPED_CALLOC, ipc_server_main_info::udgci, XRT_SUCCESS, and xsysd.
Referenced by ipc_server_main().
| xrt_result_t ipc_server_objects_get_xdev_and_validate | ( | volatile struct ipc_client_state * | ics, |
| uint32_t | id, | ||
| struct xrt_device ** | out_xdev | ||
| ) |
#include <ipc/server/ipc_server_objects.h>
Device functions.
Get a device by ID, must only be called from the per client thread as this function accesses the client state's memory.
| ics | The client state instance. |
| id | The device ID. |
| out_xdev | Will be filled with the device object on success. |
References ipc_client_state::server, ipc_client_state::xdevs, XRT_ERROR_IPC_FAILURE, XRT_SUCCESS, and XRT_SYSTEM_MAX_DEVICES.
| xrt_result_t ipc_server_objects_get_xdev_id_or_add | ( | volatile struct ipc_client_state * | ics, |
| struct xrt_device * | xdev, | ||
| uint32_t * | out_id | ||
| ) |
#include <ipc/server/ipc_server_objects.h>
Get a device ID for a given device object, must only be called from the per client thread as this function accesses the client state's memory.
| ics | The client state instance. |
| xdev | The device object. |
| out_id | Will be filled with the device ID on success. |
References ipc_server_objects_get_xtrack_id_or_add(), ipc_client_state::server, xrt_device::str, xrt_device::tracking_origin, ipc_client_state::xdevs, XRT_ERROR_IPC_FAILURE, XRT_SUCCESS, and XRT_SYSTEM_MAX_DEVICES.
| xrt_result_t ipc_server_objects_get_xtrack_and_validate | ( | volatile struct ipc_client_state * | ics, |
| uint32_t | id, | ||
| struct xrt_tracking_origin ** | out_xtrack | ||
| ) |
#include <ipc/server/ipc_server_objects.h>
Tracking origin functions.
Get a tracking origin by ID, must only be called from the per client thread as this function accesses the client state's memory.
| ics | The client state instance. |
| id | The tracking origin ID. |
| out_xtrack | Will be filled with the tracking origin object on success. |
References ipc_client_state::server, XRT_ERROR_IPC_FAILURE, XRT_SUCCESS, XRT_SYSTEM_MAX_DEVICES, and ipc_client_state::xtracks.
| xrt_result_t ipc_server_objects_get_xtrack_id_or_add | ( | volatile struct ipc_client_state * | ics, |
| struct xrt_tracking_origin * | xtrack, | ||
| uint32_t * | out_id | ||
| ) |
#include <ipc/server/ipc_server_objects.h>
Get a tracking origin ID for a given tracking origin object, must only be called from the per client thread as this function accesses the client state's memory.
| ics | The client state instance. |
| xtrack | The tracking origin object. |
| out_id | Will be filled with the tracking origin ID on success. |
References xrt_tracking_origin::name, ipc_client_state::server, XRT_ERROR_IPC_FAILURE, XRT_SUCCESS, XRT_SYSTEM_MAX_DEVICES, and ipc_client_state::xtracks.
Referenced by ipc_server_objects_get_xdev_id_or_add().
| xrt_result_t ipc_server_set_active_client | ( | struct ipc_server * | s, |
| uint32_t | client_id | ||
| ) |
#include <ipc/server/ipc_server.h>
Set the new active client.
| xrt_result_t ipc_server_set_client_io_blocks | ( | struct ipc_server * | s, |
| uint32_t | client_id, | ||
| const struct ipc_client_io_blocks * | blocks | ||
| ) |
#include <ipc/server/ipc_server.h>
Block certain types of IO for this client.
| xrt_result_t ipc_server_toggle_io_client | ( | struct ipc_server * | s, |
| uint32_t | client_id | ||
| ) |
#include <ipc/server/ipc_server.h>
Toggle the io for this client.
| void ipc_server_update_state | ( | struct ipc_server * | s | ) |
#include <ipc/server/ipc_server.h>
Called by client threads to recalculate active client.