make secop.poller.Poller default

modules using the old poller (now called secop.poller.BasicPoller)
need to explcitly declare it (pollerClass = BasicPoller)

BasicPoller is still used in:

secop_mlz/amagnet.py
secop_mlz/entangle.py
secop/simulation.py

Remark: before removing BasicPoller we may need a replacement for
Readable.pollParams

Change-Id: If1ae8b68e02f13e601334656b818337c882e06cc
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/21910
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
This commit is contained in:
2019-11-27 09:51:59 +01:00
parent ca8b07496f
commit 59fbd5cac0
7 changed files with 47 additions and 34 deletions

View File

@@ -27,10 +27,12 @@ from time import sleep
from secop.datatypes import FloatRange
from secop.lib import mkthread
from secop.modules import Drivable, Module, Parameter, Readable, Writable
from secop.modules import Drivable, Module, Parameter, Readable, Writable, BasicPoller
class SimBase:
pollerClass = BasicPoller
def __init__(self, cfgdict):
# spice up parameters if requested by extra property
# hint: us a comma-separated list if mor than one extra_param
@@ -68,7 +70,7 @@ class SimBase:
self.log.info('sim thread ended')
def sim(self):
return True
return True # nothing to do, stop thread
def read_value(self):
if 'jitter' in self.accessibles:
@@ -138,6 +140,7 @@ class SimDrivable(SimBase, Drivable):
except Exception:
pass
self.status = self.Status.IDLE, ''
return False # keep thread running
def _hw_wait(self):
while self.status[0] == self.Status.BUSY: