improved poller

the poller is now a separate (python-)module
- 3 categories of polled parameters:
  - regular
  - dynamic: accelerated when module is busy
  - slow: less frequent, with lower priority
- several modules might share a poller. this makes sense, when a
  they share a common communicator
- modules using the new poller must define pollerClass
- pollerClass may be define even an other poller implementation
- the old simple poller is still used on Readables without pollerClass
- the poller can not be configured in the config file only, as the
  poll attributes have special values for this poller

Change-Id: Ifd811beeb45733bcbf801608ade877a3a601c24a
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/21066
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
This commit is contained in:
2019-08-23 10:12:58 +02:00
parent 6772455dba
commit f21fcfce9d
4 changed files with 502 additions and 6 deletions

View File

@ -283,7 +283,11 @@ class Readable(Module):
def startModule(self, started_callback):
'''start polling thread'''
mkthread(self.__pollThread, started_callback)
if hasattr(self, 'pollerClass'): # an other poller is used
started_callback()
else:
# basic poller kept for reference
mkthread(self.__pollThread, started_callback)
def __pollThread(self, started_callback):
while True: