def __init__(self, hardware_id=None, auto_connect=False, max_connection_errors=3, connection_timeout=4, do_hanshake=True, do_authentification=True, speed=115200): Driver.__init__(self, hardware_id, auto_connect, max_connection_errors, connection_timeout, do_hanshake, do_authentification)
def __init__(self, hardware_id=None, auto_connect=False, max_connection_errors=3, connection_timeout=4, do_hanshake=True, do_authentification=True, speed=115200): Driver.__init__(self, hardware_id, auto_connect, max_connection_errors, connection_timeout, do_hanshake, do_authentification) self._hardware_interface = SerialHardwareInterface( self, ExampleArduinoProtocol, True, speed)
def load_driver(self, id=None, *args, **kwargs): """Retrieve data from driver object.""" rows = yield self.select(id=str(id)) result = None if len(rows) > 0: name, description, status = rows[0] result = Driver(name=name, description=description, status=status) defer.returnValue(result)
def load_drivers(self, *args, **kwargs): """Save the driver object .""" lDrivers = [] rows = yield self.select(order="id") for row in rows: name, description, status = row lDrivers.append( Driver(name=name, description=description, status=status)) defer.returnValue(lDrivers)
def __init__(self, auto_connect=False, max_connection_errors=2, connection_timeout=4, speed=115200, *args, **kwargs): Driver.__init__(self, auto_connect, max_connection_errors, connection_timeout) self._hardware_interface = MockHardwareInterface(self, MockProtocol, speed)
def __init__(self, hardware_id=None, auto_connect=False, max_connection_errors=3, connection_timeout=4, do_hanshake=True, do_authentification=True, speed=115200): Driver.__init__(self, hardware_id, auto_connect, max_connection_errors, connection_timeout, do_hanshake, do_authentification) self._hardware_interface = SerialHardwareInterface(self, ExampleArduinoProtocol, True, speed)