Generic Interface

class epsonprojector.interfaces.generic.GenericInterface
CONNECTIONS = {}
DEVICES = {'epson_device': <class 'epsonprojector.devices.epson.EpsonDevice'>, 'generic': <class 'epsonprojector.devices.generic.GenericDevice'>}
classmethod create_new_connection(device_object, *args, **kwargs)

Add the given connection to global index, to prevent multiple connections to the same device

Parameters:
  • device_object – Device object
  • args – Possible args to generate connection identification
  • kwargs – Possible kwargs to generate connection identification
Return bool:

True if connection sucessfully added (false if connection with the same identifyer already exists)

classmethod generate_device_context(device_class, *args, **kwargs)

Generate Context for Device initializeation context descripes args/kwargs

Parameters:
  • args
  • kwargs
  • device_class – Class of Device that consumes tthis context
Return tuple:

tuple of args, kwargs

classmethod has_connection(*args, **kwargs)

Check if connection with identifier already exists

Parameters:
  • args – Possible args to generate a identifier
  • kwargs – Possible kwargs to generate a identifier
Returns:

classmethod has_device(device_name)

Checks if device exists in current interface

Parameters:device_name – name of device
Returns:
classmethod new_device_connection(device_name='generic', *args, **kwargs)

Create a new Connection to the given device

Parameters:
  • device_name – name of available device (All devices can be found in each Interface in Interface.DEVICES
  • tty – name of serial interface
Return obj:

Specific Device object. (origin object of GenericDevice)

send_command(*args, **kwargs)

FooBar

Parameters:
  • args
  • kwargs
Returns: