Skip to main content

Post-processing tools 2023 R2

EnSightService

Last update: 17.04.2023

The core EnSight gRPC service. More...

Functions

rpc ensightservice::EnSightService::RunPython (PythonRequest pythonrequest) returns(PythonReply)
 
rpc ensightservice::EnSightService::RenderImage (RenderRequest renderrequest) returns(RenderReply)
 
rpc ensightservice::EnSightService::GetGeometry (GeometryRequest geometryrequest) returns(GeometryReply)
 
rpc ensightservice::EnSightService::Exit (ExitRequest exitrequest) returns(ExitReply)
 
rpc ensightservice::EnSightService::GetEventStream (EventStreamRequest eventstreamrequest) returns(stream EventReply)
 
rpc ensightservice::EnSightService::SubscribeEvents (SubscribeEventOptions subscribeeventoptions) returns(GenericResponse)
 
rpc ensightservice::EnSightService::SubscribeImages (SubscribeImageOptions subscribeimageoptions) returns(GenericResponse)
 
rpc ensightservice::EnSightService::Unsubscribe (Prefix prefix) returns(GenericResponse)
 
rpc ensightservice::EnSightService::GetImageStream (ImageStreamRequest imagestreamrequest) returns(stream ImageReply)
 
rpc ensightservice::EnSightService::AnimSave (AnimSaveRequest animsaverequest) returns(AnimSaveReply)
 
rpc ensightservice::EnSightService::AnimQueryProgress (AnimQueryProgressRequest animqueryprogressrequest) returns(AnimQueryProgressReply)
 

Detailed Description

The core EnSight gRPC service.

The remote EnSight command and control functions provided by the EnSight core. They provide access to the EnSight Python interpreter, scene geometry (via glTF blobs), the generated image stream and the internal event queue. Custom, special purpose interfaces exist for other applications. Most of these calls require the complete attention of the EnSight core to perform their operations and thus will block until the EnSight core becomes available. Calls that do not block in this fashion are marked "(non-blocking)" in their description.

Function Documentation

◆ AnimQueryProgress()

rpc ensightservice::EnSightService::AnimQueryProgress ( AnimQueryProgressRequest  animqueryprogressrequest)

An interface to query the progress an animation being saved

Returns
AnimQueryProgressReply describing progress toward completion

Definition at line 114 of file ensight.proto.

◆ AnimSave()

rpc ensightservice::EnSightService::AnimSave ( AnimSaveRequest  animsaverequest)

An interface to save an image or animation

Returns
AnimSaveReply

Definition at line 110 of file ensight.proto.

◆ Exit()

rpc ensightservice::EnSightService::Exit ( ExitRequest  exitrequest)

Shutdown EnSight session

Returns
ExitReply an acknowledgment from the EnSight server

Definition at line 52 of file ensight.proto.

◆ GetEventStream()

rpc ensightservice::EnSightService::GetEventStream ( EventStreamRequest  eventstreamrequest)

Enable a filtered stream of callback events from the EnSight session (non-blocking)

EnSight supports a callback registration system that can associate a callback with with any attribute change in the client. This is the ensight.objs.addcallback() Python call. For example:

ensight.objs.addcallback(ensight.objs.core, None, prefix+"PARTLIST_CHANGED",
attrs=['PARTS'], flags=ensight.objs.EVENTMAP_FLAG_COMP_GLOBAL)

will register a callback event associated with any changes in the ensight.objs.core.PARTS attribute. When this happens, EnSight will emit an event with the string "prefix+'PARTLIST_CHANGED'". The gRPC interface enables a stream of these event strings to be returned to the calling application in EventReply messages. It also provides a simple prefix filter, so that only messages that start with the specific prefix will be returned on the event stream. This prefix is passed in the EventStreamRequest message.

Returns
EventReply a stream of EventReply messages for each emitted event

Definition at line 70 of file ensight.proto.

◆ GetGeometry()

rpc ensightservice::EnSightService::GetGeometry ( GeometryRequest  geometryrequest)

Return current scene geometry representation

Returns
GeometryReply the current scene geometry in glTF format

Definition at line 48 of file ensight.proto.

◆ GetImageStream()

rpc ensightservice::EnSightService::GetImageStream ( ImageStreamRequest  imagestreamrequest)

Enable a stream of rendered images from the EnSight session (non-blocking)

A stream of the images rendered by EnSight.

Returns
ImageReply a stream of ImageReply messages for each image rendered

Definition at line 106 of file ensight.proto.

◆ RenderImage()

rpc ensightservice::EnSightService::RenderImage ( RenderRequest  renderrequest)

Render an image of the current scene

Returns
RenderReply the rendered image

Definition at line 44 of file ensight.proto.

◆ RunPython()

rpc ensightservice::EnSightService::RunPython ( PythonRequest  pythonrequest)

Run a Python command string in the EnSight Python interpreter

Returns
PythonReply the result of the string

Definition at line 40 of file ensight.proto.

◆ SubscribeEvents()

rpc ensightservice::EnSightService::SubscribeEvents ( SubscribeEventOptions  subscribeeventoptions)

Subscribe to the EnSight event stream via reverse gRPC connection (non-blocking)

Some gRPC clients have demonstrated problems maintaining a continuous EventReply stream. For these clients, it is possible for the client to reverse the gRPC connection so EnSight will make gRPC calls back to the client. In this case, the client application will start an EnSightSubscription service and inform EnSight of how to connect to it via SubscribeEventOptions. EnSight will then make PublishEvent calls with the EventReply messages it would have used in the GetEventStream() configuration.

Definition at line 81 of file ensight.proto.

◆ SubscribeImages()

rpc ensightservice::EnSightService::SubscribeImages ( SubscribeImageOptions  subscribeimageoptions)

Subscribe to the EnSight image stream via reverse gRPC connection (non-blocking)

Some gRPC clients have demonstrated problems maintaining a continuous ImageReply stream. For these clients, it is possible for the client to reverse the gRPC connection so EnSight will make gRPC calls back to the client. In this case, the client application will start an EnSightSubscription service and inform EnSight of how to connect to it via SubscribeImageOptions. EnSight will then make PublishImage calls with a short lived (single image frame) ImageReply message stream it would have used in the GetEventStream() configuration. EnSight will make a separate PublishImage call for every frame of imagery it generates.

Definition at line 93 of file ensight.proto.

◆ Unsubscribe()

rpc ensightservice::EnSightService::Unsubscribe ( Prefix  prefix)

Discontinue a previous established stream subscription (non-blocking)

This call will cause EnSight to stop making gRPC calls to the client gRPC server associated with the prefix string. It can be used to stop a SubscribeEvents() or SubscribeImages() call.

Definition at line 100 of file ensight.proto.