ensight_grpc.py
Last update: 17.04.2023 140 self._pid_pid = subprocess.Popen(cmd, creationflags=DETACHED_PROCESS, close_fds=True, env=my_env).pid
185 self._dsg_stub_dsg_stub = dynamic_scene_graph_pb2_grpc.DynamicSceneGraphServiceStub(self._channel_channel)
214 response = self._stub_stub.RenderImage(ensight_pb2.RenderRequest(type=ret_type, image_width=width,
231 ensight_pb2.GeometryRequest(type=ensight_pb2.GeometryRequest.GEOMETRY_GLB), metadata=self.metadatametadata())
253 response = self._stub_stub.RunPython(ensight_pb2.PythonRequest(type=flags, command=command_string),
278 ensight_pb2.ImageStreamRequest(flip_vertical=flip_vertical, chunk=True), metadata=self.metadatametadata())
365 self._event_stream_event_stream = self._stub_stub.GetEventStream(ensight_pb2.EventStreamRequest(prefix=self.prefixprefix()),
454 event_options = ensight_pb2.SubscribeEventOptions(prefix=self.prefixprefix(), type=conn_type, options=options)
479 self._shmem_client_shmem_client = ensight_grpc_shmem.stream_create(self._shmem_filename_shmem_filename)
491 image_options = ensight_pb2.SubscribeImageOptions(prefix=self.prefixprefix(), type=conn_type, options=options,
Python binding for the EnSight client gRPC API.
Definition: ensight_grpc.py:35
def connect(self, timeout=15.0)
establish a connection to an EnSight gRPC server
Definition: ensight_grpc.py:174
def image_stream_enable(self, flip_vertical=False)
enable a simple gRPC-based image stream from EnSight
Definition: ensight_grpc.py:273
def event_stream_is_enabled(self)
check to see if the event stream is enabled
Definition: ensight_grpc.py:386
def command(self, command_string, do_eval=True, json=False)
send a Python command string to be executed in EnSight
Definition: ensight_grpc.py:245
def set_security_token(self, n)
set the security token for the gRPC connection.
Definition: ensight_grpc.py:90
def image_stream_is_enabled(self)
check to see if the image stream is enabled
Definition: ensight_grpc.py:340
def subscribe_events(self)
subscribe to an event stream using a locally launched gRPC server
Definition: ensight_grpc.py:449
def find_filename(cls, size=1024 *1024 *25)
Definition: ensight_grpc.py:513
def security_token(self)
return the security token for the gRPC connection.
Definition: ensight_grpc.py:96
def unsubscribe(self)
unsubscribe from any image or event streams that have been subscribed to
Definition: ensight_grpc.py:499
def render(self, width=640, height=480, aa=1, raw=False, highlighting=False)
render the current EnSight screen and return the image
Definition: ensight_grpc.py:208
def __init__(self, port=12345, host='127.0.0.1', version='')
create an instance of the EnSight gRPC interface wrapper
Definition: ensight_grpc.py:45
def is_connected(self)
check if a gRPC connection has been established
Definition: ensight_grpc.py:165
def event_stream_enable(self)
enable a simple gRPC-based event stream from EnSight
Definition: ensight_grpc.py:361
def subscribe_images(self, flip_vertical=False, use_shmem=True)
subscribe to an image stream
Definition: ensight_grpc.py:465
def stop_server(self)
shut down any gPRC connection made by this class
Definition: ensight_grpc.py:150
def start_sub_service(self)
Definition: ensight_grpc.py:435
def get_event(self)
retrieve and remove the oldest ensightservice::EventReply string
Definition: ensight_grpc.py:396
def dynamic_scene_graph_stream(self, client_cmds)
open up a dynamic scene graph stream
Definition: ensight_grpc.py:377
rpc GetSceneStream(stream SceneClientCommand) returns(stream SceneUpdateCommand)
Start a new dynamic scene graph stream.
Definition: dynamic_scene_graph.proto:135
rpc SubscribeImages(SubscribeImageOptions subscribeimageoptions) returns(GenericResponse)
Definition: ensight.proto:93
rpc RunPython(PythonRequest pythonrequest) returns(PythonReply)
Definition: ensight.proto:40
rpc Unsubscribe(Prefix prefix) returns(GenericResponse)
Definition: ensight.proto:100
rpc Exit(ExitRequest exitrequest) returns(ExitReply)
Definition: ensight.proto:52
rpc SubscribeEvents(SubscribeEventOptions subscribeeventoptions) returns(GenericResponse)
Definition: ensight.proto:81
rpc GetEventStream(EventStreamRequest eventstreamrequest) returns(stream EventReply)
Definition: ensight.proto:70
rpc RenderImage(RenderRequest renderrequest) returns(RenderReply)
Definition: ensight.proto:44
rpc GetImageStream(ImageStreamRequest imagestreamrequest) returns(stream ImageReply)
Definition: ensight.proto:106
rpc GetGeometry(GeometryRequest geometryrequest) returns(GeometryReply)
Definition: ensight.proto:48
rpc PublishImage(stream ImageReply) returns(GenericResponse)
Definition: ensight.proto:136
rpc PublishEvent(EventReply eventreply) returns(GenericResponse)
Definition: ensight.proto:140