omit updates of unchanged values within short time

Sometimes it happens, that the same value determined once is
assigned several times to a parameter within a very short period.
Sending multiple updates is not useful in this case.

Change-Id: Icea66934c831fd9b2eac7d0394a124d002469914
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/27091
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
This commit is contained in:
2021-11-10 09:27:15 +01:00
parent a64eb7f33b
commit d76d79aebb
4 changed files with 27 additions and 13 deletions

View File

@ -34,7 +34,11 @@ from secop.poller import BasicPoller
class DispatcherStub:
OMIT_UNCHANGED_WITHIN = 0
# the first update from the poller comes a very short time after the
# initial value from the timestamp. However, in the test below
# the second update happens after the updates dict is cleared
# -> we have to inhibit the 'omit unchanged update' feature
omit_unchanged_within = 0
def __init__(self, updates):
self.updates = updates