603 Commits

Author SHA1 Message Date
l_samenv
2fb05b37f8 [WIP] driver for FG_Lecroy_3000
not yet working
2020-11-10 08:09:39 +01:00
l_samenv
ad2a79c312 SR_7270: autorange is an enum
- autorange may be off, soft or hard
2020-11-10 08:00:33 +01:00
l_samenv
82b4af4faa main module of LS370 is now drivable
- the main value is the channel
- it is busy when pausing during scanning
+ allow softcal to ignore the sign
2020-11-10 07:57:48 +01:00
ad07ecdd69 fix typos in secop/modules.py doc
Change-Id: Idfbb85603b5efd0884ae9356dd96136c9c32ada1
2020-10-28 10:09:17 +01:00
cf24bbc3c3 improved doc on softcal and Module.registerCallback
Change-Id: I12b1f7a2d29435d989fb9953f72bea181e6cb4f7
2020-10-28 09:59:40 +01:00
29c66fa19a describe branches in README.md
Change-Id: I5bec3d9177a14d618b982f9301a7f06a71a4a72e
2020-10-28 08:49:35 +01:00
25a887dcab fix initwrite behaviour
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
2020-10-28 08:35:01 +01:00
36ffb0a31f Merge branch 'mlz' into wip
Change-Id: I9dab1c32c4f0579f7f54bb68c60f7a8b14866652
2020-10-28 08:01:44 +01:00
b544d2af98 Merge branch 'master' into wip 2020-10-28 07:55:17 +01:00
l_samenv
5db1acb07c improvements on SR_7270 driver 2020-10-20 14:38:45 +02:00
l_samenv
880327c544 main ls370 module is now drivable
the value is the current channel, when the target (=channel) is changed,
the value changes to 0, until the switching has finished, including pause time
2020-10-20 14:17:24 +02:00
4f1883ba27 fix initwrite behaviour
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
2020-09-25 13:28:12 +02:00
3043200012 fix initwrite behaviour
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
2020-09-25 12:05:16 +02:00
l_samenv
1b4865c608 Revert "support name mangling for parameter/command names"
This reverts commit 99bdafdd0c3293d17e3f23508d2b7762804474e7.
2020-09-25 11:30:23 +02:00
l_samenv
f7576cf541 fix initwrite behaviour
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, the write_<method> is called even when a parameter
is not polled.
2020-09-25 11:19:17 +02:00
l_samenv
587b170f6a update SR_7270 2020-09-10 15:47:04 +02:00
l_samenv
1c42859466 newset version of senis 2020-09-10 10:43:34 +02:00
l_samenv
1f832388d7 Merge branch 'wip' of git.psi.ch:sinqdev/frappy into wip 2020-09-08 13:37:01 +02:00
l_samenv
5f9344109d improve sea client 2020-09-08 13:36:11 +02:00
l_samenv
99bdafdd0c support name mangling for parameter/command names 2020-09-08 13:33:13 +02:00
l_samenv
ab21bb5e3f add timestamp to error reply 2020-09-08 13:32:18 +02:00
l_samenv
99e32065b1 simplyfy some error messages 2020-09-08 13:31:38 +02:00
l_samenv
c1ffc160a2 configurable search path for cfg files 2020-09-08 12:13:17 +02:00
89bf080dab fix typo
Change-Id: I578668ab179b9d95bb16a0103bb96c5f4a937133
2020-08-13 11:37:18 +02:00
047f3a7606 add a lot of current stuff
this is not (yet) in the frm2 repo

Change-Id: Ia5b2996803c3dbb15b85ab1bc3a24717ac6297fb
2020-08-13 11:33:14 +02:00
7f7c1a85ab improvements on PPMS and LS370
- PPMS: improved machanism for 10 K waiting
- LS370: fixed an issue with auto range
+ LS370: show test for all status bits

Change-Id: Ia6454141917893f0e5c6c4351df3a864942bb629
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/23495
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
2020-08-13 11:33:14 +02:00
7af4d572ab Param(..., initwrite=True) works only with poll=True
check this when creating a Parameter

Change-Id: I5d45f25fd67682de45b51c842323e9582f69e6e3
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/23547
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>
2020-08-12 16:47:03 +02:00
2eb0aeba0d add readbytes method to AsynConn
+ flush_recv now also clears _rxbuffer

Change-Id: I33c7ea1a9a1d8b663e5cd3bd81cf7ad43448e0fa
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/23548
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>
2020-08-12 16:46:48 +02:00
l_samenv
5aff4b9dab README: add a short description 2020-07-30 08:46:09 +02:00
l_samenv
2bd30c4423 test adding README 2020-07-30 08:42:44 +02:00
0641968715 add a lot of current stuff
this is not (yet) in the frm2 repo

Change-Id: Ia5b2996803c3dbb15b85ab1bc3a24717ac6297fb
2020-07-29 14:57:50 +02:00
aa4c8f1f04 improvements on PPMS and LS370
- PPMS: improved machanism for 10 K waiting
- LS370: fixed an issue with auto range
+ LS370: show test for all status bits

Change-Id: Ia6454141917893f0e5c6c4351df3a864942bb629
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/23495
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
2020-07-29 13:50:21 +02:00
a520e6e1e4 more flexible end_of_line in stringio
in the previous version, it was not possible to give a ASCII nul
character as end_of_line, because StringType refuses this

- end_of_line might be given as bytes, str or int
- end_of_line might be given as tuple (eol_read, eol_write)

Change-Id: I8b7942320ad3ffe162cdf3a673e113a66a84fb93
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/23496
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>
2020-07-28 14:53:06 +02:00
d9a2045fca more flexible end_of_line in stringio
in the previous version, it was not possible to give a ASCII nul
character as end_of_line, because StringType refuses this

- end_of_line might be given as bytes, str or int
- end_of_line might be given as tuple (eol_read, eol_write)

Change-Id: I8b7942320ad3ffe162cdf3a673e113a66a84fb93
2020-07-23 16:12:14 +02:00
ab00c45db0 improvements on PPMS and LS370
- improved machanism for 10 K waiting
- fixed an issue with auto range

Change-Id: Ia6454141917893f0e5c6c4351df3a864942bb629
2020-07-07 15:08:28 +02:00
1655e252fc fix handling of StructOf datatype
- 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>
2020-07-06 15:46:37 +02:00
c16adf38cd HasIodev bug fix
Change-Id: I2be3b477f7d6ca74f2fefb5efc1bd134ac8d047e
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/23124
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
2020-05-20 16:51:04 +02:00
c14671204c improve HasIodev
- automatically reuse communicators (iodevs) with the same uri
- when uri and iodev is given, iodev gets the name of the
  auto-created communicator

Change-Id: If30353c0b61104837e0f940968080c3c1e53c1c6
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/23122
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>
2020-05-20 16:21:24 +02:00
3261e5e5ff improve error handling in SecopClient
- catch more errors
- improve behaviour on closing connections

Change-Id: I3e2ed1b3b01b8151bb709d5a3735716742e0eec6
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/23123
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>
2020-05-20 16:21:07 +02:00
a25cb3dce5 cosmetics on datatypes.TextType
make __repr__ more nice and include in __all__

Change-Id: Iecfe6326f2d35a2210c03f7bd8c84dc2830b19ea
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/23120
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>
2020-05-20 16:18:17 +02:00
f7a6ba8b5b rework tcp server
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>
2020-05-20 16:18:07 +02:00
31ae0a88b4 ppms: improve status and temperature
- treat unknown status values similar to status 0
- wait at 10 K when cooling below
- better error message

Change-Id: Ic07826e31f36abc72ee5d72da001fb1f3d2fe8aa
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/23121
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>
2020-05-20 16:17:48 +02:00
7953826fac improve error handling on client connections
- send a heartbeat, if no events for 5 sec.
  an interrupted connection (not closed by the other end) may
  not be detected for a long time when nothing is sent
+ make the error reply on a non SECoPEror more verbose
  e.g. "KeyError('foo')" instead of just "foo"
+ allow cfg file without nodeinterface
+ shorter logger name in HasIodev

Change-Id: I6b1ff23f9bf8c96feb25af44935596437b7d726f
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/23098
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
2020-05-15 15:49:36 +02:00
5c33cbf7a5 introduce update callbacks
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>
2020-05-15 15:49:22 +02:00
7d987b3e42 router bug fix
- errors in cache are stored as Exception, not as tuple

Change-Id: I391c74a4bef1dc10a1783b98b1ad06fec90365df
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/23044
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>
2020-05-05 10:04:38 +02:00
4411707f6a change arguments of stringio-server
+ add verbosity flag

Change-Id: I0425efb11f03f8a59d3d81e8f2eeb95aca22e138
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/23032
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>
2020-05-04 16:30:36 +02:00
7616153392 fix pylint command in Makefile
'pylint -j 0' is the same as 'pylint -j $(shell nproc)' but does
work with shells without 'nproc' command

Change-Id: I1c8c863a4eed5d653477025ada4840c2b0381432
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/23033
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
2020-05-04 16:30:16 +02:00
48c824287a allow class instead of class name in proxy_class
Change-Id: Ib3cd0113ecba80b5bbef9e31e8309861f8df5e39
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/23036
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>
2020-05-04 16:30:05 +02:00
84b7b08c43 fix deadlock when reconnecting client
Change-Id: I07aec4a5723fed08eb752d534a9e39716959c6dc
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/23034
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>
2020-05-04 16:29:48 +02:00
4448cef24a fix bug in secop.gui.valuewidgets
- fix ArrayOf maxlen instead of maxsize
- marked missing NoneOr widget as TODO
  (Remark: there are quite a lot of other things in cfg-editor to fix)

Change-Id: I3a8b2f650cca45dae4f87ba63c70ae58ca49ce42
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/23037
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>
2020-05-04 16:29:22 +02:00