Uranium
Application Framework
|
Public Member Functions | |
None | __init__ (self) |
None | setState (self, BackendState new_state) |
None | startEngine (self) |
None | close (self) |
List[bytes] | getLog (self) |
List[str] | getEngineCommand (self) |
![]() | |
str | getId (self) |
None | setPluginId (self, str plugin_id) |
None | setMetaData (self, Dict[str, Any] metadata) |
Dict[str, Any] | getMetaData (self) |
str | getPluginId (self) |
None | setVersion (self, str version) |
str | getVersion (self) |
Static Public Attributes | |
processingProgress = Signal() | |
backendStateChange = Signal() | |
backendConnected = Signal() | |
backendQuit = Signal() | |
backendDone = Signal() | |
Protected Member Functions | |
None | _beginThreads (self) |
None | _ensureOldProcessIsTerminated (self) |
None | _flushBackendLog (self) |
None | _backendLog (self, bytes line) |
Optional[subprocess.Popen] | _runEngineProcess (self, List[str] command_list) |
_storeOutputToLogThread (self, handle) | |
None | _storeStderrToLogThread (self, TextIO handle) |
None | _onSocketStateChanged (self, Arcus.SocketState state) |
None | _logSocketState (self, Arcus.SocketState state) |
None | _onMessageReceived (self) |
None | _onSocketError (self, Arcus.ErrorCode error) |
None | _cleanupExistingSocket (self) |
None | _createSocket (self, Optional[str] protocol_file=None) |
Static Protected Member Functions | |
str | _decodeLine (bytes line) |
Protected Attributes | |
_socket | |
_port | |
_backend_log_max_lines | |
_createSocket | |
_backend_state | |
_process | |
_backend_log | |
_onSocketStateChanged | |
_onMessageReceived | |
_onSocketError | |
![]() | |
_plugin_id | |
_version | |
_metadata | |
_name | |
Base class for any backend communication (separate piece of software). It makes use of the Socket class from libArcus for the actual communication bits. The message_handlers dict should be filled with string (full name of proto message), function pairs.
None UM.Backend.Backend.Backend.__init__ | ( | self | ) |
Reimplemented from UM.PluginObject.PluginObject.
|
protected |
Create a socket for communication with an external backend. :param protocol_file: Optional. The path to the protocol file. Default is None. :return: None
|
protected |
Debug function created to provide more info for CURA-2127
|
protected |
Protected message handler
|
protected |
Private socket error handler
|
protected |
Private socket state changed handler.
|
protected |
Start the (external) backend process. :param command_list: :return:
|
protected |
Stores the standard error output from the backend process to the log. :param handle: The handle to the standard error output stream. :type handle: file-like object :return: None
List[str] UM.Backend.Backend.Backend.getEngineCommand | ( | self | ) |
Get the command used to start the backend executable
List[bytes] UM.Backend.Backend.Backend.getLog | ( | self | ) |
Returns the backend log. :return: A list of bytes representing the backend log.
None UM.Backend.Backend.Backend.startEngine | ( | self | ) |
Start the backend / engine. Runs the engine, this is only called when the socket is fully opened & ready to accept connections