    

 ## On this page

  

 

 # ensight\_grpc.EnSightGRPC Class Reference

 Last update: 16.07.2025 

Python binding for the EnSight client gRPC API. [More...](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#details)

Inheritance diagram for ensight_grpc.EnSightGRPC:

 ![](/sites/default/files/migrate-content/tools_for_ensight_post_processing_import/classensight__grpc_1_1_en_sight_g_r_p_c.png)



## <a id="pub-methods" name="pub-methods"></a>Public Member Functions

def [\_\_init\_\_](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a8ee6669d7985844654e2bbf9424f8f78) (self, [port](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#aba8a316de83d60d8e336d5aa0c6b81b9)=12345, [host](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a8636a0a4c5cd251a170e5a74062a85ad)='127.0.0.1', version='') create an instance of the EnSight gRPC interface wrapper [More...](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a8ee6669d7985844654e2bbf9424f8f78)  
 def [host](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a8636a0a4c5cd251a170e5a74062a85ad) (self) get the hostname for this connection [More...](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a8636a0a4c5cd251a170e5a74062a85ad)  
 def [port](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#aba8a316de83d60d8e336d5aa0c6b81b9) (self) get the port number for this connection [More...](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#aba8a316de83d60d8e336d5aa0c6b81b9)  
 def [set\_security\_token](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a486d4c52d83f0e87bc3597eb9c9e5be8) (self, n) set the security token for the gRPC connection. [More...](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a486d4c52d83f0e87bc3597eb9c9e5be8)  
 def [security\_token](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a77a79eaefba2c31fe9c0fb79cfce33ec) (self) return the security token for the gRPC connection. [More...](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a77a79eaefba2c31fe9c0fb79cfce33ec)  
 def [shutdown](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a5ddd86d9e961a5877d2bd7bbf5dc00be) (self) shut down all gRPC connections [More...](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a5ddd86d9e961a5877d2bd7bbf5dc00be)  
 def [start\_server](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a67ce94a9e4e719738045e46995a7d2bc) (self) Start an EnSight gRPC server instance. [More...](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a67ce94a9e4e719738045e46995a7d2bc)  
 def [stop\_server](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#aa4eebb244cc65980a49641277f44e335) (self) shut down any gPRC connection made by this class [More...](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#aa4eebb244cc65980a49641277f44e335)  
 def [is\_connected](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a8fc7d16e77608ebf9fac994cfe6c6962) (self) check if a gRPC connection has been established [More...](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a8fc7d16e77608ebf9fac994cfe6c6962)  
 def [connect](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a159a6958683fa9a20a2ec0dc6b042d64) (self, timeout=15.0) establish a connection to an EnSight gRPC server [More...](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a159a6958683fa9a20a2ec0dc6b042d64)  
 def [render](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a84d1219b2212bd20046fbbad4e8d3a16) (self, width=640, height=480, aa=1, raw=False, highlighting=False) render the current EnSight screen and return the image [More...](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a84d1219b2212bd20046fbbad4e8d3a16)  
 def [geometry](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#aceff36a440081a2bd9883e06c8aad3e9) (self) return the current scene geometry in glTF format [More...](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#aceff36a440081a2bd9883e06c8aad3e9)  
 def [command](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a39f58e6eb36ca8f1da5a68340e4f7cfb) (self, command\_string, do\_eval=True, json=False) send a Python command string to be executed in EnSight [More...](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a39f58e6eb36ca8f1da5a68340e4f7cfb)  
 def [image\_stream\_enable](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a1b458ced85e5762a65f6350bb44d4663) (self, flip\_vertical=False) enable a simple gRPC-based image stream from EnSight [More...](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a1b458ced85e5762a65f6350bb44d4663)  
 def [get\_image](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a7c97a3695f88cca927e038db0a89166b) (self) retrieve the current EnSight image [More...](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a7c97a3695f88cca927e038db0a89166b)  
 def [image\_stream\_is\_enabled](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a4c9628794a89801fb2755e8b83275409) (self) check to see if the image stream is enabled [More...](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a4c9628794a89801fb2755e8b83275409)  
 def [prefix](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a07c8395c90161e48c4c87fa44fa75dd5) (self) return the unique prefix for this instance [More...](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a07c8395c90161e48c4c87fa44fa75dd5)  
 def [event\_stream\_enable](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a96ae8db8010e96b3a132aab095054bcd) (self) enable a simple gRPC-based event stream from EnSight [More...](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a96ae8db8010e96b3a132aab095054bcd)  
 def [dynamic\_scene\_graph\_stream](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#af0b01c8104a2c8424352c03156295446) (self, client\_cmds) open up a dynamic scene graph stream [More...](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#af0b01c8104a2c8424352c03156295446)  
 def [event\_stream\_is\_enabled](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a257fac6f7ebc52f5590052ce5e26bf1a) (self) check to see if the event stream is enabled [More...](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a257fac6f7ebc52f5590052ce5e26bf1a)  
 def [get\_event](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#ae9476edbbeb3f2c866b406d6f49a878d) (self) retrieve and remove the oldest [ensightservice::EventReply](structensightservice_1_1_event_reply.xhtml) string [More...](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#ae9476edbbeb3f2c866b406d6f49a878d)  
 def [subscribe\_events](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a5c37ea23b40c16cea4dcce1fa4168ff9) (self) subscribe to an event stream using a locally launched gRPC server [More...](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a5c37ea23b40c16cea4dcce1fa4168ff9)  
 def [subscribe\_images](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#aa302bfab5b17ea395432a153c264e823) (self, flip\_vertical=False, use\_shmem=True) subscribe to an image stream [More...](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#aa302bfab5b17ea395432a153c264e823)  
 def [unsubscribe](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a7987c8afd724e4474091050ff177dcde) (self) unsubscribe from any image or event streams that have been subscribed to [More...](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a7987c8afd724e4474091050ff177dcde)  
 <a id="details" name="details"></a>## Detailed Description

Python binding for the EnSight client gRPC API.

This class provides an asynchronous interface to the EnSight core gRPC interface. It can handle remote image and event streams, providing a much simpler interface to the EnSight application

Definition at line [35](ensight__grpc_8py_source.xhtml#l00035) of file [ensight\_grpc.py](ensight__grpc_8py_source.xhtml).



## Constructor &amp; Destructor Documentation

<a id="a8ee6669d7985844654e2bbf9424f8f78"></a>## [◆ ](#a8ee6669d7985844654e2bbf9424f8f78)\_\_init\_\_()

 def ensight\_grpc.EnSightGRPC.\_\_init\_\_  (   *self*,      *port* = `12345`,      *host* = `'127.0.0.1'`,      *version* = `''`   ) 

create an instance of the EnSight gRPC interface wrapper

The default is to make a connection to an EnSight gRPC server on port 12345 on the loopback host. If requested to launch the server, it will be the current version.

Parameters portThe port number of the EnSight gRPC server hostThe hostname of the EnSight gRPC server versionA specific EnSight version number to run (e.g. '222' for 2022R2) Definition at line [45](ensight__grpc_8py_source.xhtml#l00045) of file [ensight\_grpc.py](ensight__grpc_8py_source.xhtml).





## Member Function Documentation

<a id="a39f58e6eb36ca8f1da5a68340e4f7cfb"></a>## [◆ ](#a39f58e6eb36ca8f1da5a68340e4f7cfb)command()

 def ensight\_grpc.EnSightGRPC.command  (   *self*,      *command\_string*,      *do\_eval* = `True`,      *json* = `False`   ) 

send a Python command string to be executed in EnSight

The string will be run or evaluated in the EnSight Python interpreter via the [EnSightService::RunPython()](group___en_sight_service.xhtml#ga73690c0e3495951863406e26dd7f906b) gRPC all. If an exception or other error occurs, this function will throw a RuntimeError. If do\_eval is False, the return value will be None, otherwise it will be the result of eval() of the string.

Parameters command\_stringthe string to be executed do\_evalif True, the string will be run via "eval()" and the results returned jsonIf true, the value returned with do\_eval() will be encoded via json, otherwise it will be a Python object Definition at line [245](ensight__grpc_8py_source.xhtml#l00245) of file [ensight\_grpc.py](ensight__grpc_8py_source.xhtml).





<a id="a159a6958683fa9a20a2ec0dc6b042d64"></a>## [◆ ](#a159a6958683fa9a20a2ec0dc6b042d64)connect()

 def ensight\_grpc.EnSightGRPC.connect  (   *self*,      *timeout* = `15.0`   ) 

establish a connection to an EnSight gRPC server

Attempt to connect to an EnSight gRPC server using the host and port established by the constructor. Note on failure, this function just returns, but [is\_connected()](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a8fc7d16e77608ebf9fac994cfe6c6962 "check if a gRPC connection has been established") will return False.

Parameters timeouthow long to wait for the connection to timeout. Definition at line [174](ensight__grpc_8py_source.xhtml#l00174) of file [ensight\_grpc.py](ensight__grpc_8py_source.xhtml).





<a id="af0b01c8104a2c8424352c03156295446"></a>## [◆ ](#af0b01c8104a2c8424352c03156295446)dynamic\_scene\_graph\_stream()

 def ensight\_grpc.EnSightGRPC.dynamic\_scene\_graph\_stream  (   *self*,      *client\_cmds*   ) 

open up a dynamic scene graph stream

Make a [DynamicSceneGraphService::GetSceneStream()](group___d_s_g.xhtml#ga013fc67ee73abc7c3d7ce82115972b67 "Start a new dynamic scene graph stream.") rpc call and return a [ensightservice::SceneUpdateCommand](structensightservice_1_1_scene_update_command.xhtml "Aggregate command sent by EnSight to a client.") stream instance.

Parameters client\_cmdsan iterator that produces [ensightservice::SceneClientCommand](structensightservice_1_1_scene_client_command.xhtml "Aggregate command sent by a dynamic scene graph client.") objects Returnsa [ensightservice::SceneUpdateCommand](structensightservice_1_1_scene_update_command.xhtml "Aggregate command sent by EnSight to a client.") stream instance Definition at line [377](ensight__grpc_8py_source.xhtml#l00377) of file [ensight\_grpc.py](ensight__grpc_8py_source.xhtml).





<a id="a96ae8db8010e96b3a132aab095054bcd"></a>## [◆ ](#a96ae8db8010e96b3a132aab095054bcd)event\_stream\_enable()

 def ensight\_grpc.EnSightGRPC.event\_stream\_enable  (   *self*) 

enable a simple gRPC-based event stream from EnSight

This method makes a [EnSightService::GetEventStream()](group___en_sight_service.xhtml#gab64a0bc516588def314e022736cc1dcc) gRPC call into EnSight, returning an [ensightservice::EventReply](structensightservice_1_1_event_reply.xhtml) stream. The method creates a thread to hold this stream open and read new events from it. The thread adds the event strings to a list of events stored on this instance. These can be retrieved using [get\_event()](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#ae9476edbbeb3f2c866b406d6f49a878d "retrieve and remove the oldest ensightservice::EventReply string").

Definition at line [361](ensight__grpc_8py_source.xhtml#l00361) of file [ensight\_grpc.py](ensight__grpc_8py_source.xhtml).





<a id="a257fac6f7ebc52f5590052ce5e26bf1a"></a>## [◆ ](#a257fac6f7ebc52f5590052ce5e26bf1a)event\_stream\_is\_enabled()

 def ensight\_grpc.EnSightGRPC.event\_stream\_is\_enabled  (   *self*) 

check to see if the event stream is enabled

If an event stream has been successfully established via [event\_stream\_enable()](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a96ae8db8010e96b3a132aab095054bcd "enable a simple gRPC-based event stream from EnSight"), then this function returns True

ReturnsTrue if a [ensightservice::EventReply](structensightservice_1_1_event_reply.xhtml) steam is active Definition at line [386](ensight__grpc_8py_source.xhtml#l00386) of file [ensight\_grpc.py](ensight__grpc_8py_source.xhtml).





<a id="aceff36a440081a2bd9883e06c8aad3e9"></a>## [◆ ](#aceff36a440081a2bd9883e06c8aad3e9)geometry()

 def ensight\_grpc.EnSightGRPC.geometry  (   *self*) 

return the current scene geometry in glTF format

Package up the geometry currently being viewed in the EnSight session as a glTF stream. Return this stream as an array of byte. Note: no interrmediate files are utilized.

Definition at line [227](ensight__grpc_8py_source.xhtml#l00227) of file [ensight\_grpc.py](ensight__grpc_8py_source.xhtml).





<a id="ae9476edbbeb3f2c866b406d6f49a878d"></a>## [◆ ](#ae9476edbbeb3f2c866b406d6f49a878d)get\_event()

 def ensight\_grpc.EnSightGRPC.get\_event  (   *self*) 

retrieve and remove the oldest [ensightservice::EventReply](structensightservice_1_1_event_reply.xhtml) string

When any of the event streaming systems is enabled, Python threads will receive the event records and store them in this instance in an ordered fashion. This method retrieves the oldest [ensightservice::EventReply](structensightservice_1_1_event_reply.xhtml) string in the queue.

Returnsthe even string or None if no events are available Definition at line [396](ensight__grpc_8py_source.xhtml#l00396) of file [ensight\_grpc.py](ensight__grpc_8py_source.xhtml).





<a id="a7c97a3695f88cca927e038db0a89166b"></a>## [◆ ](#a7c97a3695f88cca927e038db0a89166b)get\_image()

 def ensight\_grpc.EnSightGRPC.get\_image  (   *self*) 

retrieve the current EnSight image

When any of the image streaming systems is enabled, Python threads will receive the most recent image and store them in this instance. The frame stored in this instance can be accessed by calling this method

Returnsthe image dict(pixels=bytearray, width=w, height=h) and the image frame number Definition at line [290](ensight__grpc_8py_source.xhtml#l00290) of file [ensight\_grpc.py](ensight__grpc_8py_source.xhtml).





<a id="a8636a0a4c5cd251a170e5a74062a85ad"></a>## [◆ ](#a8636a0a4c5cd251a170e5a74062a85ad)host()

 def ensight\_grpc.EnSightGRPC.host  (   *self*) 

get the hostname for this connection

Returns the current connection hostname.

Definition at line [72](ensight__grpc_8py_source.xhtml#l00072) of file [ensight\_grpc.py](ensight__grpc_8py_source.xhtml).





<a id="a1b458ced85e5762a65f6350bb44d4663"></a>## [◆ ](#a1b458ced85e5762a65f6350bb44d4663)image\_stream\_enable()

 def ensight\_grpc.EnSightGRPC.image\_stream\_enable  (   *self*,      *flip\_vertical* = `False`   ) 

enable a simple gRPC-based image stream from EnSight

This method makes a [EnSightService::GetImageStream()](group___en_sight_service.xhtml#gaec3249209f41b4042cd2c24ba7f11024) gRPC call into EnSight, returning an [ensightservice::ImageReply](structensightservice_1_1_image_reply.xhtml "An image frame message.") stream. The method creates a thread to hold this stream open and read new image frames from it. The thread places the read images in this object. An external application can retrieve the most recent one using [get\_image()](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a7c97a3695f88cca927e038db0a89166b "retrieve the current EnSight image").

Parameters flip\_verticalIf True, the image will be flipped over the X axis before being sent from EnSight. Definition at line [273](ensight__grpc_8py_source.xhtml#l00273) of file [ensight\_grpc.py](ensight__grpc_8py_source.xhtml).





<a id="a4c9628794a89801fb2755e8b83275409"></a>## [◆ ](#a4c9628794a89801fb2755e8b83275409)image\_stream\_is\_enabled()

 def ensight\_grpc.EnSightGRPC.image\_stream\_is\_enabled  (   *self*) 

check to see if the image stream is enabled

If an image stream has been successfully established via [image\_stream\_enable()](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a1b458ced85e5762a65f6350bb44d4663 "enable a simple gRPC-based image stream from EnSight"), then this function returns True

ReturnsTrue if a [ensightservice::ImageReply](structensightservice_1_1_image_reply.xhtml "An image frame message.") steam is active Definition at line [340](ensight__grpc_8py_source.xhtml#l00340) of file [ensight\_grpc.py](ensight__grpc_8py_source.xhtml).





<a id="a8fc7d16e77608ebf9fac994cfe6c6962"></a>## [◆ ](#a8fc7d16e77608ebf9fac994cfe6c6962)is\_connected()

 def ensight\_grpc.EnSightGRPC.is\_connected  (   *self*) 

check if a gRPC connection has been established

Returns True if a previous [connect()](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a159a6958683fa9a20a2ec0dc6b042d64 "establish a connection to an EnSight gRPC server") call made a valid gRPC connection.

Definition at line [165](ensight__grpc_8py_source.xhtml#l00165) of file [ensight\_grpc.py](ensight__grpc_8py_source.xhtml).





<a id="aba8a316de83d60d8e336d5aa0c6b81b9"></a>## [◆ ](#aba8a316de83d60d8e336d5aa0c6b81b9)port()

 def ensight\_grpc.EnSightGRPC.port  (   *self*) 

get the port number for this connection

Returns the current connection port number.

Definition at line [78](ensight__grpc_8py_source.xhtml#l00078) of file [ensight\_grpc.py](ensight__grpc_8py_source.xhtml).





<a id="a07c8395c90161e48c4c87fa44fa75dd5"></a>## [◆ ](#a07c8395c90161e48c4c87fa44fa75dd5)prefix()

 def ensight\_grpc.EnSightGRPC.prefix  (   *self*) 

return the unique prefix for this instance

Many of the EnSight gRPC APIs require a unique prefix so that EnSight can handle multiple, simultaneous remote connections. This method will generate a GUID-based prefix.

ReturnsA unique prefix string of the form: grpc://{uuid}/ Definition at line [349](ensight__grpc_8py_source.xhtml#l00349) of file [ensight\_grpc.py](ensight__grpc_8py_source.xhtml).





<a id="a84d1219b2212bd20046fbbad4e8d3a16"></a>## [◆ ](#a84d1219b2212bd20046fbbad4e8d3a16)render()

 def ensight\_grpc.EnSightGRPC.render  (   *self*,      *width* = `640`,      *height* = `480`,      *aa* = `1`,      *raw* = `False`,      *highlighting* = `False`   ) 

render the current EnSight screen and return the image

Render the current scene at some resolution independent of the current EnSight scene view.

Parameters widthwidth in pixels heightheight in pixels aanumber of anti-aliasing passes rawIf True, the returned array will be width\*height\*3 bytes in size. If False, it will be a byte array in PNG format. highlightingIf True, the current dynamic selection/highlighting will be in the image Definition at line [208](ensight__grpc_8py_source.xhtml#l00208) of file [ensight\_grpc.py](ensight__grpc_8py_source.xhtml).





<a id="a77a79eaefba2c31fe9c0fb79cfce33ec"></a>## [◆ ](#a77a79eaefba2c31fe9c0fb79cfce33ec)security\_token()

 def ensight\_grpc.EnSightGRPC.security\_token  (   *self*) 

return the security token for the gRPC connection.

Returns the current connection security token

Definition at line [96](ensight__grpc_8py_source.xhtml#l00096) of file [ensight\_grpc.py](ensight__grpc_8py_source.xhtml).





<a id="a486d4c52d83f0e87bc3597eb9c9e5be8"></a>## [◆ ](#a486d4c52d83f0e87bc3597eb9c9e5be8)set\_security\_token()

 def ensight\_grpc.EnSightGRPC.set\_security\_token  (   *self*,      *n*   ) 

set the security token for the gRPC connection.

EnSight supports a security token in either numeric (-security {int}) or string (ENSIGHT\_SECURITY\_TOKEN environmental variable) form. If EnSight is using a security token, all gRPC calls must include this token. This call sets the token for all rGPC calls made by this class. Note: for this module, the security token must be a in bytes() format. For example: str(1000).encode("utf-8")

Parameters nan string to be used as the security token Definition at line [90](ensight__grpc_8py_source.xhtml#l00090) of file [ensight\_grpc.py](ensight__grpc_8py_source.xhtml).





<a id="a5ddd86d9e961a5877d2bd7bbf5dc00be"></a>## [◆ ](#a5ddd86d9e961a5877d2bd7bbf5dc00be)shutdown()

 def ensight\_grpc.EnSightGRPC.shutdown  (   *self*) 

shut down all gRPC connections

If this class launched the EnSight client instance, it will send the gRPC exit() call and then shut down all connections.

Definition at line [103](ensight__grpc_8py_source.xhtml#l00103) of file [ensight\_grpc.py](ensight__grpc_8py_source.xhtml).





<a id="a67ce94a9e4e719738045e46995a7d2bc"></a>## [◆ ](#a67ce94a9e4e719738045e46995a7d2bc)start\_server()

 def ensight\_grpc.EnSightGRPC.start\_server  (   *self*) 

Start an EnSight gRPC server instance.

If the host application wishes to launch an EnSight instance, [start\_server()](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a67ce94a9e4e719738045e46995a7d2bc "Start an EnSight gRPC server instance.") will launch a batch mode EnSight application with the security token and a gRPC server started on the port passed in the constructor.

Definition at line [126](ensight__grpc_8py_source.xhtml#l00126) of file [ensight\_grpc.py](ensight__grpc_8py_source.xhtml).





<a id="aa4eebb244cc65980a49641277f44e335"></a>## [◆ ](#aa4eebb244cc65980a49641277f44e335)stop\_server()

 def ensight\_grpc.EnSightGRPC.stop\_server  (   *self*) 

shut down any gPRC connection made by this class

First, if this class launched the EnSight instance, via [start\_server()](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a67ce94a9e4e719738045e46995a7d2bc "Start an EnSight gRPC server instance."), the exit() gRPC command will be sent. Second, the local gRPC connection is dropped.

Definition at line [150](ensight__grpc_8py_source.xhtml#l00150) of file [ensight\_grpc.py](ensight__grpc_8py_source.xhtml).





<a id="a5c37ea23b40c16cea4dcce1fa4168ff9"></a>## [◆ ](#a5c37ea23b40c16cea4dcce1fa4168ff9)subscribe\_events()

 def ensight\_grpc.EnSightGRPC.subscribe\_events  (   *self*) 

subscribe to an event stream using a locally launched gRPC server

This methond makes a [EnSightService::SubscribeEvents()](group___en_sight_service.xhtml#gab466da93dfd6027a2a6dbe5df6902189) gRPC call, causing EnSight to make a reverse gRPC connection over with gRPC calls with the various events will be made.

Definition at line [449](ensight__grpc_8py_source.xhtml#l00449) of file [ensight\_grpc.py](ensight__grpc_8py_source.xhtml).





<a id="aa302bfab5b17ea395432a153c264e823"></a>## [◆ ](#aa302bfab5b17ea395432a153c264e823)subscribe\_images()

 def ensight\_grpc.EnSightGRPC.subscribe\_images  (   *self*,      *flip\_vertical* = `False`,      *use\_shmem* = `True`   ) 

subscribe to an image stream

This methond makes a [EnSightService::SubscribeImages()](group___en_sight_service.xhtml#ga6295c516b8a271034e9ee785991c2e7b) gRPC call. If use\_shmem is False, the transport system will be made over gRPC. It causes EnSight to make a reverse gRPC connection over with gRPC calls with the various images will be made. If use\_shmem is True (the default), the [EnSight gRPC Shared Memory Image Transport API](group__shmem.xhtml) will be used.

Parameters flip\_verticalIf True, the image pixels will be flipped over the X axis use\_shmemIf True, use the shared memory transport, otherwise use reverse gRPC Definition at line [465](ensight__grpc_8py_source.xhtml#l00465) of file [ensight\_grpc.py](ensight__grpc_8py_source.xhtml).





<a id="a7987c8afd724e4474091050ff177dcde"></a>## [◆ ](#a7987c8afd724e4474091050ff177dcde)unsubscribe()

 def ensight\_grpc.EnSightGRPC.unsubscribe  (   *self*) 

unsubscribe from any image or event streams that have been subscribed to

This method makes a [EnSightService::Unsubscribe()](group___en_sight_service.xhtml#ga9161e678fe3d7608820907269d55bf8c) gRPC call. It will cancel any [subscribe\_events()](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#a5c37ea23b40c16cea4dcce1fa4168ff9 "subscribe to an event stream using a locally launched gRPC server") or [subscribe\_images()](classensight__grpc_1_1_en_sight_g_r_p_c.xhtml#aa302bfab5b17ea395432a153c264e823 "subscribe to an image stream") calls.

Definition at line [499](ensight__grpc_8py_source.xhtml#l00499) of file [ensight\_grpc.py](ensight__grpc_8py_source.xhtml).





---

The documentation for this class was generated from the following file:- D:/ANSYSDev/NoBackup/branches/EnSight-Second-Coming/ensight/client/rpc\_interface/[ensight\_grpc.py](ensight__grpc_8py_source.xhtml)