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

Function create_sensor_server

lantz/simulators/experiment.py:54–64  ·  view source on GitHub ↗
(sensor)

Source from the content-addressed store, hash-verified

52 actuator_server.shutdown()
53
54def create_sensor_server(sensor):
55 logging.info('Creating voltmeter server')
56 args = Namespace('localhost', 5679)
57 sensor_server = instrument.main_tcp(sensor, args)
58 logging.info('Voltmeter: interrupt the program with Ctrl-C')
59 try:
60 sensor_server.serve_forever()
61 except KeyboardInterrupt:
62 logging.info('Voltmeter: Ending')
63 finally:
64 sensor_server.shutdown()
65
66def serve_forever(obj):
67 try:

Callers

nothing calls this directly

Calls 3

NamespaceClass · 0.85
serve_foreverMethod · 0.80
shutdownMethod · 0.80

Tested by

no test coverage detected