The server_types.py module#
Summary#
Class used to keep in memory the port used by previous servers. |
|
Abstract class for servers. |
|
Abstract class for servers going through the DPFClientAPI. |
|
Client using the gRPC communication protocol. |
|
Server using the gRPC communication protocol. |
|
Server using the InProcess communication protocol. |
|
Provides an instance of the DPF server using InProcess gRPC. |
Check if a valid IP address is entered. |
|
Launch Ansys DPF. |
|
Launch Ansys DPF. |
|
Launch a remote dpf server. |
|
Check DPF grpc server version. |
|
Return the current PATH environment variable value of the system. |
Description#
Server types.
Contains the different kinds of servers available for the factory.
Module detail#
- server_types.check_valid_ip(ip)#
Check if a valid IP address is entered.
This method raises an error when an invalid IP address is entered.
- server_types.launch_dpf(ansys_path, ip=LOCALHOST, port=DPF_DEFAULT_PORT, timeout=10, context: ansys.dpf.core.server_context.ServerContext = None)#
Launch Ansys DPF.
- Parameters:
ansys_path (str, optional) – Root path for the Ansys installation directory. For example,
"/ansys_inc/v212/". The default is the latest Ansys installation.ip (str, optional) – IP address of the remote or local instance to connect to. The default is
"LOCALHOST".port (int) – Port to connect to the remote instance on. The default is
"DPF_DEFAULT_PORT", which is 50054.timeout (float, optional) – Maximum number of seconds for the initialization attempt. The default is
10. Once the specified number of seconds passes, the connection fails.context (, optional) – Context to apply to DPF server when launching it.
- server_types.launch_dpf_on_docker(running_docker_config=server_factory.RunningDockerConfig(), ansys_path=None, ip=LOCALHOST, port=DPF_DEFAULT_PORT, timeout=10.0)#
Launch Ansys DPF.
- Parameters:
running_docker_config (server_factory.RunningDockerConfig, optional) – To start DPF server as a docker, specify the docker configurations here.
ansys_path (str, optional) – Root path for the Ansys installation directory. For example,
"/ansys_inc/v212/". The default is the latest Ansys installation.ip (str, optional) – IP address of the remote or local instance to connect to. The default is
"LOCALHOST".port (int) – Port to connect to the remote instance on. The default is
"DPF_DEFAULT_PORT", which is 50054.timeout (float, optional) – Maximum number of seconds for the initialization attempt. The default is
10. Once the specified number of seconds passes, the connection fails.
- server_types.launch_remote_dpf(version=None)#
Launch a remote dpf server.
- server_types.check_ansys_grpc_dpf_version(server, timeout)#
Check DPF grpc server version.
- server_types.get_system_path() str#
Return the current PATH environment variable value of the system.
- server_types.LOG#
- server_types.DPF_DEFAULT_PORT#
- server_types.LOCALHOST#
- server_types.RUNNING_DOCKER#
- server_types.MAX_PORT = 65535#
- server_types.DpfServer#
- server_types.AnyServerType#