Transported values in a change must be converted first.
As this is only relevant for the exotic "scaled" and "blob"
datatypes, this was not detected yet.
- add tests
- suppress warning PytestUnhandledThreadExceptionWarning in tests
+ change import_value methods to raise no other exceptions than
WrongTypeError and RangeError
+ simplify Command.do: as import_value already raises the
appropriate error, no more try/except is needed
Change-Id: I299e511468dc0fcecff4c20cf8a917da38b70786
Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/32743
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
Reviewed-by: Alexander Zaft <a.zaft@fz-juelich.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
Split module handling code from the dispatcher.
The new class for managing Modules is called SecNode.
* change logging to no longer need a reference to modobj
* modules get a reference to the secnode obj instead of the
dispatcher
* intermediate usage fixes for frappy_psi/sea
Change-Id: Ifee4bb47aa7a4508bb4a47c9a5873b7e2d5faf67
Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/32249
Reviewed-by: Alexander Zaft <a.zaft@fz-juelich.de>
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
When several poller threads are using the same io, the resposivity
of client requests is reduced, as every thread first finishes
its pending communication requests, before it is the turn of the
request thread. This is solved by using one common poller thread
for all modules sharing the same communicator.
+ fix an issue with overriding a property with a parameter, as
this is the case for pollperiod (cfg was applied to property
instead of overriding parameter)
+ separate setFastPoll arguments into flag and fast interval
+ fix missing announceUpdate call when read function fails
+ fix mechanism for triggering polls after an io connection
reconnected again.
Change-Id: I1115a61fae3de80d18416e61f40b52a0eebb637c
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/28021
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
with handlers, a parameter from the cfg file which is not the
first of parameters with the same handler were not written.
fix: write_<param> method is called for all parameters in
<module>.writeDict even if there is no poll entry.
with this fix, when a parameter has the property initwrite=True,
the write_<param> method is called even when <param>
is not polled and even when <module>.pollerClass is None
Change-Id: I9b397deb5b20709fc4fa7c860c85b251a204c7f6
poller.Poller triggers polling of all parameters right after its iodev
reconnects, if the iodev supports registerReconnectCallback and
has the is_connected parameter
Change-Id: I59bb05cefdbea5efd4f3966ffe5237a75c2174bf
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/21995
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
writable parameters with a configured value should call write_<param>
on initialization.
+ introduced 'initwrite' parameter property for more fine control over this
+ minor improvements in metaclass.py, param.py, commandhandler.py
+ rearranged test_modules.py
Change-Id: I2eec45da40947a73d9c180f0f146eb62efbda2b3
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/21986
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
in the current implementation, in case polling results in an error,
an error_update is generated. But on activate, for this parameter
a normal update will be generated, indicating that this value is ok.
With this change, parameters have an additonal attribue 'readerror',
which save the error generated on the last read, or None, if the
read was successful.
In addition, subsequent repeated errors are only reported the first
time.
Change-Id: I39f18d17debadd8aa5b904e59998d2172f3f11b9
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/21974
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
parameters with a common commandhandler need only one poller item
Change-Id: Ie2e20cf7bcebc67ca96d58455323f01f528b25ab
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/21951
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
complaints by pylint are mainly related to
- remove object from base list in class definitions
- unnecessary else/elif after return/raise
Change-Id: I13d15449149cc8bba0562338d0c9c42e97163bdf
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/21325
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
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>