core: formatting and update server docstring
Change-Id: Ic0dd4c5239f27679c89f6b3742b9c5f8b71f33f6 Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/32514 Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de> Reviewed-by: Alexander Zaft <a.zaft@fz-juelich.de>
This commit is contained in:
parent
34793f8bd0
commit
5b6a9de96e
@ -71,19 +71,18 @@ class Server:
|
|||||||
multiple cfg files, the interface is taken from the first cfg file
|
multiple cfg files, the interface is taken from the first cfg file
|
||||||
- testonly: test mode. tries to build all modules, but the server is not started
|
- testonly: test mode. tries to build all modules, but the server is not started
|
||||||
|
|
||||||
Format of cfg file (for now, both forms are accepted):
|
Config file:
|
||||||
old form: new form:
|
Format: Example:
|
||||||
|
Node('<equipment_id>', Node('ex.frappy.demo',
|
||||||
[node <equipment id>] [NODE]
|
<description>, 'short description\n\nlong descr.',
|
||||||
description=<descr> id=<equipment id>
|
<main interface>, 'tcp://10769',
|
||||||
description=<descr>
|
secondary=[ secondary=['ws://10770'], # optional
|
||||||
|
<interfaces>
|
||||||
[interface tcp] [INTERFACE]
|
],
|
||||||
bindport=10769 uri=tcp://10769
|
) )
|
||||||
bindto=0.0.0.0
|
Mod('<module name>', Mod('temp',
|
||||||
|
<param config> value = Param(unit='K'),
|
||||||
[module temp] [temp]
|
) )
|
||||||
ramp=12 ramp=12
|
|
||||||
...
|
...
|
||||||
"""
|
"""
|
||||||
self._testonly = testonly
|
self._testonly = testonly
|
||||||
@ -156,7 +155,10 @@ class Server:
|
|||||||
iface_threads = []
|
iface_threads = []
|
||||||
interfaces_started = MultiEvent(default_timeout=1)#default_timeout=15)
|
interfaces_started = MultiEvent(default_timeout=1)#default_timeout=15)
|
||||||
lock = threading.Lock()
|
lock = threading.Lock()
|
||||||
for interface in [self.node_cfg['interface']] + self.node_cfg.get('interfaces', []):
|
# TODO: check if only one interface of each type is open?
|
||||||
|
for interface in [self.node_cfg['interface']] + self.node_cfg.get(
|
||||||
|
'secondary', []
|
||||||
|
):
|
||||||
opts = {'uri': interface}
|
opts = {'uri': interface}
|
||||||
t = mkthread(
|
t = mkthread(
|
||||||
self._interfaceThread,
|
self._interfaceThread,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user