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

Public Member Functions

None __init__ (self)
 getOutputDeviceManager (self)
None start (self)
None stop (self)
ManualDeviceAdditionAttempt canAddManualDevice (self, str address="")
None addManualDevice (self, str address, Optional[Callable[[bool, str], None]] callback=None)
None removeManualDevice (self, str key, Optional[str] address=None)
None startDiscovery (self)
None refreshConnections (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)

Protected Attributes

 _output_device_manager = Application.getInstance().getOutputDeviceManager()
Protected Attributes inherited from UM.PluginObject.PluginObject
 _plugin_id = None
 _version = None
dict _metadata = {}
 _name = None

Detailed Description

Base class for output device plugins.

This class provides the base for any output device plugin that should be
registered with the OutputDeviceManager. Each OutputDevicePlugin should
implement device detection and add/remove devices as needed.

For example, the Removable Device plugin searches for removable devices
that have been plugged in and creates new OutputDevice objects for each.
Additionally, whenever a removable device has been removed, it will remove
the OutputDevice object from the OutputDeviceManager.

:sa OutputDeviceManager

Member Function Documentation

◆ addManualDevice()

None UM.OutputDevice.OutputDevicePlugin.OutputDevicePlugin.addManualDevice ( self,
str address,
Optional[Callable[[bool, str], None]] callback = None )
Add a manual device by the specified address (for example, an IP).
The optional callback is a function with signature func(success: bool, address: str) -> None, where
- success is a bool that indicates if the manual device's information was successfully retrieved.
- address is the address of the manual device.

◆ canAddManualDevice()

ManualDeviceAdditionAttempt UM.OutputDevice.OutputDevicePlugin.OutputDevicePlugin.canAddManualDevice ( self,
str address = "" )
Used to check if this adress makes sense to this plugin w.r.t. adding(/removing) a manual device.
/return 'No', 'possible', or 'priority' (in the last case this plugin takes precedence, use with care).

◆ getOutputDeviceManager()

UM.OutputDevice.OutputDevicePlugin.OutputDevicePlugin.getOutputDeviceManager ( self)
Convenience method to get the Application's OutputDeviceManager.

◆ refreshConnections()

None UM.OutputDevice.OutputDevicePlugin.OutputDevicePlugin.refreshConnections ( self)
Refresh the available/discovered printers for an output device that handles network printers.

◆ removeManualDevice()

None UM.OutputDevice.OutputDevicePlugin.OutputDevicePlugin.removeManualDevice ( self,
str key,
Optional[str] address = None )
Remove a manual device by either the name and/or the specified address.
Since this may be asynchronous, use the 'removeDeviceSignal' when the machine actually has been added.

◆ start()

None UM.OutputDevice.OutputDevicePlugin.OutputDevicePlugin.start ( self)
Called by OutputDeviceManager to indicate the plugin should start its device detection.

◆ startDiscovery()

None UM.OutputDevice.OutputDevicePlugin.OutputDevicePlugin.startDiscovery ( self)
Starts to discovery network devices that can be handled by this plugin.

◆ stop()

None UM.OutputDevice.OutputDevicePlugin.OutputDevicePlugin.stop ( self)
Called by OutputDeviceManager to indicate the plugin should stop its device detection.

The documentation for this class was generated from the following file:
  • UM/OutputDevice/OutputDevicePlugin.py