mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-15 14:27:13 +02:00
Compare commits
25 Commits
2020.10.05
...
5.0.0-rc2
Author | SHA1 | Date | |
---|---|---|---|
794e579e12 | |||
bc6626aa7b | |||
6fb2479178 | |||
6053f2adff | |||
e0e2c2efba | |||
6d5f2e66ae | |||
33d85dbfc0 | |||
a838830090 | |||
b9a459faa1 | |||
d4806eb48b | |||
7f189629fb | |||
bee6bcc7a3 | |||
2f2399d550 | |||
6c1035aa99 | |||
c9bba6fbdc | |||
6d929ce96f | |||
a36ce8cb1c | |||
38cc365c01 | |||
688fe4e3f7 | |||
5c0dff29ed | |||
51bfa17c6a | |||
3b619f4488 | |||
6f96821275 | |||
6e58d845e9 | |||
ff3c79eaaa |
@ -1,3 +1,8 @@
|
|||||||
|
### Note
|
||||||
|
|
||||||
|
Please do not update to any xxxx.xx.xx.dev0 tags. They are not releases, but tags for internal usage.
|
||||||
|
Use only releases with tags such as x.x.x or x.x.x-rcx.
|
||||||
|
|
||||||
### Documentation
|
### Documentation
|
||||||
Detailed documentation can be found on the [official site.](https://www.psi.ch/detectors/users-support)
|
Detailed documentation can be found on the [official site.](https://www.psi.ch/detectors/users-support)
|
||||||
|
|
||||||
|
77
RELEASE.txt
77
RELEASE.txt
@ -1,4 +1,4 @@
|
|||||||
SLS Detector Package 5.0.0-rc2 released on 05.10.2020 (Release Candidate 2)
|
SLS Detector Package 5.0.0-rc2 released on 09.10.2020 (Release Candidate 2)
|
||||||
===========================================================================
|
===========================================================================
|
||||||
|
|
||||||
CONTENTS
|
CONTENTS
|
||||||
@ -12,58 +12,56 @@ SLS Detector Package 5.0.0-rc2 released on 05.10.2020 (Release Candidate 2)
|
|||||||
|
|
||||||
Eiger
|
Eiger
|
||||||
=====
|
=====
|
||||||
Minimum compatible version : 27
|
Compatible version : 08.09.2020 (v27)
|
||||||
Latest compatible version : 27
|
|
||||||
|
|
||||||
Jungfrau
|
Jungfrau
|
||||||
========
|
========
|
||||||
Minimum compatible version (PCB v1.0) : 24.07.2020 (v1.1)
|
Compatible version : 24.07.2020 (v1.1, PCB v1.0)
|
||||||
Latest compatible version (PCB v1.0) : 24.07.2020 (v1.1)
|
: 21.07.2020 (v2.1, PCB v2.0)
|
||||||
Minimum compatible version (PCB v2.0) : 21.07.2020 (v2.1)
|
|
||||||
Latest compatible version (PCB v2.0) : 21.07.2020 (v2.1)
|
|
||||||
|
|
||||||
Gotthard
|
Gotthard
|
||||||
========
|
========
|
||||||
Minimum compatible version : 11.01.2013
|
Compatible version : 08.02.2018 (50um and 25um Master)
|
||||||
Latest compatible version : 08.02.2018 (50um and 25um Master)
|
: 09.02.2018 (25 um Slave)
|
||||||
09.02.2018 (25 um Slave)
|
|
||||||
|
|
||||||
Mythen3
|
Mythen3
|
||||||
=======
|
=======
|
||||||
Minimum compatible version : 25.09.2020
|
Compatible version : 25.09.2020 (development)
|
||||||
Latest compatible version : 25.09.2020
|
|
||||||
|
|
||||||
Gotthard2
|
Gotthard2
|
||||||
=========
|
=========
|
||||||
Minimum compatible version : 25.09.2020
|
Compatible version : 25.09.2020 (development)
|
||||||
Latest compatible version : 25.09.2020
|
|
||||||
|
|
||||||
Moench
|
Moench
|
||||||
======
|
======
|
||||||
Minimum compatible version : 02.03.2020
|
Compatible version : 10.05.2020 (v1.0)
|
||||||
Latest compatible version : 02.03.2020
|
|
||||||
|
|
||||||
Ctb
|
Ctb
|
||||||
===
|
===
|
||||||
Minimum compatible version : 27.11.2019
|
Compatible version : 10.05.2019 (v1.0)
|
||||||
Latest compatible version : 27.11.2019
|
|
||||||
|
|
||||||
|
|
||||||
Detector Upgrade
|
Detector Upgrade
|
||||||
================
|
================
|
||||||
Eiger Remotely via bit files
|
|
||||||
Jungfrau Remotely using sls_detector_put programfpga <pof>
|
The following can be upgraded remotely:
|
||||||
Gotthard Cannot be upgraded remotely. Requires programming via USB blaster
|
Eiger via bit files
|
||||||
Mythen3 Remotely using sls_detector_put programfpga <rbf>
|
Jungfrau via command <.pof>
|
||||||
Gotthard2 Remotely using sls_detector_put programfpga <rbf>
|
Mythen3 via command <.rbf>
|
||||||
Moench Remotely using sls_detector_put programfpga <pof>
|
Gotthard2 via command <.rbf>
|
||||||
Ctb Remotely using sls_detector_put programfpga <pof>
|
Moench via command <.pof>
|
||||||
|
Ctb via command <.pof>
|
||||||
|
|
||||||
|
The following cannot be upgraded remotely:
|
||||||
|
Gotthard
|
||||||
|
|
||||||
Instructions available at
|
Instructions available at
|
||||||
https://slsdetectorgroup.github.io/devdoc/firmware.html
|
https://slsdetectorgroup.github.io/devdoc/firmware.html
|
||||||
|
and
|
||||||
|
https://slsdetectorgroup.github.io/devdoc/serverupgrade.html
|
||||||
|
|
||||||
Please refer to the link below for more details on the firmware versions.
|
Please refer to the link below for more details on the firmware versions.
|
||||||
https://www.psi.ch/en/detectors/firmware
|
https://www.psi.ch/en/detectors/firmware
|
||||||
|
|
||||||
|
|
||||||
2. Download, Documentation & Support
|
2. Download, Documentation & Support
|
||||||
@ -72,7 +70,7 @@ SLS Detector Package 5.0.0-rc2 released on 05.10.2020 (Release Candidate 2)
|
|||||||
Download
|
Download
|
||||||
--------
|
--------
|
||||||
|
|
||||||
The Source Code (Default C++ API):
|
The Source Code:
|
||||||
https://github.com/slsdetectorgroup/slsDetectorPackage
|
https://github.com/slsdetectorgroup/slsDetectorPackage
|
||||||
|
|
||||||
Documentation
|
Documentation
|
||||||
@ -80,12 +78,24 @@ SLS Detector Package 5.0.0-rc2 released on 05.10.2020 (Release Candidate 2)
|
|||||||
|
|
||||||
Installation:
|
Installation:
|
||||||
https://slsdetectorgroup.github.io/devdoc/installation.html#
|
https://slsdetectorgroup.github.io/devdoc/installation.html#
|
||||||
|
|
||||||
|
Firmware Upgrade:
|
||||||
|
https://slsdetectorgroup.github.io/devdoc/firmware.html
|
||||||
|
|
||||||
|
Detector Server upgrade:
|
||||||
|
https://slsdetectorgroup.github.io/devdoc/serverupgrade.html
|
||||||
|
|
||||||
|
Detector Simulators:
|
||||||
|
https://slsdetectorgroup.github.io/devdoc/virtualserver.html
|
||||||
|
|
||||||
Consuming slsDetectorPackage:
|
Consuming slsDetectorPackage:
|
||||||
https://slsdetectorgroup.github.io/devdoc/consuming.html
|
https://slsdetectorgroup.github.io/devdoc/consuming.html
|
||||||
|
|
||||||
Command Line Documentation:
|
Command Line Documentation:
|
||||||
https://slsdetectorgroup.github.io/devdoc/commandline.html
|
https://slsdetectorgroup.github.io/devdoc/commandline.html
|
||||||
|
|
||||||
|
Quick Start Guide:
|
||||||
|
https://slsdetectorgroup.github.io/devdoc/quick_start_guide.html
|
||||||
|
|
||||||
C++ API Documentation:
|
C++ API Documentation:
|
||||||
https://slsdetectorgroup.github.io/devdoc/detector.html
|
https://slsdetectorgroup.github.io/devdoc/detector.html
|
||||||
@ -100,12 +110,15 @@ SLS Detector Package 5.0.0-rc2 released on 05.10.2020 (Release Candidate 2)
|
|||||||
https://slsdetectorgroup.github.io/devdoc/pyexamples.html
|
https://slsdetectorgroup.github.io/devdoc/pyexamples.html
|
||||||
|
|
||||||
TroubleShooting:
|
TroubleShooting:
|
||||||
https://www.psi.ch/en/detectors/troubleshooting
|
https://slsdetectorgroup.github.io/devdoc/troubleshooting.html
|
||||||
|
|
||||||
Further Documentation:
|
Further Documentation:
|
||||||
https://www.psi.ch/en/detectors/users-support
|
https://www.psi.ch/en/detectors/documentation
|
||||||
|
|
||||||
|
Old Release notes:
|
||||||
|
https://www.psi.ch/en/detectors/latest-installation
|
||||||
|
|
||||||
|
|
||||||
Support
|
Support
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
@ -5,31 +5,43 @@ Firmware Upgrade
|
|||||||
|
|
||||||
Eiger
|
Eiger
|
||||||
-------------
|
-------------
|
||||||
.. note ::
|
|
||||||
| Eiger firmware can be upgraded remotely.
|
|
||||||
| The programming executable (bcp) and corresponding bit files are provided by the SLS Detector group.
|
|
||||||
|
|
||||||
|
Download
|
||||||
Compatibility
|
|
||||||
^^^^^^^^^^^^^
|
^^^^^^^^^^^^^
|
||||||
|
- `bcp script <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/eiger/bcp>`__
|
||||||
|
|
||||||
**Release candidate 5.0.0-rc1**
|
- detector server corresponding to package in slsDetectorPackage/serverBin
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
Minimum compatible version : 27
|
- bit files
|
||||||
Latest compatible version : 27
|
.. list-table::
|
||||||
|
:widths: 25 10 30 25 10
|
||||||
`Older versions <https://www.psi.ch/en/detectors/latest-installation>`_
|
:header-rows: 1
|
||||||
|
|
||||||
|
* - Software
|
||||||
|
- Hardware
|
||||||
|
- Firmware Date
|
||||||
|
- Firmware Link
|
||||||
|
- Comments
|
||||||
|
* - v5.0.0-rcx
|
||||||
|
-
|
||||||
|
- 08.09.2020
|
||||||
|
- `v27 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/eiger/v27/>`__
|
||||||
|
-
|
||||||
|
* - v4.0.0 - v4.2.0
|
||||||
|
-
|
||||||
|
- 30.07.2019
|
||||||
|
- `v24 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/eiger/v24/>`__
|
||||||
|
-
|
||||||
|
* - v3.1.0 - v3.1.5
|
||||||
|
-
|
||||||
|
- 17.08.2017
|
||||||
|
- `v20 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/eiger/v20/>`__
|
||||||
|
-
|
||||||
|
|
||||||
Corrsponding Detector Server
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
| **Location:**
|
|
||||||
| 5.0.0-rc1: slsDetectorPackage/slsDetectorServer/eigerDetectorServer/bin/eigerDetectorServer_developer
|
|
||||||
|
|
||||||
Upgrade
|
Upgrade
|
||||||
^^^^^^^^
|
^^^^^^^^
|
||||||
#. Tftp must be already installed on your pc to use the bcp executable.
|
#. Tftp must be already installed on your pc to use the bcp script.
|
||||||
|
|
||||||
#. Kill the on-board servers and copy new servers to the board.
|
#. Kill the on-board servers and copy new servers to the board.
|
||||||
|
|
||||||
@ -99,36 +111,46 @@ Upgrade
|
|||||||
|
|
||||||
Jungfrau
|
Jungfrau
|
||||||
-------------
|
-------------
|
||||||
.. note ::
|
|
||||||
| Jungfrau firmware can be upgraded remotely.
|
|
||||||
| The corresponding programming file (pof) is provided by the SLS Detector group.
|
|
||||||
|
|
||||||
|
Download
|
||||||
Compatibility
|
|
||||||
^^^^^^^^^^^^^
|
^^^^^^^^^^^^^
|
||||||
|
- detector server corresponding to package in slsDetectorPackage/serverBin
|
||||||
|
|
||||||
**Release candidate 5.0.0-rc1**
|
- pof files
|
||||||
|
.. list-table::
|
||||||
|
:widths: 25 10 30 25 10
|
||||||
|
:header-rows: 1
|
||||||
|
|
||||||
.. code-block:: bash
|
* - Software
|
||||||
|
- Hardware
|
||||||
|
- Firmware Date
|
||||||
|
- Firmware Link
|
||||||
|
- Comments
|
||||||
|
* - v5.0.0-rcx
|
||||||
|
- 2.0
|
||||||
|
- 21.07.2020
|
||||||
|
- `v2.1 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/jungfrau/v2_1/jungfrau_v2_1.pof>`__
|
||||||
|
-
|
||||||
|
* - v5.0.0-rcx
|
||||||
|
- 1.0
|
||||||
|
- 24.07.2020
|
||||||
|
- `v1.1 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/jungfrau/v1_1/jungfrau_v1_1.pof>`__
|
||||||
|
-
|
||||||
|
* - v4.0.1 - v4.2.0
|
||||||
|
- 1.0
|
||||||
|
- 06.12.2018
|
||||||
|
- `v0.7 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/jungfrau/v0_7/jungfrau_v0_7.pof>`__
|
||||||
|
-
|
||||||
|
* - v3.1.0 - v3.1.5
|
||||||
|
- 1.0
|
||||||
|
- 13.11.2017
|
||||||
|
- `v0.6 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/jungfrau/v0_6/jungfrau_v0_6.pof>`__
|
||||||
|
-
|
||||||
|
|
||||||
# PCB v1.0
|
|
||||||
Minimum compatible version : 24.07.2020 (v1.1)
|
|
||||||
Latest compatible version : 24.07.2020 (v1.1)
|
|
||||||
# PCB v2.0
|
|
||||||
Minimum compatible version : 21.07.2020 (v2.1)
|
|
||||||
Latest compatible version : 21.07.2020 (v2.1)
|
|
||||||
|
|
||||||
`Older versions <https://www.psi.ch/en/detectors/latest-installation>`_
|
|
||||||
|
|
||||||
|
|
||||||
Corrsponding Detector Server
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
| **Location:**
|
|
||||||
| 5.0.0-rc1: slsDetectorPackage/slsDetectorServer/jungfrauDetectorServer/bin/jungfrauDetectorServer_developer
|
|
||||||
|
|
||||||
|
|
||||||
Upgrade (from v4.x.x)
|
Upgrade (from v4.x.x)
|
||||||
^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
#. Tftp must be installed on pc.
|
#. Tftp must be installed on pc.
|
||||||
|
|
||||||
#. Update client package to the latest (5.0.0-rc1).
|
#. Update client package to the latest (5.0.0-rc1).
|
||||||
@ -179,8 +201,8 @@ Upgrade (from v4.x.x)
|
|||||||
jungfrauDetectorServervxxx --stop-server 1953
|
jungfrauDetectorServervxxx --stop-server 1953
|
||||||
|
|
||||||
|
|
||||||
Upgrade (from v5.0.0-rc1)
|
Upgrade (from v5.0.0-rcx)
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
#. Program from console
|
#. Program from console
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
@ -197,33 +219,45 @@ Upgrade (from v5.0.0-rc1)
|
|||||||
Gotthard
|
Gotthard
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
Download
|
||||||
|
^^^^^^^^^^^^^
|
||||||
|
- detector server corresponding to package in slsDetectorPackage/serverBin
|
||||||
|
|
||||||
|
- pof files
|
||||||
|
.. list-table::
|
||||||
|
:widths: 15 15 15 15 5
|
||||||
|
:header-rows: 1
|
||||||
|
|
||||||
|
* - Software
|
||||||
|
- Hardware
|
||||||
|
- Firmware Date
|
||||||
|
- Firmware Link
|
||||||
|
- Comments
|
||||||
|
* - All versions
|
||||||
|
- 50um
|
||||||
|
- 08.02.2018
|
||||||
|
- `50um <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/gotthard_I/50um/gotthard_I_50um.pof>`__
|
||||||
|
-
|
||||||
|
* - All versions
|
||||||
|
- 25um (master)
|
||||||
|
- 08.02.2018
|
||||||
|
- `25um (master) <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/gotthard_I/25um/master/gotthard_I_25um_master.pof>`__
|
||||||
|
-
|
||||||
|
* - All versions
|
||||||
|
- 25um (slave)
|
||||||
|
- 09.02.2018
|
||||||
|
- `25um (slave) <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/gotthard_I/25um/slave/gotthard_I_25um_slave.pof>`__
|
||||||
|
-
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Upgrade
|
||||||
|
^^^^^^^^
|
||||||
.. warning ::
|
.. warning ::
|
||||||
| Gotthard firmware cannot be upgraded remotely and requires the use of USB-Blaster.
|
| Gotthard firmware cannot be upgraded remotely and requires the use of USB-Blaster.
|
||||||
| It is generally updated by the SLS Detector group.
|
| It is generally updated by the SLS Detector group.
|
||||||
|
|
||||||
|
#. Download `Altera Quartus software or Quartus programmer <https://fpgasoftware.intel.com/20.1/?edition=standard&platform=linux&product=qprogrammer#tabs-4>`__.
|
||||||
Compatibility
|
|
||||||
^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
**Release candidate 5.0.0-rc1**
|
|
||||||
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
Minimum compatible version : 11.01.2013
|
|
||||||
Latest compatible version : 08.02.2018 (50um and 25um Master)
|
|
||||||
09.02.2018 (25 um Slave)
|
|
||||||
|
|
||||||
`Older versions <https://www.psi.ch/en/detectors/latest-installation>`_
|
|
||||||
|
|
||||||
Corrsponding Detector Server
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
| **Location:**
|
|
||||||
| 5.0.0-rc1: slsDetectorPackage/slsDetectorServer/gotthardDetectorServer/bin/gotthardDetectorServer_developer
|
|
||||||
|
|
||||||
Upgrade
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
#. Download `Altera Quartus software or Quartus programmer <https://fpgasoftware.intel.com/20.1/?edition=standard&platform=linux&product=qprogrammer#tabs-4>`_.
|
|
||||||
|
|
||||||
|
|
||||||
#. Start Quartus programmer, click on Hardware Setup. In the "Currently selected hardware" window, select USB-Blaster.
|
#. Start Quartus programmer, click on Hardware Setup. In the "Currently selected hardware" window, select USB-Blaster.
|
||||||
@ -243,28 +277,35 @@ Upgrade
|
|||||||
|
|
||||||
Mythen3
|
Mythen3
|
||||||
-------
|
-------
|
||||||
.. note ::
|
|
||||||
| Mythen3 firmware can be upgraded remotely.
|
|
||||||
| The corresponding programming file (rbf) is provided by the SLS Detector group.
|
|
||||||
|
|
||||||
|
.. note ::
|
||||||
|
|
||||||
Compatibility
|
As it is still in developement, the rbf files must be picked up from the SLS Detector Group.
|
||||||
|
|
||||||
|
Download
|
||||||
^^^^^^^^^^^^^
|
^^^^^^^^^^^^^
|
||||||
|
|
||||||
**Release candidate 5.0.0-rc1**
|
- detector server corresponding to package in slsDetectorPackage/serverBin
|
||||||
|
|
||||||
.. code-block:: bash
|
- rbf files
|
||||||
|
.. list-table::
|
||||||
|
:widths: 25 10 30 25 10
|
||||||
|
:header-rows: 1
|
||||||
|
|
||||||
Minimum compatible version : 25.09.2020
|
* - Software
|
||||||
Latest compatible version : 25.09.2020
|
- Hardware
|
||||||
|
- Firmware Date
|
||||||
Corrsponding Detector Server
|
- Firmware Link
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- Comments
|
||||||
| **Location:**
|
* - v5.0.0-rcx
|
||||||
| 5.0.0-rc1: slsDetectorPackage/slsDetectorServer/mythen3DetectorServer/bin/mythen3DetectorServer_developer
|
-
|
||||||
|
- 25.09.2020
|
||||||
|
-
|
||||||
|
- development
|
||||||
|
|
||||||
Upgrade (from v5.0.0-rc1)
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
Upgrade (from v5.0.0-rcx)
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
#. Program from console
|
#. Program from console
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
@ -279,29 +320,34 @@ Upgrade (from v5.0.0-rc1)
|
|||||||
|
|
||||||
|
|
||||||
Gotthard2
|
Gotthard2
|
||||||
----------
|
-------------
|
||||||
.. note ::
|
|
||||||
| Gotthard2 firmware can be upgraded remotely.
|
|
||||||
| The corresponding programming file (rbf) is provided by the SLS Detector group.
|
|
||||||
|
|
||||||
|
.. note ::
|
||||||
|
|
||||||
Compatibility
|
As it is still in developement, the rbf files must be picked up from the SLS Detector Group.
|
||||||
|
|
||||||
|
Download
|
||||||
^^^^^^^^^^^^^
|
^^^^^^^^^^^^^
|
||||||
|
- detector server corresponding to package in slsDetectorPackage/serverBin
|
||||||
|
|
||||||
**Release candidate 5.0.0-rc1**
|
- rbf files
|
||||||
|
.. list-table::
|
||||||
|
:widths: 25 10 30 25 10
|
||||||
|
:header-rows: 1
|
||||||
|
|
||||||
.. code-block:: bash
|
* - Software
|
||||||
|
- Hardware
|
||||||
|
- Firmware Date
|
||||||
|
- Firmware Link
|
||||||
|
- Comments
|
||||||
|
* - v5.0.0-rcx
|
||||||
|
-
|
||||||
|
- 25.09.2020
|
||||||
|
-
|
||||||
|
- development
|
||||||
|
|
||||||
Minimum compatible version : 25.09.2020
|
Upgrade (from v5.0.0-rcx)
|
||||||
Latest compatible version : 25.09.2020
|
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
Corrsponding Detector Server
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
| **Location:**
|
|
||||||
| 5.0.0-rc1: slsDetectorPackage/slsDetectorServer/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer
|
|
||||||
|
|
||||||
Upgrade (from v5.0.0-rc1)
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
#. Program from console
|
#. Program from console
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
@ -316,29 +362,35 @@ Upgrade (from v5.0.0-rc1)
|
|||||||
|
|
||||||
|
|
||||||
Moench
|
Moench
|
||||||
------
|
-------
|
||||||
.. note ::
|
|
||||||
| Moench firmware can be upgraded remotely.
|
|
||||||
| The corresponding programming file (pof) is provided by the SLS Detector group.
|
|
||||||
|
|
||||||
|
Download
|
||||||
Compatibility
|
|
||||||
^^^^^^^^^^^^^
|
^^^^^^^^^^^^^
|
||||||
|
- detector server corresponding to package in slsDetectorPackage/serverBin
|
||||||
|
|
||||||
**Release candidate 5.0.0-rc1**
|
- pof files
|
||||||
|
.. list-table::
|
||||||
|
:widths: 25 10 30 25 10
|
||||||
|
:header-rows: 1
|
||||||
|
|
||||||
.. code-block:: bash
|
* - Software
|
||||||
|
- Hardware
|
||||||
|
- Firmware Date
|
||||||
|
- Firmware Link
|
||||||
|
- Comments
|
||||||
|
* - v5.0.0-rcx
|
||||||
|
- EPCQ128
|
||||||
|
- 05.10.2020
|
||||||
|
- `v1.0 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/moench/EPCQ128/v1_0/moench_v1_0_201005.pof>`__
|
||||||
|
-
|
||||||
|
* - v5.0.0-rcx
|
||||||
|
- EPCS128
|
||||||
|
- 05.10.2020
|
||||||
|
- `v1.0 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/moench/EPCS128/v1_0/moench_v1_0_201005.pof>`__
|
||||||
|
-
|
||||||
|
|
||||||
Minimum compatible version : 02.03.2020
|
Upgrade (from v5.0.0-rcx)
|
||||||
Latest compatible version : 02.03.2020
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
Corrsponding Detector Server
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
| **Location:**
|
|
||||||
| 5.0.0-rc1: slsDetectorPackage/slsDetectorServer/moenchDetectorServer/bin/moenchDetectorServer_developer
|
|
||||||
|
|
||||||
Upgrade (from v5.0.0-rc1)
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
#. Program from console
|
#. Program from console
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
@ -352,29 +404,35 @@ Upgrade (from v5.0.0-rc1)
|
|||||||
sls_detector_put programfpga xxx.pof
|
sls_detector_put programfpga xxx.pof
|
||||||
|
|
||||||
Ctb
|
Ctb
|
||||||
---
|
----
|
||||||
.. note ::
|
|
||||||
| Ctb firmware can be upgraded remotely.
|
|
||||||
| The corresponding programming file (pof) is provided by the SLS Detector group.
|
|
||||||
|
|
||||||
|
Download
|
||||||
Compatibility
|
|
||||||
^^^^^^^^^^^^^
|
^^^^^^^^^^^^^
|
||||||
|
- detector server corresponding to package in slsDetectorPackage/serverBin
|
||||||
|
|
||||||
**Release candidate 5.0.0-rc1**
|
- pof files
|
||||||
|
.. list-table::
|
||||||
|
:widths: 25 10 30 25 10
|
||||||
|
:header-rows: 1
|
||||||
|
|
||||||
.. code-block:: bash
|
* - Software
|
||||||
|
- Hardware
|
||||||
|
- Firmware Date
|
||||||
|
- Firmware Link
|
||||||
|
- Comments
|
||||||
|
* - v5.0.0-rcx
|
||||||
|
- EPCQ128
|
||||||
|
- 05.10.2020
|
||||||
|
- `v1.0 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/ctb/EPCQ128/v1_0/ctb_v1_0_201005.pof>`__
|
||||||
|
-
|
||||||
|
* - v5.0.0-rcx
|
||||||
|
- EPCS128
|
||||||
|
- 05.10.2020
|
||||||
|
- `v1.0 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/ctb/EPCS128/v1_0/ctb_v1_0_201005.pof>`__
|
||||||
|
-
|
||||||
|
|
||||||
Minimum compatible version : 27.11.2019
|
Upgrade (from v5.0.0-rcx)
|
||||||
Latest compatible version : 27.11.2019
|
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
Corrsponding Detector Server
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
| **Location:**
|
|
||||||
| 5.0.0-rc1: slsDetectorPackage/slsDetectorServer/ctbDetectorServer/bin/ctbDetectorServer_developer
|
|
||||||
|
|
||||||
Upgrade (from v5.0.0-rc1)
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
#. Program from console
|
#. Program from console
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
@ -70,12 +70,6 @@ exposed to Python through pybind11.
|
|||||||
.. autoclass:: masterFlags
|
.. autoclass:: masterFlags
|
||||||
:undoc-members:
|
:undoc-members:
|
||||||
|
|
||||||
.. autoclass:: frameModeType
|
|
||||||
:undoc-members:
|
|
||||||
|
|
||||||
.. autoclass:: detectorModeType
|
|
||||||
:undoc-members:
|
|
||||||
|
|
||||||
.. autoclass:: burstMode
|
.. autoclass:: burstMode
|
||||||
:undoc-members:
|
:undoc-members:
|
||||||
|
|
||||||
|
@ -217,9 +217,9 @@ The enums can be found in slsdet.enums
|
|||||||
|
|
||||||
import slsdet
|
import slsdet
|
||||||
>>> [e for e in dir(slsdet.enums) if not e.startswith('_')]
|
>>> [e for e in dir(slsdet.enums) if not e.startswith('_')]
|
||||||
['burstMode', 'clockIndex', 'dacIndex', 'detectorModeType',
|
['burstMode', 'clockIndex', 'dacIndex',
|
||||||
'detectorSettings', 'detectorType', 'dimension', 'externalSignalFlag',
|
'detectorSettings', 'detectorType', 'dimension', 'externalSignalFlag',
|
||||||
'fileFormat', 'frameDiscardPolicy', 'frameModeType', 'masterFlags',
|
'fileFormat', 'frameDiscardPolicy', 'masterFlags',
|
||||||
'readoutMode', 'runStatus', 'speedLevel', 'timingMode',
|
'readoutMode', 'runStatus', 'speedLevel', 'timingMode',
|
||||||
'timingSourceType']
|
'timingSourceType']
|
||||||
|
|
||||||
|
@ -133,7 +133,8 @@ Compile with SLS_USE_GUI=ON in cmake or -g option in cmk.sh script. One can also
|
|||||||
|
|
||||||
|
|
||||||
.. note ::
|
.. note ::
|
||||||
| The streaming frequency (commmand: rx_zmqfreq) is set by default in the receiver to 1 (send every frame).
|
| The streaming high water mark (commmand: rx_zmqhwm) and the receiving high water mark (command: zmqhwm) is by default the lib zmq's default (currently 1000).
|
||||||
| At Gui startup, this value is set to 0. It will set to use a timer of 500 ms. Hence, every frame will not be streamed to the gui. This is done to reduce the load for fast and large detectors for display purposes.
|
| At Gui startup, these values are set to 2. Hence, for very fast detectors, many frames will be dropped to be able to view the latest in the gui.
|
||||||
| One can still change this setting in the gui in the Plot tab (Plotting frequency) or from the command line (rx_zmqfreq).
|
| One can still change this setting in the gui in the Plot tab (ZMQ Streaming), from the command line or API.
|
||||||
| First frame is always streamed out, no matter if timer or frequency is used.
|
| Both hwm's can be set to a -1 to use the lib's default.
|
||||||
|
| Since the dummy end of acquisition packet streamed from receiver might also be lost, receiver restreams until gui acknowledges.
|
@ -1,6 +1,32 @@
|
|||||||
Detector Servers
|
Detector Servers
|
||||||
=================
|
=================
|
||||||
|
|
||||||
|
Location
|
||||||
|
---------
|
||||||
|
slsDetectorPackage/serverBin/ folder in every release.
|
||||||
|
|
||||||
|
|
||||||
|
.. _Detector Server Arguments:
|
||||||
|
|
||||||
|
Arguments
|
||||||
|
---------
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
Possible arguments are:
|
||||||
|
-v, --version : Software version
|
||||||
|
-p, --port <port> : TCP communication port with client.
|
||||||
|
-g, --nomodule : [Mythen3][Gotthard2] Generic or No Module mode.
|
||||||
|
Skips detector type checks.
|
||||||
|
-f, --phaseshift <value> : [Gotthard] only. Sets phase shift.
|
||||||
|
-d, --devel : Developer mode. Skips firmware checks.
|
||||||
|
-u, --update : Update mode. Skips firmware checks and initial detector setup.
|
||||||
|
-s, --stopserver : Stop server. Do not use as it is created by control server
|
||||||
|
|
||||||
|
|
||||||
|
Basics
|
||||||
|
------------
|
||||||
|
|
||||||
Detector Servers include:
|
Detector Servers include:
|
||||||
* Control server [default port: 1952]
|
* Control server [default port: 1952]
|
||||||
* Almost all client communication.
|
* Almost all client communication.
|
||||||
@ -8,18 +34,3 @@ Detector Servers include:
|
|||||||
* Client requests for detector status, stop acquisition, temperature, advanced read/write registers.
|
* Client requests for detector status, stop acquisition, temperature, advanced read/write registers.
|
||||||
|
|
||||||
When using a blocking acquire command (sls_detector_acquire or Detector::acquire), the control server is blocked until end of acquisition. However, stop server commands could be used in parallel.
|
When using a blocking acquire command (sls_detector_acquire or Detector::acquire), the control server is blocked until end of acquisition. However, stop server commands could be used in parallel.
|
||||||
|
|
||||||
.. _Detector Server Arguments:
|
|
||||||
Arguments
|
|
||||||
---------
|
|
||||||
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
Possible arguments are:
|
|
||||||
-v, --version : Software version
|
|
||||||
-p, --port <port> : TCP communication port with client.
|
|
||||||
-g, --nomodule : [Mythen3][Gotthard2] Generic or No Module mode. Skips detector type checks.
|
|
||||||
-f, --phaseshift <value> : [Gotthard] only. Sets phase shift.
|
|
||||||
-d, --devel : Developer mode. Skips firmware checks.
|
|
||||||
-u, --update : Update mode. Skips firmware checks and initial detector setup.
|
|
||||||
-s, --stopserver : Stop server. Do not use as it is created by control server
|
|
||||||
|
@ -7,8 +7,7 @@ Eiger
|
|||||||
-------------
|
-------------
|
||||||
|
|
||||||
|
|
||||||
| **Location:**
|
**Location:** slsDetectorPackage/serverBin/ folder for every release.
|
||||||
| 5.0.0-rc1: slsDetectorPackage/slsDetectorServer/eigerDetectorServer/bin/eigerDetectorServer_developer
|
|
||||||
|
|
||||||
|
|
||||||
#. Kill old server and copy new server
|
#. Kill old server and copy new server
|
||||||
@ -39,11 +38,10 @@ Eiger
|
|||||||
Jungfrau
|
Jungfrau
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
| **Location:**
|
**Location:** slsDetectorPackage/serverBin/ folder for every release.
|
||||||
| 5.0.0-rc1: slsDetectorPackage/slsDetectorServer/jungfrauDetectorServer/bin/jungfrauDetectorServer_developer
|
|
||||||
|
|
||||||
#. Install tftp and copy detector server binary to tftp folder
|
#. Install tftp and copy detector server binary to tftp folder
|
||||||
#. Program from console (only from 5.0.0-rc1)
|
#. Program from console (only from 5.0.0-rcx)
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# copies new server from pc tftp folder, respawns and reboots
|
# copies new server from pc tftp folder, respawns and reboots
|
||||||
@ -53,11 +51,10 @@ Jungfrau
|
|||||||
Gotthard
|
Gotthard
|
||||||
---------
|
---------
|
||||||
|
|
||||||
| **Location:**
|
**Location:** slsDetectorPackage/serverBin/ folder for every release.
|
||||||
| 5.0.0-rc1: slsDetectorPackage/slsDetectorServer/gotthardDetectorServer/bin/gotthardDetectorServer_developer
|
|
||||||
|
|
||||||
#. Install tftp and copy detector server binary to tftp folder
|
#. Install tftp and copy detector server binary to tftp folder
|
||||||
#. Program from console (only from 5.0.0-rc1)
|
#. Program from console (only from 5.0.0-rcx)
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# copies new server from pc tftp folder, respawns and reboots
|
# copies new server from pc tftp folder, respawns and reboots
|
||||||
@ -68,11 +65,10 @@ Gotthard
|
|||||||
Mythen3
|
Mythen3
|
||||||
-------
|
-------
|
||||||
|
|
||||||
| **Location:**
|
**Location:** slsDetectorPackage/serverBin/ folder for every release.
|
||||||
| 5.0.0-rc1: slsDetectorPackage/slsDetectorServer/mythen3DetectorServer/bin/mythen3DetectorServer_developer
|
|
||||||
|
|
||||||
#. Install tftp and copy detector server binary to tftp folder
|
#. Install tftp and copy detector server binary to tftp folder
|
||||||
#. Program from console (only from 5.0.0-rc1)
|
#. Program from console (only from 5.0.0-rcx)
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# copies new server from pc tftp folder and reboots (does not respawn)
|
# copies new server from pc tftp folder and reboots (does not respawn)
|
||||||
@ -82,11 +78,10 @@ Mythen3
|
|||||||
Gotthard2
|
Gotthard2
|
||||||
----------
|
----------
|
||||||
|
|
||||||
| **Location:**
|
**Location:** slsDetectorPackage/serverBin/ folder for every release.
|
||||||
| 5.0.0-rc1: slsDetectorPackage/slsDetectorServer/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer
|
|
||||||
|
|
||||||
#. Install tftp and copy detector server binary to tftp folder
|
#. Install tftp and copy detector server binary to tftp folder
|
||||||
#. Program from console (only from 5.0.0-rc1)
|
#. Program from console (only from 5.0.0-rcx)
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# copies new server from pc tftp folder and reboots (does not respawn)
|
# copies new server from pc tftp folder and reboots (does not respawn)
|
||||||
@ -96,11 +91,10 @@ Gotthard2
|
|||||||
Moench
|
Moench
|
||||||
------
|
------
|
||||||
|
|
||||||
| **Location:**
|
**Location:** slsDetectorPackage/serverBin/ folder for every release.
|
||||||
| 5.0.0-rc1: slsDetectorPackage/slsDetectorServer/moenchDetectorServer/bin/moenchDetectorServer_developer
|
|
||||||
|
|
||||||
#. Install tftp and copy detector server binary to tftp folder
|
#. Install tftp and copy detector server binary to tftp folder
|
||||||
#. Program from console (only from 5.0.0-rc1)
|
#. Program from console (only from 5.0.0-rcx)
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# copies new server from pc tftp folder, respawns and reboots
|
# copies new server from pc tftp folder, respawns and reboots
|
||||||
@ -110,11 +104,10 @@ Moench
|
|||||||
Ctb
|
Ctb
|
||||||
---
|
---
|
||||||
|
|
||||||
| **Location:**
|
**Location:** slsDetectorPackage/serverBin/ folder for every release.
|
||||||
| 5.0.0-rc1: slsDetectorPackage/slsDetectorServer/ctbDetectorServer/bin/ctbDetectorServer_developer
|
|
||||||
|
|
||||||
#. Install tftp and copy detector server binary to tftp folder
|
#. Install tftp and copy detector server binary to tftp folder
|
||||||
#. Program from console (only from 5.0.0-rc1)
|
#. Program from console (only from 5.0.0-rcx)
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# copies new server from pc tftp folder, respawns and reboots
|
# copies new server from pc tftp folder, respawns and reboots
|
||||||
|
@ -316,7 +316,11 @@ You can then reset to zero the number of frames caught (in releases<5.0), then
|
|||||||
\item {\tt{sls\_detector\_put 0-receiver start}}
|
\item {\tt{sls\_detector\_put 0-receiver start}}
|
||||||
\item {\tt{sls\_detector\_put 0-status start}}
|
\item {\tt{sls\_detector\_put 0-status start}}
|
||||||
\end{enumerate}
|
\end{enumerate}
|
||||||
In release \textcolor{red}{5.0} it is not needed to reset the frames caughts.
|
In release \textcolor{red}{5.0} it is not needed to reset the frames caughts and the commands are:
|
||||||
|
\begin{enumerate}
|
||||||
|
\item \textcolor{red}{{\tt{sls\_detector\_put 0-rx\_start}}}
|
||||||
|
\item \textcolor{red}{{\tt{sls\_detector\_put 0-start}}}
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
You can poll the detector status using:
|
You can poll the detector status using:
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
@ -325,17 +329,17 @@ sls_detector_get 0-status
|
|||||||
When the detector is {\tt{idle}}, then the acquisition is done but the receiver could still be receiving data. If you want, you can check if the receiver is finished receiving as many frames as you were expecting (this is optional but required for many many frames acquisition or when using some delays to send data at very high frame rate.
|
When the detector is {\tt{idle}}, then the acquisition is done but the receiver could still be receiving data. If you want, you can check if the receiver is finished receiving as many frames as you were expecting (this is optional but required for many many frames acquisition or when using some delays to send data at very high frame rate.
|
||||||
\begin{enumerate}
|
\begin{enumerate}
|
||||||
\setcounter{enumi}{3}
|
\setcounter{enumi}{3}
|
||||||
\item {\tt{sls\_detector\_get framescaught}}
|
\item {\tt{sls\_detector\_get framescaught}} (\textcolor{red}{rx\_framescaught})
|
||||||
\end{enumerate}
|
\end{enumerate}
|
||||||
Then you can stop the receiver as well now:
|
Then you can stop the receiver as well now:
|
||||||
\begin{enumerate}
|
\begin{enumerate}
|
||||||
\setcounter{enumi}{4}
|
\setcounter{enumi}{4}
|
||||||
\item {\tt{sls\_detector\_put 0-receiver stop}}
|
\item {\tt{sls\_detector\_put 0-receiver stop} (\textcolor{red}{sls\_detector\_put 0-rx\_stop})}
|
||||||
\end{enumerate}
|
\end{enumerate}
|
||||||
|
|
||||||
The detector will not accept other commands while acquiring. If an acquisition wishes to be properly aborted, then:
|
The detector will not accept other commands while acquiring. If an acquisition wishes to be properly aborted, then:
|
||||||
\begin{itemize}
|
\begin{itemize}
|
||||||
\item {\tt{sls\_detector\_put 0-status stop}}
|
\item {\tt{sls\_detector\_put 0-status stop} (\textcolor{red}{sls\_detector\_put 0-stop})}
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
this same command can be used after a non proper abortion of the acquisition to reset to normal status the detector.
|
this same command can be used after a non proper abortion of the acquisition to reset to normal status the detector.
|
||||||
|
|
||||||
@ -1056,9 +1060,9 @@ Note that if one wants to reconstruct the real time the detector was acquiring
|
|||||||
\subsection{Offline image reconstruction}
|
\subsection{Offline image reconstruction}
|
||||||
The offline image reconstruction{\tt{slsImageReconstruction}} is not part of the package anymore. However, it can be retrieved from \\
|
The offline image reconstruction{\tt{slsImageReconstruction}} is not part of the package anymore. However, it can be retrieved from \\
|
||||||
{\tt{git clone https://github.com/slsdetectorgroup/slsImageReconstruction.git slsImageReconstruction}}.\\
|
{\tt{git clone https://github.com/slsdetectorgroup/slsImageReconstruction.git slsImageReconstruction}}.\\
|
||||||
Checkout the {\tt{v3.1}} branch if in a 3.1.X release, the {\tt{v4.0.0}} branch if in 4.0.X release, or the {\tt{v4.1}} branch if in 4.1.X release of the {\tt{slsDetector}} code. There is a {\tt{developer}} branch that has newer updates but needs to be tested.
|
Checkout the {\tt{v3.1}} branch if in a 3.1.X release, the {\tt{v4.0.0}} branch if in 4.0.X release, or the {\tt{v4.1}} branch if in 4.1.X release of the {\tt{slsDetector}} code. There is a {\tt{developer}} branch that is following the 5.X chnages but it is not officila yet.
|
||||||
|
|
||||||
Three possible conversions are possible: into \textbf{cbf}, \textbf{hdf5}. \textbf{tiff} and \textbf{root} format. The detector writes 2 raw files per receiver. An offline image reconstruction executable has been written to collate the possible files together and produce output files. By default an interpolation between the values of the large pixels is performed. Gap pixels between modules are also inserted.
|
Four possible conversions are possible: into \textbf{cbf}, \textbf{hdf5}. \textbf{tiff} and \textbf{root} format. The detector writes 2 raw files per receiver. An offline image reconstruction executable has been written to collate the possible files together and produce output files. By default an interpolation between the values of the large pixels is performed. Gap pixels between modules are also inserted.
|
||||||
|
|
||||||
Note that the number of images per file in the 3.1.X release is hardcoded and needs to match whatever you are using in \\
|
Note that the number of images per file in the 3.1.X release is hardcoded and needs to match whatever you are using in \\
|
||||||
{\tt{slsDetectorsPackage/slsReceiverSoftware/include/sls\_receiver\_defs.h}}:
|
{\tt{slsDetectorsPackage/slsReceiverSoftware/include/sls\_receiver\_defs.h}}:
|
||||||
|
@ -1 +0,0 @@
|
|||||||
../slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServer_developer
|
|
1
serverBin/ctbDetectorServerv5.0.0-rc2
Symbolic link
1
serverBin/ctbDetectorServerv5.0.0-rc2
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv5.0.0-rc2
|
@ -1 +0,0 @@
|
|||||||
../slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServer_developer
|
|
1
serverBin/eigerDetectorServerv5.0.0-rc2
Symbolic link
1
serverBin/eigerDetectorServerv5.0.0-rc2
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv5.0.0-rc2
|
@ -1 +0,0 @@
|
|||||||
../slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer
|
|
1
serverBin/gotthard2DetectorServerv5.0.0-rc2
Symbolic link
1
serverBin/gotthard2DetectorServerv5.0.0-rc2
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv5.0.0-rc2
|
@ -1 +0,0 @@
|
|||||||
../slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServer_developer
|
|
1
serverBin/gotthardDetectorServerv5.0.0-rc2
Symbolic link
1
serverBin/gotthardDetectorServerv5.0.0-rc2
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv5.0.0-rc2
|
@ -1 +0,0 @@
|
|||||||
../slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServer_developer
|
|
1
serverBin/jungfrauDetectorServerv5.0.0-rc2
Symbolic link
1
serverBin/jungfrauDetectorServerv5.0.0-rc2
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv5.0.0-rc2
|
@ -1 +0,0 @@
|
|||||||
../slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServer_developer
|
|
1
serverBin/moenchDetectorServerv5.0.0-rc2
Symbolic link
1
serverBin/moenchDetectorServerv5.0.0-rc2
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv5.0.0-rc2
|
@ -1 +0,0 @@
|
|||||||
../slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer
|
|
1
serverBin/mythen3DetectorServerv5.0.0-rc2
Symbolic link
1
serverBin/mythen3DetectorServerv5.0.0-rc2
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv5.0.0-rc2
|
@ -75,7 +75,7 @@
|
|||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="1" column="4" colspan="4">
|
<item row="1" column="3" colspan="4">
|
||||||
<widget class="QGroupBox" name="box2D">
|
<widget class="QGroupBox" name="box2D">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@ -1388,7 +1388,7 @@ Displays minimum, maximum and sum of values for each plot.
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0" colspan="7">
|
<item row="2" column="0" colspan="6">
|
||||||
<widget class="QGroupBox" name="boxPlotAxis">
|
<widget class="QGroupBox" name="boxPlotAxis">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||||
@ -1789,7 +1789,7 @@ Displays minimum, maximum and sum of values for each plot.
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="7">
|
<item row="2" column="6">
|
||||||
<widget class="QGroupBox" name="boxSave">
|
<widget class="QGroupBox" name="boxSave">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@ -1990,23 +1990,7 @@ Displays minimum, maximum and sum of values for each plot.
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="3">
|
<item row="0" column="0" colspan="7">
|
||||||
<spacer name="horizontalSpacer_6">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Fixed</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>10</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="4" colspan="4">
|
|
||||||
<widget class="QGroupBox" name="boxFrequency">
|
<widget class="QGroupBox" name="boxFrequency">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
@ -2016,7 +2000,7 @@ Displays minimum, maximum and sum of values for each plot.
|
|||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>350</width>
|
||||||
<height>65</height>
|
<height>65</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
@ -2024,7 +2008,7 @@ Displays minimum, maximum and sum of values for each plot.
|
|||||||
<string><html><head/><body><p>Sets the pace at which the receiver streams out images. Images in between the timeout or frequency are not sent out.<br/><br/><span style=" font-weight:600;">Time Interval</span>: Streaming time interval when an image should be streamed. <br/><span style=" font-weight:600;">Every nth Image</span>: Only every nth image is streamed. </p><p><br/></p><p><br/></p></body></html></string>
|
<string><html><head/><body><p>Sets the pace at which the receiver streams out images. Images in between the timeout or frequency are not sent out.<br/><br/><span style=" font-weight:600;">Time Interval</span>: Streaming time interval when an image should be streamed. <br/><span style=" font-weight:600;">Every nth Image</span>: Only every nth image is streamed. </p><p><br/></p><p><br/></p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Receiver Streaming Frequency / Timer</string>
|
<string>ZMQ Streaming</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
@ -2052,6 +2036,31 @@ Displays minimum, maximum and sum of values for each plot.
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
|
<widget class="QCheckBox" name="chkNoPlot">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>80</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p>If checked, there is no call back and no images are plotted.</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>No Plot</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="11">
|
||||||
<widget class="QComboBox" name="comboFrequency">
|
<widget class="QComboBox" name="comboFrequency">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||||
@ -2061,13 +2070,13 @@ Displays minimum, maximum and sum of values for each plot.
|
|||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>150</width>
|
<width>135</width>
|
||||||
<height>0</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16777215</width>
|
<width>135</width>
|
||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
@ -2150,29 +2159,25 @@ Displays minimum, maximum and sum of values for each plot.
|
|||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="13">
|
||||||
<spacer name="horizontalSpacer_14">
|
<widget class="QStackedWidget" name="stackedTimeInterval">
|
||||||
<property name="orientation">
|
<property name="maximumSize">
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Expanding</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
<size>
|
||||||
<width>80</width>
|
<width>150</width>
|
||||||
<height>20</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<widget class="QStackedWidget" name="stackedTimeInterval">
|
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>1</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="pageTimeGap">
|
<widget class="QWidget" name="pageTimeGap">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_14">
|
<layout class="QHBoxLayout" name="horizontalLayout_14">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QDoubleSpinBox" name="spinTimeGap">
|
<widget class="QDoubleSpinBox" name="spinTimeGap">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -2181,11 +2186,17 @@ Displays minimum, maximum and sum of values for each plot.
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>90</width>
|
||||||
|
<height>30</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="keyboardTracking">
|
<property name="keyboardTracking">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="decimals">
|
<property name="decimals">
|
||||||
<number>3</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<double>999999.000000000000000</double>
|
<double>999999.000000000000000</double>
|
||||||
@ -2238,6 +2249,9 @@ Displays minimum, maximum and sum of values for each plot.
|
|||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="pageFrequency">
|
<widget class="QWidget" name="pageFrequency">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_13">
|
<layout class="QHBoxLayout" name="horizontalLayout_13">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QSpinBox" name="spinNthFrame">
|
<widget class="QSpinBox" name="spinNthFrame">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -2267,78 +2281,8 @@ Displays minimum, maximum and sum of values for each plot.
|
|||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
<item row="0" column="10">
|
||||||
</widget>
|
<spacer name="horizontalSpacer_18">
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QGroupBox" name="boxPlotType">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>350</width>
|
|
||||||
<height>65</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Plot Type</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
<property name="flat">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_5">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="horizontalSpacing">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<property name="verticalSpacing">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<widget class="QRadioButton" name="radioDataGraph">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Data Graph</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<spacer name="horizontalSpacer_5">
|
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
@ -2347,22 +2291,159 @@ Displays minimum, maximum and sum of values for each plot.
|
|||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>10</width>
|
<width>30</width>
|
||||||
<height>20</height>
|
<height>20</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0">
|
<item row="0" column="2">
|
||||||
<widget class="QRadioButton" name="radioNoPlot">
|
<widget class="QLabel" name="lblSndHwm">
|
||||||
|
<property name="text">
|
||||||
|
<string>Snd Hwm: </string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<spacer name="horizontalSpacer_25">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Expanding</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>30</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="4">
|
||||||
|
<spacer name="horizontalSpacer_14">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Expanding</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>30</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="6">
|
||||||
|
<widget class="QSpinBox" name="spinRcvHwm">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>25</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>30</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p>High water mark for inbound messages for gui.</p><p> #zmqhwm#</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
<property name="statusTip">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="whatsThis">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="keyboardTracking">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="suffix">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="prefix">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<number>-1</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>99999</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>1000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="3">
|
||||||
|
<widget class="QSpinBox" name="spinSndHwm">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>25</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>30</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p>High water mark for outbound messages for receiver.</p><p>#rx_zmqhwm#</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
<property name="statusTip">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="whatsThis">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="keyboardTracking">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="suffix">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="prefix">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<number>-1</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>99999</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>1000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="5">
|
||||||
|
<widget class="QLabel" name="lblRcvHwm">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>No Plot</string>
|
<string>Rcv Hwm: </string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -2370,7 +2451,6 @@ Displays minimum, maximum and sum of values for each plot.
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
<zorder>boxPlotType</zorder>
|
|
||||||
<zorder>box1D</zorder>
|
<zorder>box1D</zorder>
|
||||||
<zorder>boxFrequency</zorder>
|
<zorder>boxFrequency</zorder>
|
||||||
<zorder>box2D</zorder>
|
<zorder>box2D</zorder>
|
||||||
@ -2378,8 +2458,6 @@ Displays minimum, maximum and sum of values for each plot.
|
|||||||
<zorder>boxSave</zorder>
|
<zorder>boxSave</zorder>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>radioNoPlot</tabstop>
|
|
||||||
<tabstop>radioDataGraph</tabstop>
|
|
||||||
<tabstop>comboFrequency</tabstop>
|
<tabstop>comboFrequency</tabstop>
|
||||||
<tabstop>spinTimeGap</tabstop>
|
<tabstop>spinTimeGap</tabstop>
|
||||||
<tabstop>comboTimeGapUnit</tabstop>
|
<tabstop>comboTimeGapUnit</tabstop>
|
||||||
|
@ -40,6 +40,7 @@ class qDefs : public QWidget {
|
|||||||
static const int Q_FONT_SIZE = 9;
|
static const int Q_FONT_SIZE = 9;
|
||||||
static const int DATA_GAIN_PLOT_RATIO = 5;
|
static const int DATA_GAIN_PLOT_RATIO = 5;
|
||||||
static const int MIN_HEIGHT_GAIN_PLOT_1D = 75;
|
static const int MIN_HEIGHT_GAIN_PLOT_1D = 75;
|
||||||
|
static const int GUI_ZMQ_RCV_HWM = 2;
|
||||||
|
|
||||||
static void DisplayExceptions(std::string emsg, std::string src) {
|
static void DisplayExceptions(std::string emsg, std::string src) {
|
||||||
try {
|
try {
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
#include "ui_form_tab_plot.h"
|
#include "ui_form_tab_plot.h"
|
||||||
|
|
||||||
class qDrawPlot;
|
class qDrawPlot;
|
||||||
class QButtonGroup;
|
|
||||||
|
|
||||||
class qTabPlot : public QWidget, private Ui::TabPlotObject {
|
class qTabPlot : public QWidget, private Ui::TabPlotObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -35,6 +34,8 @@ class qTabPlot : public QWidget, private Ui::TabPlotObject {
|
|||||||
void CheckAspectRatio();
|
void CheckAspectRatio();
|
||||||
void SetZRange();
|
void SetZRange();
|
||||||
void SetStreamingFrequency();
|
void SetStreamingFrequency();
|
||||||
|
void SetStreamingHwm(int value);
|
||||||
|
void SetReceivingHwm(int value);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void DisableZoomSignal(bool);
|
void DisableZoomSignal(bool);
|
||||||
@ -45,6 +46,8 @@ class qTabPlot : public QWidget, private Ui::TabPlotObject {
|
|||||||
void Select1DPlot(bool enable);
|
void Select1DPlot(bool enable);
|
||||||
void GetGapPixels();
|
void GetGapPixels();
|
||||||
void GetStreamingFrequency();
|
void GetStreamingFrequency();
|
||||||
|
void GetStreamingHwm();
|
||||||
|
void GetReceivingHwm();
|
||||||
void SetXYRange();
|
void SetXYRange();
|
||||||
void MaintainAspectRatio(int dimension);
|
void MaintainAspectRatio(int dimension);
|
||||||
|
|
||||||
@ -52,8 +55,6 @@ class qTabPlot : public QWidget, private Ui::TabPlotObject {
|
|||||||
qDrawPlot *plot;
|
qDrawPlot *plot;
|
||||||
bool is1d;
|
bool is1d;
|
||||||
|
|
||||||
QButtonGroup *btnGroupPlotType{nullptr};
|
|
||||||
|
|
||||||
/** default plot and axis titles */
|
/** default plot and axis titles */
|
||||||
static QString defaultPlotTitle;
|
static QString defaultPlotTitle;
|
||||||
static QString defaultHistXAxisTitle;
|
static QString defaultHistXAxisTitle;
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#include "qTabPlot.h"
|
#include "qTabPlot.h"
|
||||||
#include "qDefs.h"
|
#include "qDefs.h"
|
||||||
#include "qDrawPlot.h"
|
#include "qDrawPlot.h"
|
||||||
#include <QAbstractButton>
|
|
||||||
#include <QButtonGroup>
|
|
||||||
#include <QStackedLayout>
|
#include <QStackedLayout>
|
||||||
#include <QStandardItemModel>
|
#include <QStandardItemModel>
|
||||||
|
|
||||||
@ -20,14 +18,9 @@ qTabPlot::qTabPlot(QWidget *parent, sls::Detector *detector, qDrawPlot *p)
|
|||||||
LOG(logDEBUG) << "Plot ready";
|
LOG(logDEBUG) << "Plot ready";
|
||||||
}
|
}
|
||||||
|
|
||||||
qTabPlot::~qTabPlot() { delete btnGroupPlotType; }
|
qTabPlot::~qTabPlot() {}
|
||||||
|
|
||||||
void qTabPlot::SetupWidgetWindow() {
|
void qTabPlot::SetupWidgetWindow() {
|
||||||
// button group for plot type
|
|
||||||
btnGroupPlotType = new QButtonGroup(this);
|
|
||||||
btnGroupPlotType->addButton(radioNoPlot, 0);
|
|
||||||
btnGroupPlotType->addButton(radioDataGraph, 1);
|
|
||||||
|
|
||||||
// 1D and 2D options
|
// 1D and 2D options
|
||||||
stackedWidget1D->setCurrentIndex(0);
|
stackedWidget1D->setCurrentIndex(0);
|
||||||
stackedWidget2D->setCurrentIndex(0);
|
stackedWidget2D->setCurrentIndex(0);
|
||||||
@ -76,19 +69,18 @@ void qTabPlot::SetupWidgetWindow() {
|
|||||||
Initialization();
|
Initialization();
|
||||||
Refresh();
|
Refresh();
|
||||||
|
|
||||||
// set default timer
|
// set zmq high water mark to GUI_ZMQ_RCV_HWM (2)
|
||||||
spinTimeGap->setValue(DEFAULT_STREAMING_TIMER_IN_MS);
|
spinSndHwm->setValue(qDefs::GUI_ZMQ_RCV_HWM);
|
||||||
// set to streaming timer
|
spinRcvHwm->setValue(qDefs::GUI_ZMQ_RCV_HWM);
|
||||||
stackedTimeInterval->setCurrentIndex(0);
|
|
||||||
comboFrequency->setCurrentIndex(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void qTabPlot::Initialization() {
|
void qTabPlot::Initialization() {
|
||||||
// Plot arguments box
|
|
||||||
connect(btnGroupPlotType, SIGNAL(buttonClicked(int)), this,
|
|
||||||
SLOT(SetPlot()));
|
|
||||||
|
|
||||||
// Plotting frequency box
|
// Plotting frequency box
|
||||||
|
connect(chkNoPlot, SIGNAL(toggled(bool)), this, SLOT(SetPlot()));
|
||||||
|
connect(spinSndHwm, SIGNAL(valueChanged(int)), this,
|
||||||
|
SLOT(SetStreamingHwm(int)));
|
||||||
|
connect(spinRcvHwm, SIGNAL(valueChanged(int)), this,
|
||||||
|
SLOT(SetReceivingHwm(int)));
|
||||||
connect(comboFrequency, SIGNAL(currentIndexChanged(int)), this,
|
connect(comboFrequency, SIGNAL(currentIndexChanged(int)), this,
|
||||||
SLOT(SetStreamingFrequency()));
|
SLOT(SetStreamingFrequency()));
|
||||||
connect(comboTimeGapUnit, SIGNAL(currentIndexChanged(int)), this,
|
connect(comboTimeGapUnit, SIGNAL(currentIndexChanged(int)), this,
|
||||||
@ -214,13 +206,18 @@ void qTabPlot::Select1DPlot(bool enable) {
|
|||||||
|
|
||||||
void qTabPlot::SetPlot() {
|
void qTabPlot::SetPlot() {
|
||||||
bool plotEnable = false;
|
bool plotEnable = false;
|
||||||
if (radioNoPlot->isChecked()) {
|
if (chkNoPlot->isChecked()) {
|
||||||
LOG(logINFO) << "Setting Plot Type: No Plot";
|
LOG(logINFO) << "Setting Plot Type: No Plot";
|
||||||
} else if (radioDataGraph->isChecked()) {
|
} else {
|
||||||
LOG(logINFO) << "Setting Plot Type: Datagraph";
|
LOG(logINFO) << "Setting Plot Type: Datagraph";
|
||||||
plotEnable = true;
|
plotEnable = true;
|
||||||
}
|
}
|
||||||
boxFrequency->setEnabled(plotEnable);
|
comboFrequency->setEnabled(plotEnable);
|
||||||
|
lblSndHwm->setEnabled(plotEnable);
|
||||||
|
spinSndHwm->setEnabled(plotEnable);
|
||||||
|
lblRcvHwm->setEnabled(plotEnable);
|
||||||
|
spinRcvHwm->setEnabled(plotEnable);
|
||||||
|
stackedTimeInterval->setEnabled(plotEnable);
|
||||||
box1D->setEnabled(plotEnable);
|
box1D->setEnabled(plotEnable);
|
||||||
box2D->setEnabled(plotEnable);
|
box2D->setEnabled(plotEnable);
|
||||||
boxSave->setEnabled(plotEnable);
|
boxSave->setEnabled(plotEnable);
|
||||||
@ -705,17 +702,68 @@ void qTabPlot::SetStreamingFrequency() {
|
|||||||
&qTabPlot::GetStreamingFrequency)
|
&qTabPlot::GetStreamingFrequency)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void qTabPlot::GetStreamingHwm() {
|
||||||
|
LOG(logDEBUG) << "Getting Streaming Hwm for receiver";
|
||||||
|
disconnect(spinSndHwm, SIGNAL(valueChanged(int)), this,
|
||||||
|
SLOT(SetStreamingHwm(int)));
|
||||||
|
try {
|
||||||
|
int value = det->getRxZmqHwm().tsquash(
|
||||||
|
"Inconsistent streaming hwm for all receivers.");
|
||||||
|
LOG(logDEBUG) << "Got streaming hwm for receiver " << value;
|
||||||
|
spinSndHwm->setValue(value);
|
||||||
|
}
|
||||||
|
CATCH_DISPLAY("Could not get streaming hwm for receiver.",
|
||||||
|
"qTabPlot::GetStreamingHwm")
|
||||||
|
connect(spinSndHwm, SIGNAL(valueChanged(int)), this,
|
||||||
|
SLOT(SetStreamingHwm(int)));
|
||||||
|
}
|
||||||
|
|
||||||
|
void qTabPlot::SetStreamingHwm(int value) {
|
||||||
|
LOG(logINFO) << "Setting Streaming Hwm for receiver to " << value;
|
||||||
|
try {
|
||||||
|
det->setRxZmqHwm(value);
|
||||||
|
}
|
||||||
|
CATCH_HANDLE("Could not set streaming hwm for receiver.",
|
||||||
|
"qTabPlot::SetStreamingHwm", this, &qTabPlot::GetStreamingHwm)
|
||||||
|
}
|
||||||
|
|
||||||
|
void qTabPlot::GetReceivingHwm() {
|
||||||
|
LOG(logDEBUG) << "Getting Receiving Hwm for client";
|
||||||
|
try {
|
||||||
|
int value = det->getClientZmqHwm();
|
||||||
|
LOG(logDEBUG) << "Got receiving hwm for client " << value;
|
||||||
|
}
|
||||||
|
CATCH_DISPLAY("Could not get receiving hwm for client.",
|
||||||
|
"qTabPlot::GetReceivingHwm")
|
||||||
|
}
|
||||||
|
|
||||||
|
void qTabPlot::SetReceivingHwm(int value) {
|
||||||
|
LOG(logINFO) << "Setting Streaming Hwm to " << value;
|
||||||
|
try {
|
||||||
|
det->setClientZmqHwm(value);
|
||||||
|
}
|
||||||
|
CATCH_HANDLE("Could not set receiving hwm from client.",
|
||||||
|
"qTabPlot::SetReceivingHwm", this, &qTabPlot::GetReceivingHwm)
|
||||||
|
}
|
||||||
|
|
||||||
void qTabPlot::Refresh() {
|
void qTabPlot::Refresh() {
|
||||||
LOG(logDEBUG) << "**Updating Plot Tab";
|
LOG(logDEBUG) << "**Updating Plot Tab";
|
||||||
|
|
||||||
if (!plot->GetIsRunning()) {
|
if (!plot->GetIsRunning()) {
|
||||||
boxPlotType->setEnabled(true);
|
boxFrequency->setEnabled(true);
|
||||||
|
|
||||||
// streaming frequency
|
// streaming frequency
|
||||||
if (!radioNoPlot->isChecked()) {
|
if (!chkNoPlot->isChecked()) {
|
||||||
boxFrequency->setEnabled(true);
|
comboFrequency->setEnabled(true);
|
||||||
|
stackedTimeInterval->setEnabled(true);
|
||||||
|
lblSndHwm->setEnabled(true);
|
||||||
|
spinSndHwm->setEnabled(true);
|
||||||
|
lblRcvHwm->setEnabled(true);
|
||||||
|
spinRcvHwm->setEnabled(true);
|
||||||
}
|
}
|
||||||
GetStreamingFrequency();
|
GetStreamingFrequency();
|
||||||
|
GetStreamingHwm();
|
||||||
|
GetReceivingHwm();
|
||||||
// gain plot, gap pixels enable
|
// gain plot, gap pixels enable
|
||||||
switch (det->getDetectorType().squash()) {
|
switch (det->getDetectorType().squash()) {
|
||||||
case slsDetectorDefs::EIGER:
|
case slsDetectorDefs::EIGER:
|
||||||
@ -734,7 +782,6 @@ void qTabPlot::Refresh() {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
boxPlotType->setEnabled(false);
|
|
||||||
boxFrequency->setEnabled(false);
|
boxFrequency->setEnabled(false);
|
||||||
chkGainPlot->setEnabled(false);
|
chkGainPlot->setEnabled(false);
|
||||||
chkGainPlot1D->setEnabled(false);
|
chkGainPlot1D->setEnabled(false);
|
||||||
|
Binary file not shown.
BIN
slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv5.0.0-rc2
Executable file
BIN
slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv5.0.0-rc2
Executable file
Binary file not shown.
@ -3,7 +3,7 @@
|
|||||||
#include "sls_detector_defs.h"
|
#include "sls_detector_defs.h"
|
||||||
|
|
||||||
#define MIN_REQRD_VRSN_T_RD_API 0x181130
|
#define MIN_REQRD_VRSN_T_RD_API 0x181130
|
||||||
#define REQRD_FRMWR_VRSN 0x191127
|
#define REQRD_FRMWR_VRSN 0x201005
|
||||||
|
|
||||||
#define CTRL_SRVR_INIT_TIME_US (2 * 1000 * 1000)
|
#define CTRL_SRVR_INIT_TIME_US (2 * 1000 * 1000)
|
||||||
|
|
||||||
|
Binary file not shown.
Binary file not shown.
BIN
slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv5.0.0-rc2
Executable file
BIN
slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv5.0.0-rc2
Executable file
Binary file not shown.
Binary file not shown.
BIN
slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv5.0.0-rc2
Executable file
BIN
slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv5.0.0-rc2
Executable file
Binary file not shown.
Binary file not shown.
BIN
slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv5.0.0-rc2
Executable file
BIN
slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv5.0.0-rc2
Executable file
Binary file not shown.
Binary file not shown.
BIN
slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv5.0.0-rc2
Executable file
BIN
slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv5.0.0-rc2
Executable file
Binary file not shown.
@ -3,7 +3,7 @@
|
|||||||
#include "sls_detector_defs.h"
|
#include "sls_detector_defs.h"
|
||||||
|
|
||||||
#define MIN_REQRD_VRSN_T_RD_API 0x180314
|
#define MIN_REQRD_VRSN_T_RD_API 0x180314
|
||||||
#define REQRD_FRMWR_VRSN 0x200302
|
#define REQRD_FRMWR_VRSN 0x201005
|
||||||
|
|
||||||
#define CTRL_SRVR_INIT_TIME_US (2 * 1000 * 1000)
|
#define CTRL_SRVR_INIT_TIME_US (2 * 1000 * 1000)
|
||||||
|
|
||||||
|
Binary file not shown.
BIN
slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv5.0.0-rc2
Executable file
BIN
slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv5.0.0-rc2
Executable file
Binary file not shown.
@ -2,26 +2,22 @@
|
|||||||
#include "clogger.h"
|
#include "clogger.h"
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <semaphore.h>
|
#include <pthread.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/ipc.h>
|
#include <sys/ipc.h>
|
||||||
#include <sys/shm.h>
|
#include <sys/shm.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#define SHM_NAME "sls_server_shared_memory"
|
#define SHM_NAME "sls_server_shared_memory"
|
||||||
#ifdef EIGERD
|
#define SHM_VERSION 0x201007
|
||||||
#define SHM_VERSION 0x200915
|
#define SHM_KEY 5678
|
||||||
#else
|
#define MEM_SIZE 128
|
||||||
#define SHM_VERSION 0x200625
|
|
||||||
#endif
|
|
||||||
#define SHM_KEY 5678
|
|
||||||
#define MEM_SIZE 128
|
|
||||||
|
|
||||||
typedef struct Memory {
|
typedef struct Memory {
|
||||||
int version;
|
int version;
|
||||||
sem_t semStatus;
|
pthread_mutex_t lockStatus;
|
||||||
#ifdef EIGERD
|
#ifdef EIGERD
|
||||||
sem_t semLocalLink;
|
pthread_mutex_t lockLocalLink;
|
||||||
#endif
|
#endif
|
||||||
enum runStatus scanStatus; // idle, running or error
|
enum runStatus scanStatus; // idle, running or error
|
||||||
int scanStop;
|
int scanStop;
|
||||||
@ -87,14 +83,59 @@ int sharedMemory_create(int port) {
|
|||||||
|
|
||||||
int sharedMemory_initialize() {
|
int sharedMemory_initialize() {
|
||||||
shm->version = SHM_VERSION;
|
shm->version = SHM_VERSION;
|
||||||
if (sem_init(&(shm->semStatus), 1, 1) != 0) {
|
|
||||||
LOG(logERROR, ("Failed to initialize semaphore semStatus for "
|
// powerpc, Nios and normal pc allows setting mutex attribute to shared
|
||||||
|
#if defined(EIGERD) || defined(GOTTHARD2D) || defined(MYTHEN3D) || \
|
||||||
|
defined(VIRTUAL)
|
||||||
|
pthread_mutexattr_t lockStatusAttribute;
|
||||||
|
if (pthread_mutexattr_init(&lockStatusAttribute) != 0) {
|
||||||
|
LOG(logERROR,
|
||||||
|
("Failed to initialize mutex attribute for lockStatus for "
|
||||||
|
"shared memory\n"));
|
||||||
|
return FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pthread_mutexattr_setpshared(&lockStatusAttribute,
|
||||||
|
PTHREAD_PROCESS_SHARED) != 0) {
|
||||||
|
LOG(logERROR, ("Failed to set attribute property to process shared for "
|
||||||
|
"lockStatus for shared memory\n"));
|
||||||
|
return FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pthread_mutex_init(&(shm->lockStatus), &lockStatusAttribute) != 0) {
|
||||||
|
LOG(logERROR, ("Failed to initialize pthread_mutex_t lockStatus for "
|
||||||
"shared memory\n"));
|
"shared memory\n"));
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// only blackfins cannot set mutex attribute (but it is shared by default)
|
||||||
|
#else
|
||||||
|
if (pthread_mutex_init(&(shm->lockStatus), NULL) != 0) {
|
||||||
|
LOG(logERROR, ("Failed to initialize pthread_mutex_t lockStatus for "
|
||||||
|
"shared memory\n"));
|
||||||
|
return FAIL;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef EIGERD
|
#ifdef EIGERD
|
||||||
if (sem_init(&(shm->semLocalLink), 1, 1) != 0) {
|
pthread_mutexattr_t lockLocalLinkAttribute;
|
||||||
LOG(logERROR, ("Failed to initialize semaphore semLocalLink for "
|
if (pthread_mutexattr_init(&lockLocalLinkAttribute) != 0) {
|
||||||
|
LOG(logERROR,
|
||||||
|
("Failed to initialize mutex attribute for lockLocalLink for "
|
||||||
|
"shared memory\n"));
|
||||||
|
return FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pthread_mutexattr_setpshared(&lockLocalLinkAttribute,
|
||||||
|
PTHREAD_PROCESS_SHARED) != 0) {
|
||||||
|
LOG(logERROR, ("Failed to set attribute property to process shared for "
|
||||||
|
"lockLocalLink for shared memory\n"));
|
||||||
|
return FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pthread_mutex_init(&(shm->lockLocalLink), &lockLocalLinkAttribute) !=
|
||||||
|
0) {
|
||||||
|
LOG(logERROR, ("Failed to initialize pthread_mutex_t lockLocalLink for "
|
||||||
"shared memory\n"));
|
"shared memory\n"));
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
@ -155,9 +196,9 @@ int sharedMemory_remove() {
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sharedMemory_lockStatus() { sem_wait(&(shm->semStatus)); }
|
void sharedMemory_lockStatus() { pthread_mutex_lock(&(shm->lockStatus)); }
|
||||||
|
|
||||||
void sharedMemory_unlockStatus() { sem_post(&(shm->semStatus)); }
|
void sharedMemory_unlockStatus() { pthread_mutex_unlock(&(shm->lockStatus)); }
|
||||||
|
|
||||||
#ifdef VIRTUAL
|
#ifdef VIRTUAL
|
||||||
void sharedMemory_setStatus(enum runStatus s) {
|
void sharedMemory_setStatus(enum runStatus s) {
|
||||||
@ -218,7 +259,9 @@ int sharedMemory_getScanStop() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef EIGERD
|
#ifdef EIGERD
|
||||||
void sharedMemory_lockLocalLink() { sem_wait(&(shm->semLocalLink)); }
|
void sharedMemory_lockLocalLink() { pthread_mutex_lock(&(shm->lockLocalLink)); }
|
||||||
|
|
||||||
void sharedMemory_unlockLocalLink() { sem_post(&(shm->semLocalLink)); }
|
void sharedMemory_unlockLocalLink() {
|
||||||
|
pthread_mutex_unlock(&(shm->lockLocalLink));
|
||||||
|
}
|
||||||
#endif
|
#endif
|
@ -887,6 +887,26 @@ class Detector {
|
|||||||
* if enabled.
|
* if enabled.
|
||||||
*/
|
*/
|
||||||
void setClientZmqIp(const IpAddr ip, Positions pos = {});
|
void setClientZmqIp(const IpAddr ip, Positions pos = {});
|
||||||
|
|
||||||
|
int getClientZmqHwm() const;
|
||||||
|
|
||||||
|
/** Client's zmq receive high water mark. \n Default is the zmq library's
|
||||||
|
* default (1000), can also be set here using -1. \n This is a high number
|
||||||
|
* and can be set to 2 for gui purposes. \n One must also set the receiver's
|
||||||
|
* send high water mark to similar value. Final effect is sum of them.
|
||||||
|
*/
|
||||||
|
void setClientZmqHwm(const int limit);
|
||||||
|
|
||||||
|
Result<int> getRxZmqHwm(Positions pos = {}) const;
|
||||||
|
|
||||||
|
/** Receiver's zmq send high water mark. \n Default is the zmq library's
|
||||||
|
* default (1000) \n This is a high number and can be set to 2 for gui
|
||||||
|
* purposes. \n One must also set the client's receive high water mark to
|
||||||
|
* similar value. Final effect is sum of them. Also restarts receiver zmq
|
||||||
|
* streaming if enabled. \n Can set to -1 to set default.
|
||||||
|
*/
|
||||||
|
void setRxZmqHwm(const int limit);
|
||||||
|
|
||||||
///@{
|
///@{
|
||||||
|
|
||||||
/** @name Eiger Specific */
|
/** @name Eiger Specific */
|
||||||
|
@ -486,39 +486,6 @@ std::string CmdProxy::Exptime(int action) {
|
|||||||
return os.str();
|
return os.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CmdProxy::DynamicRange(int action) {
|
|
||||||
std::ostringstream os;
|
|
||||||
os << cmd << ' ';
|
|
||||||
if (action == defs::HELP_ACTION) {
|
|
||||||
os << "[value]\n\tDynamic Range or number of bits per "
|
|
||||||
"pixel in detector.\n\t"
|
|
||||||
"[Eiger] Options: 4, 8, 16, 32. If set to 32, also sets "
|
|
||||||
"clkdivider to 2, else to 0.\n\t"
|
|
||||||
"[Mythen3] Options: 8, 16, 32\n\t"
|
|
||||||
"[Jungfrau][Gotthard][Ctb][Moench][Mythen3][Gotthard2] 16"
|
|
||||||
<< '\n';
|
|
||||||
} else if (action == defs::GET_ACTION) {
|
|
||||||
if (!args.empty()) {
|
|
||||||
WrongNumberOfParameters(0);
|
|
||||||
}
|
|
||||||
auto t = det->getDynamicRange(std::vector<int>{det_id});
|
|
||||||
os << OutString(t) << '\n';
|
|
||||||
} else if (action == defs::PUT_ACTION) {
|
|
||||||
if (det_id != -1) {
|
|
||||||
throw sls::RuntimeError(
|
|
||||||
"Cannot execute dynamic range at module level");
|
|
||||||
}
|
|
||||||
if (args.size() != 1) {
|
|
||||||
WrongNumberOfParameters(1);
|
|
||||||
}
|
|
||||||
det->setDynamicRange(StringTo<int>(args[0]));
|
|
||||||
os << args.front() << '\n';
|
|
||||||
} else {
|
|
||||||
throw sls::RuntimeError("Unknown action");
|
|
||||||
}
|
|
||||||
return os.str();
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string CmdProxy::Speed(int action) {
|
std::string CmdProxy::Speed(int action) {
|
||||||
std::ostringstream os;
|
std::ostringstream os;
|
||||||
os << cmd << ' ';
|
os << cmd << ' ';
|
||||||
@ -1257,7 +1224,40 @@ std::string CmdProxy::ReceiverHostname(int action) {
|
|||||||
return os.str();
|
return os.str();
|
||||||
}
|
}
|
||||||
/* File */
|
/* File */
|
||||||
|
|
||||||
/* ZMQ Streaming Parameters (Receiver<->Client) */
|
/* ZMQ Streaming Parameters (Receiver<->Client) */
|
||||||
|
|
||||||
|
std::string CmdProxy::ZMQHWM(int action) {
|
||||||
|
std::ostringstream os;
|
||||||
|
os << cmd << ' ';
|
||||||
|
if (action == defs::HELP_ACTION) {
|
||||||
|
os << "[n_limit] \n\tClient's zmq receive high water mark. Default is "
|
||||||
|
"the zmq library's default (1000), can also be set here using "
|
||||||
|
"-1. \n This is a high number and can be set to 2 for gui "
|
||||||
|
"purposes. \n One must also set the receiver's send high water "
|
||||||
|
"mark to similar value. Final effect is sum of them.\n\t Setting "
|
||||||
|
"it via command line is useful only before zmq enabled (before "
|
||||||
|
"opening gui)."
|
||||||
|
<< '\n';
|
||||||
|
} else if (action == defs::GET_ACTION) {
|
||||||
|
if (!args.empty()) {
|
||||||
|
WrongNumberOfParameters(0);
|
||||||
|
}
|
||||||
|
auto t = det->getClientZmqHwm();
|
||||||
|
os << t << '\n';
|
||||||
|
} else if (action == defs::PUT_ACTION) {
|
||||||
|
if (args.size() != 1) {
|
||||||
|
WrongNumberOfParameters(1);
|
||||||
|
}
|
||||||
|
int t = StringTo<int>(args[0]);
|
||||||
|
det->setClientZmqHwm(t);
|
||||||
|
os << det->getClientZmqHwm() << '\n';
|
||||||
|
} else {
|
||||||
|
throw sls::RuntimeError("Unknown action");
|
||||||
|
}
|
||||||
|
return os.str();
|
||||||
|
}
|
||||||
|
|
||||||
/* Eiger Specific */
|
/* Eiger Specific */
|
||||||
|
|
||||||
std::string CmdProxy::Threshold(int action) {
|
std::string CmdProxy::Threshold(int action) {
|
||||||
@ -2681,7 +2681,7 @@ std::string CmdProxy::ExecuteCommand(int action) {
|
|||||||
throw sls::RuntimeError("Cannot get.");
|
throw sls::RuntimeError("Cannot get.");
|
||||||
} else if (action == defs::PUT_ACTION) {
|
} else if (action == defs::PUT_ACTION) {
|
||||||
std::string command;
|
std::string command;
|
||||||
for (auto &i: args) {
|
for (auto &i : args) {
|
||||||
command += (i + ' ');
|
command += (i + ' ');
|
||||||
}
|
}
|
||||||
auto t = det->executeCommand(command, std::vector<int>{det_id});
|
auto t = det->executeCommand(command, std::vector<int>{det_id});
|
||||||
|
@ -235,6 +235,36 @@
|
|||||||
return os.str(); \
|
return os.str(); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** int, set no id, get id */
|
||||||
|
#define INTEGER_COMMAND_SET_NOID_GET_ID(CMDNAME, GETFCN, SETFCN, CONV, HLPSTR) \
|
||||||
|
std::string CMDNAME(const int action) { \
|
||||||
|
std::ostringstream os; \
|
||||||
|
os << cmd << ' '; \
|
||||||
|
if (action == slsDetectorDefs::HELP_ACTION) \
|
||||||
|
os << HLPSTR << '\n'; \
|
||||||
|
else if (action == slsDetectorDefs::GET_ACTION) { \
|
||||||
|
if (!args.empty()) { \
|
||||||
|
WrongNumberOfParameters(0); \
|
||||||
|
} \
|
||||||
|
auto t = det->GETFCN(std::vector<int>{det_id}); \
|
||||||
|
os << OutString(t) << '\n'; \
|
||||||
|
} else if (action == slsDetectorDefs::PUT_ACTION) { \
|
||||||
|
if (det_id != -1) { \
|
||||||
|
throw sls::RuntimeError( \
|
||||||
|
"Cannot execute this at module level"); \
|
||||||
|
} \
|
||||||
|
if (args.size() != 1) { \
|
||||||
|
WrongNumberOfParameters(1); \
|
||||||
|
} \
|
||||||
|
auto val = CONV(args[0]); \
|
||||||
|
det->SETFCN(val); \
|
||||||
|
os << args.front() << '\n'; \
|
||||||
|
} else { \
|
||||||
|
throw sls::RuntimeError("Unknown action"); \
|
||||||
|
} \
|
||||||
|
return os.str(); \
|
||||||
|
}
|
||||||
|
|
||||||
/** int, no id */
|
/** int, no id */
|
||||||
#define INTEGER_COMMAND_NOID(CMDNAME, GETFCN, SETFCN, CONV, HLPSTR) \
|
#define INTEGER_COMMAND_NOID(CMDNAME, GETFCN, SETFCN, CONV, HLPSTR) \
|
||||||
std::string CMDNAME(const int action) { \
|
std::string CMDNAME(const int action) { \
|
||||||
@ -754,7 +784,7 @@ class CmdProxy {
|
|||||||
{"triggersl", &CmdProxy::triggersl},
|
{"triggersl", &CmdProxy::triggersl},
|
||||||
{"delayl", &CmdProxy::delayl},
|
{"delayl", &CmdProxy::delayl},
|
||||||
{"periodl", &CmdProxy::periodl},
|
{"periodl", &CmdProxy::periodl},
|
||||||
{"dr", &CmdProxy::DynamicRange},
|
{"dr", &CmdProxy::dr},
|
||||||
{"drlist", &CmdProxy::drlist},
|
{"drlist", &CmdProxy::drlist},
|
||||||
{"timing", &CmdProxy::timing},
|
{"timing", &CmdProxy::timing},
|
||||||
{"timinglist", &CmdProxy::timinglist},
|
{"timinglist", &CmdProxy::timinglist},
|
||||||
@ -868,6 +898,8 @@ class CmdProxy {
|
|||||||
{"zmqport", &CmdProxy::zmqport},
|
{"zmqport", &CmdProxy::zmqport},
|
||||||
{"rx_zmqip", &CmdProxy::rx_zmqip},
|
{"rx_zmqip", &CmdProxy::rx_zmqip},
|
||||||
{"zmqip", &CmdProxy::zmqip},
|
{"zmqip", &CmdProxy::zmqip},
|
||||||
|
{"zmqhwm", &CmdProxy::ZMQHWM},
|
||||||
|
{"rx_zmqhwm", &CmdProxy::rx_zmqhwm},
|
||||||
|
|
||||||
/* Eiger Specific */
|
/* Eiger Specific */
|
||||||
{"subexptime", &CmdProxy::subexptime},
|
{"subexptime", &CmdProxy::subexptime},
|
||||||
@ -1071,6 +1103,7 @@ class CmdProxy {
|
|||||||
std::string ReceiverHostname(int action);
|
std::string ReceiverHostname(int action);
|
||||||
/* File */
|
/* File */
|
||||||
/* ZMQ Streaming Parameters (Receiver<->Client) */
|
/* ZMQ Streaming Parameters (Receiver<->Client) */
|
||||||
|
std::string ZMQHWM(int action);
|
||||||
/* Eiger Specific */
|
/* Eiger Specific */
|
||||||
std::string Threshold(int action);
|
std::string Threshold(int action);
|
||||||
std::string ThresholdNoTb(int action);
|
std::string ThresholdNoTb(int action);
|
||||||
@ -1186,17 +1219,17 @@ class CmdProxy {
|
|||||||
|
|
||||||
/* acquisition parameters */
|
/* acquisition parameters */
|
||||||
|
|
||||||
INTEGER_COMMAND_NOID(
|
INTEGER_COMMAND_SET_NOID_GET_ID(
|
||||||
frames, getNumberOfFrames, setNumberOfFrames, StringTo<int64_t>,
|
frames, getNumberOfFrames, setNumberOfFrames, StringTo<int64_t>,
|
||||||
"[n_frames]\n\tNumber of frames per acquisition. In "
|
"[n_frames]\n\tNumber of frames per acquisition. In "
|
||||||
"trigger mode, number of frames per trigger. \n\tCannot be set in "
|
"trigger mode, number of frames per trigger. \n\tCannot be set in "
|
||||||
"modular level. \n\tIn scan mode, number of frames is set to number of "
|
"modular level. \n\tIn scan mode, number of frames is set to number of "
|
||||||
"steps.\n\t[Gotthard2] Burst mode has a maximum of 2720 frames.");
|
"steps.\n\t[Gotthard2] Burst mode has a maximum of 2720 frames.");
|
||||||
|
|
||||||
INTEGER_COMMAND_NOID(triggers, getNumberOfTriggers, setNumberOfTriggers,
|
INTEGER_COMMAND_SET_NOID_GET_ID(
|
||||||
StringTo<int64_t>,
|
triggers, getNumberOfTriggers, setNumberOfTriggers, StringTo<int64_t>,
|
||||||
"[n_triggers]\n\tNumber of triggers per aquire. Set "
|
"[n_triggers]\n\tNumber of triggers per aquire. Set "
|
||||||
"timing mode to use triggers.");
|
"timing mode to use triggers.");
|
||||||
|
|
||||||
TIME_COMMAND(
|
TIME_COMMAND(
|
||||||
period, getPeriod, setPeriod,
|
period, getPeriod, setPeriod,
|
||||||
@ -1227,6 +1260,15 @@ class CmdProxy {
|
|||||||
" Period left for current frame."
|
" Period left for current frame."
|
||||||
"\n\t[Gotthard2] only in continuous mode.");
|
"\n\t[Gotthard2] only in continuous mode.");
|
||||||
|
|
||||||
|
INTEGER_COMMAND_SET_NOID_GET_ID(
|
||||||
|
dr, getDynamicRange, setDynamicRange, StringTo<int>,
|
||||||
|
"[value]\n\tDynamic Range or number of bits per "
|
||||||
|
"pixel in detector.\n\t"
|
||||||
|
"[Eiger] Options: 4, 8, 16, 32. If set to 32, also sets "
|
||||||
|
"clkdivider to 2, else to 0.\n\t"
|
||||||
|
"[Mythen3] Options: 8, 16, 32\n\t"
|
||||||
|
"[Jungfrau][Gotthard][Ctb][Moench][Mythen3][Gotthard2] 16");
|
||||||
|
|
||||||
GET_COMMAND_NOID(drlist, getDynamicRangeList,
|
GET_COMMAND_NOID(drlist, getDynamicRangeList,
|
||||||
"\n\tGets the list of dynamic ranges for this detector.");
|
"\n\tGets the list of dynamic ranges for this detector.");
|
||||||
|
|
||||||
@ -1692,6 +1734,15 @@ class CmdProxy {
|
|||||||
"an intermediate process between receiver and client(gui). Also "
|
"an intermediate process between receiver and client(gui). Also "
|
||||||
"restarts client zmq streaming if enabled.");
|
"restarts client zmq streaming if enabled.");
|
||||||
|
|
||||||
|
INTEGER_COMMAND_SET_NOID_GET_ID(
|
||||||
|
rx_zmqhwm, getRxZmqHwm, setRxZmqHwm, StringTo<int>,
|
||||||
|
"[n_value]\n\tReceiver's zmq send high water mark. Default is the zmq "
|
||||||
|
"library's default (1000). This is a high number and can be set to 2 "
|
||||||
|
"for gui purposes. One must also set the client's receive high water "
|
||||||
|
"mark to similar value. Final effect is sum of them. Also restarts "
|
||||||
|
"receiver zmq streaming if enabled. Can set to -1 to set default "
|
||||||
|
"value.");
|
||||||
|
|
||||||
/* Eiger Specific */
|
/* Eiger Specific */
|
||||||
|
|
||||||
TIME_COMMAND(subexptime, getSubExptime, setSubExptime,
|
TIME_COMMAND(subexptime, getSubExptime, setSubExptime,
|
||||||
@ -1778,7 +1829,7 @@ class CmdProxy {
|
|||||||
"0 or this mode disabled(comparator enabled throughout). 1 enables "
|
"0 or this mode disabled(comparator enabled throughout). 1 enables "
|
||||||
"mode. 0 disables mode. ");
|
"mode. 0 disables mode. ");
|
||||||
|
|
||||||
INTEGER_COMMAND_NOID(
|
INTEGER_COMMAND_SET_NOID_GET_ID(
|
||||||
storagecells, getNumberOfAdditionalStorageCells,
|
storagecells, getNumberOfAdditionalStorageCells,
|
||||||
setNumberOfAdditionalStorageCells, StringTo<int>,
|
setNumberOfAdditionalStorageCells, StringTo<int>,
|
||||||
"[0-15]\n\t[Jungfrau] Number of additional storage cells. Default is "
|
"[0-15]\n\t[Jungfrau] Number of additional storage cells. Default is "
|
||||||
@ -1803,7 +1854,7 @@ class CmdProxy {
|
|||||||
"left for current frame. ");
|
"left for current frame. ");
|
||||||
|
|
||||||
/* Gotthard2 Specific */
|
/* Gotthard2 Specific */
|
||||||
INTEGER_COMMAND_NOID(
|
INTEGER_COMMAND_SET_NOID_GET_ID(
|
||||||
bursts, getNumberOfBursts, setNumberOfBursts, StringTo<int64_t>,
|
bursts, getNumberOfBursts, setNumberOfBursts, StringTo<int64_t>,
|
||||||
"[n_bursts]\n\t[Gotthard2] Number of bursts per aquire. Only in auto "
|
"[n_bursts]\n\t[Gotthard2] Number of bursts per aquire. Only in auto "
|
||||||
"timing mode and burst mode. Use timing command to set timing mode and "
|
"timing mode and burst mode. Use timing command to set timing mode and "
|
||||||
|
@ -643,7 +643,7 @@ Result<int> Detector::getNumberofUDPInterfaces(Positions pos) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Detector::setNumberofUDPInterfaces(int n, Positions pos) {
|
void Detector::setNumberofUDPInterfaces(int n, Positions pos) {
|
||||||
int previouslyClientStreaming = pimpl->getDataStreamingToClient();
|
bool previouslyClientStreaming = pimpl->getDataStreamingToClient();
|
||||||
bool useReceiver = getUseReceiverFlag().squash(false);
|
bool useReceiver = getUseReceiverFlag().squash(false);
|
||||||
bool previouslyReceiverStreaming = false;
|
bool previouslyReceiverStreaming = false;
|
||||||
if (useReceiver) {
|
if (useReceiver) {
|
||||||
@ -656,7 +656,7 @@ void Detector::setNumberofUDPInterfaces(int n, Positions pos) {
|
|||||||
setRxZmqPort(startingPort, -1);
|
setRxZmqPort(startingPort, -1);
|
||||||
}
|
}
|
||||||
// redo the zmq sockets if enabled
|
// redo the zmq sockets if enabled
|
||||||
if (previouslyClientStreaming != 0) {
|
if (previouslyClientStreaming) {
|
||||||
pimpl->setDataStreamingToClient(false);
|
pimpl->setDataStreamingToClient(false);
|
||||||
pimpl->setDataStreamingToClient(true);
|
pimpl->setDataStreamingToClient(true);
|
||||||
}
|
}
|
||||||
@ -1042,6 +1042,8 @@ Result<int> Detector::getRxZmqPort(Positions pos) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Detector::setRxZmqPort(int port, int module_id) {
|
void Detector::setRxZmqPort(int port, int module_id) {
|
||||||
|
bool previouslyReceiverStreaming =
|
||||||
|
getRxZmqDataStream(std::vector<int>{module_id}).squash(false);
|
||||||
if (module_id == -1) {
|
if (module_id == -1) {
|
||||||
std::vector<int> port_list = getPortNumbers(port);
|
std::vector<int> port_list = getPortNumbers(port);
|
||||||
for (int idet = 0; idet < size(); ++idet) {
|
for (int idet = 0; idet < size(); ++idet) {
|
||||||
@ -1051,6 +1053,10 @@ void Detector::setRxZmqPort(int port, int module_id) {
|
|||||||
} else {
|
} else {
|
||||||
pimpl->Parallel(&Module::setReceiverStreamingPort, {module_id}, port);
|
pimpl->Parallel(&Module::setReceiverStreamingPort, {module_id}, port);
|
||||||
}
|
}
|
||||||
|
if (previouslyReceiverStreaming) {
|
||||||
|
setRxZmqDataStream(false, std::vector<int>{module_id});
|
||||||
|
setRxZmqDataStream(true, std::vector<int>{module_id});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Result<IpAddr> Detector::getRxZmqIP(Positions pos) const {
|
Result<IpAddr> Detector::getRxZmqIP(Positions pos) const {
|
||||||
@ -1071,6 +1077,7 @@ Result<int> Detector::getClientZmqPort(Positions pos) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Detector::setClientZmqPort(int port, int module_id) {
|
void Detector::setClientZmqPort(int port, int module_id) {
|
||||||
|
bool previouslyClientStreaming = pimpl->getDataStreamingToClient();
|
||||||
if (module_id == -1) {
|
if (module_id == -1) {
|
||||||
std::vector<int> port_list = getPortNumbers(port);
|
std::vector<int> port_list = getPortNumbers(port);
|
||||||
for (int idet = 0; idet < size(); ++idet) {
|
for (int idet = 0; idet < size(); ++idet) {
|
||||||
@ -1080,6 +1087,10 @@ void Detector::setClientZmqPort(int port, int module_id) {
|
|||||||
} else {
|
} else {
|
||||||
pimpl->Parallel(&Module::setClientStreamingPort, {module_id}, port);
|
pimpl->Parallel(&Module::setClientStreamingPort, {module_id}, port);
|
||||||
}
|
}
|
||||||
|
if (previouslyClientStreaming) {
|
||||||
|
pimpl->setDataStreamingToClient(false);
|
||||||
|
pimpl->setDataStreamingToClient(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Result<IpAddr> Detector::getClientZmqIp(Positions pos) const {
|
Result<IpAddr> Detector::getClientZmqIp(Positions pos) const {
|
||||||
@ -1087,14 +1098,33 @@ Result<IpAddr> Detector::getClientZmqIp(Positions pos) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Detector::setClientZmqIp(const IpAddr ip, Positions pos) {
|
void Detector::setClientZmqIp(const IpAddr ip, Positions pos) {
|
||||||
int previouslyClientStreaming = pimpl->getDataStreamingToClient();
|
bool previouslyClientStreaming = pimpl->getDataStreamingToClient();
|
||||||
pimpl->Parallel(&Module::setClientStreamingIP, pos, ip);
|
pimpl->Parallel(&Module::setClientStreamingIP, pos, ip);
|
||||||
if (previouslyClientStreaming != 0) {
|
if (previouslyClientStreaming) {
|
||||||
pimpl->setDataStreamingToClient(false);
|
pimpl->setDataStreamingToClient(false);
|
||||||
pimpl->setDataStreamingToClient(true);
|
pimpl->setDataStreamingToClient(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int Detector::getClientZmqHwm() const { return pimpl->getClientStreamingHwm(); }
|
||||||
|
|
||||||
|
void Detector::setClientZmqHwm(const int limit) {
|
||||||
|
pimpl->setClientStreamingHwm(limit);
|
||||||
|
}
|
||||||
|
|
||||||
|
Result<int> Detector::getRxZmqHwm(Positions pos) const {
|
||||||
|
return pimpl->Parallel(&Module::getReceiverStreamingHwm, pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Detector::setRxZmqHwm(const int limit) {
|
||||||
|
bool previouslyReceiverStreaming = getRxZmqDataStream().squash(false);
|
||||||
|
pimpl->Parallel(&Module::setReceiverStreamingHwm, {}, limit);
|
||||||
|
if (previouslyReceiverStreaming) {
|
||||||
|
setRxZmqDataStream(false, {});
|
||||||
|
setRxZmqDataStream(true, {});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Eiger Specific
|
// Eiger Specific
|
||||||
|
|
||||||
Result<ns> Detector::getSubExptime(Positions pos) const {
|
Result<ns> Detector::getSubExptime(Positions pos) const {
|
||||||
|
@ -158,6 +158,8 @@ void DetectorImpl::initializeDetectorStructure() {
|
|||||||
multi_shm()->acquiringFlag = false;
|
multi_shm()->acquiringFlag = false;
|
||||||
multi_shm()->initialChecks = true;
|
multi_shm()->initialChecks = true;
|
||||||
multi_shm()->gapPixels = false;
|
multi_shm()->gapPixels = false;
|
||||||
|
// zmqlib default
|
||||||
|
multi_shm()->zmqHwm = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DetectorImpl::initializeMembers(bool verify) {
|
void DetectorImpl::initializeMembers(bool verify) {
|
||||||
@ -377,16 +379,17 @@ void DetectorImpl::setGapPixelsinCallback(const bool enable) {
|
|||||||
multi_shm()->gapPixels = enable;
|
multi_shm()->gapPixels = enable;
|
||||||
}
|
}
|
||||||
|
|
||||||
int DetectorImpl::createReceivingDataSockets(const bool destroy) {
|
int DetectorImpl::destroyReceivingDataSockets() {
|
||||||
if (destroy) {
|
LOG(logINFO) << "Going to destroy data sockets";
|
||||||
LOG(logINFO) << "Going to destroy data sockets";
|
// close socket
|
||||||
// close socket
|
zmqSocket.clear();
|
||||||
zmqSocket.clear();
|
|
||||||
|
|
||||||
client_downstream = false;
|
client_downstream = false;
|
||||||
LOG(logINFO) << "Destroyed Receiving Data Socket(s)";
|
LOG(logINFO) << "Destroyed Receiving Data Socket(s)";
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int DetectorImpl::createReceivingDataSockets() {
|
||||||
if (client_downstream) {
|
if (client_downstream) {
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
@ -417,11 +420,21 @@ int DetectorImpl::createReceivingDataSockets(const bool destroy) {
|
|||||||
.str()
|
.str()
|
||||||
.c_str(),
|
.c_str(),
|
||||||
portnum));
|
portnum));
|
||||||
|
// set high water mark
|
||||||
|
int hwm = multi_shm()->zmqHwm;
|
||||||
|
if (hwm >= 0) {
|
||||||
|
zmqSocket[iSocket]->SetReceiveHighWaterMark(hwm);
|
||||||
|
if (zmqSocket[iSocket]->GetReceiveHighWaterMark() != hwm) {
|
||||||
|
throw sls::ZmqSocketError("Could not set zmq rcv hwm to " +
|
||||||
|
std::to_string(hwm));
|
||||||
|
}
|
||||||
|
}
|
||||||
LOG(logINFO) << "Zmq Client[" << iSocket << "] at "
|
LOG(logINFO) << "Zmq Client[" << iSocket << "] at "
|
||||||
<< zmqSocket.back()->GetZmqServerAddress();
|
<< zmqSocket.back()->GetZmqServerAddress() << "[hwm: "
|
||||||
|
<< zmqSocket.back()->GetReceiveHighWaterMark() << "]";
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG(logERROR) << "Could not create Zmq socket on port " << portnum;
|
LOG(logERROR) << "Could not create Zmq socket on port " << portnum;
|
||||||
createReceivingDataSockets(true);
|
destroyReceivingDataSockets();
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -449,12 +462,12 @@ void DetectorImpl::readFrameFromReceiver() {
|
|||||||
}
|
}
|
||||||
std::vector<bool> runningList(zmqSocket.size());
|
std::vector<bool> runningList(zmqSocket.size());
|
||||||
std::vector<bool> connectList(zmqSocket.size());
|
std::vector<bool> connectList(zmqSocket.size());
|
||||||
int numRunning = 0;
|
numZmqRunning = 0;
|
||||||
for (size_t i = 0; i < zmqSocket.size(); ++i) {
|
for (size_t i = 0; i < zmqSocket.size(); ++i) {
|
||||||
if (zmqSocket[i]->Connect() == 0) {
|
if (zmqSocket[i]->Connect() == 0) {
|
||||||
connectList[i] = true;
|
connectList[i] = true;
|
||||||
runningList[i] = true;
|
runningList[i] = true;
|
||||||
++numRunning;
|
++numZmqRunning;
|
||||||
} else {
|
} else {
|
||||||
// to remember the list it connected to, to disconnect later
|
// to remember the list it connected to, to disconnect later
|
||||||
connectList[i] = false;
|
connectList[i] = false;
|
||||||
@ -480,14 +493,14 @@ void DetectorImpl::readFrameFromReceiver() {
|
|||||||
uint32_t currentSubFrameIndex = -1, coordX = -1, coordY = -1,
|
uint32_t currentSubFrameIndex = -1, coordX = -1, coordY = -1,
|
||||||
flippedDataX = -1;
|
flippedDataX = -1;
|
||||||
|
|
||||||
while (numRunning != 0) {
|
while (numZmqRunning != 0) {
|
||||||
// reset data
|
// reset data
|
||||||
data = false;
|
data = false;
|
||||||
if (multiframe != nullptr) {
|
if (multiframe != nullptr) {
|
||||||
memset(multiframe.get(), 0xFF, multisize);
|
memset(multiframe.get(), 0xFF, multisize);
|
||||||
}
|
}
|
||||||
|
|
||||||
completeImage = (numRunning == (int)zmqSocket.size());
|
completeImage = (numZmqRunning == (int)zmqSocket.size());
|
||||||
|
|
||||||
// get each frame
|
// get each frame
|
||||||
for (unsigned int isocket = 0; isocket < zmqSocket.size(); ++isocket) {
|
for (unsigned int isocket = 0; isocket < zmqSocket.size(); ++isocket) {
|
||||||
@ -505,7 +518,7 @@ void DetectorImpl::readFrameFromReceiver() {
|
|||||||
// socket
|
// socket
|
||||||
runningList[isocket] = false;
|
runningList[isocket] = false;
|
||||||
completeImage = false;
|
completeImage = false;
|
||||||
--numRunning;
|
--numZmqRunning;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -967,7 +980,7 @@ bool DetectorImpl::getDataStreamingToClient() { return client_downstream; }
|
|||||||
void DetectorImpl::setDataStreamingToClient(bool enable) {
|
void DetectorImpl::setDataStreamingToClient(bool enable) {
|
||||||
// destroy data threads
|
// destroy data threads
|
||||||
if (!enable) {
|
if (!enable) {
|
||||||
createReceivingDataSockets(true);
|
destroyReceivingDataSockets();
|
||||||
// create data threads
|
// create data threads
|
||||||
} else {
|
} else {
|
||||||
if (createReceivingDataSockets() == FAIL) {
|
if (createReceivingDataSockets() == FAIL) {
|
||||||
@ -976,6 +989,51 @@ void DetectorImpl::setDataStreamingToClient(bool enable) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int DetectorImpl::getClientStreamingHwm() const {
|
||||||
|
// disabled
|
||||||
|
if (!client_downstream) {
|
||||||
|
return multi_shm()->zmqHwm;
|
||||||
|
}
|
||||||
|
// enabled
|
||||||
|
sls::Result<int> result;
|
||||||
|
result.reserve(zmqSocket.size());
|
||||||
|
for (auto &it : zmqSocket) {
|
||||||
|
result.push_back(it->GetReceiveHighWaterMark());
|
||||||
|
}
|
||||||
|
int res = result.tsquash("Inconsistent zmq receive hwm values");
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DetectorImpl::setClientStreamingHwm(const int limit) {
|
||||||
|
if (limit < -1) {
|
||||||
|
throw sls::RuntimeError(
|
||||||
|
"Cannot set hwm to less than -1 (-1 is lib default).");
|
||||||
|
}
|
||||||
|
// update shm
|
||||||
|
multi_shm()->zmqHwm = limit;
|
||||||
|
|
||||||
|
// streaming enabled
|
||||||
|
if (client_downstream) {
|
||||||
|
// custom limit, set it directly
|
||||||
|
if (limit >= 0) {
|
||||||
|
for (auto &it : zmqSocket) {
|
||||||
|
it->SetReceiveHighWaterMark(limit);
|
||||||
|
if (it->GetReceiveHighWaterMark() != limit) {
|
||||||
|
multi_shm()->zmqHwm = -1;
|
||||||
|
throw sls::ZmqSocketError("Could not set zmq rcv hwm to " +
|
||||||
|
std::to_string(limit));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
LOG(logINFO) << "Setting Client Zmq socket rcv hwm to " << limit;
|
||||||
|
}
|
||||||
|
// default, disable and enable to get default
|
||||||
|
else {
|
||||||
|
setDataStreamingToClient(false);
|
||||||
|
setDataStreamingToClient(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void DetectorImpl::registerAcquisitionFinishedCallback(void (*func)(double, int,
|
void DetectorImpl::registerAcquisitionFinishedCallback(void (*func)(double, int,
|
||||||
void *),
|
void *),
|
||||||
void *pArg) {
|
void *pArg) {
|
||||||
@ -1042,6 +1100,12 @@ int DetectorImpl::acquire() {
|
|||||||
if (dataReady == nullptr) {
|
if (dataReady == nullptr) {
|
||||||
setJoinThreadFlag(true);
|
setJoinThreadFlag(true);
|
||||||
}
|
}
|
||||||
|
if (receiver) {
|
||||||
|
while (numZmqRunning != 0) {
|
||||||
|
Parallel(&Module::restreamStopFromReceiver, {});
|
||||||
|
std::this_thread::sleep_for(std::chrono::milliseconds(200));
|
||||||
|
}
|
||||||
|
}
|
||||||
dataProcessingThread.join();
|
dataProcessingThread.join();
|
||||||
|
|
||||||
if (acquisition_finished != nullptr) {
|
if (acquisition_finished != nullptr) {
|
||||||
|
@ -16,7 +16,7 @@ class detectorData;
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#define MULTI_SHMAPIVERSION 0x190809
|
#define MULTI_SHMAPIVERSION 0x190809
|
||||||
#define MULTI_SHMVERSION 0x200319
|
#define MULTI_SHMVERSION 0x201007
|
||||||
#define SHORT_STRING_LENGTH 50
|
#define SHORT_STRING_LENGTH 50
|
||||||
|
|
||||||
#include <future>
|
#include <future>
|
||||||
@ -62,6 +62,8 @@ struct sharedMultiSlsDetector {
|
|||||||
bool acquiringFlag;
|
bool acquiringFlag;
|
||||||
bool initialChecks;
|
bool initialChecks;
|
||||||
bool gapPixels;
|
bool gapPixels;
|
||||||
|
/** high water mark of listening tcp port (only data) */
|
||||||
|
int zmqHwm;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DetectorImpl : public virtual slsDetectorDefs {
|
class DetectorImpl : public virtual slsDetectorDefs {
|
||||||
@ -240,6 +242,8 @@ class DetectorImpl : public virtual slsDetectorDefs {
|
|||||||
|
|
||||||
bool getDataStreamingToClient();
|
bool getDataStreamingToClient();
|
||||||
void setDataStreamingToClient(bool enable);
|
void setDataStreamingToClient(bool enable);
|
||||||
|
int getClientStreamingHwm() const;
|
||||||
|
void setClientStreamingHwm(const int limit);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* register callback for accessing acquisition final data
|
* register callback for accessing acquisition final data
|
||||||
@ -324,12 +328,8 @@ class DetectorImpl : public virtual slsDetectorDefs {
|
|||||||
|
|
||||||
void updateDetectorSize();
|
void updateDetectorSize();
|
||||||
|
|
||||||
/**
|
int destroyReceivingDataSockets();
|
||||||
* Create Receiving Data Sockets
|
int createReceivingDataSockets();
|
||||||
* @param destroy is true to destroy all the sockets
|
|
||||||
* @returns OK or FAIL
|
|
||||||
*/
|
|
||||||
int createReceivingDataSockets(const bool destroy = false);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reads frames from receiver through a constant socket
|
* Reads frames from receiver through a constant socket
|
||||||
@ -387,6 +387,9 @@ class DetectorImpl : public virtual slsDetectorDefs {
|
|||||||
/** ZMQ Socket - Receiver to Client */
|
/** ZMQ Socket - Receiver to Client */
|
||||||
std::vector<std::unique_ptr<ZmqSocket>> zmqSocket;
|
std::vector<std::unique_ptr<ZmqSocket>> zmqSocket;
|
||||||
|
|
||||||
|
/** number of zmq sockets running currently */
|
||||||
|
volatile int numZmqRunning{0};
|
||||||
|
|
||||||
/** mutex to synchronize main and data processing threads */
|
/** mutex to synchronize main and data processing threads */
|
||||||
mutable std::mutex mp;
|
mutable std::mutex mp;
|
||||||
|
|
||||||
|
@ -431,6 +431,10 @@ void Module::stopAcquisition() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Module::restreamStopFromReceiver() {
|
||||||
|
sendToReceiver(F_RESTREAM_STOP_FROM_RECEIVER);
|
||||||
|
}
|
||||||
|
|
||||||
void Module::startAndReadAll() {
|
void Module::startAndReadAll() {
|
||||||
shm()->stoppedFlag = false;
|
shm()->stoppedFlag = false;
|
||||||
sendToDetector(F_START_AND_READ_ALL);
|
sendToDetector(F_START_AND_READ_ALL);
|
||||||
@ -1041,6 +1045,14 @@ void Module::setClientStreamingIP(const sls::IpAddr ip) {
|
|||||||
shm()->zmqip = ip;
|
shm()->zmqip = ip;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int Module::getReceiverStreamingHwm() const {
|
||||||
|
return sendToReceiver<int>(F_GET_RECEIVER_STREAMING_HWM);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Module::setReceiverStreamingHwm(const int limit) {
|
||||||
|
sendToReceiver(F_SET_RECEIVER_STREAMING_HWM, limit, nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
// Eiger Specific
|
// Eiger Specific
|
||||||
|
|
||||||
int64_t Module::getSubExptime() const {
|
int64_t Module::getSubExptime() const {
|
||||||
@ -2781,10 +2793,6 @@ void Module::checkReceiverVersionCompatibility() {
|
|||||||
sendToReceiver(F_RECEIVER_CHECK_VERSION, int64_t(APIRECEIVER), nullptr);
|
sendToReceiver(F_RECEIVER_CHECK_VERSION, int64_t(APIRECEIVER), nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::restreamStopFromReceiver() {
|
|
||||||
sendToReceiver(F_RESTREAM_STOP_FROM_RECEIVER);
|
|
||||||
}
|
|
||||||
|
|
||||||
int Module::sendModule(sls_detector_module *myMod, sls::ClientSocket &client) {
|
int Module::sendModule(sls_detector_module *myMod, sls::ClientSocket &client) {
|
||||||
constexpr TLogLevel level = logDEBUG1;
|
constexpr TLogLevel level = logDEBUG1;
|
||||||
LOG(level) << "Sending Module";
|
LOG(level) << "Sending Module";
|
||||||
|
@ -161,6 +161,7 @@ class Module : public virtual slsDetectorDefs {
|
|||||||
void stopReceiver();
|
void stopReceiver();
|
||||||
void startAcquisition();
|
void startAcquisition();
|
||||||
void stopAcquisition();
|
void stopAcquisition();
|
||||||
|
void restreamStopFromReceiver();
|
||||||
void startAndReadAll();
|
void startAndReadAll();
|
||||||
runStatus getRunStatus() const;
|
runStatus getRunStatus() const;
|
||||||
runStatus getReceiverStatus() const;
|
runStatus getReceiverStatus() const;
|
||||||
@ -290,6 +291,8 @@ class Module : public virtual slsDetectorDefs {
|
|||||||
void setClientStreamingPort(int port);
|
void setClientStreamingPort(int port);
|
||||||
sls::IpAddr getClientStreamingIP() const;
|
sls::IpAddr getClientStreamingIP() const;
|
||||||
void setClientStreamingIP(const sls::IpAddr ip);
|
void setClientStreamingIP(const sls::IpAddr ip);
|
||||||
|
int getReceiverStreamingHwm() const;
|
||||||
|
void setReceiverStreamingHwm(const int limit);
|
||||||
|
|
||||||
/**************************************************
|
/**************************************************
|
||||||
* *
|
* *
|
||||||
@ -665,7 +668,6 @@ class Module : public virtual slsDetectorDefs {
|
|||||||
|
|
||||||
void checkDetectorVersionCompatibility();
|
void checkDetectorVersionCompatibility();
|
||||||
void checkReceiverVersionCompatibility();
|
void checkReceiverVersionCompatibility();
|
||||||
void restreamStopFromReceiver();
|
|
||||||
void setModule(sls_detector_module &module, bool trimbits = true);
|
void setModule(sls_detector_module &module, bool trimbits = true);
|
||||||
int sendModule(sls_detector_module *myMod, sls::ClientSocket &client);
|
int sendModule(sls_detector_module *myMod, sls::ClientSocket &client);
|
||||||
void updateReceiverStreamingIP();
|
void updateReceiverStreamingIP();
|
||||||
|
@ -110,23 +110,23 @@ TEST_CASE("adcvpp", "[.cmd][.new]") {
|
|||||||
{
|
{
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
proxy.Call("adcvpp", {"1"}, -1, PUT, oss);
|
proxy.Call("adcvpp", {"1"}, -1, PUT, oss);
|
||||||
REQUIRE(oss.str() == "adcvpp 1\n");
|
REQUIRE(oss.str() == "dac adcvpp 1\n");
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
proxy.Call("adcvpp", {"1140", "mv"}, -1, PUT, oss);
|
proxy.Call("adcvpp", {"1140", "mv"}, -1, PUT, oss);
|
||||||
REQUIRE(oss.str() == "adcvpp 1140 mv\n");
|
REQUIRE(oss.str() == "dac adcvpp 1140 mV\n");
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
proxy.Call("adcvpp", {"mv"}, -1, GET, oss);
|
proxy.Call("adcvpp", {"mv"}, -1, GET, oss);
|
||||||
REQUIRE(oss.str() == "adcvpp 1140 mv\n");
|
REQUIRE(oss.str() == "dac adcvpp 1140 mV\n");
|
||||||
}
|
}
|
||||||
for (int i = 0; i != det.size(); ++i) {
|
for (int i = 0; i != det.size(); ++i) {
|
||||||
det.setDAC(defs::ADC_VPP, prev_val[i], false, {i});
|
det.setDAC(defs::ADC_VPP, prev_val[i], false, {i});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
REQUIRE_THROWS(proxy.Call("adcvpp", {}, -1, GET));
|
REQUIRE_THROWS(proxy.Call("dac adcvpp", {}, -1, GET));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -777,7 +777,7 @@ TEST_CASE("adc", "[.cmd][.new]") {
|
|||||||
CmdProxy proxy(&det);
|
CmdProxy proxy(&det);
|
||||||
auto det_type = det.getDetectorType().squash();
|
auto det_type = det.getDetectorType().squash();
|
||||||
if (det_type == defs::CHIPTESTBOARD) {
|
if (det_type == defs::CHIPTESTBOARD) {
|
||||||
for (int i = 0; i <= 8; ++i) {
|
for (int i = 0; i <= 7; ++i) {
|
||||||
REQUIRE_NOTHROW(proxy.Call("adc", {std::to_string(i)}, -1, GET));
|
REQUIRE_NOTHROW(proxy.Call("adc", {std::to_string(i)}, -1, GET));
|
||||||
REQUIRE_THROWS(proxy.Call("adc", {"0"}, -1, PUT));
|
REQUIRE_THROWS(proxy.Call("adc", {"0"}, -1, PUT));
|
||||||
}
|
}
|
||||||
|
@ -160,12 +160,12 @@ TEST_CASE("Setting and reading back EIGER dacs", "[.cmd][.dacs][.new]") {
|
|||||||
{
|
{
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
proxy.Call("vthreshold", {"1234"}, -1, PUT, oss);
|
proxy.Call("vthreshold", {"1234"}, -1, PUT, oss);
|
||||||
REQUIRE(oss.str() == "vthreshold 1234\n");
|
REQUIRE(oss.str() == "dac vthreshold 1234\n");
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
proxy.Call("vthreshold", {}, -1, GET, oss);
|
proxy.Call("vthreshold", {}, -1, GET, oss);
|
||||||
REQUIRE(oss.str() == "vthreshold 1234\n");
|
REQUIRE(oss.str() == "dac vthreshold 1234\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset dacs after test
|
// Reset dacs after test
|
||||||
@ -231,44 +231,6 @@ TEST_CASE("Setting and reading back EIGER dacs", "[.cmd][.dacs][.new]") {
|
|||||||
|
|
||||||
/* acquisition */
|
/* acquisition */
|
||||||
|
|
||||||
TEST_CASE("trigger", "[.cmd][.new]") {
|
|
||||||
Detector det;
|
|
||||||
CmdProxy proxy(&det);
|
|
||||||
REQUIRE_THROWS(proxy.Call("trigger", {}, -1, GET));
|
|
||||||
auto det_type = det.getDetectorType().squash();
|
|
||||||
if (det_type != defs::EIGER) {
|
|
||||||
REQUIRE_THROWS(proxy.Call("trigger", {}, -1, PUT));
|
|
||||||
} else {
|
|
||||||
auto prev_timing =
|
|
||||||
det.getTimingMode().tsquash("inconsistent timing mode in test");
|
|
||||||
auto prev_frames =
|
|
||||||
det.getNumberOfFrames().tsquash("inconsistent #frames in test");
|
|
||||||
auto prev_exptime =
|
|
||||||
det.getExptime().tsquash("inconsistent exptime in test");
|
|
||||||
auto prev_period =
|
|
||||||
det.getPeriod().tsquash("inconsistent period in test");
|
|
||||||
det.setTimingMode(defs::TRIGGER_EXPOSURE);
|
|
||||||
det.setNumberOfFrames(1);
|
|
||||||
det.setExptime(std::chrono::milliseconds(1));
|
|
||||||
det.setPeriod(std::chrono::milliseconds(1));
|
|
||||||
auto startingfnum = det.getStartingFrameNumber().tsquash(
|
|
||||||
"inconsistent frame nr in test");
|
|
||||||
det.startDetector();
|
|
||||||
{
|
|
||||||
std::ostringstream oss;
|
|
||||||
proxy.Call("trigger", {}, -1, PUT, oss);
|
|
||||||
REQUIRE(oss.str() == "trigger successful\n");
|
|
||||||
}
|
|
||||||
std::this_thread::sleep_for(std::chrono::seconds(2));
|
|
||||||
auto currentfnum = det.getStartingFrameNumber().tsquash(
|
|
||||||
"inconsistent frame nr in test");
|
|
||||||
REQUIRE(startingfnum + 1 == currentfnum);
|
|
||||||
det.stopDetector();
|
|
||||||
det.setTimingMode(prev_timing);
|
|
||||||
det.setNumberOfFrames(prev_frames);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Network Configuration (Detector<->Receiver) */
|
/* Network Configuration (Detector<->Receiver) */
|
||||||
|
|
||||||
TEST_CASE("txndelay_left", "[.cmd][.new]") {
|
TEST_CASE("txndelay_left", "[.cmd][.new]") {
|
||||||
@ -431,36 +393,6 @@ TEST_CASE("settingspath", "[.cmd][.new]") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("parallel", "[.cmd][.new]") {
|
|
||||||
Detector det;
|
|
||||||
CmdProxy proxy(&det);
|
|
||||||
auto det_type = det.getDetectorType().squash();
|
|
||||||
|
|
||||||
if (det_type == defs::EIGER) {
|
|
||||||
auto prev_val = det.getParallelMode();
|
|
||||||
{
|
|
||||||
std::ostringstream oss;
|
|
||||||
proxy.Call("parallel", {"1"}, -1, PUT, oss);
|
|
||||||
REQUIRE(oss.str() == "parallel 1\n");
|
|
||||||
}
|
|
||||||
{
|
|
||||||
std::ostringstream oss;
|
|
||||||
proxy.Call("parallel", {"0"}, -1, PUT, oss);
|
|
||||||
REQUIRE(oss.str() == "parallel 0\n");
|
|
||||||
}
|
|
||||||
{
|
|
||||||
std::ostringstream oss;
|
|
||||||
proxy.Call("parallel", {}, -1, GET, oss);
|
|
||||||
REQUIRE(oss.str() == "parallel 0\n");
|
|
||||||
}
|
|
||||||
for (int i = 0; i != det.size(); ++i) {
|
|
||||||
det.setParallelMode(prev_val[i], {i});
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
REQUIRE_THROWS(proxy.Call("parallel", {}, -1, GET));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_CASE("overflow", "[.cmd][.new]") {
|
TEST_CASE("overflow", "[.cmd][.new]") {
|
||||||
Detector det;
|
Detector det;
|
||||||
CmdProxy proxy(&det);
|
CmdProxy proxy(&det);
|
||||||
|
@ -28,9 +28,9 @@ void test_dac(defs::dacIndex index, const std::string &dacname, int dacvalue) {
|
|||||||
// other detectors
|
// other detectors
|
||||||
else {
|
else {
|
||||||
proxy.Call(dacname, {dacstr}, -1, PUT, oss_set);
|
proxy.Call(dacname, {dacstr}, -1, PUT, oss_set);
|
||||||
REQUIRE(oss_set.str() == dacname + " " + dacstr + "\n");
|
REQUIRE(oss_set.str() == "dac " + dacname + " " + dacstr + "\n");
|
||||||
proxy.Call(dacname, {}, -1, GET, oss_get);
|
proxy.Call(dacname, {}, -1, GET, oss_get);
|
||||||
REQUIRE(oss_get.str() == dacname + " " + dacstr + "\n");
|
REQUIRE(oss_get.str() == "dac " + dacname + " " + dacstr + "\n");
|
||||||
}
|
}
|
||||||
// Reset all dacs to previous value
|
// Reset all dacs to previous value
|
||||||
for (int i = 0; i != det.size(); ++i) {
|
for (int i = 0; i != det.size(); ++i) {
|
||||||
|
@ -106,121 +106,3 @@ TEST_CASE("Setting and reading back MOENCH dacs", "[.cmd][.dacs][.new]") {
|
|||||||
REQUIRE_THROWS(proxy.Call("vcom_adc2", {}, -1, GET));
|
REQUIRE_THROWS(proxy.Call("vcom_adc2", {}, -1, GET));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Moench */
|
|
||||||
|
|
||||||
TEST_CASE("emin", "[.cmd][.new]") {
|
|
||||||
Detector det;
|
|
||||||
CmdProxy proxy(&det);
|
|
||||||
auto det_type = det.getDetectorType().squash();
|
|
||||||
if (det_type == defs::MOENCH) {
|
|
||||||
{
|
|
||||||
std::ostringstream oss;
|
|
||||||
proxy.Call("emin", {"100"}, -1, PUT, oss);
|
|
||||||
REQUIRE(oss.str() == "emin 100\n");
|
|
||||||
}
|
|
||||||
{
|
|
||||||
std::ostringstream oss;
|
|
||||||
proxy.Call("emin", {"200"}, -1, PUT, oss);
|
|
||||||
REQUIRE(oss.str() == "emin 200\n");
|
|
||||||
}
|
|
||||||
{
|
|
||||||
std::ostringstream oss;
|
|
||||||
proxy.Call("emin", {}, -1, GET, oss);
|
|
||||||
REQUIRE(oss.str() == "emin 200\n");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
REQUIRE_THROWS(proxy.Call("emin", {}, -1, GET));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_CASE("emax", "[.cmd][.new]") {
|
|
||||||
Detector det;
|
|
||||||
CmdProxy proxy(&det);
|
|
||||||
auto det_type = det.getDetectorType().squash();
|
|
||||||
if (det_type == defs::MOENCH) {
|
|
||||||
{
|
|
||||||
std::ostringstream oss;
|
|
||||||
proxy.Call("emax", {"100"}, -1, PUT, oss);
|
|
||||||
REQUIRE(oss.str() == "emax 100\n");
|
|
||||||
}
|
|
||||||
{
|
|
||||||
std::ostringstream oss;
|
|
||||||
proxy.Call("emax", {"200"}, -1, PUT, oss);
|
|
||||||
REQUIRE(oss.str() == "emax 200\n");
|
|
||||||
}
|
|
||||||
{
|
|
||||||
std::ostringstream oss;
|
|
||||||
proxy.Call("emax", {}, -1, GET, oss);
|
|
||||||
REQUIRE(oss.str() == "emax 200\n");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
REQUIRE_THROWS(proxy.Call("emax", {}, -1, GET));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_CASE("framemode", "[.cmd][.new]") {
|
|
||||||
Detector det;
|
|
||||||
CmdProxy proxy(&det);
|
|
||||||
auto det_type = det.getDetectorType().squash();
|
|
||||||
if (det_type == defs::MOENCH) {
|
|
||||||
{
|
|
||||||
std::ostringstream oss;
|
|
||||||
proxy.Call("framemode", {"pedestal"}, -1, PUT, oss);
|
|
||||||
REQUIRE(oss.str() == "framemode pedestal\n");
|
|
||||||
}
|
|
||||||
{
|
|
||||||
std::ostringstream oss;
|
|
||||||
proxy.Call("framemode", {"newpedestal"}, -1, PUT, oss);
|
|
||||||
REQUIRE(oss.str() == "framemode newpedestal\n");
|
|
||||||
}
|
|
||||||
{
|
|
||||||
std::ostringstream oss;
|
|
||||||
proxy.Call("framemode", {"flatfield"}, -1, PUT, oss);
|
|
||||||
REQUIRE(oss.str() == "framemode flatfield\n");
|
|
||||||
}
|
|
||||||
{
|
|
||||||
std::ostringstream oss;
|
|
||||||
proxy.Call("framemode", {"newflatfield"}, -1, PUT, oss);
|
|
||||||
REQUIRE(oss.str() == "framemode newflatfield\n");
|
|
||||||
}
|
|
||||||
{
|
|
||||||
std::ostringstream oss;
|
|
||||||
proxy.Call("framemode", {}, -1, GET, oss);
|
|
||||||
REQUIRE(oss.str() == "framemode newflatfield\n");
|
|
||||||
}
|
|
||||||
REQUIRE_THROWS(proxy.Call("framemode", {"counting"}, -1, PUT));
|
|
||||||
} else {
|
|
||||||
REQUIRE_THROWS(proxy.Call("framemode", {}, -1, GET));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_CASE("detectormode", "[.cmd][.new]") {
|
|
||||||
Detector det;
|
|
||||||
CmdProxy proxy(&det);
|
|
||||||
auto det_type = det.getDetectorType().squash();
|
|
||||||
if (det_type == defs::MOENCH) {
|
|
||||||
{
|
|
||||||
std::ostringstream oss;
|
|
||||||
proxy.Call("detectormode", {"counting"}, -1, PUT, oss);
|
|
||||||
REQUIRE(oss.str() == "detectormode counting\n");
|
|
||||||
}
|
|
||||||
{
|
|
||||||
std::ostringstream oss;
|
|
||||||
proxy.Call("detectormode", {"interpolating"}, -1, PUT, oss);
|
|
||||||
REQUIRE(oss.str() == "detectormode interpolating\n");
|
|
||||||
}
|
|
||||||
{
|
|
||||||
std::ostringstream oss;
|
|
||||||
proxy.Call("detectormode", {"analog"}, -1, PUT, oss);
|
|
||||||
REQUIRE(oss.str() == "detectormode analog\n");
|
|
||||||
}
|
|
||||||
std::ostringstream oss;
|
|
||||||
proxy.Call("detectormode", {}, -1, GET, oss);
|
|
||||||
REQUIRE(oss.str() == "detectormode analog\n");
|
|
||||||
|
|
||||||
REQUIRE_THROWS(proxy.Call("detectormode", {"pedestal"}, -1, PUT));
|
|
||||||
} else {
|
|
||||||
REQUIRE_THROWS(proxy.Call("detectormode", {}, -1, GET));
|
|
||||||
}
|
|
||||||
}
|
|
@ -53,12 +53,12 @@ TEST_CASE("Setting and reading back MYTHEN3 dacs", "[.cmd][.dacs][.new]") {
|
|||||||
{
|
{
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
proxy.Call("vthreshold", {"1234"}, -1, PUT, oss);
|
proxy.Call("vthreshold", {"1234"}, -1, PUT, oss);
|
||||||
REQUIRE(oss.str() == "vthreshold 1234\n");
|
REQUIRE(oss.str() == "dac vthreshold 1234\n");
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
proxy.Call("vthreshold", {}, -1, GET, oss);
|
proxy.Call("vthreshold", {}, -1, GET, oss);
|
||||||
REQUIRE(oss.str() == "vthreshold 1234\n");
|
REQUIRE(oss.str() == "dac vthreshold 1234\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset dacs after test
|
// Reset dacs after test
|
||||||
|
@ -706,6 +706,34 @@ TEST_CASE("rx_zmqip", "[.cmd][.rx][.new]") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_CASE("rx_zmqhwm", "[.cmd][.new]") {
|
||||||
|
Detector det;
|
||||||
|
CmdProxy proxy(&det);
|
||||||
|
auto prev_val =
|
||||||
|
det.getRxZmqHwm().tsquash("Inconsistent values for rx_zmqhwm to test");
|
||||||
|
{
|
||||||
|
std::ostringstream oss;
|
||||||
|
proxy.Call("rx_zmqhwm", {"50"}, -1, PUT, oss);
|
||||||
|
REQUIRE(oss.str() == "rx_zmqhwm 50\n");
|
||||||
|
}
|
||||||
|
{
|
||||||
|
std::ostringstream oss;
|
||||||
|
proxy.Call("rx_zmqhwm", {}, -1, GET, oss);
|
||||||
|
REQUIRE(oss.str() == "rx_zmqhwm 50\n");
|
||||||
|
}
|
||||||
|
{
|
||||||
|
std::ostringstream oss;
|
||||||
|
proxy.Call("rx_zmqhwm", {"0"}, -1, PUT, oss);
|
||||||
|
REQUIRE(oss.str() == "rx_zmqhwm 0\n");
|
||||||
|
}
|
||||||
|
{
|
||||||
|
std::ostringstream oss;
|
||||||
|
proxy.Call("rx_zmqhwm", {"-1"}, -1, PUT, oss);
|
||||||
|
REQUIRE(oss.str() == "rx_zmqhwm -1\n");
|
||||||
|
}
|
||||||
|
det.setRxZmqHwm(prev_val);
|
||||||
|
}
|
||||||
|
|
||||||
/* CTB Specific */
|
/* CTB Specific */
|
||||||
|
|
||||||
TEST_CASE("rx_dbitlist", "[.cmd][.rx][.new]") {
|
TEST_CASE("rx_dbitlist", "[.cmd][.rx][.new]") {
|
||||||
|
@ -1051,6 +1051,36 @@ TEST_CASE("extsig", "[.cmd][.new]") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_CASE("parallel", "[.cmd][.new]") {
|
||||||
|
Detector det;
|
||||||
|
CmdProxy proxy(&det);
|
||||||
|
auto det_type = det.getDetectorType().squash();
|
||||||
|
|
||||||
|
if (det_type == defs::EIGER || det_type == defs::MYTHEN3) {
|
||||||
|
auto prev_val = det.getParallelMode();
|
||||||
|
{
|
||||||
|
std::ostringstream oss;
|
||||||
|
proxy.Call("parallel", {"1"}, -1, PUT, oss);
|
||||||
|
REQUIRE(oss.str() == "parallel 1\n");
|
||||||
|
}
|
||||||
|
{
|
||||||
|
std::ostringstream oss;
|
||||||
|
proxy.Call("parallel", {"0"}, -1, PUT, oss);
|
||||||
|
REQUIRE(oss.str() == "parallel 0\n");
|
||||||
|
}
|
||||||
|
{
|
||||||
|
std::ostringstream oss;
|
||||||
|
proxy.Call("parallel", {}, -1, GET, oss);
|
||||||
|
REQUIRE(oss.str() == "parallel 0\n");
|
||||||
|
}
|
||||||
|
for (int i = 0; i != det.size(); ++i) {
|
||||||
|
det.setParallelMode(prev_val[i], {i});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
REQUIRE_THROWS(proxy.Call("parallel", {}, -1, GET));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** temperature */
|
/** temperature */
|
||||||
|
|
||||||
TEST_CASE("templist", "[.cmd][.new]") {
|
TEST_CASE("templist", "[.cmd][.new]") {
|
||||||
@ -1116,6 +1146,46 @@ TEST_CASE("dacvalues", "[.cmd][.new]") {
|
|||||||
|
|
||||||
/* acquisition */
|
/* acquisition */
|
||||||
|
|
||||||
|
TEST_CASE("trigger", "[.cmd][.new]") {
|
||||||
|
Detector det;
|
||||||
|
CmdProxy proxy(&det);
|
||||||
|
REQUIRE_THROWS(proxy.Call("trigger", {}, -1, GET));
|
||||||
|
auto det_type = det.getDetectorType().squash();
|
||||||
|
if (det_type != defs::EIGER && det_type != defs::MYTHEN3) {
|
||||||
|
REQUIRE_THROWS(proxy.Call("trigger", {}, -1, PUT));
|
||||||
|
} else if (det_type == defs::MYTHEN3) {
|
||||||
|
REQUIRE_NOTHROW(proxy.Call("trigger", {}, -1, PUT));
|
||||||
|
} else if (det_type == defs::EIGER) {
|
||||||
|
auto prev_timing =
|
||||||
|
det.getTimingMode().tsquash("inconsistent timing mode in test");
|
||||||
|
auto prev_frames =
|
||||||
|
det.getNumberOfFrames().tsquash("inconsistent #frames in test");
|
||||||
|
auto prev_exptime =
|
||||||
|
det.getExptime().tsquash("inconsistent exptime in test");
|
||||||
|
auto prev_period =
|
||||||
|
det.getPeriod().tsquash("inconsistent period in test");
|
||||||
|
det.setTimingMode(defs::TRIGGER_EXPOSURE);
|
||||||
|
det.setNumberOfFrames(1);
|
||||||
|
det.setExptime(std::chrono::milliseconds(1));
|
||||||
|
det.setPeriod(std::chrono::milliseconds(1));
|
||||||
|
auto startingfnum = det.getStartingFrameNumber().tsquash(
|
||||||
|
"inconsistent frame nr in test");
|
||||||
|
det.startDetector();
|
||||||
|
{
|
||||||
|
std::ostringstream oss;
|
||||||
|
proxy.Call("trigger", {}, -1, PUT, oss);
|
||||||
|
REQUIRE(oss.str() == "trigger successful\n");
|
||||||
|
}
|
||||||
|
std::this_thread::sleep_for(std::chrono::seconds(2));
|
||||||
|
auto currentfnum = det.getStartingFrameNumber().tsquash(
|
||||||
|
"inconsistent frame nr in test");
|
||||||
|
REQUIRE(startingfnum + 1 == currentfnum);
|
||||||
|
det.stopDetector();
|
||||||
|
det.setTimingMode(prev_timing);
|
||||||
|
det.setNumberOfFrames(prev_frames);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
TEST_CASE("clearbusy", "[.cmd][.new]") {
|
TEST_CASE("clearbusy", "[.cmd][.new]") {
|
||||||
Detector det;
|
Detector det;
|
||||||
CmdProxy proxy(&det);
|
CmdProxy proxy(&det);
|
||||||
@ -1757,6 +1827,33 @@ TEST_CASE("zmqip", "[.cmd][.new]") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_CASE("zmqhwm", "[.cmd][.new]") {
|
||||||
|
Detector det;
|
||||||
|
CmdProxy proxy(&det);
|
||||||
|
auto prev_val = det.getClientZmqHwm();
|
||||||
|
{
|
||||||
|
std::ostringstream oss;
|
||||||
|
proxy.Call("zmqhwm", {"50"}, -1, PUT, oss);
|
||||||
|
REQUIRE(oss.str() == "zmqhwm 50\n");
|
||||||
|
}
|
||||||
|
{
|
||||||
|
std::ostringstream oss;
|
||||||
|
proxy.Call("zmqhwm", {}, -1, GET, oss);
|
||||||
|
REQUIRE(oss.str() == "zmqhwm 50\n");
|
||||||
|
}
|
||||||
|
{
|
||||||
|
std::ostringstream oss;
|
||||||
|
proxy.Call("zmqhwm", {"0"}, -1, PUT, oss);
|
||||||
|
REQUIRE(oss.str() == "zmqhwm 0\n");
|
||||||
|
}
|
||||||
|
{
|
||||||
|
std::ostringstream oss;
|
||||||
|
proxy.Call("zmqhwm", {"-1"}, -1, PUT, oss);
|
||||||
|
REQUIRE(oss.str() == "zmqhwm -1\n");
|
||||||
|
}
|
||||||
|
det.setClientZmqHwm(prev_val);
|
||||||
|
}
|
||||||
|
|
||||||
/* Advanced */
|
/* Advanced */
|
||||||
|
|
||||||
TEST_CASE("programfpga", "[.cmd][.new]") {
|
TEST_CASE("programfpga", "[.cmd][.new]") {
|
||||||
|
@ -206,6 +206,8 @@ int ClientInterface::functionTable(){
|
|||||||
flist[F_SET_RECEIVER_RATE_CORRECT] = &ClientInterface::set_rate_correct;
|
flist[F_SET_RECEIVER_RATE_CORRECT] = &ClientInterface::set_rate_correct;
|
||||||
flist[F_SET_RECEIVER_SCAN] = &ClientInterface::set_scan;
|
flist[F_SET_RECEIVER_SCAN] = &ClientInterface::set_scan;
|
||||||
flist[F_RECEIVER_SET_THRESHOLD] = &ClientInterface::set_threshold;
|
flist[F_RECEIVER_SET_THRESHOLD] = &ClientInterface::set_threshold;
|
||||||
|
flist[F_GET_RECEIVER_STREAMING_HWM] = &ClientInterface::get_streaming_hwm;
|
||||||
|
flist[F_SET_RECEIVER_STREAMING_HWM] = &ClientInterface::set_streaming_hwm;
|
||||||
|
|
||||||
for (int i = NUM_DET_FUNCTIONS + 1; i < NUM_REC_FUNCTIONS ; i++) {
|
for (int i = NUM_DET_FUNCTIONS + 1; i < NUM_REC_FUNCTIONS ; i++) {
|
||||||
LOG(logDEBUG1) << "function fnum: " << i << " (" <<
|
LOG(logDEBUG1) << "function fnum: " << i << " (" <<
|
||||||
@ -1657,4 +1659,21 @@ int ClientInterface::set_threshold(Interface &socket) {
|
|||||||
verifyIdle(socket);
|
verifyIdle(socket);
|
||||||
impl()->setThresholdEnergy(arg);
|
impl()->setThresholdEnergy(arg);
|
||||||
return socket.Send(OK);
|
return socket.Send(OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ClientInterface::get_streaming_hwm(Interface &socket) {
|
||||||
|
int retval = impl()->getStreamingHwm();
|
||||||
|
LOG(logDEBUG1) << "zmq send hwm limit:" << retval;
|
||||||
|
return socket.sendResult(retval);
|
||||||
|
}
|
||||||
|
|
||||||
|
int ClientInterface::set_streaming_hwm(Interface &socket) {
|
||||||
|
auto limit = socket.Receive<int>();
|
||||||
|
if (limit < -1) {
|
||||||
|
throw RuntimeError("Invalid zmq send hwm limit " +
|
||||||
|
std::to_string(limit));
|
||||||
|
}
|
||||||
|
verifyIdle(socket);
|
||||||
|
impl()->setStreamingHwm(limit);
|
||||||
|
return socket.Send(OK);
|
||||||
|
}
|
||||||
|
@ -159,6 +159,8 @@ class ClientInterface : private virtual slsDetectorDefs {
|
|||||||
int set_rate_correct(sls::ServerInterface &socket);
|
int set_rate_correct(sls::ServerInterface &socket);
|
||||||
int set_scan(sls::ServerInterface &socket);
|
int set_scan(sls::ServerInterface &socket);
|
||||||
int set_threshold(sls::ServerInterface &socket);
|
int set_threshold(sls::ServerInterface &socket);
|
||||||
|
int get_streaming_hwm(sls::ServerInterface &socket);
|
||||||
|
int set_streaming_hwm(sls::ServerInterface &socket);
|
||||||
|
|
||||||
Implementation *impl() {
|
Implementation *impl() {
|
||||||
if (receiver != nullptr) {
|
if (receiver != nullptr) {
|
||||||
|
@ -75,18 +75,28 @@ void DataStreamer::SetAdditionalJsonHeader(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void DataStreamer::CreateZmqSockets(int *nunits, uint32_t port,
|
void DataStreamer::CreateZmqSockets(int *nunits, uint32_t port,
|
||||||
const sls::IpAddr ip) {
|
const sls::IpAddr ip, int hwm) {
|
||||||
uint32_t portnum = port + index;
|
uint32_t portnum = port + index;
|
||||||
std::string sip = ip.str();
|
std::string sip = ip.str();
|
||||||
try {
|
try {
|
||||||
zmqSocket = new ZmqSocket(portnum, (ip != 0 ? sip.c_str() : nullptr));
|
zmqSocket = new ZmqSocket(portnum, (ip != 0 ? sip.c_str() : nullptr));
|
||||||
|
// set if custom
|
||||||
|
if (hwm >= 0) {
|
||||||
|
zmqSocket->SetSendHighWaterMark(hwm);
|
||||||
|
if (zmqSocket->GetSendHighWaterMark() != hwm) {
|
||||||
|
throw sls::RuntimeError(
|
||||||
|
"Could not set zmq send high water mark to " +
|
||||||
|
std::to_string(hwm));
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG(logERROR) << "Could not create Zmq socket on port " << portnum
|
LOG(logERROR) << "Could not create Zmq socket on port " << portnum
|
||||||
<< " for Streamer " << index;
|
<< " for Streamer " << index;
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
LOG(logINFO) << index << " Streamer: Zmq Server started at "
|
LOG(logINFO) << index << " Streamer: Zmq Server started at "
|
||||||
<< zmqSocket->GetZmqServerAddress();
|
<< zmqSocket->GetZmqServerAddress()
|
||||||
|
<< "[hwm: " << zmqSocket->GetSendHighWaterMark() << "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
void DataStreamer::CloseZmqSocket() {
|
void DataStreamer::CloseZmqSocket() {
|
||||||
|
@ -86,8 +86,10 @@ class DataStreamer : private virtual slsDetectorDefs, public ThreadObject {
|
|||||||
* @param nunits pointer to number of theads/ units per detector
|
* @param nunits pointer to number of theads/ units per detector
|
||||||
* @param port streaming port start index
|
* @param port streaming port start index
|
||||||
* @param ip streaming source ip
|
* @param ip streaming source ip
|
||||||
|
* @param hwm streaming high water mark
|
||||||
*/
|
*/
|
||||||
void CreateZmqSockets(int *nunits, uint32_t port, const sls::IpAddr ip);
|
void CreateZmqSockets(int *nunits, uint32_t port, const sls::IpAddr ip,
|
||||||
|
int hwm);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shuts down and deletes Zmq Sockets
|
* Shuts down and deletes Zmq Sockets
|
||||||
|
@ -876,7 +876,8 @@ void Implementation::setNumberofUDPInterfaces(const int n) {
|
|||||||
(int *)nd, &quadEnable, &numberOfTotalFrames));
|
(int *)nd, &quadEnable, &numberOfTotalFrames));
|
||||||
dataStreamer[i]->SetGeneralData(generalData);
|
dataStreamer[i]->SetGeneralData(generalData);
|
||||||
dataStreamer[i]->CreateZmqSockets(
|
dataStreamer[i]->CreateZmqSockets(
|
||||||
&numThreads, streamingPort, streamingSrcIP);
|
&numThreads, streamingPort, streamingSrcIP,
|
||||||
|
streamingHwm);
|
||||||
dataStreamer[i]->SetAdditionalJsonHeader(
|
dataStreamer[i]->SetAdditionalJsonHeader(
|
||||||
additionalJsonHeader);
|
additionalJsonHeader);
|
||||||
|
|
||||||
@ -1004,7 +1005,8 @@ void Implementation::setDataStreamEnable(const bool enable) {
|
|||||||
(int *)nd, &quadEnable, &numberOfTotalFrames));
|
(int *)nd, &quadEnable, &numberOfTotalFrames));
|
||||||
dataStreamer[i]->SetGeneralData(generalData);
|
dataStreamer[i]->SetGeneralData(generalData);
|
||||||
dataStreamer[i]->CreateZmqSockets(
|
dataStreamer[i]->CreateZmqSockets(
|
||||||
&numThreads, streamingPort, streamingSrcIP);
|
&numThreads, streamingPort, streamingSrcIP,
|
||||||
|
streamingHwm);
|
||||||
dataStreamer[i]->SetAdditionalJsonHeader(
|
dataStreamer[i]->SetAdditionalJsonHeader(
|
||||||
additionalJsonHeader);
|
additionalJsonHeader);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
@ -1063,6 +1065,14 @@ void Implementation::setStreamingSourceIP(const sls::IpAddr ip) {
|
|||||||
LOG(logINFO) << "Streaming Source IP: " << streamingSrcIP;
|
LOG(logINFO) << "Streaming Source IP: " << streamingSrcIP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int Implementation::getStreamingHwm() const { return streamingHwm; }
|
||||||
|
|
||||||
|
void Implementation::setStreamingHwm(const int i) {
|
||||||
|
streamingHwm = i;
|
||||||
|
LOG(logINFO) << "Streaming Hwm: "
|
||||||
|
<< (i == -1 ? "Default (-1)" : std::to_string(streamingHwm));
|
||||||
|
}
|
||||||
|
|
||||||
std::map<std::string, std::string>
|
std::map<std::string, std::string>
|
||||||
Implementation::getAdditionalJsonHeader() const {
|
Implementation::getAdditionalJsonHeader() const {
|
||||||
return additionalJsonHeader;
|
return additionalJsonHeader;
|
||||||
|
@ -130,6 +130,8 @@ class Implementation : private virtual slsDetectorDefs {
|
|||||||
void setStreamingPort(const uint32_t i);
|
void setStreamingPort(const uint32_t i);
|
||||||
sls::IpAddr getStreamingSourceIP() const;
|
sls::IpAddr getStreamingSourceIP() const;
|
||||||
void setStreamingSourceIP(const sls::IpAddr ip);
|
void setStreamingSourceIP(const sls::IpAddr ip);
|
||||||
|
int getStreamingHwm() const;
|
||||||
|
void setStreamingHwm(const int i);
|
||||||
std::map<std::string, std::string> getAdditionalJsonHeader() const;
|
std::map<std::string, std::string> getAdditionalJsonHeader() const;
|
||||||
void setAdditionalJsonHeader(const std::map<std::string, std::string> &c);
|
void setAdditionalJsonHeader(const std::map<std::string, std::string> &c);
|
||||||
std::string getAdditionalJsonParameter(const std::string &key) const;
|
std::string getAdditionalJsonParameter(const std::string &key) const;
|
||||||
@ -312,6 +314,7 @@ class Implementation : private virtual slsDetectorDefs {
|
|||||||
uint32_t streamingStartFnum{0};
|
uint32_t streamingStartFnum{0};
|
||||||
uint32_t streamingPort{0};
|
uint32_t streamingPort{0};
|
||||||
sls::IpAddr streamingSrcIP = sls::IpAddr{};
|
sls::IpAddr streamingSrcIP = sls::IpAddr{};
|
||||||
|
int streamingHwm{-1};
|
||||||
std::map<std::string, std::string> additionalJsonHeader;
|
std::map<std::string, std::string> additionalJsonHeader;
|
||||||
|
|
||||||
// detector parameters
|
// detector parameters
|
||||||
|
@ -93,6 +93,18 @@ class ZmqSocket {
|
|||||||
*/
|
*/
|
||||||
ZmqSocket(const uint32_t portnumber, const char *ethip);
|
ZmqSocket(const uint32_t portnumber, const char *ethip);
|
||||||
|
|
||||||
|
/** Returns high water mark for outbound messages */
|
||||||
|
int GetSendHighWaterMark();
|
||||||
|
|
||||||
|
/** Sets high water mark for outbound messages. Default 1000 (zmqlib) */
|
||||||
|
void SetSendHighWaterMark(int limit);
|
||||||
|
|
||||||
|
/** Returns high water mark for inbound messages */
|
||||||
|
int GetReceiveHighWaterMark();
|
||||||
|
|
||||||
|
/** Sets high water mark for inbound messages. Default 1000 (zmqlib) */
|
||||||
|
void SetReceiveHighWaterMark(int limit);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns Port Number
|
* Returns Port Number
|
||||||
* @returns Port Number
|
* @returns Port Number
|
||||||
|
@ -315,6 +315,8 @@ enum detFuncs {
|
|||||||
F_SET_RECEIVER_RATE_CORRECT,
|
F_SET_RECEIVER_RATE_CORRECT,
|
||||||
F_SET_RECEIVER_SCAN,
|
F_SET_RECEIVER_SCAN,
|
||||||
F_RECEIVER_SET_THRESHOLD,
|
F_RECEIVER_SET_THRESHOLD,
|
||||||
|
F_GET_RECEIVER_STREAMING_HWM,
|
||||||
|
F_SET_RECEIVER_STREAMING_HWM,
|
||||||
|
|
||||||
NUM_REC_FUNCTIONS
|
NUM_REC_FUNCTIONS
|
||||||
};
|
};
|
||||||
@ -631,6 +633,9 @@ const char* getFunctionNameFromEnum(enum detFuncs func) {
|
|||||||
case F_SET_RECEIVER_RATE_CORRECT: return "F_SET_RECEIVER_RATE_CORRECT";
|
case F_SET_RECEIVER_RATE_CORRECT: return "F_SET_RECEIVER_RATE_CORRECT";
|
||||||
case F_SET_RECEIVER_SCAN: return "F_SET_RECEIVER_SCAN";
|
case F_SET_RECEIVER_SCAN: return "F_SET_RECEIVER_SCAN";
|
||||||
case F_RECEIVER_SET_THRESHOLD: return "F_RECEIVER_SET_THRESHOLD";
|
case F_RECEIVER_SET_THRESHOLD: return "F_RECEIVER_SET_THRESHOLD";
|
||||||
|
case F_GET_RECEIVER_STREAMING_HWM: return "F_GET_RECEIVER_STREAMING_HWM";
|
||||||
|
case F_SET_RECEIVER_STREAMING_HWM: return "F_SET_RECEIVER_STREAMING_HWM";
|
||||||
|
|
||||||
|
|
||||||
case NUM_REC_FUNCTIONS: return "NUM_REC_FUNCTIONS";
|
case NUM_REC_FUNCTIONS: return "NUM_REC_FUNCTIONS";
|
||||||
default: return "Unknown Function";
|
default: return "Unknown Function";
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
/** API versions */
|
/** API versions */
|
||||||
#define GITBRANCH "5.0.0-rc2"
|
#define GITBRANCH "5.0.0-rc2"
|
||||||
#define APILIB 0x201002
|
#define APICTB 0x201008
|
||||||
#define APIRECEIVER 0x201002
|
#define APIGOTTHARD 0x201008
|
||||||
#define APIGUI 0x201002
|
#define APIGOTTHARD2 0x201008
|
||||||
#define APICTB 0x201005
|
#define APIJUNGFRAU 0x201008
|
||||||
#define APIGOTTHARD 0x201005
|
#define APIMYTHEN3 0x201008
|
||||||
#define APIGOTTHARD2 0x201005
|
#define APIMOENCH 0x201008
|
||||||
#define APIJUNGFRAU 0x201005
|
#define APIEIGER 0x201008
|
||||||
#define APIMYTHEN3 0x201005
|
#define APILIB 0x201008
|
||||||
#define APIMOENCH 0x201005
|
#define APIRECEIVER 0x201008
|
||||||
#define APIEIGER 0x201005
|
#define APIGUI 0x201009
|
||||||
|
@ -485,6 +485,8 @@ std::string ToString(const defs::dacIndex s) {
|
|||||||
return std::string("vipre_cds");
|
return std::string("vipre_cds");
|
||||||
case defs::IBIAS_SFP:
|
case defs::IBIAS_SFP:
|
||||||
return std::string("ibias_sfp");
|
return std::string("ibias_sfp");
|
||||||
|
case defs::ADC_VPP:
|
||||||
|
return std::string("adcvpp");
|
||||||
case defs::TRIMBIT_SCAN:
|
case defs::TRIMBIT_SCAN:
|
||||||
return std::string("trimbit_scan");
|
return std::string("trimbit_scan");
|
||||||
case defs::HIGH_VOLTAGE:
|
case defs::HIGH_VOLTAGE:
|
||||||
@ -696,31 +698,31 @@ template <> defs::dacIndex StringTo(const std::string &s) {
|
|||||||
return defs::DAC_3;
|
return defs::DAC_3;
|
||||||
if (s == "dac 4" || s == "4")
|
if (s == "dac 4" || s == "4")
|
||||||
return defs::DAC_4;
|
return defs::DAC_4;
|
||||||
if (s == "dac 5"|| s == "5")
|
if (s == "dac 5" || s == "5")
|
||||||
return defs::DAC_5;
|
return defs::DAC_5;
|
||||||
if (s == "dac 6"|| s == "6")
|
if (s == "dac 6" || s == "6")
|
||||||
return defs::DAC_6;
|
return defs::DAC_6;
|
||||||
if (s == "dac 7"|| s == "7")
|
if (s == "dac 7" || s == "7")
|
||||||
return defs::DAC_7;
|
return defs::DAC_7;
|
||||||
if (s == "dac 8"|| s == "8")
|
if (s == "dac 8" || s == "8")
|
||||||
return defs::DAC_8;
|
return defs::DAC_8;
|
||||||
if (s == "dac 9"|| s == "9")
|
if (s == "dac 9" || s == "9")
|
||||||
return defs::DAC_9;
|
return defs::DAC_9;
|
||||||
if (s == "dac 10"|| s == "10")
|
if (s == "dac 10" || s == "10")
|
||||||
return defs::DAC_10;
|
return defs::DAC_10;
|
||||||
if (s == "dac 11"|| s == "11")
|
if (s == "dac 11" || s == "11")
|
||||||
return defs::DAC_11;
|
return defs::DAC_11;
|
||||||
if (s == "dac 12"|| s == "12")
|
if (s == "dac 12" || s == "12")
|
||||||
return defs::DAC_12;
|
return defs::DAC_12;
|
||||||
if (s == "dac 13"|| s == "13")
|
if (s == "dac 13" || s == "13")
|
||||||
return defs::DAC_13;
|
return defs::DAC_13;
|
||||||
if (s == "dac 14"|| s == "14")
|
if (s == "dac 14" || s == "14")
|
||||||
return defs::DAC_14;
|
return defs::DAC_14;
|
||||||
if (s == "dac 15"|| s == "15")
|
if (s == "dac 15" || s == "15")
|
||||||
return defs::DAC_15;
|
return defs::DAC_15;
|
||||||
if (s == "dac 16"|| s == "16")
|
if (s == "dac 16" || s == "16")
|
||||||
return defs::DAC_16;
|
return defs::DAC_16;
|
||||||
if (s == "dac 17"|| s == "17")
|
if (s == "dac 17" || s == "17")
|
||||||
return defs::DAC_17;
|
return defs::DAC_17;
|
||||||
if (s == "vsvp")
|
if (s == "vsvp")
|
||||||
return defs::VSVP;
|
return defs::VSVP;
|
||||||
@ -844,6 +846,8 @@ template <> defs::dacIndex StringTo(const std::string &s) {
|
|||||||
return defs::VIPRE_CDS;
|
return defs::VIPRE_CDS;
|
||||||
if (s == "ibias_sfp")
|
if (s == "ibias_sfp")
|
||||||
return defs::IBIAS_SFP;
|
return defs::IBIAS_SFP;
|
||||||
|
if (s == "adcvpp")
|
||||||
|
return defs::ADC_VPP;
|
||||||
if (s == "trimbit_scan")
|
if (s == "trimbit_scan")
|
||||||
return defs::TRIMBIT_SCAN;
|
return defs::TRIMBIT_SCAN;
|
||||||
if (s == "highvoltage")
|
if (s == "highvoltage")
|
||||||
|
@ -48,6 +48,8 @@ ZmqSocket::ZmqSocket(const char *const hostname_or_ip,
|
|||||||
PrintError();
|
PrintError();
|
||||||
throw sls::ZmqSocketError("Could not set ZMQ_LINGER");
|
throw sls::ZmqSocketError("Could not set ZMQ_LINGER");
|
||||||
}
|
}
|
||||||
|
LOG(logDEBUG) << "Default receive high water mark:"
|
||||||
|
<< GetReceiveHighWaterMark();
|
||||||
}
|
}
|
||||||
|
|
||||||
ZmqSocket::ZmqSocket(const uint32_t portnumber, const char *ethip)
|
ZmqSocket::ZmqSocket(const uint32_t portnumber, const char *ethip)
|
||||||
@ -63,6 +65,7 @@ ZmqSocket::ZmqSocket(const uint32_t portnumber, const char *ethip)
|
|||||||
PrintError();
|
PrintError();
|
||||||
throw sls::ZmqSocketError("Could not create socket");
|
throw sls::ZmqSocketError("Could not create socket");
|
||||||
}
|
}
|
||||||
|
LOG(logDEBUG) << "Default send high water mark:" << GetSendHighWaterMark();
|
||||||
|
|
||||||
// construct address, can be refactored with libfmt
|
// construct address, can be refactored with libfmt
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
@ -79,6 +82,44 @@ ZmqSocket::ZmqSocket(const uint32_t portnumber, const char *ethip)
|
|||||||
std::this_thread::sleep_for(std::chrono::milliseconds(200));
|
std::this_thread::sleep_for(std::chrono::milliseconds(200));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
int ZmqSocket::GetSendHighWaterMark() {
|
||||||
|
int value = 0;
|
||||||
|
size_t value_size = sizeof(value);
|
||||||
|
if (zmq_getsockopt(sockfd.socketDescriptor, ZMQ_SNDHWM, &value,
|
||||||
|
&value_size)) {
|
||||||
|
PrintError();
|
||||||
|
throw sls::ZmqSocketError("Could not get ZMQ_SNDHWM");
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ZmqSocket::SetSendHighWaterMark(int limit) {
|
||||||
|
if (zmq_setsockopt(sockfd.socketDescriptor, ZMQ_SNDHWM, &limit,
|
||||||
|
sizeof(limit))) {
|
||||||
|
PrintError();
|
||||||
|
throw sls::ZmqSocketError("Could not set ZMQ_SNDHWM");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int ZmqSocket::GetReceiveHighWaterMark() {
|
||||||
|
int value = 0;
|
||||||
|
size_t value_size = sizeof(value);
|
||||||
|
if (zmq_getsockopt(sockfd.socketDescriptor, ZMQ_RCVHWM, &value,
|
||||||
|
&value_size)) {
|
||||||
|
PrintError();
|
||||||
|
throw sls::ZmqSocketError("Could not get ZMQ_SNDHWM");
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ZmqSocket::SetReceiveHighWaterMark(int limit) {
|
||||||
|
if (zmq_setsockopt(sockfd.socketDescriptor, ZMQ_RCVHWM, &limit,
|
||||||
|
sizeof(limit))) {
|
||||||
|
PrintError();
|
||||||
|
throw sls::ZmqSocketError("Could not set ZMQ_SNDHWM");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int ZmqSocket::Connect() {
|
int ZmqSocket::Connect() {
|
||||||
if (zmq_connect(sockfd.socketDescriptor, sockfd.serverAddress.c_str())) {
|
if (zmq_connect(sockfd.socketDescriptor, sockfd.serverAddress.c_str())) {
|
||||||
PrintError();
|
PrintError();
|
||||||
|
Reference in New Issue
Block a user