Loading files
5d522477dThis file is pinned to the selected release. Download the original to open it in your design tool.
from serial import Serial
class PhysicalLayer:
def __init__(self, config):
self.config = config
def connect(self):
self.serialPort = Serial(
self.config.myDeviceId,
baudrate=self.config.myBaudrate,
timeout=None)
self.serialPort.isOpen()
self.serialPort.flushInput()
def getData(self):
msgLength = 6
dataIn = self.serialPort.read(msgLength)
return dataIn