MCPcopy Create free account
hub / github.com/LabPy/lantz / serve_forever

Method serve_forever

lantz/simulators/instrument.py:46–58  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

44 super().__init__(port=port)
45
46 def serve_forever(self):
47 self.initialize()
48 try:
49 while True:
50 data = self.recv()
51 logging.debug('%s -> inst: %s', self.serial.portstr, data)
52 out = self.instrument.handle(data)
53 self.send(out)
54 logging.debug('%s <- inst: %s', self.serial.portstr, out)
55 except Exception as e:
56 logging.info(str(e))
57 finally:
58 pass
59
60 def shutdown(self):
61 self.finalize()

Callers 3

main_genericFunction · 0.80
create_actuator_serverFunction · 0.80
create_sensor_serverFunction · 0.80

Calls 4

initializeMethod · 0.45
recvMethod · 0.45
handleMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected