[server.py] rename initialisation steps for better clarity

initialisation occurs in this order:
 - object creeation (via __init__ which should consume the cfg values it knows about)
 - registering each object with the dispatcher
 - calling init_module() on each module (for connecting to other modules, checking hw, creating threads....)
 - calling start_module(cb) on each module. after the module finished startup it should call cb(self) once.
   This is the right place to do initialisation of hw which is not needed to read from the hw.
   (uploading curves, polling/re-setting all parameters, etc.)

Change-Id: Ieaf9df5876e764634836861241f58ab986027f44
Reviewed-on: https://forge.frm2.tum.de/review/18566
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
This commit is contained in:
Enrico Faulhaber
2018-07-31 16:37:36 +02:00
parent acb8e6d0a1
commit 5f640ce299
9 changed files with 52 additions and 41 deletions

View File

@ -55,7 +55,7 @@ class SimBase(object):
return newval
setattr(self, 'write_' + k, writer)
def late_init(self):
def init_module(self):
self._sim_thread = mkthread(self._sim)
def _sim(self):