make return value 'Done' unneccessary
'Done' was introduced in order to suppress unneccessary duplicate updates. However, since super calls on access methods are allowed, it is not nice when such a method returns Done, as this is not automagically replaced by the current parameter value. As a consequence: - using Done is discouraged, but not (yet) removed in all code - the 'omit_unchanged_within' property is moved from Module to an internal Parameter property 'update_unchanged' - its default is moved from a SEC node property to generalConfig - the 'update_unchanged' parameter property may be set to 'never' for parameters where duplicate updates make no sense - this property might be set to 'always', for measurements, where even unchanged values taken from HW should be transmitted Change-Id: I2847c983ca09c2c4098e402edd08d0c96c3913f4 Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/30672 Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de> Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
This commit is contained in:
@ -31,6 +31,7 @@ import pytest
|
||||
|
||||
from frappy.core import Module, Parameter, FloatRange, Readable, ReadHandler, nopoll
|
||||
from frappy.lib.multievent import MultiEvent
|
||||
from frappy.lib import generalConfig
|
||||
|
||||
|
||||
class Time:
|
||||
@ -66,13 +67,14 @@ class DispatcherStub:
|
||||
|
||||
class ServerStub:
|
||||
def __init__(self):
|
||||
generalConfig.testinit()
|
||||
self.dispatcher = DispatcherStub()
|
||||
|
||||
|
||||
class Base(Module):
|
||||
def __init__(self):
|
||||
srv = ServerStub()
|
||||
super().__init__('mod', logging.getLogger('dummy'), dict(description=''), srv)
|
||||
super().__init__('mod', logging.getLogger('dummy'), {'description': ''}, srv)
|
||||
self.dispatcher = srv.dispatcher
|
||||
|
||||
def run(self, maxcycles):
|
||||
|
Reference in New Issue
Block a user