transport: move init message into concrete classes

In in the module __init__.py we print an init message (which type of
LinkBase class is providing the SimLink). However in __init__.py we tend
to have only platform independed code but the message string can already
be categorized as platform depened. Let's put the init message into the
constructor of the concrete classes of LinkBase.

Related: OS#6210
Change-Id: I0a6dd7deb79a5f3e42b29094a1cf2535075fa430
This commit is contained in:
Philipp Maier
2023-10-23 10:18:04 +02:00
committed by laforge
parent 10669f2ddf
commit 3077343739
5 changed files with 5 additions and 4 deletions

View File

@@ -35,6 +35,7 @@ class ModemATCommandLink(LinkBase):
def __init__(self, device: str = '/dev/ttyUSB0', baudrate: int = 115200, **kwargs):
super().__init__(**kwargs)
print("Using modem for Generic SIM Access (3GPP TS 27.007)")
self._sl = serial.Serial(device, baudrate, timeout=5)
self._echo = False # this will be auto-detected by _check_echo()
self._device = device