Uranium
Application Framework
Loading...
Searching...
No Matches
UM.Backend.Backend.Backend Class Reference
Inheritance diagram for UM.Backend.Backend.Backend:
UM.PluginObject.PluginObject

Public Member Functions

def __init__ (self)
 
def setState (self, new_state)
 
def startEngine (self)
 
def close (self)
 
def getLog (self)
 
def getEngineCommand (self)
 
- Public Member Functions inherited from UM.PluginObject.PluginObject
None __init__ (self, *args, **kwags)
 
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

Signal processingProgress = Signal()
 
Signal backendStateChange = Signal()
 
Signal backendConnected = Signal()
 
Signal backendQuit = Signal()
 
Signal backendDone = Signal()
 

Protected Member Functions

def _backendLog (self, line)
 
Optional[subprocess.Popen] _runEngineProcess (self, command_list)
 
def _storeOutputToLogThread (self, handle)
 
def _storeStderrToLogThread (self, handle)
 
def _onSocketStateChanged (self, state)
 
def _logSocketState (self, state)
 
def _onMessageReceived (self)
 
def _onSocketError (self, error)
 
def _createSocket (self, protocol_file)
 

Protected Attributes

 _supported_commands
 
 _message_handlers
 
 _socket
 
 _port
 
 _process
 
 _backend_log
 
 _backend_log_max_lines
 
 _backend_state
 
- Protected Attributes inherited from UM.PluginObject.PluginObject
 _plugin_id
 
 _version
 
 _metadata
 
 _name
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ __init__()

def UM.Backend.Backend.Backend.__init__ (   self)

Reimplemented from UM.PluginObject.PluginObject.

Member Function Documentation

◆ _createSocket()

def UM.Backend.Backend.Backend._createSocket (   self,
  protocol_file 
)
protected
Creates a socket and attaches listeners.

◆ _logSocketState()

def UM.Backend.Backend.Backend._logSocketState (   self,
  state 
)
protected
Debug function created to provide more info for CURA-2127

◆ _onMessageReceived()

def UM.Backend.Backend.Backend._onMessageReceived (   self)
protected
Private message handler

◆ _onSocketError()

def UM.Backend.Backend.Backend._onSocketError (   self,
  error 
)
protected
Private socket error handler

◆ _onSocketStateChanged()

def UM.Backend.Backend.Backend._onSocketStateChanged (   self,
  state 
)
protected
Private socket state changed handler.

◆ _runEngineProcess()

Optional[subprocess.Popen] UM.Backend.Backend.Backend._runEngineProcess (   self,
  command_list 
)
protected
Start the (external) backend process.

◆ getEngineCommand()

def UM.Backend.Backend.Backend.getEngineCommand (   self)
Get the command used to start the backend executable 

◆ getLog()

def UM.Backend.Backend.Backend.getLog (   self)
Get the logging messages of the backend connection.

◆ startEngine()

def UM.Backend.Backend.Backend.startEngine (   self)
:brief Start the backend / engine.
Runs the engine, this is only called when the socket is fully opened & ready to accept connections

The documentation for this class was generated from the following file: