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>
- None <= 0 is invalid in py3
- restrict BLOBType to bytes (may be changed after migration to py3)
- remove long
- use list(<dict>.items()) when dict is changed within loop
- allow initialization of properties in HasProperties without
supercall to base class
- <dict>.values() can not be indexed
- adapted/removed various tests. additional tests might be added
after definitive migration to py3
after this change, all the tests run with py3, also secop-server and
secop-gui were tested with an example, but other code might still contain
py3 incompatibilities
Change-Id: I881c6972aeabb8494a21a6cbc7ffeddfd4f5d4f8
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/21306
Tested-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
Reviewed-by: Bjoern Pedersen <bjoern.pedersen@frm2.tum.de>
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>
+ DataType validators are shifted to __call__
+ as_json is moved to export_datatape()
+ new HasProperties Base Mixin for Modules/DataTypes
+ accessibles can be accessed via iterator of a module
+ properties are properly 'derived' and checked, are set with .setPropertyValue
remember: parameters only have properties, so use getPropertyValue()
Change-Id: Iae0273f971aacb00fe6bf05e6a4d24a6d1be881a
Reviewed-on: https://forge.frm2.tum.de/review/20635
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
'maxage' is not really used at any place. remove it, as this makes
the code cleaner
Change-Id: I6f10b4ab91fc57640336db1832716ca9012eb241
Reviewed-on: https://forge.frm2.tum.de/review/20347
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>
- <module>.parameters should contain live parameters on the instance level, not on the class level
- simplified code in Module.__init__, as self.parameters are available
- accessibles on instance level must be OrderedDict, as this is used by describe
Change-Id: Idf507cde5a8f755317e566107214b9a92f3534f7
Reviewed-on: https://forge.frm2.tum.de/review/20302
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>
for easier distinction:
- camelCase or singleword: framework method
- snake_case: driver method
(driver) parameters are lowercase, single word framework variables may
have to start with uppercase letters to distinguish...
Change-Id: I76536b6390324625b242c4f190553014c2ca61d6
Reviewed-on: https://forge.frm2.tum.de/review/20295
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>
- using threading.Events instead of Queue
- started_callback has no more argument
- introduced timeout for starting modules
Change-Id: I5a8b59cf552918cf7e61ae93cda907f7b0d97836
Reviewed-on: https://forge.frm2.tum.de/review/20281
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
needs a bigger rework, since READREPLY and EVENTREPLY are now different....
Also the format of the error-reply got changed :(
Change-Id: I1760743238227730ee49aaf92b54e0ff5f25423b
Reviewed-on: https://forge.frm2.tum.de/review/20246
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
except when explicitely mentioned with reorder=True
improved test_modules for unique accessibles, as this
was related with Accessible.ctr
Change-Id: I61877de9300bb0297c88a6c44bb265c634937856
Reviewed-on: https://forge.frm2.tum.de/review/19693
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
the export argument of an accessible allows now to specify an other
external name than the attribute used internally.
export=True (default, use defined name, or prefix with '_' when
name not in predefined list)
export=False (do not export)
export=<any string> (special cases only)
Change-Id: I6c6669cd502d9d6fd3aa40091673e5554fd961bd
Reviewed-on: https://forge.frm2.tum.de/review/19664
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
initialisation occurs in this order:
- object creeation (via __init__ which should consume the cfg values it knows about)
- registering each object with the dispatcher
- calling init_module() on each module (for connecting to other modules, checking hw, creating threads....)
- calling start_module(cb) on each module. after the module finished startup it should call cb(self) once.
This is the right place to do initialisation of hw which is not needed to read from the hw.
(uploading curves, polling/re-setting all parameters, etc.)
Change-Id: Ieaf9df5876e764634836861241f58ab986027f44
Reviewed-on: https://forge.frm2.tum.de/review/18566
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
no more automatic definition by just declaring do_<command>
Change-Id: Ided91b5ae6fe657a6134f1cc14cc6484570a3646
Reviewed-on: https://forge.frm2.tum.de/review/18206
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
via using '$' as special char.
Change-Id: Idfbad84b76d2f5161cb6ecc21d63349f23cd47fa
Reviewed-on: https://forge.frm2.tum.de/review/18188
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
unfortunately IntEnum can't be bent like we would need it (extensible).
So we had to write our own....
The members of the Enum still behave like ints, but also have
.name and .value attributes, should they be needed.
needed adoptions to correctly use (and test) the EnumType are included.
Change-Id: Ie019d2f449a244c4fab00554b6c6daaac8948b59
Reviewed-on: https://forge.frm2.tum.de/review/17843
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
create the correct descriptive data.
Main use case is for unit-tests and testing custom configs.
Change-Id: I3077f80cb9fdbf2443ee9da796c3749707fd2b55
Reviewed-on: https://forge.frm2.tum.de/review/16806
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
also make interface more explicit
Change-Id: Ib104e2c050d3e98e9d434d502951e33619784e2e
missing: test cases for *.from_string(input) methods
Reviewed-on: https://forge.frm2.tum.de/review/16893
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
+ rework GUI
- include a combobox for selection of visibility
- include a checkbox wether validation should be done in the client
- remove unused lineEdit
+ improve datatypes
+ improve tests for new descriptive data
+ metaclasse: fix overlooked read_* or write_* func's
+ improve polling
+ Introduce new ErrorClasses
+ dispatcher: use new features of datatypes + PARAMS
+ improve lib
+ autopep8
+ first working version of MLZ_entangle integration
+ split specific stuff into it's own package (MLZ,demo,ess)
Change-Id: I8ac3ce871b28f44afecbba6332ca741095426712