Compare commits

...

53 Commits

Author SHA1 Message Date
794e579e12 update tag version in client version 2020-10-09 15:03:00 +02:00
bc6626aa7b docs 2020-10-09 08:55:03 +02:00
6fb2479178 updated docs 2020-10-09 08:52:19 +02:00
6053f2adff update docs 2020-10-08 16:04:58 +02:00
e0e2c2efba updated binaries 2020-10-08 15:55:24 +02:00
6d5f2e66ae updated client APIs 2020-10-08 15:46:26 +02:00
33d85dbfc0 all servers compiled 2020-10-08 15:45:29 +02:00
a838830090 ran tests and fixed 2020-10-08 15:44:15 +02:00
b9a459faa1 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-10-08 14:47:21 +02:00
d4806eb48b Eiger manual with 5.x updates 2020-10-08 14:42:02 +02:00
7f189629fb commands, set multi level but get module level enabled 2020-10-08 14:31:18 +02:00
bee6bcc7a3 Merge pull request #199 from slsdetectorgroup/zmqhwm
Zmqhwm
2020-10-08 13:42:36 +02:00
2f2399d550 minor 2020-10-08 13:29:46 +02:00
6c1035aa99 zmq hwm are specified to 2 for gui and restreaming of receiver if all zmq not closed at end of acquiistion 2020-10-08 13:01:01 +02:00
c9bba6fbdc Merge branch 'developer' into zmqhwm 2020-10-07 18:02:53 +02:00
6d929ce96f Merge pull request #196 from slsdetectorgroup/semfail
Semfail
2020-10-07 18:00:24 +02:00
a36ce8cb1c binaries in 2020-10-07 17:05:38 +02:00
38cc365c01 setting shared mutex attribute for non blackfins 2020-10-07 17:01:16 +02:00
688fe4e3f7 fix zmqport and rx_zmqport, must restart zmq streaming 2020-10-07 14:17:34 +02:00
5c0dff29ed binaries in 2020-10-07 12:27:35 +02:00
51bfa17c6a switching to pthread with shared process attribute as sem_init doesnt work for blackfin 2020-10-07 12:25:14 +02:00
3b619f4488 Update README.md 2020-10-07 11:13:14 +02:00
6f96821275 wip, doc 2020-10-06 18:56:39 +02:00
6e58d845e9 updated ctb and moench server versions 2020-10-06 15:59:27 +02:00
ff3c79eaaa doc update 2020-10-06 15:57:27 +02:00
c2d9532a69 updated versionign server color minor 2020-10-05 09:56:47 +02:00
7855005590 updated 5.0.0-rc2 in binaries 2020-10-05 09:53:13 +02:00
2588a4aced updating 5.0.0-rc2 versioning 2020-10-05 09:51:27 +02:00
0d2d41a9f3 wip, doc 2020-10-02 17:04:12 +02:00
70588ea9a3 wip config 2020-10-02 17:03:18 +02:00
949d0b6ec7 updating client api, tag updating script 2020-10-02 11:36:33 +02:00
b2f5208745 binaries in 2020-10-02 11:19:19 +02:00
91efecd4ca servers: updated fw-sw api version check error message, m3 and g2: updated min fw version 2020-10-02 11:17:11 +02:00
855ed36db2 Merge pull request #193 from slsdetectorgroup/stopfix
Stopfix
2020-10-01 17:57:48 +02:00
a730a13cbe wip 2020-10-01 17:57:07 +02:00
f31260030b bugfix: cannot stop detector if rxr crashed 2020-10-01 17:54:08 +02:00
e5c98150e4 wip, doc 2020-10-01 17:43:22 +02:00
91d688f18c minor doc 2020-10-01 11:47:08 +02:00
c9372f3d0e gui: rx_zmqfreq set to 0 in gui for fast detectors that overload the network unnecessarily 2020-10-01 11:45:45 +02:00
b650ad0376 updated jungfrau firmware pcb 1.0 version to be more intuitive 2020-10-01 10:31:15 +02:00
b3ef6af42a updated jungfrau firmware version (old pcb) to be more intuitive 2020-10-01 10:26:24 +02:00
488c5d3720 wip, doc 2020-09-30 15:49:51 +02:00
cf2b064d95 wip, doc 2020-09-30 15:47:01 +02:00
af5798f569 wip, doc 2020-09-30 15:28:07 +02:00
b036007991 wip, doc 2020-09-30 13:12:23 +02:00
5df25a9eb7 updated new binaries 2020-09-30 12:39:44 +02:00
1c76f76a72 removed old server binaries 2020-09-30 12:36:18 +02:00
b7ec110c57 gui bug fix: setting streaming timer should also set streaming freq to 0 2020-09-30 12:21:33 +02:00
54c719461d doc minor 2020-09-30 11:37:37 +02:00
2d104d9a9b setting 1 giga mode as default for virtual mythen3 2020-09-29 15:51:22 +02:00
e4d1daea02 gui: removing unique ptr in qt stuff 2020-09-29 15:22:59 +02:00
3a3c5b0a6e minor readframefromrxr using unique ptrs 2020-09-29 14:37:43 +02:00
b421a73c3d m3: virtual servers for switching to 1 giga (stop server does not know dr) 2020-09-28 17:27:56 +02:00
111 changed files with 2920 additions and 1049 deletions

View File

@ -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
Detailed documentation can be found on the [official site.](https://www.psi.ch/detectors/users-support)

View File

@ -1,4 +1,4 @@
SLS Detector Package 5.0.0-rc1 released on 25.09.2020 (Release Candidate 1)
SLS Detector Package 5.0.0-rc2 released on 09.10.2020 (Release Candidate 2)
===========================================================================
CONTENTS
@ -12,58 +12,56 @@ SLS Detector Package 5.0.0-rc1 released on 25.09.2020 (Release Candidate 1)
Eiger
=====
Minimum compatible version : 27
Latest compatible version : 27
Compatible version : 08.09.2020 (v27)
Jungfrau
========
Minimum compatible version (PCB v1.0) : 24.07.2020 (v0.8)
Latest compatible version (PCB v1.0) : 24.07.2020 (v0.8)
Minimum compatible version (PCB v2.0) : 21.07.2020 (v2.1)
Latest compatible version (PCB v2.0) : 21.07.2020 (v2.1)
Compatible version : 24.07.2020 (v1.1, PCB v1.0)
: 21.07.2020 (v2.1, PCB v2.0)
Gotthard
========
Minimum compatible version : 11.01.2013
Latest compatible version : 08.02.2018 (50um and 25um Master)
09.02.2018 (25 um Slave)
Compatible version : 08.02.2018 (50um and 25um Master)
: 09.02.2018 (25 um Slave)
Mythen3
=======
Minimum compatible version : 25.09.2020
Latest compatible version : 25.09.2020
Compatible version : 25.09.2020 (development)
Gotthard2
=========
Minimum compatible version : 25.09.2020
Latest compatible version : 25.09.2020
Compatible version : 25.09.2020 (development)
Moench
======
Minimum compatible version : 02.03.2020
Latest compatible version : 02.03.2020
Compatible version : 10.05.2020 (v1.0)
Ctb
===
Minimum compatible version : 27.11.2019
Latest compatible version : 27.11.2019
Compatible version : 10.05.2019 (v1.0)
Detector Upgrade
================
Eiger Remotely via bit files
Jungfrau Remotely using sls_detector_put programfpga <pof>
Gotthard Cannot be upgraded remotely. Requires programming via USB blaster
Mythen3 Remotely using sls_detector_put programfpga <rbf>
Gotthard2 Remotely using sls_detector_put programfpga <rbf>
Moench Remotely using sls_detector_put programfpga <pof>
Ctb Remotely using sls_detector_put programfpga <pof>
The following can be upgraded remotely:
Eiger via bit files
Jungfrau via command <.pof>
Mythen3 via command <.rbf>
Gotthard2 via command <.rbf>
Moench via command <.pof>
Ctb via command <.pof>
The following cannot be upgraded remotely:
Gotthard
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.
https://www.psi.ch/en/detectors/firmware
Please refer to the link below for more details on the firmware versions.
https://www.psi.ch/en/detectors/firmware
2. Download, Documentation & Support
@ -72,7 +70,7 @@ SLS Detector Package 5.0.0-rc1 released on 25.09.2020 (Release Candidate 1)
Download
--------
The Source Code (Default C++ API):
The Source Code:
https://github.com/slsdetectorgroup/slsDetectorPackage
Documentation
@ -80,12 +78,24 @@ SLS Detector Package 5.0.0-rc1 released on 25.09.2020 (Release Candidate 1)
Installation:
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:
https://slsdetectorgroup.github.io/devdoc/consuming.html
Command Line Documentation:
https://slsdetectorgroup.github.io/devdoc/commandline.html
Quick Start Guide:
https://slsdetectorgroup.github.io/devdoc/quick_start_guide.html
C++ API Documentation:
https://slsdetectorgroup.github.io/devdoc/detector.html
@ -100,12 +110,15 @@ SLS Detector Package 5.0.0-rc1 released on 25.09.2020 (Release Candidate 1)
https://slsdetectorgroup.github.io/devdoc/pyexamples.html
TroubleShooting:
https://www.psi.ch/en/detectors/troubleshooting
https://slsdetectorgroup.github.io/devdoc/troubleshooting.html
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
-------

View File

@ -39,7 +39,7 @@ set(SPHINX_SOURCE_FILES
src/pyenums.rst
src/pyexamples.rst
src/servers.rst
src/receiver.rst
src/receiver_api.rst
src/result.rst
src/type_traits.rst
src/ToString.rst
@ -47,6 +47,10 @@ set(SPHINX_SOURCE_FILES
src/pygettingstarted.rst
src/firmware.rst
src/serverupgrade.rst
src/virtualserver.rst
src/serverdefaults.rst
src/quick_start_guide.rst
src/troubleshooting.rst
)

View File

@ -6,7 +6,7 @@ slsDetectorPackage there are a few different ways to
consume our package. The recommended way is to use one of the
CMake approaches.
One can test with :ref:`detector simulators<Virtual Detector Servers>` before testing the API with a real detector or when a real detector is not at hand.
CMake: slsDetectorPackage as submodule in your project
---------------------------------------

View File

@ -5,26 +5,43 @@ Firmware Upgrade
Eiger
-------------
.. note ::
| Eiger firmware can be upgraded remotely.
| The programming executable (bcp) and corresponding bit files are provided by the SLS Detector group.
Compatibility
Download
^^^^^^^^^^^^^
- `bcp script <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/eiger/bcp>`__
**Release candidate 5.0.0-rc1**
.. code-block:: bash
- detector server corresponding to package in slsDetectorPackage/serverBin
Minimum compatible version : 27
Latest compatible version : 27
`Older versions <https://www.psi.ch/en/detectors/latest-installation>`_
- bit files
.. list-table::
:widths: 25 10 30 25 10
: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/>`__
-
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.
@ -94,30 +111,46 @@ Upgrade
Jungfrau
-------------
.. note ::
| Jungfrau firmware can be upgraded remotely.
| The corresponding programming file (pof) is provided by the SLS Detector group.
Compatibility
Download
^^^^^^^^^^^^^
- 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 (v0.8)
Latest compatible version : 24.07.2020 (v0.8)
# 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>`_
Upgrade (from v4.x.x)
^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^
#. Tftp must be installed on pc.
#. Update client package to the latest (5.0.0-rc1).
@ -153,7 +186,7 @@ Upgrade (from v4.x.x)
sls_detector_put hostname bchipxxx
sls_detector_put programfpga xxx.pof
#. After programming, kill update server using Ctrl + C.
#. After programming, kill 'update server' using Ctrl + C in server console.
#. Enable server respawning if needed
.. code-block:: bash
@ -168,8 +201,8 @@ Upgrade (from v4.x.x)
jungfrauDetectorServervxxx --stop-server 1953
Upgrade (from v5.0.0-rc1)
^^^^^^^^^^^^^^^^^^^^^^^^
Upgrade (from v5.0.0-rcx)
^^^^^^^^^^^^^^^^^^^^^^^^^^
#. Program from console
.. code-block:: bash
@ -186,29 +219,45 @@ Upgrade (from v5.0.0-rc1)
Gotthard
---------
.. warning ::
| Gotthard firmware cannot be upgraded remotely and requires the use of USB-Blaster.
| It is generally updated by the SLS Detector group.
Compatibility
Download
^^^^^^^^^^^^^
- detector server corresponding to package in slsDetectorPackage/serverBin
**Release candidate 5.0.0-rc1**
- pof files
.. list-table::
:widths: 15 15 15 15 5
:header-rows: 1
.. code-block:: bash
* - 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>`__
-
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>`_
Upgrade
^^^^^^^^
.. warning ::
| Gotthard firmware cannot be upgraded remotely and requires the use of USB-Blaster.
| 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>`_.
#. 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.
@ -228,24 +277,35 @@ Upgrade
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
Latest compatible version : 25.09.2020
* - Software
- Hardware
- Firmware Date
- Firmware Link
- Comments
* - v5.0.0-rcx
-
- 25.09.2020
-
- development
Upgrade (from v5.0.0-rc1)
^^^^^^^^^^^^^^^^^^^^^^^^
Upgrade (from v5.0.0-rcx)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
#. Program from console
.. code-block:: bash
@ -260,25 +320,34 @@ Upgrade (from v5.0.0-rc1)
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
Latest compatible version : 25.09.2020
Upgrade (from v5.0.0-rc1)
^^^^^^^^^^^^^^^^^^^^^^^^
Upgrade (from v5.0.0-rcx)
^^^^^^^^^^^^^^^^^^^^^^^^^^
#. Program from console
.. code-block:: bash
@ -293,25 +362,35 @@ Upgrade (from v5.0.0-rc1)
Moench
------
.. note ::
| Moench firmware can be upgraded remotely.
| The corresponding programming file (pof) is provided by the SLS Detector group.
-------
Compatibility
Download
^^^^^^^^^^^^^
- 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
Latest compatible version : 02.03.2020
Upgrade (from v5.0.0-rc1)
^^^^^^^^^^^^^^^^^^^^^^^^
Upgrade (from v5.0.0-rcx)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
#. Program from console
.. code-block:: bash
@ -325,25 +404,35 @@ Upgrade (from v5.0.0-rc1)
sls_detector_put programfpga xxx.pof
Ctb
---
.. note ::
| Ctb firmware can be upgraded remotely.
| The corresponding programming file (pof) is provided by the SLS Detector group.
----
Compatibility
Download
^^^^^^^^^^^^^
- 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
Latest compatible version : 27.11.2019
Upgrade (from v5.0.0-rc1)
^^^^^^^^^^^^^^^^^^^^^^^^
Upgrade (from v5.0.0-rcx)
^^^^^^^^^^^^^^^^^^^^^^^^^^
#. Program from console
.. code-block:: bash

View File

@ -25,7 +25,7 @@ Welcome to slsDetectorPackage's documentation!
detector
result
receiver
receiver_api
examples
.. toctree::
@ -42,6 +42,7 @@ Welcome to slsDetectorPackage's documentation!
:maxdepth: 2
commandline
quick_start_guide
.. toctree::
:caption: Developer
@ -51,15 +52,25 @@ Welcome to slsDetectorPackage's documentation!
ToString
.. toctree::
:caption: Servers
:caption: Firmware
:maxdepth: 2
firmware
.. toctree::
:caption: Detector Server
:maxdepth: 2
servers
serverupgrade
virtualserver
serverdefaults
.. toctree::
:caption: Firmware
:caption: Troubleshooting
troubleshooting
firmware
.. Indices and tables
.. ==================

View File

@ -16,6 +16,7 @@
manage the dependencies.
.. _Installation:
Installation
==============================================
@ -48,6 +49,8 @@ Build using cmk.sh script
-------------------------
.. code-block:: bash
The binaries are generated in slsDetectorPackage/build/bin directory.
# new build and make with 9 parallel threads
./cmk.sh -cbj9
@ -85,6 +88,7 @@ We have three different packages available:
conda config --set channel_priority strict
#cerate an environment with our library, then activate
#replace 2020.07.20.dev0 with the required tag
conda create -n myenv slsdetlib=2020.07.23.dev0
conda activate myenv

View File

@ -70,12 +70,6 @@ exposed to Python through pybind11.
.. autoclass:: masterFlags
:undoc-members:
.. autoclass:: frameModeType
:undoc-members:
.. autoclass:: detectorModeType
:undoc-members:
.. autoclass:: burstMode
:undoc-members:

View File

@ -217,9 +217,9 @@ The enums can be found in slsdet.enums
import slsdet
>>> [e for e in dir(slsdet.enums) if not e.startswith('_')]
['burstMode', 'clockIndex', 'dacIndex', 'detectorModeType',
['burstMode', 'clockIndex', 'dacIndex',
'detectorSettings', 'detectorType', 'dimension', 'externalSignalFlag',
'fileFormat', 'frameDiscardPolicy', 'frameModeType', 'masterFlags',
'fileFormat', 'frameDiscardPolicy', 'masterFlags',
'readoutMode', 'runStatus', 'speedLevel', 'timingMode',
'timingSourceType']

View File

@ -0,0 +1,140 @@
Quick Start Guide
=================
Detector
--------
Start up detector (with cooling if required). Ensure both control server and stop server is running on-board.
Or use a detector simulator to test. Click :ref:`here<Virtual Detector Servers>` for further instructions.
Receiver
--------
| One has to start the slsReceiver before loading config file or using any receiver commands (prefix: **rx_** )
For a Single Module
.. code-block:: bash
# default port 1954
slsReceiver
# custom port 2012
slsReceiver -t2012
For Multiple Modules
.. code-block:: bash
# slsMultiReceiver [starting port] [number of receivers] [print each frame header for debugging]
slsMultiReceiver 2012 2 0
Client
------
Refer :ref:`Sample Config file` to create config file.
.. code-block:: bash
# load config file
sls_detector_put config /path/sample.config
# set number of frames
sls_detector_put frames 5
# acquire
sls_detector_acquire
.. _Sample Config file:
Sample Config file
^^^^^^^^^^^^^^^^^^
There are sample config files for each detector in slsDetectorPackage/examples folder.
For a Single Module
.. code-block:: bash
# connects to module
hostname bchipxxx
# connects to receiver at default port
rx_hostname mpc1922
# or to connect to specific port
# rx_hostname mpc1922:2012
# sets destination udp ports (not needed, default is 50001)
udp_dstport 50012
# source udp ips must be same subnet at destintaion udp ips
udp_srcip 192.168.1.112
# destination udp ip picked up from rx_hostname (if auto)
udp_dstip auto
# set file path
fpath /tmp
For a Single Module with custom Receiver (not slsReceiver)
.. code-block:: bash
# connects to module
hostname bchipxxx
# sets destination udp ports (not needed, default is 50001)
udp_dstport 50012
# source udp ips must be same subnet at destintaion udp ips
udp_srcip 192.168.1.112
# destination udp ip
udp_dstip 192.168.1.100
# source udp mac
udp_srcmac aa:bb:cc:dd:ee:ff
# destination udp mac
udp_dstmac 3c:ab:98:bf:50:60
# set file path
fpath /tmp
For Multiple Modules
.. code-block:: bash
# connects to mulitple modules
hostname bchipxxx+bchipyyy+
# connects to receivers at ports 2012 and 2014
rx_hostname mpc1922:2012+mpc1922:2013+
# sets differernt destination udp ports
0:udp_dstport 50012
1:udp_dstport 50014
# source udp ips must be same subnet at destintaion udp ips
0:udp_srcip 192.168.1.112
1:udp_srcip 192.168.1.114
# destination udp ip picked up from rx_hostname (if auto)
udp_dstip auto
# set file path
fpath /tmp
Gui
----
Compile with SLS_USE_GUI=ON in cmake or -g option in cmk.sh script. One can also just use the conda binary. Refer :ref:`installation instructions<Installation>`.
.. code-block:: bash
slsDetectorGui
.. note ::
| 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, 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 (ZMQ Streaming), from the command line or API.
| 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.

106
docs/src/serverdefaults.rst Normal file
View File

@ -0,0 +1,106 @@
Default Values
==============================================
Mythen3
-------------
.. csv-table:: Default values
:file: mythen3.csv
:widths: 35, 35
:header-rows: 1
DACS
^^^^^^^^^^^^^
.. csv-table:: Mythen3 DACS
:file: mythen3-dacs.csv
:widths: 35, 35
:header-rows: 1
Gotthard2
-------------
.. csv-table:: Default values
:file: gotthard2.csv
:widths: 35, 35
:header-rows: 1
DACS
^^^^^^^^^^^^^
.. csv-table:: Gotthard 2 DACS
:file: gotthard2-dacs.csv
:widths: 35, 35
:header-rows: 1
Moench
-------------
.. csv-table:: Default values
:file: moench.csv
:widths: 35, 35
:header-rows: 1
DACS
^^^^^^^^^^^^^
.. csv-table:: Moench DACS
:file: moench-dacs.csv
:widths: 35, 35
:header-rows: 1
Ctb
-------------
.. csv-table:: Default values
:file: ctb.csv
:widths: 35, 35
:header-rows: 1
Eiger
-------------
.. csv-table:: Default values
:file: eiger.csv
:widths: 35, 35
:header-rows: 1
DACS
^^^^^^^^^^^^^
.. csv-table:: Eiger DACS
:file: eiger-dacs.csv
:widths: 35, 35
:header-rows: 1
Jungfrau
-------------
.. csv-table:: Default values
:file: jungfrau.csv
:widths: 35, 35
:header-rows: 1
DACS
^^^^^^^^^^^^^
.. csv-table:: Jungfrau DACS
:file: jungfrau-dacs.csv
:widths: 35, 35
:header-rows: 1
Gotthard
-------------
.. csv-table:: Default values
:file: gotthard.csv
:widths: 35, 35
:header-rows: 1
DACS
^^^^^^^^^^^^^
.. csv-table:: Gotthard DACS
:file: gotthard-dacs.csv
:widths: 35, 35
:header-rows: 1

View File

@ -1,108 +1,36 @@
Default values
==============================================
Detector Servers
=================
Some general intro
Location
---------
slsDetectorPackage/serverBin/ folder in every release.
Mythen3
-------------
.. csv-table:: Default values
:file: mythen3.csv
:widths: 35, 35
:header-rows: 1
.. _Detector Server Arguments:
DACS
^^^^^^^^^^^^^
Arguments
---------
.. csv-table:: Mythen3 DACS
:file: mythen3-dacs.csv
:widths: 35, 35
:header-rows: 1
.. code-block:: bash
Gotthard2
-------------
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
.. csv-table:: Default values
:file: gotthard2.csv
:widths: 35, 35
:header-rows: 1
DACS
^^^^^^^^^^^^^
Basics
------------
.. csv-table:: Gotthard 2 DACS
:file: gotthard2-dacs.csv
:widths: 35, 35
:header-rows: 1
Detector Servers include:
* Control server [default port: 1952]
* Almost all client communication.
* Stop server [default port: 1953]
* Client requests for detector status, stop acquisition, temperature, advanced read/write registers.
Moench
-------------
.. csv-table:: Default values
:file: moench.csv
:widths: 35, 35
:header-rows: 1
DACS
^^^^^^^^^^^^^
.. csv-table:: Moench DACS
:file: moench-dacs.csv
:widths: 35, 35
:header-rows: 1
Ctb
-------------
.. csv-table:: Default values
:file: ctb.csv
:widths: 35, 35
:header-rows: 1
Eiger
-------------
.. csv-table:: Default values
:file: eiger.csv
:widths: 35, 35
:header-rows: 1
DACS
^^^^^^^^^^^^^
.. csv-table:: Eiger DACS
:file: eiger-dacs.csv
:widths: 35, 35
:header-rows: 1
Jungfrau
-------------
.. csv-table:: Default values
:file: jungfrau.csv
:widths: 35, 35
:header-rows: 1
DACS
^^^^^^^^^^^^^
.. csv-table:: Jungfrau DACS
:file: jungfrau-dacs.csv
:widths: 35, 35
:header-rows: 1
Gotthard
-------------
.. csv-table:: Default values
:file: gotthard.csv
:widths: 35, 35
:header-rows: 1
DACS
^^^^^^^^^^^^^
.. csv-table:: Gotthard DACS
:file: gotthard-dacs.csv
:widths: 35, 35
:header-rows: 1
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.

View File

@ -1,11 +1,15 @@
Server Upgrade
=================
Detector Server Upgrade
=======================
Eiger
-------------
**Location:** slsDetectorPackage/serverBin/ folder for every release.
#. Kill old server and copy new server
.. code-block:: bash
@ -34,7 +38,10 @@ Eiger
Jungfrau
-------------
#. Program from console (only from 5.0.0-rc1)
**Location:** slsDetectorPackage/serverBin/ folder for every release.
#. Install tftp and copy detector server binary to tftp folder
#. Program from console (only from 5.0.0-rcx)
.. code-block:: bash
# copies new server from pc tftp folder, respawns and reboots
@ -43,7 +50,11 @@ Jungfrau
Gotthard
---------
#. Program from console (only from 5.0.0-rc1)
**Location:** slsDetectorPackage/serverBin/ folder for every release.
#. Install tftp and copy detector server binary to tftp folder
#. Program from console (only from 5.0.0-rcx)
.. code-block:: bash
# copies new server from pc tftp folder, respawns and reboots
@ -54,7 +65,10 @@ Gotthard
Mythen3
-------
#. Program from console (only from 5.0.0-rc1)
**Location:** slsDetectorPackage/serverBin/ folder for every release.
#. Install tftp and copy detector server binary to tftp folder
#. Program from console (only from 5.0.0-rcx)
.. code-block:: bash
# copies new server from pc tftp folder and reboots (does not respawn)
@ -63,7 +77,11 @@ Mythen3
Gotthard2
----------
#. Program from console (only from 5.0.0-rc1)
**Location:** slsDetectorPackage/serverBin/ folder for every release.
#. Install tftp and copy detector server binary to tftp folder
#. Program from console (only from 5.0.0-rcx)
.. code-block:: bash
# copies new server from pc tftp folder and reboots (does not respawn)
@ -72,7 +90,11 @@ Gotthard2
Moench
------
#. Program from console (only from 5.0.0-rc1)
**Location:** slsDetectorPackage/serverBin/ folder for every release.
#. Install tftp and copy detector server binary to tftp folder
#. Program from console (only from 5.0.0-rcx)
.. code-block:: bash
# copies new server from pc tftp folder, respawns and reboots
@ -81,7 +103,11 @@ Moench
Ctb
---
#. Program from console (only from 5.0.0-rc1)
**Location:** slsDetectorPackage/serverBin/ folder for every release.
#. Install tftp and copy detector server binary to tftp folder
#. Program from console (only from 5.0.0-rcx)
.. code-block:: bash
# copies new server from pc tftp folder, respawns and reboots

View File

@ -0,0 +1,295 @@
Troubleshooting
=================
Common
------
Missing Packets
^^^^^^^^^^^^^^^
Possible causes could be the following:
#. Receiver PC is not tuned for socket buffer size and input packet queue.
* Refer to :ref:`Increase rmem_default, rmem_max and max_backlog<Receiver PC Tuning>`
#. Wiring
* Faulty wiring or connecting cable to incorrect interface.
#. Link up and speed
* Check to see if there is a blue LED on board to signal that the link is up. Check ethtool and find if Link Deteced:Yes and Speed is acceptable (>10k).
#. Detector is not acquiring (Not Eiger)
* Take an acquisition with many images and using the following steps instead of acquire:
.. code-block:: bash
sls_detector_put status start
# keep executing this command to see if the number of frames left keeps decreasing,
# which means the detector is acquiring.
sls_detector_get framesl
.. note ::
If you are using multiple modules, the previous command can return -1 because each module will return different values. Then, check for a single module instead: sls_detector_get 0:framesl
#. Data cable plugged into the wrong interface on board (Jungfrau)
* Please ensure that the data cable is plugged into the rightmost interface. The middle one is disabled for PCB v1.0 and must be selected via command for PCB v2.0.
#. Detector is not sending data
* Check the board to see if the green LED is blinking next to the data cable, which means that the detector is sending data.
#. Firewall or security feature
* A firewall or some security feature could be blocking the reception of data.
#. Ethernet interface not configured properly
* Ensure that the interfaces used are configured properly with the right mask and ip. Eg. use ifconfig and route commands to verify.
#. Ethernet interface not configured for Jumbo frames (10Gb)
* Ensure that the interfaces used in receiver pc have MTU 9000 (jumbo frames) enabled.
#. Detector IP (Not Eiger)
* Ensure it is valid and does not end if 0 or 255. Also ensure that the detector ip is in the same subnet as rx_udpip and the masking in the interface configuration ensures this rule.
#. Tcpdump or wireshark
* Use one of these to confirm that you receive packets (with the right filtering ie. source and destination ports, ip).
#. Check SFP modules
* Check if the SFP modules on both sides of the fiber are of same type.
#. Pinging the subnet (receiving only a few number of packets each time)
* If a switch is used between a receiver pc and detector instead of plugging the cables directly, one might have to ping any ip in the subnet of the Ethernet interface constantly so that it does not forget the ip during operation.
* Eg. if rx_udpip is 10.2.3.100, then ping constantly 10.2.3.xxx, where xxx is any ip other than 100.
.. _Receiver PC Tuning:
Receiver PC Tuning Options
^^^^^^^^^^^^^^^^^^^^^^^^^^
#. Increase maximum receive socket buffer size and socket input packet queue.
* Temporarily (until shut down)
.. code-block:: bash
# check size
sysctl -a | grep rmem
sysctl -a | grep backlog
# set max and default (use 1Gb for Jungfrau and 100Mb for others)
sysctl net.core.rmem_max=$((100*1024*1024))
sysctl net.core.rmem_default=$((100*1024*1024))
sysctl net.core.netdev_max_backlog=250000
* Permanently
.. code-block:: bash
# edit /etc/sysctl.conf file
# set max and default (use 1Gb for Jungfrau and 100Mb for others)
net.core.rmem_max = 104857600
net.core.rmem_default= 104857600
net.core.netdev_max_backlog = 250000
# save file and run the following
sysctl -p
.. note ::
This is the most basic setting, which is sometimes more than enough.
#. For 10Gb,
* MTU must be set up to 9000 for jumbo frames on detector, switch and server NIC
* Set up static MAC address tables with separated VLANs
#. Write to memory if not a large disk and pc not fast enough.
.. code-block:: bash
mount -t tmpfs none /ramdisk_folder
# or
mount -t tmpfs none /mnt/ramdisk -o size=10G
# check how many GB memory you can allocate, to avoid swapping otherwise
#. Modify ethtool settings.
* rx ring parameters
.. code-block:: bash
# check
ethtool -g xth1
# set to max value in your pc settings
ethtool -G xth1 rx 4096
* coalesce settings (might not always work)
.. code-block:: bash
# check
ethtool -c xth1
# set to max value in your pc settings
ethtool -C xth1 rx-usecs 100
* pause parameters
.. code-block:: bash
# check
ethtool -a xth1
# set to max value in your pc settings
ethtool -A xth1 rx on
.. note ::
| xth1 is example interface name.
| These settings are lost at pc reboot.
#. Give user speicific user scheduling privileges.
.. code-block:: bash
# edit /etc/security/limits.conf
# add following line or similar depending on your distribution
username rtprio 99
.. note ::
This is also set if slsReceiver is run as root user.
#. Disable power saving in CPU frequency
.. code-block:: bash
# or similar command depending on your distribution
cpupower frequency-info
cpupower frequency-set -g performance
# or
cpufreq-info
for i in seq 0 7; do cpufreq-set -c $i -g performance; done
slsReceiver Tuning
^^^^^^^^^^^^^^^^^^
#. Starting receiver as root to have scheduling privileges.
#. For 10g, enable flow control
.. code-block:: bash
sls_detector_put flowcontrol10g 1
#. Increase slsReceiver fifo depth between listening and processing threads.
.. code-block:: bash
sls_detector_get rx_fifodepth
# sets number of frames in fifo to 5000
sls_detector_put rx_fifodepth 5000
#. Increase number of frames per file to reduce time taken to open and close files.
.. code-block:: bash
sls_detector_get rx_framesperfile
sls_detector_put rx_framesperfile 20000
# writes all frames into a single file
sls_detector_put rx_framesperfile 0
Shared memory error
^^^^^^^^^^^^^^^^^^^
| For errors due to access or size, delete shared memory files nd try again.
To list all shared memory files of sls detector package.
.. code-block:: bash
ll /dev/shm/slsDetectorPackage*
-rw-------. 1 l_d l_d 136 Oct 1 11:42 /dev/shm/slsDetectorPackage_multi_0
-rw-------. 1 l_d l_d 3476 Oct 1 11:42 /dev/shm/slsDetectorPackage_multi_0_sls_0
-rw-------. 1 l_d l_d 3476 Oct 1 11:42 /dev/shm/slsDetectorPackage_multi_0_sls_1
Cannot connect to detector
^^^^^^^^^^^^^^^^^^^^^^^^^^
Ensure both control and stop servers are running on the detector.
.. code-block:: bash
ps -ef | grep jungfrauDetectorServer*
Cannot connect to receiver
^^^^^^^^^^^^^^^^^^^^^^^^^^
Start receiver before running a client command that needs to communicate with receiver.
Receiver: cannot bind socket
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#. slsReceiver or slsMultiReceiver is already open somewhere.
* Kill it and restart it.
#. Tcp port is in use by another application.
* Start Receiver with a different tcp port and adjust it config file
.. code-block:: bash
# restart receiver with different port
slsReceiver -t1980
# adjust in config file
rx_hostname pcxxxx:1980
.. _common troubleshooting multi module data:
Cannot get multi module data
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Possible causes could be the following:
#. Network
* If you have a direct connection, check to see if the network cables are connected correctly to corresponding interfaces on the PC side. Check also the network configuration and that the detectors and receivers are in the corresponding subnet.
#. Power Supply
* Check power supply current limit.
* For Jungfrau, refer to :ref:`Jungfrau Power Supply Troubleshooting<Jungfrau Troubleshooting Power Supply>`.
Gotthard
----------
Missing first frame or next frame after a delay
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Connect the data link from the Module directly to receiver pc or to a private network.
Jungfrau
---------
Temperature event occured
^^^^^^^^^^^^^^^^^^^^^^^^^
This will occur only if:
* temp_threshold (threshold temperature) has been set to a value
* temp_control (temperature control) set to 1
* and the temperature overshooted the threshold temperature.
**Consequence**
* sls_detector_get temp_event will give 1 # temperature event occured
* the chip will be powered off
**Solution**
* Even after fixing the cooling, any subsequent powerchip command will fail unless the temperature event has been cleared.
* Clear the temperature event
.. code-block:: bash
# gives the current chip power status (zero currently as chip powered off)
sls_detector_get powerchip
# clear temperature event
sls_detector_put temp_event 0
# power on the chip
sls_detector_put powerchip 1
.. _Jungfrau Troubleshooting Power Supply:
Cannot get multi module data
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#. Check :ref:`Common Multi Module Troubleshooting<common troubleshooting multi module data>`
#. Power Supply
* Comment out this line in the config file: powerchip 1
* Powering on the chip increases the power consumption by a considerable amount. If commenting out this line aids in getting data (strange data due to powered off chip), then it could be the power supply current limit. Fix it (possibly to 8A current limit) and uncomment the powerchip line back in config file.

148
docs/src/virtualserver.rst Normal file
View File

@ -0,0 +1,148 @@
.. _Virtual Detector Servers:
Detector Simulators
===================
Compilation
-----------
* Using CMake, turn on the option
.. code-block:: bash
SLS_USE_SIMULATOR=ON
* Using cmk.sh script,
.. code-block:: bash
./cmk.sh -b**s**j9 #option s is for simulator
Binaries
^^^^^^^^
.. code-block:: bash
eigerDetectorServerMaster_virtual
eigerDetectorServerSlaveTop_virtual
eigerDetectorServerSlaveBottom_virtual
jungfrauDetectorServer_virtual
gotthardDetectorServer_virtual
gotthard2DetectorServer_virtual
mythen3DetectorServer_virtual
moenchDetectorServer_virtual
ctbDetectorServer_virtual
Arguments
---------
The arguments are the same as the :ref:`normal server arguments<Detector Server Arguments>`.
When using multiple modules, use different ports for each virtual server.
.. code-block:: bash
# will start control server at port 1912 and stop server at port 1913
jungfrauDetectorServer --port 1912 &
# will start second control server at port 1914 and stop server at port 1915
jungfrauDetectorServer --port 1914 &
Client
------
.. code-block:: bash
# hostname should include the port (if not default)
sls_detector_put hostname localhost:1912+localhost:1914+
# or use virtual command, instead of hostname
# connects to 2 servers at localhost
# (control servers: 1912, 1914; stop servers: 1913, 1915)
sls_detector_put virtual 2 1912
Use the same in the config file.
Sample Config file
^^^^^^^^^^^^^^^^^^
There are sample config files for each detector in slsDetectorPackage/examples folder.
For a Single Module
.. code-block:: bash
# connects to control port 1912
hostname localhost:1912+
# connects to receiver at ports 2012
rx_hostname mpc1922:2012+
# sets destination udp ports (not needed, default is 50001)
udp_dstport 50012
# source udp ips must be same subnet at destintaion udp ips
udp_srcip 192.168.1.112
# destination udp ip picked up from rx_hostname (if auto)
udp_dstip auto
# set file path
fpath /tmp
For Multiple Modules
.. code-block:: bash
# connects to control ports 1912, 1914 and stop ports 1913, 1915
virtual 2 1912
# or hostname localhost:1912+localhost:1914+
# connects to receivers at ports 2012 and 2014
rx_hostname mpc1922:2012+mpc1922:2013+
# sets differernt destination udp ports
0:udp_dstport 50012
1:udp_dstport 50014
# source udp ips must be same subnet at destintaion udp ips
0:udp_srcip 192.168.1.112
1:udp_srcip 192.168.1.114
# destination udp ip picked up from rx_hostname (if auto)
udp_dstip auto
# set file path
fpath /tmp
Receivers
----------
Same as if you would use an actual detector
For a Single Module
.. code-block:: bash
slsReceiver -t2012
For Multiple Modules
.. code-block:: bash
# slsMultiReceiver [starting port] [number of receivers] [print each frame header for debugging]
slsMultiReceiver 2012 2 0
Gui
----
| Same as if you would use an actual detector.
| Compile with SLS_USE_GUI=ON in cmake or -g option in cmk.sh script.
.. code-block:: bash
slsDetectorGui
Limitations
-----------
#. Data coming out of virtual server is fake. Value at each pixel/ channel is incremented by 1.
#. A stop will stop the virtual acquisition only at the start of every new frame.
#. Triggers are counted as number of virtual frames. trigger command to send a software trigger (Mythen3 & Eiger) is not implemented in virtual server.
#. firmware version and serial number will give 0.

View File

@ -1,33 +1,37 @@
detsizechan 1024 512
#detetctor geometry, long side of the module first
# detetctor geometry, long side of the module first
detsize 1024 512
# detector hostname for controls
hostname beb059+beb058+
#1Gb detector hostname for controls
0:rx_tcpport 1991
#tcpport for the first halfmodule
0:rx_udpport 50011
#udp port first quadrant, first halfmodule
0:rx_udpport2 50012
#udp port second quadrant, first halfmodule
0:rx_udpip 10.0.30.210
#udp IP of the receiver over 10Gb
0:detectorip 10.0.30.100
#first half module 10 Gb IP
# 1Gb receiver pc hostname with tcp port to configure receiver
rx_hostname x12sa-vcons:1991+x12sa-vcons:1992
1:rx_tcpport 1992
#tcpport for the second halfmodule
1:rx_udpport 50013
#udp port first quadrant, second halfmodule
1:rx_udpport2 50014
#udp port second quadrant, second halfmodule
1:rx_udpip 10.0.40.210
#udp IP of the receiver over 10Gb,
#can be the same or different from 0:rx_udpip
1:detectorip 10.0.40.101
#second half module 10 Gb IP
# udp port first quadrant, first halfmodule
0:udp_dstport 50011
rx_hostname x12sa-vcons
#1Gb receiver pc hostname
# udp port second quadrant, first halfmodule
0:udp_dstport2 50012
outdir /sls/X12SA/data/x12saop/Data10/Eiger0.5M
threaded 1
# udp IP of the receiver over 10Gb
0:udp_dstip 10.0.30.210
# first half module 10 Gb IP (same subnet as 0:udp_dstip)
0:udp_srcip 10.0.30.100
# udp port first quadrant, second halfmodule
1:udp_dstport 50013
# udp port second quadrant, second halfmodule
1:udp_dstport2 50014
# udp IP of the receiver over 10Gb,
1:udp_dstip 10.0.40.210
# second half module 10 Gb IP
# can be the same or different from 0:rx_udpip
# butsame subnet as 1:udp_dstip
1:udp_srcip 10.0.40.101
# output directory
fpath /sls/X12SA/data/x12saop/Data10/Eiger0.5M

View File

@ -1,24 +1,21 @@
detsizechan 1024 512
#detetctor geometry, long side of the module first
# detetctor geometry, long side of the module first
detsize 1024 512
# detector hostname for controls
hostname beb059+beb058+
#1Gb detector hostname for controls
0:rx_tcpport 1991
#tcpport for the first halfmodule
0:rx_udpport 50011
#udp port first quadrant, first halfmodule
0:rx_udpport2 50012
# 1Gb receiver pc hostname with tcp port to configure receiver
rx_hostname x12sa-vcons:1991+x12sa-vcons:1992
# udp port first quadrant, first halfmodule
0:udp_dstport 50011
#udp port second quadrant, first halfmodule
0:udp_dstport2 50012
1:rx_tcpport 1992
#tcpport for the second halfmodule
1:rx_udpport 50013
#udp port first quadrant, second halfmodule
1:rx_udpport2 50014
#udp port second quadrant, second halfmodule
# udp port first quadrant, second halfmodule
1:udp_dstport 50013
# udp port second quadrant, second halfmodule
1:udp_dstport2 50014
rx_hostname x12sa-vcons
#1Gb receiver pc hostname
outdir /sls/X12SA/data/x12saop/Data10/Eiger0.5M
threaded 1
# output directory
fpath /sls/X12SA/data/x12saop/Data10/Eiger0.5M

View File

@ -1,27 +1,12 @@
# detector hostname
hostname bchip007
#0:port 1952
#0:stopport 1953
#0:rx_tcpport 1956 must also have this in receiver config file
0:angdir 1.000000
0:moveflag 0.000000
0:extsig:0 off
#0:detectorip 129.129.202.9
0:detectormac 00:aa:bb:cc:dd:ee
0:rx_udpport 50004
0:rx_udpip 129.129.202.98
0:rx_hostname pc6898
0:outdir /bigRAID/datadir_gotthard/rec_test_data
0:highvoltage 120
master -1
sync none
outdir /bigRAID/datadir_gotthard/rec_test_data
headerbefore none
headerafter none
headerbeforepar none
headerafterpar none
badchannels none
angconv none
globaloff 0.000000
binsize 0.001000
# receiver pc hostname of 1Gb IP of the machine
rx_hostname my_receiver_hostname
# output directory
fpath /bigRAID/datadir_gotthard/rec_test_data
# high voltage
highvoltage 120

View File

@ -1,29 +1,34 @@
# detector hostname
hostname strip3
# receiver pc hostname with tcp port
rx_hostname pc12365:1982
# udp source ip
udp_srcip 10.1.1.184
# udp destination ip (receiver interface ip)
udp_dstip 10.1.1.107
# only needed for debugging veto signals
# udp destination port must be different from udp_dstport (default of 50001)
udp_dstport2 50084
udp_srcip2 10.1.1.185
udp_dstip2 10.1.1.107
rx_hostname pc12365:1954
#udp_dstmac 3c:fd:fe:d2:a4:25
# output directory
fpath /tmp
fname run
# disable file writing
fwrite 0
bursts 10
frames 2700
burstperiod 100ms
# to enable 2nd interface for veto debugging
numinterfaces 2
# enable veto data streaming
veto 1
#fixing data looks
# Sampling pipeline 1 clk
reg 0x120 0x00000010
clkphase 1 135 deg

View File

@ -1,32 +0,0 @@
fname run
index 0
dr 16
settings veryhighgain
threshold 0
exptime 0.000002990
period 0.000024984
delay 0.999999968
gates 1
frames 300000.000000000
triggers 1.000000000
timing auto
fineoff 0.000000
startscript none
startscriptpar none
stopscript none
stopscriptpar none
scriptbefore none
scriptbeforepar none
scriptafter none
scriptafterpar none
scan0script none
scan0par none
scan0prec 0
scan0steps 0
scan1script none
scan1par none
scan1prec 0
scan1steps 0
ratecorr 0.000000
flatfield none
badchannels none

View File

@ -1,17 +1,17 @@
detsizechan 2560 1
# detector hostname
hostname bchip074+bchip075+
# receiver pc hostname of 1Gb IP of the machine (with tcpport)
rx_hostname my_receiver_hostname+my_receiver_hostname:1955
0:extsig:0 trigger_in_rising_edge
0:rx_tcpport 1954
0:rx_udpport 50001
0:highvoltage 0
# default udp destination port 50001
1:udp_dstport 50002
1:extsig:0 trigger_in_rising_edge
1:rx_tcpport 1955
1:rx_udpport 50002
1:highvoltage 0
# output directory
fpath /tmp
extsig 0 trigger_in_rising_edge
highvoltage 0
##############################################################################
#########
@ -19,39 +19,27 @@ hostname bchip074+bchip075+
#########
##############################################################################
# #replace my_receiver_hostname with the hostname of IP of the machine where the receiver runs
#0:rx_zmqip my_receiver_hostname
#0:rx_zmqport 30003
# #replace my_client_hostname with the hostname of IP of the machine where the client/GUI or softIOC runs
#0:zmqip my_client_hostname
#0:zmqport 40003
## receiver pc hostname of 1Gb IP of the machine
#rx_zmqip my_receiver_hostname
## client/gui or softIOc pc hostname
#zmqip my_client_hostname
# #replace my_receiver_hostname with the hostname of IP of the machine where the receiver runs
#1:rx_zmqip my_receiver_hostname
## rxr zmq streaming out port
#0:rx_zmqport 30003
## client zmq listening port
#0:zmqport 40003
## rxr zmq streaming out port
#1:rx_zmqport 30004
# #replace my_client_hostname with the hostname of IP of the machine where the client/GUI or softIOC runs
#1:zmqip my_client_hostname
## client zmq listening port
#1:zmqport 40004
## stream out every frame via zmq
#rx_zmqfreq 1
## enable zmq streaming
#rx_zmqstream 1
##############################################################################
#########
######### until here
#########
##############################################################################
r_readfreq 1
rx_zmqstream 1
#replace my_receiver_hostname with the hostname of 1Gb IP of the machine where the receiver runs
rx_hostname my_receiver_hostname
rx_zmqstream 1
outdir /tmp/
settings veryhighgain
exptime 0.000005
period 0.0001
highvoltage 90

View File

@ -8,8 +8,6 @@ adcclk 20
dbitclk 40
patword 0000 0000000000000000
patword 0001 0000000000000000
patword 0002 0008000900080000
@ -424,21 +422,24 @@ patwaittime1 0
patwait2 0400
patwaittime2 0
#0:rx_tcpport 1977
#############################################
### edit with hostname or 1Gbs IP address of your server
############################################
rx_hostname mpc2011
#rx_hostname mpc2011:1977
#############################################
### edit with 10 Gbs IP of your server
############################################
0:udp_dstip 10.1.1.102
#0:udp_dstip 129.129.202.136
udp_dstip 10.1.1.102
#udp_dstip 129.129.202.136
#############################################
### edit with any number in the subnet of your server (first 3 numbers as above)
############################################
0:udp_srcip 10.1.1.19
#0:udp_srcip 129.129.202.13
udp_srcip 10.1.1.19
#udp_srcip 129.129.202.13
0:udp_dstport 33410
udp_dstport 33410
#############################################
### edit with 10 Gbs IP of your server
############################################
@ -452,13 +453,7 @@ patwaittime2 0
#zmqport 50001
#############################################
### edit with hostname or 1Gbs IP address of your server
############################################
rx_hostname mpc2011
tengiga 1
rx_zmqstream 1
rx_zmqfreq 1
@ -496,6 +491,5 @@ rx_jsonpara detectorMode analog
#flags newpedestal
#flags analog
reg 0x5e 0x00010000
#powerchip 1
powerchip 1
highvoltage 90

View File

@ -1,16 +1,41 @@
hostname localhost
# detector hostname
hostname bchip052
0:rx_udpport 50004
0:rx_udpip 172.24.8.84
0:detectorip 172.24.8.254
rx_hostname localhost
# 1Gb receiver pc hostname (default tcpport: 1954)
rx_hostname pcmoench01
#powerchip 1
#highvoltage 200
# udp destination port (receiver)
udp_dstport 50004
#extsig:0 trigger_in_rising_edge
#timing trigger
# udp destination ip (receiver)
#udp_dstip 172.24.8.84
# or to get ip from rx_hostname
udp_dstip auto
outdir /tmp/slsdetector
# udp source ip (same subnet as udp_dstip)
udp_srcip 172.24.8.254
# PCBv2.0 (using 2 interfaces)
udp_dstport2 50005
udp_dstip2 auto
udp_srcip2 172.24.8.111
# enable two interfaces
numinterfaces 2
# select inner interface(effective only when numinterfaces is 1)
#selinterface 1
# power on chip
powerchip 1
# high voltage
highvoltage 200
# timing to trigger
timing trigger
# output file directory
fpath /external_pool/jungfrau_data/softwaretest
# disable file writing
fwrite 0

View File

@ -1,26 +1,49 @@
detsizechan 1024 1024
# detector geometry x, y
detsize 1024 1024
# detector hostname
hostname bchip048+bchip052+
0:rx_udpport 50004
0:rx_udpip 10.1.1.100
0:rx_udpmac F4:52:14:2F:32:00
0:detectorip 10.1.1.10
0:detectormac 00:aa:bb:cc:dd:33
# 1Gb receiver pc hostname (default tcpport: 1954)
rx_hostname pcmoench01+pcmoench01:1955
1:rx_tcpport 1955
1:rx_udpport 50005
1:rx_udpip 10.1.1.100
1:rx_udpmac F4:52:14:2F:32:00
1:detectorip 10.1.1.11
1:detectormac 00:aa:bb:cc:dd:33
rx_hostname pcmoench01
# udp configurations for 1st module
# udp destination port (receiver)
0:udp_dstport 50004
# udp destination ip (receiver)
0:udp_dstip 10.1.1.100
# udp source ip (same subnet as 0:udp_dstip)
0:udp_srcip 10.1.1.10
# udp configurations for 2nd module
# udp destination port (receiver)
1:udp_dstport 50005
# udp destination ip (receiver)
1:udp_dstip 10.1.1.100
# udp source ip (same subnet as 1:udp_dstip)
1:udp_srcip 10.1.1.11
# power on chip
powerchip 1
# high voltage
highvoltage 200
#extsig:0 trigger_in_rising_edge
#timing trigger
outdir /external_pool/jungfrau_data/softwaretest
# timing to trigger
timing trigger
# output file directory
fpath /external_pool/jungfrau_data/softwaretest
# disable file writing
fwrite 0

32
examples/measurement_setup.det Executable file
View File

@ -0,0 +1,32 @@
# file name prefix
fname measurement1
# file acquisition index
findex 3000
# dynamic range (only for Mythen3 and Eiger)
dr 32
# settings
settings veryhighgain
# exposure time
exptime 100us
# period
period 2ms
# frames per trigger
frames 30000
# timing mode
timing trigger
# triggers
triggers 10
# delay after trigger
delay 1ms

View File

@ -9,7 +9,6 @@ hostname bchip181+
############################################
rx_hostname mpc2011
rx_tcpport 1954
#############################################
### edit with 10 Gbs IP of your server
############################################
@ -33,7 +32,6 @@ zmqport 50001
tengiga 1
rx_zmqstream 1
@ -41,12 +39,13 @@ rx_zmqstream 1
frames 100000
period 0.0006
#############################################
### edit with directory you want to write to
############################################
fpath /mnt/moench_data/scratch/
fwrite 0
rx_zmqstream 1
rx_jsonpara frameMode frame
rx_jsonpara detectorMode counting

View File

@ -1,55 +0,0 @@
#####Any line with a # is not read######
detsizechan 2560 1
hostname bchip007+bchip009+
#0:hostname bchip007
#0:port 1952
#0:stopport 1953
#0:rx_tcpport 1956
0:angdir 1.000000
0:moveflag 0.000000
0:ffdir /home/l_msdetect
0:extsig:0 off
0:detectorip 10.1.1.2
#0:detectormac 00:aa:bb:cc:dd:ee
#0:rx_udpport 50001
0:rx_udpip 10.1.1.1
0:rx_hostname 129.129.202.134
0:outdir /data/speedt
0:highvoltage 120
#1:hostname bchip009
#1:port 1952
#1:stopport 1953
1:rx_tcpport 1957
1:angdir 1.000000
1:moveflag 0.000000
1:ffdir /home/l_msdetect
1:extsig:0 off
1:detectorip 10.1.2.2
#1:detectormac 00:aa:bb:cc:dd:ee
1:rx_udpport 50004
1:rx_udpip 10.1.2.1
1:rx_hostname 129.129.202.134
1:outdir /data/speedt
1:highvoltage 120
master -1
sync none
outdir /data/speedt
ffdir /home/l_msdetect
headerbefore none
headerafter none
headerbeforepar none
headerafterpar none
badchannels none
angconv none
globaloff 0.000000
binsize 0.001000

View File

@ -0,0 +1,477 @@
# detector hostname
hostname localhost:1910
# receiver hostname
rx_hostname mpc1922:2010
# udp destination ports
udp_dstport 50010
# udp destination ip from rx_hostname
udp_dstip auto
# udp source ip (same subnet as udp_dstip)
udp_srcip 192.168.1.100
# output file directory
fpath /tmp
# disable file writing
fwrite 0
# default clocks
runclk 40
adcclk 20
dbitclk 40
# patterns
patword 0x0000 0x0000000000000000
patword 0x0001 0x0000000000000000
patword 0x0002 0x0008000900080000
patword 0x0003 0x0008000900080000
patword 0x0004 0x0008000900080000
patword 0x0005 0x0008000900080000
patword 0x0006 0x0008000900080000
patword 0x0007 0x0008000900080000
patword 0x0008 0x0008000900080000
patword 0x0009 0x0008000900080000
patword 0x000a 0x0008000900080000
patword 0x000b 0x0008000900080000
patword 0x000c 0x0008000900080000
patword 0x000d 0x0008000900080000
patword 0x000e 0x0008000900080000
patword 0x000f 0x0008000900080000
patword 0x0010 0x0008000900080000
patword 0x0011 0x0008000900080000
patword 0x0012 0x0008000900080000
patword 0x0013 0x0008000900080000
patword 0x0014 0x0008000900080000
patword 0x0015 0x0008000900080000
patword 0x0016 0x0008400900080020
patword 0x0017 0x0008400900080020
patword 0x0018 0x0008599f0418503a
patword 0x0019 0x0008599f0418503a
patword 0x001a 0x0108599f0418503a
patword 0x001b 0x0108599f0418503a
patword 0x001c 0x0108599f0418503a
patword 0x001d 0x0108599f0418503a
patword 0x001e 0x0108599f0418503a
patword 0x001f 0x0108599f0418503a
patword 0x0020 0x0108599f0418503a
patword 0x0021 0x0108599f0418503a
patword 0x0022 0x0108599f0418503a
patword 0x0023 0x0108599f0418503a
patword 0x0024 0x0108599f0418503a
patword 0x0025 0x0108599f0418503a
patword 0x0026 0x0108599f0418503a
patword 0x0027 0x0108599f0418503a
patword 0x0028 0x0108599f0418503a
patword 0x0029 0x0108599f0418503a
patword 0x002a 0x0108599f0418503a
patword 0x002b 0x0108599f0418503a
patword 0x002c 0x0108599f0418503a
patword 0x002d 0x0108599f0418503a
patword 0x002e 0x0108599f0418503a
patword 0x002f 0x0108599f0418503a
patword 0x0030 0x0108599f0418503a
patword 0x0031 0x0108599f0418503a
patword 0x0032 0x0108599f0418503a
patword 0x0033 0x0108599f0418503a
patword 0x0034 0x0108599f0418503a
patword 0x0035 0x0108599f0418503a
patword 0x0036 0x0108599f0418503a
patword 0x0037 0x0108599f0418503a
patword 0x0038 0x0108599f0418503a
patword 0x0039 0x0108599f0418503a
patword 0x003a 0x0108599f0418503a
patword 0x003b 0x0108599f0418503a
patword 0x003c 0x0108599f0418503a
patword 0x003d 0x0108599f0418503a
patword 0x003e 0x0108599f0418503a
patword 0x003f 0x0108599f0418503a
patword 0x0040 0x0108599f0418503a
patword 0x0041 0x0108599f0418503a
patword 0x0042 0x0108599f0418503a
patword 0x0043 0x0108599f0418503a
patword 0x0044 0x0108599f0418503a
patword 0x0045 0x0108599f0418503a
patword 0x0046 0x0108599f0418503a
patword 0x0047 0x0108599f0418503a
patword 0x0048 0x0108599f0418503a
patword 0x0049 0x0108599f0418503a
patword 0x004a 0x0108599f0418503a
patword 0x004b 0x0108599f0418503a
patword 0x004c 0x0108599f0418503a
patword 0x004d 0x0108599f0418503a
patword 0x004e 0x0108599f0418503a
patword 0x004f 0x0108599f0418503a
patword 0x0050 0x0108599f0418503a
patword 0x0051 0x0108599f0418503a
patword 0x0052 0x0108599f0418503a
patword 0x0053 0x0108599f0418503a
patword 0x0054 0x0108599f0418503a
patword 0x0055 0x0108599f0418503a
patword 0x0056 0x0108599f0418503a
patword 0x0057 0x0108599f0418503a
patword 0x0058 0x0108599f0418503a
patword 0x0059 0x0108599f0418503a
patword 0x005a 0x0108599f0418503a
patword 0x005b 0x0108599f0418503a
patword 0x005c 0x0108599f0418503a
patword 0x005d 0x0108599f0418503a
patword 0x005e 0x0108599f0418503a
patword 0x005f 0x0108599f0418503a
patword 0x0060 0x0108599f0418503a
patword 0x0061 0x0108599f0418503a
patword 0x0062 0x0108599f0418503a
patword 0x0063 0x0108599f0418503a
patword 0x0064 0x0108599f0418503a
patword 0x0065 0x0108599f0418503a
patword 0x0066 0x0108599f0418503a
patword 0x0067 0x0108599f0418503a
patword 0x0068 0x0108599f0418503a
patword 0x0069 0x0108599f0418503a
patword 0x006a 0x0108599f0418503a
patword 0x006b 0x0108599f0418503a
patword 0x006c 0x0108599f0418503a
patword 0x006d 0x0108599f0418503a
patword 0x006e 0x0108599f0418503a
patword 0x006f 0x0108599f0418503a
patword 0x0070 0x0108599f0418503a
patword 0x0071 0x0108599f0418503a
patword 0x0072 0x0108599f0418503a
patword 0x0073 0x0108599f0418503a
patword 0x0074 0x0108599f0418503a
patword 0x0075 0x0108599f0418503a
patword 0x0076 0x0108599f0418503a
patword 0x0077 0x0108599f0418503a
patword 0x0078 0x0108599f0418503a
patword 0x0079 0x0108599f0418503a
patword 0x007a 0x0108599f0418503a
patword 0x007b 0x0108599f0418503a
patword 0x007c 0x0108599f0418503a
patword 0x007d 0x0108599f0418503a
patword 0x007e 0x010859960418503a
patword 0x007f 0x010859960418503a
patword 0x0080 0x010859960418503a
patword 0x0081 0x010859960418503a
patword 0x0082 0x010859960418503a
patword 0x0083 0x010859960418503a
patword 0x0084 0x010859960418503a
patword 0x0085 0x010859960418503a
patword 0x0086 0x010859960418503a
patword 0x0087 0x010859960418503a
patword 0x0088 0x010859960418503a
patword 0x0089 0x010859960418503a
patword 0x008a 0x010859960418503a
patword 0x008b 0x010859960418503a
patword 0x008c 0x010859960418503a
patword 0x008d 0x010859960418503a
patword 0x008e 0x010859960418503a
patword 0x008f 0x010859960418503a
patword 0x0090 0x010859960418503a
patword 0x0091 0x010859960418503a
patword 0x0092 0x010819960418501a
patword 0x0093 0x010819960418501a
patword 0x0094 0x010819960418501a
patword 0x0095 0x010819960418501a
patword 0x0096 0x030819960418501a
patword 0x0097 0x030819960418501a
patword 0x0098 0x030819960418501a
patword 0x0099 0x030819960418501a
patword 0x009a 0x030819960418501a
patword 0x009b 0x030819960418501a
patword 0x009c 0x030819960418501a
patword 0x009d 0x030819960418501a
patword 0x009e 0x030819960418501a
patword 0x009f 0x030819960418501a
patword 0x00a0 0x030819960418501a
patword 0x00a1 0x030819960418501a
patword 0x00a2 0x030819960418501a
patword 0x00a3 0x030819960418501a
patword 0x00a4 0x030819960418501a
patword 0x00a5 0x030819960418501a
patword 0x00a6 0x030819960418501a
patword 0x00a7 0x030819960418501a
patword 0x00a8 0x030819960418501a
patword 0x00a9 0x030819960418501a
patword 0x00aa 0x030819960418501a
patword 0x00ab 0x030819960418501a
patword 0x00ac 0x030819960008501a
patword 0x00ad 0x030819960008501a
patword 0x00ae 0x030819960008501a
patword 0x00af 0x030819960008501a
patword 0x00b0 0x030819960008501a
patword 0x00b1 0x030819960008501a
patword 0x00b2 0x030819960008501a
patword 0x00b3 0x030819960008501a
patword 0x00b4 0x030819960008501a
patword 0x00b5 0x030819960008501a
patword 0x00b6 0x030819960008501a
patword 0x00b7 0x030819960008501a
patword 0x00b8 0x030819960008501a
patword 0x00b9 0x030819960008501a
patword 0x00ba 0x030819960008501a
patword 0x00bb 0x030819960008501a
patword 0x00bc 0x030819960008501a
patword 0x00bd 0x030819960008501a
patword 0x00be 0x030819960008501a
patword 0x00bf 0x030819960008501a
patword 0x00c0 0x0308199f0008501a
patword 0x00c1 0x0308199f0008501a
patword 0x00c2 0x0308199f0008501a
patword 0x00c3 0x0308199f0008501a
patword 0x00c4 0x0308199f0008501a
patword 0x00c5 0x0308199f0008501a
patword 0x00c6 0x0308199f0008501a
patword 0x00c7 0x0308199f0008501a
patword 0x00c8 0x0308199f0008501a
patword 0x00c9 0x0308199f0008501a
patword 0x00ca 0x0308199f0008501a
patword 0x00cb 0x0308199f0008501a
patword 0x00cc 0x0308199f0008501a
patword 0x00cd 0x0308199f0008501a
patword 0x00ce 0x0308199f0008501a
patword 0x00cf 0x0308199f0008501a
patword 0x00d0 0x0308199f0008501a
patword 0x00d1 0x0308199f0008501a
patword 0x00d2 0x0308199f0008501a
patword 0x00d3 0x0308199f0008501a
patword 0x00d4 0x0308599f0008503a
patword 0x00d5 0x0308599f0008503a
patword 0x00d6 0x030c599f000850ba
patword 0x00d7 0x030c599f000850ba
patword 0x00d8 0x030c599f000850ba
patword 0x00d9 0x030c599f000850ba
patword 0x00da 0x030c599f000850ba
patword 0x00db 0x030c599f000850ba
patword 0x00dc 0x030c599f000850ba
patword 0x00dd 0x030c599f000850ba
patword 0x00de 0x030c599f000850ba
patword 0x00df 0x030c599f000850ba
patword 0x00e0 0x030c599f000850ba
patword 0x00e1 0x030c599f000850ba
patword 0x00e2 0x030c599f000850ba
patword 0x00e3 0x030c599f000850ba
patword 0x00e4 0x030c599f000850ba
patword 0x00e5 0x030c599f000850ba
patword 0x00e6 0x030c599f000850ba
patword 0x00e7 0x030c599f000850ba
patword 0x00e8 0x030c599f000850ba
patword 0x00e9 0x030c599f000850ba
patword 0x00ea 0x030c799f010858ba
patword 0x00eb 0x030c799f010858ba
patword 0x00ec 0x030c599f000850ba
patword 0x00ed 0x030c599f000850ba
patword 0x00ee 0x030c599f000850ba
patword 0x00ef 0x030c599f000850ba
patword 0x00f0 0x030c599f000850ba
patword 0x00f1 0x030c599f000850ba
patword 0x00f2 0x030c599f000850ba
patword 0x00f3 0x030c599f000850ba
patword 0x00f4 0x030c599f000850ba
patword 0x00f5 0x030c599f000850ba
patword 0x00f6 0x030c599f000850ba
patword 0x00f7 0x030c599f000850ba
patword 0x00f8 0x030c599f000850ba
patword 0x00f9 0x030c599f000850ba
patword 0x00fa 0x030c599f000850ba
patword 0x00fb 0x030c599f000850ba
patword 0x00fc 0x030c599f000850ba
patword 0x00fd 0x030c599f000850ba
patword 0x00fe 0x030c599f000850ba
patword 0x00ff 0x030c599f000850ba
patword 0x0100 0x030c599f000850ba
patword 0x0101 0x030c599f000850ba
patword 0x0102 0x030c599f400850ba
patword 0x0103 0x030c599f400850ba
patword 0x0104 0x030c599f600850ba
patword 0x0105 0x030c599f400850ba
patword 0x0106 0x030c599f400850ba
patword 0x0107 0x030c599f400850ba
patword 0x0108 0x870c599f682e50ba
patword 0x0109 0x870c599f482850ba
patword 0x010a 0x870c599f000e50ba
patword 0x010b 0x870c599f000850ba
patword 0x010c 0x870c599f000e50ba
patword 0x010d 0x870c599f000850ba
patword 0x010e 0x870c599f000e50ba
patword 0x010f 0x870c599f000850ba
patword 0x0110 0x870c599f000e50ba
patword 0x0111 0x870c599f000850ba
patword 0x0112 0x870c599f000e50ba
patword 0x0113 0x870c599f000850ba
patword 0x0114 0x870c599f000e50ba
patword 0x0115 0x870c599f000850ba
patword 0x0116 0x870c599f000e50ba
patword 0x0117 0x870c599f000850ba
patword 0x0118 0x870c599f000e50ba
patword 0x0119 0x870c599f000850ba
patword 0x011a 0x870c599f000e50ba
patword 0x011b 0x870c599f000850ba
patword 0x011c 0x870c599f000e50ba
patword 0x011d 0x870c599f000850ba
patword 0x011e 0x870c599f000e50ba
patword 0x011f 0x870c599f000850ba
patword 0x0120 0x870c599f000e50ba
patword 0x0121 0x870c599f000850ba
patword 0x0122 0x870c599f200e50ba
patword 0x0123 0x870c599f000850ba
patword 0x0124 0x870c599f000e50ba
patword 0x0125 0x870c599f000850ba
patword 0x0126 0x870c599f000e50ba
patword 0x0127 0x870c599f000850ba
patword 0x0128 0x870c599f000e50ba
patword 0x0129 0x870c599f000850ba
patword 0x012a 0x870c599f000e50ba
patword 0x012b 0x870c599f000850ba
patword 0x012c 0x870c599f000e50ba
patword 0x012d 0x870c599f000850ba
patword 0x012e 0x870c599f000e50ba
patword 0x012f 0x870c599f000850ba
patword 0x0130 0x870c599f000e50ba
patword 0x0131 0x870c599f000850ba
patword 0x0132 0x870c599f000e50ba
patword 0x0133 0x870c599f000850ba
patword 0x0134 0x870c599f000e50ba
patword 0x0135 0x870c599f000850ba
patword 0x0136 0x870c599f000e50ba
patword 0x0137 0x870c599f000850ba
patword 0x0138 0x870c599f000e50ba
patword 0x0139 0x870c599f000850ba
patword 0x013a 0x870c599f282e50ba
patword 0x013b 0x870c599f082850ba
patword 0x013c 0x870c599f000e50ba
patword 0x013d 0x870c599f000850ba
patword 0x013e 0x870c599f000e50ba
patword 0x013f 0x870c599f000850ba
patword 0x0140 0x870c599f000e50ba
patword 0x0141 0x870c599f000850ba
patword 0x0142 0x870c599f000e50ba
patword 0x0143 0x870c599f000850ba
patword 0x0144 0x870c599f000e50ba
patword 0x0145 0x870c599f000850ba
patword 0x0146 0x870c599f000e50ba
patword 0x0147 0x870c599f000850ba
patword 0x0148 0x870c599f000e50ba
patword 0x0149 0x870c599f000850ba
patword 0x014a 0x870c599f000e50ba
patword 0x014b 0x870c599f000850ba
patword 0x014c 0x870c599f000e50ba
patword 0x014d 0x870c599f000850ba
patword 0x014e 0x870c599f000e50ba
patword 0x014f 0x870c599f000850ba
patword 0x0150 0x870c599f000e50ba
patword 0x0151 0x870c599f000850ba
patword 0x0152 0x870c599f000e50ba
patword 0x0153 0x870c599f000850ba
patword 0x0154 0x870c599f200e50ba
patword 0x0155 0x870c599f000850ba
patword 0x0156 0x870c599f000e50ba
patword 0x0157 0x870c599f000850ba
patword 0x0158 0x870c599f000e50ba
patword 0x0159 0x870c599f000850ba
patword 0x015a 0x870c599f000e50ba
patword 0x015b 0x870c599f000850ba
patword 0x015c 0x870c599f000e50ba
patword 0x015d 0x870c599f000850ba
patword 0x015e 0x870c599f000e50ba
patword 0x015f 0x870c599f000850ba
patword 0x0160 0x870c599f000e50ba
patword 0x0161 0x870c599f000850ba
patword 0x0162 0x870c599f000e50ba
patword 0x0163 0x870c599f000850ba
patword 0x0164 0x870c599f000e50ba
patword 0x0165 0x870c599f000850ba
patword 0x0166 0x870c599f000e50ba
patword 0x0167 0x870c599f000850ba
patword 0x0168 0x870c599f000e50ba
patword 0x0169 0x870c599f000850ba
patword 0x016a 0x870c599f000e50ba
patword 0x016b 0x870c599f000850ba
patword 0x016c 0x070c599f000850ba
patword 0x016d 0x070c599f000850ba
patword 0x016e 0x000c599f000850ba
patword 0x016f 0x000c599f000850ba
patword 0x0170 0x0008599f200e503a
patword 0x0171 0x0008599f0008503a
patword 0x0172 0x0008599f200e503a
patword 0x0173 0x0008599f0008503a
patword 0x0174 0x0008599f0008503a
patword 0x0175 0x0008599f0008503a
patword 0x0176 0x0008599f0008503a
patword 0x0177 0x0008599f0008503a
patword 0x0178 0x0008599f0008503a
patword 0x0179 0x0008599f0008503a
patword 0x017a 0x0008599f0008503a
patword 0x017b 0x0008599f0008503a
patword 0x017c 0x0008599f0008503a
patword 0x017d 0x0008599f0008503a
patword 0x017e 0x0008599f0008503a
patword 0x017f 0x0008599f0008503a
patword 0x0180 0x0008599f0008503a
patword 0x0181 0x0008599f0008503a
patword 0x0182 0x0008599f0008503a
patword 0x0183 0x0008599f0008503a
patword 0x0184 0x0008599f0008503a
patword 0x0185 0x0008599f0008503a
patword 0x0186 0x0008599f0008503a
patword 0x0187 0x0008599f0008503a
patword 0x0188 0x0008599f0008503a
patword 0x0189 0x0008599f0008503a
patword 0x018a 0x0008599f0008503a
patword 0x018b 0x0008599f0008503a
patword 0x018c 0x0008599f0008503a
patword 0x018d 0x0008599f0008503a
patioctrl 0x8f0effff6dbffdbf
patlimits 0x0000 0x018c
patloop0 0x013a 0x016b
patnloop0 0x199
patloop1 0x0400 0x0400
patnloop1 0
patloop2 0x0400 0x0400
patnloop2 0
patwait0 0x00aa
patwaittime0 10000
patwait1 0x0400
patwaittime1 0
patwait2 0x0400
patwaittime2 0
# dacs
dac 6 800
dac 0 1300
dac 4 1428
dac 1 1000
dac 7 900
dac 3 680
dac 2 1400
dac 5 1200
adcinvert 4a342593
# analog samples
asamples 5000
# digital samples
dsamples 0
# adc phase
adcphase 30 deg
# adc pipeline
adcpipeline 14
# analog readout
romode analog
# frames
frames 1
# period
period 1ms

View File

@ -0,0 +1,22 @@
# detector hostname
hostname localhost:1900
# receiver hostname
rx_hostname mpc1922:2000
# udp destination ports
udp_dstport 50000
udp_dstport2 50001
# udp destination ip from rx_hostname
udp_dstip auto
# output file directory
fpath /tmp
# disable file writing
fwrite 0
#imagetest 1

View File

@ -0,0 +1,23 @@
# detector hostname
hostname localhost:1900+localhost:1902+
# receiver hostname
rx_hostname mpc1922:2000+mpc1922:2001+
# udp destination ports
0:udp_dstport 50000
0:udp_dstport2 50001
1:udp_dstport 50002
1:udp_dstport2 50003
# udp destination ip from rx_hostname
udp_dstip auto
# output file directory
fpath /tmp
# disable file writing
fwrite 0
#imagetest 1

View File

@ -0,0 +1,23 @@
# detector hostname
hostname localhost:1904
# receiver hostname
rx_hostname mpc1922:2004
# udp destination ports
udp_dstport 50004
# udp destination ip from rx_hostname
udp_dstip auto
# udp source ip (same subnet as udp_dstip)
udp_srcip 192.168.1.100
# output file directory
fpath /tmp
# disable file writing
fwrite 0

View File

@ -0,0 +1,37 @@
# detector hostname
hostname localhost:1914
# receiver hostname
rx_hostname mpc1922:2014
# udp destination ports
udp_dstport 50014
# udp destination ip from rx_hostname
udp_dstip auto
# udp source ip (same subnet as udp_dstip)
udp_srcip 192.168.1.100
# output file directory
fpath /tmp
# disable file writing
fwrite 0
# enable 2nd interface for veto debugging
# udp destination port for veto
udp_dstport2 50015
# udp destination ip (from rx_hostname)
udp_dstip2 auto
# udp source ip (same subnet as udp_dstip)
udp_srcip2 192.168.1.100
# to enable 2nd interface for veto debugging
numinterfaces 2
# enable veto data streaming
veto 1

View File

@ -0,0 +1,32 @@
# detector hostname
hostname localhost:1906
# receiver hostname
rx_hostname mpc1922:2006
# udp destination ports
udp_dstport 50006
udp_dstport2 50007
# udp destination ip from rx_hostname
udp_dstip auto
udp_dstip2 auto
# udp source ip (same subnet as udp_dstip)
udp_srcip 192.168.1.100
udp_srcip2 192.168.1.100
# output file directory
fpath /tmp
# disable file writing
fwrite 0
#imagetest 1
#frames 1
# enable two interfaces
numinterfaces 2
# select inner interface(effective only when numinterfaces is 1)
#selinterface 1

View File

@ -0,0 +1,47 @@
# detector geometry
detsize 2048 1024
# detector hostname
virtual 4 1952
# receiver hostname and tcpports
0:rx_tcpport 1970
1:rx_tcpport 1971
2:rx_tcpport 1972
3:rx_tcpport 1973
rx_hostname mpc1922
# udp destination ports
0:udp_dstport2 50001
0:udp_dstport2 50002
1:udp_dstport 50003
1:udp_dstport2 50004
2:udp_dstport 50005
2:udp_dstport2 50006
3:udp_dstport 50007
3:udp_dstport2 50008
# udp destination ip from rx_hostname
udp_dstip auto
udp_dstip2 auto
# udp source ip (same subnet as udp_dstip)
udp_srcip 192.168.1.100
udp_srcip2 192.168.1.100
# transmission delay frame
0:txndelay_frame 0
1:txndelay_frame 1
2:txndelay_frame 2
3:txndelay_frame 3
# output file directory
fpath /tmp
# disable file writing
fwrite 0
#imagetest 1
#frames 1

View File

@ -0,0 +1,21 @@
# detector hostname
hostname localhost:1908
# receiver hostname
rx_hostname mpc1922:2008
# udp destination ports
udp_dstport 50008
# udp destination ip from rx_hostname
udp_dstip auto
# udp source ip (same subnet as udp_dstip)
udp_srcip 192.168.1.100
# output file directory
fpath /tmp
# disable file writing
fwrite 0

View File

@ -0,0 +1,24 @@
# detector hostname
hostname localhost:1912
# receiver hostname
rx_hostname mpc1922:2012
# udp destination ports
udp_dstport 50012
# udp destination ip from rx_hostname
udp_dstip auto
# udp source ip (same subnet as udp_dstip)
udp_srcip 192.168.1.100
# output file directory
fpath /tmp
# disable file writing
fwrite 0
# load ascii pattern file
#pattern ../pat.txt

View File

@ -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-status start}}
\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:
\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.
\begin{enumerate}
\setcounter{enumi}{3}
\item {\tt{sls\_detector\_get framescaught}}
\item {\tt{sls\_detector\_get framescaught}} (\textcolor{red}{rx\_framescaught})
\end{enumerate}
Then you can stop the receiver as well now:
\begin{enumerate}
\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}
The detector will not accept other commands while acquiring. If an acquisition wishes to be properly aborted, then:
\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}
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}
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}}.\\
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 \\
{\tt{slsDetectorsPackage/slsReceiverSoftware/include/sls\_receiver\_defs.h}}:

View File

@ -0,0 +1 @@
../slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv5.0.0-rc2

View File

@ -1 +0,0 @@
../slsDetectorSoftware/eigerDetectorServer/bin/eigerDetectorServerv4.0.0.22.0

View File

@ -0,0 +1 @@
../slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv5.0.0-rc2

View File

@ -0,0 +1 @@
../slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv5.0.0-rc2

View File

@ -1 +0,0 @@
../slsDetectorSoftware/gotthardDetectorServer/gotthardDetectorServerv4.0.0.3

View File

@ -0,0 +1 @@
../slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv5.0.0-rc2

View File

@ -1 +0,0 @@
../slsDetectorSoftware/jungfrauDetectorServer/bin/jungfrauDetectorServerv4.0.0.0

View File

@ -0,0 +1 @@
../slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv5.0.0-rc2

View File

@ -0,0 +1 @@
../slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv5.0.0-rc2

View File

@ -0,0 +1 @@
../slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv5.0.0-rc2

View File

@ -1 +0,0 @@
../slsDetectorSoftware/mythenDetectorServer/mythenDetectorServerv2.0.3

View File

@ -75,7 +75,7 @@
<property name="spacing">
<number>6</number>
</property>
<item row="1" column="4" colspan="4">
<item row="1" column="3" colspan="4">
<widget class="QGroupBox" name="box2D">
<property name="enabled">
<bool>true</bool>
@ -1388,7 +1388,7 @@ Displays minimum, maximum and sum of values for each plot.
</layout>
</widget>
</item>
<item row="2" column="0" colspan="7">
<item row="2" column="0" colspan="6">
<widget class="QGroupBox" name="boxPlotAxis">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
@ -1789,7 +1789,7 @@ Displays minimum, maximum and sum of values for each plot.
</layout>
</widget>
</item>
<item row="2" column="7">
<item row="2" column="6">
<widget class="QGroupBox" name="boxSave">
<property name="enabled">
<bool>true</bool>
@ -1990,23 +1990,7 @@ Displays minimum, maximum and sum of values for each plot.
</layout>
</widget>
</item>
<item row="0" column="3">
<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">
<item row="0" column="0" colspan="7">
<widget class="QGroupBox" name="boxFrequency">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
@ -2016,7 +2000,7 @@ Displays minimum, maximum and sum of values for each plot.
</property>
<property name="minimumSize">
<size>
<width>0</width>
<width>350</width>
<height>65</height>
</size>
</property>
@ -2024,7 +2008,7 @@ Displays minimum, maximum and sum of values for each plot.
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Sets the pace at which the receiver streams out images. Images in between the timeout or frequency are not sent out.&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Time Interval&lt;/span&gt;: Streaming time interval when an image should be streamed. &lt;br/&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Every nth Image&lt;/span&gt;: Only every nth image is streamed. &lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="title">
<string>Receiver Streaming Frequency / Timer</string>
<string>ZMQ Streaming</string>
</property>
<property name="alignment">
<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>
</property>
<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>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;If checked, there is no call back and no images are plotted.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>No Plot</string>
</property>
</widget>
</item>
<item row="0" column="11">
<widget class="QComboBox" name="comboFrequency">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
@ -2061,13 +2070,13 @@ Displays minimum, maximum and sum of values for each plot.
</property>
<property name="minimumSize">
<size>
<width>150</width>
<width>135</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<width>135</width>
<height>16777215</height>
</size>
</property>
@ -2150,29 +2159,25 @@ Displays minimum, maximum and sum of values for each plot.
</item>
</widget>
</item>
<item row="0" column="1">
<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">
<item row="0" column="13">
<widget class="QStackedWidget" name="stackedTimeInterval">
<property name="maximumSize">
<size>
<width>80</width>
<height>20</height>
<width>150</width>
<height>16777215</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="2">
<widget class="QStackedWidget" name="stackedTimeInterval">
<property name="currentIndex">
<number>1</number>
<number>0</number>
</property>
<widget class="QWidget" name="pageTimeGap">
<layout class="QHBoxLayout" name="horizontalLayout_14">
<property name="spacing">
<number>2</number>
</property>
<property name="leftMargin">
<number>2</number>
</property>
<item>
<widget class="QDoubleSpinBox" name="spinTimeGap">
<property name="sizePolicy">
@ -2181,17 +2186,23 @@ Displays minimum, maximum and sum of values for each plot.
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>90</width>
<height>30</height>
</size>
</property>
<property name="keyboardTracking">
<bool>false</bool>
</property>
<property name="decimals">
<number>3</number>
<number>2</number>
</property>
<property name="maximum">
<double>999999.000000000000000</double>
</property>
<property name="value">
<double>200.000000000000000</double>
<double>500.000000000000000</double>
</property>
</widget>
</item>
@ -2238,6 +2249,9 @@ Displays minimum, maximum and sum of values for each plot.
</widget>
<widget class="QWidget" name="pageFrequency">
<layout class="QHBoxLayout" name="horizontalLayout_13">
<property name="leftMargin">
<number>2</number>
</property>
<item>
<widget class="QSpinBox" name="spinNthFrame">
<property name="sizePolicy">
@ -2267,78 +2281,8 @@ Displays minimum, maximum and sum of values for each plot.
</widget>
</widget>
</item>
</layout>
</widget>
</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">
<item row="0" column="10">
<spacer name="horizontalSpacer_18">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -2347,22 +2291,159 @@ Displays minimum, maximum and sum of values for each plot.
</property>
<property name="sizeHint" stdset="0">
<size>
<width>10</width>
<width>30</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0">
<widget class="QRadioButton" name="radioNoPlot">
<item row="0" column="2">
<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">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<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>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;High water mark for inbound messages for gui.&lt;/p&gt;&lt;p&gt; #zmqhwm#&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</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>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;High water mark for outbound messages for receiver.&lt;/p&gt;&lt;p&gt;#rx_zmqhwm#&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</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">
<string>No Plot</string>
<string>Rcv Hwm: </string>
</property>
</widget>
</item>
@ -2370,7 +2451,6 @@ Displays minimum, maximum and sum of values for each plot.
</widget>
</item>
</layout>
<zorder>boxPlotType</zorder>
<zorder>box1D</zorder>
<zorder>boxFrequency</zorder>
<zorder>box2D</zorder>
@ -2378,8 +2458,6 @@ Displays minimum, maximum and sum of values for each plot.
<zorder>boxSave</zorder>
</widget>
<tabstops>
<tabstop>radioNoPlot</tabstop>
<tabstop>radioDataGraph</tabstop>
<tabstop>comboFrequency</tabstop>
<tabstop>spinTimeGap</tabstop>
<tabstop>comboTimeGapUnit</tabstop>

View File

@ -40,6 +40,7 @@ class qDefs : public QWidget {
static const int Q_FONT_SIZE = 9;
static const int DATA_GAIN_PLOT_RATIO = 5;
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) {
try {

View File

@ -71,7 +71,7 @@ class qDetectorMain : public QMainWindow, private Ui::DetectorMainObject {
std::unique_ptr<sls::Detector> det;
qDrawPlot *plot;
MyTabWidget *tabs;
std::unique_ptr<QScrollArea> scroll[NumberOfTabs];
QScrollArea *scroll[NumberOfTabs];
qTabMeasurement *tabMeasurement;
qTabDataOutput *tabDataOutput;
qTabPlot *tabPlot;

View File

@ -3,7 +3,6 @@
#include "ui_form_tab_plot.h"
class qDrawPlot;
class QButtonGroup;
class qTabPlot : public QWidget, private Ui::TabPlotObject {
Q_OBJECT
@ -35,6 +34,8 @@ class qTabPlot : public QWidget, private Ui::TabPlotObject {
void CheckAspectRatio();
void SetZRange();
void SetStreamingFrequency();
void SetStreamingHwm(int value);
void SetReceivingHwm(int value);
signals:
void DisableZoomSignal(bool);
@ -45,6 +46,8 @@ class qTabPlot : public QWidget, private Ui::TabPlotObject {
void Select1DPlot(bool enable);
void GetGapPixels();
void GetStreamingFrequency();
void GetStreamingHwm();
void GetReceivingHwm();
void SetXYRange();
void MaintainAspectRatio(int dimension);
@ -52,8 +55,6 @@ class qTabPlot : public QWidget, private Ui::TabPlotObject {
qDrawPlot *plot;
bool is1d;
QButtonGroup *btnGroupPlotType{nullptr};
/** default plot and axis titles */
static QString defaultPlotTitle;
static QString defaultHistXAxisTitle;

View File

@ -116,6 +116,9 @@ qDetectorMain::qDetectorMain(int multiId, const std::string &fname,
qDetectorMain::~qDetectorMain() {
disconnect(tabs, SIGNAL(currentChanged(int)), this, SLOT(Refresh(int)));
for (int i = 0; i < NumberOfTabs; ++i) {
delete scroll[i];
}
}
void qDetectorMain::SetUpWidgetWindow() {
@ -141,7 +144,7 @@ void qDetectorMain::SetUpWidgetWindow() {
// creating the scroll area widgets for the tabs
for (int i = 0; i < NumberOfTabs; ++i) {
scroll[i] = sls::make_unique<QScrollArea>();
scroll[i] = new QScrollArea();
scroll[i]->setFrameShape(QFrame::NoFrame);
}
// setting the tab widgets to the scrollareas
@ -153,13 +156,13 @@ void qDetectorMain::SetUpWidgetWindow() {
scroll[DEBUGGING]->setWidget(tabDebugging);
scroll[DEVELOPER]->setWidget(tabDeveloper);
// inserting all the tabs
tabs->insertTab(MEASUREMENT, scroll[MEASUREMENT].get(), "Measurement");
tabs->insertTab(DATAOUTPUT, scroll[DATAOUTPUT].get(), "Data Output");
tabs->insertTab(PLOT, scroll[PLOT].get(), "Plot");
tabs->insertTab(SETTINGS, scroll[SETTINGS].get(), "Settings");
tabs->insertTab(ADVANCED, scroll[ADVANCED].get(), "Advanced");
tabs->insertTab(DEBUGGING, scroll[DEBUGGING].get(), "Debugging");
tabs->insertTab(DEVELOPER, scroll[DEVELOPER].get(), "Developer");
tabs->insertTab(MEASUREMENT, scroll[MEASUREMENT], "Measurement");
tabs->insertTab(DATAOUTPUT, scroll[DATAOUTPUT], "Data Output");
tabs->insertTab(PLOT, scroll[PLOT], "Plot");
tabs->insertTab(SETTINGS, scroll[SETTINGS], "Settings");
tabs->insertTab(ADVANCED, scroll[ADVANCED], "Advanced");
tabs->insertTab(DEBUGGING, scroll[DEBUGGING], "Debugging");
tabs->insertTab(DEVELOPER, scroll[DEVELOPER], "Developer");
// no scroll buttons this way
tabs->insertTab(MESSAGES, tabMessages, "Terminal");

View File

@ -1,8 +1,6 @@
#include "qTabPlot.h"
#include "qDefs.h"
#include "qDrawPlot.h"
#include <QAbstractButton>
#include <QButtonGroup>
#include <QStackedLayout>
#include <QStandardItemModel>
@ -20,14 +18,9 @@ qTabPlot::qTabPlot(QWidget *parent, sls::Detector *detector, qDrawPlot *p)
LOG(logDEBUG) << "Plot ready";
}
qTabPlot::~qTabPlot() { delete btnGroupPlotType; }
qTabPlot::~qTabPlot() {}
void qTabPlot::SetupWidgetWindow() {
// button group for plot type
btnGroupPlotType = new QButtonGroup(this);
btnGroupPlotType->addButton(radioNoPlot, 0);
btnGroupPlotType->addButton(radioDataGraph, 1);
// 1D and 2D options
stackedWidget1D->setCurrentIndex(0);
stackedWidget2D->setCurrentIndex(0);
@ -75,14 +68,19 @@ void qTabPlot::SetupWidgetWindow() {
Select1DPlot(is1d);
Initialization();
Refresh();
// set zmq high water mark to GUI_ZMQ_RCV_HWM (2)
spinSndHwm->setValue(qDefs::GUI_ZMQ_RCV_HWM);
spinRcvHwm->setValue(qDefs::GUI_ZMQ_RCV_HWM);
}
void qTabPlot::Initialization() {
// Plot arguments box
connect(btnGroupPlotType, SIGNAL(buttonClicked(int)), this,
SLOT(SetPlot()));
// 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,
SLOT(SetStreamingFrequency()));
connect(comboTimeGapUnit, SIGNAL(currentIndexChanged(int)), this,
@ -208,13 +206,18 @@ void qTabPlot::Select1DPlot(bool enable) {
void qTabPlot::SetPlot() {
bool plotEnable = false;
if (radioNoPlot->isChecked()) {
if (chkNoPlot->isChecked()) {
LOG(logINFO) << "Setting Plot Type: No Plot";
} else if (radioDataGraph->isChecked()) {
} else {
LOG(logINFO) << "Setting Plot Type: Datagraph";
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);
box2D->setEnabled(plotEnable);
boxSave->setEnabled(plotEnable);
@ -685,6 +688,9 @@ void qTabPlot::SetStreamingFrequency() {
LOG(logINFO) << "Setting Streaming Frequency to " << freqVal;
det->setRxZmqFrequency(freqVal);
} else {
LOG(logINFO) << "Setting Streaming Frequency to " << 0
<< " (timer)";
det->setRxZmqFrequency(0);
LOG(logINFO) << "Setting Streaming Timer to " << timeVal << " "
<< qDefs::getUnitString(timeUnit);
auto timeMS = qDefs::getMSTime(std::make_pair(timeVal, timeUnit));
@ -696,17 +702,68 @@ void qTabPlot::SetStreamingFrequency() {
&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() {
LOG(logDEBUG) << "**Updating Plot Tab";
if (!plot->GetIsRunning()) {
boxPlotType->setEnabled(true);
boxFrequency->setEnabled(true);
// streaming frequency
if (!radioNoPlot->isChecked()) {
boxFrequency->setEnabled(true);
if (!chkNoPlot->isChecked()) {
comboFrequency->setEnabled(true);
stackedTimeInterval->setEnabled(true);
lblSndHwm->setEnabled(true);
spinSndHwm->setEnabled(true);
lblRcvHwm->setEnabled(true);
spinRcvHwm->setEnabled(true);
}
GetStreamingFrequency();
GetStreamingHwm();
GetReceivingHwm();
// gain plot, gap pixels enable
switch (det->getDetectorType().squash()) {
case slsDetectorDefs::EIGER:
@ -725,7 +782,6 @@ void qTabPlot::Refresh() {
break;
}
} else {
boxPlotType->setEnabled(false);
boxFrequency->setEnabled(false);
chkGainPlot->setEnabled(false);
chkGainPlot1D->setEnabled(false);

View File

@ -164,10 +164,10 @@ void basictests() {
// check for API compatibility - old server
if (sw_fw_apiversion > REQRD_FRMWR_VRSN) {
sprintf(initErrorMessage,
"This detector software software version (0x%llx) is "
"incompatible.\n"
"Please update detector software (min. 0x%llx) to be "
"compatible with this firmware.\n",
"This firmware-software api version (0x%llx) is incompatible "
"with the software's minimum required firmware version "
"(0x%llx).\nPlease update detector software to be compatible "
"with this firmware.\n",
(long long int)sw_fw_apiversion,
(long long int)REQRD_FRMWR_VRSN);
LOG(logERROR, (initErrorMessage));

View File

@ -3,7 +3,7 @@
#include "sls_detector_defs.h"
#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)

View File

@ -156,13 +156,13 @@ void basictests() {
// check for API compatibility - old server
if (sw_fw_apiversion > REQUIRED_FIRMWARE_VERSION) {
sprintf(
initErrorMessage,
"This detector software software version (%lld) is incompatible.\n"
"Please update detector software (min. %lld) to be compatible with "
"this firmware.\n",
(long long int)sw_fw_apiversion,
(long long int)REQUIRED_FIRMWARE_VERSION);
sprintf(initErrorMessage,
"This firmware-software api version (0x%llx) is incompatible "
"with the software's minimum required firmware version "
"(0x%llx).\nPlease update detector software to be compatible "
"with this firmware.\n",
(long long int)sw_fw_apiversion,
(long long int)REQUIRED_FIRMWARE_VERSION);
LOG(logERROR, (initErrorMessage));
initError = FAIL;
return;

View File

@ -152,10 +152,10 @@ void basictests() {
// check for API compatibility - old server
if (sw_fw_apiversion > requiredFirmwareVersion) {
sprintf(initErrorMessage,
"This detector software software version (0x%llx) is "
"incompatible.\n"
"Please update detector software (min. 0x%llx) to be "
"compatible with this firmware.\n",
"This firmware-software api version (0x%llx) is incompatible "
"with the software's minimum required firmware version "
"(0x%llx).\nPlease update detector software to be compatible "
"with this firmware.\n",
(long long int)sw_fw_apiversion,
(long long int)requiredFirmwareVersion);
LOG(logERROR, (initErrorMessage));

View File

@ -1,7 +1,7 @@
#pragma once
#include "sls_detector_defs.h"
#define REQRD_FRMWRE_VRSN (0x200707)
#define REQRD_FRMWRE_VRSN (0x200925)
#define KERNEL_DATE_VRSN "Wed May 20 13:58:38 CEST 2020"
#define CTRL_SRVR_INIT_TIME_US (300 * 1000)

View File

@ -138,10 +138,10 @@ void basictests() {
// check for API compatibility - old server
if (sw_fw_apiversion > requiredFirmwareVersion) {
sprintf(initErrorMessage,
"This detector software software version (0x%llx) is "
"incompatible.\n"
"Please update detector software (min. 0x%llx) to be "
"compatible with this firmware.\n",
"This firmware-software api version (0x%llx) is incompatible "
"with the software's minimum required firmware version "
"(0x%llx).\nPlease update detector software to be compatible "
"with this firmware.\n",
(long long int)sw_fw_apiversion,
(long long int)requiredFirmwareVersion);
LOG(logERROR, (initErrorMessage));

View File

@ -160,10 +160,10 @@ void basictests() {
// check for API compatibility - old server
if (sw_fw_apiversion > REQRD_FRMWR_VRSN) {
sprintf(initErrorMessage,
"This detector software software version (0x%llx) is "
"incompatible.\n"
"Please update detector software (min. 0x%llx) to be "
"compatible with this firmware.\n",
"This firmware-software api version (0x%llx) is incompatible "
"with the software's minimum required firmware version "
"(0x%llx).\nPlease update detector software to be compatible "
"with this firmware.\n",
(long long int)sw_fw_apiversion,
(long long int)REQRD_FRMWR_VRSN);
LOG(logERROR, (initErrorMessage));

View File

@ -3,7 +3,7 @@
#include "sls_detector_defs.h"
#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)

View File

@ -136,10 +136,10 @@ void basictests() {
// check for API compatibility - old server
if (sw_fw_apiversion > requiredFirmwareVersion) {
sprintf(initErrorMessage,
"This detector software software version (0x%llx) is "
"incompatible.\n"
"Please update detector software (min. 0x%llx) to be "
"compatible with this firmware.\n",
"This firmware-software api version (0x%llx) is incompatible "
"with the software's minimum required firmware version "
"(0x%llx).\nPlease update detector software to be compatible "
"with this firmware.\n",
(long long int)sw_fw_apiversion,
(long long int)requiredFirmwareVersion);
LOG(logERROR, (initErrorMessage));
@ -439,6 +439,9 @@ void setupDetector() {
setInitialExtSignals();
// 10G UDP
enableTenGigabitEthernet(1);
#ifdef VIRTUAL
enableTenGigabitEthernet(0);
#endif
// check module type attached if not in debug mode
{
@ -1592,7 +1595,14 @@ int enableTenGigabitEthernet(int val) {
else {
bus_w(addr, bus_r(addr) & (~PKT_CONFIG_1G_INTERFACE_MSK));
}
updatePacketizing();
// stop server does not know dr in virtual mode
#ifdef VIRTUAL
if (isControlServer) {
#endif
updatePacketizing();
#ifdef VIRTUAL
}
#endif
}
int oneG = ((bus_r(addr) & PKT_CONFIG_1G_INTERFACE_MSK) >>
PKT_CONFIG_1G_INTERFACE_OFST);

View File

@ -1,7 +1,7 @@
#pragma once
#include "sls_detector_defs.h"
#define REQRD_FRMWRE_VRSN 0x190000
#define REQRD_FRMWRE_VRSN (0x200925)
#define KERNEL_DATE_VRSN "Wed May 20 13:58:38 CEST 2020"
#define CTRL_SRVR_INIT_TIME_US (300 * 1000)

View File

@ -2,26 +2,22 @@
#include "clogger.h"
#include <errno.h>
#include <semaphore.h>
#include <pthread.h>
#include <string.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <unistd.h>
#define SHM_NAME "sls_server_shared_memory"
#ifdef EIGERD
#define SHM_VERSION 0x200915
#else
#define SHM_VERSION 0x200625
#endif
#define SHM_KEY 5678
#define MEM_SIZE 128
#define SHM_NAME "sls_server_shared_memory"
#define SHM_VERSION 0x201007
#define SHM_KEY 5678
#define MEM_SIZE 128
typedef struct Memory {
int version;
sem_t semStatus;
pthread_mutex_t lockStatus;
#ifdef EIGERD
sem_t semLocalLink;
pthread_mutex_t lockLocalLink;
#endif
enum runStatus scanStatus; // idle, running or error
int scanStop;
@ -87,14 +83,59 @@ int sharedMemory_create(int port) {
int sharedMemory_initialize() {
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"));
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
if (sem_init(&(shm->semLocalLink), 1, 1) != 0) {
LOG(logERROR, ("Failed to initialize semaphore semLocalLink for "
pthread_mutexattr_t lockLocalLinkAttribute;
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"));
return FAIL;
}
@ -155,9 +196,9 @@ int sharedMemory_remove() {
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
void sharedMemory_setStatus(enum runStatus s) {
@ -218,7 +259,9 @@ int sharedMemory_getScanStop() {
}
#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

View File

@ -61,7 +61,8 @@ int main(int argc, char *argv[]) {
"\t-d, --devel : Developer mode. Skips firmware checks. \n"
"\t-u, --update : Update mode. Skips firmware checks and "
"initial detector setup. \n"
"\t-s, --stopserver : Stop server. Do not use as created by "
"\t-s, --stopserver : Stop server. Do not use as it is created "
"by "
"control server \n\n",
argv[0]);
@ -109,7 +110,7 @@ int main(int argc, char *argv[]) {
#elif GOTTHARD2D
version = APIGOTTHARD2;
#endif
LOG(logINFOBLUE, ("SLS Detector Server Version: %s (0x%x)\n",
LOG(logINFO, ("SLS Detector Server Version: %s (0x%x)\n",
GITBRANCH, version));
exit(EXIT_SUCCESS);

View File

@ -826,7 +826,7 @@ class Detector {
/** Frequency of frames streamed out from receiver via zmq. \n Default: 1,
* Means every frame is streamed out. \n If 2, every second frame is
* streamed out. \n If 0, streaming timer is the timeout, after which
* current frame is sent out. (default timeout is 200 ms). Usually used for
* current frame is sent out. (default timeout is 500 ms). Usually used for
* gui purposes.
*/
void setRxZmqFrequency(int freq, Positions pos = {});
@ -835,7 +835,7 @@ class Detector {
/**
* If receiver streaming frequency is 0 (default), then this timer between
* each data stream is set. Default is 200 ms.
* each data stream is set. Default is 500 ms.
*/
void setRxZmqTimer(int time_in_ms, Positions pos = {});
@ -887,6 +887,26 @@ class Detector {
* if enabled.
*/
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 */

View File

@ -486,39 +486,6 @@ std::string CmdProxy::Exptime(int action) {
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::ostringstream os;
os << cmd << ' ';
@ -1257,7 +1224,40 @@ std::string CmdProxy::ReceiverHostname(int action) {
return os.str();
}
/* File */
/* 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 */
std::string CmdProxy::Threshold(int action) {
@ -2681,7 +2681,7 @@ std::string CmdProxy::ExecuteCommand(int action) {
throw sls::RuntimeError("Cannot get.");
} else if (action == defs::PUT_ACTION) {
std::string command;
for (auto &i: args) {
for (auto &i : args) {
command += (i + ' ');
}
auto t = det->executeCommand(command, std::vector<int>{det_id});

View File

@ -235,6 +235,36 @@
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 */
#define INTEGER_COMMAND_NOID(CMDNAME, GETFCN, SETFCN, CONV, HLPSTR) \
std::string CMDNAME(const int action) { \
@ -754,7 +784,7 @@ class CmdProxy {
{"triggersl", &CmdProxy::triggersl},
{"delayl", &CmdProxy::delayl},
{"periodl", &CmdProxy::periodl},
{"dr", &CmdProxy::DynamicRange},
{"dr", &CmdProxy::dr},
{"drlist", &CmdProxy::drlist},
{"timing", &CmdProxy::timing},
{"timinglist", &CmdProxy::timinglist},
@ -868,6 +898,8 @@ class CmdProxy {
{"zmqport", &CmdProxy::zmqport},
{"rx_zmqip", &CmdProxy::rx_zmqip},
{"zmqip", &CmdProxy::zmqip},
{"zmqhwm", &CmdProxy::ZMQHWM},
{"rx_zmqhwm", &CmdProxy::rx_zmqhwm},
/* Eiger Specific */
{"subexptime", &CmdProxy::subexptime},
@ -1071,6 +1103,7 @@ class CmdProxy {
std::string ReceiverHostname(int action);
/* File */
/* ZMQ Streaming Parameters (Receiver<->Client) */
std::string ZMQHWM(int action);
/* Eiger Specific */
std::string Threshold(int action);
std::string ThresholdNoTb(int action);
@ -1186,17 +1219,17 @@ class CmdProxy {
/* acquisition parameters */
INTEGER_COMMAND_NOID(
INTEGER_COMMAND_SET_NOID_GET_ID(
frames, getNumberOfFrames, setNumberOfFrames, StringTo<int64_t>,
"[n_frames]\n\tNumber of frames per acquisition. 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 "
"steps.\n\t[Gotthard2] Burst mode has a maximum of 2720 frames.");
INTEGER_COMMAND_NOID(triggers, getNumberOfTriggers, setNumberOfTriggers,
StringTo<int64_t>,
"[n_triggers]\n\tNumber of triggers per aquire. Set "
"timing mode to use triggers.");
INTEGER_COMMAND_SET_NOID_GET_ID(
triggers, getNumberOfTriggers, setNumberOfTriggers, StringTo<int64_t>,
"[n_triggers]\n\tNumber of triggers per aquire. Set "
"timing mode to use triggers.");
TIME_COMMAND(
period, getPeriod, setPeriod,
@ -1227,6 +1260,15 @@ class CmdProxy {
" Period left for current frame."
"\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,
"\n\tGets the list of dynamic ranges for this detector.");
@ -1650,7 +1692,7 @@ class CmdProxy {
"zmq\n\tDefault: 1, Means every frame is streamed out. \n\tIf 2, every "
"second frame is streamed out. \n\tIf 0, streaming timer is the "
"timeout, after which current frame is sent out. (default timeout is "
"200 ms). Usually used for gui purposes.");
"500 ms). Usually used for gui purposes.");
INTEGER_COMMAND_VEC_ID(
rx_zmqstartfnum, getRxZmqStartingFrame, setRxZmqStartingFrame,
@ -1692,6 +1734,15 @@ class CmdProxy {
"an intermediate process between receiver and client(gui). Also "
"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 */
TIME_COMMAND(subexptime, getSubExptime, setSubExptime,
@ -1778,7 +1829,7 @@ class CmdProxy {
"0 or this mode disabled(comparator enabled throughout). 1 enables "
"mode. 0 disables mode. ");
INTEGER_COMMAND_NOID(
INTEGER_COMMAND_SET_NOID_GET_ID(
storagecells, getNumberOfAdditionalStorageCells,
setNumberOfAdditionalStorageCells, StringTo<int>,
"[0-15]\n\t[Jungfrau] Number of additional storage cells. Default is "
@ -1803,7 +1854,7 @@ class CmdProxy {
"left for current frame. ");
/* Gotthard2 Specific */
INTEGER_COMMAND_NOID(
INTEGER_COMMAND_SET_NOID_GET_ID(
bursts, getNumberOfBursts, setNumberOfBursts, StringTo<int64_t>,
"[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 "

View File

@ -643,7 +643,7 @@ Result<int> Detector::getNumberofUDPInterfaces(Positions pos) const {
}
void Detector::setNumberofUDPInterfaces(int n, Positions pos) {
int previouslyClientStreaming = pimpl->getDataStreamingToClient();
bool previouslyClientStreaming = pimpl->getDataStreamingToClient();
bool useReceiver = getUseReceiverFlag().squash(false);
bool previouslyReceiverStreaming = false;
if (useReceiver) {
@ -656,7 +656,7 @@ void Detector::setNumberofUDPInterfaces(int n, Positions pos) {
setRxZmqPort(startingPort, -1);
}
// redo the zmq sockets if enabled
if (previouslyClientStreaming != 0) {
if (previouslyClientStreaming) {
pimpl->setDataStreamingToClient(false);
pimpl->setDataStreamingToClient(true);
}
@ -1042,6 +1042,8 @@ Result<int> Detector::getRxZmqPort(Positions pos) const {
}
void Detector::setRxZmqPort(int port, int module_id) {
bool previouslyReceiverStreaming =
getRxZmqDataStream(std::vector<int>{module_id}).squash(false);
if (module_id == -1) {
std::vector<int> port_list = getPortNumbers(port);
for (int idet = 0; idet < size(); ++idet) {
@ -1051,6 +1053,10 @@ void Detector::setRxZmqPort(int port, int module_id) {
} else {
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 {
@ -1071,6 +1077,7 @@ Result<int> Detector::getClientZmqPort(Positions pos) const {
}
void Detector::setClientZmqPort(int port, int module_id) {
bool previouslyClientStreaming = pimpl->getDataStreamingToClient();
if (module_id == -1) {
std::vector<int> port_list = getPortNumbers(port);
for (int idet = 0; idet < size(); ++idet) {
@ -1080,6 +1087,10 @@ void Detector::setClientZmqPort(int port, int module_id) {
} else {
pimpl->Parallel(&Module::setClientStreamingPort, {module_id}, port);
}
if (previouslyClientStreaming) {
pimpl->setDataStreamingToClient(false);
pimpl->setDataStreamingToClient(true);
}
}
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) {
int previouslyClientStreaming = pimpl->getDataStreamingToClient();
bool previouslyClientStreaming = pimpl->getDataStreamingToClient();
pimpl->Parallel(&Module::setClientStreamingIP, pos, ip);
if (previouslyClientStreaming != 0) {
if (previouslyClientStreaming) {
pimpl->setDataStreamingToClient(false);
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
Result<ns> Detector::getSubExptime(Positions pos) const {

View File

@ -158,6 +158,8 @@ void DetectorImpl::initializeDetectorStructure() {
multi_shm()->acquiringFlag = false;
multi_shm()->initialChecks = true;
multi_shm()->gapPixels = false;
// zmqlib default
multi_shm()->zmqHwm = -1;
}
void DetectorImpl::initializeMembers(bool verify) {
@ -377,16 +379,17 @@ void DetectorImpl::setGapPixelsinCallback(const bool enable) {
multi_shm()->gapPixels = enable;
}
int DetectorImpl::createReceivingDataSockets(const bool destroy) {
if (destroy) {
LOG(logINFO) << "Going to destroy data sockets";
// close socket
zmqSocket.clear();
int DetectorImpl::destroyReceivingDataSockets() {
LOG(logINFO) << "Going to destroy data sockets";
// close socket
zmqSocket.clear();
client_downstream = false;
LOG(logINFO) << "Destroyed Receiving Data Socket(s)";
return OK;
}
client_downstream = false;
LOG(logINFO) << "Destroyed Receiving Data Socket(s)";
return OK;
}
int DetectorImpl::createReceivingDataSockets() {
if (client_downstream) {
return OK;
}
@ -417,11 +420,21 @@ int DetectorImpl::createReceivingDataSockets(const bool destroy) {
.str()
.c_str(),
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 "
<< zmqSocket.back()->GetZmqServerAddress();
<< zmqSocket.back()->GetZmqServerAddress() << "[hwm: "
<< zmqSocket.back()->GetReceiveHighWaterMark() << "]";
} catch (...) {
LOG(logERROR) << "Could not create Zmq socket on port " << portnum;
createReceivingDataSockets(true);
destroyReceivingDataSockets();
return FAIL;
}
}
@ -449,12 +462,12 @@ void DetectorImpl::readFrameFromReceiver() {
}
std::vector<bool> runningList(zmqSocket.size());
std::vector<bool> connectList(zmqSocket.size());
int numRunning = 0;
numZmqRunning = 0;
for (size_t i = 0; i < zmqSocket.size(); ++i) {
if (zmqSocket[i]->Connect() == 0) {
connectList[i] = true;
runningList[i] = true;
++numRunning;
++numZmqRunning;
} else {
// to remember the list it connected to, to disconnect later
connectList[i] = false;
@ -465,8 +478,8 @@ void DetectorImpl::readFrameFromReceiver() {
}
bool data = false;
bool completeImage = false;
char *image = nullptr;
char *multiframe = nullptr;
std::unique_ptr<char[]> image{nullptr};
std::unique_ptr<char[]> multiframe{nullptr};
char *multigappixels = nullptr;
int multisize = 0;
// only first message header
@ -480,13 +493,14 @@ void DetectorImpl::readFrameFromReceiver() {
uint32_t currentSubFrameIndex = -1, coordX = -1, coordY = -1,
flippedDataX = -1;
while (numRunning != 0) {
while (numZmqRunning != 0) {
// reset data
data = false;
if (multiframe != nullptr) {
memset(multiframe, 0xFF, multisize);
memset(multiframe.get(), 0xFF, multisize);
}
completeImage = true;
completeImage = (numZmqRunning == (int)zmqSocket.size());
// get each frame
for (unsigned int isocket = 0; isocket < zmqSocket.size(); ++isocket) {
@ -503,7 +517,8 @@ void DetectorImpl::readFrameFromReceiver() {
// parse error, version error or end of acquisition for
// socket
runningList[isocket] = false;
--numRunning;
completeImage = false;
--numZmqRunning;
continue;
}
@ -512,9 +527,9 @@ void DetectorImpl::readFrameFromReceiver() {
// allocate
size = zHeader.imageSize;
multisize = size * zmqSocket.size();
image = new char[size];
multiframe = new char[multisize];
memset(multiframe, 0xFF, multisize);
image = sls::make_unique<char[]>(size);
multiframe = sls::make_unique<char[]>(multisize);
memset(multiframe.get(), 0xFF, multisize);
// dynamic range
dynamicRange = zHeader.dynamicRange;
bytesPerPixel = (float)dynamicRange / 8;
@ -576,7 +591,7 @@ void DetectorImpl::readFrameFromReceiver() {
// DATA
data = true;
zmqSocket[isocket]->ReceiveData(isocket, image, size);
zmqSocket[isocket]->ReceiveData(isocket, image.get(), size);
// creating multi image
{
@ -596,18 +611,18 @@ void DetectorImpl::readFrameFromReceiver() {
if (eiger && (flippedDataX != 0U)) {
for (uint32_t i = 0; i < nPixelsY; ++i) {
memcpy((multiframe) +
memcpy((multiframe.get()) +
((yoffset + (nPixelsY - 1 - i)) *
rowoffset) +
xoffset,
image + (i * singledetrowoffset),
image.get() + (i * singledetrowoffset),
singledetrowoffset);
}
} else {
for (uint32_t i = 0; i < nPixelsY; ++i) {
memcpy((multiframe) + ((yoffset + i) * rowoffset) +
xoffset,
image + (i * singledetrowoffset),
memcpy((multiframe.get()) +
((yoffset + i) * rowoffset) + xoffset,
image.get() + (i * singledetrowoffset),
singledetrowoffset);
}
}
@ -623,12 +638,13 @@ void DetectorImpl::readFrameFromReceiver() {
// send data to callback
if (data) {
char *callbackImage = multiframe;
char *callbackImage = multiframe.get();
int imagesize = multisize;
if (gapPixels) {
int n = InsertGapPixels(multiframe, multigappixels, quadEnable,
dynamicRange, nDetPixelsX, nDetPixelsY);
int n = InsertGapPixels(multiframe.get(), multigappixels,
quadEnable, dynamicRange, nDetPixelsX,
nDetPixelsY);
callbackImage = multigappixels;
imagesize = n;
}
@ -659,8 +675,6 @@ void DetectorImpl::readFrameFromReceiver() {
}
// free resources
delete[] image;
delete[] multiframe;
delete[] multigappixels;
}
@ -966,7 +980,7 @@ bool DetectorImpl::getDataStreamingToClient() { return client_downstream; }
void DetectorImpl::setDataStreamingToClient(bool enable) {
// destroy data threads
if (!enable) {
createReceivingDataSockets(true);
destroyReceivingDataSockets();
// create data threads
} else {
if (createReceivingDataSockets() == FAIL) {
@ -975,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 *),
void *pArg) {
@ -1041,6 +1100,12 @@ int DetectorImpl::acquire() {
if (dataReady == nullptr) {
setJoinThreadFlag(true);
}
if (receiver) {
while (numZmqRunning != 0) {
Parallel(&Module::restreamStopFromReceiver, {});
std::this_thread::sleep_for(std::chrono::milliseconds(200));
}
}
dataProcessingThread.join();
if (acquisition_finished != nullptr) {

View File

@ -16,7 +16,7 @@ class detectorData;
#include <vector>
#define MULTI_SHMAPIVERSION 0x190809
#define MULTI_SHMVERSION 0x200319
#define MULTI_SHMVERSION 0x201007
#define SHORT_STRING_LENGTH 50
#include <future>
@ -62,6 +62,8 @@ struct sharedMultiSlsDetector {
bool acquiringFlag;
bool initialChecks;
bool gapPixels;
/** high water mark of listening tcp port (only data) */
int zmqHwm;
};
class DetectorImpl : public virtual slsDetectorDefs {
@ -240,6 +242,8 @@ class DetectorImpl : public virtual slsDetectorDefs {
bool getDataStreamingToClient();
void setDataStreamingToClient(bool enable);
int getClientStreamingHwm() const;
void setClientStreamingHwm(const int limit);
/**
* register callback for accessing acquisition final data
@ -324,12 +328,8 @@ class DetectorImpl : public virtual slsDetectorDefs {
void updateDetectorSize();
/**
* Create Receiving Data Sockets
* @param destroy is true to destroy all the sockets
* @returns OK or FAIL
*/
int createReceivingDataSockets(const bool destroy = false);
int destroyReceivingDataSockets();
int createReceivingDataSockets();
/**
* Reads frames from receiver through a constant socket
@ -387,6 +387,9 @@ class DetectorImpl : public virtual slsDetectorDefs {
/** ZMQ Socket - Receiver to Client */
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 */
mutable std::mutex mp;

View File

@ -411,19 +411,30 @@ void Module::stopAcquisition() {
// get status before stopping acquisition
runStatus s = ERROR, r = ERROR;
bool zmqstreaming = false;
if (shm()->useReceiverFlag && getReceiverStreaming()) {
zmqstreaming = true;
s = getRunStatus();
r = getReceiverStatus();
try {
if (shm()->useReceiverFlag && getReceiverStreaming()) {
zmqstreaming = true;
s = getRunStatus();
r = getReceiverStatus();
}
} catch (...) {
// if receiver crashed, stop detector in any case
zmqstreaming = false;
}
sendToDetectorStop(F_STOP_ACQUISITION);
shm()->stoppedFlag = true;
// if rxr streaming and acquisition finished, restream dummy stop packet
if (zmqstreaming && (s == IDLE) && (r == IDLE)) {
restreamStopFromReceiver();
}
}
void Module::restreamStopFromReceiver() {
sendToReceiver(F_RESTREAM_STOP_FROM_RECEIVER);
}
void Module::startAndReadAll() {
shm()->stoppedFlag = false;
sendToDetector(F_START_AND_READ_ALL);
@ -1034,6 +1045,14 @@ void Module::setClientStreamingIP(const sls::IpAddr 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
int64_t Module::getSubExptime() const {
@ -2774,10 +2793,6 @@ void Module::checkReceiverVersionCompatibility() {
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) {
constexpr TLogLevel level = logDEBUG1;
LOG(level) << "Sending Module";

View File

@ -161,6 +161,7 @@ class Module : public virtual slsDetectorDefs {
void stopReceiver();
void startAcquisition();
void stopAcquisition();
void restreamStopFromReceiver();
void startAndReadAll();
runStatus getRunStatus() const;
runStatus getReceiverStatus() const;
@ -290,6 +291,8 @@ class Module : public virtual slsDetectorDefs {
void setClientStreamingPort(int port);
sls::IpAddr getClientStreamingIP() const;
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 checkReceiverVersionCompatibility();
void restreamStopFromReceiver();
void setModule(sls_detector_module &module, bool trimbits = true);
int sendModule(sls_detector_module *myMod, sls::ClientSocket &client);
void updateReceiverStreamingIP();

View File

@ -110,23 +110,23 @@ TEST_CASE("adcvpp", "[.cmd][.new]") {
{
std::ostringstream oss;
proxy.Call("adcvpp", {"1"}, -1, PUT, oss);
REQUIRE(oss.str() == "adcvpp 1\n");
REQUIRE(oss.str() == "dac adcvpp 1\n");
}
{
std::ostringstream 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;
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) {
det.setDAC(defs::ADC_VPP, prev_val[i], false, {i});
}
} 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);
auto det_type = det.getDetectorType().squash();
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_THROWS(proxy.Call("adc", {"0"}, -1, PUT));
}

View File

@ -160,12 +160,12 @@ TEST_CASE("Setting and reading back EIGER dacs", "[.cmd][.dacs][.new]") {
{
std::ostringstream oss;
proxy.Call("vthreshold", {"1234"}, -1, PUT, oss);
REQUIRE(oss.str() == "vthreshold 1234\n");
REQUIRE(oss.str() == "dac vthreshold 1234\n");
}
{
std::ostringstream oss;
proxy.Call("vthreshold", {}, -1, GET, oss);
REQUIRE(oss.str() == "vthreshold 1234\n");
REQUIRE(oss.str() == "dac vthreshold 1234\n");
}
// Reset dacs after test
@ -231,44 +231,6 @@ TEST_CASE("Setting and reading back EIGER dacs", "[.cmd][.dacs][.new]") {
/* 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) */
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]") {
Detector det;
CmdProxy proxy(&det);

View File

@ -28,9 +28,9 @@ void test_dac(defs::dacIndex index, const std::string &dacname, int dacvalue) {
// other detectors
else {
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);
REQUIRE(oss_get.str() == dacname + " " + dacstr + "\n");
REQUIRE(oss_get.str() == "dac " + dacname + " " + dacstr + "\n");
}
// Reset all dacs to previous value
for (int i = 0; i != det.size(); ++i) {

View File

@ -106,121 +106,3 @@ TEST_CASE("Setting and reading back MOENCH dacs", "[.cmd][.dacs][.new]") {
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));
}
}

View File

@ -53,12 +53,12 @@ TEST_CASE("Setting and reading back MYTHEN3 dacs", "[.cmd][.dacs][.new]") {
{
std::ostringstream oss;
proxy.Call("vthreshold", {"1234"}, -1, PUT, oss);
REQUIRE(oss.str() == "vthreshold 1234\n");
REQUIRE(oss.str() == "dac vthreshold 1234\n");
}
{
std::ostringstream oss;
proxy.Call("vthreshold", {}, -1, GET, oss);
REQUIRE(oss.str() == "vthreshold 1234\n");
REQUIRE(oss.str() == "dac vthreshold 1234\n");
}
// Reset dacs after test

View File

@ -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 */
TEST_CASE("rx_dbitlist", "[.cmd][.rx][.new]") {

View File

@ -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 */
TEST_CASE("templist", "[.cmd][.new]") {
@ -1116,6 +1146,46 @@ TEST_CASE("dacvalues", "[.cmd][.new]") {
/* 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]") {
Detector 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 */
TEST_CASE("programfpga", "[.cmd][.new]") {

View File

@ -206,6 +206,8 @@ int ClientInterface::functionTable(){
flist[F_SET_RECEIVER_RATE_CORRECT] = &ClientInterface::set_rate_correct;
flist[F_SET_RECEIVER_SCAN] = &ClientInterface::set_scan;
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++) {
LOG(logDEBUG1) << "function fnum: " << i << " (" <<
@ -1657,4 +1659,21 @@ int ClientInterface::set_threshold(Interface &socket) {
verifyIdle(socket);
impl()->setThresholdEnergy(arg);
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);
}

View File

@ -159,6 +159,8 @@ class ClientInterface : private virtual slsDetectorDefs {
int set_rate_correct(sls::ServerInterface &socket);
int set_scan(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() {
if (receiver != nullptr) {

View File

@ -75,18 +75,28 @@ void DataStreamer::SetAdditionalJsonHeader(
}
void DataStreamer::CreateZmqSockets(int *nunits, uint32_t port,
const sls::IpAddr ip) {
const sls::IpAddr ip, int hwm) {
uint32_t portnum = port + index;
std::string sip = ip.str();
try {
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 (...) {
LOG(logERROR) << "Could not create Zmq socket on port " << portnum
<< " for Streamer " << index;
throw;
}
LOG(logINFO) << index << " Streamer: Zmq Server started at "
<< zmqSocket->GetZmqServerAddress();
<< zmqSocket->GetZmqServerAddress()
<< "[hwm: " << zmqSocket->GetSendHighWaterMark() << "]";
}
void DataStreamer::CloseZmqSocket() {

View File

@ -86,8 +86,10 @@ class DataStreamer : private virtual slsDetectorDefs, public ThreadObject {
* @param nunits pointer to number of theads/ units per detector
* @param port streaming port start index
* @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

Some files were not shown because too many files have changed in this diff Show More