herosdevices.core.templates.telnet

Templates for devices connected via a legacy telnet interface.

Module Contents

class herosdevices.core.templates.telnet.TelnetDeviceTemplate(address: str, port: int = 23, timeout: float = 1.0, **kwargs)[source]

Device representation template for devices connected via a telnet connection.

To make a functional device, the user needs to implement the actual device representation in an abstracted class. This template handles the connection object and exposes the connection via self.connection and the methods self.read and self.write which are aliases to the underlying py:meth:herosdevices.core.bus.telnet.TelnetConnection.read and py:meth:herosdevices.core.bus.telnet.TelnetConnection.write.

The template allows the usage of herosdevices.core.DeviceCommandQuantity.

address
connection
write
read