RpcSession#

class pyedb.grpc.rpc_session.RpcSession#

Static Class managing RPC server.

Overview#

start

Start RPC-server, the server must be started before opening EDB.

kill

kill_all_instances

close

Terminate the current RPC session. Must be executed at the end of the script to close properly the session.

Import detail#

from pyedb.grpc.rpc_session import RpcSession

Attribute detail#

RpcSession.pid = 0#
RpcSession.rpc_session = None#
RpcSession.base_path = None#
RpcSession.port = 10000#

Method detail#

static RpcSession.start(edb_version, port=0, restart_server=False)#

Start RPC-server, the server must be started before opening EDB.

Parameters:
edb_versionstr, optional.

Specify ANSYS version. If None, the latest installation will be detected on the local machine.

portint, optional

Port number used for the RPC session. If not provided, a random free port is automatically selected.

restart_serverbool, optional.

Force restarting the RPC server by killing the process in case EDB_RPC is already started. All open EDB connection will be lost. This option must be used at the beginning of an application only to ensure the server is properly started.

kill_all_instancesbool, optional.

Force killing all RPC sever instances, including a zombie process. To be used with caution, default value is False.

static RpcSession.kill()#
static RpcSession.kill_all_instances()#
static RpcSession.close()#

Terminate the current RPC session. Must be executed at the end of the script to close properly the session. If not executed, users should force restarting the process using the flag restart_server`=`True.