You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
605 B
Python
24 lines
605 B
Python
12 years ago
|
'''FakeTransport implements dummy interface for Transport.'''
|
||
|
|
||
|
# Local serial port loopback: socat PTY,link=COM8 PTY,link=COM9
|
||
|
|
||
12 years ago
|
from transport import Transport, NotImplementedException
|
||
12 years ago
|
|
||
|
class FakeTransport(Transport):
|
||
|
def __init__(self, device, *args, **kwargs):
|
||
|
super(FakeTransport, self).__init__(device, *args, **kwargs)
|
||
|
|
||
|
def _open(self):
|
||
|
pass
|
||
|
|
||
|
def _close(self):
|
||
|
pass
|
||
|
|
||
|
def ready_to_read(self):
|
||
|
return False
|
||
|
|
||
|
def _write(self, msg):
|
||
|
pass
|
||
|
|
||
|
def _read(self):
|
||
12 years ago
|
raise NotImplementedException("Not implemented")
|