Skip to main content

Post-processing tools 2023 R2

Shared Memory Image Transport

Last update: 17.04.2023

A memory mapped file (shared memory) image transport system. More...

Detailed Description

A memory mapped file (shared memory) image transport system.

EnSight gRPC Shared Memory Image Transport API

The EnSight grpc API provides several mechanisms for streaming imagery from the core EnSight application to other applications. These include vnc and over grpc itself (via stream push or subscribe pull). Unfortunately, these approaches require encoding/transmission over TCP/IP which can limit the effective performance of the system, especially with large frame imagery. An extension to the Subscribe() grpc interface is the ability to pass imagery over a memory mapped file.
To start using the API, the shared_memory_image_client.h interface is a good place to start. The source code to the library as well as a pre-compiled binary of the library are included in the EnSight distribution. The files will be include in the directory:
{ANSYSROOT}/v{ANSYSVER}/CEI/apex{ANSYSVER}/machines/{ARCH}/CEI/shmem_image_transport

This approach is much faster than the other (easily capable of 60Hz 4K image streams on modern hardware), but are limited to situations where the EnSight and the client application are running on the same system.
Note: the underlying C library is quite generic and can be used from both C/C++ and Python applications quite easily.

Server Documentation: shared_memory_image_client_priv.h
C API for the shared memory image transport API server interface

C Client Documentation: shared_memory_image_client.h
C API for using the EnSight grpc shared memory image transport API

Python Client Documentation: shared_memory_image_client_python.c
Python interface to the shared_memory_image_client.h API