13 Commits

Author SHA1 Message Date
87830a1473 branch develop: recent changes from branch wip
Change-Id: I2e1173423f2aa164a8a7158921b354c2aff1ab2c
2023-06-20 10:59:18 +02:00
0d265b9752 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>
2023-04-21 16:17:30 +02:00
c8f30582a5 default settings on the IO class
allow to define default settings on the IO class:
- a default 'port' may be given for tcp
- defaults like 'baudrate' or 'parity' might be given
  for serial connections

this avoids explicit settings in the config file in case
the settings can not be changed or have a typical value
other than the defaults in serial.Serial

Change-Id: I990f47d63e785f8cc48c4af197944a8eebe91fb4
Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/30555
Reviewed-by: Georg Brandl <g.brandl@fz-juelich.de>
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
2023-03-06 08:24:15 +01:00
e1d5170a90 T controller tutorial and improve documentation
add tutorial for Berlin hands-on workshop

+ improve the documentation (hints for structure welcome)
+ remove 'optional' parameter property
  (is not yet used - should not appear in doc)
+ added test property in frappy_demo.cryo alters Parameter class
  ('test' property appears in Parameter doc)

Change-Id: I3ea08f955a92f72451fd23a5ff00d1185c7fb00e
2023-03-06 08:24:15 +01:00
Alexander Zaft
7f166a5b8c Rename from secop to frappy
debian/ is still missing, will follow in next commit.

Fixes: #4626

Change-Id: Ia87c28c1c75b8402eedbfca47f888585a7881f44
2022-11-09 16:29:29 +01:00
Björn Pedersen
f66411dded Remove iohandler left-overs from docs
The iohandler module has been remove in 28526

Change-Id: I24c86f88c8a37f85018cfcdec48279a1438da408
2022-11-03 13:52:27 +01:00
60c62a340d support write_ method on readonly param and more
- write method may be used internally on a readonly parameter
+ add IDLE, WARN, BUSY and ERROR to secop.core
+ secop.datatype.EnumType: allow 'self' as member name
+ secop.lib.statemachine: log Restart and Stop exceptions only on debug level
+ secop_psi.ccu4.CCU4: explicit conversion to float
+ secop.proxy: remove superfluos and erroneous make_secop_error

Change-Id: I2f13d31ceacd2bde65eab64f8eae4225556c18f5
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/27963
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>
2022-03-21 12:06:51 +01:00
c1307cdd03 unify name and module on Attached property
- setting the attribute using the name of an attached module
- getting the attribute results in the module object

+ change names iodev to io, iodevClass to ioClass,
  sendRecv to communicate, HasIodev to HasIO

Change-Id: I200b63a5a7dc1453bf6ac998782b065645201900
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/27575
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
2022-01-31 10:57:49 +01:00
0909f92e12 UniqueObject
create a class to be used for unique objects.
better for debugging and documentation than just using object()

+ remove unused unique objects

Change-Id: I32f65960ea2fbee4fccbeb49a4e11176b7185aa0
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/27455
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>
2022-01-17 11:38:15 +01:00
eb2e8f5f74 fix doc (stringio - > io)
+ bug in secop.lib.classdoc

Change-Id: Ic1f6f2896466ce53dd176a338088b7ee6b8047af
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/27428
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>
2022-01-13 10:23:38 +01:00
980499ba41 fixed errors during migration
- reference.rst did still contain do_<something>
- trailing commas in secop_demo/cryo.py

Change-Id: I5bb8bd310576366c8cfe406f0ec770fa40bcab5b
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/25079
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>
2021-03-01 16:33:08 +01:00
1a8ddbc696 removed old style syntax
- 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>
2021-02-24 08:44:13 +01:00
ed02131a37 enhance documentation
- flatten hierarchy (some links do not work when using folders)
- add a tutorial for programming a simple driver
- clean description using inspect.cleandoc
+ fix a bug with 'unit' pseudo property in a Parameter used as override

Change-Id: I31ddba5d516d1ee5e785e28fbd79fca44ed23f5e
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/25000
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
2021-02-10 17:07:08 +01:00