mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-15 06:17:12 +02:00
Compare commits
65 Commits
Author | SHA1 | Date | |
---|---|---|---|
e942678139 | |||
72a028eaf3 | |||
907257891d | |||
0a79ae523b | |||
90496bcee8 | |||
ed2894dafd | |||
a74c9498e2 | |||
403989e2f8 | |||
7e8d11098a | |||
f9c9a53c8c | |||
90b1b97ffa | |||
50003cbc08 | |||
a799c4d2e2 | |||
700f532b5a | |||
a098bc4674 | |||
13bbd54a21 | |||
d84e9652d3 | |||
1ce39c48c7 | |||
9ddff523cd | |||
f7618fbb93 | |||
8501e1fb1f | |||
6faa4c821f | |||
da291d535e | |||
adcde9fd49 | |||
dde99a16b3 | |||
b200a2efc1 | |||
fe281bd1b1 | |||
878eab9fc3 | |||
4259d49b63 | |||
4dac9f2193 | |||
cb8e4365e3 | |||
0251aa9e63 | |||
7c047cab4a | |||
572332f870 | |||
d90bf6c7df | |||
5c8c3ae3f3 | |||
18136fed9d | |||
fc42720208 | |||
ae0a54a774 | |||
ae33622da2 | |||
c4a453fdbd | |||
672c0f4a07 | |||
05af370883 | |||
a6022b7cec | |||
72316fa2ce | |||
65523dcc94 | |||
df40665c5e | |||
8472cca81f | |||
110e57ff6c | |||
fdd6031add | |||
e7c65f44cb | |||
0063cc8eb2 | |||
27e6fc3c73 | |||
83e0eb8b01 | |||
7f8b5ac6c0 | |||
340abec016 | |||
a8b37e3932 | |||
0883c73e88 | |||
ef7e9d73a5 | |||
a8bdc1495c | |||
1c54dea9c7 | |||
cee286b6ad | |||
da8e0060d3 | |||
85da65ca15 | |||
4fe067363a |
279
README.md
279
README.md
@ -1,102 +1,233 @@
|
||||
### Note
|
||||
## Dependencies
|
||||
Before building from source make sure that you have the [software wiki](https://slsdetectorgroup.github.io/devdoc/dependencies.html) installed. If installing using conda, conda will manage the dependencies. Avoid also installing packages with pip.
|
||||
|
||||
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.
|
||||
## Documentaion
|
||||
Detailed documentation can be found in the [software wiki](https://slsdetectorgroup.github.io/devdoc/index.html) and on the [official site](https://www.psi.ch/en/detectors/software).
|
||||
|
||||
### Documentation
|
||||
##### 5.0.0 - Latest Release
|
||||
Detailed documentation on the latest release can be found in the [software wiki](https://slsdetectorgroup.github.io/devdoc/index.html) and on the [official site](https://www.psi.ch/en/detectors/software).
|
||||
## Installation
|
||||
|
||||
##### Older Releases
|
||||
Documentation is found in the package.
|
||||
### 1. Install binaries using conda
|
||||
Conda is not only useful to manage python environments but can also
|
||||
be used as a user space package manager. Dates in the tag (for eg. 2020.07.23.dev0)
|
||||
are from the developer branch. Please use released tags for stability.
|
||||
|
||||
We have three different packages available:
|
||||
* **slsdetlib** shared libraries and command line utilities
|
||||
* **slsdetgui** GUI
|
||||
* **slsdet** Python bindings
|
||||
|
||||
### Binaries
|
||||
Binaries for the slsDetectorPackage are available through conda.
|
||||
```
|
||||
#Add conda channels
|
||||
#Add channels for dependencies and our library
|
||||
conda config --add channels conda-forge
|
||||
conda config --add channels slsdetectorgroup
|
||||
conda config --set channel_priority strict
|
||||
|
||||
conda install slsdetlib #only shared lib and command line
|
||||
conda install slsdet #python bindings (includes slsdetlib)
|
||||
conda install slsdetgui #gui (includes qt4)
|
||||
|
||||
#Install specific version
|
||||
conda install slsdet=2020.03.02.dev0 #developer version from 3 March 2020
|
||||
#create and activate an environment with our library
|
||||
#replace 6.1.1 with the required tag
|
||||
conda create -n myenv slsdetlib=6.1.1
|
||||
conda activate myenv
|
||||
|
||||
#ready to use
|
||||
sls_detector_get exptime
|
||||
etc ...
|
||||
```
|
||||
|
||||
### Source code
|
||||
One can also obtain the source code from this repository and compile.
|
||||
```
|
||||
git clone https://github.com/slsdetectorgroup/slsDetectorPackage.git
|
||||
# List available versions
|
||||
# lib and binaries
|
||||
conda search slsdetlib
|
||||
# python
|
||||
conda search slsdet
|
||||
# gui
|
||||
conda search slsdetgui
|
||||
```
|
||||
|
||||
### 2. Build from source
|
||||
|
||||
##### 2.1 Download Source Code from github
|
||||
```
|
||||
git clone https://github.com/slsdetectorgroup/slsDetectorPackage.git --branch 7.0.0
|
||||
```
|
||||
|
||||
**Pybind for Python**<br>
|
||||
* **v7.0.0+**:
|
||||
pybind11 packaged into 'libs/pybind'. No longer a submodule. No need for "recursive" or "submodule update".
|
||||
|
||||
* **Older versions**:
|
||||
pybind11 is a submodule. Must be cloned using "recursive" and updated when switching between versions using the following commands.
|
||||
|
||||
```
|
||||
#### Dependencies
|
||||
# clone using recursive to get pybind11 submodule
|
||||
git clone --recursive https://github.com/slsdetectorgroup/slsDetectorPackage.git
|
||||
|
||||
Refer [this page](https://slsdetectorgroup.github.io/devdoc/dependencies.html) for dependencies.
|
||||
|
||||
|
||||
#### Compilation
|
||||
|
||||
Compiling can be done in two ways. Either with the convenience script
|
||||
cmk.sh or directly with cmake for more control.
|
||||
|
||||
**1. Compile using script cmk.sh**<br>
|
||||
|
||||
These are mainly aimed at those not familiar with using ccmake and cmake.
|
||||
# update submodule when switching between releases
|
||||
cd slsDetectorPackage
|
||||
git submodule update --init
|
||||
```
|
||||
The binaries are generated in slsDetectorPackage/build/bin directory.
|
||||
|
||||
Usage: ./cmk.sh [-c] [-b] [-p] [e] [t] [r] [g] [s] [u] [i] [m] [n] [-h] [z] [-d <HDF5 directory>] [-l Install directory] [-k <CMake command>] [-j <Number of threads>]
|
||||
-[no option]: only make
|
||||
-c: Clean
|
||||
-b: Builds/Rebuilds CMake files normal mode
|
||||
-p: Builds/Rebuilds Python API
|
||||
-h: Builds/Rebuilds Cmake files with HDF5 package
|
||||
-d: HDF5 Custom Directory
|
||||
-k: CMake command
|
||||
-l: Install directory
|
||||
-t: Build/Rebuilds only text client
|
||||
-r: Build/Rebuilds only receiver
|
||||
-g: Build/Rebuilds only gui
|
||||
-s: Simulator
|
||||
-u: Chip Test Gui
|
||||
-j: Number of threads to compile through
|
||||
-e: Debug mode
|
||||
-i: Builds tests
|
||||
-m: Manuals
|
||||
-n: Manuals without compiling doxygen (only rst)
|
||||
-z: Moench zmq processor
|
||||
##### 2.2 Build from source
|
||||
|
||||
|
||||
###### Build using CMake
|
||||
|
||||
```
|
||||
# outside slsDetecorPackage folder
|
||||
mkdir build && cd build
|
||||
|
||||
# configure & generate Makefiles using cmake
|
||||
# by listing all your options (alternately use ccmake described below)
|
||||
# cmake3 for some systems
|
||||
cmake ../slsDetectorPackage -DCMAKE_INSTALL_PREFIX=/your/install/path
|
||||
|
||||
# compiled to the build/bin directory
|
||||
make -j12 #or whatever number of cores you are using to build
|
||||
|
||||
# install headers and libs in /your/install/path directory
|
||||
make install
|
||||
```
|
||||
|
||||
Instead of the cmake command, one can use ccmake to get a list of options to configure and generate Makefiles at ease.
|
||||
|
||||
|
||||
```
|
||||
# ccmake3 for some systems
|
||||
ccmake ..
|
||||
|
||||
# choose the options
|
||||
# first press [c] - configure
|
||||
# then press [g] - generate
|
||||
```
|
||||
|
||||
|Example cmake options|Comment|
|
||||
|---|---|
|
||||
| -DSLS_USE_PYTHON=ON | Python |
|
||||
| -DPython_FIND_VIRTUALENV=ONLY | Python from only the conda environment |
|
||||
| -DZeroMQ_HINT=/usr/lib64 | Use system zmq instead |
|
||||
| -DSLS_USE_GUI=ON | GUI |
|
||||
|
||||
|
||||
###### Build using in-built cmk.sh script
|
||||
|
||||
```
|
||||
The binaries are generated in slsDetectorPackage/build/bin directory.
|
||||
|
||||
Usage: ./cmk.sh [-b] [-c] [-d <HDF5 directory>] [e] [g] [-h] [i] [-j <Number of threads>]
|
||||
[-k <CMake command>] [-l <Install directory>] [m] [n] [-p] [-q <Zmq hint directory>]
|
||||
[r] [s] [t] [u] [z]
|
||||
-[no option]: only make
|
||||
-b: Builds/Rebuilds CMake files normal mode
|
||||
-c: Clean
|
||||
-d: HDF5 Custom Directory
|
||||
-e: Debug mode
|
||||
-g: Build/Rebuilds gui
|
||||
-h: Builds/Rebuilds Cmake files with HDF5 package
|
||||
-i: Builds tests
|
||||
-j: Number of threads to compile through
|
||||
-k: CMake command
|
||||
-l: Install directory
|
||||
-m: Manuals
|
||||
-n: Manuals without compiling doxygen (only rst)
|
||||
-p: Builds/Rebuilds Python API
|
||||
-q: Zmq hint directory
|
||||
-r: Build/Rebuilds only receiver
|
||||
-s: Simulator
|
||||
-t: Build/Rebuilds only text client
|
||||
-u: Chip Test Gui
|
||||
-z: Moench zmq processor
|
||||
|
||||
|
||||
# get all options
|
||||
./cmk.sh -?
|
||||
# display all options
|
||||
./cmk.sh -?
|
||||
|
||||
# new build and compile in parallel:
|
||||
./cmk.sh -bj5
|
||||
```
|
||||
|
||||
**2. Compile without script**<br>
|
||||
Use cmake to create out-of-source builds, by creating a build folder parallel to source directory. This would create a debug build with address sanitizers.
|
||||
```
|
||||
$ mkdir build
|
||||
$ cd build
|
||||
$ cmake ../slsDetectorPackage -DCMAKE_BUILD_TYPE=Debug -DSLS_USE_SANITIZER=ON
|
||||
$ make -j12 #or whatever number of threads wanted
|
||||
# new build and compile in parallel (recommended basic option):
|
||||
./cmk.sh -cbj5
|
||||
|
||||
# new build, python and compile in parallel:
|
||||
./cmk.sh -cbpj5
|
||||
|
||||
#To use the system zmq (/usr/lib64) instead
|
||||
./cmk.sh -cbj5 -q /usr/lib64
|
||||
```
|
||||
|
||||
To install binaries using CMake
|
||||
###### Build on old distributions
|
||||
|
||||
If your linux distribution doesn't come with a C++11 compiler (gcc>4.8) then
|
||||
it's possible to install a newer gcc using conda and build the slsDetectorPackage
|
||||
using this compiler
|
||||
|
||||
```
|
||||
git clone --recursive https://github.com/slsdetectorgroup/slsDetectorPackage.git
|
||||
mkdir build && cd build
|
||||
cmake ../slsDetectorPackage -DCMAKE_INSTALL_PREFIX=/your/install/path
|
||||
make -j12 #or whatever number of cores you are using to build
|
||||
make install
|
||||
#Create an environment with the dependencies
|
||||
conda create -n myenv gxx_linux-64 cmake zmq
|
||||
conda activate myenv
|
||||
|
||||
# outside slsDetecorPackage folder
|
||||
mkdir build && cd build
|
||||
cmake ../slsDetectorPackage -DCMAKE_PREFIX_PATH=$CONDA_PREFIX
|
||||
make -j12
|
||||
```
|
||||
|
||||
###### Build slsDetectorGui (Qt5)
|
||||
|
||||
1. Using pre-built binary on conda
|
||||
```
|
||||
conda create -n myenv slsdetgui=7.0.0
|
||||
conda activate myenv
|
||||
```
|
||||
|
||||
2. Using system installation on RHEL7
|
||||
```
|
||||
yum install qt5-qtbase-devel.x86_64
|
||||
yum install qt5-qtsvg-devel.x86_64
|
||||
```
|
||||
|
||||
3. Using conda
|
||||
```
|
||||
#Add channels for dependencies and our library
|
||||
conda config --add channels conda-forge
|
||||
conda config --add channels slsdetectorgroup
|
||||
conda config --set channel_priority strict
|
||||
|
||||
# create environment to compile
|
||||
# on rhel7
|
||||
conda create -n slsgui zeromq gxx_linux-64 gxx_linux-64 mesa-libgl-devel-cos6-x86_64 qt
|
||||
# on fedora or newer systems
|
||||
conda create -n slsgui zeromq qt
|
||||
|
||||
# when using conda compilers, would also need libgl, but no need for it on fedora unless maybe using it with ROOT
|
||||
|
||||
# activate environment
|
||||
conda activate slsgui
|
||||
|
||||
# compile with cmake outside slsDetecorPackage folder
|
||||
mkdir build && cd build
|
||||
cmake ../slsDetectorPackage -DSLS_USE_GUI=ON
|
||||
make -j12
|
||||
|
||||
# or compile with cmk.sh
|
||||
cd slsDetectorPackage
|
||||
./cmk.sh -cbgj9
|
||||
```
|
||||
|
||||
###### Build documentation from package
|
||||
The documentation for the slsDetectorPackage is build using a combination
|
||||
of Doxygen, Sphinx and Breathe. The easiest way to install the dependencies
|
||||
is to use conda
|
||||
|
||||
```
|
||||
conda create -n myenv python sphinx_rtd_theme breathe
|
||||
```
|
||||
|
||||
```
|
||||
# using cmake or ccmake to enable DSLS_BUILD_DOCS
|
||||
# outside slsDetecorPackage folder
|
||||
mkdir build && cd build
|
||||
cmake ../slsDetectorPackage -DSLS_BUILD_DOCS=ON
|
||||
|
||||
make docs # generate API docs and build Sphinx RST
|
||||
make rst # rst only, saves time in case the API did not change
|
||||
```
|
||||
|
||||
|
||||
### Support
|
||||
## Support
|
||||
dhanya.thattil@psi.ch
|
||||
erik.frojdh@psi.ch
|
||||
erik.frojdh@psi.ch
|
||||
|
227
RELEASE.txt
227
RELEASE.txt
@ -1,37 +1,39 @@
|
||||
SLS Detector Package Minor Release 7.0.0.rc1 released on 12.12.2021
|
||||
===================================================================
|
||||
SLS Detector Package Major Release 7.0.0 released on 24.02.2023
|
||||
===============================================================
|
||||
|
||||
This document describes the differences between v7.0.0.rc1 and v6.1.2
|
||||
This document describes the differences between v7.0.0 and v6.1.2
|
||||
|
||||
|
||||
|
||||
CONTENTS
|
||||
--------
|
||||
1. New, Changed or Resolved Features
|
||||
1.1. Compilation
|
||||
1.2. Callback
|
||||
1.3. Python
|
||||
1.4. Client
|
||||
1.5. Detector Server
|
||||
1.6. Simulator
|
||||
1.7. Receiver
|
||||
2. On-board Detector Server Compatibility
|
||||
3. Firmware Requirements
|
||||
4. Kernel Requirements
|
||||
5. Download, Documentation & Support
|
||||
1 New, Changed or Resolved Features
|
||||
1.1 Compilation
|
||||
1.2 Callback
|
||||
1.3 Python
|
||||
1.4 Client
|
||||
1.5 Detector Server
|
||||
1.6 Simulator
|
||||
1.7 Receiver
|
||||
1.8 Gui
|
||||
2 On-board Detector Server Compatibility
|
||||
3 Firmware Requirements
|
||||
4 Kernel Requirements
|
||||
5 Download, Documentation & Support
|
||||
|
||||
|
||||
|
||||
|
||||
1. New or Changed Features
|
||||
==========================
|
||||
1 New, Changed or Resolved Features
|
||||
=====================================
|
||||
|
||||
|
||||
1.1. Compilation
|
||||
----------------
|
||||
1.1 Compilation
|
||||
==================
|
||||
|
||||
|
||||
General:
|
||||
--------
|
||||
|
||||
|
||||
* Custom location to find ZeroMQ
|
||||
@ -53,6 +55,7 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
|
||||
|
||||
|
||||
Gui:
|
||||
----
|
||||
|
||||
|
||||
* Qt5 and in-built compressed Qwt 6.1.5
|
||||
@ -63,6 +66,7 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
|
||||
|
||||
|
||||
Python:
|
||||
-------
|
||||
|
||||
|
||||
* Install python extension
|
||||
@ -83,15 +87,17 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
|
||||
|
||||
|
||||
|
||||
1.2. Callback
|
||||
-------------
|
||||
1.2 Callback
|
||||
=============
|
||||
|
||||
|
||||
* Datatype of Metadata [registerCallBackRawDataReady, registerCallBackRawDataModifyReady]
|
||||
* Datatype of Metadata [registerCallBackRawDataReady,
|
||||
registerCallBackRawDataModifyReady]
|
||||
Datatype changed from char* to sls_receiver_header.
|
||||
|
||||
|
||||
* Datatype of Size [registerCallBackRawDataReady, registerCallBackRawDataModifyReady]
|
||||
* Datatype of Size [registerCallBackRawDataReady,
|
||||
registerCallBackRawDataModifyReady]
|
||||
Datatype changed from uint32_t to size_t
|
||||
|
||||
|
||||
@ -111,13 +117,8 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
|
||||
|
||||
|
||||
|
||||
1.3. Python
|
||||
-----------
|
||||
|
||||
|
||||
* Defines in sls_detector_defs
|
||||
sls_detetor_defs parsed and #defines extracted into defines.py
|
||||
For exmaple, one can use slsdet.LOCALHOST_IP
|
||||
1.3 Python
|
||||
===========
|
||||
|
||||
|
||||
* Python sub-microsecond resolution
|
||||
@ -132,11 +133,25 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
|
||||
Refer exptime help for examples.
|
||||
|
||||
|
||||
1.4. Client
|
||||
-----------
|
||||
* Defines in sls_detector_defs
|
||||
sls_detetor_defs parsed and #defines extracted into defines.py
|
||||
For exmaple, one can use slsdet.LOCALHOST_IP
|
||||
|
||||
|
||||
* Concatenated hostnames
|
||||
Hostnames concatenated using '+' was not split up in Python API. Fixed.
|
||||
|
||||
|
||||
* Added many commands to python API
|
||||
|
||||
|
||||
|
||||
1.4 Client
|
||||
===========
|
||||
|
||||
|
||||
Breaking API:
|
||||
-------------
|
||||
|
||||
|
||||
* Versioning
|
||||
@ -190,7 +205,6 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
|
||||
command. Therefore, to keep the image from callback, invert the hostname
|
||||
order in the config file.
|
||||
|
||||
|
||||
* Deprecated CopyDetectorServer
|
||||
Command line: copydetectorserver, API: copydetectorserver
|
||||
Removed. Use updatedetectorserver
|
||||
@ -250,6 +264,7 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
|
||||
|
||||
|
||||
New commands:
|
||||
-------------
|
||||
|
||||
|
||||
* [Eiger][Gotthard][Gotthard2][Mythen3][Jungfrau] Master
|
||||
@ -338,8 +353,14 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
|
||||
Command line: badchannels, API: getBadChannels/ setBadChannels
|
||||
Set bad channels from file with a list of channels, which will be masked
|
||||
out. Also does trimming. A detector level command will require the channel
|
||||
numbers accordingly. The file also extended to include commas, colons range)
|
||||
and removes duplicates.
|
||||
numbers accordingly. The file and the command line is also extended to
|
||||
include commas, colons range and removes duplicates.
|
||||
|
||||
API allows badchannels as a 2D vector (for every module) or
|
||||
a 1D vector with positions.
|
||||
|
||||
Command line: Setting it to "none" or "0" will reset all the bad channels.
|
||||
API: Empty vector will reset all the bad channels.
|
||||
|
||||
|
||||
* [Moench][Ctb] Starting frame number
|
||||
@ -375,6 +396,7 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
|
||||
|
||||
|
||||
New commands for Receiver only:
|
||||
-------------------------------
|
||||
|
||||
|
||||
* Arping for 10GbE
|
||||
@ -404,6 +426,7 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
|
||||
|
||||
|
||||
Additonal Features:
|
||||
-------------------
|
||||
|
||||
|
||||
* Non-blocking start
|
||||
@ -424,28 +447,71 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
|
||||
|
||||
* Udp Source IP
|
||||
Command line: udp_srcip(2), API: getSourceUDPIP(2)/ setSourceUDPIP(2)
|
||||
One can also set this to 'auto' for 1 GbE data. It will set to IP of
|
||||
rx_hostname (as in udp_dstip)
|
||||
One can also set this to 'auto' for 1 GbE data and virtual detectors.
|
||||
It will set to IP of detector. Not available for GotthardI.
|
||||
|
||||
* Incrementing default receiver tcp port
|
||||
Automatically incrementing the default receiver tcp port for every module
|
||||
when creating shared memory.
|
||||
|
||||
|
||||
* Command line pattern commands also prints level index at output now.
|
||||
|
||||
|
||||
* Zmq High water mark (hwm) and buffer size
|
||||
When switching to the gui, hwm for the gui and the reciver was set to 2.
|
||||
Now, if hwm is less than 25, the zmq receive buffer size is set to 1Mb
|
||||
in the gui, else to 0 (os default). Similarly, zmq send buffer size is
|
||||
also set for the receiver. These functions and option to rebind the zmq
|
||||
publisher socket is also available now.
|
||||
|
||||
|
||||
Changes or Fixes:
|
||||
-----------------
|
||||
|
||||
|
||||
* [Jungfrau][Gotthard2][Mythen3][Gotthard][Moench][Ctb] Can't stop
|
||||
This bug was introduced in 6.1.1, when stopping an acquisition saying it
|
||||
cannot stop, even though it was successful. It is fixed now.
|
||||
|
||||
Note: Only if the detector is not in idle or stopped status, will the
|
||||
command to stop acquisition go to the detector. This was introduced in 6.1.2
|
||||
to handle multiple modules getting asynchronous start and stops from
|
||||
different processes.
|
||||
|
||||
|
||||
* [Gotthard] Set delay exception
|
||||
Set delay threw an exception as it adds master delay in verification
|
||||
even if it was not a master. Fixed.
|
||||
|
||||
|
||||
* Shared memory access failure
|
||||
After a free, one could get seg fault if one called a function accessing
|
||||
the shared memory structure without first loading the config file that
|
||||
creates the shared memory. Fixed, a proper exception thrown if one tries
|
||||
to access shared memory without creating it first.
|
||||
|
||||
|
||||
* Stop detector when receiver is stuck
|
||||
If receiver was stuck or crashed, stop acquisition command should
|
||||
stop detector first before checking receiver status to restream
|
||||
dummy header. Fixed.
|
||||
|
||||
|
||||
* Free and config command fail
|
||||
Free and config command checked mismatch of size of shared memory before
|
||||
freeing or loading new config. Fixed.
|
||||
|
||||
|
||||
* Incorrect user provided detector size
|
||||
Command line: detsize, API: getDetectorSize/ setDetectorSize
|
||||
If a user sets an incorrect detector size that is greater than the actual
|
||||
detector size, then it would have set an incorrect number of modules,
|
||||
affecting number of ports in the receiver. This has been fixed and now
|
||||
the user can only set less than or equal to the maximum dimension
|
||||
it could have.
|
||||
|
||||
|
||||
* sls_detector_help or sls_detector_get -h
|
||||
Should not create Detector object. Fixed.
|
||||
|
||||
@ -504,13 +570,17 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
|
||||
are requested via the control server again insetad of the stop server
|
||||
due to configuration and definitions in the control server.
|
||||
|
||||
|
||||
* UDP Source Mac addresses
|
||||
Only allowing unicast addresses (LSB of first octet must be 0).
|
||||
|
||||
|
||||
1.5. Detector Server
|
||||
--------------------
|
||||
1.5 Detector Server
|
||||
====================
|
||||
|
||||
|
||||
Config file:
|
||||
------------
|
||||
|
||||
* [Eiger][Gotthard2][Gotthard] Master
|
||||
Using config file with 'master' with argument (master=1, slave=0)
|
||||
@ -522,6 +592,7 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
|
||||
|
||||
|
||||
Command line arguments:
|
||||
-----------------------
|
||||
|
||||
* They have precedence over config files.
|
||||
|
||||
@ -542,6 +613,7 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
|
||||
|
||||
|
||||
Fixes:
|
||||
------
|
||||
|
||||
|
||||
* [Jungfrau][Eiger] Clear UDP destination
|
||||
@ -555,6 +627,15 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
|
||||
incorrect values. Fixed.
|
||||
|
||||
|
||||
* [Eiger] Quad Dynamic range
|
||||
Could not set dyanamic range in an Eiger Quad. Fixed.
|
||||
|
||||
|
||||
* [Eiger] Stop before first acquisition after power on
|
||||
Firmware fixed to handle a stop command before first acquisition after
|
||||
the module is powered on.
|
||||
|
||||
|
||||
* [Mythen3][Gotthard2] System clock change effects
|
||||
When changing the system clock (clkdiv 2), time settings should also be
|
||||
affected (exptime, period etc.). Fixed.
|
||||
@ -571,7 +652,11 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
|
||||
* [Mythen3] Server crash for setting vthrehsold
|
||||
Fixed.
|
||||
|
||||
|
||||
|
||||
* [Mythen3] trimming
|
||||
Fixed deserializing in trimming.
|
||||
|
||||
|
||||
* [Mythen3] Incorrect gaincaps
|
||||
Setting threshold energy was overwriting gaincaps with settings enum. Fixed.
|
||||
|
||||
@ -582,6 +667,7 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
|
||||
|
||||
|
||||
Changes:
|
||||
--------
|
||||
|
||||
|
||||
* [Jungfrau] Temporary fix for stop in 6.1.1
|
||||
@ -595,6 +681,9 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
|
||||
defaults according to burst mode.
|
||||
|
||||
|
||||
* [Mythen3] Change in default clock dividers.
|
||||
|
||||
|
||||
* [Mythen3] DAC check for settings
|
||||
Verify DAC values for each setting has been temporarily switched off
|
||||
|
||||
@ -625,6 +714,7 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
|
||||
|
||||
|
||||
Additional Features:
|
||||
--------------------
|
||||
|
||||
|
||||
* Stop server startup errors
|
||||
@ -652,8 +742,8 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
|
||||
|
||||
|
||||
|
||||
1.6. Simulator
|
||||
--------------
|
||||
1.6 Simulator
|
||||
==============
|
||||
|
||||
|
||||
* Command line arguments. Please refer to previous section on Detector Server.
|
||||
@ -685,11 +775,12 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
|
||||
|
||||
|
||||
|
||||
1.7. Receiver
|
||||
-------------
|
||||
1.7 Receiver
|
||||
=============
|
||||
|
||||
|
||||
Breaking API:
|
||||
-------------
|
||||
|
||||
|
||||
* Namespace sls
|
||||
@ -718,6 +809,7 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
|
||||
|
||||
|
||||
Fixes:
|
||||
------
|
||||
|
||||
|
||||
* Refactored and fixed minor issues
|
||||
@ -768,6 +860,7 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
|
||||
|
||||
|
||||
Changes:
|
||||
--------
|
||||
|
||||
|
||||
* Master file created at end of acquisition
|
||||
@ -781,6 +874,7 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
|
||||
|
||||
|
||||
Additional Features:
|
||||
--------------------
|
||||
|
||||
|
||||
* [Gotthard2] 25um image reconstruction in virtual HDF5
|
||||
@ -797,14 +891,19 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
|
||||
|
||||
|
||||
|
||||
1.8. Gui
|
||||
--------
|
||||
1.8 Gui
|
||||
========
|
||||
|
||||
|
||||
* Refer Compilation topic for changes.
|
||||
|
||||
|
||||
* [Jungfrau][Eiger] Gap pixels
|
||||
Enabled by default in the gui.
|
||||
|
||||
|
||||
* High voltage moved from Developer tab to Settings tab.
|
||||
* High voltage
|
||||
Moved from Developer tab to Settings tab.
|
||||
|
||||
|
||||
* Gain plot zooming
|
||||
@ -819,10 +918,23 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
|
||||
* [Mythen3][Gotthard2] Crashes
|
||||
Additional locking Added
|
||||
|
||||
|
||||
* File path set in detector after choosing a directory in dialog (without
|
||||
pressing enter). Before, it was only set in the display box, but lost
|
||||
when switching tabs.
|
||||
|
||||
|
||||
* X, Y, Z axis limits
|
||||
Did not reflect on the current plot. Fixed.
|
||||
|
||||
|
||||
* Refer 'Client' notes on Zmq High water mark and Zmq buffer size for
|
||||
fast detectors.
|
||||
|
||||
|
||||
|
||||
2. On-board Detector Server Compatibility
|
||||
|
||||
2 On-board Detector Server Compatibility
|
||||
==========================================
|
||||
|
||||
|
||||
@ -849,16 +961,16 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
|
||||
|
||||
|
||||
|
||||
3. Firmware Requirements
|
||||
3 Firmware Requirements
|
||||
========================
|
||||
|
||||
|
||||
Eiger 17.02.2022 (v30)
|
||||
Eiger 20.02.2023 (v31)
|
||||
|
||||
Jungfrau 04.11.2022 (v1.4, HW v1.0)
|
||||
03.11.2022 (v2.4, HW v2.0)
|
||||
|
||||
Mythen3 05.12.2022 (v1.4)
|
||||
Mythen3 24.01.2023 (v1.4)
|
||||
|
||||
Gotthard2 23.11.2022 (v0.3)
|
||||
|
||||
@ -898,22 +1010,22 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
|
||||
|
||||
|
||||
|
||||
4. Kernel Requirements
|
||||
4 Kernel Requirements
|
||||
======================
|
||||
|
||||
Blackfin
|
||||
========
|
||||
--------
|
||||
Latest version: Fri Oct 29 00:00:00 2021
|
||||
|
||||
Older ones will work, but might have issues with programming firmware via
|
||||
the package.
|
||||
|
||||
Nios
|
||||
====
|
||||
-----
|
||||
Compatible version: Mon May 10 18:00:21 CEST 2021
|
||||
|
||||
Kernel Upgrade
|
||||
==============
|
||||
---------------
|
||||
Eiger via bit files
|
||||
Others via command
|
||||
|
||||
@ -926,7 +1038,7 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
|
||||
|
||||
|
||||
|
||||
5. Download, Documentation & Support
|
||||
5 Download, Documentation & Support
|
||||
====================================
|
||||
|
||||
Download
|
||||
@ -982,6 +1094,9 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
|
||||
https://slsdetectorgroup.github.io/devdoc/udpheader.html
|
||||
https://slsdetectorgroup.github.io/devdoc/udpdetspec.html
|
||||
|
||||
slsReceiver Zmq Format:
|
||||
https://slsdetectorgroup.github.io/devdoc/slsreceiver.html#zmq-json-header-format
|
||||
|
||||
TroubleShooting:
|
||||
https://slsdetectorgroup.github.io/devdoc/troubleshooting.html
|
||||
https://slsdetectorgroup.github.io/devdoc/troubleshooting.html#receiver-pc-tuning-options
|
||||
|
2
cmk.sh
2
cmk.sh
@ -33,7 +33,7 @@ Usage: $0 [-b] [-c] [-d <HDF5 directory>] [e] [g] [-h] [i] [-j <Number of thread
|
||||
-c: Clean
|
||||
-d: HDF5 Custom Directory
|
||||
-e: Debug mode
|
||||
-g: Build/Rebuilds only gui
|
||||
-g: Build/Rebuilds gui
|
||||
-h: Builds/Rebuilds Cmake files with HDF5 package
|
||||
-i: Builds tests
|
||||
-j: Number of threads to compile through
|
||||
|
@ -116,12 +116,16 @@ Program from console
|
||||
|
||||
# Always ensure that the client and server software are of the same release.
|
||||
|
||||
# copies server from tftp folder of pc, links new server to jungfrauDetectorServer,
|
||||
# copies server, links new server to jungfrauDetectorServer,
|
||||
# removes old server from respawn, sets up new lnked server to respawn
|
||||
# programs fpga,
|
||||
# reboots
|
||||
# programs fpga, reboots
|
||||
|
||||
# v5.0.0 - 6.0.0 (copies server from tftp folder of the pc)
|
||||
sls_detector_put update jungfrauDetectorServervxxx pcxxx xx.pof
|
||||
|
||||
# v6.1.1 - present (copies server from the full path provided)
|
||||
sls_detector_put update jungfrauDetectorServervxxx xx.pof
|
||||
|
||||
# Or only program firmware
|
||||
sls_detector_put programfpga xxx.pof
|
||||
|
||||
@ -182,11 +186,16 @@ Program from console
|
||||
|
||||
# Always ensure that the client and server software are of the same release.
|
||||
|
||||
# copies server from tftp folder of pc, links new server to mythen3DetectorServer,
|
||||
# programs fpga,
|
||||
# reboots
|
||||
# copies server, links new server to mythen3DetectorServer,
|
||||
# removes old server from respawn, sets up new lnked server to respawn
|
||||
# programs fpga, reboots
|
||||
|
||||
# v5.0.0 - 6.0.0 (copies server from tftp folder of the pc)
|
||||
sls_detector_put update mythen3DetectorServervxxx pcxxx xxx.rbf
|
||||
|
||||
# v6.1.1 - present (copies server from the full path provided)
|
||||
sls_detector_put update mythen3DetectorServervxxx xxx.rbf
|
||||
|
||||
# Or only program firmware
|
||||
sls_detector_put programfpga xxx.rbf
|
||||
|
||||
@ -211,11 +220,16 @@ Program from console
|
||||
|
||||
# Always ensure that the client and server software are of the same release.
|
||||
|
||||
# copies server from tftp folder of pc, links new server to gotthard2DetectorServer,
|
||||
# programs fpga,
|
||||
# reboots
|
||||
# copies server, links new server to gotthard2DetectorServer,
|
||||
# removes old server from respawn, sets up new lnked server to respawn
|
||||
# programs fpga, reboots
|
||||
|
||||
# v5.0.0 - 6.0.0 (copies server from tftp folder of the pc)
|
||||
sls_detector_put update gotthard2DetectorServervxxx pcxxx xxx.rbf
|
||||
|
||||
# v6.1.1 - present (copies server from the full path provided)
|
||||
sls_detector_put update gotthard2DetectorServervxxx xxx.rbf
|
||||
|
||||
# Or only program firmware
|
||||
sls_detector_put programfpga xxx.rbf
|
||||
|
||||
@ -257,12 +271,16 @@ Program from console
|
||||
|
||||
# Always ensure that the client and server software are of the same release.
|
||||
|
||||
# copies server from tftp folder of pc, links new server to moenchDetectorServer,
|
||||
# copies server, links new server to moenchDetectorServer,
|
||||
# removes old server from respawn, sets up new lnked server to respawn
|
||||
# programs fpga,
|
||||
# reboots
|
||||
# programs fpga, reboots
|
||||
|
||||
# v5.0.0 - 6.0.0 (copies server from tftp folder of the pc)
|
||||
sls_detector_put update moenchDetectorServervxxx pcxxx xx.pof
|
||||
|
||||
# v6.1.1 - present (copies server from the full path provided)
|
||||
sls_detector_put update moenchDetectorServervxxx xx.pof
|
||||
|
||||
# Or only program firmware
|
||||
sls_detector_put programfpga xxx.pof
|
||||
|
||||
@ -288,12 +306,16 @@ Program from console
|
||||
|
||||
# Always ensure that the client and server software are of the same release.
|
||||
|
||||
# copies server from tftp folder of pc, links new server to ctbDetectorServer,
|
||||
# copies server, links new server to ctbDetectorServer,
|
||||
# removes old server from respawn, sets up new lnked server to respawn
|
||||
# programs fpga,
|
||||
# reboots
|
||||
# programs fpga, reboots
|
||||
|
||||
# v5.0.0 - 6.0.0 (copies server from tftp folder of the pc)
|
||||
sls_detector_put update ctbDetectorServervxxx pcxxx xx.pof
|
||||
|
||||
# v6.1.1 - present (copies server from the full path provided)
|
||||
sls_detector_put update ctbDetectorServervxxx xx.pof
|
||||
|
||||
# Or only program firmware
|
||||
sls_detector_put programfpga xxx.pof
|
||||
|
||||
|
@ -1,14 +1,3 @@
|
||||
|
||||
|
||||
|
||||
.. note ::
|
||||
|
||||
The default branch of our git repository is developer. It contains the
|
||||
latest development version. It is expected to compile and work but
|
||||
features might be added or tweaked. In some cases the API might also change
|
||||
without being communicated. If absolute stability of the API is needed please
|
||||
use one of the release versions.
|
||||
|
||||
.. warning ::
|
||||
|
||||
Before building from source make sure that you have the
|
||||
@ -161,7 +150,7 @@ Build using in-built cmk.sh script
|
||||
-c: Clean
|
||||
-d: HDF5 Custom Directory
|
||||
-e: Debug mode
|
||||
-g: Build/Rebuilds only gui
|
||||
-g: Build/Rebuilds gui
|
||||
-h: Builds/Rebuilds Cmake files with HDF5 package
|
||||
-i: Builds tests
|
||||
-j: Number of threads to compile through
|
||||
@ -178,17 +167,17 @@ Build using in-built cmk.sh script
|
||||
-z: Moench zmq processor
|
||||
|
||||
|
||||
# get all options
|
||||
# display all options
|
||||
./cmk.sh -?
|
||||
|
||||
# new build and compile in parallel:
|
||||
./cmk.sh -bj5
|
||||
# new build and compile in parallel (recommended basic option):
|
||||
./cmk.sh -cbj5
|
||||
|
||||
# new build, python and compile in parallel:
|
||||
./cmk.sh -bpj5
|
||||
./cmk.sh -cbpj5
|
||||
|
||||
#To use the system zmq (/usr/lib64) instead
|
||||
./cmk.sh -bj5 -q /usr/lib64
|
||||
./cmk.sh -cbj5 -q /usr/lib64
|
||||
|
||||
|
||||
|
||||
|
@ -224,6 +224,45 @@ ZMQ: Json Header Format
|
||||
+--------------+----------------------------------------------+
|
||||
|
||||
|
||||
SLS Receiver Header Format
|
||||
--------------------------
|
||||
|
||||
It is 112 bytes and consists of:
|
||||
* 48 bytes of the SLS Detector Header (described in :ref:`the current detector header <detector udp header>`)
|
||||
* 64 bytes of packet mask
|
||||
|
||||
.. code-block:: cpp
|
||||
|
||||
typedef struct {
|
||||
uint64_t frameNumber;
|
||||
uint32_t expLength;
|
||||
uint32_t packetNumber;
|
||||
uint64_t detSpec1;
|
||||
uint64_t timestamp;
|
||||
uint16_t modId;
|
||||
uint16_t row;
|
||||
uint16_t column;
|
||||
uint16_t detSpec2;
|
||||
uint32_t detSpec3;
|
||||
uint16_t detSpec4;
|
||||
uint8_t detType;
|
||||
uint8_t version;
|
||||
} sls_detector_header;
|
||||
|
||||
struct sls_receiver_header {
|
||||
sls_detector_header detHeader; /**< is the detector header */
|
||||
sls_bitset packetsMask; /**< is the packets caught bit mask */
|
||||
};
|
||||
|
||||
|
||||
.. note ::
|
||||
|
||||
| The packetNumber in the SLS Receiver Header will be modified to number of packets caught by receiver for that frame. For eg. Jungfrau will have 128 packets per frame. If it is less, then this is a partial frame due to missing packets.
|
||||
|
||||
| Furthermore, the bit mask will specify which packets have been received.
|
||||
|
||||
|
||||
|
||||
|
||||
File format
|
||||
--------------
|
||||
@ -256,8 +295,6 @@ Some file name examples:
|
||||
Each acquisition will create a master file that can be enabled/disabled using **fmaster**. This should have parameters relevant to the acquisition.
|
||||
|
||||
|
||||
SLS Receiver Header consist of SLS Detector Header + 64 bytes of bitmask, altogether 112 bytes. The packetNumber in the sls detector header part, will be updated to number of packets caught by receiver for that frame. Furthermore, the bit mask will specify which packets have been received.
|
||||
|
||||
**Binary file format**
|
||||
|
||||
This is the default file format.
|
||||
|
@ -11,7 +11,7 @@ Current Version
|
||||
|
||||
**v2.0 (slsDetectorPackage v7.0.0+)**
|
||||
|
||||
.. table:: <---------------------------------------------------- 8 bytes ---------------------------------------------------->
|
||||
.. table:: <---------------------------------------------------- 8 bytes per row --------------------------------------------->
|
||||
:align: center
|
||||
:widths: 30,30,30,15,15
|
||||
|
||||
|
@ -1,18 +1,18 @@
|
||||
# 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
|
||||
|
||||
# receiver hostname
|
||||
rx_hostname mpc1922:2010
|
||||
|
||||
# udp destination ip from rx_hostname
|
||||
udp_dstip auto
|
||||
|
||||
# output file directory
|
||||
fpath /tmp
|
||||
|
||||
@ -27,418 +27,7 @@ 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
|
||||
patloop 0 0x013a 0x016b
|
||||
patnloop 0 0x199
|
||||
patloop 1 0x0400 0x0400
|
||||
patnloop 1 0
|
||||
patloop 2 0x0400 0x0400
|
||||
patnloop 2 0
|
||||
patwait 0 0x00aa
|
||||
patwaittime 0 10000
|
||||
patwait 1 0x0400
|
||||
patwaittime 1 0
|
||||
patwait 2 0x0400
|
||||
patwaittime 2 0
|
||||
pattern /tmp/pattern.pat
|
||||
|
||||
# dacs
|
||||
dac 6 800
|
||||
|
@ -1,13 +1,13 @@
|
||||
# detector hostname
|
||||
hostname localhost:1900
|
||||
|
||||
# receiver hostname
|
||||
rx_hostname mpc1922:2000
|
||||
|
||||
# udp destination ports
|
||||
udp_dstport 50000
|
||||
udp_dstport2 50001
|
||||
|
||||
# receiver hostname
|
||||
rx_hostname mpc1922:2000
|
||||
|
||||
# udp destination ip from rx_hostname
|
||||
udp_dstip auto
|
||||
|
||||
|
@ -1,15 +1,15 @@
|
||||
# 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
|
||||
|
||||
# receiver hostname
|
||||
rx_hostname mpc1922:2000+mpc1922:2001+
|
||||
|
||||
# udp destination ip from rx_hostname
|
||||
udp_dstip auto
|
||||
|
||||
|
@ -1,18 +1,18 @@
|
||||
# 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
|
||||
|
||||
# receiver hostname
|
||||
rx_hostname mpc1922:2004
|
||||
|
||||
# udp destination ip from rx_hostname
|
||||
udp_dstip auto
|
||||
|
||||
# output file directory
|
||||
fpath /tmp
|
||||
|
||||
|
@ -1,24 +1,12 @@
|
||||
# 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
|
||||
@ -27,6 +15,18 @@ udp_dstip2 auto
|
||||
# udp source ip (same subnet as udp_dstip)
|
||||
udp_srcip2 192.168.1.100
|
||||
|
||||
# receiver hostname
|
||||
rx_hostname mpc1922:2014
|
||||
|
||||
# udp destination ip from rx_hostname
|
||||
udp_dstip auto
|
||||
|
||||
# output file directory
|
||||
fpath /tmp
|
||||
|
||||
# disable file writing
|
||||
fwrite 0
|
||||
|
||||
# to enable 2nd interface for veto debugging
|
||||
numinterfaces 2
|
||||
|
||||
|
@ -1,21 +1,21 @@
|
||||
# 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
|
||||
|
||||
# receiver hostname
|
||||
rx_hostname mpc1922:2006
|
||||
|
||||
# udp destination ip from rx_hostname
|
||||
udp_dstip auto
|
||||
udp_dstip2 auto
|
||||
|
||||
# output file directory
|
||||
fpath /tmp
|
||||
|
||||
|
@ -4,13 +4,6 @@ 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
|
||||
@ -21,14 +14,21 @@ rx_hostname mpc1922
|
||||
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
|
||||
|
||||
# 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 ip from rx_hostname
|
||||
udp_dstip auto
|
||||
udp_dstip2 auto
|
||||
|
||||
# transmission delay frame
|
||||
0:txndelay_frame 0
|
||||
1:txndelay_frame 1
|
||||
|
@ -1,18 +1,18 @@
|
||||
# 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
|
||||
|
||||
# receiver hostname
|
||||
rx_hostname mpc1922:2008
|
||||
|
||||
# udp destination ip from rx_hostname
|
||||
udp_dstip auto
|
||||
|
||||
# output file directory
|
||||
fpath /tmp
|
||||
|
||||
|
@ -1,18 +1,18 @@
|
||||
# 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
|
||||
|
||||
# receiver hostname
|
||||
rx_hostname mpc1922:2012
|
||||
|
||||
# udp destination ip from rx_hostname
|
||||
udp_dstip auto
|
||||
|
||||
# output file directory
|
||||
fpath /tmp
|
||||
|
||||
|
@ -34,6 +34,7 @@ set( PYTHON_FILES
|
||||
slsdet/eiger.py
|
||||
slsdet/enums.py
|
||||
slsdet/errors.py
|
||||
slsdet/gaincaps.py
|
||||
slsdet/gotthard.py
|
||||
slsdet/pattern.py
|
||||
slsdet/gotthard2.py
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
import subprocess
|
||||
import locale
|
||||
out = subprocess.run(['g', 'list'], stdout = subprocess.PIPE, encoding=locale.getpreferredencoding())
|
||||
out = subprocess.run(['sls_detector_get', 'list'], stdout = subprocess.PIPE, encoding=locale.getpreferredencoding())
|
||||
cmd = out.stdout.splitlines()
|
||||
cmd.pop(0)
|
||||
|
||||
@ -99,7 +99,6 @@ intentionally_missing = [
|
||||
'temp_slowadc',
|
||||
'temp_sodl',
|
||||
'temp_sodr',
|
||||
'trigger', #use sendSoftwareTrigger
|
||||
'update', #use updateServerAndFirmare
|
||||
'udp_validate', #use validateUdpConfiguration
|
||||
'udp_reconfigure', #use reconfigureUdpDestination
|
||||
|
@ -11,7 +11,7 @@ from .gotthard2 import Gotthard2
|
||||
from .gotthard import Gotthard
|
||||
from .moench import Moench
|
||||
from .pattern import Pattern, patternParameters
|
||||
|
||||
from .gaincaps import Mythen3GainCapsWrapper
|
||||
|
||||
import _slsdet
|
||||
xy = _slsdet.xy
|
||||
|
@ -26,6 +26,7 @@ SHORT_STR_LENGTH=20
|
||||
MAX_PATTERN_LENGTH=0x2000
|
||||
MAX_PATTERN_LEVELS=6
|
||||
M3_MAX_PATTERN_LEVELS=3
|
||||
MAX_NUM_COUNTERS=3
|
||||
DEFAULT_STREAMING_TIMER_IN_MS=500
|
||||
NUM_RX_THREAD_IDS=9
|
||||
MAX_NUM_PACKETS=512
|
||||
|
@ -16,6 +16,7 @@ defs = slsDetectorDefs
|
||||
from .utils import element_if_equal, all_equal, get_set_bits, list_to_bitmask
|
||||
from .utils import Geometry, to_geo, element, reduce_time, is_iterable, hostname_list
|
||||
from _slsdet import xy
|
||||
from .gaincaps import Mythen3GainCapsWrapper
|
||||
from . import utils as ut
|
||||
from .proxy import JsonProxy, SlowAdcProxy, ClkDivProxy, MaxPhaseProxy, ClkFreqProxy, PatLoopProxy, PatNLoopProxy, PatWaitProxy, PatWaitTimeProxy
|
||||
from .registers import Register, Adc_register
|
||||
@ -231,7 +232,7 @@ class Detector(CppDetectorApi):
|
||||
"""
|
||||
[Jungfrau][Gotthard2][Myhten3][Gotthard][Ctb][Moench] Hardware version of detector.
|
||||
"""
|
||||
return ut.lhex(self.getHardwareVersion())
|
||||
return self.getHardwareVersion()
|
||||
|
||||
@property
|
||||
@element
|
||||
@ -263,6 +264,12 @@ class Detector(CppDetectorApi):
|
||||
"""Receiver version """
|
||||
return self.getReceiverVersion()
|
||||
|
||||
@property
|
||||
@element
|
||||
def serialnumber(self):
|
||||
"""Jungfrau][Gotthard][Mythen3][Gotthard2][CTB][Moench] Serial number of detector """
|
||||
return ut.lhex(self.getSerialNumber())
|
||||
|
||||
@property
|
||||
@element
|
||||
def rx_threads(self):
|
||||
@ -453,6 +460,56 @@ class Detector(CppDetectorApi):
|
||||
def triggers(self, n_triggers):
|
||||
self.setNumberOfTriggers(n_triggers)
|
||||
|
||||
def resetdacs(self, use_hardware_values):
|
||||
self.resetToDefaultDacs(use_hardware_values)
|
||||
|
||||
def trigger(self):
|
||||
self.sendSoftwareTrigger()
|
||||
|
||||
def blockingtrigger(self):
|
||||
self.sendSoftwareTrigger(True)
|
||||
|
||||
@property
|
||||
@element
|
||||
def gaincaps(self):
|
||||
"""
|
||||
[Mythen3] Gain caps. Enum: M3_GainCaps \n
|
||||
|
||||
Note
|
||||
----
|
||||
Options: M3_GainCaps, M3_C15sh, M3_C30sh, M3_C50sh, M3_C225ACsh, M3_C15pre
|
||||
|
||||
Example
|
||||
-------
|
||||
>>> d.gaincaps
|
||||
C15pre, C30sh
|
||||
>>> d.gaincaps = M3_GainCaps.M3_C30sh
|
||||
>>> d.gaincaps
|
||||
C30sh
|
||||
>>> d.gaincaps = M3_GainCaps.M3_C30sh | M3_GainCaps.M3_C15sh
|
||||
>>> d.gaincaps
|
||||
C15sh, C30sh
|
||||
"""
|
||||
res = [Mythen3GainCapsWrapper(it) for it in self.getGainCaps()]
|
||||
return res
|
||||
|
||||
@gaincaps.setter
|
||||
def gaincaps(self, caps):
|
||||
#convert to int if called with Wrapper
|
||||
if isinstance(caps, Mythen3GainCapsWrapper):
|
||||
self.setGainCaps(caps.value)
|
||||
elif isinstance(caps, dict):
|
||||
corr = {}
|
||||
for key, value in caps.items():
|
||||
if isinstance(value, Mythen3GainCapsWrapper):
|
||||
corr[key] = value.value
|
||||
else:
|
||||
corr[key] = value
|
||||
ut.set_using_dict(self.setGainCaps, corr)
|
||||
else:
|
||||
self.setGainCaps(caps)
|
||||
|
||||
|
||||
@property
|
||||
def exptime(self):
|
||||
"""
|
||||
@ -500,7 +557,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@exptime.setter
|
||||
def exptime(self, t):
|
||||
if self.type == detectorType.MYTHEN3 and is_iterable(t):
|
||||
if self.type == detectorType.MYTHEN3 and is_iterable(t) and not isinstance(t,dict):
|
||||
for i, v in enumerate(t):
|
||||
if isinstance(v, int):
|
||||
v = float(v)
|
||||
@ -509,8 +566,6 @@ class Detector(CppDetectorApi):
|
||||
ut.set_time_using_dict(self.setExptime, t)
|
||||
|
||||
|
||||
|
||||
|
||||
@property
|
||||
def period(self):
|
||||
"""
|
||||
@ -649,6 +704,10 @@ class Detector(CppDetectorApi):
|
||||
"""Start detector acquisition. Status changes to RUNNING or WAITING and automatically returns to idle at the end of acquisition."""
|
||||
self.startDetector()
|
||||
|
||||
def clearbusy(self):
|
||||
"""If acquisition aborted during acquire command, use this to clear acquiring flag in shared memory before starting next acquisition"""
|
||||
self.clearAcquiringFlag()
|
||||
|
||||
def rx_start(self):
|
||||
"""Starts receiver listener for detector data packets and create a data file (if file write enabled)."""
|
||||
self.startReceiver()
|
||||
@ -1725,6 +1784,11 @@ class Detector(CppDetectorApi):
|
||||
"""Gets the list of timing modes (timingMode) for this detector."""
|
||||
return self.getTimingModeList()
|
||||
|
||||
@property
|
||||
def readoutspeedlist(self):
|
||||
"""List of readout speed levels implemented for this detector."""
|
||||
return self.getReadoutSpeedList()
|
||||
|
||||
@property
|
||||
def templist(self):
|
||||
"""List of temperature enums (dacIndex) implemented for this detector."""
|
||||
@ -1826,23 +1890,17 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def versions(self):
|
||||
if self.type == detectorType.EIGER:
|
||||
return {'type': self.type,
|
||||
version_list = {'type': self.type,
|
||||
'package': self.packageversion,
|
||||
'client': self.clientversion,
|
||||
'firmware': self.firmwareversion,
|
||||
'detectorserver': self.detectorserverversion,
|
||||
'kernel': self.kernelversion,
|
||||
'receiver': self.rx_version}
|
||||
|
||||
return {'type': self.type,
|
||||
'package': self.packageversion,
|
||||
'client': self.clientversion,
|
||||
'firmware': self.firmwareversion,
|
||||
'detectorserver': self.detectorserverversion,
|
||||
'hardware':self.hardwareversion,
|
||||
'kernel': self.kernelversion,
|
||||
'receiver': self.rx_version}
|
||||
'kernel': self.kernelversion}
|
||||
if self.type != detectorType.EIGER:
|
||||
version_list ['hardware'] = self.hardwareversion
|
||||
if self.use_receiver:
|
||||
version_list ['receiver'] = self.rx_version
|
||||
return version_list
|
||||
|
||||
@property
|
||||
def virtual(self):
|
||||
@ -3131,6 +3189,17 @@ class Detector(CppDetectorApi):
|
||||
def dbitclk(self, value):
|
||||
ut.set_using_dict(self.setDBITClock, value)
|
||||
|
||||
@property
|
||||
@element
|
||||
def adcvpp(self):
|
||||
"""[Ctb][Moench] Vpp of ADC. [0 -> 1V | 1 -> 1.14V | 2 -> 1.33V | 3 -> 1.6V | 4 -> 2V] \n
|
||||
Advanced User function!"""
|
||||
return self.getADCVpp(False)
|
||||
|
||||
@adcvpp.setter
|
||||
def adcvpp(self, value):
|
||||
ut.set_using_dict(self.setADCVpp, value, False)
|
||||
|
||||
@property
|
||||
@element
|
||||
def dbitpipeline(self):
|
||||
@ -3741,6 +3810,23 @@ class Detector(CppDetectorApi):
|
||||
"""
|
||||
return self.getMeasuredCurrent(dacIndex.I_POWER_IO)
|
||||
|
||||
@property
|
||||
def clkphase(self):
|
||||
"""
|
||||
[Gotthard2][Mythen3] Phase shift of all clocks.
|
||||
|
||||
Example
|
||||
-------
|
||||
>>> d.clkphase[0] = 20
|
||||
>>> d.clkphase
|
||||
0: 20
|
||||
1: 10
|
||||
2: 20
|
||||
3: 10
|
||||
4: 10
|
||||
5: 5
|
||||
"""
|
||||
return ClkPhaseProxy(self)
|
||||
|
||||
@property
|
||||
def clkdiv(self):
|
||||
|
42
python/slsdet/gaincaps.py
Normal file
42
python/slsdet/gaincaps.py
Normal file
@ -0,0 +1,42 @@
|
||||
|
||||
|
||||
import _slsdet
|
||||
gc = _slsdet.slsDetectorDefs.M3_GainCaps
|
||||
|
||||
|
||||
class Mythen3GainCapsWrapper:
|
||||
"""Holds M3_GainCaps enums and facilitates printing"""
|
||||
# 'M3_C10pre', 'M3_C15pre', 'M3_C15sh', 'M3_C225ACsh', 'M3_C30sh', 'M3_C50sh'
|
||||
all_bits = gc.M3_C10pre | gc.M3_C15pre | gc.M3_C15sh | gc.M3_C225ACsh | gc.M3_C30sh | gc.M3_C50sh
|
||||
all_caps = (gc.M3_C10pre, gc.M3_C15pre, gc.M3_C15sh, gc.M3_C225ACsh, gc.M3_C30sh, gc.M3_C50sh)
|
||||
def __init__(self, value = 0):
|
||||
self._validate(value)
|
||||
self.value = value
|
||||
|
||||
|
||||
def __eq__(self, other) -> bool:
|
||||
if isinstance(other, Mythen3GainCapsWrapper):
|
||||
return self.value == other.value
|
||||
else:
|
||||
return self.value == other
|
||||
|
||||
|
||||
def __ne__(self, other) -> bool:
|
||||
return not self.__eq__(other)
|
||||
|
||||
def __str__(self) -> str:
|
||||
s = ', '.join(str(c).rsplit('_', 1)[1] for c in self.all_caps if self.value & c)
|
||||
return s
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return self.__str__()
|
||||
|
||||
def _validate(self, value):
|
||||
"""Check that only bits representing real capacitors are set"""
|
||||
if isinstance(value, gc):
|
||||
return True
|
||||
elif isinstance(value, int):
|
||||
if value & (~self.all_bits):
|
||||
raise ValueError(f"The value: {value} is not allowed for Mythen3GainCapsWrapper")
|
||||
else:
|
||||
raise ValueError("GainCaps can only be initialized from int or M3_GainCaps enum")
|
@ -13,6 +13,7 @@ from .detector import Detector, freeze
|
||||
from .dacs import DetectorDacs
|
||||
import _slsdet
|
||||
dacIndex = _slsdet.slsDetectorDefs.dacIndex
|
||||
gc_enums = _slsdet.slsDetectorDefs.M3_GainCaps
|
||||
from .detector_property import DetectorProperty
|
||||
|
||||
|
||||
@ -62,4 +63,6 @@ class Mythen3(Detector):
|
||||
|
||||
@property
|
||||
def dacs(self):
|
||||
return self._dacs
|
||||
return self._dacs
|
||||
|
||||
|
||||
|
@ -4,6 +4,7 @@ from .utils import element_if_equal
|
||||
from .enums import dacIndex
|
||||
from .defines import M3_MAX_PATTERN_LEVELS, MAX_PATTERN_LEVELS
|
||||
from _slsdet import slsDetectorDefs
|
||||
detectorType = slsDetectorDefs.detectorType
|
||||
|
||||
|
||||
def set_proxy_using_dict(func, key, value, unpack = False):
|
||||
@ -87,7 +88,10 @@ class ClkDivProxy:
|
||||
|
||||
def __repr__(self):
|
||||
rstr = ''
|
||||
for i in range(6):
|
||||
num_clocks = 6
|
||||
if self.det.type == detectorType.MYTHEN3:
|
||||
num_clocks = 5
|
||||
for i in range(num_clocks):
|
||||
r = element_if_equal(self.__getitem__(i))
|
||||
if isinstance(r, list):
|
||||
rstr += ' '.join(f'{item}' for item in r)
|
||||
@ -96,10 +100,35 @@ class ClkDivProxy:
|
||||
|
||||
return rstr.strip('\n')
|
||||
|
||||
class ClkPhaseProxy:
|
||||
"""
|
||||
Proxy class to allow for more intuitive reading clock phase
|
||||
"""
|
||||
def __init__(self, det):
|
||||
self.det = det
|
||||
|
||||
def __getitem__(self, key):
|
||||
return element_if_equal(self.det.getClockPhase(key))
|
||||
|
||||
def __setitem__(self, key, value):
|
||||
set_proxy_using_dict(self.det.setClockPhase, key, value)
|
||||
|
||||
def __repr__(self):
|
||||
rstr = ''
|
||||
if self.det.type == detectorType.MYTHEN3:
|
||||
num_clocks = 5
|
||||
for i in range(num_clocks):
|
||||
r = element_if_equal(self.__getitem__(i))
|
||||
if isinstance(r, list):
|
||||
rstr += ' '.join(f'{item}' for item in r)
|
||||
else:
|
||||
rstr += f'{i}: {r}\n'
|
||||
|
||||
return rstr.strip('\n')
|
||||
|
||||
class MaxPhaseProxy:
|
||||
"""
|
||||
Proxy class to allow for more intuitive reading clockdivider
|
||||
Proxy class to allow for more intuitive reading max clock phase shift
|
||||
"""
|
||||
def __init__(self, det):
|
||||
self.det = det
|
||||
@ -109,7 +138,9 @@ class MaxPhaseProxy:
|
||||
|
||||
def __repr__(self):
|
||||
rstr = ''
|
||||
for i in range(5):
|
||||
if self.det.type == detectorType.MYTHEN3:
|
||||
num_clocks = 5
|
||||
for i in range(num_clocks):
|
||||
r = element_if_equal(self.__getitem__(i))
|
||||
if isinstance(r, list):
|
||||
rstr += ' '.join(f'{item}' for item in r)
|
||||
@ -120,7 +151,7 @@ class MaxPhaseProxy:
|
||||
|
||||
class ClkFreqProxy:
|
||||
"""
|
||||
Proxy class to allow for more intuitive reading clockdivider
|
||||
Proxy class to allow for more intuitive reading clock frequency
|
||||
"""
|
||||
def __init__(self, det):
|
||||
self.det = det
|
||||
@ -130,7 +161,9 @@ class ClkFreqProxy:
|
||||
|
||||
def __repr__(self):
|
||||
rstr = ''
|
||||
for i in range(5):
|
||||
if self.det.type == detectorType.MYTHEN3:
|
||||
num_clocks = 5
|
||||
for i in range(num_clocks):
|
||||
r = element_if_equal(self.__getitem__(i))
|
||||
if isinstance(r, list):
|
||||
rstr += ' '.join(f'{item}' for item in r)
|
||||
|
24
python/tests/test_m3gaincaps.py
Normal file
24
python/tests/test_m3gaincaps.py
Normal file
@ -0,0 +1,24 @@
|
||||
import pytest
|
||||
|
||||
from slsdet import Mythen3GainCapsWrapper
|
||||
from slsdet.enums import M3_GainCaps #this is the c++ enum
|
||||
|
||||
|
||||
def test_comapre_with_int():
|
||||
c = Mythen3GainCapsWrapper(128) #C10pre
|
||||
assert c == 128
|
||||
assert c != 5
|
||||
assert c != 1280
|
||||
|
||||
def test_compare_with_other():
|
||||
a = Mythen3GainCapsWrapper(128)
|
||||
b = Mythen3GainCapsWrapper(1<<10)
|
||||
c = Mythen3GainCapsWrapper(128)
|
||||
assert a!=b
|
||||
assert (a==b) == False
|
||||
assert a==c
|
||||
|
||||
def test_can_be_default_constructed():
|
||||
c = Mythen3GainCapsWrapper()
|
||||
assert c == 0
|
||||
|
1
serverBin/ctbDetectorServerv7.0.0
Symbolic link
1
serverBin/ctbDetectorServerv7.0.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv7.0.0
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv7.0.0.rc3
|
1
serverBin/eigerDetectorServerv7.0.0
Symbolic link
1
serverBin/eigerDetectorServerv7.0.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv7.0.0
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv7.0.0.rc3
|
1
serverBin/gotthard2DetectorServerv7.0.0
Symbolic link
1
serverBin/gotthard2DetectorServerv7.0.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv7.0.0
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv7.0.0.rc3
|
1
serverBin/gotthardDetectorServerv7.0.0
Symbolic link
1
serverBin/gotthardDetectorServerv7.0.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv7.0.0
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv7.0.0.rc3
|
1
serverBin/jungfrauDetectorServerv7.0.0
Symbolic link
1
serverBin/jungfrauDetectorServerv7.0.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv7.0.0
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv7.0.0.rc3
|
1
serverBin/moenchDetectorServerv7.0.0
Symbolic link
1
serverBin/moenchDetectorServerv7.0.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv7.0.0
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv7.0.0.rc3
|
1
serverBin/mythen3DetectorServerv7.0.0
Symbolic link
1
serverBin/mythen3DetectorServerv7.0.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv7.0.0
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv7.0.0.rc3
|
@ -68,7 +68,6 @@ class qDrawPlot : public QWidget, private Ui::PlotObject {
|
||||
void Zoom1DGainPlot(const QRectF &rect);
|
||||
void Zoom2DGainPlot(const QRectF &rect);
|
||||
void SetSaveFileName(QString val);
|
||||
// void UpdatePlot();
|
||||
|
||||
signals:
|
||||
void AcquireFinishedSignal();
|
||||
|
@ -47,6 +47,7 @@ class qTabPlot : public QWidget, private Ui::TabPlotObject {
|
||||
private:
|
||||
void SetupWidgetWindow();
|
||||
void Initialization();
|
||||
bool VerifyGapPixelsAllowed();
|
||||
void Select1DPlot(bool enable);
|
||||
void GetGapPixels();
|
||||
void GetStreamingFrequency();
|
||||
@ -60,7 +61,8 @@ class qTabPlot : public QWidget, private Ui::TabPlotObject {
|
||||
|
||||
Detector *det;
|
||||
qDrawPlot *plot;
|
||||
bool is1d;
|
||||
bool is1d{false};
|
||||
bool isGapPixelsAllowed{false};
|
||||
|
||||
/** default plot and axis titles */
|
||||
static QString defaultPlotTitle;
|
||||
|
@ -182,8 +182,10 @@ void qTabDataOutput::BrowseOutputDir() {
|
||||
LOG(logDEBUG) << "Browsing output directory";
|
||||
QString directory = QFileDialog::getExistingDirectory(
|
||||
this, tr("Choose Output Directory "), dispOutputDir->text());
|
||||
if (!directory.isEmpty())
|
||||
if (!directory.isEmpty()) {
|
||||
dispOutputDir->setText(directory);
|
||||
ForceSetOutputDir();
|
||||
}
|
||||
}
|
||||
|
||||
void qTabDataOutput::SetOutputDir(bool force) {
|
||||
|
@ -16,7 +16,7 @@ QString qTabPlot::defaultImageYAxisTitle("Pixel");
|
||||
QString qTabPlot::defaultImageZAxisTitle("Intensity");
|
||||
|
||||
qTabPlot::qTabPlot(QWidget *parent, Detector *detector, qDrawPlot *p)
|
||||
: QWidget(parent), det(detector), plot(p), is1d(false) {
|
||||
: QWidget(parent), det(detector), plot(p) {
|
||||
setupUi(this);
|
||||
SetupWidgetWindow();
|
||||
LOG(logDEBUG) << "Plot ready";
|
||||
@ -57,11 +57,7 @@ void qTabPlot::SetupWidgetWindow() {
|
||||
chkGainPlot1D->setChecked(true);
|
||||
plot->EnableGainPlot(true);
|
||||
break;
|
||||
case slsDetectorDefs::EIGER:
|
||||
chkGapPixels->setEnabled(true);
|
||||
break;
|
||||
case slsDetectorDefs::JUNGFRAU:
|
||||
chkGapPixels->setEnabled(true);
|
||||
chkGainPlot->setEnabled(true);
|
||||
chkGainPlot->setChecked(true);
|
||||
plot->EnableGainPlot(true);
|
||||
@ -69,6 +65,8 @@ void qTabPlot::SetupWidgetWindow() {
|
||||
default:
|
||||
break;
|
||||
}
|
||||
isGapPixelsAllowed = VerifyGapPixelsAllowed();
|
||||
chkGapPixels->setEnabled(isGapPixelsAllowed);
|
||||
|
||||
Select1DPlot(is1d);
|
||||
Initialization();
|
||||
@ -195,6 +193,29 @@ void qTabPlot::Initialization() {
|
||||
connect(dispZMax, SIGNAL(editingFinished()), this, SLOT(isZMaxModified()));
|
||||
}
|
||||
|
||||
bool qTabPlot::VerifyGapPixelsAllowed() {
|
||||
try {
|
||||
switch (det->getDetectorType().squash()) {
|
||||
case slsDetectorDefs::JUNGFRAU:
|
||||
return true;
|
||||
case slsDetectorDefs::EIGER:
|
||||
if (det->getQuad().squash(false)) {
|
||||
return true;
|
||||
}
|
||||
// full modules
|
||||
if (det->getModuleGeometry().y % 2 == 0) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
CATCH_DISPLAY("Could not verify if gap pixels allowed.",
|
||||
"qTabPlot::VerifyGapPixelsAllowed")
|
||||
return false;
|
||||
}
|
||||
|
||||
void qTabPlot::Select1DPlot(bool enable) {
|
||||
LOG(logDEBUG) << "Selecting " << (enable ? "1" : "2") << "D Plot";
|
||||
is1d = enable;
|
||||
@ -772,15 +793,10 @@ void qTabPlot::Refresh() {
|
||||
boxFrequency->setEnabled(true);
|
||||
GetStreamingFrequency();
|
||||
GetHwm();
|
||||
// gain plot, gap pixels enable
|
||||
// gain plot
|
||||
switch (det->getDetectorType().squash()) {
|
||||
case slsDetectorDefs::EIGER:
|
||||
chkGapPixels->setEnabled(true);
|
||||
GetGapPixels();
|
||||
break;
|
||||
case slsDetectorDefs::JUNGFRAU:
|
||||
chkGainPlot->setEnabled(true);
|
||||
chkGapPixels->setEnabled(true);
|
||||
GetGapPixels();
|
||||
break;
|
||||
case slsDetectorDefs::GOTTHARD2:
|
||||
@ -789,6 +805,11 @@ void qTabPlot::Refresh() {
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// gap pixels
|
||||
if (isGapPixelsAllowed) {
|
||||
chkGapPixels->setEnabled(true);
|
||||
GetGapPixels();
|
||||
}
|
||||
} else {
|
||||
boxFrequency->setEnabled(false);
|
||||
chkGainPlot->setEnabled(false);
|
||||
|
@ -3,12 +3,12 @@
|
||||
|
||||
# empty branch = developer branch in updateAPIVersion.sh
|
||||
branch=""
|
||||
det_list=("ctbDetectorServer"
|
||||
"gotthardDetectorServer"
|
||||
"gotthard2DetectorServer"
|
||||
"jungfrauDetectorServer"
|
||||
"mythen3DetectorServer"
|
||||
"moenchDetectorServer"
|
||||
det_list=("ctbDetectorServer
|
||||
gotthardDetectorServer
|
||||
gotthard2DetectorServer
|
||||
jungfrauDetectorServer
|
||||
mythen3DetectorServer
|
||||
moenchDetectorServer"
|
||||
)
|
||||
usage="\nUsage: compileAllServers.sh [server|all(opt)] [branch(opt)]. \n\tNo arguments mean all servers with 'developer' branch. \n\tNo 'branch' input means 'developer branch'"
|
||||
|
||||
@ -25,9 +25,11 @@ elif [ $# -eq 1 ] || [ $# -eq 2 ]; then
|
||||
else
|
||||
# only one server
|
||||
# arg not in list
|
||||
if [[ $det_list != *$1* ]]; then
|
||||
echo $det_list | grep -w -q $1
|
||||
#if [[ $det_list != *$1* ]]; then
|
||||
if ! [[ $? ]] ; then
|
||||
echo -e "Invalid argument 1: $1. $usage"
|
||||
return -1
|
||||
return 1
|
||||
fi
|
||||
declare -a det=("${1}")
|
||||
#echo "Compiling only $1"
|
||||
@ -37,14 +39,14 @@ elif [ $# -eq 1 ] || [ $# -eq 2 ]; then
|
||||
# arg in list
|
||||
if [[ $det_list == *$2* ]]; then
|
||||
echo -e "Invalid argument 2: $2. $usage"
|
||||
return -1
|
||||
return 1
|
||||
fi
|
||||
branch+=$2
|
||||
#echo "with branch $branch"
|
||||
fi
|
||||
else
|
||||
echo -e "Too many arguments.$usage"
|
||||
return -1
|
||||
return 1
|
||||
fi
|
||||
|
||||
declare -a deterror=("OK" "OK" "OK" "OK" "OK" "OK")
|
||||
|
BIN
slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv7.0.0
Executable file
BIN
slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv7.0.0
Executable file
Binary file not shown.
Binary file not shown.
@ -99,7 +99,7 @@ void basictests() {
|
||||
#endif
|
||||
if (mapCSP0() == FAIL) {
|
||||
strcpy(initErrorMessage,
|
||||
"Could not map to memory. Dangerous to continue.\n");
|
||||
"Could not map to memory. Cannot proceed. Check Firmware.\n");
|
||||
LOG(logERROR, (initErrorMessage));
|
||||
initError = FAIL;
|
||||
return;
|
||||
@ -109,8 +109,10 @@ void basictests() {
|
||||
if ((!debugflag) && (!updateFlag) &&
|
||||
((checkType() == FAIL) || (testFpga() == FAIL) ||
|
||||
(testBus() == FAIL))) {
|
||||
strcpy(initErrorMessage, "Could not pass basic tests of FPGA and bus. "
|
||||
"Dangerous to continue.\n");
|
||||
sprintf(initErrorMessage,
|
||||
"Could not pass basic tests of FPGA and bus. Cannot proceed. "
|
||||
"Check Firmware. (Firmware version:0x%llx) \n",
|
||||
getFirmwareVersion());
|
||||
LOG(logERROR, ("%s\n\n", initErrorMessage));
|
||||
initError = FAIL;
|
||||
return;
|
||||
@ -446,7 +448,7 @@ void initStopServer() {
|
||||
if (mapCSP0() == FAIL) {
|
||||
initError = FAIL;
|
||||
strcpy(initErrorMessage,
|
||||
"Stop Server: Map Fail. Dangerous to continue. Goodbye!\n");
|
||||
"Stop Server: Map Fail. Cannot proceed. Check Firmware.\n");
|
||||
LOG(logERROR, (initErrorMessage));
|
||||
initCheckDone = 1;
|
||||
return;
|
||||
|
Binary file not shown.
@ -1457,6 +1457,12 @@ int setHighVoltage(int val) {
|
||||
sharedMemory_unlockLocalLink();
|
||||
return -3;
|
||||
}
|
||||
// need to read the file twice to get the proper value
|
||||
if (!Feb_Control_GetHighVoltage(&eiger_highvoltage)) {
|
||||
LOG(logERROR, ("Could not read high voltage\n"));
|
||||
sharedMemory_unlockLocalLink();
|
||||
return -3;
|
||||
}
|
||||
sharedMemory_unlockLocalLink();
|
||||
|
||||
// tolerance of 5
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
#define LINKED_SERVER_NAME "eigerDetectorServer"
|
||||
|
||||
#define REQUIRED_FIRMWARE_VERSION (30)
|
||||
#define REQUIRED_FIRMWARE_VERSION (31)
|
||||
// virtual ones renamed for consistency
|
||||
// real ones keep previous name for compatibility (already in production)
|
||||
#ifdef VIRTUAL
|
||||
|
BIN
slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv7.0.0
Executable file
BIN
slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv7.0.0
Executable file
Binary file not shown.
Binary file not shown.
@ -93,7 +93,7 @@ void basictests() {
|
||||
#endif
|
||||
if (mapCSP0() == FAIL) {
|
||||
strcpy(initErrorMessage,
|
||||
"Could not map to memory. Dangerous to continue.\n");
|
||||
"Could not map to memory. Cannot proceed. Check Firmware.\n");
|
||||
LOG(logERROR, (initErrorMessage));
|
||||
initError = FAIL;
|
||||
return;
|
||||
@ -105,8 +105,8 @@ void basictests() {
|
||||
(checkType() == FAIL) || (testFpga() == FAIL) ||
|
||||
(testBus() == FAIL))) {
|
||||
sprintf(initErrorMessage,
|
||||
"Could not pass basic tests of FPGA and bus. Dangerous to "
|
||||
"continue. (Firmware version:0x%llx) \n",
|
||||
"Could not pass basic tests of FPGA and bus. Cannot proceed. "
|
||||
"Check Firmware. (Firmware version:0x%llx) \n",
|
||||
getFirmwareVersion());
|
||||
LOG(logERROR, ("%s\n\n", initErrorMessage));
|
||||
initError = FAIL;
|
||||
@ -396,7 +396,7 @@ void initStopServer() {
|
||||
if (mapCSP0() == FAIL) {
|
||||
initError = FAIL;
|
||||
strcpy(initErrorMessage,
|
||||
"Stop Server: Map Fail. Dangerous to continue. Goodbye!\n");
|
||||
"Stop Server: Map Fail. Cannot proceed. Check Firmware.\n");
|
||||
LOG(logERROR, (initErrorMessage));
|
||||
initCheckDone = 1;
|
||||
return;
|
||||
|
BIN
slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv7.0.0
Executable file
BIN
slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv7.0.0
Executable file
Binary file not shown.
Binary file not shown.
@ -87,7 +87,7 @@ void basictests() {
|
||||
#endif
|
||||
if (mapCSP0() == FAIL) {
|
||||
strcpy(initErrorMessage,
|
||||
"Could not map to memory. Dangerous to continue.\n");
|
||||
"Could not map to memory. Cannot proceed. Check Firmware.\n");
|
||||
LOG(logERROR, (initErrorMessage));
|
||||
initError = FAIL;
|
||||
}
|
||||
@ -97,7 +97,7 @@ void basictests() {
|
||||
((checkType() == FAIL) || (testFpga() == FAIL) ||
|
||||
(testBus() == FAIL))) {
|
||||
strcpy(initErrorMessage, "Could not pass basic tests of FPGA and bus. "
|
||||
"Dangerous to continue.\n");
|
||||
"Cannot proceed. Check Firmware.\n");
|
||||
LOG(logERROR, ("%s\n\n", initErrorMessage));
|
||||
initError = FAIL;
|
||||
return;
|
||||
@ -381,7 +381,7 @@ void initStopServer() {
|
||||
if (mapCSP0() == FAIL) {
|
||||
initError = FAIL;
|
||||
strcpy(initErrorMessage,
|
||||
"Stop Server: Map Fail. Dangerous to continue. Goodbye!\n");
|
||||
"Stop Server: Map Fail. Cannot proceed. Check Firmware.\n");
|
||||
LOG(logERROR, (initErrorMessage));
|
||||
initCheckDone = 1;
|
||||
return;
|
||||
|
BIN
slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv7.0.0
Executable file
BIN
slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv7.0.0
Executable file
Binary file not shown.
Binary file not shown.
@ -82,7 +82,7 @@ void basictests() {
|
||||
#endif
|
||||
if (mapCSP0() == FAIL) {
|
||||
strcpy(initErrorMessage,
|
||||
"Could not map to memory. Dangerous to continue.\n");
|
||||
"Could not map to memory. Cannot proceed. Check Firmware.\n");
|
||||
LOG(logERROR, (initErrorMessage));
|
||||
initError = FAIL;
|
||||
}
|
||||
@ -91,8 +91,10 @@ void basictests() {
|
||||
if ((!debugflag) && (!updateFlag) &&
|
||||
((checkType() == FAIL) || (testFpga() == FAIL) ||
|
||||
(testBus() == FAIL))) {
|
||||
strcpy(initErrorMessage, "Could not pass basic tests of FPGA and bus. "
|
||||
"Dangerous to continue.\n");
|
||||
sprintf(initErrorMessage,
|
||||
"Could not pass basic tests of FPGA and bus. Cannot proceed. "
|
||||
"Check Firmware. (Firmware version:0x%llx) \n",
|
||||
getFirmwareVersion());
|
||||
LOG(logERROR, ("%s\n\n", initErrorMessage));
|
||||
initError = FAIL;
|
||||
return;
|
||||
@ -428,7 +430,7 @@ void initStopServer() {
|
||||
if (mapCSP0() == FAIL) {
|
||||
initError = FAIL;
|
||||
strcpy(initErrorMessage,
|
||||
"Stop Server: Map Fail. Dangerous to continue. Goodbye!\n");
|
||||
"Stop Server: Map Fail. Cannot proceed. Check Firmware.\n");
|
||||
LOG(logERROR, (initErrorMessage));
|
||||
initCheckDone = 1;
|
||||
return;
|
||||
@ -2798,6 +2800,7 @@ int softwareTrigger(int block) {
|
||||
|
||||
LOG(logINFO, ("Sending Software Trigger\n"));
|
||||
bus_w(CONTROL_REG, bus_r(CONTROL_REG) | CONTROL_SOFTWARE_TRIGGER_MSK);
|
||||
bus_w(CONTROL_REG, bus_r(CONTROL_REG) & ~CONTROL_SOFTWARE_TRIGGER_MSK);
|
||||
|
||||
#ifndef VIRTUAL
|
||||
// block till frame is sent out
|
||||
|
BIN
slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv7.0.0
Executable file
BIN
slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv7.0.0
Executable file
Binary file not shown.
Binary file not shown.
@ -103,7 +103,7 @@ void basictests() {
|
||||
#endif
|
||||
if (mapCSP0() == FAIL) {
|
||||
strcpy(initErrorMessage,
|
||||
"Could not map to memory. Dangerous to continue.\n");
|
||||
"Could not map to memory. Cannot proceed. Check Firmware.\n");
|
||||
LOG(logERROR, ("%s\n\n", initErrorMessage));
|
||||
initError = FAIL;
|
||||
return;
|
||||
@ -113,8 +113,10 @@ void basictests() {
|
||||
if ((!debugflag) && (!updateFlag) &&
|
||||
((checkType() == FAIL) || (testFpga() == FAIL) ||
|
||||
(testBus() == FAIL))) {
|
||||
strcpy(initErrorMessage, "Could not pass basic tests of FPGA and bus. "
|
||||
"Dangerous to continue.\n");
|
||||
sprintf(initErrorMessage,
|
||||
"Could not pass basic tests of FPGA and bus. Cannot proceed. "
|
||||
"Check Firmware. (Firmware version:0x%llx) \n",
|
||||
getFirmwareVersion());
|
||||
LOG(logERROR, ("%s\n\n", initErrorMessage));
|
||||
initError = FAIL;
|
||||
return;
|
||||
@ -451,7 +453,7 @@ void initStopServer() {
|
||||
if (mapCSP0() == FAIL) {
|
||||
initError = FAIL;
|
||||
strcpy(initErrorMessage,
|
||||
"Stop Server: Map Fail. Dangerous to continue. Goodbye!\n");
|
||||
"Stop Server: Map Fail. Cannot proceed. Check Firmware.\n");
|
||||
LOG(logERROR, (initErrorMessage));
|
||||
initCheckDone = 1;
|
||||
return;
|
||||
|
Binary file not shown.
@ -89,7 +89,7 @@ void basictests() {
|
||||
#endif
|
||||
if (mapCSP0() == FAIL) {
|
||||
strcpy(initErrorMessage,
|
||||
"Could not map to memory. Dangerous to continue.\n");
|
||||
"Could not map to memory. Cannot proceed. Check Firmware.\n");
|
||||
LOG(logERROR, (initErrorMessage));
|
||||
initError = FAIL;
|
||||
}
|
||||
@ -99,8 +99,10 @@ void basictests() {
|
||||
((validateKernelVersion(KERNEL_DATE_VRSN) == FAIL) ||
|
||||
(checkType() == FAIL) || (testFpga() == FAIL) ||
|
||||
(testBus() == FAIL))) {
|
||||
strcpy(initErrorMessage, "Could not pass basic tests of FPGA and bus. "
|
||||
"Dangerous to continue.\n");
|
||||
sprintf(initErrorMessage,
|
||||
"Could not pass basic tests of FPGA and bus. Cannot proceed. "
|
||||
"Check Firmware. (Firmware version:0x%llx) \n",
|
||||
getFirmwareVersion());
|
||||
LOG(logERROR, ("%s\n\n", initErrorMessage));
|
||||
initError = FAIL;
|
||||
return;
|
||||
@ -388,7 +390,7 @@ void initStopServer() {
|
||||
if (mapCSP0() == FAIL) {
|
||||
initError = FAIL;
|
||||
strcpy(initErrorMessage,
|
||||
"Stop Server: Map Fail. Dangerous to continue. Goodbye!\n");
|
||||
"Stop Server: Map Fail. Cannot proceed. Check Firmware. \n");
|
||||
LOG(logERROR, (initErrorMessage));
|
||||
initCheckDone = 1;
|
||||
return;
|
||||
|
@ -547,8 +547,8 @@ int M_nofunc(int file_des) {
|
||||
ret = FAIL;
|
||||
memset(mess, 0, sizeof(mess));
|
||||
|
||||
sprintf(mess, "Unrecognized Function enum %d. Please do not proceed.\n",
|
||||
fnum);
|
||||
sprintf(mess, "%s Function enum %d. Please do not proceed.\n",
|
||||
UNRECOGNIZED_FNUM_ENUM, fnum);
|
||||
LOG(logERROR, (mess));
|
||||
return Server_SendResult(file_des, OTHER, NULL, 0);
|
||||
}
|
||||
@ -6013,7 +6013,7 @@ int set_clock_divider(int file_des) {
|
||||
#endif
|
||||
modeNotImplemented("clock index (divider set)", args[0]);
|
||||
}
|
||||
|
||||
// TODO: if value between to set and num clocks, msg = "cannot set"
|
||||
enum CLKINDEX c = 0;
|
||||
int val = args[1];
|
||||
if (ret == OK) {
|
||||
|
@ -1476,8 +1476,9 @@ class Detector {
|
||||
Result<int> getADCConfiguration(const int chipIndex, const int adcIndex,
|
||||
Positions pos = {}) const;
|
||||
|
||||
/** [Gotthard2] configures one chip at a time for specific adc, chipIndex
|
||||
* and adcIndex is -1 for all */
|
||||
/** [Gotthard2] configures one chip at a time for specific adc, chipIndex.
|
||||
* -1 for all. Setting specific chip index not implemented in hardware yet
|
||||
*/
|
||||
void setADCConfiguration(const int chipIndex, const int adcIndex,
|
||||
const int value, Positions pos = {});
|
||||
|
||||
|
@ -287,13 +287,12 @@ std::string CmdProxy::Versions(int action) {
|
||||
os << OutStringHex(t);
|
||||
}
|
||||
os << "\nServer : "
|
||||
<< OutString(
|
||||
det->getDetectorServerVersion(std::vector<int>{det_id}));
|
||||
<< OutString(det->getDetectorServerVersion(std::vector<int>{det_id}))
|
||||
<< "\nKernel : "
|
||||
<< OutString(det->getKernelVersion({std::vector<int>{det_id}}));
|
||||
if (!eiger)
|
||||
os << "\nHardware : "
|
||||
<< OutString(det->getHardwareVersion(std::vector<int>{det_id}));
|
||||
os << "\nKernel : "
|
||||
<< OutString(det->getKernelVersion({std::vector<int>{det_id}}));
|
||||
if (det->getUseReceiverFlag().squash(true)) {
|
||||
os << "\nReceiver : "
|
||||
<< OutString(det->getReceiverVersion(std::vector<int>{det_id}));
|
||||
@ -1481,7 +1480,7 @@ std::string CmdProxy::Trigger(int action) {
|
||||
|
||||
/* Network Configuration (Detector<->Receiver) */
|
||||
|
||||
IpAddr CmdProxy::getIpFromAuto() {
|
||||
IpAddr CmdProxy::getDstIpFromAuto() {
|
||||
std::string rxHostname =
|
||||
det->getRxHostname(std::vector<int>{det_id}).squash("none");
|
||||
// Hostname could be ip try to decode otherwise look up the hostname
|
||||
@ -1492,6 +1491,21 @@ IpAddr CmdProxy::getIpFromAuto() {
|
||||
return val;
|
||||
}
|
||||
|
||||
IpAddr CmdProxy::getSrcIpFromAuto() {
|
||||
if (det->getDetectorType().squash() == defs::GOTTHARD) {
|
||||
throw RuntimeError(
|
||||
"Cannot use 'auto' for udp_srcip for GotthardI Detector.");
|
||||
}
|
||||
std::string hostname =
|
||||
det->getHostname(std::vector<int>{det_id}).squash("none");
|
||||
// Hostname could be ip try to decode otherwise look up the hostname
|
||||
auto val = IpAddr{hostname};
|
||||
if (val == 0) {
|
||||
val = HostnameToIp(hostname.c_str());
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
||||
UdpDestination CmdProxy::getUdpEntry() {
|
||||
UdpDestination udpDestination{};
|
||||
udpDestination.entry = rx_id;
|
||||
@ -1502,7 +1516,7 @@ UdpDestination CmdProxy::getUdpEntry() {
|
||||
std::string value = it.substr(pos + 1);
|
||||
if (key == "ip") {
|
||||
if (value == "auto") {
|
||||
auto val = getIpFromAuto();
|
||||
auto val = getDstIpFromAuto();
|
||||
LOG(logINFO) << "Setting udp_dstip of detector " << det_id
|
||||
<< " to " << val;
|
||||
udpDestination.ip = val;
|
||||
@ -1511,7 +1525,7 @@ UdpDestination CmdProxy::getUdpEntry() {
|
||||
}
|
||||
} else if (key == "ip2") {
|
||||
if (value == "auto") {
|
||||
auto val = getIpFromAuto();
|
||||
auto val = getDstIpFromAuto();
|
||||
LOG(logINFO) << "Setting udp_dstip2 of detector " << det_id
|
||||
<< " to " << val;
|
||||
udpDestination.ip2 = val;
|
||||
@ -1585,8 +1599,9 @@ std::string CmdProxy::UDPSourceIP(int action) {
|
||||
os << "[x.x.x.x] or auto\n\tIp address of the detector (source) udp "
|
||||
"interface. Must be same subnet as destination udp "
|
||||
"ip.\n\t[Eiger] Set only for 10G. For 1G, detector will replace "
|
||||
"with its own DHCP IP address. If 'auto' used, then ip is set to "
|
||||
"ip of rx_hostname."
|
||||
"with its own DHCP IP address. \n\tOne can also set this to "
|
||||
"'auto' for 1 GbE data and virtual detectors. It will set to IP "
|
||||
"of detector. Not available for GotthardI"
|
||||
<< '\n';
|
||||
} else if (action == defs::GET_ACTION) {
|
||||
auto t = det->getSourceUDPIP(std::vector<int>{det_id});
|
||||
@ -1600,7 +1615,7 @@ std::string CmdProxy::UDPSourceIP(int action) {
|
||||
}
|
||||
IpAddr val;
|
||||
if (args[0] == "auto") {
|
||||
val = getIpFromAuto();
|
||||
val = getSrcIpFromAuto();
|
||||
LOG(logINFO) << "Setting udp_srcip of detector " << det_id << " to "
|
||||
<< val;
|
||||
} else {
|
||||
@ -1622,8 +1637,9 @@ std::string CmdProxy::UDPSourceIP2(int action) {
|
||||
os << "[x.x.x.x] or auto\n\t[Jungfrau][Gotthard2] Ip address of the "
|
||||
"detector (source) udp interface 2. Must be same subnet as "
|
||||
"destination udp ip2.\n\t [Jungfrau] top half or inner "
|
||||
"interface\n\t [Gotthard2] veto debugging. If 'auto' used, then "
|
||||
"ip is set to ip of rx_hostname."
|
||||
"interface\n\t [Gotthard2] veto debugging. \n\tOne can also set "
|
||||
"this to 'auto' for 1 GbE data and virtual detectors. It will "
|
||||
"set to IP of detector."
|
||||
<< '\n';
|
||||
} else if (action == defs::GET_ACTION) {
|
||||
auto t = det->getSourceUDPIP2(std::vector<int>{det_id});
|
||||
@ -1637,7 +1653,7 @@ std::string CmdProxy::UDPSourceIP2(int action) {
|
||||
}
|
||||
IpAddr val;
|
||||
if (args[0] == "auto") {
|
||||
val = getIpFromAuto();
|
||||
val = getSrcIpFromAuto();
|
||||
LOG(logINFO) << "Setting udp_srcip2 of detector " << det_id
|
||||
<< " to " << val;
|
||||
} else {
|
||||
@ -1671,7 +1687,7 @@ std::string CmdProxy::UDPDestinationIP(int action) {
|
||||
WrongNumberOfParameters(1);
|
||||
}
|
||||
if (args[0] == "auto") {
|
||||
auto val = getIpFromAuto();
|
||||
auto val = getDstIpFromAuto();
|
||||
LOG(logINFO) << "Setting udp_dstip of detector " << det_id << " to "
|
||||
<< val;
|
||||
det->setDestinationUDPIP(val, std::vector<int>{det_id});
|
||||
@ -1707,7 +1723,7 @@ std::string CmdProxy::UDPDestinationIP2(int action) {
|
||||
WrongNumberOfParameters(1);
|
||||
}
|
||||
if (args[0] == "auto") {
|
||||
auto val = getIpFromAuto();
|
||||
auto val = getDstIpFromAuto();
|
||||
LOG(logINFO) << "Setting udp_dstip2 of detector " << det_id
|
||||
<< " to " << val;
|
||||
det->setDestinationUDPIP2(val, std::vector<int>{det_id});
|
||||
@ -2376,7 +2392,7 @@ std::string CmdProxy::ConfigureADC(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[chip index 0-10, -1 for all] [adc index 0-31, -1 for all] [12 "
|
||||
os << "[chip index 0-9, -1 for all] [adc index 0-31, -1 for all] [7 "
|
||||
"bit configuration value in hex]\n\t[Gotthard2] Sets "
|
||||
"configuration for specific chip and adc, but configures 1 chip "
|
||||
"(all adcs for that chip) at a time."
|
||||
|
@ -1155,7 +1155,8 @@ class CmdProxy {
|
||||
std::string Scan(int action);
|
||||
std::string Trigger(int action);
|
||||
/* Network Configuration (Detector<->Receiver) */
|
||||
IpAddr getIpFromAuto();
|
||||
IpAddr getDstIpFromAuto();
|
||||
IpAddr getSrcIpFromAuto();
|
||||
UdpDestination getUdpEntry();
|
||||
std::string UDPDestinationList(int action);
|
||||
std::string UDPSourceIP(int action);
|
||||
|
@ -253,14 +253,15 @@ void DetectorImpl::setVirtualDetectorServers(const int numdet, const int port) {
|
||||
}
|
||||
|
||||
void DetectorImpl::setHostname(const std::vector<std::string> &name) {
|
||||
// this check is there only to allow the previous detsizechan command
|
||||
if (shm()->totalNumberOfModules != 0) {
|
||||
// do not free always to allow the previous detsize/ initialchecks command
|
||||
if (shm.exists() && shm()->totalNumberOfModules != 0) {
|
||||
LOG(logWARNING) << "There are already module(s) in shared memory."
|
||||
"Freeing Shared memory now.";
|
||||
bool initialChecks = shm()->initialChecks;
|
||||
freeSharedMemory();
|
||||
}
|
||||
// could be called after freeing shm from API
|
||||
if (!shm.exists()) {
|
||||
setupDetector();
|
||||
shm()->initialChecks = initialChecks;
|
||||
}
|
||||
for (const auto &hostname : name) {
|
||||
addModule(hostname);
|
||||
@ -1223,8 +1224,7 @@ int DetectorImpl::acquire() {
|
||||
// let the progress thread (no callback) know acquisition is done
|
||||
if (dataReady == nullptr) {
|
||||
setJoinThreadFlag(true);
|
||||
}
|
||||
if (receiver) {
|
||||
} else if (receiver) {
|
||||
while (numZmqRunning != 0) {
|
||||
Parallel(&Module::restreamStopFromReceiver, {});
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(200));
|
||||
@ -1314,6 +1314,7 @@ void DetectorImpl::processData(bool receiver) {
|
||||
}
|
||||
// only update progress
|
||||
else {
|
||||
LOG(logINFO) << "Type 'q' and hit enter to stop acquisition";
|
||||
double progress = 0;
|
||||
printProgress(progress);
|
||||
|
||||
|
@ -870,26 +870,25 @@ void Module::startReadout() {
|
||||
}
|
||||
|
||||
void Module::stopAcquisition() {
|
||||
// get status before stopping acquisition
|
||||
runStatus s = ERROR, r = ERROR;
|
||||
bool zmqstreaming = false;
|
||||
|
||||
// get det status before stopping acq
|
||||
runStatus detStatus = ERROR;
|
||||
try {
|
||||
if (shm()->useReceiverFlag && getReceiverStreaming()) {
|
||||
zmqstreaming = true;
|
||||
s = getRunStatus();
|
||||
r = getReceiverStatus();
|
||||
}
|
||||
detStatus = getRunStatus();
|
||||
} 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();
|
||||
// restream dummy header, if rxr streaming and det idle before stop
|
||||
try {
|
||||
if (shm()->useReceiverFlag && getReceiverStreaming()) {
|
||||
if (detStatus == IDLE && getReceiverStatus() == IDLE) {
|
||||
restreamStopFromReceiver();
|
||||
}
|
||||
}
|
||||
} catch (...) {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ namespace sls {
|
||||
template <typename T> class SharedMemory {
|
||||
static constexpr int NAME_MAX_LENGTH = 255;
|
||||
std::string name;
|
||||
T *shared_struct{};
|
||||
T *shared_struct{nullptr};
|
||||
|
||||
public:
|
||||
// moduleid of -1 creates a detector only shared memory
|
||||
@ -64,8 +64,18 @@ template <typename T> class SharedMemory {
|
||||
unmapSharedMemory();
|
||||
}
|
||||
|
||||
T *operator()() { return shared_struct; }
|
||||
const T *operator()() const { return shared_struct; }
|
||||
T *operator()() {
|
||||
if (shared_struct)
|
||||
return shared_struct;
|
||||
throw SharedMemoryError(getNoShmAccessMessage());
|
||||
}
|
||||
|
||||
const T *operator()() const {
|
||||
if (shared_struct)
|
||||
return shared_struct;
|
||||
throw SharedMemoryError(getNoShmAccessMessage());
|
||||
}
|
||||
|
||||
std::string getName() const { return name; }
|
||||
|
||||
bool exists() {
|
||||
@ -204,6 +214,11 @@ template <typename T> class SharedMemory {
|
||||
throw SharedMemoryError(msg);
|
||||
}
|
||||
}
|
||||
|
||||
const char *getNoShmAccessMessage() const {
|
||||
return ("No shared memory to access. Create it first with "
|
||||
"hostname or config command.");
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace sls
|
||||
|
@ -702,11 +702,11 @@ TEST_CASE("confadc", "[.cmd]") {
|
||||
}
|
||||
}
|
||||
|
||||
REQUIRE_THROWS(proxy.Call("confadc", {"11", "2", "0x3ff"}, -1,
|
||||
REQUIRE_THROWS(proxy.Call("confadc", {"11", "2", "0x7f"}, -1,
|
||||
PUT)); // invalid chip index
|
||||
REQUIRE_THROWS(proxy.Call("confadc", {"-1", "10", "0x3ff"}, -1,
|
||||
REQUIRE_THROWS(proxy.Call("confadc", {"-1", "32", "0x7f"}, -1,
|
||||
PUT)); // invalid adc index
|
||||
REQUIRE_THROWS(proxy.Call("confadc", {"-1", "10", "0x1fff"}, -1,
|
||||
REQUIRE_THROWS(proxy.Call("confadc", {"-1", "10", "0x80"}, -1,
|
||||
PUT)); // invalid value
|
||||
{
|
||||
std::ostringstream oss;
|
||||
@ -718,10 +718,11 @@ TEST_CASE("confadc", "[.cmd]") {
|
||||
proxy.Call("confadc", {"2", "3"}, -1, GET, oss);
|
||||
REQUIRE(oss.str() == "confadc 0x11\n");
|
||||
}
|
||||
|
||||
for (int i = 0; i != ndet; ++i) {
|
||||
for (int j = 0; j != nchip; ++j) {
|
||||
for (int k = 0; k != nadc; ++k) {
|
||||
det.setADCConfiguration(j, k, prev_val[i][j][k], {i});
|
||||
det.setADCConfiguration(-1, k, prev_val[i][j][k], {i});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -145,7 +145,8 @@ TEST_CASE("rx_missingpackets", "[.cmd][.rx]") {
|
||||
REQUIRE(oss.str() != "rx_missingpackets [0, 0]\n");
|
||||
}
|
||||
}
|
||||
{
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type != defs::CHIPTESTBOARD && det_type != defs::MOENCH) {
|
||||
// 0 missing packets (takes into account that acquisition is stopped)
|
||||
det.startReceiver();
|
||||
det.startDetector();
|
||||
|
@ -525,7 +525,19 @@ TEST_CASE("gappixels", "[.cmd]") {
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::EIGER) {
|
||||
// test only for jungfrau and eiger(quad or full module only)
|
||||
bool gapPixelTest = false;
|
||||
if (det_type == defs::JUNGFRAU)
|
||||
gapPixelTest = true;
|
||||
else if (det_type == defs::EIGER) {
|
||||
bool quad = det.getQuad().squash(false);
|
||||
bool fullModule = (det.getModuleGeometry().y % 2 == 0);
|
||||
if (quad || fullModule) {
|
||||
gapPixelTest = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (gapPixelTest) {
|
||||
auto prev_val = det.getGapPixelsinCallback();
|
||||
{
|
||||
std::ostringstream oss;
|
||||
|
@ -101,7 +101,8 @@ TEST_CASE("Move SharedMemory", "[detector]") {
|
||||
shm2 = std::move(shm); // shm is now a moved from object!
|
||||
|
||||
CHECK(shm2()->x == 9);
|
||||
CHECK(shm() == nullptr);
|
||||
REQUIRE_THROWS(
|
||||
shm()); // trying to access should throw instead of returning a nullptr
|
||||
CHECK(shm2.getName() == std::string("/slsDetectorPackage_detector_") +
|
||||
std::to_string(shm_id));
|
||||
shm2.removeSharedMemory();
|
||||
|
@ -85,8 +85,8 @@ void Arping::ProcessExecution() {
|
||||
if (!error.empty()) {
|
||||
LOG(logERROR) << error;
|
||||
}
|
||||
|
||||
std::this_thread::sleep_for(std::chrono::seconds(timeIntervalSeconds));
|
||||
const auto interval = std::chrono::seconds(60);
|
||||
std::this_thread::sleep_for(interval);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,6 @@ class Arping {
|
||||
std::vector<std::string>(MAX_NUMBER_OF_LISTENING_THREADS);
|
||||
std::atomic<bool> runningFlag{false};
|
||||
std::atomic<pid_t> childPid{0};
|
||||
static const int timeIntervalSeconds = 60;
|
||||
};
|
||||
|
||||
} // namespace sls
|
||||
|
@ -234,8 +234,7 @@ int ClientInterface::decodeFunction(Interface &socket) {
|
||||
socket.Receive(fnum);
|
||||
socket.setFnum(fnum);
|
||||
if (fnum <= NUM_DET_FUNCTIONS || fnum >= NUM_REC_FUNCTIONS) {
|
||||
throw RuntimeError("Unrecognized Function enum " +
|
||||
std::to_string(fnum) + "\n");
|
||||
throw RuntimeError(UNRECOGNIZED_FNUM_ENUM + std::to_string(fnum));
|
||||
} else {
|
||||
LOG(logDEBUG1) << "calling function fnum: " << fnum << " ("
|
||||
<< getFunctionNameFromEnum((enum detFuncs)fnum) << ")";
|
||||
@ -320,165 +319,122 @@ int ClientInterface::setup_receiver(Interface &socket) {
|
||||
auto arg = socket.Receive<rxParameters>();
|
||||
LOG(logDEBUG) << ToString(arg);
|
||||
|
||||
// if object exists, verify unlocked and idle, else only verify lock
|
||||
// (connecting first time)
|
||||
if (receiver != nullptr) {
|
||||
verifyIdle(socket);
|
||||
}
|
||||
|
||||
// basic setup
|
||||
setDetectorType(arg.detType);
|
||||
impl()->setDetectorSize(arg.numberOfModule);
|
||||
impl()->setModulePositionId(arg.moduleIndex);
|
||||
impl()->setDetectorHostname(arg.hostname);
|
||||
|
||||
// udp setup
|
||||
// update retvals only if detmac is not the same as in detector
|
||||
MacAddr retvals[2];
|
||||
if (arg.udp_dstip != 0) {
|
||||
MacAddr r = setUdpIp(IpAddr(arg.udp_dstip));
|
||||
MacAddr detMac{arg.udp_dstmac};
|
||||
if (detMac != r) {
|
||||
retvals[0] = r;
|
||||
try {
|
||||
// if object exists, verify unlocked and idle, else only verify lock
|
||||
// (connecting first time)
|
||||
if (receiver != nullptr) {
|
||||
verifyIdle(socket);
|
||||
}
|
||||
}
|
||||
if (arg.udp_dstip2 != 0) {
|
||||
MacAddr r = setUdpIp2(IpAddr(arg.udp_dstip2));
|
||||
MacAddr detMac{arg.udp_dstmac2};
|
||||
if (detMac != r) {
|
||||
retvals[1] = r;
|
||||
}
|
||||
}
|
||||
impl()->setUDPPortNumber(arg.udp_dstport);
|
||||
impl()->setUDPPortNumber2(arg.udp_dstport2);
|
||||
if (detType == JUNGFRAU || detType == GOTTHARD2) {
|
||||
try {
|
||||
impl()->setNumberofUDPInterfaces(arg.udpInterfaces);
|
||||
} catch (const RuntimeError &e) {
|
||||
throw RuntimeError("Failed to set number of interfaces to " +
|
||||
std::to_string(arg.udpInterfaces));
|
||||
}
|
||||
}
|
||||
impl()->setUDPSocketBufferSize(0);
|
||||
|
||||
// acquisition parameters
|
||||
impl()->setNumberOfFrames(arg.frames);
|
||||
impl()->setNumberOfTriggers(arg.triggers);
|
||||
if (detType == GOTTHARD2) {
|
||||
impl()->setNumberOfBursts(arg.bursts);
|
||||
}
|
||||
if (detType == JUNGFRAU) {
|
||||
impl()->setNumberOfAdditionalStorageCells(arg.additionalStorageCells);
|
||||
}
|
||||
if (detType == MOENCH || detType == CHIPTESTBOARD) {
|
||||
try {
|
||||
// basic setup
|
||||
setDetectorType(arg.detType);
|
||||
impl()->setDetectorSize(arg.numberOfModule);
|
||||
impl()->setModulePositionId(arg.moduleIndex);
|
||||
impl()->setDetectorHostname(arg.hostname);
|
||||
|
||||
// udp setup
|
||||
// update retvals only if detmac is not the same as in detector
|
||||
if (arg.udp_dstip != 0) {
|
||||
MacAddr r = setUdpIp(IpAddr(arg.udp_dstip));
|
||||
MacAddr detMac{arg.udp_dstmac};
|
||||
if (detMac != r) {
|
||||
retvals[0] = r;
|
||||
}
|
||||
}
|
||||
if (arg.udp_dstip2 != 0) {
|
||||
MacAddr r = setUdpIp2(IpAddr(arg.udp_dstip2));
|
||||
MacAddr detMac{arg.udp_dstmac2};
|
||||
if (detMac != r) {
|
||||
retvals[1] = r;
|
||||
}
|
||||
}
|
||||
impl()->setUDPPortNumber(arg.udp_dstport);
|
||||
impl()->setUDPPortNumber2(arg.udp_dstport2);
|
||||
if (detType == JUNGFRAU || detType == GOTTHARD2) {
|
||||
impl()->setNumberofUDPInterfaces(arg.udpInterfaces);
|
||||
}
|
||||
impl()->setUDPSocketBufferSize(0);
|
||||
|
||||
// acquisition parameters
|
||||
impl()->setNumberOfFrames(arg.frames);
|
||||
impl()->setNumberOfTriggers(arg.triggers);
|
||||
if (detType == GOTTHARD2) {
|
||||
impl()->setNumberOfBursts(arg.bursts);
|
||||
}
|
||||
if (detType == JUNGFRAU) {
|
||||
impl()->setNumberOfAdditionalStorageCells(
|
||||
arg.additionalStorageCells);
|
||||
}
|
||||
if (detType == MOENCH || detType == CHIPTESTBOARD) {
|
||||
impl()->setNumberofAnalogSamples(arg.analogSamples);
|
||||
} catch (const RuntimeError &e) {
|
||||
throw RuntimeError("Could not set num analog samples to " +
|
||||
std::to_string(arg.analogSamples) +
|
||||
" due to fifo structure memory allocation.");
|
||||
}
|
||||
}
|
||||
if (detType == CHIPTESTBOARD) {
|
||||
try {
|
||||
if (detType == CHIPTESTBOARD) {
|
||||
impl()->setNumberofDigitalSamples(arg.digitalSamples);
|
||||
} catch (const RuntimeError &e) {
|
||||
throw RuntimeError("Could not set num digital samples to " +
|
||||
std::to_string(arg.analogSamples) +
|
||||
" due to fifo structure memory allocation.");
|
||||
}
|
||||
}
|
||||
if (detType != MYTHEN3) {
|
||||
impl()->setAcquisitionTime(std::chrono::nanoseconds(arg.expTimeNs));
|
||||
}
|
||||
impl()->setAcquisitionPeriod(std::chrono::nanoseconds(arg.periodNs));
|
||||
if (detType == EIGER) {
|
||||
impl()->setSubExpTime(std::chrono::nanoseconds(arg.subExpTimeNs));
|
||||
impl()->setSubPeriod(std::chrono::nanoseconds(arg.subExpTimeNs) +
|
||||
std::chrono::nanoseconds(arg.subDeadTimeNs));
|
||||
impl()->setActivate(static_cast<bool>(arg.activate));
|
||||
impl()->setDetectorDataStream(LEFT, arg.dataStreamLeft);
|
||||
impl()->setDetectorDataStream(RIGHT, arg.dataStreamRight);
|
||||
try {
|
||||
if (detType != MYTHEN3) {
|
||||
impl()->setAcquisitionTime(std::chrono::nanoseconds(arg.expTimeNs));
|
||||
}
|
||||
impl()->setAcquisitionPeriod(std::chrono::nanoseconds(arg.periodNs));
|
||||
if (detType == EIGER) {
|
||||
impl()->setSubExpTime(std::chrono::nanoseconds(arg.subExpTimeNs));
|
||||
impl()->setSubPeriod(std::chrono::nanoseconds(arg.subExpTimeNs) +
|
||||
std::chrono::nanoseconds(arg.subDeadTimeNs));
|
||||
impl()->setActivate(static_cast<bool>(arg.activate));
|
||||
impl()->setDetectorDataStream(LEFT, arg.dataStreamLeft);
|
||||
impl()->setDetectorDataStream(RIGHT, arg.dataStreamRight);
|
||||
impl()->setQuad(arg.quad == 0 ? false : true);
|
||||
} catch (const RuntimeError &e) {
|
||||
throw RuntimeError("Could not set quad to " +
|
||||
std::to_string(arg.quad) +
|
||||
" due to fifo strucutre memory allocation");
|
||||
impl()->setThresholdEnergy(arg.thresholdEnergyeV[0]);
|
||||
}
|
||||
impl()->setThresholdEnergy(arg.thresholdEnergyeV[0]);
|
||||
}
|
||||
if (detType == EIGER || detType == JUNGFRAU) {
|
||||
impl()->setReadNRows(arg.readNRows);
|
||||
}
|
||||
if (detType == MYTHEN3) {
|
||||
std::array<int, 3> val;
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
val[i] = arg.thresholdEnergyeV[i];
|
||||
if (detType == EIGER || detType == JUNGFRAU) {
|
||||
impl()->setReadNRows(arg.readNRows);
|
||||
}
|
||||
impl()->setThresholdEnergy(val);
|
||||
}
|
||||
if (detType == EIGER || detType == MYTHEN3) {
|
||||
try {
|
||||
if (detType == MYTHEN3) {
|
||||
std::array<int, 3> val;
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
val[i] = arg.thresholdEnergyeV[i];
|
||||
}
|
||||
impl()->setThresholdEnergy(val);
|
||||
}
|
||||
if (detType == EIGER || detType == MYTHEN3) {
|
||||
impl()->setDynamicRange(arg.dynamicRange);
|
||||
} catch (const RuntimeError &e) {
|
||||
throw RuntimeError(
|
||||
"Could not set dynamic range. Could not allocate "
|
||||
"memory for fifo or could not start listening/writing threads");
|
||||
}
|
||||
}
|
||||
impl()->setTimingMode(arg.timMode);
|
||||
if (detType == EIGER || detType == MOENCH || detType == CHIPTESTBOARD ||
|
||||
detType == MYTHEN3) {
|
||||
try {
|
||||
impl()->setTimingMode(arg.timMode);
|
||||
if (detType == EIGER || detType == MOENCH || detType == CHIPTESTBOARD ||
|
||||
detType == MYTHEN3) {
|
||||
impl()->setTenGigaEnable(arg.tenGiga);
|
||||
} catch (const RuntimeError &e) {
|
||||
throw RuntimeError("Could not set 10GbE.");
|
||||
}
|
||||
}
|
||||
if (detType == CHIPTESTBOARD) {
|
||||
try {
|
||||
if (detType == CHIPTESTBOARD) {
|
||||
impl()->setReadoutMode(arg.roMode);
|
||||
} catch (const RuntimeError &e) {
|
||||
throw RuntimeError("Could not set read out mode "
|
||||
"due to fifo memory allocation.");
|
||||
}
|
||||
}
|
||||
if (detType == CHIPTESTBOARD || detType == MOENCH) {
|
||||
try {
|
||||
if (detType == CHIPTESTBOARD || detType == MOENCH) {
|
||||
impl()->setADCEnableMask(arg.adcMask);
|
||||
} catch (const RuntimeError &e) {
|
||||
throw RuntimeError("Could not set adc enable mask "
|
||||
"due to fifo memory allcoation");
|
||||
}
|
||||
try {
|
||||
impl()->setTenGigaADCEnableMask(arg.adc10gMask);
|
||||
} catch (const RuntimeError &e) {
|
||||
throw RuntimeError("Could not set 10Gb adc enable mask "
|
||||
"due to fifo memory allcoation");
|
||||
}
|
||||
}
|
||||
if (detType == GOTTHARD) {
|
||||
try {
|
||||
if (detType == GOTTHARD) {
|
||||
impl()->setDetectorROI(arg.roi);
|
||||
} catch (const RuntimeError &e) {
|
||||
throw RuntimeError("Could not set ROI");
|
||||
}
|
||||
if (detType == MYTHEN3) {
|
||||
impl()->setCounterMask(arg.countermask);
|
||||
impl()->setAcquisitionTime1(
|
||||
std::chrono::nanoseconds(arg.expTime1Ns));
|
||||
impl()->setAcquisitionTime2(
|
||||
std::chrono::nanoseconds(arg.expTime2Ns));
|
||||
impl()->setAcquisitionTime3(
|
||||
std::chrono::nanoseconds(arg.expTime3Ns));
|
||||
impl()->setGateDelay1(std::chrono::nanoseconds(arg.gateDelay1Ns));
|
||||
impl()->setGateDelay2(std::chrono::nanoseconds(arg.gateDelay2Ns));
|
||||
impl()->setGateDelay3(std::chrono::nanoseconds(arg.gateDelay3Ns));
|
||||
impl()->setNumberOfGates(arg.gates);
|
||||
}
|
||||
if (detType == GOTTHARD2) {
|
||||
impl()->setBurstMode(arg.burstType);
|
||||
}
|
||||
impl()->setScan(arg.scanParams);
|
||||
} catch (std::exception &e) {
|
||||
throw RuntimeError("Could not setup receiver [" +
|
||||
std::string(e.what()) + ']');
|
||||
}
|
||||
if (detType == MYTHEN3) {
|
||||
impl()->setCounterMask(arg.countermask);
|
||||
impl()->setAcquisitionTime1(std::chrono::nanoseconds(arg.expTime1Ns));
|
||||
impl()->setAcquisitionTime2(std::chrono::nanoseconds(arg.expTime2Ns));
|
||||
impl()->setAcquisitionTime3(std::chrono::nanoseconds(arg.expTime3Ns));
|
||||
impl()->setGateDelay1(std::chrono::nanoseconds(arg.gateDelay1Ns));
|
||||
impl()->setGateDelay2(std::chrono::nanoseconds(arg.gateDelay2Ns));
|
||||
impl()->setGateDelay3(std::chrono::nanoseconds(arg.gateDelay3Ns));
|
||||
impl()->setNumberOfGates(arg.gates);
|
||||
}
|
||||
if (detType == GOTTHARD2) {
|
||||
impl()->setBurstMode(arg.burstType);
|
||||
}
|
||||
impl()->setScan(arg.scanParams);
|
||||
|
||||
return socket.sendResult(retvals);
|
||||
}
|
||||
@ -502,13 +458,10 @@ void ClientInterface::setDetectorType(detectorType arg) {
|
||||
detType = GENERIC;
|
||||
receiver = make_unique<Implementation>(arg);
|
||||
detType = arg;
|
||||
} catch (std::exception &e) {
|
||||
std::ostringstream os;
|
||||
os << "Could not set detector type in the receiver. ";
|
||||
os << e.what();
|
||||
throw RuntimeError(os.str());
|
||||
} catch (const std::exception &e) {
|
||||
throw RuntimeError("Could not set detector type in the receiver. [" +
|
||||
std::string(e.what()) + ']');
|
||||
}
|
||||
|
||||
// callbacks after (in setdetectortype, the object is reinitialized)
|
||||
if (startAcquisitionCallBack != nullptr)
|
||||
impl()->registerCallBackStartAcquisition(startAcquisitionCallBack,
|
||||
@ -536,8 +489,8 @@ int ClientInterface::set_detector_roi(Interface &socket) {
|
||||
verifyIdle(socket);
|
||||
try {
|
||||
impl()->setDetectorROI(arg);
|
||||
} catch (const RuntimeError &e) {
|
||||
throw RuntimeError("Could not set ROI");
|
||||
} catch (const std::exception &e) {
|
||||
throw RuntimeError("Could not set ROI [" + std::string(e.what()) + ']');
|
||||
}
|
||||
return socket.Send(OK);
|
||||
}
|
||||
@ -616,10 +569,10 @@ int ClientInterface::set_num_analog_samples(Interface &socket) {
|
||||
}
|
||||
try {
|
||||
impl()->setNumberofAnalogSamples(value);
|
||||
} catch (const RuntimeError &e) {
|
||||
throw RuntimeError("Could not set num analog samples to " +
|
||||
std::to_string(value) +
|
||||
" due to fifo structure memory allocation.");
|
||||
} catch (const std::exception &e) {
|
||||
throw RuntimeError("Could not set number of analog samples to " +
|
||||
std::to_string(value) + " [" +
|
||||
std::string(e.what()) + ']');
|
||||
}
|
||||
return socket.Send(OK);
|
||||
}
|
||||
@ -632,11 +585,12 @@ int ClientInterface::set_num_digital_samples(Interface &socket) {
|
||||
}
|
||||
try {
|
||||
impl()->setNumberofDigitalSamples(value);
|
||||
} catch (const RuntimeError &e) {
|
||||
throw RuntimeError("Could not set num digital samples to " +
|
||||
std::to_string(value) +
|
||||
" due to fifo structure memory allocation.");
|
||||
} catch (const std::exception &e) {
|
||||
throw RuntimeError("Could not set number of digital samples to " +
|
||||
std::to_string(value) + " [" +
|
||||
std::string(e.what()) + ']');
|
||||
}
|
||||
|
||||
return socket.Send(OK);
|
||||
}
|
||||
|
||||
@ -743,9 +697,9 @@ int ClientInterface::set_dynamic_range(Interface &socket) {
|
||||
} else {
|
||||
try {
|
||||
impl()->setDynamicRange(dr);
|
||||
} catch (const RuntimeError &e) {
|
||||
throw RuntimeError("Could not allocate memory for fifo or "
|
||||
"could not start listening/writing threads");
|
||||
} catch (const std::exception &e) {
|
||||
throw RuntimeError("Could not set dynamic range [" +
|
||||
std::string(e.what()) + ']');
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -781,7 +735,12 @@ int ClientInterface::get_status(Interface &socket) {
|
||||
int ClientInterface::start_receiver(Interface &socket) {
|
||||
if (impl()->getStatus() == IDLE) {
|
||||
LOG(logDEBUG1) << "Starting Receiver";
|
||||
impl()->startReceiver();
|
||||
try {
|
||||
impl()->startReceiver();
|
||||
} catch (const std::exception &e) {
|
||||
throw RuntimeError("Could not start reciever [" +
|
||||
std::string(e.what()) + ']');
|
||||
}
|
||||
}
|
||||
return socket.Send(OK);
|
||||
}
|
||||
@ -791,12 +750,16 @@ int ClientInterface::stop_receiver(Interface &socket) {
|
||||
if (impl()->getStatus() == RUNNING) {
|
||||
LOG(logDEBUG1) << "Stopping Receiver";
|
||||
impl()->setStoppedFlag(static_cast<bool>(arg));
|
||||
impl()->stopReceiver();
|
||||
try {
|
||||
impl()->stopReceiver();
|
||||
} catch (const std::exception &e) {
|
||||
throw RuntimeError("Could not stop receiver [" +
|
||||
std::string(e.what()) + ']');
|
||||
}
|
||||
}
|
||||
auto s = impl()->getStatus();
|
||||
if (s != IDLE)
|
||||
throw RuntimeError("Could not stop receiver. It as it is: " +
|
||||
ToString(s));
|
||||
throw RuntimeError("Could not stop receiver. Status: " + ToString(s));
|
||||
|
||||
return socket.Send(OK);
|
||||
}
|
||||
@ -811,7 +774,12 @@ int ClientInterface::set_file_dir(Interface &socket) {
|
||||
throw RuntimeError("Receiver path needs to be absolute path");
|
||||
|
||||
LOG(logDEBUG1) << "Setting file path: " << fpath;
|
||||
impl()->setFilePath(fpath);
|
||||
try {
|
||||
impl()->setFilePath(fpath);
|
||||
} catch (const std::exception &e) {
|
||||
throw RuntimeError("Could not set file path [" + std::string(e.what()) +
|
||||
']');
|
||||
}
|
||||
return socket.Send(OK);
|
||||
}
|
||||
|
||||
@ -893,7 +861,12 @@ int ClientInterface::set_file_write(Interface &socket) {
|
||||
}
|
||||
verifyIdle(socket);
|
||||
LOG(logDEBUG1) << "Setting File write enable:" << enable;
|
||||
impl()->setFileWriteEnable(enable);
|
||||
try {
|
||||
impl()->setFileWriteEnable(enable);
|
||||
} catch (const std::exception &e) {
|
||||
throw RuntimeError("Could not enable/disable file write [" +
|
||||
std::string(e.what()) + ']');
|
||||
}
|
||||
return socket.Send(OK);
|
||||
}
|
||||
|
||||
@ -948,8 +921,9 @@ int ClientInterface::enable_tengiga(Interface &socket) {
|
||||
LOG(logDEBUG1) << "Setting 10GbE:" << val;
|
||||
try {
|
||||
impl()->setTenGigaEnable(val);
|
||||
} catch (const RuntimeError &e) {
|
||||
throw RuntimeError("Could not set 10GbE.");
|
||||
} catch (const std::exception &e) {
|
||||
throw RuntimeError("Could not set 10GbE. [" +
|
||||
std::string(e.what()) + ']');
|
||||
}
|
||||
}
|
||||
int retval = impl()->getTenGigaEnable();
|
||||
@ -965,9 +939,9 @@ int ClientInterface::set_fifo_depth(Interface &socket) {
|
||||
LOG(logDEBUG1) << "Setting fifo depth:" << value;
|
||||
try {
|
||||
impl()->setFifoDepth(value);
|
||||
} catch (const RuntimeError &e) {
|
||||
throw RuntimeError("Could not set fifo depth due to fifo structure "
|
||||
"memory allocation.");
|
||||
} catch (const std::exception &e) {
|
||||
throw RuntimeError("Could not set fifo depth [" +
|
||||
std::string(e.what()) + ']');
|
||||
}
|
||||
}
|
||||
int retval = impl()->getFifoDepth();
|
||||
@ -1002,10 +976,12 @@ int ClientInterface::set_streaming(Interface &socket) {
|
||||
LOG(logDEBUG1) << "Setting data stream enable:" << index;
|
||||
try {
|
||||
impl()->setDataStreamEnable(index);
|
||||
} catch (const RuntimeError &e) {
|
||||
} catch (const std::exception &e) {
|
||||
throw RuntimeError("Could not set data stream enable to " +
|
||||
std::to_string(index));
|
||||
std::to_string(index) + " [" +
|
||||
std::string(e.what()) + ']');
|
||||
}
|
||||
|
||||
return socket.Send(OK);
|
||||
}
|
||||
|
||||
@ -1064,7 +1040,12 @@ int ClientInterface::set_file_format(Interface &socket) {
|
||||
}
|
||||
verifyIdle(socket);
|
||||
LOG(logDEBUG1) << "Setting file format:" << f;
|
||||
impl()->setFileFormat(f);
|
||||
try {
|
||||
impl()->setFileFormat(f);
|
||||
} catch (const std::exception &e) {
|
||||
throw RuntimeError("Could not set file format to " + ToString(f) +
|
||||
" [" + std::string(e.what()) + ']');
|
||||
}
|
||||
|
||||
auto retval = impl()->getFileFormat();
|
||||
validate(f, retval, "set file format", DEC);
|
||||
@ -1185,7 +1166,13 @@ int ClientInterface::set_udp_socket_buffer_size(Interface &socket) {
|
||||
"Receiver socket buffer size exceeded max (INT_MAX/2)");
|
||||
}
|
||||
LOG(logDEBUG1) << "Setting UDP Socket Buffer size: " << size;
|
||||
impl()->setUDPSocketBufferSize(size);
|
||||
try {
|
||||
impl()->setUDPSocketBufferSize(size);
|
||||
} catch (const std::exception &e) {
|
||||
throw RuntimeError("Could not set udp socket buffer size to " +
|
||||
std::to_string(size) + " [" +
|
||||
std::string(e.what()) + ']');
|
||||
}
|
||||
}
|
||||
int retval = impl()->getUDPSocketBufferSize();
|
||||
if (size != 0)
|
||||
@ -1264,9 +1251,9 @@ int ClientInterface::set_readout_mode(Interface &socket) {
|
||||
LOG(logDEBUG1) << "Setting readout mode: " << arg;
|
||||
try {
|
||||
impl()->setReadoutMode(arg);
|
||||
} catch (const RuntimeError &e) {
|
||||
throw RuntimeError(
|
||||
"Could not set read out mode due to fifo memory allocation.");
|
||||
} catch (const std::exception &e) {
|
||||
throw RuntimeError("Could not set read out mode [" +
|
||||
std::string(e.what()) + ']');
|
||||
}
|
||||
}
|
||||
auto retval = impl()->getReadoutMode();
|
||||
@ -1282,10 +1269,11 @@ int ClientInterface::set_adc_mask(Interface &socket) {
|
||||
LOG(logDEBUG1) << "Setting 1Gb ADC enable mask: " << arg;
|
||||
try {
|
||||
impl()->setADCEnableMask(arg);
|
||||
} catch (const RuntimeError &e) {
|
||||
throw RuntimeError(
|
||||
"Could not set adc enable mask due to fifo memory allcoation");
|
||||
} catch (const std::exception &e) {
|
||||
throw RuntimeError("Could not set adc enable mask [" +
|
||||
std::string(e.what()) + ']');
|
||||
}
|
||||
|
||||
auto retval = impl()->getADCEnableMask();
|
||||
if (retval != arg) {
|
||||
std::ostringstream os;
|
||||
@ -1349,10 +1337,10 @@ int ClientInterface::set_quad_type(Interface &socket) {
|
||||
LOG(logDEBUG1) << "Setting quad:" << quadEnable;
|
||||
try {
|
||||
impl()->setQuad(quadEnable == 0 ? false : true);
|
||||
} catch (const RuntimeError &e) {
|
||||
} catch (const std::exception &e) {
|
||||
throw RuntimeError("Could not set quad to " +
|
||||
std::to_string(quadEnable) +
|
||||
" due to fifo strucutre memory allocation");
|
||||
std::to_string(quadEnable) + " [" +
|
||||
std::string(e.what()) + ']');
|
||||
}
|
||||
}
|
||||
int retval = impl()->getQuad() ? 1 : 0;
|
||||
@ -1487,10 +1475,12 @@ int ClientInterface::set_num_interfaces(Interface &socket) {
|
||||
LOG(logDEBUG1) << "Setting Number of UDP Interfaces:" << arg;
|
||||
try {
|
||||
impl()->setNumberofUDPInterfaces(arg);
|
||||
} catch (const RuntimeError &e) {
|
||||
throw RuntimeError("Failed to set number of interfaces to " +
|
||||
std::to_string(arg));
|
||||
} catch (const std::exception &e) {
|
||||
throw RuntimeError("Could not set number of interfaces to " +
|
||||
std::to_string(arg) + " [" + std::string(e.what()) +
|
||||
']');
|
||||
}
|
||||
|
||||
return socket.Send(OK);
|
||||
}
|
||||
|
||||
@ -1500,10 +1490,11 @@ int ClientInterface::set_adc_mask_10g(Interface &socket) {
|
||||
LOG(logDEBUG1) << "Setting 10Gb ADC enable mask: " << arg;
|
||||
try {
|
||||
impl()->setTenGigaADCEnableMask(arg);
|
||||
} catch (const RuntimeError &e) {
|
||||
throw RuntimeError(
|
||||
"Could not set 10Gb adc enable mask due to fifo memory allcoation");
|
||||
} catch (const std::exception &e) {
|
||||
throw RuntimeError("Could not set 10Gb adc enable mask [" +
|
||||
std::string(e.what()) + ']');
|
||||
}
|
||||
|
||||
auto retval = impl()->getTenGigaADCEnableMask();
|
||||
if (retval != arg) {
|
||||
std::ostringstream os;
|
||||
@ -1519,7 +1510,12 @@ int ClientInterface::set_counter_mask(Interface &socket) {
|
||||
auto arg = socket.Receive<uint32_t>();
|
||||
verifyIdle(socket);
|
||||
LOG(logDEBUG1) << "Setting counters: " << arg;
|
||||
impl()->setCounterMask(arg);
|
||||
try {
|
||||
impl()->setCounterMask(arg);
|
||||
} catch (const std::exception &e) {
|
||||
throw RuntimeError("Could not set counter mask [" +
|
||||
std::string(e.what()) + ']');
|
||||
}
|
||||
return socket.Send(OK);
|
||||
}
|
||||
|
||||
@ -1715,7 +1711,12 @@ int ClientInterface::set_arping(Interface &socket) {
|
||||
}
|
||||
verifyIdle(socket);
|
||||
LOG(logDEBUG1) << "Starting/ Killing arping thread:" << value;
|
||||
impl()->setArping(value, udpips);
|
||||
try {
|
||||
impl()->setArping(value, udpips);
|
||||
} catch (const std::exception &e) {
|
||||
throw RuntimeError("Could not start/kill arping thread [" +
|
||||
std::string(e.what()) + ']');
|
||||
}
|
||||
return socket.Send(OK);
|
||||
}
|
||||
|
||||
@ -1733,9 +1734,11 @@ int ClientInterface::set_receiver_roi(Interface &socket) {
|
||||
verifyIdle(socket);
|
||||
try {
|
||||
impl()->setReceiverROI(arg);
|
||||
} catch (const RuntimeError &e) {
|
||||
throw RuntimeError("Could not set ReceiverROI");
|
||||
} catch (const std::exception &e) {
|
||||
throw RuntimeError("Could not set Receiver ROI [" +
|
||||
std::string(e.what()) + ']');
|
||||
}
|
||||
|
||||
return socket.Send(OK);
|
||||
}
|
||||
|
||||
@ -1747,9 +1750,11 @@ int ClientInterface::set_receiver_roi_metadata(Interface &socket) {
|
||||
verifyIdle(socket);
|
||||
try {
|
||||
impl()->setReceiverROIMetadata(arg);
|
||||
} catch (const RuntimeError &e) {
|
||||
throw RuntimeError("Could not set ReceiverROI metadata");
|
||||
} catch (const std::exception &e) {
|
||||
throw RuntimeError("Could not set ReceiverROI metadata [" +
|
||||
std::string(e.what()) + ']');
|
||||
}
|
||||
|
||||
return socket.Send(OK);
|
||||
}
|
||||
|
||||
|
@ -78,11 +78,12 @@ void Implementation::SetupFifoStructure() {
|
||||
try {
|
||||
fifo.push_back(
|
||||
sls::make_unique<Fifo>(i, datasize, generalData->fifoDepth));
|
||||
} catch (...) {
|
||||
} catch (const std::exception &e) {
|
||||
fifo.clear();
|
||||
generalData->fifoDepth = 0;
|
||||
throw RuntimeError("Could not allocate memory for fifo structure " +
|
||||
std::to_string(i) + ". FifoDepth is now 0.");
|
||||
std::ostringstream oss;
|
||||
oss << e.what() << ". Fifo depth is now 0";
|
||||
throw RuntimeError(oss.str());
|
||||
}
|
||||
// set the listener & dataprocessor threads to point to the right fifo
|
||||
if (listener.size())
|
||||
@ -165,12 +166,10 @@ void Implementation::setDetectorType(const detectorType d) {
|
||||
SetupListener(i);
|
||||
dataProcessor.push_back(sls::make_unique<DataProcessor>(i));
|
||||
SetupDataProcessor(i);
|
||||
} catch (...) {
|
||||
} catch (const std::exception &e) {
|
||||
listener.clear();
|
||||
dataProcessor.clear();
|
||||
throw RuntimeError(
|
||||
"Could not create listener/dataprocessor threads (index:" +
|
||||
std::to_string(i) + ")");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
@ -668,8 +667,9 @@ void Implementation::startReceiver() {
|
||||
startAcquisitionCallBack(filePath, fileName, fileIndex, imageSize,
|
||||
pStartAcquisition);
|
||||
} catch (const std::exception &e) {
|
||||
throw RuntimeError("Start Acquisition Callback Error: " +
|
||||
std::string(e.what()));
|
||||
std::ostringstream oss;
|
||||
oss << "Start Acquisition Callback Error: " << e.what();
|
||||
throw RuntimeError(oss.str());
|
||||
}
|
||||
if (rawDataReadyCallBack != nullptr) {
|
||||
LOG(logINFO) << "Data Write has been defined externally";
|
||||
@ -784,8 +784,9 @@ void Implementation::stopReceiver() {
|
||||
status = IDLE;
|
||||
LOG(logINFO) << "Receiver Stopped";
|
||||
LOG(logINFO) << "Status: " << ToString(status);
|
||||
throw RuntimeError("Acquisition Finished Callback Error: " +
|
||||
std::string(e.what()));
|
||||
std::ostringstream oss;
|
||||
oss << "Acquisition Finished Callback Error: " << e.what();
|
||||
throw RuntimeError(oss.str());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -866,7 +867,7 @@ void Implementation::CreateUDPSockets() {
|
||||
}
|
||||
} catch (const RuntimeError &e) {
|
||||
shutDownUDPSockets();
|
||||
throw RuntimeError("Could not create UDP Socket(s).");
|
||||
throw;
|
||||
}
|
||||
LOG(logDEBUG) << "UDP socket(s) created successfully.";
|
||||
}
|
||||
@ -886,7 +887,9 @@ void Implementation::SetupWriter() {
|
||||
shutDownUDPSockets();
|
||||
for (const auto &it : dataProcessor)
|
||||
it->CloseFiles();
|
||||
throw RuntimeError("Could not create first data file.");
|
||||
std::ostringstream oss;
|
||||
oss << "Could not set up writer: " << e.what();
|
||||
throw RuntimeError(oss.str());
|
||||
}
|
||||
}
|
||||
|
||||
@ -975,10 +978,9 @@ void Implementation::StartMasterWriter() {
|
||||
}
|
||||
}
|
||||
#endif
|
||||
} catch (std::exception &e) {
|
||||
} catch (const std::exception &e) {
|
||||
// ignore it and just print it
|
||||
LOG(logWARNING) << "Caught exception when handling virtual hdf5 file ["
|
||||
<< e.what() << "]";
|
||||
LOG(logWARNING) << "Error creating master/virtualfiles: " << e.what();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1039,12 +1041,10 @@ void Implementation::setNumberofUDPInterfaces(const int n) {
|
||||
SetupListener(i);
|
||||
dataProcessor.push_back(sls::make_unique<DataProcessor>(i));
|
||||
SetupDataProcessor(i);
|
||||
} catch (...) {
|
||||
} catch (const std::exception &e) {
|
||||
listener.clear();
|
||||
dataProcessor.clear();
|
||||
throw RuntimeError(
|
||||
"Could not create listener/dataprocessor threads (index:" +
|
||||
std::to_string(i) + ")");
|
||||
throw;
|
||||
}
|
||||
|
||||
// streamer threads
|
||||
@ -1052,16 +1052,14 @@ void Implementation::setNumberofUDPInterfaces(const int n) {
|
||||
try {
|
||||
dataStreamer.push_back(sls::make_unique<DataStreamer>(i));
|
||||
SetupDataStreamer(i);
|
||||
} catch (...) {
|
||||
} catch (const std::exception &e) {
|
||||
if (dataStreamEnable) {
|
||||
dataStreamer.clear();
|
||||
dataStreamEnable = false;
|
||||
for (const auto &it : dataProcessor)
|
||||
it->SetDataStreamEnable(dataStreamEnable);
|
||||
}
|
||||
throw RuntimeError(
|
||||
"Could not create datastreamer threads (index:" +
|
||||
std::to_string(i) + ")");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1172,12 +1170,12 @@ void Implementation::setDataStreamEnable(const bool enable) {
|
||||
try {
|
||||
dataStreamer.push_back(sls::make_unique<DataStreamer>(i));
|
||||
SetupDataStreamer(i);
|
||||
} catch (...) {
|
||||
} catch (const std::exception &e) {
|
||||
dataStreamer.clear();
|
||||
dataStreamEnable = false;
|
||||
for (const auto &it : dataProcessor)
|
||||
it->SetDataStreamEnable(dataStreamEnable);
|
||||
throw RuntimeError("Could not set data stream enable.");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
SetThreadPriorities();
|
||||
|
@ -323,7 +323,7 @@ class Implementation : private virtual slsDetectorDefs {
|
||||
|
||||
// acquisition
|
||||
std::atomic<runStatus> status{IDLE};
|
||||
bool stoppedFlag{false};
|
||||
std::atomic<bool> stoppedFlag{false};
|
||||
scanParameters scanParams{};
|
||||
|
||||
// network configuration (UDP)
|
||||
|
@ -148,30 +148,34 @@ void Listener::RecordFirstIndex(uint64_t fnum) {
|
||||
}
|
||||
|
||||
void Listener::CreateUDPSocket(int &actualSize) {
|
||||
if (disabledPort) {
|
||||
return;
|
||||
}
|
||||
uint32_t packetSize = generalData->packetSize;
|
||||
if (generalData->detType == GOTTHARD2 && index != 0) {
|
||||
packetSize = generalData->vetoPacketSize;
|
||||
}
|
||||
|
||||
try {
|
||||
if (disabledPort) {
|
||||
return;
|
||||
}
|
||||
uint32_t packetSize = generalData->packetSize;
|
||||
if (generalData->detType == GOTTHARD2 && index != 0) {
|
||||
packetSize = generalData->vetoPacketSize;
|
||||
}
|
||||
|
||||
udpSocket = nullptr;
|
||||
udpSocket = make_unique<UdpRxSocket>(
|
||||
udpPortNumber, packetSize,
|
||||
(eth.length() ? InterfaceNameToIp(eth).str().c_str() : nullptr),
|
||||
generalData->udpSocketBufferSize);
|
||||
LOG(logINFO) << index << ": UDP port opened at port " << udpPortNumber;
|
||||
} catch (...) {
|
||||
throw RuntimeError("Could not create UDP socket on port " +
|
||||
std::to_string(udpPortNumber));
|
||||
|
||||
udpSocketAlive = true;
|
||||
|
||||
// doubled due to kernel bookkeeping (could also be less due to
|
||||
// permissions)
|
||||
actualSize = udpSocket->getBufferSize();
|
||||
|
||||
} catch (std::exception &e) {
|
||||
std::ostringstream oss;
|
||||
oss << "Could not create UDP socket on port " << udpPortNumber << " ["
|
||||
<< e.what() << ']';
|
||||
throw RuntimeError(oss.str());
|
||||
}
|
||||
|
||||
udpSocketAlive = true;
|
||||
|
||||
// doubled due to kernel bookkeeping (could also be less due to permissions)
|
||||
actualSize = udpSocket->getBufferSize();
|
||||
}
|
||||
|
||||
void Listener::ShutDownUDPSocket() {
|
||||
|
@ -34,7 +34,7 @@ namespace sls {
|
||||
// high water mark for gui
|
||||
#define DEFFAULT_LOW_ZMQ_HWM (25)
|
||||
#define DEFAULT_LOW_ZMQ_HWM_BUFFERSIZE (1024 * 1024) // 1MB
|
||||
#define DEFAULT_ZMQ_BUFFERSIZE (0) // os default
|
||||
#define DEFAULT_ZMQ_BUFFERSIZE (-1) // os default
|
||||
|
||||
/** zmq header structure */
|
||||
struct zmqHeader {
|
||||
|
@ -10,6 +10,8 @@
|
||||
*@short functions indices to call on server (detector/receiver)
|
||||
*/
|
||||
|
||||
#define UNRECOGNIZED_FNUM_ENUM "Unrecognized Function enum"
|
||||
|
||||
enum detFuncs {
|
||||
F_EXEC_COMMAND = 0,
|
||||
F_GET_DETECTOR_TYPE,
|
||||
|
@ -1,13 +1,13 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
/** API versions */
|
||||
#define RELEASE "7.0.0.rc3"
|
||||
#define APICTB "7.0.0.rc3 0x230130"
|
||||
#define APIGOTTHARD "7.0.0.rc3 0x230130"
|
||||
#define APIGOTTHARD2 "7.0.0.rc3 0x230130"
|
||||
#define APIJUNGFRAU "7.0.0.rc3 0x230130"
|
||||
#define APIMYTHEN3 "7.0.0.rc3 0x230130"
|
||||
#define APIMOENCH "7.0.0.rc3 0x230130"
|
||||
#define APIEIGER "7.0.0.rc3 0x230130"
|
||||
#define APILIB "7.0.0.rc3 0x230210"
|
||||
#define APIRECEIVER "7.0.0.rc3 0x230210"
|
||||
#define RELEASE "7.0.0"
|
||||
#define APICTB "7.0.0 0x230222"
|
||||
#define APIGOTTHARD "7.0.0 0x230222"
|
||||
#define APIGOTTHARD2 "7.0.0 0x230222"
|
||||
#define APIJUNGFRAU "7.0.0 0x230222"
|
||||
#define APIMYTHEN3 "7.0.0 0x230222"
|
||||
#define APIMOENCH "7.0.0 0x230222"
|
||||
#define APIEIGER "7.0.0 0x230222"
|
||||
#define APILIB "7.0.0 0x230223"
|
||||
#define APIRECEIVER "7.0.0 0x230222"
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include "sls/logger.h"
|
||||
#include "sls/sls_detector_defs.h"
|
||||
#include "sls/sls_detector_exceptions.h"
|
||||
#include "sls/sls_detector_funcs.h"
|
||||
#include <arpa/inet.h>
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
@ -76,9 +77,7 @@ void ClientSocket::readReply(int &ret, void *retval, size_t retval_size) {
|
||||
try {
|
||||
Receive(&ret, sizeof(ret));
|
||||
if (ret == slsDetectorDefs::FAIL) {
|
||||
char mess[MAX_STR_LENGTH]{};
|
||||
// get error message
|
||||
Receive(mess, sizeof(mess));
|
||||
std::string mess = readErrorMessage();
|
||||
// Do we need to know hostname here?
|
||||
// In that case save it???
|
||||
if (socketType == "Receiver") {
|
||||
@ -107,6 +106,9 @@ void ClientSocket::readReply(int &ret, void *retval, size_t retval_size) {
|
||||
std::string ClientSocket::readErrorMessage() {
|
||||
std::string error_msg(MAX_STR_LENGTH, '\0');
|
||||
Receive(&error_msg[0], error_msg.size());
|
||||
if (error_msg.find(UNRECOGNIZED_FNUM_ENUM) != std::string::npos) {
|
||||
error_msg.insert(0, "Software version mismatch. ");
|
||||
}
|
||||
return error_msg;
|
||||
}
|
||||
|
||||
|
@ -27,15 +27,18 @@ UdpRxSocket::UdpRxSocket(int port, ssize_t packet_size, const char *hostname,
|
||||
const std::string portname = std::to_string(port);
|
||||
if (getaddrinfo(hostname, portname.c_str(), &hints, &res)) {
|
||||
throw RuntimeError("Failed at getaddrinfo with " +
|
||||
std::string(hostname));
|
||||
std::string(hostname) + " [" +
|
||||
std::string(strerror(errno)) + ']');
|
||||
}
|
||||
sockfd_ = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
|
||||
if (sockfd_ == -1) {
|
||||
throw RuntimeError("Failed to create UDP RX socket");
|
||||
throw RuntimeError("Failed to create UDP RX socket [" +
|
||||
std::string(strerror(errno)) + ']');
|
||||
}
|
||||
if (bind(sockfd_, res->ai_addr, res->ai_addrlen) == -1) {
|
||||
close(sockfd_);
|
||||
throw RuntimeError("Failed to bind UDP RX socket");
|
||||
throw RuntimeError("Failed to bind UDP RX socket [" +
|
||||
std::string(strerror(errno)) + ']');
|
||||
}
|
||||
freeaddrinfo(res);
|
||||
|
||||
@ -74,13 +77,15 @@ int UdpRxSocket::getBufferSize() const {
|
||||
int ret = 0;
|
||||
socklen_t optlen = sizeof(ret);
|
||||
if (getsockopt(sockfd_, SOL_SOCKET, SO_RCVBUF, &ret, &optlen) == -1)
|
||||
throw RuntimeError("Could not get socket buffer size");
|
||||
throw RuntimeError("Could not get socket buffer size [" +
|
||||
std::string(strerror(errno)) + ']');
|
||||
return ret;
|
||||
}
|
||||
|
||||
void UdpRxSocket::setBufferSize(int size) {
|
||||
if (setsockopt(sockfd_, SOL_SOCKET, SO_RCVBUF, &size, sizeof(size)))
|
||||
throw RuntimeError("Could not set socket buffer size");
|
||||
throw RuntimeError("Could not set socket buffer size [" +
|
||||
std::string(strerror(errno)) + ']');
|
||||
}
|
||||
|
||||
void UdpRxSocket::Shutdown() {
|
||||
|
Reference in New Issue
Block a user