- removed secop/metaclass.py
- moved code from ModuleMeta to modules.HasAccessibles.__init_subclass__
- reworked properties:
assignment obj.property = value now always allowed
- reworked Parameters and Command to be true descriptors
- Command must now be solely used as decorator
- renamed 'usercommand' to 'Command'
- command methods no longer start with 'do_'
- reworked mechanism to determine accessible order:
the attribute paramOrder, if given, determines order of accessibles
+ fixed some issues makeing the IDE more happy
+ simplified code for StatusType and added a test for it
Change-Id: I8045cf38ee6f4d4862428272df0b12a7c8abaca7
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/25049
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
- change secop.client.SecopClient to use native types instead of
strings for its setParameter and execCommand methods.
- secop-gui: for now, setParameter accept strings for complex types.
this should be changed to use native type in an other change
- fix bugs in parser.py
+ SecopClient: make visible in an error message that the error
was generated on the SEC node
+ fix a bug when a command is called with 0 as argument
Change-Id: Id87d4678311ef8cf43a25153254d36127e16c6d9
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/23299
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
motivation: a thread creating a lot of messages like a polling loop
with very short polling frequency or a fast polling connection might
monopolize the output of message over receiving new messages.
In addition, the current design has a latency of 0.3 sec for the
output of asynchronous replies.
Anyway, the output queue is just extending the network output buffer,
which is usally big enough.
- change the name of 'queue_async_reply' to 'send_reply'.
This method anyway was not only used for async replies.
- send_reply is directly sending the reply instead of putting into the
queue. It will slow down the calling thread, if the output buffer
is full, which is desired behaviour.
Change-Id: I305669be2f7c027355b43421432f32be9c166ed4
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/23119
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>
includes a use case:
- a software calibration, to be applied to any Readable.
- calibration could be changed on the fly
+ refactored a little bit update events mechanism
Change-Id: Ifa340770caa9eb2185fe7e912c51bd9ddb411ece
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/23093
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
config file format change:
The section names no longer contain a space, the are either
bare module names or 'NODE' or 'INTERFACE' (capitalized in order to
distingish from module names).
The present code still accepts the old form.
Moving to the 'toml' format was considered too, but this needs some
more investigations. The necessary code changes would be limited
to the method Server.loadCfgFile.
Change-Id: I6020058c9dcc4c1cbf38f5b9e8f67e9aad670183
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/23031
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
in case a remote is disconnected and can be reconnected quickly,
a seamless routing is possible. However, when after reconnection
the description has changed, the server is restarted.
+ more information in error messages from dispatcher
Change-Id: I0837e0254aee3d12a26481f6fd697081a53aabba
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/22506
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
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>
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>
- modules and accessibles are changed back to a JSON object
- datatype is changed from a JSON array with 2 elements to
a JSON object with one element, with the basic type as key
- the client side is kept compatible with the old syntax
Change-Id: Icd640bbcdec26a895c96720e107e874529340a73
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/21032
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
messages might get lost after activate, when the number of parameters
exceeds maxlen of the output queue, as a limited deque silently overwrites
messages.
first try: use an infinite deque, but slow down appending thread when deque
gets too big
-> does not work because the appending thread is the same
second try: increase maximum a lot, on overflow log an error message and
close connection
Change-Id: I20376f7e08240dabe43269fa63c596f07e59ddf6
Reviewed-on: https://forge.frm2.tum.de/review/20982
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>
+ 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>
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>
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>
- for now, the definition also accepts the old syntax
(to be changed later)
- Commands have datatype CommandType
- do not need keyword for the decription parameter of Override
- issue a Warning when a Parameter is overwritten without Overrride
(this should be turned into an error message)
-
Change-Id: Ib2c0f520abb5b4d7e6aed4d77a0d2b8bc470a85a
Reviewed-on: https://forge.frm2.tum.de/review/18251
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>
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
+ make parameter-properties configurable
+ better derivation of automatic properties
+ implement 'group' properties (how to display in gui???
+ clean up descriptive data by omitting unset and live properties
Change-Id: Icd2b6e91e09037e9d4a8d6ad88483f8509a2cf5f
- unify (encoded) Errormessages. They now always contain the offeding request.
- adopt keywords to current spec
- fixed formatting of timestamp in WriteReply
- minor bugfixing + polishing
Change-Id: I0ab8836756551399643bdce3d062eedd345509f1