MechanicalService#

class ansys.mechanical.core.embedding.rpc.server.MechanicalService(backgroundapp, functions=[], impl=None)#

Bases: rpyc.Service

Starts Mechanical app services.

Overview#

on_connect

Handle client connection.

on_disconnect

Handle client disconnection.

exposed_service_upload

Handle file upload request from client.

exposed_service_download

Handle file download request from client.

exposed_service_exit

Exit the server.

Import detail#

from ansys.mechanical.core.embedding.rpc.server import MechanicalService

Attribute detail#

MechanicalService.EMBEDDED = True#

Method detail#

MechanicalService.on_connect(conn)#

Handle client connection.

MechanicalService.on_disconnect(conn)#

Handle client disconnection.

MechanicalService.exposed_service_upload(remote_path, file_data)#

Handle file upload request from client.

MechanicalService.exposed_service_download(remote_path)#

Handle file download request from client.

MechanicalService.exposed_service_exit()#

Exit the server.