mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-17 07:17:13 +02:00
Compare commits
306 Commits
2020.11.09
...
5.0.1
Author | SHA1 | Date | |
---|---|---|---|
64de9f3ad0 | |||
390a842b97 | |||
040cc9c14f | |||
0a1c4992e2 | |||
59b56c764f | |||
ff7afd0de7 | |||
835e62425f | |||
c8cdbfc488 | |||
2f75143245 | |||
6f7c31b747 | |||
75c2d987c4 | |||
726f5eba29 | |||
4404ee717a | |||
54530ab103 | |||
6126780660 | |||
9b7f9b1be1 | |||
26c829d766 | |||
3fde5c5b55 | |||
3e5f546ebe | |||
9833a7d330 | |||
8f9155e578 | |||
9df1eac3c1 | |||
5ededf9be4 | |||
3e8774798a | |||
08ea179519 | |||
8e6dfe9b0f | |||
6901368fd6 | |||
3f1dbb7d67 | |||
f6126abe31 | |||
1e8dacf9b8 | |||
58fb5321f0 | |||
faf885d2e0 | |||
d5dcc8e138 | |||
90a9cea670 | |||
2eea1882d2 | |||
c6eefac0eb | |||
46e0c0abed | |||
a5f0f6eb34 | |||
62c86f56b1 | |||
77080a524a | |||
3dce1e46f9 | |||
08ecc1e52d | |||
8c1974b34e | |||
d89d349247 | |||
910961cf41 | |||
595b7aa5e8 | |||
f72ad4326f | |||
2306e44ae3 | |||
06dbf82e93 | |||
8565ac6cf2 | |||
a26f22a052 | |||
30f9d53520 | |||
7b81532f54 | |||
dcf0b58a6d | |||
e39ea64560 | |||
77dacdf40d | |||
5397a9a78b | |||
3fbafb3c1d | |||
e3721e89e0 | |||
ec75728941 | |||
9b6a10d7ce | |||
57904446f0 | |||
3d48501d30 | |||
d364e5e2ec | |||
aacd7c4bec | |||
abfc0dc266 | |||
85a6d82d9f | |||
56be47669f | |||
b96b1849cd | |||
902919f2df | |||
1efdc90719 | |||
e852158b83 | |||
f48eff49e9 | |||
f7ecabdb51 | |||
cbf61ed05e | |||
8be579ea53 | |||
7fcac35549 | |||
6563965787 | |||
73d582744e | |||
fa8fdced5f | |||
5142603103 | |||
2fa3ebd8e6 | |||
a534271aff | |||
d2eed6177c | |||
ddf43dbd24 | |||
bfe8cb7020 | |||
40f6eb8ede | |||
5c71dd7246 | |||
146d605d19 | |||
918f3f3fde | |||
a36a294515 | |||
f19bc8880a | |||
0cb7d62ad5 | |||
5ee95cf811 | |||
980d76a15a | |||
4385df18b7 | |||
121450b8cc | |||
e7ecb38b29 | |||
59e12bbed8 | |||
bd76a66770 | |||
f592b98beb | |||
a6d696a0f8 | |||
4c4e2ccb6b | |||
b6b9a5d598 | |||
eb221e083d | |||
8d9382c25b | |||
876207c8cd | |||
ec21624aeb | |||
1de5b85ce2 | |||
b4e4033736 | |||
820bc01505 | |||
4e54d1c318 | |||
dec4183e0f | |||
feed09f2f4 | |||
c6aa8d6072 | |||
4ec38a071c | |||
0c4b721e13 | |||
fae884e658 | |||
f20f084991 | |||
20ce79872f | |||
328375924f | |||
a1d91e590e | |||
679db120b0 | |||
7a6797b23e | |||
93f8e8ecb3 | |||
d112956f79 | |||
9649982932 | |||
eca2836703 | |||
d14c9600bb | |||
42971c94b7 | |||
b0fd4f4c44 | |||
06473cfcb2 | |||
6f2aad3836 | |||
38aad40fef | |||
51c5520472 | |||
75838f77b3 | |||
54bedeaa0a | |||
b33b2edbd0 | |||
f7cb2b5dcd | |||
9ea3cbc8f1 | |||
53bb677f8c | |||
663999a539 | |||
98b45b32fd | |||
74c08cd742 | |||
696073b505 | |||
e4645a8273 | |||
c0cd25460d | |||
e7e30693f0 | |||
dd96aac3cd | |||
5697393a70 | |||
052dd8058f | |||
4d99ce8c52 | |||
633c646239 | |||
2a88bc6a1e | |||
d8af2e594a | |||
8da7c3e805 | |||
ddfbea76be | |||
c5f2275703 | |||
8c491f18fd | |||
e07e2f2da0 | |||
d981e1b8e5 | |||
58e6338f9c | |||
27f3af5365 | |||
350b4f0368 | |||
445f3c66fd | |||
1189b991e5 | |||
3e2b471ee1 | |||
8c76d5d52c | |||
e7eee67fed | |||
fade48dcfa | |||
8e58e7f8bf | |||
c8f56ee23c | |||
32d951e28a | |||
5c63c8fc8f | |||
7b70274d4f | |||
1cd905c08b | |||
13e809acd4 | |||
46533b0411 | |||
4f4de15d3a | |||
4f99aeabd2 | |||
f36a12e454 | |||
5e246c0754 | |||
518c6783cc | |||
0706564694 | |||
2108bbda66 | |||
82feed1ab8 | |||
4be0b5d436 | |||
f7eb256eb6 | |||
250fc26308 | |||
06a50520c1 | |||
fc766055d4 | |||
828b1479c7 | |||
22ed52605c | |||
a1a95ebb20 | |||
d7ce5fedfd | |||
3a2682ffe7 | |||
bf74a4135e | |||
252ecf2769 | |||
de01ab75e9 | |||
5698da5f95 | |||
7300d73675 | |||
d4b467a641 | |||
7b71076180 | |||
9197d2b209 | |||
e094e41d89 | |||
512e1a3136 | |||
6d04c14bd6 | |||
64183d8d6a | |||
287efde54a | |||
faa25b9e9f | |||
1b92b01a46 | |||
4849063b6c | |||
5cd020ae81 | |||
160fabe02c | |||
90dd8e70e5 | |||
08e121c71f | |||
cb3b337a99 | |||
5d9a952316 | |||
8cc05c5848 | |||
d69d69e892 | |||
07a120fc4a | |||
11e8796847 | |||
f79b009978 | |||
3259bfb008 | |||
934bc5b9db | |||
6d11faed87 | |||
35fc52dae7 | |||
e599bfe56f | |||
764becc271 | |||
7462d1002d | |||
834794ad98 | |||
56c504abbb | |||
4d6346e678 | |||
dc7e448759 | |||
e658cbacda | |||
1e6c6dea71 | |||
0e5d4d1d8e | |||
a2986784d3 | |||
975cbb576e | |||
e48a92d9cd | |||
befdcf7f36 | |||
02f5c472a8 | |||
75ed2cd2e4 | |||
3be045f9b6 | |||
8fae982802 | |||
128ec88b5f | |||
d5fc158330 | |||
864e6e4c81 | |||
343d96ff16 | |||
4142328437 | |||
6c797988c7 | |||
215c262981 | |||
081b809078 | |||
9263567cd8 | |||
58e90a85be | |||
025c836e25 | |||
5d5abae3f4 | |||
e2ad46386e | |||
308d44e452 | |||
69da61b1fb | |||
460168ce04 | |||
4e429c0d77 | |||
bf4fab549d | |||
f7705eb1da | |||
a2217e2066 | |||
aaa02706fc | |||
6a80bc5b54 | |||
b9275646ad | |||
9e2f2697c7 | |||
b6b0df62b6 | |||
0ba537e479 | |||
75ddf535dc | |||
b1de501bef | |||
0f3a63f101 | |||
3b4b2d707f | |||
f405aa1733 | |||
df0fdb7ecb | |||
91b7a87557 | |||
9468b9ca1e | |||
d7982e178e | |||
9cf5714a5b | |||
0c9ac8911a | |||
4730c8c0a9 | |||
43efb8acfd | |||
6ecca8fcb0 | |||
17cb63a57f | |||
4f83fcb001 | |||
ab94af6d29 | |||
7c725cc69b | |||
f0198d2d2e | |||
5ddccbdee4 | |||
8fb39b8c7e | |||
bd5293f4b1 | |||
b91180f5b2 | |||
7c3b5065a5 | |||
9aef802bea | |||
f7d85231f2 | |||
5b3a911e8d | |||
65f5e1c1ab | |||
839896c7e6 | |||
4a7e246604 | |||
7f293115c4 | |||
f59f40a659 | |||
64fd82f92c | |||
cd232fd732 | |||
172fa66b1f |
@ -64,18 +64,6 @@ check_ipo_supported(RESULT SLS_LTO_AVAILABLE)
|
||||
message(STATUS "SLS_LTO_AVAILABLE:" ${SLS_LTO_AVAILABLE})
|
||||
|
||||
|
||||
# # Use ld.gold if it is available and isn't disabled explicitly
|
||||
# option(SLS_USE_LD_GOLD "Use GNU gold linker" ON)
|
||||
# if (SLS_USE_LD_GOLD)
|
||||
# execute_process(COMMAND ${CMAKE_C_COMPILER} -fuse-ld=gold -Wl,--version ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
|
||||
# if ("${LD_VERSION}" MATCHES "GNU gold")
|
||||
# set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold")
|
||||
# set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold")
|
||||
# set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold")
|
||||
# else ()
|
||||
# message(WARNING "GNU gold linker isn't available, using the default system linker.")
|
||||
# endif ()
|
||||
# endif ()
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
@ -187,20 +175,12 @@ if (SLS_USE_TEXTCLIENT)
|
||||
add_subdirectory(slsDetectorSoftware)
|
||||
endif (SLS_USE_TEXTCLIENT)
|
||||
|
||||
|
||||
if (SLS_USE_RECEIVER)
|
||||
if (SLS_USE_HDF5)
|
||||
find_package(HDF5 1.10 COMPONENTS CXX REQUIRED)
|
||||
endif (SLS_USE_HDF5)
|
||||
add_subdirectory(slsReceiverSoftware)
|
||||
endif (SLS_USE_RECEIVER)
|
||||
|
||||
if (SLS_USE_GUI)
|
||||
find_package(Qt4 REQUIRED)
|
||||
find_package(Qwt 6.1 REQUIRED)
|
||||
if (QT4_FOUND AND QWT_FOUND)
|
||||
add_subdirectory(slsDetectorGui)
|
||||
endif()
|
||||
endif (SLS_USE_GUI)
|
||||
|
||||
if (SLS_USE_SIMULATOR)
|
||||
@ -212,7 +192,7 @@ if (SLS_USE_INTEGRATION_TESTS)
|
||||
endif (SLS_USE_INTEGRATION_TESTS)
|
||||
|
||||
if (SLS_USE_PYTHON)
|
||||
set(PYBIND11_CPP_STANDARD -std=c++11)
|
||||
find_package (Python 3.6 COMPONENTS Interpreter Development)
|
||||
add_subdirectory(libs/pybind11)
|
||||
add_subdirectory(python)
|
||||
endif(SLS_USE_PYTHON)
|
||||
|
35
README.md
35
README.md
@ -4,7 +4,7 @@ Please do not update to any xxxx.xx.xx.dev0 tags. They are not releases, but tag
|
||||
Use only releases with tags such as x.x.x or x.x.x-rcx.
|
||||
|
||||
### Documentation
|
||||
Detailed documentation can be found on the [official site.](https://www.psi.ch/detectors/users-support)
|
||||
Detailed documentation on the latest release of 5.0.0 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).
|
||||
|
||||
### Binaries
|
||||
Binaries for the slsDetectorPackage are available through conda.
|
||||
@ -12,6 +12,7 @@ Binaries for the slsDetectorPackage are available through conda.
|
||||
#Add conda channels
|
||||
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)
|
||||
@ -29,10 +30,8 @@ git clone https://github.com/slsdetectorgroup/slsDetectorPackage.git
|
||||
|
||||
```
|
||||
#### Dependencies
|
||||
* Lib: c++11 compiler (gcc=>4.8), ZeroMQ 4
|
||||
* Gui: Qt 4.8 and Qwt 6.0
|
||||
* Calibration wizards and ctbGUI: ROOT
|
||||
* Optional: HDF5
|
||||
|
||||
Refer [this page](https://slsdetectorgroup.github.io/devdoc/dependencies.html) for dependencies.
|
||||
|
||||
|
||||
#### Compilation
|
||||
@ -42,15 +41,19 @@ cmk.sh or directly with cmake for more control.
|
||||
|
||||
**1. Compile using script cmk.sh**<br>
|
||||
|
||||
After compiling, the libraries and executables will be found in `slsDetectorPackage/build/bin` directory<br>
|
||||
These are mainly aimed at those not familiar with using ccmake and cmake.
|
||||
```
|
||||
The binaries are generated in slsDetectorPackage/build/bin directory.
|
||||
|
||||
Usage: [-c] [-b] [-p] [e] [t] [r] [g] [s] [u] [i] [-h] [-d <HDF5 directory>] [-j] <Number of threads>
|
||||
Usage: $0 [-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
|
||||
@ -59,9 +62,16 @@ Usage: [-c] [-b] [-p] [e] [t] [r] [g] [s] [u] [i] [-h] [-d <HDF5 directory>] [-j
|
||||
-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
|
||||
|
||||
eg. Rebuild when you switch to a new build and compile in parallel:
|
||||
# get 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.
|
||||
@ -71,3 +81,12 @@ Use cmake to create out-of-source builds, by creating a build folder parallel to
|
||||
$ cmake ../slsDetectorPackage -DCMAKE_BUILD_TYPE=Debug -DSLS_USE_SANITIZER=ON
|
||||
$ make -j12 #or whatever number of threads wanted
|
||||
```
|
||||
|
||||
To install binaries using CMake
|
||||
```
|
||||
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
|
||||
```
|
||||
|
114
RELEASE.txt
114
RELEASE.txt
@ -1,67 +1,70 @@
|
||||
SLS Detector Package 5.0.0-rc2 released on 09.10.2020 (Release Candidate 2)
|
||||
===========================================================================
|
||||
SLS Detector Package 5.0.1 released on 25.11.2020 (Bug Fix Release)
|
||||
===================================================================
|
||||
|
||||
This document describes the differences between 5.0.1 and 5.0.0 releases.
|
||||
|
||||
|
||||
|
||||
CONTENTS
|
||||
--------
|
||||
1. Firmware Requirements
|
||||
2. Download, Documentation & Support
|
||||
1. Topics Concerning
|
||||
2. Resolved Issues
|
||||
3. Known Issues
|
||||
4. Firmware Requirements
|
||||
5. Download, Documentation & Support
|
||||
|
||||
|
||||
1. Firmware Requirements
|
||||
|
||||
1. Topics Concerning
|
||||
====================
|
||||
|
||||
- Python bindings
|
||||
- CMake improvements
|
||||
|
||||
|
||||
|
||||
2. Resolved Issues
|
||||
==================
|
||||
|
||||
Python bindings
|
||||
---------------
|
||||
|
||||
1. Fixed function signatures for getRxUDPSocketBufferSize,
|
||||
setRxUDPSocketBufferSize and getRxRealUDPSocketBufferSize.
|
||||
|
||||
2. Updated pybind11 to v2.6.1 to remove warnings with Python 3.9 and
|
||||
better handling of C++ standard.
|
||||
|
||||
3. Added missing properties in Python.
|
||||
|
||||
|
||||
CMake improvements
|
||||
------------------
|
||||
|
||||
1. Explicitly state Python 3.6 or greater.
|
||||
|
||||
2. Finds the Python of the activated environment when using conda
|
||||
without having to supply additional arguments.
|
||||
|
||||
3. Removed redundant libraries for linking targets.
|
||||
|
||||
|
||||
|
||||
3. Firmware Requirements
|
||||
========================
|
||||
|
||||
Eiger
|
||||
=====
|
||||
Compatible version : 08.09.2020 (v27)
|
||||
|
||||
Jungfrau
|
||||
========
|
||||
Compatible version : 24.07.2020 (v1.1, PCB v1.0)
|
||||
: 21.07.2020 (v2.1, PCB v2.0)
|
||||
|
||||
Gotthard
|
||||
========
|
||||
Compatible version : 08.02.2018 (50um and 25um Master)
|
||||
: 09.02.2018 (25 um Slave)
|
||||
|
||||
Mythen3
|
||||
=======
|
||||
Compatible version : 25.09.2020 (development)
|
||||
|
||||
Gotthard2
|
||||
=========
|
||||
Compatible version : 25.09.2020 (development)
|
||||
|
||||
Moench
|
||||
======
|
||||
Compatible version : 10.05.2020 (v1.0)
|
||||
|
||||
Ctb
|
||||
===
|
||||
Compatible version : 10.05.2019 (v1.0)
|
||||
No updates from 5.0.0
|
||||
|
||||
|
||||
Detector Upgrade
|
||||
================
|
||||
|
||||
The following can be upgraded remotely:
|
||||
Eiger via bit files
|
||||
Jungfrau via command <.pof>
|
||||
Mythen3 via command <.rbf>
|
||||
Gotthard2 via command <.rbf>
|
||||
Moench via command <.pof>
|
||||
Ctb via command <.pof>
|
||||
4. Known Issues
|
||||
===============
|
||||
|
||||
The following cannot be upgraded remotely:
|
||||
Gotthard
|
||||
|
||||
Instructions available at
|
||||
https://slsdetectorgroup.github.io/devdoc/firmware.html
|
||||
and
|
||||
https://slsdetectorgroup.github.io/devdoc/serverupgrade.html
|
||||
No updates from 5.0.0
|
||||
|
||||
|
||||
2. Download, Documentation & Support
|
||||
|
||||
5. Download, Documentation & Support
|
||||
====================================
|
||||
|
||||
Download
|
||||
@ -88,6 +91,9 @@ SLS Detector Package 5.0.0-rc2 released on 09.10.2020 (Release Candidate 2)
|
||||
Consuming slsDetectorPackage:
|
||||
https://slsdetectorgroup.github.io/devdoc/consuming.html
|
||||
|
||||
API Examples:
|
||||
https://github.com/slsdetectorgroup/api-examples
|
||||
|
||||
Command Line Documentation:
|
||||
https://slsdetectorgroup.github.io/devdoc/commandline.html
|
||||
|
||||
@ -106,6 +112,10 @@ SLS Detector Package 5.0.0-rc2 released on 09.10.2020 (Release Candidate 2)
|
||||
Python API Example:
|
||||
https://slsdetectorgroup.github.io/devdoc/pyexamples.html
|
||||
|
||||
Receivers (including custom receiver):
|
||||
https://slsdetectorgroup.github.io/devdoc/receivers.html
|
||||
https://slsdetectorgroup.github.io/devdoc/slsreceiver.html
|
||||
|
||||
TroubleShooting:
|
||||
https://slsdetectorgroup.github.io/devdoc/troubleshooting.html
|
||||
|
||||
@ -121,4 +131,4 @@ SLS Detector Package 5.0.0-rc2 released on 09.10.2020 (Release Candidate 2)
|
||||
|
||||
dhanya.thattil@psi.ch
|
||||
erik.frojdh@psi.ch
|
||||
anna.bergamaschi@psi.ch
|
||||
|
||||
|
33
cmk.sh
33
cmk.sh
@ -1,5 +1,7 @@
|
||||
#!/bin/bash
|
||||
CMAKE="cmake3"
|
||||
BUILDDIR="build"
|
||||
INSTALLDIR=""
|
||||
HDF5DIR="/opt/hdf5v1.10.0"
|
||||
HDF5=0
|
||||
COMPILERTHREADS=0
|
||||
@ -22,13 +24,15 @@ CMAKE_PRE=""
|
||||
CMAKE_POST=""
|
||||
|
||||
usage() { echo -e "
|
||||
Usage: $0 [-c] [-b] [-p] [e] [t] [r] [g] [s] [u] [i] [m] [n] [-h] [z] [-d <HDF5 directory>] [-j] <Number of threads>
|
||||
Usage: $0 [-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
|
||||
@ -75,7 +79,7 @@ For rebuilding only certain sections
|
||||
|
||||
" ; exit 1; }
|
||||
|
||||
while getopts ":bpchd:j:trgeisumnz" opt ; do
|
||||
while getopts ":bpchd:k:l:j:trgeisumnz" opt ; do
|
||||
case $opt in
|
||||
b)
|
||||
echo "Building of CMake files Required"
|
||||
@ -99,6 +103,14 @@ while getopts ":bpchd:j:trgeisumnz" opt ; do
|
||||
echo "New HDF5 directory: $OPTARG"
|
||||
HDF5DIR=$OPTARG
|
||||
;;
|
||||
l)
|
||||
echo "CMake install directory: $OPTARG"
|
||||
INSTALLDIR="$OPTARG"
|
||||
;;
|
||||
k)
|
||||
echo "CMake command: $OPTARG"
|
||||
CMAKE="$OPTARG"
|
||||
;;
|
||||
j)
|
||||
echo "Number of compiler threads: $OPTARG"
|
||||
COMPILERTHREADS=$OPTARG
|
||||
@ -252,7 +264,15 @@ else
|
||||
fi
|
||||
|
||||
|
||||
#install
|
||||
if [ -n "$INSTALLDIR" ]; then
|
||||
CMAKE_POST+=" -DCMAKE_INSTALL_PREFIX=$INSTALLDIR"
|
||||
CMAKE_POST+=" -DCMAKE_FIND_ROOT_PATH=$INSTALLDIR"
|
||||
fi
|
||||
|
||||
|
||||
#enter build dir
|
||||
#pushd $BUILDDIR;
|
||||
cd $BUILDDIR;
|
||||
echo "in "$PWD
|
||||
|
||||
@ -261,7 +281,7 @@ echo "in "$PWD
|
||||
#cmake
|
||||
if [ $REBUILD -eq 1 ]; then
|
||||
rm -f CMakeCache.txt
|
||||
BUILDCOMMAND="$CMAKE_PRE cmake3 $CMAKE_POST .."
|
||||
BUILDCOMMAND="$CMAKE_PRE $CMAKE $CMAKE_POST .."
|
||||
echo $BUILDCOMMAND
|
||||
eval $BUILDCOMMAND
|
||||
fi
|
||||
@ -305,6 +325,13 @@ else
|
||||
fi
|
||||
|
||||
|
||||
#install
|
||||
if [ -n "$INSTALLDIR" ]; then
|
||||
make install
|
||||
# popd
|
||||
# $CMAKE --build $BUILDDIR --target install
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -36,7 +36,7 @@ Depreciated commands
|
||||
------------------------
|
||||
|
||||
.. note ::
|
||||
All dac commands are preceded with the **dac** command. Use command **daclist** to get correct list of dac command arguments for current detector.
|
||||
All the dac commands are preceded with the **dac** command. Use command **daclist** to get correct list of dac command arguments for current detector.
|
||||
|
||||
.. csv-table:: Depreciated commands
|
||||
:file: ../depreciated.csv
|
||||
|
@ -9,7 +9,7 @@ CMake approaches.
|
||||
One can test with :ref:`detector simulators<Virtual Detector Servers>` before testing the API with a real detector or when a real detector is not at hand.
|
||||
|
||||
CMake: slsDetectorPackage as submodule in your project
|
||||
---------------------------------------
|
||||
---------------------------------------------------------------
|
||||
|
||||
If you are using CMake to build your integration and want to build everything
|
||||
in one go, we support adding slsDetectorPackage as a subfolder in your cmake project.
|
||||
|
@ -12,32 +12,7 @@ Download
|
||||
|
||||
- detector server corresponding to package in slsDetectorPackage/serverBin
|
||||
|
||||
- bit files
|
||||
.. list-table::
|
||||
:widths: 25 10 30 25 10
|
||||
:header-rows: 1
|
||||
|
||||
* - Software
|
||||
- Hardware
|
||||
- Firmware Date
|
||||
- Firmware Link
|
||||
- Comments
|
||||
* - v5.0.0-rcx
|
||||
-
|
||||
- 08.09.2020
|
||||
- `v27 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/eiger/v27/>`__
|
||||
-
|
||||
* - v4.0.0 - v4.2.0
|
||||
-
|
||||
- 30.07.2019
|
||||
- `v24 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/eiger/v24/>`__
|
||||
-
|
||||
* - v3.1.0 - v3.1.5
|
||||
-
|
||||
- 17.08.2017
|
||||
- `v20 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/eiger/v20/>`__
|
||||
-
|
||||
|
||||
- `bit files <https://github.com/slsdetectorgroup/slsDetectorFirmware>`__
|
||||
|
||||
Upgrade
|
||||
^^^^^^^^
|
||||
@ -116,37 +91,7 @@ Download
|
||||
^^^^^^^^^^^^^
|
||||
- detector server corresponding to package in slsDetectorPackage/serverBin
|
||||
|
||||
- pof files
|
||||
.. list-table::
|
||||
:widths: 25 10 30 25 10
|
||||
:header-rows: 1
|
||||
|
||||
* - Software
|
||||
- Hardware
|
||||
- Firmware Date
|
||||
- Firmware Link
|
||||
- Comments
|
||||
* - v5.0.0-rcx
|
||||
- 2.0
|
||||
- 21.07.2020
|
||||
- `v2.1 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/jungfrau/v2_1/jungfrau_v2_1.pof>`__
|
||||
-
|
||||
* - v5.0.0-rcx
|
||||
- 1.0
|
||||
- 24.07.2020
|
||||
- `v1.1 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/jungfrau/v1_1/jungfrau_v1_1.pof>`__
|
||||
-
|
||||
* - v4.0.1 - v4.2.0
|
||||
- 1.0
|
||||
- 06.12.2018
|
||||
- `v0.7 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/jungfrau/v0_7/jungfrau_v0_7.pof>`__
|
||||
-
|
||||
* - v3.1.0 - v3.1.5
|
||||
- 1.0
|
||||
- 13.11.2017
|
||||
- `v0.6 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/jungfrau/v0_6/jungfrau_v0_6.pof>`__
|
||||
-
|
||||
|
||||
- `pof files <https://github.com/slsdetectorgroup/slsDetectorFirmware>`__
|
||||
|
||||
|
||||
Upgrade (from v4.x.x)
|
||||
@ -156,7 +101,7 @@ Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you
|
||||
|
||||
#. Tftp must be installed on pc.
|
||||
|
||||
#. Update client package to the latest (5.0.0-rc1).
|
||||
#. Update client package to the latest (5.x.x).
|
||||
|
||||
#. Disable server respawning or kill old server
|
||||
.. code-block:: bash
|
||||
@ -204,7 +149,7 @@ Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you
|
||||
jungfrauDetectorServervxxx --stop-server 1953
|
||||
|
||||
|
||||
Upgrade (from v5.0.0-rcx)
|
||||
Upgrade (from v5.0.0)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you run into issues while programming firmware.
|
||||
@ -230,31 +175,8 @@ Download
|
||||
^^^^^^^^^^^^^
|
||||
- detector server corresponding to package in slsDetectorPackage/serverBin
|
||||
|
||||
- pof files
|
||||
.. list-table::
|
||||
:widths: 15 15 15 15 5
|
||||
:header-rows: 1
|
||||
- `pof files <https://github.com/slsdetectorgroup/slsDetectorFirmware>`__
|
||||
|
||||
* - Software
|
||||
- Hardware
|
||||
- Firmware Date
|
||||
- Firmware Link
|
||||
- Comments
|
||||
* - All versions
|
||||
- 50um
|
||||
- 08.02.2018
|
||||
- `50um <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/gotthard_I/50um/gotthard_I_50um.pof>`__
|
||||
-
|
||||
* - All versions
|
||||
- 25um (master)
|
||||
- 08.02.2018
|
||||
- `25um (master) <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/gotthard_I/25um/master/gotthard_I_25um_master.pof>`__
|
||||
-
|
||||
* - All versions
|
||||
- 25um (slave)
|
||||
- 09.02.2018
|
||||
- `25um (slave) <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/gotthard_I/25um/slave/gotthard_I_25um_slave.pof>`__
|
||||
-
|
||||
|
||||
.. _firmware upgrade using blaster for blackfin:
|
||||
|
||||
@ -294,24 +216,10 @@ Download
|
||||
|
||||
- detector server corresponding to package in slsDetectorPackage/serverBin
|
||||
|
||||
- rbf files
|
||||
.. list-table::
|
||||
:widths: 25 10 30 25 10
|
||||
:header-rows: 1
|
||||
|
||||
* - Software
|
||||
- Hardware
|
||||
- Firmware Date
|
||||
- Firmware Link
|
||||
- Comments
|
||||
* - v5.0.0-rcx
|
||||
-
|
||||
- 25.09.2020
|
||||
-
|
||||
- development
|
||||
- rbf files (in developement)
|
||||
|
||||
|
||||
Upgrade (from v5.0.0-rcx)
|
||||
Upgrade (from v5.0.0)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
#. Program from console
|
||||
@ -337,23 +245,10 @@ Download
|
||||
^^^^^^^^^^^^^
|
||||
- detector server corresponding to package in slsDetectorPackage/serverBin
|
||||
|
||||
- rbf files
|
||||
.. list-table::
|
||||
:widths: 25 10 30 25 10
|
||||
:header-rows: 1
|
||||
- rbf files (in development)
|
||||
|
||||
* - Software
|
||||
- Hardware
|
||||
- Firmware Date
|
||||
- Firmware Link
|
||||
- Comments
|
||||
* - v5.0.0-rcx
|
||||
-
|
||||
- 25.09.2020
|
||||
-
|
||||
- development
|
||||
|
||||
Upgrade (from v5.0.0-rcx)
|
||||
Upgrade (from v5.0.0)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
#. Program from console
|
||||
@ -375,28 +270,10 @@ Download
|
||||
^^^^^^^^^^^^^
|
||||
- detector server corresponding to package in slsDetectorPackage/serverBin
|
||||
|
||||
- pof files
|
||||
.. list-table::
|
||||
:widths: 25 10 30 25 10
|
||||
:header-rows: 1
|
||||
- `pof files <https://github.com/slsdetectorgroup/slsDetectorFirmware>`__
|
||||
|
||||
* - Software
|
||||
- Hardware
|
||||
- Firmware Date
|
||||
- Firmware Link
|
||||
- Comments
|
||||
* - v5.0.0-rcx
|
||||
- EPCQ128
|
||||
- 05.10.2020
|
||||
- `v1.0 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/moench/EPCQ128/v1_0/moench_v1_0_201005.pof>`__
|
||||
-
|
||||
* - v5.0.0-rcx
|
||||
- EPCS128
|
||||
- 05.10.2020
|
||||
- `v1.0 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/moench/EPCS128/v1_0/moench_v1_0_201005.pof>`__
|
||||
-
|
||||
|
||||
Upgrade (from v5.0.0-rcx)
|
||||
Upgrade (from v5.0.0)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you run into issues while programming firmware.
|
||||
@ -419,28 +296,10 @@ Download
|
||||
^^^^^^^^^^^^^
|
||||
- detector server corresponding to package in slsDetectorPackage/serverBin
|
||||
|
||||
- pof files
|
||||
.. list-table::
|
||||
:widths: 25 10 30 25 10
|
||||
:header-rows: 1
|
||||
- `pof files <https://github.com/slsdetectorgroup/slsDetectorFirmware>`__
|
||||
|
||||
* - Software
|
||||
- Hardware
|
||||
- Firmware Date
|
||||
- Firmware Link
|
||||
- Comments
|
||||
* - v5.0.0-rcx
|
||||
- EPCQ128
|
||||
- 05.10.2020
|
||||
- `v1.0 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/ctb/EPCQ128/v1_0/ctb_v1_0_201005.pof>`__
|
||||
-
|
||||
* - v5.0.0-rcx
|
||||
- EPCS128
|
||||
- 05.10.2020
|
||||
- `v1.0 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/ctb/EPCS128/v1_0/ctb_v1_0_201005.pof>`__
|
||||
-
|
||||
|
||||
Upgrade (from v5.0.0-rcx)
|
||||
Upgrade (from v5.0.0)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you run into issues while programming firmware.
|
||||
@ -462,11 +321,12 @@ Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you
|
||||
Firmware Troubleshooting with blackfin
|
||||
----------------------------------------
|
||||
|
||||
#. v4.x.x client after programming will most likely reboot the blackfin processor, regardless of error.
|
||||
1. v4.x.x client after programming will most likely reboot the blackfin processor, regardless of error.
|
||||
|
||||
#. v5.x.x-rcx client after programming will not reboot the blackfin processor, if error occurred.
|
||||
2. v5.x.x-rcx client after programming will not reboot the blackfin processor, if error occurred.
|
||||
|
||||
3. If a reboot occured with an incomplete firmware in flash, the blackfin will most likely not find the mtd3 drive. To see if this drive exists:
|
||||
|
||||
#. If a reboot occured with an incomplete firmware in flash, the blackfin will most likely not find the mtd3 drive. To see if this drive exists:
|
||||
.. code-block:: bash
|
||||
|
||||
# connect to the board
|
||||
@ -482,7 +342,7 @@ Firmware Troubleshooting with blackfin
|
||||
|
||||
4. If one can see the mtd3 drive, one can already try to flash again using the **programfpga** command (without rebooting blackfin or detector).
|
||||
|
||||
#. If one can't list it, read the next section to try to get the blackfin to list it.
|
||||
5. If one can't list it, read the next section to try to get the blackfin to list it.
|
||||
|
||||
How to get back mtd3 drive remotely
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -49,25 +49,39 @@ The easiest way to configure options is to use the ccmake utility.
|
||||
|
||||
Build using cmk.sh script
|
||||
-------------------------
|
||||
These are mainly aimed at those not familiar with using ccmake and cmake.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
The binaries are generated in slsDetectorPackage/build/bin directory.
|
||||
|
||||
# new build and make with 9 parallel threads
|
||||
./cmk.sh -cbj9
|
||||
|
||||
# build with python
|
||||
./cmk.sh -bpj9
|
||||
|
||||
# build with GUI
|
||||
./cmk.sh -bgj9
|
||||
|
||||
# build with hdf5
|
||||
./cmk.sh -hj9 -d [path of hdf5 dir]
|
||||
Usage: $0 [-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
|
||||
|
||||
# get all options
|
||||
./cmk.sh -?
|
||||
|
||||
# new build and compile in parallel:
|
||||
./cmk.sh -bj5
|
||||
|
||||
|
||||
Install binaries using conda
|
||||
--------------------------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
Receiver
|
||||
==============================================
|
||||
|
||||
.. doxygenclass:: Receiver
|
||||
.. doxygenclass:: sls::Receiver
|
||||
:members:
|
||||
.. :undoc-members:
|
@ -48,3 +48,24 @@ Custom Receiver
|
||||
| Cannot use "auto" for **udp_dstip**.
|
||||
|
||||
| Also ensure that there are no **rx_** commands in the config file. These commands are for configuring the slsReceiver.
|
||||
|
||||
Example of a custom receiver config file
|
||||
|
||||
* The main difference is the lack of **rx_** commands or file commands (eg. fwrite, fpath) and the udp_dstmac is required in config file.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# detector hostname
|
||||
hostname bchip052
|
||||
|
||||
# udp destination port (receiver)
|
||||
udp_dstport 50004
|
||||
|
||||
# udp destination ip (receiver)
|
||||
udp_dstip 10.0.1.100
|
||||
|
||||
# udp source ip (same subnet as udp_dstip)
|
||||
udp_srcip 10.0.1.184
|
||||
|
||||
# udp destination mac
|
||||
udp_dstmac 22:47:d5:48:ad:ef
|
||||
|
@ -1,6 +1,10 @@
|
||||
Troubleshooting
|
||||
=================
|
||||
|
||||
If something is missing, don't hesitate to
|
||||
open an issue at our `github repo issues
|
||||
<https://github.com/slsdetectorgroup/slsDetectorPackage/issues>`_.
|
||||
|
||||
Common
|
||||
------
|
||||
|
||||
|
@ -60,6 +60,7 @@ Client
|
||||
sls_detector_put virtual 2 1912
|
||||
|
||||
Use the same in the config file.
|
||||
Detector API has a method 'isVirtualDetectorServer' to check if on-board detector server is virtual.
|
||||
|
||||
|
||||
Sample Config file
|
||||
|
39
examples/jungfrau_custom_receiver.config
Executable file
39
examples/jungfrau_custom_receiver.config
Executable file
@ -0,0 +1,39 @@
|
||||
# detector hostname
|
||||
hostname bchip052
|
||||
|
||||
# do not use any rx_ or "file" (eg. fwrite, fpath) commands, which go to slsReceiver/slsMultiReceiver
|
||||
|
||||
# udp destination port (receiver)
|
||||
udp_dstport 50004
|
||||
|
||||
# udp destination ip (receiver)
|
||||
udp_dstip 10.0.1.100
|
||||
|
||||
# udp source ip (same subnet as udp_dstip)
|
||||
udp_srcip 10.0.1.184
|
||||
|
||||
# udp destination mac
|
||||
udp_dstmac 22:47:d5:48:ad:ef
|
||||
|
||||
|
||||
# PCBv2.0 (using 2 interfaces, top)
|
||||
udp_dstport2 50005
|
||||
udp_dstip2 10.0.2.100
|
||||
udp_srcip2 10.0.2.184
|
||||
udp_dstmac2 22:47:d5:48:ad:ff
|
||||
|
||||
|
||||
# enable two interfaces
|
||||
numinterfaces 2
|
||||
# select inner interface(effective only when numinterfaces is 1)
|
||||
#selinterface 1
|
||||
|
||||
# power on chip
|
||||
powerchip 1
|
||||
|
||||
# high voltage
|
||||
highvoltage 200
|
||||
|
||||
# timing to trigger
|
||||
timing trigger
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
#include "catch.hpp"
|
||||
|
||||
#include "sls/ClientSocket.h"
|
||||
#include "DetectorImpl.h"
|
||||
#include "Module.h"
|
||||
#include "sls/ClientSocket.h"
|
||||
#include "sls/logger.h"
|
||||
#include "sls/sls_detector_defs.h"
|
||||
|
||||
@ -446,8 +446,8 @@ TEST_CASE("Chiptestboard Dbit offset, list, sampling, advinvert",
|
||||
CHECK(m.readRegister(0x7b) == 0x1003E);
|
||||
}
|
||||
|
||||
TEST_CASE("Eiger or Jungfrau startingfnum",
|
||||
"[.eigerintegration][.jungfrauintegration][startingfnum]") {
|
||||
TEST_CASE("Eiger or Jungfrau nextframenumber",
|
||||
"[.eigerintegration][.jungfrauintegration][nextframenumber]") {
|
||||
SingleDetectorConfig c;
|
||||
|
||||
// pick up multi detector from shm id 0
|
||||
@ -465,8 +465,8 @@ TEST_CASE("Eiger or Jungfrau startingfnum",
|
||||
// starting fnum
|
||||
uint64_t val = 8;
|
||||
|
||||
m.setStartingFrameNumber(val);
|
||||
CHECK(m.getStartingFrameNumber() == val);
|
||||
m.setNextFrameNumber(val);
|
||||
CHECK(m.getNextFrameNumber() == val);
|
||||
CHECK(m.acquire() == slsDetectorDefs::OK);
|
||||
CHECK(m.getReceiverCurrentFrameIndex() == val);
|
||||
|
||||
@ -474,18 +474,18 @@ TEST_CASE("Eiger or Jungfrau startingfnum",
|
||||
CHECK(m.acquire() == slsDetectorDefs::OK);
|
||||
CHECK(m.getReceiverCurrentFrameIndex() == val);
|
||||
|
||||
CHECK_THROWS_AS(m.setStartingFrameNumber(0), sls::RuntimeError);
|
||||
CHECK_THROWS_AS(m.setNextFrameNumber(0), sls::RuntimeError);
|
||||
|
||||
if (m.getDetectorTypeAsString() == "Eiger") {
|
||||
val = 281474976710655;
|
||||
} else if (m.getDetectorTypeAsString() == "Jungfrau") {
|
||||
val = 18446744073709551615;
|
||||
}
|
||||
m.setStartingFrameNumber(val);
|
||||
CHECK(m.getStartingFrameNumber() == val);
|
||||
m.setNextFrameNumber(val);
|
||||
CHECK(m.getNextFrameNumber() == val);
|
||||
CHECK(m.acquire() == slsDetectorDefs::OK);
|
||||
CHECK(m.getReceiverCurrentFrameIndex() == val);
|
||||
CHECK(m.getStartingFrameNumber() == (val + 1));
|
||||
CHECK(m.getNextFrameNumber() == (val + 1));
|
||||
}
|
||||
|
||||
TEST_CASE("Eiger readnlines", "[.eigerintegration][readnlines]") {
|
||||
|
Submodule libs/pybind11 updated: 4f72ef846f...f1abf5d915
@ -1,6 +1,4 @@
|
||||
|
||||
# find_package (Python COMPONENTS Interpreter Development)
|
||||
|
||||
pybind11_add_module(_slsdet
|
||||
src/main.cpp
|
||||
src/enums.cpp
|
||||
@ -9,10 +7,7 @@ pybind11_add_module(_slsdet
|
||||
)
|
||||
|
||||
target_link_libraries(_slsdet PUBLIC
|
||||
slsDetectorShared
|
||||
slsReceiverShared
|
||||
slsSupportShared
|
||||
${ZeroMQ_LIBRARIES}
|
||||
slsDetectorStatic
|
||||
)
|
||||
|
||||
|
||||
|
@ -349,7 +349,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
@element
|
||||
def nframes(self):
|
||||
def framecounter(self):
|
||||
"""
|
||||
[Jungfrau][Mythen3][Gotthard2][Moench][CTB] Number of frames from start run control.
|
||||
Note
|
||||
@ -540,13 +540,13 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
@element
|
||||
def startingfnum(self):
|
||||
"""[Eiger][Jungfrau] Starting frame number for next acquisition. Stopping acquisition might result in different frame numbers for different modules. """
|
||||
return self.getStartingFrameNumber()
|
||||
def nextframenumber(self):
|
||||
"""[Eiger][Jungfrau] Next frame number. Stopping acquisition might result in different frame numbers for different modules. """
|
||||
return self.getNextFrameNumber()
|
||||
|
||||
@startingfnum.setter
|
||||
def startingfnum(self, value):
|
||||
ut.set_using_dict(self.setStartingFrameNumber, value)
|
||||
@nextframenumber.setter
|
||||
def nextframenumber(self, value):
|
||||
ut.set_using_dict(self.setNextFrameNumber, value)
|
||||
|
||||
@property
|
||||
@element
|
||||
@ -1009,6 +1009,32 @@ class Detector(CppDetectorApi):
|
||||
ip = ut.make_ip(ip) #Convert from int or string to IpAddr
|
||||
ut.set_using_dict(self.setClientZmqIp, ip)
|
||||
|
||||
|
||||
@property
|
||||
def zmqhwm(self):
|
||||
"""
|
||||
Client's zmq receive high water mark. Default is the zmq library's default (1000), can also be set here using -1.
|
||||
This is a high number and can be set to 2 for gui purposes.
|
||||
One must also set the receiver's send high water mark to similar value. Final effect is sum of them.
|
||||
Setting it via command line is useful only before zmq enabled (before opening gui).
|
||||
"""
|
||||
return self.getClientZmqHwm()
|
||||
|
||||
@zmqhwm.setter
|
||||
def zmqhwm(self, n_frames):
|
||||
self.setClientZmqHwm(n_frames)
|
||||
|
||||
@property
|
||||
def rx_zmqhwm(self):
|
||||
"""
|
||||
Receiver's zmq send high water mark. Default is the zmq library's default (1000). This is a high number and can be set to 2 for gui purposes. One must also set the client's receive high water mark to similar value. Final effect is sum of them. Also restarts receiver zmq streaming if enabled. Can set to -1 to set default value.
|
||||
"""
|
||||
return self.getRxZmqHwm()
|
||||
|
||||
@rx_zmqhwm.setter
|
||||
def rx_zmqhwm(self, n_frames):
|
||||
self.setRxZmqHwm(n_frames)
|
||||
|
||||
@property
|
||||
@element
|
||||
def udp_dstip(self):
|
||||
@ -1499,7 +1525,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
@element
|
||||
def timestamp(self):
|
||||
def frametime(self):
|
||||
"""[Jungfrau][Mythen3][Gotthard2][Moench][CTB] Timestamp at a frame start.
|
||||
Note
|
||||
----
|
||||
@ -1965,7 +1991,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
@element
|
||||
def now(self):
|
||||
def runtime(self):
|
||||
"""[Jungfrau][Mythen3][Gotthard2][Moench][CTB] Time from detector start up.
|
||||
Note
|
||||
-----
|
||||
@ -3079,6 +3105,14 @@ class Detector(CppDetectorApi):
|
||||
"""
|
||||
return ClkFreqProxy(self)
|
||||
|
||||
|
||||
def readout(self):
|
||||
"""
|
||||
Mythen3] Starts detector readout. Status changes to TRANSMITTING and automatically returns to idle at the end of readout.
|
||||
"""
|
||||
self.startDetectorReadout()
|
||||
|
||||
|
||||
"""
|
||||
---------------------------<<<Debug>>>---------------------------
|
||||
"""
|
||||
|
@ -120,6 +120,10 @@ void init_det(py::module &m) {
|
||||
(void (Detector::*)(const bool)) &
|
||||
Detector::setGapPixelsinCallback,
|
||||
py::arg())
|
||||
.def("isVirtualDetectorServer",
|
||||
(Result<bool>(Detector::*)(sls::Positions) const) &
|
||||
Detector::isVirtualDetectorServer,
|
||||
py::arg() = Positions{})
|
||||
.def("registerAcquisitionFinishedCallback",
|
||||
(void (Detector::*)(void (*)(double, int, void *), void *)) &
|
||||
Detector::registerAcquisitionFinishedCallback,
|
||||
@ -314,6 +318,9 @@ void init_det(py::module &m) {
|
||||
py::arg(), py::arg() = Positions{})
|
||||
.def("getDacList", (std::vector<defs::dacIndex>(Detector::*)() const) &
|
||||
Detector::getDacList)
|
||||
.def("setDefaultDacs",
|
||||
(void (Detector::*)(sls::Positions)) & Detector::setDefaultDacs,
|
||||
py::arg() = Positions{})
|
||||
.def("getDAC",
|
||||
(Result<int>(Detector::*)(defs::dacIndex, bool, sls::Positions)
|
||||
const) &
|
||||
@ -356,6 +363,8 @@ void init_det(py::module &m) {
|
||||
.def("startReceiver", (void (Detector::*)()) & Detector::startReceiver)
|
||||
.def("stopReceiver", (void (Detector::*)()) & Detector::stopReceiver)
|
||||
.def("startDetector", (void (Detector::*)()) & Detector::startDetector)
|
||||
.def("startDetectorReadout",
|
||||
(void (Detector::*)()) & Detector::startDetectorReadout)
|
||||
.def("stopDetector", (void (Detector::*)()) & Detector::stopDetector)
|
||||
.def("getDetectorStatus",
|
||||
(Result<defs::runStatus>(Detector::*)(sls::Positions) const) &
|
||||
@ -374,13 +383,13 @@ void init_det(py::module &m) {
|
||||
(Result<std::vector<uint64_t>>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getNumMissingPackets,
|
||||
py::arg() = Positions{})
|
||||
.def("getStartingFrameNumber",
|
||||
.def("getNextFrameNumber",
|
||||
(Result<uint64_t>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getStartingFrameNumber,
|
||||
Detector::getNextFrameNumber,
|
||||
py::arg() = Positions{})
|
||||
.def("setStartingFrameNumber",
|
||||
.def("setNextFrameNumber",
|
||||
(void (Detector::*)(uint64_t, sls::Positions)) &
|
||||
Detector::setStartingFrameNumber,
|
||||
Detector::setNextFrameNumber,
|
||||
py::arg(), py::arg() = Positions{})
|
||||
.def("sendSoftwareTrigger",
|
||||
(void (Detector::*)(sls::Positions)) &
|
||||
@ -599,15 +608,15 @@ void init_det(py::module &m) {
|
||||
Detector::setPartialFramesPadding,
|
||||
py::arg(), py::arg() = Positions{})
|
||||
.def("getRxUDPSocketBufferSize",
|
||||
(Result<int64_t>(Detector::*)(sls::Positions) const) &
|
||||
(Result<int>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getRxUDPSocketBufferSize,
|
||||
py::arg() = Positions{})
|
||||
.def("setRxUDPSocketBufferSize",
|
||||
(void (Detector::*)(int64_t, sls::Positions)) &
|
||||
(void (Detector::*)(int, sls::Positions)) &
|
||||
Detector::setRxUDPSocketBufferSize,
|
||||
py::arg(), py::arg() = Positions{})
|
||||
.def("getRxRealUDPSocketBufferSize",
|
||||
(Result<int64_t>(Detector::*)(sls::Positions) const) &
|
||||
(Result<int>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getRxRealUDPSocketBufferSize,
|
||||
py::arg() = Positions{})
|
||||
.def("getRxLock",
|
||||
@ -747,6 +756,17 @@ void init_det(py::module &m) {
|
||||
(void (Detector::*)(const sls::IpAddr, sls::Positions)) &
|
||||
Detector::setClientZmqIp,
|
||||
py::arg(), py::arg() = Positions{})
|
||||
.def("getClientZmqHwm",
|
||||
(int (Detector::*)() const) & Detector::getClientZmqHwm)
|
||||
.def("setClientZmqHwm",
|
||||
(void (Detector::*)(const int)) & Detector::setClientZmqHwm,
|
||||
py::arg())
|
||||
.def("getRxZmqHwm",
|
||||
(Result<int>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getRxZmqHwm,
|
||||
py::arg() = Positions{})
|
||||
.def("setRxZmqHwm",
|
||||
(void (Detector::*)(const int)) & Detector::setRxZmqHwm, py::arg())
|
||||
.def("getSubExptime",
|
||||
(Result<sls::ns>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getSubExptime,
|
||||
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServer_developer
|
1
serverBin/ctbDetectorServerv5.0.0
Symbolic link
1
serverBin/ctbDetectorServerv5.0.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv5.0.0
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServer_developer
|
1
serverBin/eigerDetectorServerv5.0.0
Symbolic link
1
serverBin/eigerDetectorServerv5.0.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv5.0.0
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer
|
1
serverBin/gotthard2DetectorServerv5.0.0
Symbolic link
1
serverBin/gotthard2DetectorServerv5.0.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv5.0.0
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServer_developer
|
1
serverBin/gotthardDetectorServerv5.0.0
Symbolic link
1
serverBin/gotthardDetectorServerv5.0.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv5.0.0
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServer_developer
|
1
serverBin/jungfrauDetectorServerv5.0.0
Symbolic link
1
serverBin/jungfrauDetectorServerv5.0.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv5.0.0
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServer_developer
|
1
serverBin/moenchDetectorServerv5.0.0
Symbolic link
1
serverBin/moenchDetectorServerv5.0.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv5.0.0
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer
|
1
serverBin/mythen3DetectorServerv5.0.0
Symbolic link
1
serverBin/mythen3DetectorServerv5.0.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv5.0.0
|
@ -1,5 +1,7 @@
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
|
||||
find_package(Qt4 REQUIRED)
|
||||
find_package(Qwt 6.1 REQUIRED)
|
||||
find_package(PNG REQUIRED)
|
||||
find_package(ZLIB REQUIRED)
|
||||
|
||||
|
@ -344,7 +344,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QSpinBox" name="spinStartingFrameNumber">
|
||||
<widget class="QSpinBox" name="spinNextFrameNumber">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
@ -361,7 +361,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>The starting frame number of next acquisition.</p><p>#startingfnum</p></body></html></string>
|
||||
<string><html><head/><body><p>The next frame number</p><p>#nextframenumber</p></body></html></string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string/>
|
||||
@ -390,12 +390,12 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lblStartingFrameNumber">
|
||||
<widget class="QLabel" name="lblNextFrameNumber">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>The starting frame number of next acquisition.</p><p>#startingfnum</p></body></html></string>
|
||||
<string><html><head/><body><p>The next frame number</p><p>#nextframenumber</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Next Frame Number: </string>
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include "sls/Detector.h"
|
||||
#include "qDefs.h"
|
||||
#include "sls/Detector.h"
|
||||
#include "ui_form_detectormain.h"
|
||||
#include <QTabWidget>
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include "sls/Detector.h"
|
||||
#include "qDefs.h"
|
||||
#include "sls/Detector.h"
|
||||
#include "ui_form_plot.h"
|
||||
#include <mutex>
|
||||
|
||||
@ -63,7 +63,7 @@ class qDrawPlot : public QWidget, private Ui::PlotObject {
|
||||
|
||||
signals:
|
||||
void AcquireFinishedSignal();
|
||||
void AbortSignal();
|
||||
void AbortSignal(QString);
|
||||
void UpdateSignal();
|
||||
|
||||
private:
|
||||
|
@ -16,7 +16,7 @@ class qTabMeasurement : public QWidget, private Ui::TabMeasurementObject {
|
||||
|
||||
public slots:
|
||||
void AcquireFinished();
|
||||
void AbortAcquire();
|
||||
void AbortAcquire(QString exmsg);
|
||||
|
||||
private slots:
|
||||
void SetTimingMode(int val);
|
||||
@ -35,7 +35,7 @@ class qTabMeasurement : public QWidget, private Ui::TabMeasurementObject {
|
||||
void SetFileName(bool force = false);
|
||||
void ForceSetFileName();
|
||||
void SetRunIndex(int val);
|
||||
void SetStartingFrameNumber(int val);
|
||||
void SetNextFrameNumber(int val);
|
||||
void UpdateProgress();
|
||||
void StartAcquisition();
|
||||
void StopAcquisition();
|
||||
@ -67,7 +67,7 @@ class qTabMeasurement : public QWidget, private Ui::TabMeasurementObject {
|
||||
void GetFileWrite();
|
||||
void GetFileName();
|
||||
void GetRunIndex();
|
||||
void GetStartingFrameNumber();
|
||||
void GetNextFrameNumber();
|
||||
|
||||
void ResetProgress();
|
||||
|
||||
|
@ -270,7 +270,8 @@ void qDetectorMain::Initialization() {
|
||||
// Plotting
|
||||
connect(plot, SIGNAL(AcquireFinishedSignal()), tabMeasurement,
|
||||
SLOT(AcquireFinished()));
|
||||
connect(plot, SIGNAL(AbortSignal()), tabMeasurement, SLOT(AbortAcquire()));
|
||||
connect(plot, SIGNAL(AbortSignal(QString)), tabMeasurement,
|
||||
SLOT(AbortAcquire(QString)));
|
||||
|
||||
// menubar
|
||||
// Modes Menu
|
||||
|
@ -1,8 +1,8 @@
|
||||
#include "qDrawPlot.h"
|
||||
#include "SlsQt1DPlot.h"
|
||||
#include "SlsQt2DPlot.h"
|
||||
#include "sls/detectorData.h"
|
||||
#include "qCloneWidget.h"
|
||||
#include "sls/detectorData.h"
|
||||
|
||||
#include "sls/ToString.h"
|
||||
#include "sls/detectorData.h"
|
||||
@ -672,18 +672,15 @@ void qDrawPlot::AcquireThread() {
|
||||
// handle it
|
||||
if (!mess.empty()) {
|
||||
LOG(logERROR) << "Acquisition Finished with an exception: " << mess;
|
||||
qDefs::ExceptionMessage("Acquire unsuccessful.", mess,
|
||||
"qDrawPlot::AcquireFinished");
|
||||
// qDefs::ExceptionMessage("Acquire unsuccessful.", mess,
|
||||
// "qDrawPlot::AcquireFinished");
|
||||
try {
|
||||
det->stopDetector();
|
||||
}
|
||||
CATCH_DISPLAY("Could not stop detector acquisition.",
|
||||
"qDrawPlot::AcquireFinished");
|
||||
try {
|
||||
det->stopReceiver();
|
||||
} catch (...) {
|
||||
;
|
||||
}
|
||||
CATCH_DISPLAY("Could not stop receiver.", "qDrawPlot::AcquireFinished");
|
||||
emit AbortSignal();
|
||||
emit AbortSignal(QString(mess.c_str()));
|
||||
}
|
||||
LOG(logDEBUG) << "End of Acquisition Finished";
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "qTabAdvanced.h"
|
||||
#include "sls/network_utils.h"
|
||||
#include "qDefs.h"
|
||||
#include "qDrawPlot.h"
|
||||
#include "sls/network_utils.h"
|
||||
|
||||
qTabAdvanced::qTabAdvanced(QWidget *parent, sls::Detector *detector,
|
||||
qDrawPlot *p)
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "qTabDebugging.h"
|
||||
#include "sls/ToString.h"
|
||||
#include "qDefs.h"
|
||||
#include "sls/ToString.h"
|
||||
#include <QDesktopWidget>
|
||||
#include <QGridLayout>
|
||||
#include <QTreeWidget>
|
||||
|
@ -56,13 +56,13 @@ void qTabMeasurement::SetupWidgetWindow() {
|
||||
break;
|
||||
case slsDetectorDefs::EIGER:
|
||||
delayImplemented = false;
|
||||
lblStartingFrameNumber->setEnabled(true);
|
||||
spinStartingFrameNumber->setEnabled(true);
|
||||
lblNextFrameNumber->setEnabled(true);
|
||||
spinNextFrameNumber->setEnabled(true);
|
||||
startingFnumImplemented = true;
|
||||
break;
|
||||
case slsDetectorDefs::JUNGFRAU:
|
||||
lblStartingFrameNumber->setEnabled(true);
|
||||
spinStartingFrameNumber->setEnabled(true);
|
||||
lblNextFrameNumber->setEnabled(true);
|
||||
spinNextFrameNumber->setEnabled(true);
|
||||
startingFnumImplemented = true;
|
||||
break;
|
||||
case slsDetectorDefs::GOTTHARD2:
|
||||
@ -141,8 +141,8 @@ void qTabMeasurement::Initialization() {
|
||||
SLOT(ForceSetFileName()));
|
||||
connect(spinIndex, SIGNAL(valueChanged(int)), this, SLOT(SetRunIndex(int)));
|
||||
if (startingFnumImplemented) {
|
||||
connect(spinStartingFrameNumber, SIGNAL(valueChanged(int)), this,
|
||||
SLOT(SetStartingFrameNumber(int)));
|
||||
connect(spinNextFrameNumber, SIGNAL(valueChanged(int)), this,
|
||||
SLOT(SetNextFrameNumber(int)));
|
||||
}
|
||||
connect(progressTimer, SIGNAL(timeout()), this, SLOT(UpdateProgress()));
|
||||
connect(btnStart, SIGNAL(clicked()), this, SLOT(StartAcquisition()));
|
||||
@ -825,29 +825,29 @@ void qTabMeasurement::SetRunIndex(int val) {
|
||||
&qTabMeasurement::GetRunIndex)
|
||||
}
|
||||
|
||||
void qTabMeasurement::GetStartingFrameNumber() {
|
||||
void qTabMeasurement::GetNextFrameNumber() {
|
||||
LOG(logDEBUG) << "Getting Starting Frame Number";
|
||||
disconnect(spinStartingFrameNumber, SIGNAL(valueChanged(int)), this,
|
||||
SLOT(SetStartingFrameNumber(int)));
|
||||
disconnect(spinNextFrameNumber, SIGNAL(valueChanged(int)), this,
|
||||
SLOT(SetNextFrameNumber(int)));
|
||||
try {
|
||||
auto retval = det->getStartingFrameNumber().tsquash(
|
||||
auto retval = det->getNextFrameNumber().tsquash(
|
||||
"Inconsistent starting frame number for all detectors.");
|
||||
spinStartingFrameNumber->setValue(retval);
|
||||
spinNextFrameNumber->setValue(retval);
|
||||
}
|
||||
CATCH_DISPLAY("Could not get starting frame number.",
|
||||
"qTabMeasurement::GetStartingFrameNumber")
|
||||
connect(spinStartingFrameNumber, SIGNAL(valueChanged(int)), this,
|
||||
SLOT(SetStartingFrameNumber(int)));
|
||||
"qTabMeasurement::GetNextFrameNumber")
|
||||
connect(spinNextFrameNumber, SIGNAL(valueChanged(int)), this,
|
||||
SLOT(SetNextFrameNumber(int)));
|
||||
}
|
||||
|
||||
void qTabMeasurement::SetStartingFrameNumber(int val) {
|
||||
void qTabMeasurement::SetNextFrameNumber(int val) {
|
||||
LOG(logINFO) << "Setting Starting frame number to " << val;
|
||||
try {
|
||||
det->setStartingFrameNumber(val);
|
||||
det->setNextFrameNumber(val);
|
||||
}
|
||||
CATCH_HANDLE("Could not set starting frame number.",
|
||||
"qTabMeasurement::SetStartingFrameNumber", this,
|
||||
&qTabMeasurement::GetStartingFrameNumber)
|
||||
"qTabMeasurement::SetNextFrameNumber", this,
|
||||
&qTabMeasurement::GetNextFrameNumber)
|
||||
}
|
||||
|
||||
void qTabMeasurement::ResetProgress() {
|
||||
@ -928,7 +928,7 @@ void qTabMeasurement::AcquireFinished() {
|
||||
UpdateProgress();
|
||||
GetRunIndex();
|
||||
if (startingFnumImplemented) {
|
||||
GetStartingFrameNumber();
|
||||
GetNextFrameNumber();
|
||||
}
|
||||
LOG(logDEBUG) << "Measurement " << currentMeasurement << " finished";
|
||||
// next measurement if acq is not stopped
|
||||
@ -948,8 +948,11 @@ void qTabMeasurement::AcquireFinished() {
|
||||
}
|
||||
}
|
||||
|
||||
void qTabMeasurement::AbortAcquire() {
|
||||
void qTabMeasurement::AbortAcquire(QString exmsg) {
|
||||
LOG(logINFORED) << "Abort Acquire";
|
||||
qDefs::ExceptionMessage("Acquire unsuccessful.",
|
||||
exmsg.toAscii().constData(),
|
||||
"qDrawPlot::AcquireFinished");
|
||||
isAcquisitionStopped = true;
|
||||
AcquireFinished();
|
||||
}
|
||||
@ -995,7 +998,7 @@ void qTabMeasurement::Refresh() {
|
||||
GetFileName();
|
||||
GetRunIndex();
|
||||
if (startingFnumImplemented) {
|
||||
GetStartingFrameNumber();
|
||||
GetNextFrameNumber();
|
||||
}
|
||||
ResetProgress();
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "qTabSettings.h"
|
||||
#include "sls/ToString.h"
|
||||
#include "qDefs.h"
|
||||
#include "sls/ToString.h"
|
||||
#include <QStandardItemModel>
|
||||
|
||||
qTabSettings::qTabSettings(QWidget *parent, sls::Detector *detector)
|
||||
|
Binary file not shown.
BIN
slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv5.0.0
Executable file
BIN
slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv5.0.0
Executable file
Binary file not shown.
@ -35,7 +35,7 @@ int Beb_activated = 1;
|
||||
uint32_t Beb_detid = 0;
|
||||
int Beb_top = 0;
|
||||
|
||||
uint64_t Beb_deactivatedStartFrameNumber = 0;
|
||||
uint64_t Beb_deactivatedNextFrameNumber = 0;
|
||||
int Beb_quadEnable = 0;
|
||||
int Beb_positions[2] = {0, 0};
|
||||
int Beb_readNLines = MAX_ROWS_PER_READOUT;
|
||||
@ -1441,22 +1441,22 @@ int Beb_SetDetectorPosition(int pos[]) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
int Beb_SetStartingFrameNumber(uint64_t value) {
|
||||
int Beb_SetNextFrameNumber(uint64_t value) {
|
||||
if (!Beb_activated) {
|
||||
Beb_deactivatedStartFrameNumber = value;
|
||||
Beb_deactivatedNextFrameNumber = value;
|
||||
return OK;
|
||||
}
|
||||
LOG(logINFO,
|
||||
("Setting start frame number: %llu\n", (long long unsigned int)value));
|
||||
("Setting next frame number: %llu\n", (long long unsigned int)value));
|
||||
|
||||
u_int32_t *csp0base = 0;
|
||||
int fd = Beb_open(&csp0base, XPAR_PLB_GPIO_TEST_BASEADDR);
|
||||
if (fd < 0) {
|
||||
LOG(logERROR, ("Set Start Frame Number FAIL\n"));
|
||||
LOG(logERROR, ("Set next Frame Number FAIL\n"));
|
||||
return FAIL;
|
||||
}
|
||||
// since the read is not implemented in firmware yet
|
||||
Beb_deactivatedStartFrameNumber = value;
|
||||
Beb_deactivatedNextFrameNumber = value;
|
||||
|
||||
// decrement for firmware
|
||||
uint64_t valueInFirmware = value - 1;
|
||||
@ -1471,17 +1471,17 @@ int Beb_SetStartingFrameNumber(uint64_t value) {
|
||||
return OK;
|
||||
}
|
||||
|
||||
int Beb_GetStartingFrameNumber(uint64_t *retval, int tengigaEnable) {
|
||||
int Beb_GetNextFrameNumber(uint64_t *retval, int tengigaEnable) {
|
||||
if (!Beb_activated) {
|
||||
*retval = Beb_deactivatedStartFrameNumber;
|
||||
*retval = Beb_deactivatedNextFrameNumber;
|
||||
return OK;
|
||||
}
|
||||
|
||||
LOG(logDEBUG1, ("Getting start frame number\n"));
|
||||
LOG(logDEBUG1, ("Getting next frame number\n"));
|
||||
u_int32_t *csp0base = 0;
|
||||
int fd = Beb_open(&csp0base, XPAR_COUNTER_BASEADDR);
|
||||
if (fd < 0) {
|
||||
LOG(logERROR, ("Get Start Frame Number FAIL\n"));
|
||||
LOG(logERROR, ("Get next Frame Number FAIL\n"));
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
|
@ -103,8 +103,8 @@ int Beb_SetQuad(int value);
|
||||
int Beb_GetQuad();
|
||||
int *Beb_GetDetectorPosition();
|
||||
int Beb_SetDetectorPosition(int pos[]);
|
||||
int Beb_SetStartingFrameNumber(uint64_t value);
|
||||
int Beb_GetStartingFrameNumber(uint64_t *retval, int tengigaEnable);
|
||||
int Beb_SetNextFrameNumber(uint64_t value);
|
||||
int Beb_GetNextFrameNumber(uint64_t *retval, int tengigaEnable);
|
||||
|
||||
void Beb_SetReadNLines(int value);
|
||||
|
||||
|
Binary file not shown.
BIN
slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv5.0.0
Executable file
BIN
slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv5.0.0
Executable file
Binary file not shown.
@ -85,7 +85,7 @@ int eiger_virtual_transmission_delay_right = 0;
|
||||
int eiger_virtual_transmission_delay_frame = 0;
|
||||
int eiger_virtual_transmission_flowcontrol_10g = 0;
|
||||
int eiger_virtual_activate = 1;
|
||||
uint64_t eiger_virtual_startingframenumber = 1;
|
||||
uint64_t eiger_virtual_nextframenumber = 1;
|
||||
int eiger_virtual_detPos[2] = {0, 0};
|
||||
int eiger_virtual_test_mode = 0;
|
||||
int eiger_virtual_quad_mode = 0;
|
||||
@ -681,18 +681,7 @@ void allocateDetectorStructureMemory() {
|
||||
void setupDetector() {
|
||||
|
||||
allocateDetectorStructureMemory();
|
||||
// set dacs
|
||||
LOG(logINFOBLUE, ("Setting Default Dac values\n"));
|
||||
{
|
||||
const int defaultvals[NDAC] = DEFAULT_DAC_VALS;
|
||||
for (int i = 0; i < NDAC; ++i) {
|
||||
setDAC((enum DACINDEX)i, defaultvals[i], 0);
|
||||
if ((detectorModules)->dacs[i] != defaultvals[i]) {
|
||||
LOG(logERROR, ("Setting dac %d failed, wrote %d, read %d\n", i,
|
||||
defaultvals[i], (detectorModules)->dacs[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
setDefaultDacs();
|
||||
#ifdef VIRTUAL
|
||||
sharedMemory_setStatus(IDLE);
|
||||
#endif
|
||||
@ -713,7 +702,7 @@ void setupDetector() {
|
||||
setClockDivider(RUN_CLK, DEFAULT_CLK_SPEED); // clk_devider,half speed
|
||||
setIODelay(DEFAULT_IO_DELAY);
|
||||
setTiming(DEFAULT_TIMING_MODE);
|
||||
setStartingFrameNumber(DEFAULT_STARTING_FRAME_NUMBER);
|
||||
setNextFrameNumber(DEFAULT_STARTING_FRAME_NUMBER);
|
||||
setReadNLines(MAX_ROWS_PER_READOUT);
|
||||
// SetPhotonEnergyCalibrationParameters(-5.8381e-5,1.838515,5.09948e-7,-4.32390e-11,1.32527e-15);
|
||||
eiger_tau_ns = DEFAULT_RATE_CORRECTION;
|
||||
@ -754,6 +743,21 @@ void setupDetector() {
|
||||
LOG(logDEBUG1, ("Setup detector done\n\n"));
|
||||
}
|
||||
|
||||
int setDefaultDacs() {
|
||||
int ret = OK;
|
||||
LOG(logINFOBLUE, ("Setting Default Dac values\n"));
|
||||
const int defaultvals[NDAC] = DEFAULT_DAC_VALS;
|
||||
for (int i = 0; i < NDAC; ++i) {
|
||||
setDAC((enum DACINDEX)i, defaultvals[i], 0);
|
||||
if ((detectorModules)->dacs[i] != defaultvals[i]) {
|
||||
ret = FAIL;
|
||||
LOG(logERROR, ("Setting dac %d failed, wrote %d, read %d\n", i,
|
||||
defaultvals[i], (detectorModules)->dacs[i]));
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* advanced read/write reg */
|
||||
int writeRegister(uint32_t offset, uint32_t data) {
|
||||
#ifdef VIRTUAL
|
||||
@ -847,21 +851,21 @@ int getOverFlowMode() { return eiger_overflow32; }
|
||||
|
||||
/* parameters - timer */
|
||||
|
||||
int setStartingFrameNumber(uint64_t value) {
|
||||
int setNextFrameNumber(uint64_t value) {
|
||||
#ifdef VIRTUAL
|
||||
eiger_virtual_startingframenumber = value;
|
||||
eiger_virtual_nextframenumber = value;
|
||||
return OK;
|
||||
#else
|
||||
return Beb_SetStartingFrameNumber(value);
|
||||
return Beb_SetNextFrameNumber(value);
|
||||
#endif
|
||||
}
|
||||
|
||||
int getStartingFrameNumber(uint64_t *retval) {
|
||||
int getNextFrameNumber(uint64_t *retval) {
|
||||
#ifdef VIRTUAL
|
||||
*retval = eiger_virtual_startingframenumber;
|
||||
*retval = eiger_virtual_nextframenumber;
|
||||
return OK;
|
||||
#else
|
||||
return Beb_GetStartingFrameNumber(retval, send_to_ten_gig);
|
||||
return Beb_GetNextFrameNumber(retval, send_to_ten_gig);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -2252,7 +2256,7 @@ void *start_timer(void *arg) {
|
||||
// Send data
|
||||
{
|
||||
uint64_t frameNr = 0;
|
||||
getStartingFrameNumber(&frameNr);
|
||||
getNextFrameNumber(&frameNr);
|
||||
// loop over number of frames
|
||||
for (int iframes = 0; iframes != numFrames; ++iframes) {
|
||||
|
||||
@ -2260,7 +2264,7 @@ void *start_timer(void *arg) {
|
||||
|
||||
// check if manual stop
|
||||
if (sharedMemory_getStop() == 1) {
|
||||
setStartingFrameNumber(frameNr + iframes + 1);
|
||||
setNextFrameNumber(frameNr + iframes + 1);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2353,7 +2357,7 @@ void *start_timer(void *arg) {
|
||||
}
|
||||
}
|
||||
}
|
||||
setStartingFrameNumber(frameNr + numFrames);
|
||||
setNextFrameNumber(frameNr + numFrames);
|
||||
}
|
||||
|
||||
closeUDPSocket(0);
|
||||
@ -2391,8 +2395,8 @@ int stopStateMachine() {
|
||||
|
||||
// ensure all have same starting frame numbers
|
||||
uint64_t retval = 0;
|
||||
if (Beb_GetStartingFrameNumber(&retval, send_to_ten_gig) == -2) {
|
||||
Beb_SetStartingFrameNumber(retval + 1);
|
||||
if (Beb_GetNextFrameNumber(&retval, send_to_ten_gig) == -2) {
|
||||
Beb_SetNextFrameNumber(retval + 1);
|
||||
}
|
||||
return OK;
|
||||
#endif
|
||||
|
Binary file not shown.
BIN
slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv5.0.0
Executable file
BIN
slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv5.0.0
Executable file
Binary file not shown.
@ -1,9 +1,11 @@
|
||||
|
||||
|
||||
#onchip dacs chip index value (max 0x3ff)
|
||||
vchip_comp_fe -1 0x137
|
||||
vchip_opa_1st -1 0x000
|
||||
vchip_opa_fd -1 0x134
|
||||
vchip_comp_adc -1 0x3FF
|
||||
vchip_ref_comp_fe -1 0x100
|
||||
vchip_ref_comp_fe -1 0x180
|
||||
vchip_cs -1 0x0D0
|
||||
|
||||
#dacs value (max 4096)
|
||||
@ -11,13 +13,13 @@ vref_h_adc 2116
|
||||
vb_comp_fe 0
|
||||
vb_comp_adc 0
|
||||
vcom_cds 705
|
||||
vref_rstore 205
|
||||
vref_rstore 150
|
||||
vb_opa_1st 0
|
||||
vref_comp_fe 0
|
||||
vcom_adc1 705
|
||||
vref_prech 900
|
||||
vref_prech 869
|
||||
vref_l_adc 700
|
||||
vref_cds 600
|
||||
vref_cds 700
|
||||
vb_cs 2799
|
||||
vb_opa_fd 0
|
||||
vcom_adc2 704
|
||||
@ -25,5 +27,7 @@ vcom_adc2 704
|
||||
#configure adc chip index adc index value(max 0x7F)
|
||||
confadc -1 -1 0x22
|
||||
|
||||
#vetoreference gain index value(max 1023)
|
||||
#vetoreference gain index value(max 4095)
|
||||
vetoref 1 0
|
||||
|
||||
|
||||
|
@ -48,6 +48,8 @@ double systemFrequency = 0;
|
||||
int highvoltage = 0;
|
||||
int dacValues[NDAC] = {};
|
||||
int onChipdacValues[ONCHIP_NDAC][NCHIP] = {};
|
||||
int defaultDacValues[NDAC] = {};
|
||||
int defaultOnChipdacValues[ONCHIP_NDAC][NCHIP] = {};
|
||||
int injectedChannelsOffset = 0;
|
||||
int injectedChannelsIncrement = 0;
|
||||
int vetoReference[NCHIP][NCHAN];
|
||||
@ -389,9 +391,13 @@ void setupDetector() {
|
||||
cdsGain = 0;
|
||||
memset(clkPhase, 0, sizeof(clkPhase));
|
||||
memset(dacValues, 0, sizeof(dacValues));
|
||||
for (int i = 0; i < NDAC; ++i) {
|
||||
defaultDacValues[i] = -1;
|
||||
}
|
||||
for (int i = 0; i < ONCHIP_NDAC; ++i) {
|
||||
for (int j = 0; j < NCHIP; ++j) {
|
||||
onChipdacValues[i][j] = -1;
|
||||
defaultOnChipdacValues[i][j] = -1;
|
||||
}
|
||||
}
|
||||
memset(vetoReference, 0, sizeof(vetoReference));
|
||||
@ -475,6 +481,40 @@ void setupDetector() {
|
||||
setCurrentSource(DEFAULT_CURRENT_SOURCE);
|
||||
}
|
||||
|
||||
int setDefaultDacs() {
|
||||
int ret = OK;
|
||||
LOG(logINFOBLUE, ("Setting Default Dac values\n"));
|
||||
for (int i = 0; i < NDAC; ++i) {
|
||||
if (defaultDacValues[i] != -1) {
|
||||
setDAC((enum DACINDEX)i, defaultDacValues[i], 0);
|
||||
if (dacValues[i] != defaultDacValues[i]) {
|
||||
ret = FAIL;
|
||||
LOG(logERROR, ("Setting dac %d failed, wrote %d, read %d\n", i,
|
||||
defaultDacValues[i], dacValues[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
LOG(logINFOBLUE, ("Setting Default On-chip Dac values\n"));
|
||||
for (int ichip = 0; ichip < NCHIP; ++ichip) {
|
||||
for (int idac = 0; idac < ONCHIP_NDAC; ++idac) {
|
||||
if (defaultOnChipdacValues[idac][ichip] != -1) {
|
||||
setOnChipDAC((enum ONCHIP_DACINDEX)idac, ichip,
|
||||
defaultOnChipdacValues[idac][ichip]);
|
||||
if (onChipdacValues[idac][ichip] !=
|
||||
defaultOnChipdacValues[idac][ichip]) {
|
||||
ret = FAIL;
|
||||
LOG(logERROR,
|
||||
("Setting on-chip dac %d (ichip:%d) failed, "
|
||||
"wrote %d, read %d\n",
|
||||
idac, ichip, defaultOnChipdacValues[idac][ichip],
|
||||
onChipdacValues[idac][ichip]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int readConfigFile() {
|
||||
|
||||
if (initError == FAIL) {
|
||||
@ -691,6 +731,18 @@ int readConfigFile() {
|
||||
break;
|
||||
}
|
||||
|
||||
// set default on chip dac variable
|
||||
// specific chip
|
||||
if (ichip != -1) {
|
||||
defaultOnChipdacValues[idac][ichip] = value;
|
||||
}
|
||||
// all chips
|
||||
else {
|
||||
for (int i = 0; i < NCHIP; ++i) {
|
||||
defaultOnChipdacValues[idac][i] = value;
|
||||
}
|
||||
}
|
||||
|
||||
// set on chip dac
|
||||
if (setOnChipDAC(idac, ichip, value) == FAIL) {
|
||||
sprintf(initErrorMessage,
|
||||
@ -703,7 +755,6 @@ int readConfigFile() {
|
||||
|
||||
// dac command
|
||||
else {
|
||||
|
||||
enum DACINDEX idac = 0;
|
||||
int value = 0;
|
||||
|
||||
@ -752,6 +803,9 @@ int readConfigFile() {
|
||||
break;
|
||||
}
|
||||
|
||||
// set default dac variables
|
||||
defaultDacValues[idac] = value;
|
||||
|
||||
// set dac
|
||||
setDAC(idac, value, 0);
|
||||
int retval = getDAC(idac, 0);
|
||||
|
Binary file not shown.
BIN
slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv5.0.0
Executable file
BIN
slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv5.0.0
Executable file
Binary file not shown.
@ -436,9 +436,11 @@ int setDefaultDacs() {
|
||||
LOG(logINFOBLUE, ("Setting Default Dac values\n"));
|
||||
const int defaultvals[NDAC] = DEFAULT_DAC_VALS;
|
||||
for (int i = 0; i < NDAC; ++i) {
|
||||
// if not already default, set it to default
|
||||
if (dacValues[i] != defaultvals[i]) {
|
||||
setDAC((enum DACINDEX)i, defaultvals[i], 0);
|
||||
if (dacValues[i] != defaultvals[i]) {
|
||||
ret = FAIL;
|
||||
LOG(logERROR, ("Setting dac %d failed, wrote %d, read %d\n", i,
|
||||
defaultvals[i], dacValues[i]));
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
|
Binary file not shown.
BIN
slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv5.0.0
Executable file
BIN
slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv5.0.0
Executable file
Binary file not shown.
@ -446,7 +446,7 @@ void setupDetector() {
|
||||
/*setClockDivider(RUN_CLK, HALF_SPEED); depends if all the previous stuff
|
||||
* works*/
|
||||
setTiming(DEFAULT_TIMING_MODE);
|
||||
setStartingFrameNumber(DEFAULT_STARTING_FRAME_NUMBER);
|
||||
setNextFrameNumber(DEFAULT_STARTING_FRAME_NUMBER);
|
||||
|
||||
// temp threshold and reset event
|
||||
setThresholdTemperature(DEFAULT_TMP_THRSHLD);
|
||||
@ -458,9 +458,11 @@ int setDefaultDacs() {
|
||||
LOG(logINFOBLUE, ("Setting Default Dac values\n"));
|
||||
const int defaultvals[NDAC] = DEFAULT_DAC_VALS;
|
||||
for (int i = 0; i < NDAC; ++i) {
|
||||
// if not already default, set it to default
|
||||
if (dacValues[i] != defaultvals[i]) {
|
||||
setDAC((enum DACINDEX)i, defaultvals[i], 0);
|
||||
if (dacValues[i] != defaultvals[i]) {
|
||||
ret = FAIL;
|
||||
LOG(logERROR, ("Setting dac %d failed, wrote %d, read %d\n", i,
|
||||
defaultvals[i], dacValues[i]));
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
@ -531,9 +533,9 @@ int selectStoragecellStart(int pos) {
|
||||
DAQ_STRG_CELL_SLCT_OFST);
|
||||
}
|
||||
|
||||
int setStartingFrameNumber(uint64_t value) {
|
||||
LOG(logINFO, ("Setting starting frame number: %llu\n",
|
||||
(long long unsigned int)value));
|
||||
int setNextFrameNumber(uint64_t value) {
|
||||
LOG(logINFO,
|
||||
("Setting next frame number: %llu\n", (long long unsigned int)value));
|
||||
#ifdef VIRTUAL
|
||||
setU64BitReg(value, FRAME_NUMBER_LSB_REG, FRAME_NUMBER_MSB_REG);
|
||||
#else
|
||||
@ -545,7 +547,7 @@ int setStartingFrameNumber(uint64_t value) {
|
||||
return OK;
|
||||
}
|
||||
|
||||
int getStartingFrameNumber(uint64_t *retval) {
|
||||
int getNextFrameNumber(uint64_t *retval) {
|
||||
#ifdef VIRTUAL
|
||||
*retval = getU64BitReg(FRAME_NUMBER_LSB_REG, FRAME_NUMBER_MSB_REG);
|
||||
#else
|
||||
@ -1725,14 +1727,14 @@ void *start_timer(void *arg) {
|
||||
// Send data
|
||||
{
|
||||
uint64_t frameNr = 0;
|
||||
getStartingFrameNumber(&frameNr);
|
||||
getNextFrameNumber(&frameNr);
|
||||
for (int iframes = 0; iframes != numFrames; ++iframes) {
|
||||
|
||||
usleep(transmissionDelayUs);
|
||||
|
||||
// check if manual stop
|
||||
if (sharedMemory_getStop() == 1) {
|
||||
setStartingFrameNumber(frameNr + iframes + 1);
|
||||
setNextFrameNumber(frameNr + iframes + 1);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1798,7 +1800,7 @@ void *start_timer(void *arg) {
|
||||
}
|
||||
}
|
||||
}
|
||||
setStartingFrameNumber(frameNr + numFrames);
|
||||
setNextFrameNumber(frameNr + numFrames);
|
||||
}
|
||||
|
||||
closeUDPSocket(0);
|
||||
|
Binary file not shown.
BIN
slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv5.0.0
Executable file
BIN
slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv5.0.0
Executable file
Binary file not shown.
@ -616,9 +616,11 @@ int setDefaultDacs() {
|
||||
LOG(logINFOBLUE, ("Setting Default Dac values\n"));
|
||||
const int defaultvals[NDAC] = DEFAULT_DAC_VALS;
|
||||
for (int i = 0; i < NDAC; ++i) {
|
||||
// if not already default, set it to default
|
||||
if (dacValues[i] != defaultvals[i]) {
|
||||
setDAC((enum DACINDEX)i, defaultvals[i], 0);
|
||||
if (dacValues[i] != defaultvals[i]) {
|
||||
ret = FAIL;
|
||||
LOG(logERROR, ("Setting dac %d failed, wrote %d, read %d\n", i,
|
||||
defaultvals[i], dacValues[i]));
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
|
Binary file not shown.
BIN
slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv5.0.0
Executable file
BIN
slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv5.0.0
Executable file
Binary file not shown.
@ -493,6 +493,7 @@ int setDefaultDacs() {
|
||||
for (int i = 0; i < NDAC; ++i) {
|
||||
setDAC((enum DACINDEX)i, defaultvals[i], 0);
|
||||
if (detectorDacs[i] != defaultvals[i]) {
|
||||
ret = FAIL;
|
||||
LOG(logERROR, ("Setting dac %d failed, wrote %d, read %d\n", i,
|
||||
defaultvals[i], detectorDacs[i]));
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "slsDetectorServer_defs.h" // DAC_INDEX, ADC_INDEX, also include RegisterDefs.h
|
||||
#include "sls/sls_detector_defs.h"
|
||||
#include "slsDetectorServer_defs.h" // DAC_INDEX, ADC_INDEX, also include RegisterDefs.h
|
||||
#ifdef GOTTHARDD
|
||||
#include "AD9252.h" // old board compatibility
|
||||
#include "clogger.h" // runState(enum TLogLevel)
|
||||
@ -114,8 +114,7 @@ int updateDatabytesandAllocateRAM();
|
||||
void updateDataBytes();
|
||||
#endif
|
||||
|
||||
#if defined(GOTTHARDD) || defined(JUNGFRAUD) || defined(MYTHEN3D) || \
|
||||
defined(MOENCHD)
|
||||
#ifndef CHIPTESTBOARDD
|
||||
int setDefaultDacs();
|
||||
#endif
|
||||
#ifdef MYTHEN3D
|
||||
@ -201,8 +200,8 @@ int getReadoutMode();
|
||||
int selectStoragecellStart(int pos);
|
||||
#endif
|
||||
#if defined(JUNGFRAUD) || defined(EIGERD)
|
||||
int setStartingFrameNumber(uint64_t value);
|
||||
int getStartingFrameNumber(uint64_t *value);
|
||||
int setNextFrameNumber(uint64_t value);
|
||||
int getNextFrameNumber(uint64_t *value);
|
||||
#endif
|
||||
void setNumFrames(int64_t val);
|
||||
int64_t getNumFrames();
|
||||
|
@ -140,8 +140,8 @@ int set_adc_invert(int);
|
||||
int get_adc_invert(int);
|
||||
int set_external_sampling_source(int);
|
||||
int set_external_sampling(int);
|
||||
int set_starting_frame_number(int);
|
||||
int get_starting_frame_number(int);
|
||||
int set_next_frame_number(int);
|
||||
int get_next_frame_number(int);
|
||||
int set_quad(int);
|
||||
int get_quad(int);
|
||||
int set_interrupt_subframe(int);
|
||||
@ -241,3 +241,5 @@ int reconfigure_udp(int);
|
||||
int validate_udp_configuration(int);
|
||||
int get_bursts_left(int);
|
||||
int start_readout(int);
|
||||
int set_default_dacs(int);
|
||||
int is_virtual(int);
|
@ -1,7 +1,7 @@
|
||||
#include "blackfin.h"
|
||||
#include "RegisterDefs.h"
|
||||
#include "sls/ansi.h"
|
||||
#include "clogger.h"
|
||||
#include "sls/ansi.h"
|
||||
#include "sls/sls_detector_defs.h"
|
||||
|
||||
#include <fcntl.h> // open
|
||||
|
@ -1,8 +1,8 @@
|
||||
#include "nios.h"
|
||||
#include "RegisterDefs.h"
|
||||
#include "sls/ansi.h"
|
||||
#include "clogger.h"
|
||||
#include "common.h"
|
||||
#include "sls/ansi.h"
|
||||
#include "sls/sls_detector_defs.h"
|
||||
|
||||
#include <fcntl.h> // open
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "programFpgaBlackfin.h"
|
||||
#include "sls/ansi.h"
|
||||
#include "clogger.h"
|
||||
#include "sls/ansi.h"
|
||||
#include "slsDetectorServer_defs.h"
|
||||
|
||||
#include <string.h>
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "programFpgaNios.h"
|
||||
#include "sls/ansi.h"
|
||||
#include "clogger.h"
|
||||
#include "sls/ansi.h"
|
||||
#include "slsDetectorServer_defs.h"
|
||||
|
||||
#include <string.h>
|
||||
|
@ -1,9 +1,9 @@
|
||||
#include "readDefaultPattern.h"
|
||||
#include "sls/ansi.h"
|
||||
#include "clogger.h"
|
||||
#include "common.h"
|
||||
#include "slsDetectorServer_defs.h"
|
||||
#include "sls/ansi.h"
|
||||
#include "sls/sls_detector_defs.h"
|
||||
#include "slsDetectorServer_defs.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
@ -4,10 +4,10 @@
|
||||
#include "clogger.h"
|
||||
#include "communication_funcs.h"
|
||||
#include "sharedMemory.h"
|
||||
#include "slsDetectorServer_defs.h"
|
||||
#include "slsDetectorServer_funcs.h"
|
||||
#include "sls/sls_detector_defs.h"
|
||||
#include "sls/versionAPI.h"
|
||||
#include "slsDetectorServer_defs.h"
|
||||
#include "slsDetectorServer_funcs.h"
|
||||
|
||||
#include <getopt.h>
|
||||
#include <signal.h>
|
||||
@ -110,8 +110,8 @@ int main(int argc, char *argv[]) {
|
||||
#elif GOTTHARD2D
|
||||
version = APIGOTTHARD2;
|
||||
#endif
|
||||
LOG(logINFO, ("SLS Detector Server Version: %s (0x%x)\n",
|
||||
GITBRANCH, version));
|
||||
LOG(logINFO, ("SLS Detector Server Version: %s (0x%x)\n", GITBRANCH,
|
||||
version));
|
||||
exit(EXIT_SUCCESS);
|
||||
|
||||
case 'p':
|
||||
|
@ -2,8 +2,8 @@
|
||||
#include "clogger.h"
|
||||
#include "communication_funcs.h"
|
||||
#include "sharedMemory.h"
|
||||
#include "slsDetectorFunctionList.h"
|
||||
#include "sls/sls_detector_funcs.h"
|
||||
#include "slsDetectorFunctionList.h"
|
||||
|
||||
#include <arpa/inet.h>
|
||||
#include <pthread.h>
|
||||
@ -262,8 +262,8 @@ void function_table() {
|
||||
flist[F_GET_ADC_INVERT] = &get_adc_invert;
|
||||
flist[F_EXTERNAL_SAMPLING_SOURCE] = &set_external_sampling_source;
|
||||
flist[F_EXTERNAL_SAMPLING] = &set_external_sampling;
|
||||
flist[F_SET_STARTING_FRAME_NUMBER] = &set_starting_frame_number;
|
||||
flist[F_GET_STARTING_FRAME_NUMBER] = &get_starting_frame_number;
|
||||
flist[F_SET_NEXT_FRAME_NUMBER] = &set_next_frame_number;
|
||||
flist[F_GET_NEXT_FRAME_NUMBER] = &get_next_frame_number;
|
||||
flist[F_SET_QUAD] = &set_quad;
|
||||
flist[F_GET_QUAD] = &get_quad;
|
||||
flist[F_SET_INTERRUPT_SUBFRAME] = &set_interrupt_subframe;
|
||||
@ -359,6 +359,8 @@ void function_table() {
|
||||
flist[F_VALIDATE_UDP_CONFIG] = &validate_udp_configuration;
|
||||
flist[F_GET_BURSTS_LEFT] = &get_bursts_left;
|
||||
flist[F_START_READOUT] = &start_readout;
|
||||
flist[F_SET_DEFAULT_DACS] = &set_default_dacs;
|
||||
flist[F_IS_VIRTUAL] = &is_virtual;
|
||||
|
||||
// check
|
||||
if (NUM_DET_FUNCTIONS >= RECEIVER_ENUM_START) {
|
||||
@ -1634,8 +1636,7 @@ int set_settings(int file_des) {
|
||||
|
||||
if ((int)isett != GET_FLAG) {
|
||||
validate((int)isett, (int)retval, "set settings", DEC);
|
||||
#if defined(JUNGFRAUD) || defined(GOTTHARDD)
|
||||
// gotthard2 does not set default dacs
|
||||
#ifdef GOTTHARDD
|
||||
if (ret == OK) {
|
||||
ret = setDefaultDacs();
|
||||
if (ret == FAIL) {
|
||||
@ -1755,7 +1756,8 @@ int acquire(int blocking, int file_des) {
|
||||
strcpy(mess, "Could not start acquisition thread!\n");
|
||||
LOG(logERROR, (mess));
|
||||
} else {
|
||||
if (blocking) {
|
||||
// only does not wait for non blocking and scan
|
||||
if (blocking || !scan) {
|
||||
pthread_join(pthread_tid, NULL);
|
||||
}
|
||||
}
|
||||
@ -4497,14 +4499,14 @@ int set_external_sampling(int file_des) {
|
||||
return Server_SendResult(file_des, INT32, &retval, sizeof(retval));
|
||||
}
|
||||
|
||||
int set_starting_frame_number(int file_des) {
|
||||
int set_next_frame_number(int file_des) {
|
||||
ret = OK;
|
||||
memset(mess, 0, sizeof(mess));
|
||||
uint64_t arg = 0;
|
||||
|
||||
if (receiveData(file_des, &arg, sizeof(arg), INT64) < 0)
|
||||
return printSocketReadError();
|
||||
LOG(logINFO, ("Setting starting frame number to %llu\n", arg));
|
||||
LOG(logINFO, ("Setting next frame number to %llu\n", arg));
|
||||
|
||||
#if (!defined(EIGERD)) && (!defined(JUNGFRAUD))
|
||||
functionNotImplemented();
|
||||
@ -4513,8 +4515,7 @@ int set_starting_frame_number(int file_des) {
|
||||
if (Server_VerifyLock() == OK) {
|
||||
if (arg == 0) {
|
||||
ret = FAIL;
|
||||
sprintf(mess,
|
||||
"Could not set starting frame number. Cannot be 0.\n");
|
||||
sprintf(mess, "Could not set next frame number. Cannot be 0.\n");
|
||||
LOG(logERROR, (mess));
|
||||
}
|
||||
#ifdef EIGERD
|
||||
@ -4522,12 +4523,12 @@ int set_starting_frame_number(int file_des) {
|
||||
ret = FAIL;
|
||||
#ifdef VIRTUAL
|
||||
sprintf(mess,
|
||||
"Could not set starting frame number. Must be less then "
|
||||
"Could not set next frame number. Must be less then "
|
||||
"%ld (0x%lx)\n",
|
||||
UDP_HEADER_MAX_FRAME_VALUE, UDP_HEADER_MAX_FRAME_VALUE);
|
||||
#else
|
||||
sprintf(mess,
|
||||
"Could not set starting frame number. Must be less then "
|
||||
"Could not set next frame number. Must be less then "
|
||||
"%lld (0x%llx)\n",
|
||||
UDP_HEADER_MAX_FRAME_VALUE, UDP_HEADER_MAX_FRAME_VALUE);
|
||||
#endif
|
||||
@ -4535,21 +4536,21 @@ int set_starting_frame_number(int file_des) {
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
ret = setStartingFrameNumber(arg);
|
||||
ret = setNextFrameNumber(arg);
|
||||
if (ret == FAIL) {
|
||||
sprintf(mess, "Could not set starting frame number. Failed to "
|
||||
sprintf(mess, "Could not set next frame number. Failed to "
|
||||
"map address.\n");
|
||||
LOG(logERROR, (mess));
|
||||
}
|
||||
if (ret == OK) {
|
||||
uint64_t retval = 0;
|
||||
ret = getStartingFrameNumber(&retval);
|
||||
ret = getNextFrameNumber(&retval);
|
||||
if (ret == FAIL) {
|
||||
sprintf(mess, "Could not get starting frame number. Failed "
|
||||
sprintf(mess, "Could not get next frame number. Failed "
|
||||
"to map address.\n");
|
||||
LOG(logERROR, (mess));
|
||||
} else if (ret == -2) {
|
||||
sprintf(mess, "Inconsistent starting frame number from "
|
||||
sprintf(mess, "Inconsistent next frame number from "
|
||||
"left and right FPGA. Please set it.\n");
|
||||
LOG(logERROR, (mess));
|
||||
} else {
|
||||
@ -4557,12 +4558,12 @@ int set_starting_frame_number(int file_des) {
|
||||
ret = FAIL;
|
||||
#ifdef VIRTUAL
|
||||
sprintf(mess,
|
||||
"Could not set starting frame number. Set "
|
||||
"Could not set next frame number. Set "
|
||||
"0x%lx, but read 0x%lx\n",
|
||||
arg, retval);
|
||||
#else
|
||||
sprintf(mess,
|
||||
"Could not set starting frame number. Set "
|
||||
"Could not set next frame number. Set "
|
||||
"0x%llx, but read 0x%llx\n",
|
||||
arg, retval);
|
||||
#endif
|
||||
@ -4576,28 +4577,28 @@ int set_starting_frame_number(int file_des) {
|
||||
return Server_SendResult(file_des, INT64, NULL, 0);
|
||||
}
|
||||
|
||||
int get_starting_frame_number(int file_des) {
|
||||
int get_next_frame_number(int file_des) {
|
||||
ret = OK;
|
||||
memset(mess, 0, sizeof(mess));
|
||||
uint64_t retval = -1;
|
||||
|
||||
LOG(logDEBUG1, ("Getting Starting frame number \n"));
|
||||
LOG(logDEBUG1, ("Getting next frame number \n"));
|
||||
|
||||
#if (!defined(EIGERD)) && (!defined(JUNGFRAUD))
|
||||
functionNotImplemented();
|
||||
#else
|
||||
// get
|
||||
ret = getStartingFrameNumber(&retval);
|
||||
ret = getNextFrameNumber(&retval);
|
||||
if (ret == FAIL) {
|
||||
sprintf(mess, "Could not get starting frame number. Failed to map "
|
||||
sprintf(mess, "Could not get next frame number. Failed to map "
|
||||
"address.\n");
|
||||
LOG(logERROR, (mess));
|
||||
} else if (ret == -2) {
|
||||
sprintf(mess, "Inconsistent starting frame number from left and right "
|
||||
sprintf(mess, "Inconsistent next frame number from left and right "
|
||||
"FPGA. Please set it.\n");
|
||||
LOG(logERROR, (mess));
|
||||
} else {
|
||||
LOG(logDEBUG1, ("Start frame number retval: %u\n", retval));
|
||||
LOG(logDEBUG1, ("next frame number retval: %u\n", retval));
|
||||
}
|
||||
#endif
|
||||
return Server_SendResult(file_des, INT64, &retval, sizeof(retval));
|
||||
@ -6364,13 +6365,19 @@ int set_veto_photon(int file_des) {
|
||||
const int chipIndex = args[0];
|
||||
const int numChannels = args[1];
|
||||
|
||||
int gainIndices[numChannels];
|
||||
if (receiveData(file_des, gainIndices, sizeof(gainIndices), INT32) < 0)
|
||||
int *gainIndices = malloc(sizeof(int) * numChannels);
|
||||
if (receiveData(file_des, gainIndices, sizeof(int) * numChannels, INT32) <
|
||||
0) {
|
||||
free(gainIndices);
|
||||
return printSocketReadError();
|
||||
}
|
||||
|
||||
int values[numChannels];
|
||||
if (receiveData(file_des, values, sizeof(values), INT32) < 0)
|
||||
int *values = malloc(sizeof(int) * numChannels);
|
||||
if (receiveData(file_des, values, sizeof(int) * numChannels, INT32) < 0) {
|
||||
free(gainIndices);
|
||||
free(values);
|
||||
return printSocketReadError();
|
||||
}
|
||||
|
||||
LOG(logINFO, ("Setting Veto Photon: [chipIndex:%d, nch:%d]\n", chipIndex,
|
||||
numChannels));
|
||||
@ -6425,6 +6432,12 @@ int set_veto_photon(int file_des) {
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (gainIndices != NULL) {
|
||||
free(gainIndices);
|
||||
}
|
||||
if (values != NULL) {
|
||||
free(values);
|
||||
}
|
||||
return Server_SendResult(file_des, INT32, NULL, 0);
|
||||
}
|
||||
|
||||
@ -6432,10 +6445,8 @@ int get_veto_photon(int file_des) {
|
||||
ret = OK;
|
||||
memset(mess, 0, sizeof(mess));
|
||||
int arg = -1;
|
||||
int retvals[NCHAN];
|
||||
memset(retvals, 0, sizeof(retvals));
|
||||
int gainRetvals[NCHAN];
|
||||
memset(gainRetvals, 0, sizeof(gainRetvals));
|
||||
int *retvals = NULL;
|
||||
int *gainRetvals = NULL;
|
||||
|
||||
if (receiveData(file_des, &arg, sizeof(arg), INT32) < 0)
|
||||
return printSocketReadError();
|
||||
@ -6444,6 +6455,18 @@ int get_veto_photon(int file_des) {
|
||||
#ifndef GOTTHARD2D
|
||||
functionNotImplemented();
|
||||
#else
|
||||
retvals = malloc(sizeof(int) * NCHAN);
|
||||
gainRetvals = malloc(sizeof(int) * NCHAN);
|
||||
memset(retvals, 0, sizeof(int) * NCHAN);
|
||||
memset(gainRetvals, 0, sizeof(int) * NCHAN);
|
||||
|
||||
if (retvals == NULL || gainRetvals == NULL) {
|
||||
ret = FAIL;
|
||||
strcpy(
|
||||
mess,
|
||||
"Could not get veto photon. Could not allocate memory in server\n");
|
||||
LOG(logERROR, (mess));
|
||||
} else {
|
||||
// get only
|
||||
int chipIndex = arg;
|
||||
if (chipIndex < -1 || chipIndex >= NCHIP) {
|
||||
@ -6456,7 +6479,8 @@ int get_veto_photon(int file_des) {
|
||||
if (ret == FAIL) {
|
||||
strcpy(mess,
|
||||
"Could not get veto photon for chipIndex -1. Not the "
|
||||
"same for all chips. Select specific chip index instead.\n");
|
||||
"same for all chips. Select specific chip index "
|
||||
"instead.\n");
|
||||
LOG(logERROR, (mess));
|
||||
} else {
|
||||
for (int i = 0; i < NCHAN; ++i) {
|
||||
@ -6465,13 +6489,20 @@ int get_veto_photon(int file_des) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Server_SendResult(file_des, INT32, NULL, 0);
|
||||
if (ret != FAIL) {
|
||||
int nch = NCHAN;
|
||||
sendData(file_des, &nch, sizeof(nch), INT32);
|
||||
sendData(file_des, gainRetvals, sizeof(gainRetvals), INT32);
|
||||
sendData(file_des, retvals, sizeof(retvals), INT32);
|
||||
sendData(file_des, gainRetvals, sizeof(int) * NCHAN, INT32);
|
||||
sendData(file_des, retvals, sizeof(int) * NCHAN, INT32);
|
||||
}
|
||||
if (retvals != NULL) {
|
||||
free(retvals);
|
||||
}
|
||||
if (gainRetvals != NULL) {
|
||||
free(gainRetvals);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@ -8145,3 +8176,32 @@ int start_readout(int file_des) {
|
||||
#endif
|
||||
return Server_SendResult(file_des, INT32, NULL, 0);
|
||||
}
|
||||
|
||||
int set_default_dacs(int file_des) {
|
||||
ret = OK;
|
||||
memset(mess, 0, sizeof(mess));
|
||||
|
||||
#ifdef CHIPTESTBOARDD
|
||||
functionNotImplemented();
|
||||
#else
|
||||
if (Server_VerifyLock() == OK) {
|
||||
if (setDefaultDacs() == FAIL) {
|
||||
ret = FAIL;
|
||||
strcpy(mess, "Could not set default dacs");
|
||||
LOG(logERROR, (mess));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return Server_SendResult(file_des, INT32, NULL, 0);
|
||||
}
|
||||
|
||||
int is_virtual(int file_des) {
|
||||
ret = OK;
|
||||
memset(mess, 0, sizeof(mess));
|
||||
int retval = 0;
|
||||
#ifdef VIRTUAL
|
||||
retval = 1;
|
||||
#endif
|
||||
LOG(logDEBUG1, ("is virtual retval: %d\n", retval));
|
||||
return Server_SendResult(file_des, INT32, &retval, sizeof(retval));
|
||||
}
|
||||
|
@ -17,13 +17,12 @@ target_include_directories(slsDetectorObject PUBLIC
|
||||
|
||||
target_link_libraries(slsDetectorObject
|
||||
PUBLIC
|
||||
slsProjectOptions
|
||||
slsSupportStatic
|
||||
pthread
|
||||
rt
|
||||
slsProjectOptions
|
||||
PRIVATE
|
||||
slsProjectWarnings
|
||||
${ZeroMQ_LIBRARIES}
|
||||
)
|
||||
|
||||
|
||||
@ -78,7 +77,6 @@ foreach(val RANGE ${len2})
|
||||
target_link_libraries(${val1}
|
||||
slsDetectorStatic
|
||||
pthread
|
||||
${ZeroMQ_LIBRARIES}
|
||||
rt
|
||||
)
|
||||
set_target_properties(${val1} PROPERTIES
|
||||
|
@ -142,6 +142,8 @@ class Detector {
|
||||
* streaming, receiver file or streaming. Default is disabled.
|
||||
*/
|
||||
void setGapPixelsinCallback(const bool enable);
|
||||
|
||||
Result<bool> isVirtualDetectorServer(Positions pos = {}) const;
|
||||
///@{
|
||||
|
||||
/** @name Callbacks */
|
||||
@ -381,6 +383,9 @@ class Detector {
|
||||
/** gets list of dac enums for this detector */
|
||||
std::vector<defs::dacIndex> getDacList() const;
|
||||
|
||||
/** [Eiger][Jungfrau][Moench][Gotthard][Gotthard2][Mythen3] */
|
||||
void setDefaultDacs(Positions pos = {});
|
||||
|
||||
Result<int> getDAC(defs::dacIndex index, bool mV = false,
|
||||
Positions pos = {}) const;
|
||||
|
||||
@ -479,11 +484,11 @@ class Detector {
|
||||
getNumMissingPackets(Positions pos = {}) const;
|
||||
|
||||
/** [Eiger][Jungfrau] */
|
||||
Result<uint64_t> getStartingFrameNumber(Positions pos = {}) const;
|
||||
Result<uint64_t> getNextFrameNumber(Positions pos = {}) const;
|
||||
|
||||
/** [Eiger][Jungfrau] Stopping acquisition might result in different frame
|
||||
* numbers for different modules.*/
|
||||
void setStartingFrameNumber(uint64_t value, Positions pos = {});
|
||||
void setNextFrameNumber(uint64_t value, Positions pos = {});
|
||||
|
||||
/** [Eiger][Mythen3] Sends an internal software trigger to the detector */
|
||||
void sendSoftwareTrigger(Positions pos = {});
|
||||
|
@ -64,13 +64,13 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
|
||||
try {
|
||||
// How big should this try block be?
|
||||
sls::Detector det(parser.multi_id());
|
||||
sls::CmdProxy proxy(&det);
|
||||
proxy.Call(parser.command(), parser.arguments(), parser.detector_id(),
|
||||
action);
|
||||
} catch (const sls::RuntimeError &e) {
|
||||
// OK to catch and do nothing since this will print the error message
|
||||
// and command line app will anyway exit
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
@ -687,6 +687,7 @@ class CmdProxy {
|
||||
{"busy", "clearbusy"},
|
||||
{"receiver", "rx_status"},
|
||||
{"framescaught", "rx_framescaught"},
|
||||
{"startingfnum", "nextframenumber"},
|
||||
|
||||
/* Network Configuration (Detector<->Receiver) */
|
||||
{"detectorip", "udp_srcip"},
|
||||
@ -744,6 +745,9 @@ class CmdProxy {
|
||||
/* Moench */
|
||||
/* Advanced */
|
||||
/* Insignificant */
|
||||
{"nframes", "framecounter"},
|
||||
{"now", "runtime"},
|
||||
{"timestamp", "frametime"},
|
||||
{"frameindex", "rx_frameindex"}
|
||||
|
||||
};
|
||||
@ -822,6 +826,7 @@ class CmdProxy {
|
||||
{"dac", &CmdProxy::Dac},
|
||||
{"daclist", &CmdProxy::daclist},
|
||||
{"dacvalues", &CmdProxy::DacValues},
|
||||
{"defaultdacs", &CmdProxy::defaultdacs},
|
||||
|
||||
/* on chip dacs */
|
||||
{"vchip_comp_fe", &CmdProxy::vchip_comp_fe},
|
||||
@ -842,7 +847,7 @@ class CmdProxy {
|
||||
{"status", &CmdProxy::DetectorStatus},
|
||||
{"rx_framescaught", &CmdProxy::rx_framescaught},
|
||||
{"rx_missingpackets", &CmdProxy::rx_missingpackets},
|
||||
{"startingfnum", &CmdProxy::startingfnum},
|
||||
{"nextframenumber", &CmdProxy::nextframenumber},
|
||||
{"trigger", &CmdProxy::trigger},
|
||||
{"scan", &CmdProxy::Scan},
|
||||
{"scanerrmsg", &CmdProxy::scanerrmsg},
|
||||
@ -1054,9 +1059,9 @@ class CmdProxy {
|
||||
{"lock", &CmdProxy::lock},
|
||||
{"lastclient", &CmdProxy::lastclient},
|
||||
{"execcommand", &CmdProxy::ExecuteCommand},
|
||||
{"nframes", &CmdProxy::nframes},
|
||||
{"now", &CmdProxy::now},
|
||||
{"timestamp", &CmdProxy::timestamp},
|
||||
{"framecounter", &CmdProxy::framecounter},
|
||||
{"runtime", &CmdProxy::runtime},
|
||||
{"frametime", &CmdProxy::frametime},
|
||||
{"user", &CmdProxy::UserDetails},
|
||||
{"rx_frameindex", &CmdProxy::rx_frameindex}
|
||||
|
||||
@ -1207,7 +1212,8 @@ class CmdProxy {
|
||||
"\n\t[Moench] - [g1_hg | g1_lg | g2_hc_hg | g2_hc_lg | "
|
||||
"g2_lc_hg | g2_lc_lg | g4_hg | g4_lg]"
|
||||
"\n\t[Eiger] Use threshold or thresholdnotb. \n\t[Eiger] "
|
||||
"settings loaded from file found in settingspath.");
|
||||
"settings loaded from file found in settingspath. \n\t[Gotthard] Also "
|
||||
"loads default dacs on to the detector.");
|
||||
|
||||
EXECUTE_SET_COMMAND_1ARG(
|
||||
trimbits, loadTrimbits,
|
||||
@ -1374,6 +1380,10 @@ class CmdProxy {
|
||||
daclist, getDacList,
|
||||
"\n\tGets the list of commands for every dac for this detector.");
|
||||
|
||||
EXECUTE_SET_COMMAND(defaultdacs, setDefaultDacs,
|
||||
"\n\t[Eiger][Jungfrau][Gotthard][Moench][Gotthard2]["
|
||||
"Mythen3]Sets default dacs on to the detector.");
|
||||
|
||||
/* on chip dacs */
|
||||
INTEGER_USER_IND_COMMAND(
|
||||
vchip_comp_fe, getOnChipDAC, setOnChipDAC, StringTo<int>,
|
||||
@ -1450,11 +1460,10 @@ class CmdProxy {
|
||||
GET_COMMAND(rx_missingpackets, getNumMissingPackets,
|
||||
"\n\tNumber of missing packets for each port in receiver.");
|
||||
|
||||
INTEGER_COMMAND_VEC_ID(
|
||||
startingfnum, getStartingFrameNumber, setStartingFrameNumber,
|
||||
StringTo<uint64_t>,
|
||||
"[n_value]\n\t[Eiger][Jungfrau] Starting frame number for "
|
||||
"next acquisition. Stopping acquisition might result in "
|
||||
INTEGER_COMMAND_VEC_ID(nextframenumber, getNextFrameNumber,
|
||||
setNextFrameNumber, StringTo<uint64_t>,
|
||||
"[n_value]\n\t[Eiger][Jungfrau] Next frame number. "
|
||||
"Stopping acquisition might result in "
|
||||
"different frame numbers for different modules.");
|
||||
|
||||
EXECUTE_SET_COMMAND(
|
||||
@ -2120,18 +2129,18 @@ class CmdProxy {
|
||||
lastclient, getLastClientIP,
|
||||
"\n\tClient IP Address that last communicated with the detector.");
|
||||
|
||||
GET_COMMAND(nframes, getNumberOfFramesFromStart,
|
||||
GET_COMMAND(framecounter, getNumberOfFramesFromStart,
|
||||
"\n\t[Jungfrau][Mythen3][Gotthard2][Moench][CTB] "
|
||||
"Number of frames from start run control."
|
||||
"\n\t[Gotthard2] only in continuous mode.");
|
||||
|
||||
TIME_GET_COMMAND(now, getActualTime,
|
||||
TIME_GET_COMMAND(runtime, getActualTime,
|
||||
"[(optional unit) "
|
||||
"ns|us|ms|s]\n\t[Jungfrau][Mythen3][Gotthard2][Moench]["
|
||||
"CTB] Time from detector start up."
|
||||
"\n\t[Gotthard2] not in burst and auto mode.");
|
||||
|
||||
TIME_GET_COMMAND(timestamp, getMeasurementTime,
|
||||
TIME_GET_COMMAND(frametime, getMeasurementTime,
|
||||
"[(optional unit) "
|
||||
"ns|us|ms|s]\n\t[Jungfrau][Mythen3][Gotthard2][Moench]["
|
||||
"CTB] Timestamp at a frame start."
|
||||
|
@ -206,6 +206,10 @@ void Detector::setGapPixelsinCallback(bool enable) {
|
||||
pimpl->setGapPixelsinCallback(enable);
|
||||
}
|
||||
|
||||
Result<bool> Detector::isVirtualDetectorServer(Positions pos) const {
|
||||
return pimpl->Parallel(&Module::isVirtualDetectorServer, pos);
|
||||
}
|
||||
|
||||
// Callback
|
||||
|
||||
void Detector::registerAcquisitionFinishedCallback(void (*func)(double, int,
|
||||
@ -542,6 +546,10 @@ std::vector<defs::dacIndex> Detector::getDacList() const {
|
||||
return retval;
|
||||
}
|
||||
|
||||
void Detector::setDefaultDacs(Positions pos) {
|
||||
pimpl->Parallel(&Module::setDefaultDacs, pos);
|
||||
}
|
||||
|
||||
Result<int> Detector::getDAC(defs::dacIndex index, bool mV,
|
||||
Positions pos) const {
|
||||
return pimpl->Parallel(&Module::getDAC, pos, index, mV);
|
||||
@ -617,12 +625,12 @@ Detector::getNumMissingPackets(Positions pos) const {
|
||||
return pimpl->Parallel(&Module::getNumMissingPackets, pos);
|
||||
}
|
||||
|
||||
Result<uint64_t> Detector::getStartingFrameNumber(Positions pos) const {
|
||||
return pimpl->Parallel(&Module::getStartingFrameNumber, pos);
|
||||
Result<uint64_t> Detector::getNextFrameNumber(Positions pos) const {
|
||||
return pimpl->Parallel(&Module::getNextFrameNumber, pos);
|
||||
}
|
||||
|
||||
void Detector::setStartingFrameNumber(uint64_t value, Positions pos) {
|
||||
pimpl->Parallel(&Module::setStartingFrameNumber, pos, value);
|
||||
void Detector::setNextFrameNumber(uint64_t value, Positions pos) {
|
||||
pimpl->Parallel(&Module::setNextFrameNumber, pos, value);
|
||||
}
|
||||
|
||||
void Detector::sendSoftwareTrigger(Positions pos) {
|
||||
|
@ -660,11 +660,14 @@ void DetectorImpl::readFrameFromReceiver() {
|
||||
nDetActualPixelsX, nDetActualPixelsY,
|
||||
callbackImage, imagesize, dynamicRange,
|
||||
currentFileIndex, completeImage);
|
||||
|
||||
try {
|
||||
dataReady(
|
||||
thisData, currentFrameIndex,
|
||||
((dynamicRange == 32 && eiger) ? currentSubFrameIndex : -1),
|
||||
pCallbackArg);
|
||||
} catch (const std::exception &e) {
|
||||
LOG(logERROR) << "Exception caught from callback: " << e.what();
|
||||
}
|
||||
delete thisData;
|
||||
}
|
||||
}
|
||||
@ -1076,13 +1079,13 @@ int DetectorImpl::acquire() {
|
||||
}
|
||||
}
|
||||
|
||||
startProcessingThread(receiver);
|
||||
|
||||
// start receiver
|
||||
if (receiver) {
|
||||
Parallel(&Module::startReceiver, {});
|
||||
}
|
||||
|
||||
startProcessingThread(receiver);
|
||||
|
||||
// start and read all
|
||||
try {
|
||||
Parallel(&Module::startAndReadAll, {});
|
||||
@ -1123,6 +1126,10 @@ int DetectorImpl::acquire() {
|
||||
(end.tv_nsec - begin.tv_nsec) / 1000000000.0)
|
||||
<< " seconds";
|
||||
} catch (...) {
|
||||
if (dataProcessingThread.joinable()) {
|
||||
setJoinThreadFlag(true);
|
||||
dataProcessingThread.join();
|
||||
}
|
||||
setAcquiringFlag(false);
|
||||
throw;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "sls/Result.h"
|
||||
#include "SharedMemory.h"
|
||||
#include "sls/Result.h"
|
||||
#include "sls/logger.h"
|
||||
#include "sls/sls_detector_defs.h"
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "Module.h"
|
||||
#include "sls/ClientSocket.h"
|
||||
#include "SharedMemory.h"
|
||||
#include "sls/ClientSocket.h"
|
||||
#include "sls/ToString.h"
|
||||
#include "sls/container_utils.h"
|
||||
#include "sls/file_utils.h"
|
||||
@ -178,6 +178,10 @@ void Module::setAllTrimbits(int val) {
|
||||
sendToDetector<int>(F_SET_ALL_TRIMBITS, val);
|
||||
}
|
||||
|
||||
bool Module::isVirtualDetectorServer() const {
|
||||
return sendToDetector<int>(F_IS_VIRTUAL);
|
||||
}
|
||||
|
||||
int64_t Module::getNumberOfFrames() const {
|
||||
return sendToDetector<int64_t>(F_GET_NUM_FRAMES);
|
||||
}
|
||||
@ -335,6 +339,8 @@ int Module::getDAC(dacIndex index, bool mV) const {
|
||||
return sendToDetector<int>(F_SET_DAC, args);
|
||||
}
|
||||
|
||||
void Module::setDefaultDacs() { sendToDetector(F_SET_DEFAULT_DACS); }
|
||||
|
||||
void Module::setDAC(int val, dacIndex index, bool mV) {
|
||||
int args[]{static_cast<int>(index), static_cast<int>(mV), val};
|
||||
sendToDetector<int>(F_SET_DAC, args);
|
||||
@ -482,12 +488,12 @@ std::vector<uint64_t> Module::getNumMissingPackets() const {
|
||||
throw RuntimeError("No receiver to get missing packets.");
|
||||
}
|
||||
|
||||
uint64_t Module::getStartingFrameNumber() const {
|
||||
return sendToDetector<uint64_t>(F_GET_STARTING_FRAME_NUMBER);
|
||||
uint64_t Module::getNextFrameNumber() const {
|
||||
return sendToDetector<uint64_t>(F_GET_NEXT_FRAME_NUMBER);
|
||||
}
|
||||
|
||||
void Module::setStartingFrameNumber(uint64_t value) {
|
||||
sendToDetector(F_SET_STARTING_FRAME_NUMBER, value, nullptr);
|
||||
void Module::setNextFrameNumber(uint64_t value) {
|
||||
sendToDetector(F_SET_NEXT_FRAME_NUMBER, value, nullptr);
|
||||
}
|
||||
|
||||
void Module::sendSoftwareTrigger() { sendToDetectorStop(F_SOFTWARE_TRIGGER); }
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include "sls/ClientSocket.h"
|
||||
#include "SharedMemory.h"
|
||||
#include "sls/ClientSocket.h"
|
||||
#include "sls/StaticVector.h"
|
||||
#include "sls/logger.h"
|
||||
#include "sls/network_utils.h"
|
||||
@ -103,6 +103,7 @@ class Module : public virtual slsDetectorDefs {
|
||||
void loadSettingsFile(const std::string &fname);
|
||||
int getAllTrimbits() const;
|
||||
void setAllTrimbits(int val);
|
||||
bool isVirtualDetectorServer() const;
|
||||
|
||||
/**************************************************
|
||||
* *
|
||||
@ -136,6 +137,8 @@ class Module : public virtual slsDetectorDefs {
|
||||
int getMaxClockPhaseShift(int clkIndex) const;
|
||||
int getClockFrequency(int clkIndex) const;
|
||||
void setClockFrequency(int clkIndex, int value);
|
||||
/** [Eiger][Jungfrau][Moench][Gotthard][Gotthard2][Mythen3] */
|
||||
void setDefaultDacs();
|
||||
int getDAC(dacIndex index, bool mV) const;
|
||||
void setDAC(int val, dacIndex index, bool mV);
|
||||
bool getPowerChip() const;
|
||||
@ -169,8 +172,8 @@ class Module : public virtual slsDetectorDefs {
|
||||
double getReceiverProgress() const;
|
||||
int64_t getFramesCaughtByReceiver() const;
|
||||
std::vector<uint64_t> getNumMissingPackets() const;
|
||||
uint64_t getStartingFrameNumber() const;
|
||||
void setStartingFrameNumber(uint64_t value);
|
||||
uint64_t getNextFrameNumber() const;
|
||||
void setNextFrameNumber(uint64_t value);
|
||||
void sendSoftwareTrigger();
|
||||
defs::scanParameters getScan() const;
|
||||
void setScan(const defs::scanParameters t);
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include "CmdProxy.h"
|
||||
#include "sls/Detector.h"
|
||||
#include "catch.hpp"
|
||||
#include "sls/Detector.h"
|
||||
#include "sls/sls_detector_defs.h"
|
||||
#include <sstream>
|
||||
|
||||
#include "sls/Result.h"
|
||||
#include "sls/ToString.h"
|
||||
#include "sls/versionAPI.h"
|
||||
#include "test-CmdProxy-global.h"
|
||||
#include "tests/globals.h"
|
||||
#include "sls/versionAPI.h"
|
||||
|
||||
using sls::CmdProxy;
|
||||
using sls::Detector;
|
||||
@ -17,7 +17,7 @@ using test::PUT;
|
||||
|
||||
/* dacs */
|
||||
|
||||
TEST_CASE("dac", "[.cmd][.dacs][.new]") {
|
||||
TEST_CASE("dac", "[.cmd][.dacs]") {
|
||||
// dac 0 to dac 17
|
||||
|
||||
Detector det;
|
||||
@ -100,7 +100,7 @@ TEST_CASE("dac", "[.cmd][.dacs][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("adcvpp", "[.cmd][.new]") {
|
||||
TEST_CASE("adcvpp", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -132,7 +132,7 @@ TEST_CASE("adcvpp", "[.cmd][.new]") {
|
||||
|
||||
/* CTB/ Moench Specific */
|
||||
|
||||
TEST_CASE("samples", "[.cmd][.new]") {
|
||||
TEST_CASE("samples", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -179,7 +179,7 @@ TEST_CASE("samples", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("asamples", "[.cmd][.new]") {
|
||||
TEST_CASE("asamples", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -209,7 +209,7 @@ TEST_CASE("asamples", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("adcclk", "[.cmd][.new]") {
|
||||
TEST_CASE("adcclk", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -240,7 +240,7 @@ TEST_CASE("adcclk", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("runclk", "[.cmd][.new]") {
|
||||
TEST_CASE("runclk", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -271,7 +271,7 @@ TEST_CASE("runclk", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("syncclk", "[.cmd][.new]") {
|
||||
TEST_CASE("syncclk", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -283,7 +283,7 @@ TEST_CASE("syncclk", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("adcpipeline", "[.cmd][.new]") {
|
||||
TEST_CASE("adcpipeline", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -318,7 +318,7 @@ TEST_CASE("adcpipeline", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("v_limit", "[.cmd][.new]") {
|
||||
TEST_CASE("v_limit", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -356,7 +356,7 @@ TEST_CASE("v_limit", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("adcenable", "[.cmd][.new]") {
|
||||
TEST_CASE("adcenable", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -386,7 +386,7 @@ TEST_CASE("adcenable", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("adcenable10g", "[.cmd][.new]") {
|
||||
TEST_CASE("adcenable10g", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -418,7 +418,7 @@ TEST_CASE("adcenable10g", "[.cmd][.new]") {
|
||||
|
||||
/* CTB Specific */
|
||||
|
||||
TEST_CASE("dsamples", "[.cmd][.new]") {
|
||||
TEST_CASE("dsamples", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -448,7 +448,7 @@ TEST_CASE("dsamples", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("romode", "[.cmd][.new]") {
|
||||
TEST_CASE("romode", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -488,7 +488,7 @@ TEST_CASE("romode", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("dbitclk", "[.cmd][.new]") {
|
||||
TEST_CASE("dbitclk", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -519,7 +519,7 @@ TEST_CASE("dbitclk", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("dbitpipeline", "[.cmd][.new]") {
|
||||
TEST_CASE("dbitpipeline", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -554,7 +554,7 @@ TEST_CASE("dbitpipeline", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("v_a", "[.cmd][.new]") {
|
||||
TEST_CASE("v_a", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -575,7 +575,7 @@ TEST_CASE("v_a", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("v_b", "[.cmd][.new]") {
|
||||
TEST_CASE("v_b", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -596,7 +596,7 @@ TEST_CASE("v_b", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("v_c", "[.cmd][.new]") {
|
||||
TEST_CASE("v_c", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -617,7 +617,7 @@ TEST_CASE("v_c", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("v_d", "[.cmd][.new]") {
|
||||
TEST_CASE("v_d", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -638,7 +638,7 @@ TEST_CASE("v_d", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("v_io", "[.cmd][.new]") {
|
||||
TEST_CASE("v_io", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -650,7 +650,7 @@ TEST_CASE("v_io", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("v_chip", "[.cmd][.new]") {
|
||||
TEST_CASE("v_chip", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -662,7 +662,7 @@ TEST_CASE("v_chip", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("vm_a", "[.cmd][.new]") {
|
||||
TEST_CASE("vm_a", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -673,7 +673,7 @@ TEST_CASE("vm_a", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("vm_b", "[.cmd][.new]") {
|
||||
TEST_CASE("vm_b", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -684,7 +684,7 @@ TEST_CASE("vm_b", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("vm_c", "[.cmd][.new]") {
|
||||
TEST_CASE("vm_c", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -695,7 +695,7 @@ TEST_CASE("vm_c", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("vm_d", "[.cmd][.new]") {
|
||||
TEST_CASE("vm_d", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -706,7 +706,7 @@ TEST_CASE("vm_d", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("vm_io", "[.cmd][.new]") {
|
||||
TEST_CASE("vm_io", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -717,7 +717,7 @@ TEST_CASE("vm_io", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("im_a", "[.cmd][.new]") {
|
||||
TEST_CASE("im_a", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -728,7 +728,7 @@ TEST_CASE("im_a", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("im_b", "[.cmd][.new]") {
|
||||
TEST_CASE("im_b", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -739,7 +739,7 @@ TEST_CASE("im_b", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("im_c", "[.cmd][.new]") {
|
||||
TEST_CASE("im_c", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -750,7 +750,7 @@ TEST_CASE("im_c", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("im_d", "[.cmd][.new]") {
|
||||
TEST_CASE("im_d", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -761,7 +761,7 @@ TEST_CASE("im_d", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("im_io", "[.cmd][.new]") {
|
||||
TEST_CASE("im_io", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -772,7 +772,7 @@ TEST_CASE("im_io", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("adc", "[.cmd][.new]") {
|
||||
TEST_CASE("adc", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -786,7 +786,7 @@ TEST_CASE("adc", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("extsampling", "[.cmd][.new]") {
|
||||
TEST_CASE("extsampling", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -816,7 +816,7 @@ TEST_CASE("extsampling", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("extsamplingsrc", "[.cmd][.new]") {
|
||||
TEST_CASE("extsamplingsrc", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -847,7 +847,7 @@ TEST_CASE("extsamplingsrc", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("diodelay", "[.cmd][.new]") {
|
||||
TEST_CASE("diodelay", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -870,7 +870,7 @@ TEST_CASE("diodelay", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("led", "[.cmd][.new]") {
|
||||
TEST_CASE("led", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include "CmdProxy.h"
|
||||
#include "sls/Detector.h"
|
||||
#include "catch.hpp"
|
||||
#include "sls/Detector.h"
|
||||
#include "sls/sls_detector_defs.h"
|
||||
#include <array>
|
||||
#include <sstream>
|
||||
#include <thread>
|
||||
|
||||
#include "sls/versionAPI.h"
|
||||
#include "test-CmdProxy-global.h"
|
||||
#include "tests/globals.h"
|
||||
#include "sls/versionAPI.h"
|
||||
|
||||
using sls::CmdProxy;
|
||||
using sls::Detector;
|
||||
@ -17,7 +17,7 @@ using test::PUT;
|
||||
|
||||
/** temperature */
|
||||
|
||||
TEST_CASE("temp_fpgaext", "[.cmd][.new]") {
|
||||
TEST_CASE("temp_fpgaext", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -32,7 +32,7 @@ TEST_CASE("temp_fpgaext", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("temp_10ge", "[.cmd][.new]") {
|
||||
TEST_CASE("temp_10ge", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -47,7 +47,7 @@ TEST_CASE("temp_10ge", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("temp_dcdc", "[.cmd][.new]") {
|
||||
TEST_CASE("temp_dcdc", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -62,7 +62,7 @@ TEST_CASE("temp_dcdc", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("temp_sodl", "[.cmd][.new]") {
|
||||
TEST_CASE("temp_sodl", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -77,7 +77,7 @@ TEST_CASE("temp_sodl", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("temp_sodr", "[.cmd][.new]") {
|
||||
TEST_CASE("temp_sodr", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -92,7 +92,7 @@ TEST_CASE("temp_sodr", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("temp_fpgafl", "[.cmd][.new]") {
|
||||
TEST_CASE("temp_fpgafl", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -107,7 +107,7 @@ TEST_CASE("temp_fpgafl", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("temp_fpgafr", "[.cmd][.new]") {
|
||||
TEST_CASE("temp_fpgafr", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -124,7 +124,7 @@ TEST_CASE("temp_fpgafr", "[.cmd][.new]") {
|
||||
|
||||
/* dacs */
|
||||
|
||||
TEST_CASE("Setting and reading back EIGER dacs", "[.cmd][.dacs][.new]") {
|
||||
TEST_CASE("Setting and reading back EIGER dacs", "[.cmd][.dacs]") {
|
||||
// vsvp, vtr, vrf, vrs, vsvn, vtgstv, vcmp_ll, vcmp_lr, vcal, vcmp_rl,
|
||||
// rxb_rb, rxb_lb, vcmp_rr, vcp, vcn, vis, vthreshold
|
||||
Detector det;
|
||||
@ -233,7 +233,7 @@ TEST_CASE("Setting and reading back EIGER dacs", "[.cmd][.dacs][.new]") {
|
||||
|
||||
/* Network Configuration (Detector<->Receiver) */
|
||||
|
||||
TEST_CASE("txndelay_left", "[.cmd][.new]") {
|
||||
TEST_CASE("txndelay_left", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -254,7 +254,7 @@ TEST_CASE("txndelay_left", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("txndelay_right", "[.cmd][.new]") {
|
||||
TEST_CASE("txndelay_right", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -277,7 +277,7 @@ TEST_CASE("txndelay_right", "[.cmd][.new]") {
|
||||
|
||||
/* Eiger Specific */
|
||||
|
||||
TEST_CASE("subexptime", "[.cmd][.new]") {
|
||||
TEST_CASE("subexptime", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
|
||||
@ -298,7 +298,7 @@ TEST_CASE("subexptime", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("subdeadtime", "[.cmd][.new]") {
|
||||
TEST_CASE("subdeadtime", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
|
||||
@ -319,7 +319,7 @@ TEST_CASE("subdeadtime", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("threshold", "[.cmd][.new]") {
|
||||
TEST_CASE("threshold", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
|
||||
@ -348,7 +348,7 @@ TEST_CASE("threshold", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("thresholdnotb", "[.cmd][.new]") {
|
||||
TEST_CASE("thresholdnotb", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
|
||||
@ -377,7 +377,7 @@ TEST_CASE("thresholdnotb", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("settingspath", "[.cmd][.new]") {
|
||||
TEST_CASE("settingspath", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto prev_val = det.getSettingsPath();
|
||||
@ -393,7 +393,7 @@ TEST_CASE("settingspath", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("overflow", "[.cmd][.new]") {
|
||||
TEST_CASE("overflow", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -414,7 +414,7 @@ TEST_CASE("overflow", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("flippeddatax", "[.cmd][.new]") {
|
||||
TEST_CASE("flippeddatax", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -435,7 +435,7 @@ TEST_CASE("flippeddatax", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("trimen", "[.cmd][.this][.new]") {
|
||||
TEST_CASE("trimen", "[.cmd][.this]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -456,7 +456,7 @@ TEST_CASE("trimen", "[.cmd][.this][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("ratecorr", "[.cmd][.new]") {
|
||||
TEST_CASE("ratecorr", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -490,7 +490,7 @@ TEST_CASE("ratecorr", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("readnlines", "[.cmd][.new]") {
|
||||
TEST_CASE("readnlines", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -520,7 +520,7 @@ TEST_CASE("readnlines", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("interruptsubframe", "[.cmd][.new]") {
|
||||
TEST_CASE("interruptsubframe", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -544,7 +544,7 @@ TEST_CASE("interruptsubframe", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("measuredperiod", "[.cmd][.new]") {
|
||||
TEST_CASE("measuredperiod", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -562,7 +562,12 @@ TEST_CASE("measuredperiod", "[.cmd][.new]") {
|
||||
std::ostringstream oss;
|
||||
proxy.Call("measuredperiod", {}, -1, GET, oss);
|
||||
std::string st = oss.str();
|
||||
std::string s = st.erase(0, strlen("measuredperiod "));
|
||||
std::string s;
|
||||
if (st.find('[') != std::string::npos) {
|
||||
s = st.erase(0, strlen("measuredperiod ["));
|
||||
} else {
|
||||
s = st.erase(0, strlen("measuredperiod "));
|
||||
}
|
||||
double val = std::stod(s);
|
||||
// REQUIRE(val >= 1.0);
|
||||
REQUIRE(val < 2.0);
|
||||
@ -576,7 +581,7 @@ TEST_CASE("measuredperiod", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("measuredsubperiod", "[.cmd][.new]") {
|
||||
TEST_CASE("measuredsubperiod", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -596,7 +601,12 @@ TEST_CASE("measuredsubperiod", "[.cmd][.new]") {
|
||||
std::ostringstream oss;
|
||||
proxy.Call("measuredsubperiod", {}, -1, GET, oss);
|
||||
std::string st = oss.str();
|
||||
std::string s = st.erase(0, strlen("measuredsubperiod "));
|
||||
std::string s;
|
||||
if (st.find('[') != std::string::npos) {
|
||||
s = st.erase(0, strlen("measuredsubperiod ["));
|
||||
} else {
|
||||
s = st.erase(0, strlen("measuredsubperiod "));
|
||||
}
|
||||
double val = std::stod(s);
|
||||
REQUIRE(val >= 0);
|
||||
REQUIRE(val < 1000);
|
||||
@ -611,7 +621,7 @@ TEST_CASE("measuredsubperiod", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("activate", "[.cmd][.new]") {
|
||||
TEST_CASE("activate", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -652,7 +662,7 @@ TEST_CASE("activate", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("partialreset", "[.cmd][.new]") {
|
||||
TEST_CASE("partialreset", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -674,7 +684,7 @@ TEST_CASE("partialreset", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("pulse", "[.cmd][.new]") {
|
||||
TEST_CASE("pulse", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -689,7 +699,7 @@ TEST_CASE("pulse", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("pulsenmove", "[.cmd][.new]") {
|
||||
TEST_CASE("pulsenmove", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -704,7 +714,7 @@ TEST_CASE("pulsenmove", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("pulsechip", "[.cmd][.new]") {
|
||||
TEST_CASE("pulsechip", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "test-CmdProxy-global.h"
|
||||
#include "CmdProxy.h"
|
||||
#include "sls/Detector.h"
|
||||
#include "catch.hpp"
|
||||
#include "sls/Detector.h"
|
||||
#include "tests/globals.h"
|
||||
|
||||
using sls::CmdProxy;
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include "CmdProxy.h"
|
||||
#include "sls/Detector.h"
|
||||
#include "catch.hpp"
|
||||
#include "sls/Detector.h"
|
||||
#include "sls/sls_detector_defs.h"
|
||||
#include <sstream>
|
||||
|
||||
#include "sls/Result.h"
|
||||
#include "sls/ToString.h"
|
||||
#include "sls/versionAPI.h"
|
||||
#include "test-CmdProxy-global.h"
|
||||
#include "tests/globals.h"
|
||||
#include "sls/versionAPI.h"
|
||||
|
||||
using sls::CmdProxy;
|
||||
using sls::Detector;
|
||||
@ -17,7 +17,7 @@ using test::PUT;
|
||||
|
||||
/* dacs */
|
||||
|
||||
TEST_CASE("Setting and reading back GOTTHARD dacs", "[.cmd][.dacs][.new]") {
|
||||
TEST_CASE("Setting and reading back GOTTHARD dacs", "[.cmd][.dacs]") {
|
||||
// vref_ds, vcascn_pb, vcascp_pb, vout_cm, vcasc_out, vin_cm, vref_comp,
|
||||
// ib_test_c
|
||||
|
||||
@ -97,7 +97,7 @@ TEST_CASE("Setting and reading back GOTTHARD dacs", "[.cmd][.dacs][.new]") {
|
||||
|
||||
/* Gotthard Specific */
|
||||
|
||||
TEST_CASE("roi", "[.cmd][.new]") {
|
||||
TEST_CASE("roi", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -123,7 +123,7 @@ TEST_CASE("roi", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("clearroi", "[.cmd][.new]") {
|
||||
TEST_CASE("clearroi", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -143,7 +143,7 @@ TEST_CASE("clearroi", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("exptimel", "[.cmd][.new]") {
|
||||
TEST_CASE("exptimel", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include "CmdProxy.h"
|
||||
#include "sls/Detector.h"
|
||||
#include "catch.hpp"
|
||||
#include "sls/Detector.h"
|
||||
#include "sls/sls_detector_defs.h"
|
||||
#include <sstream>
|
||||
|
||||
#include "sls/Result.h"
|
||||
#include "sls/ToString.h"
|
||||
#include "sls/versionAPI.h"
|
||||
#include "test-CmdProxy-global.h"
|
||||
#include "tests/globals.h"
|
||||
#include "sls/versionAPI.h"
|
||||
|
||||
using sls::CmdProxy;
|
||||
using sls::Detector;
|
||||
@ -17,7 +17,7 @@ using test::PUT;
|
||||
|
||||
/* dacs */
|
||||
|
||||
TEST_CASE("Setting and reading back GOTTHARD2 dacs", "[.cmd][.dacs][.new]") {
|
||||
TEST_CASE("Setting and reading back GOTTHARD2 dacs", "[.cmd][.dacs]") {
|
||||
// vref_h_adc, vb_comp_fe, vb_comp_adc, vcom_cds,
|
||||
// vref_restore, vb_opa_1st, vref_comp_fe, vcom_adc1,
|
||||
// vref_prech, vref_l_adc, vref_cds, vb_cs,
|
||||
@ -110,7 +110,7 @@ TEST_CASE("Setting and reading back GOTTHARD2 dacs", "[.cmd][.dacs][.new]") {
|
||||
|
||||
/* on chip dacs */
|
||||
|
||||
TEST_CASE("vchip_comp_fe", "[.cmd][.onchipdacs][.new]") {
|
||||
TEST_CASE("vchip_comp_fe", "[.cmd][.onchipdacs]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -123,7 +123,7 @@ TEST_CASE("vchip_comp_fe", "[.cmd][.onchipdacs][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("vchip_opa_1st", "[.cmd][.onchipdacs][.new]") {
|
||||
TEST_CASE("vchip_opa_1st", "[.cmd][.onchipdacs]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -136,7 +136,7 @@ TEST_CASE("vchip_opa_1st", "[.cmd][.onchipdacs][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("vchip_opa_fd", "[.cmd][.onchipdacs][.new]") {
|
||||
TEST_CASE("vchip_opa_fd", "[.cmd][.onchipdacs]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -149,7 +149,7 @@ TEST_CASE("vchip_opa_fd", "[.cmd][.onchipdacs][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("vchip_comp_adc", "[.cmd][.onchipdacs][.new]") {
|
||||
TEST_CASE("vchip_comp_adc", "[.cmd][.onchipdacs]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -162,7 +162,7 @@ TEST_CASE("vchip_comp_adc", "[.cmd][.onchipdacs][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("vchip_ref_comp_fe", "[.cmd][.onchipdacs][.new]") {
|
||||
TEST_CASE("vchip_ref_comp_fe", "[.cmd][.onchipdacs]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -175,7 +175,7 @@ TEST_CASE("vchip_ref_comp_fe", "[.cmd][.onchipdacs][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("vchip_cs", "[.cmd][.onchipdacs][.new]") {
|
||||
TEST_CASE("vchip_cs", "[.cmd][.onchipdacs]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -188,7 +188,7 @@ TEST_CASE("vchip_cs", "[.cmd][.onchipdacs][.new]") {
|
||||
|
||||
/* Gotthard2 Specific */
|
||||
|
||||
TEST_CASE("bursts", "[.cmd][.new]") {
|
||||
TEST_CASE("bursts", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -262,7 +262,7 @@ TEST_CASE("bursts", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("burstperiod", "[.cmd][.new]") {
|
||||
TEST_CASE("burstperiod", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -284,7 +284,7 @@ TEST_CASE("burstperiod", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("burstsl", "[.cmd][.new]") {
|
||||
TEST_CASE("burstsl", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -295,7 +295,7 @@ TEST_CASE("burstsl", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("inj_ch", "[.cmd][.new]") {
|
||||
TEST_CASE("inj_ch", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -320,7 +320,7 @@ TEST_CASE("inj_ch", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("vetophoton", "[.cmd][.new]") {
|
||||
TEST_CASE("vetophoton", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -342,7 +342,7 @@ TEST_CASE("vetophoton", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("vetoref", "[.cmd][.new]") {
|
||||
TEST_CASE("vetoref", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -357,7 +357,7 @@ TEST_CASE("vetoref", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("vetofile", "[.cmd][.new]") {
|
||||
TEST_CASE("vetofile", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -371,7 +371,7 @@ TEST_CASE("vetofile", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("burstmode", "[.cmd][.new]") {
|
||||
TEST_CASE("burstmode", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -402,7 +402,7 @@ TEST_CASE("burstmode", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("cdsgain", "[.cmd][.new]") {
|
||||
TEST_CASE("cdsgain", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -432,7 +432,7 @@ TEST_CASE("cdsgain", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("filter", "[.cmd][.new]") {
|
||||
TEST_CASE("filter", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -462,7 +462,7 @@ TEST_CASE("filter", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("currentsource", "[.cmd][.new]") {
|
||||
TEST_CASE("currentsource", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -492,7 +492,7 @@ TEST_CASE("currentsource", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("timingsource", "[.cmd][.new]") {
|
||||
TEST_CASE("timingsource", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -522,7 +522,7 @@ TEST_CASE("timingsource", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("veto", "[.cmd][.new]") {
|
||||
TEST_CASE("veto", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -552,7 +552,7 @@ TEST_CASE("veto", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("confadc", "[.cmd][.new]") {
|
||||
TEST_CASE("confadc", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -599,7 +599,7 @@ TEST_CASE("confadc", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("badchannels", "[.cmd][.new]") {
|
||||
TEST_CASE("badchannels", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
@ -1,12 +1,12 @@
|
||||
#include "CmdProxy.h"
|
||||
#include "sls/Detector.h"
|
||||
#include "catch.hpp"
|
||||
#include "sls/Detector.h"
|
||||
#include "sls/sls_detector_defs.h"
|
||||
#include <sstream>
|
||||
|
||||
#include "sls/versionAPI.h"
|
||||
#include "test-CmdProxy-global.h"
|
||||
#include "tests/globals.h"
|
||||
#include "sls/versionAPI.h"
|
||||
|
||||
using sls::CmdProxy;
|
||||
using sls::Detector;
|
||||
@ -15,7 +15,7 @@ using test::PUT;
|
||||
|
||||
/* dacs */
|
||||
|
||||
TEST_CASE("Setting and reading back Jungfrau dacs", "[.cmd][.dacs][.new]") {
|
||||
TEST_CASE("Setting and reading back Jungfrau dacs", "[.cmd][.dacs]") {
|
||||
// vb_comp, vdd_prot, vin_com, vref_prech, vb_pixbuf, vb_ds, vref_ds,
|
||||
// vref_comp
|
||||
Detector det;
|
||||
@ -96,7 +96,7 @@ TEST_CASE("Setting and reading back Jungfrau dacs", "[.cmd][.dacs][.new]") {
|
||||
|
||||
/* Network Configuration (Detector<->Receiver) */
|
||||
|
||||
TEST_CASE("selinterface", "[.cmd][.new]") {
|
||||
TEST_CASE("selinterface", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -127,7 +127,7 @@ TEST_CASE("selinterface", "[.cmd][.new]") {
|
||||
|
||||
/* Jungfrau Specific */
|
||||
|
||||
TEST_CASE("temp_threshold", "[.cmd][.new]") {
|
||||
TEST_CASE("temp_threshold", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -157,7 +157,7 @@ TEST_CASE("temp_threshold", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("temp_control", "[.cmd][.new]") {
|
||||
TEST_CASE("temp_control", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -187,7 +187,7 @@ TEST_CASE("temp_control", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("temp_event", "[.cmd][.new]") {
|
||||
TEST_CASE("temp_event", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -208,7 +208,7 @@ TEST_CASE("temp_event", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("auto_comp_disable", "[.cmd][.new]") {
|
||||
TEST_CASE("auto_comp_disable", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -238,7 +238,7 @@ TEST_CASE("auto_comp_disable", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("storagecells", "[.cmd][.new]") {
|
||||
TEST_CASE("storagecells", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -273,7 +273,7 @@ TEST_CASE("storagecells", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("storagecell_start", "[.cmd][.new]") {
|
||||
TEST_CASE("storagecell_start", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -309,7 +309,7 @@ TEST_CASE("storagecell_start", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("storagecell_delay", "[.cmd][.new]") {
|
||||
TEST_CASE("storagecell_delay", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include "CmdProxy.h"
|
||||
#include "sls/Detector.h"
|
||||
#include "catch.hpp"
|
||||
#include "sls/Detector.h"
|
||||
#include "sls/sls_detector_defs.h"
|
||||
#include <sstream>
|
||||
|
||||
#include "sls/Result.h"
|
||||
#include "sls/ToString.h"
|
||||
#include "sls/versionAPI.h"
|
||||
#include "test-CmdProxy-global.h"
|
||||
#include "tests/globals.h"
|
||||
#include "sls/versionAPI.h"
|
||||
|
||||
using sls::CmdProxy;
|
||||
using sls::Detector;
|
||||
@ -17,7 +17,7 @@ using test::PUT;
|
||||
|
||||
/* dacs */
|
||||
|
||||
TEST_CASE("Setting and reading back MOENCH dacs", "[.cmd][.dacs][.new]") {
|
||||
TEST_CASE("Setting and reading back MOENCH dacs", "[.cmd][.dacs]") {
|
||||
// vbp_colbuf, vipre, vin_cm", vb_sda, vcasc_sfp, vout_cm, vipre_cds,
|
||||
// ibias_sfp
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include "CmdProxy.h"
|
||||
#include "sls/Detector.h"
|
||||
#include "catch.hpp"
|
||||
#include "sls/Detector.h"
|
||||
#include "sls/sls_detector_defs.h"
|
||||
#include <sstream>
|
||||
|
||||
#include "sls/Result.h"
|
||||
#include "sls/ToString.h"
|
||||
#include "sls/versionAPI.h"
|
||||
#include "test-CmdProxy-global.h"
|
||||
#include "tests/globals.h"
|
||||
#include "sls/versionAPI.h"
|
||||
|
||||
using sls::CmdProxy;
|
||||
using sls::Detector;
|
||||
@ -17,7 +17,7 @@ using test::PUT;
|
||||
|
||||
/* dacs */
|
||||
|
||||
TEST_CASE("Setting and reading back MYTHEN3 dacs", "[.cmd][.dacs][.new]") {
|
||||
TEST_CASE("Setting and reading back MYTHEN3 dacs", "[.cmd][.dacs]") {
|
||||
// vcassh, vth2, vshaper, vshaperneg, vipre_out, vth3, vth1,
|
||||
// vicin, vcas, vpreamp, vpl, vipre, viinsh, vph, vtrim, vdcsh,
|
||||
|
||||
@ -117,7 +117,7 @@ TEST_CASE("Setting and reading back MYTHEN3 dacs", "[.cmd][.dacs][.new]") {
|
||||
|
||||
/* acquisition */
|
||||
|
||||
TEST_CASE("readout", "[.cmd][.new]") {
|
||||
TEST_CASE("readout", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
// PUT only command
|
||||
@ -134,7 +134,7 @@ TEST_CASE("readout", "[.cmd][.new]") {
|
||||
|
||||
/* Mythen3 Specific */
|
||||
|
||||
TEST_CASE("counters", "[.cmd][.new]") {
|
||||
TEST_CASE("counters", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -166,7 +166,7 @@ TEST_CASE("counters", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("gates", "[.cmd][.new]") {
|
||||
TEST_CASE("gates", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -196,7 +196,7 @@ TEST_CASE("gates", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("exptime1", "[.cmd][.new]") {
|
||||
TEST_CASE("exptime1", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -225,7 +225,7 @@ TEST_CASE("exptime1", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("exptime2", "[.cmd][.new]") {
|
||||
TEST_CASE("exptime2", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -254,7 +254,7 @@ TEST_CASE("exptime2", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("exptime3", "[.cmd][.new]") {
|
||||
TEST_CASE("exptime3", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -283,7 +283,7 @@ TEST_CASE("exptime3", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("gatedelay", "[.cmd][.new]") {
|
||||
TEST_CASE("gatedelay", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -319,7 +319,7 @@ TEST_CASE("gatedelay", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("gatedelay1", "[.cmd][.new]") {
|
||||
TEST_CASE("gatedelay1", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -348,7 +348,7 @@ TEST_CASE("gatedelay1", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("gatedelay2", "[.cmd][.new]") {
|
||||
TEST_CASE("gatedelay2", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -377,7 +377,7 @@ TEST_CASE("gatedelay2", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("gatedelay3", "[.cmd][.new]") {
|
||||
TEST_CASE("gatedelay3", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include "CmdProxy.h"
|
||||
#include "sls/Detector.h"
|
||||
#include "catch.hpp"
|
||||
#include "sls/Detector.h"
|
||||
#include "sls/sls_detector_defs.h"
|
||||
#include <sstream>
|
||||
|
||||
#include "sls/Result.h"
|
||||
#include "sls/ToString.h"
|
||||
#include "sls/versionAPI.h"
|
||||
#include "test-CmdProxy-global.h"
|
||||
#include "tests/globals.h"
|
||||
#include "sls/versionAPI.h"
|
||||
|
||||
using sls::CmdProxy;
|
||||
using sls::Detector;
|
||||
@ -17,7 +17,7 @@ using test::PUT;
|
||||
|
||||
/* Pattern */
|
||||
|
||||
TEST_CASE("pattern", "[.cmd][.new]") {
|
||||
TEST_CASE("pattern", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -30,7 +30,7 @@ TEST_CASE("pattern", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("savepattern", "[.cmd][.new]") {
|
||||
TEST_CASE("savepattern", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -46,7 +46,7 @@ TEST_CASE("savepattern", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("patioctrl", "[.cmd][.new]") {
|
||||
TEST_CASE("patioctrl", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -76,7 +76,7 @@ TEST_CASE("patioctrl", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("patword", "[.cmd][.new]") {
|
||||
TEST_CASE("patword", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -112,7 +112,7 @@ TEST_CASE("patword", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("patlimits", "[.cmd][.new]") {
|
||||
TEST_CASE("patlimits", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -139,7 +139,7 @@ TEST_CASE("patlimits", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("patloop0", "[.cmd][.new]") {
|
||||
TEST_CASE("patloop0", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -165,7 +165,7 @@ TEST_CASE("patloop0", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("patloop1", "[.cmd][.new]") {
|
||||
TEST_CASE("patloop1", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -191,7 +191,7 @@ TEST_CASE("patloop1", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("patloop2", "[.cmd][.new]") {
|
||||
TEST_CASE("patloop2", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -217,7 +217,7 @@ TEST_CASE("patloop2", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("patnloop0", "[.cmd][.new]") {
|
||||
TEST_CASE("patnloop0", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -243,7 +243,7 @@ TEST_CASE("patnloop0", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("patnloop1", "[.cmd][.new]") {
|
||||
TEST_CASE("patnloop1", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -269,7 +269,7 @@ TEST_CASE("patnloop1", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("patnloop2", "[.cmd][.new]") {
|
||||
TEST_CASE("patnloop2", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -295,7 +295,7 @@ TEST_CASE("patnloop2", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("patwait0", "[.cmd][.new]") {
|
||||
TEST_CASE("patwait0", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -321,7 +321,7 @@ TEST_CASE("patwait0", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("patwait1", "[.cmd][.new]") {
|
||||
TEST_CASE("patwait1", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -347,7 +347,7 @@ TEST_CASE("patwait1", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("patwait2", "[.cmd][.new]") {
|
||||
TEST_CASE("patwait2", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -373,7 +373,7 @@ TEST_CASE("patwait2", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("patwaittime0", "[.cmd][.new]") {
|
||||
TEST_CASE("patwaittime0", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -399,7 +399,7 @@ TEST_CASE("patwaittime0", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("patwaittime1", "[.cmd][.new]") {
|
||||
TEST_CASE("patwaittime1", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -425,7 +425,7 @@ TEST_CASE("patwaittime1", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("patwaittime2", "[.cmd][.new]") {
|
||||
TEST_CASE("patwaittime2", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -451,7 +451,7 @@ TEST_CASE("patwaittime2", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("patmask", "[.cmd][.new]") {
|
||||
TEST_CASE("patmask", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -477,7 +477,7 @@ TEST_CASE("patmask", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("patsetbit", "[.cmd][.new]") {
|
||||
TEST_CASE("patsetbit", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -503,7 +503,7 @@ TEST_CASE("patsetbit", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("patternstart", "[.cmd][.new]") {
|
||||
TEST_CASE("patternstart", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
REQUIRE_THROWS(proxy.Call("patternstart", {}, -1, GET));
|
||||
|
@ -1,11 +1,11 @@
|
||||
#include "CmdProxy.h"
|
||||
#include "sls/Detector.h"
|
||||
#include "catch.hpp"
|
||||
#include "sls/Detector.h"
|
||||
#include "sls/sls_detector_defs.h"
|
||||
#include <sstream>
|
||||
|
||||
#include "tests/globals.h"
|
||||
#include "sls/versionAPI.h"
|
||||
#include "tests/globals.h"
|
||||
|
||||
using sls::CmdProxy;
|
||||
using sls::Detector;
|
||||
@ -19,7 +19,7 @@ python/scripts/list_tested_cmd.py to check if all commands are covered
|
||||
|
||||
/* configuration */
|
||||
|
||||
TEST_CASE("rx_version", "[.cmd][.rx][.new]") {
|
||||
TEST_CASE("rx_version", "[.cmd][.rx]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
std::ostringstream oss;
|
||||
@ -33,7 +33,7 @@ TEST_CASE("rx_version", "[.cmd][.rx][.new]") {
|
||||
|
||||
/* acquisition */
|
||||
|
||||
TEST_CASE("rx_start", "[.cmd][.rx][.new]") {
|
||||
TEST_CASE("rx_start", "[.cmd][.rx]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
det.setFileWrite(false); // avoid writing or error on file creation
|
||||
@ -51,7 +51,7 @@ TEST_CASE("rx_start", "[.cmd][.rx][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_stop", "[.cmd][.rx][.new]") {
|
||||
TEST_CASE("rx_stop", "[.cmd][.rx]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
// PUT only command
|
||||
@ -68,7 +68,7 @@ TEST_CASE("rx_stop", "[.cmd][.rx][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_status", "[.cmd][.rx][.new]") {
|
||||
TEST_CASE("rx_status", "[.cmd][.rx]") {
|
||||
Detector det;
|
||||
det.setFileWrite(false); // avoid writing or error on file creation
|
||||
CmdProxy proxy(&det);
|
||||
@ -86,7 +86,7 @@ TEST_CASE("rx_status", "[.cmd][.rx][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_framescaught", "[.cmd][.rx][.new]") {
|
||||
TEST_CASE("rx_framescaught", "[.cmd][.rx]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
|
||||
@ -111,7 +111,7 @@ TEST_CASE("rx_framescaught", "[.cmd][.rx][.new]") {
|
||||
// }
|
||||
}
|
||||
|
||||
TEST_CASE("rx_missingpackets", "[.cmd][.rx][.new]") {
|
||||
TEST_CASE("rx_missingpackets", "[.cmd][.rx]") {
|
||||
Detector det;
|
||||
det.setFileWrite(false); // avoid writing or error on file creation
|
||||
CmdProxy proxy(&det);
|
||||
@ -138,7 +138,7 @@ TEST_CASE("rx_missingpackets", "[.cmd][.rx][.new]") {
|
||||
|
||||
/* Network Configuration (Detector<->Receiver) */
|
||||
|
||||
TEST_CASE("rx_printconfig", "[.cmd][.rx][.new]") {
|
||||
TEST_CASE("rx_printconfig", "[.cmd][.rx]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
REQUIRE_NOTHROW(proxy.Call("rx_printconfig", {}, -1, GET));
|
||||
@ -146,7 +146,7 @@ TEST_CASE("rx_printconfig", "[.cmd][.rx][.new]") {
|
||||
|
||||
/* Receiver Config */
|
||||
|
||||
TEST_CASE("rx_hostname", "[.cmd][.rx][.new]") {
|
||||
TEST_CASE("rx_hostname", "[.cmd][.rx]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto prev_val = det.getRxHostname();
|
||||
@ -178,7 +178,7 @@ TEST_CASE("rx_hostname", "[.cmd][.rx][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_tcpport", "[.cmd][.rx][.new]") {
|
||||
TEST_CASE("rx_tcpport", "[.cmd][.rx]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto prev_val = det.getRxPort();
|
||||
@ -203,7 +203,7 @@ TEST_CASE("rx_tcpport", "[.cmd][.rx][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_fifodepth", "[.cmd][.rx][.new]") {
|
||||
TEST_CASE("rx_fifodepth", "[.cmd][.rx]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto prev_val = det.getRxFifoDepth();
|
||||
@ -227,7 +227,7 @@ TEST_CASE("rx_fifodepth", "[.cmd][.rx][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_silent", "[.cmd][.rx][.new]") {
|
||||
TEST_CASE("rx_silent", "[.cmd][.rx]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto prev_val = det.getRxSilentMode();
|
||||
@ -251,7 +251,7 @@ TEST_CASE("rx_silent", "[.cmd][.rx][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_discardpolicy", "[.cmd][.rx][.new]") {
|
||||
TEST_CASE("rx_discardpolicy", "[.cmd][.rx]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto prev_val = det.getRxFrameDiscardPolicy();
|
||||
@ -280,7 +280,7 @@ TEST_CASE("rx_discardpolicy", "[.cmd][.rx][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_padding", "[.cmd][.rx][.new]") {
|
||||
TEST_CASE("rx_padding", "[.cmd][.rx]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto prev_val = det.getPartialFramesPadding();
|
||||
@ -304,7 +304,7 @@ TEST_CASE("rx_padding", "[.cmd][.rx][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_udpsocksize", "[.cmd][.rx][.new]") {
|
||||
TEST_CASE("rx_udpsocksize", "[.cmd][.rx]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
int64_t prev_val = det.getRxUDPSocketBufferSize().tsquash(
|
||||
@ -323,7 +323,7 @@ TEST_CASE("rx_udpsocksize", "[.cmd][.rx][.new]") {
|
||||
det.setRxUDPSocketBufferSize(prev_val);
|
||||
}
|
||||
|
||||
TEST_CASE("rx_realudpsocksize", "[.cmd][.rx][.new]") {
|
||||
TEST_CASE("rx_realudpsocksize", "[.cmd][.rx]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
uint64_t val = 0;
|
||||
@ -342,7 +342,7 @@ TEST_CASE("rx_realudpsocksize", "[.cmd][.rx][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_lock", "[.cmd][.rx][.new]") {
|
||||
TEST_CASE("rx_lock", "[.cmd][.rx]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto prev_val = det.getRxLock();
|
||||
@ -366,7 +366,7 @@ TEST_CASE("rx_lock", "[.cmd][.rx][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_lastclient", "[.cmd][.rx][.new]") {
|
||||
TEST_CASE("rx_lastclient", "[.cmd][.rx]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
std::ostringstream oss;
|
||||
@ -376,7 +376,7 @@ TEST_CASE("rx_lastclient", "[.cmd][.rx][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_threads", "[.cmd][.rx][.new]") {
|
||||
TEST_CASE("rx_threads", "[.cmd][.rx]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
std::ostringstream oss;
|
||||
@ -385,7 +385,7 @@ TEST_CASE("rx_threads", "[.cmd][.rx][.new]") {
|
||||
|
||||
/* File */
|
||||
|
||||
TEST_CASE("fformat", "[.cmd][.new]") {
|
||||
TEST_CASE("fformat", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto prev_val = det.getFileFormat();
|
||||
@ -404,7 +404,7 @@ TEST_CASE("fformat", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("fpath", "[.cmd][.new]") {
|
||||
TEST_CASE("fpath", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto prev_val = det.getFilePath();
|
||||
@ -423,7 +423,7 @@ TEST_CASE("fpath", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("fname", "[.cmd][.new]") {
|
||||
TEST_CASE("fname", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto prev_val = det.getFileNamePrefix();
|
||||
@ -447,7 +447,7 @@ TEST_CASE("fname", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("findex", "[.cmd][.new]") {
|
||||
TEST_CASE("findex", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto prev_val = det.getAcquisitionIndex();
|
||||
@ -471,7 +471,7 @@ TEST_CASE("findex", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("fwrite", "[.cmd][.new]") {
|
||||
TEST_CASE("fwrite", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto prev_val = det.getFileWrite();
|
||||
@ -517,7 +517,7 @@ TEST_CASE("fmaster", "[.cmd]") {
|
||||
det.setMasterFileWrite(prev_val);
|
||||
}
|
||||
|
||||
TEST_CASE("foverwrite", "[.cmd][.new]") {
|
||||
TEST_CASE("foverwrite", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto prev_val = det.getFileOverWrite();
|
||||
@ -541,7 +541,7 @@ TEST_CASE("foverwrite", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_framesperfile", "[.cmd][.rx][.new]") {
|
||||
TEST_CASE("rx_framesperfile", "[.cmd][.rx]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto prev_val = det.getFramesPerFile();
|
||||
@ -572,7 +572,7 @@ TEST_CASE("rx_framesperfile", "[.cmd][.rx][.new]") {
|
||||
|
||||
/* ZMQ Streaming Parameters (Receiver<->Client) */
|
||||
|
||||
TEST_CASE("rx_zmqstream", "[.cmd][.rx][.new]") {
|
||||
TEST_CASE("rx_zmqstream", "[.cmd][.rx]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto prev_val = det.getRxZmqDataStream();
|
||||
@ -598,7 +598,7 @@ TEST_CASE("rx_zmqstream", "[.cmd][.rx][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_zmqfreq", "[.cmd][.rx][.new]") {
|
||||
TEST_CASE("rx_zmqfreq", "[.cmd][.rx]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto prev_val = det.getRxZmqFrequency();
|
||||
@ -622,7 +622,7 @@ TEST_CASE("rx_zmqfreq", "[.cmd][.rx][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_zmqstartfnum", "[.cmd][.rx][.new]") {
|
||||
TEST_CASE("rx_zmqstartfnum", "[.cmd][.rx]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto prev_val = det.getRxZmqStartingFrame();
|
||||
@ -646,7 +646,7 @@ TEST_CASE("rx_zmqstartfnum", "[.cmd][.rx][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_zmqport", "[.cmd][.rx][.new]") {
|
||||
TEST_CASE("rx_zmqport", "[.cmd][.rx]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto prev_val_zmqport = det.getRxZmqPort();
|
||||
@ -686,7 +686,7 @@ TEST_CASE("rx_zmqport", "[.cmd][.rx][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_zmqip", "[.cmd][.rx][.new]") {
|
||||
TEST_CASE("rx_zmqip", "[.cmd][.rx]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto prev_val = det.getRxZmqIP();
|
||||
@ -706,7 +706,7 @@ TEST_CASE("rx_zmqip", "[.cmd][.rx][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_zmqhwm", "[.cmd][.new]") {
|
||||
TEST_CASE("rx_zmqhwm", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto prev_val =
|
||||
@ -736,7 +736,7 @@ TEST_CASE("rx_zmqhwm", "[.cmd][.new]") {
|
||||
|
||||
/* CTB Specific */
|
||||
|
||||
TEST_CASE("rx_dbitlist", "[.cmd][.rx][.new]") {
|
||||
TEST_CASE("rx_dbitlist", "[.cmd][.rx]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -765,7 +765,7 @@ TEST_CASE("rx_dbitlist", "[.cmd][.rx][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_dbitoffset", "[.cmd][.rx][.new]") {
|
||||
TEST_CASE("rx_dbitoffset", "[.cmd][.rx]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -801,7 +801,7 @@ TEST_CASE("rx_dbitoffset", "[.cmd][.rx][.new]") {
|
||||
|
||||
/* Moench */
|
||||
|
||||
TEST_CASE("rx_jsonaddheader", "[.cmd][.rx][.new]") {
|
||||
TEST_CASE("rx_jsonaddheader", "[.cmd][.rx]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto prev_val = det.getAdditionalJsonHeader();
|
||||
@ -827,7 +827,7 @@ TEST_CASE("rx_jsonaddheader", "[.cmd][.rx][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_jsonpara", "[.cmd][.rx][.new]") {
|
||||
TEST_CASE("rx_jsonpara", "[.cmd][.rx]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto prev_val = det.getAdditionalJsonHeader();
|
||||
@ -859,7 +859,7 @@ TEST_CASE("rx_jsonpara", "[.cmd][.rx][.new]") {
|
||||
|
||||
/* Insignificant */
|
||||
|
||||
TEST_CASE("rx_frameindex", "[.cmd][.rx][.new]") {
|
||||
TEST_CASE("rx_frameindex", "[.cmd][.rx]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
proxy.Call("rx_frameindex", {}, -1, GET);
|
||||
|
@ -23,7 +23,7 @@ TEST_CASE("Unknown command", "[.cmd]") {
|
||||
|
||||
/* configuration */
|
||||
|
||||
TEST_CASE("config", "[.cmd][.new]") {
|
||||
TEST_CASE("config", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
// put only
|
||||
@ -32,7 +32,7 @@ TEST_CASE("config", "[.cmd][.new]") {
|
||||
|
||||
// free: not testing
|
||||
|
||||
TEST_CASE("parameters", "[.cmd][.new]") {
|
||||
TEST_CASE("parameters", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
// put only
|
||||
@ -58,7 +58,7 @@ TEST_CASE("parameters", "[.cmd][.new]") {
|
||||
*/
|
||||
}
|
||||
|
||||
TEST_CASE("hostname", "[.cmd][.new]") {
|
||||
TEST_CASE("hostname", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
REQUIRE_NOTHROW(proxy.Call("hostname", {}, -1, GET));
|
||||
@ -66,49 +66,49 @@ TEST_CASE("hostname", "[.cmd][.new]") {
|
||||
|
||||
// virtual: not testing
|
||||
|
||||
TEST_CASE("versions", "[.cmd][.new]") {
|
||||
TEST_CASE("versions", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
REQUIRE_NOTHROW(proxy.Call("versions", {}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("versions", {"0"}, -1, PUT));
|
||||
}
|
||||
|
||||
TEST_CASE("packageversion", "[.cmd][.new]") {
|
||||
TEST_CASE("packageversion", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
REQUIRE_NOTHROW(proxy.Call("packageversion", {}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("packageversion", {"0"}, -1, PUT));
|
||||
}
|
||||
|
||||
TEST_CASE("clientversion", "[.cmd][.new]") {
|
||||
TEST_CASE("clientversion", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
REQUIRE_NOTHROW(proxy.Call("clientversion", {}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("clientversion", {"0"}, -1, PUT));
|
||||
}
|
||||
|
||||
TEST_CASE("firmwareversion", "[.cmd][.new]") {
|
||||
TEST_CASE("firmwareversion", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
REQUIRE_NOTHROW(proxy.Call("firmwareversion", {}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("firmwareversion", {"0"}, -1, PUT));
|
||||
}
|
||||
|
||||
TEST_CASE("detectorserverversion", "[.cmd][.new]") {
|
||||
TEST_CASE("detectorserverversion", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
REQUIRE_NOTHROW(proxy.Call("detectorserverversion", {}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("detectorserverversion", {"0"}, -1, PUT));
|
||||
}
|
||||
|
||||
TEST_CASE("serialnumber", "[.cmd][.new]") {
|
||||
TEST_CASE("serialnumber", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
REQUIRE_NOTHROW(proxy.Call("serialnumber", {}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("serialnumber", {"0"}, -1, PUT));
|
||||
}
|
||||
|
||||
TEST_CASE("type", "[.cmd][.new]") {
|
||||
TEST_CASE("type", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto dt = det.getDetectorType().squash();
|
||||
@ -120,13 +120,13 @@ TEST_CASE("type", "[.cmd][.new]") {
|
||||
// REQUIRE(dt == test::type);
|
||||
}
|
||||
|
||||
TEST_CASE("detsize", "[.cmd][.new]") {
|
||||
TEST_CASE("detsize", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
REQUIRE_NOTHROW(proxy.Call("detsize", {}, -1, GET));
|
||||
}
|
||||
|
||||
TEST_CASE("settingslist", "[.cmd][.new]") {
|
||||
TEST_CASE("settingslist", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -138,7 +138,7 @@ TEST_CASE("settingslist", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("settings", "[.cmd][.new]") {
|
||||
TEST_CASE("settings", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -206,13 +206,13 @@ TEST_CASE("settings", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("trimbits", "[.cmd][.new]") {
|
||||
TEST_CASE("trimbits", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
REQUIRE_THROWS(proxy.Call("trimbits", {}, -1, GET));
|
||||
}
|
||||
|
||||
TEST_CASE("trimval", "[.cmd][.new]") {
|
||||
TEST_CASE("trimval", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -250,7 +250,7 @@ TEST_CASE("trimval", "[.cmd][.new]") {
|
||||
|
||||
// acquire: not testing
|
||||
|
||||
TEST_CASE("frames", "[.cmd][.new]") {
|
||||
TEST_CASE("frames", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto prev_val =
|
||||
@ -274,7 +274,7 @@ TEST_CASE("frames", "[.cmd][.new]") {
|
||||
det.setNumberOfFrames(prev_val);
|
||||
}
|
||||
|
||||
TEST_CASE("triggers", "[.cmd][.new]") {
|
||||
TEST_CASE("triggers", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto prev_val =
|
||||
@ -338,13 +338,17 @@ TEST_CASE("exptime", "[.cmd][.time]") {
|
||||
// Get exptime of single module
|
||||
std::ostringstream oss;
|
||||
proxy.Call("exptime", {}, 0, GET, oss);
|
||||
if (det_type == defs::MYTHEN3) {
|
||||
REQUIRE(oss.str() == "exptime [0ns, 0ns, 0ns]\n");
|
||||
} else {
|
||||
REQUIRE(oss.str() == "exptime 0ns\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
det.setExptime(-1, prev_val);
|
||||
}
|
||||
|
||||
TEST_CASE("period", "[.cmd][.new]") {
|
||||
TEST_CASE("period", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto prev_val = det.getPeriod();
|
||||
@ -368,7 +372,7 @@ TEST_CASE("period", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("delay", "[.cmd][.new]") {
|
||||
TEST_CASE("delay", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -401,7 +405,7 @@ TEST_CASE("delay", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("framesl", "[.cmd][.new]") {
|
||||
TEST_CASE("framesl", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -412,7 +416,7 @@ TEST_CASE("framesl", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("triggersl", "[.cmd][.new]") {
|
||||
TEST_CASE("triggersl", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -423,7 +427,7 @@ TEST_CASE("triggersl", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("delayl", "[.cmd][.new]") {
|
||||
TEST_CASE("delayl", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -441,7 +445,7 @@ TEST_CASE("delayl", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("periodl", "[.cmd][.new]") {
|
||||
TEST_CASE("periodl", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -459,7 +463,7 @@ TEST_CASE("periodl", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("dr", "[.cmd][.new]") {
|
||||
TEST_CASE("dr", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -501,14 +505,14 @@ TEST_CASE("dr", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("drlist", "[.cmd][.new]") {
|
||||
TEST_CASE("drlist", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
REQUIRE_NOTHROW(proxy.Call("drlist", {}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("drlist", {}, -1, PUT));
|
||||
}
|
||||
|
||||
TEST_CASE("timing", "[.cmd][.new]") {
|
||||
TEST_CASE("timing", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto prev_val = det.getTimingMode();
|
||||
@ -570,14 +574,14 @@ TEST_CASE("timing", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("timinglist", "[.cmd][.new]") {
|
||||
TEST_CASE("timinglist", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
REQUIRE_NOTHROW(proxy.Call("timinglist", {}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("timinglist", {}, -1, PUT));
|
||||
}
|
||||
|
||||
TEST_CASE("speed", "[.cmd][.new]") {
|
||||
TEST_CASE("speed", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -628,7 +632,7 @@ TEST_CASE("speed", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("adcphase", "[.cmd][.new]") {
|
||||
TEST_CASE("adcphase", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -667,7 +671,7 @@ TEST_CASE("adcphase", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("maxadcphaseshift", "[.cmd][.new]") {
|
||||
TEST_CASE("maxadcphaseshift", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -681,7 +685,7 @@ TEST_CASE("maxadcphaseshift", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("dbitphase", "[.cmd][.new]") {
|
||||
TEST_CASE("dbitphase", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -710,7 +714,7 @@ TEST_CASE("dbitphase", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("maxdbitphaseshift", "[.cmd][.new]") {
|
||||
TEST_CASE("maxdbitphaseshift", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -723,7 +727,7 @@ TEST_CASE("maxdbitphaseshift", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("clkfreq", "[.cmd][.new]") {
|
||||
TEST_CASE("clkfreq", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -737,7 +741,7 @@ TEST_CASE("clkfreq", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("clkphase", "[.cmd][.new]") {
|
||||
TEST_CASE("clkphase", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -775,7 +779,7 @@ TEST_CASE("clkphase", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("clkdiv", "[.cmd][.new]") {
|
||||
TEST_CASE("clkdiv", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -801,7 +805,7 @@ TEST_CASE("clkdiv", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("maxclkphaseshift", "[.cmd][.new]") {
|
||||
TEST_CASE("maxclkphaseshift", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -815,7 +819,7 @@ TEST_CASE("maxclkphaseshift", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("highvoltage", "[.cmd][.new]") {
|
||||
TEST_CASE("highvoltage", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -913,7 +917,7 @@ TEST_CASE("highvoltage", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("powerchip", "[.cmd][.new]") {
|
||||
TEST_CASE("powerchip", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -944,7 +948,7 @@ TEST_CASE("powerchip", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("imagetest", "[.cmd][.new]") {
|
||||
TEST_CASE("imagetest", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -974,7 +978,7 @@ TEST_CASE("imagetest", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("extsig", "[.cmd][.new]") {
|
||||
TEST_CASE("extsig", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -1053,7 +1057,7 @@ TEST_CASE("extsig", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("parallel", "[.cmd][.new]") {
|
||||
TEST_CASE("parallel", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -1085,21 +1089,21 @@ TEST_CASE("parallel", "[.cmd][.new]") {
|
||||
|
||||
/** temperature */
|
||||
|
||||
TEST_CASE("templist", "[.cmd][.new]") {
|
||||
TEST_CASE("templist", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
REQUIRE_NOTHROW(proxy.Call("templist", {}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("templist", {}, -1, PUT));
|
||||
}
|
||||
|
||||
TEST_CASE("tempvalues", "[.cmd][.new]") {
|
||||
TEST_CASE("tempvalues", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
REQUIRE_NOTHROW(proxy.Call("tempvalues", {}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("tempvalues", {}, -1, PUT));
|
||||
}
|
||||
|
||||
TEST_CASE("temp_adc", "[.cmd][.new]") {
|
||||
TEST_CASE("temp_adc", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -1114,7 +1118,7 @@ TEST_CASE("temp_adc", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("temp_fpga", "[.cmd][.new]") {
|
||||
TEST_CASE("temp_fpga", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -1132,23 +1136,36 @@ TEST_CASE("temp_fpga", "[.cmd][.new]") {
|
||||
|
||||
/* dacs */
|
||||
|
||||
TEST_CASE("daclist", "[.cmd][.new]") {
|
||||
TEST_CASE("daclist", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
REQUIRE_NOTHROW(proxy.Call("daclist", {}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("daclist", {}, -1, PUT));
|
||||
}
|
||||
|
||||
TEST_CASE("dacvalues", "[.cmd][.new]") {
|
||||
TEST_CASE("dacvalues", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
REQUIRE_NOTHROW(proxy.Call("dacvalues", {}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dacvalues", {}, -1, PUT));
|
||||
}
|
||||
|
||||
TEST_CASE("defaultdacs", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type != defs::CHIPTESTBOARD) {
|
||||
REQUIRE_THROWS(proxy.Call("defaultdacs", {}, -1, GET));
|
||||
REQUIRE_NOTHROW(proxy.Call("defaultdacs", {}, -1, PUT));
|
||||
} else {
|
||||
REQUIRE_THROWS(proxy.Call("defaultdacs", {}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("defaultdacs", {}, -1, PUT));
|
||||
}
|
||||
}
|
||||
|
||||
/* acquisition */
|
||||
|
||||
TEST_CASE("trigger", "[.cmd][.new]") {
|
||||
TEST_CASE("trigger", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
REQUIRE_THROWS(proxy.Call("trigger", {}, -1, GET));
|
||||
@ -1168,10 +1185,10 @@ TEST_CASE("trigger", "[.cmd][.new]") {
|
||||
det.getPeriod().tsquash("inconsistent period in test");
|
||||
det.setTimingMode(defs::TRIGGER_EXPOSURE);
|
||||
det.setNumberOfFrames(1);
|
||||
det.setExptime(std::chrono::milliseconds(1));
|
||||
det.setExptime(std::chrono::microseconds(200));
|
||||
det.setPeriod(std::chrono::milliseconds(1));
|
||||
auto startingfnum = det.getStartingFrameNumber().tsquash(
|
||||
"inconsistent frame nr in test");
|
||||
auto nextframenumber =
|
||||
det.getNextFrameNumber().tsquash("inconsistent frame nr in test");
|
||||
det.startDetector();
|
||||
{
|
||||
std::ostringstream oss;
|
||||
@ -1179,16 +1196,18 @@ TEST_CASE("trigger", "[.cmd][.new]") {
|
||||
REQUIRE(oss.str() == "trigger successful\n");
|
||||
}
|
||||
std::this_thread::sleep_for(std::chrono::seconds(2));
|
||||
auto currentfnum = det.getStartingFrameNumber().tsquash(
|
||||
"inconsistent frame nr in test");
|
||||
REQUIRE(startingfnum + 1 == currentfnum);
|
||||
auto currentfnum =
|
||||
det.getNextFrameNumber().tsquash("inconsistent frame nr in test");
|
||||
REQUIRE(nextframenumber + 1 == currentfnum);
|
||||
det.stopDetector();
|
||||
det.setTimingMode(prev_timing);
|
||||
det.setNumberOfFrames(prev_frames);
|
||||
det.setExptime(prev_exptime);
|
||||
det.setPeriod(prev_period);
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("clearbusy", "[.cmd][.new]") {
|
||||
TEST_CASE("clearbusy", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
REQUIRE_NOTHROW(proxy.Call("clearbusy", {}, -1, PUT));
|
||||
@ -1196,7 +1215,7 @@ TEST_CASE("clearbusy", "[.cmd][.new]") {
|
||||
REQUIRE_THROWS(proxy.Call("clearbusy", {}, -1, GET));
|
||||
}
|
||||
|
||||
TEST_CASE("start", "[.cmd][.new]") {
|
||||
TEST_CASE("start", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
// PUT only command
|
||||
@ -1213,13 +1232,17 @@ TEST_CASE("start", "[.cmd][.new]") {
|
||||
}
|
||||
prev_val = t[0];
|
||||
}
|
||||
det.setExptime(-1, std::chrono::seconds(2));
|
||||
auto prev_frames =
|
||||
det.getNumberOfFrames().tsquash("inconsistent #frames in test");
|
||||
auto prev_period = det.getPeriod().tsquash("inconsistent period in test");
|
||||
det.setExptime(-1, std::chrono::microseconds(200));
|
||||
det.setPeriod(std::chrono::milliseconds(1));
|
||||
det.setNumberOfFrames(2000);
|
||||
{
|
||||
std::ostringstream oss;
|
||||
proxy.Call("start", {}, -1, PUT, oss);
|
||||
REQUIRE(oss.str() == "start successful\n");
|
||||
}
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(200));
|
||||
{
|
||||
std::ostringstream oss;
|
||||
proxy.Call("status", {}, -1, GET, oss);
|
||||
@ -1227,15 +1250,19 @@ TEST_CASE("start", "[.cmd][.new]") {
|
||||
}
|
||||
det.stopDetector();
|
||||
det.setExptime(-1, prev_val);
|
||||
det.setPeriod(prev_period);
|
||||
det.setNumberOfFrames(prev_frames);
|
||||
}
|
||||
|
||||
TEST_CASE("stop", "[.cmd][.new]") {
|
||||
TEST_CASE("stop", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
// PUT only command
|
||||
REQUIRE_THROWS(proxy.Call("stop", {}, -1, GET));
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
std::chrono::nanoseconds prev_val;
|
||||
bool virtualDet =
|
||||
det.isVirtualDetectorServer().tsquash("inconsistent virtual servers");
|
||||
if (det_type != defs::MYTHEN3) {
|
||||
prev_val = det.getExptime().tsquash("inconsistent exptime to test");
|
||||
} else {
|
||||
@ -1246,9 +1273,13 @@ TEST_CASE("stop", "[.cmd][.new]") {
|
||||
}
|
||||
prev_val = t[0];
|
||||
}
|
||||
det.setExptime(-1, std::chrono::seconds(2));
|
||||
auto prev_frames =
|
||||
det.getNumberOfFrames().tsquash("inconsistent #frames in test");
|
||||
auto prev_period = det.getPeriod().tsquash("inconsistent period in test");
|
||||
det.setExptime(-1, std::chrono::microseconds(200));
|
||||
det.setPeriod(std::chrono::milliseconds(1));
|
||||
det.setNumberOfFrames(2000);
|
||||
det.startDetector();
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(200));
|
||||
{
|
||||
std::ostringstream oss;
|
||||
proxy.Call("status", {}, -1, GET, oss);
|
||||
@ -1259,23 +1290,27 @@ TEST_CASE("stop", "[.cmd][.new]") {
|
||||
proxy.Call("stop", {}, -1, PUT, oss);
|
||||
REQUIRE(oss.str() == "stop successful\n");
|
||||
}
|
||||
if (det_type == defs::JUNGFRAU) {
|
||||
{
|
||||
std::ostringstream oss;
|
||||
proxy.Call("status", {}, -1, GET, oss);
|
||||
if (!virtualDet && det_type == defs::JUNGFRAU) {
|
||||
REQUIRE(oss.str() == "status stopped\n");
|
||||
} else {
|
||||
std::ostringstream oss;
|
||||
proxy.Call("status", {}, -1, GET, oss);
|
||||
REQUIRE(oss.str() == "status idle\n");
|
||||
}
|
||||
}
|
||||
det.setExptime(-1, prev_val);
|
||||
det.setPeriod(prev_period);
|
||||
det.setNumberOfFrames(prev_frames);
|
||||
}
|
||||
|
||||
TEST_CASE("status", "[.cmd][.new]") {
|
||||
TEST_CASE("status", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
std::chrono::nanoseconds prev_val;
|
||||
bool virtualDet =
|
||||
det.isVirtualDetectorServer().tsquash("inconsistent virtual servers");
|
||||
if (det_type != defs::MYTHEN3) {
|
||||
prev_val = det.getExptime().tsquash("inconsistent exptime to test");
|
||||
} else {
|
||||
@ -1286,9 +1321,13 @@ TEST_CASE("status", "[.cmd][.new]") {
|
||||
}
|
||||
prev_val = t[0];
|
||||
}
|
||||
det.setExptime(-1, std::chrono::seconds(2));
|
||||
auto prev_frames =
|
||||
det.getNumberOfFrames().tsquash("inconsistent #frames in test");
|
||||
auto prev_period = det.getPeriod().tsquash("inconsistent period in test");
|
||||
det.setExptime(-1, std::chrono::microseconds(200));
|
||||
det.setPeriod(std::chrono::milliseconds(1));
|
||||
det.setNumberOfFrames(2000);
|
||||
det.startDetector();
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(200));
|
||||
{
|
||||
std::ostringstream oss;
|
||||
proxy.Call("status", {}, -1, GET, oss);
|
||||
@ -1298,42 +1337,48 @@ TEST_CASE("status", "[.cmd][.new]") {
|
||||
{
|
||||
std::ostringstream oss;
|
||||
proxy.Call("status", {}, -1, GET, oss);
|
||||
if (!virtualDet && det_type == defs::JUNGFRAU) {
|
||||
REQUIRE(oss.str() == "status stopped\n");
|
||||
} else {
|
||||
REQUIRE(oss.str() == "status idle\n");
|
||||
}
|
||||
}
|
||||
det.setExptime(-1, prev_val);
|
||||
det.setPeriod(prev_period);
|
||||
det.setNumberOfFrames(prev_frames);
|
||||
}
|
||||
|
||||
TEST_CASE("startingfnum", "[.cmd][.new]") {
|
||||
TEST_CASE("nextframenumber", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::EIGER || det_type == defs::JUNGFRAU) {
|
||||
auto prev_sfnum = det.getStartingFrameNumber();
|
||||
REQUIRE_THROWS(proxy.Call("startingfnum", {"0"}, -1, PUT));
|
||||
auto prev_sfnum = det.getNextFrameNumber();
|
||||
REQUIRE_THROWS(proxy.Call("nextframenumber", {"0"}, -1, PUT));
|
||||
{
|
||||
std::ostringstream oss;
|
||||
proxy.Call("startingfnum", {"3"}, -1, PUT, oss);
|
||||
REQUIRE(oss.str() == "startingfnum 3\n");
|
||||
proxy.Call("nextframenumber", {"3"}, -1, PUT, oss);
|
||||
REQUIRE(oss.str() == "nextframenumber 3\n");
|
||||
}
|
||||
{
|
||||
std::ostringstream oss;
|
||||
proxy.Call("startingfnum", {}, -1, GET, oss);
|
||||
REQUIRE(oss.str() == "startingfnum 3\n");
|
||||
proxy.Call("nextframenumber", {}, -1, GET, oss);
|
||||
REQUIRE(oss.str() == "nextframenumber 3\n");
|
||||
}
|
||||
{
|
||||
std::ostringstream oss;
|
||||
proxy.Call("startingfnum", {"1"}, -1, PUT, oss);
|
||||
REQUIRE(oss.str() == "startingfnum 1\n");
|
||||
proxy.Call("nextframenumber", {"1"}, -1, PUT, oss);
|
||||
REQUIRE(oss.str() == "nextframenumber 1\n");
|
||||
}
|
||||
for (int i = 0; i != det.size(); ++i) {
|
||||
det.setStartingFrameNumber(prev_sfnum[i], {i});
|
||||
det.setNextFrameNumber(prev_sfnum[i], {i});
|
||||
}
|
||||
} else {
|
||||
REQUIRE_THROWS(proxy.Call("startingfnum", {}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("nextframenumber", {}, -1, GET));
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("scan", "[.cmd][.new]") {
|
||||
TEST_CASE("scan", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
defs::dacIndex ind = defs::DAC_0;
|
||||
@ -1453,18 +1498,19 @@ TEST_CASE("scan", "[.cmd][.new]") {
|
||||
// Reset all dacs to previous value
|
||||
// for (int i = 0; i != det.size(); ++i) {
|
||||
// det.setDAC(ind, previous[i], false, {i});
|
||||
// det.setDAC(notImplementedInd, notImplementedPrevious[i], false, {i});
|
||||
// det.setDAC(notImplementedInd, notImplementedPrevious[i], false,
|
||||
// {i});
|
||||
// }
|
||||
}
|
||||
|
||||
TEST_CASE("scanerrmsg", "[.cmd][.new]") {
|
||||
TEST_CASE("scanerrmsg", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
REQUIRE_NOTHROW(proxy.Call("scanerrmsg", {}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("scanerrmsg", {""}, -1, PUT));
|
||||
}
|
||||
|
||||
TEST_CASE("gappixels", "[.cmd][.new]") {
|
||||
TEST_CASE("gappixels", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -1504,7 +1550,7 @@ TEST_CASE("gappixels", "[.cmd][.new]") {
|
||||
|
||||
/* Network Configuration (Detector<->Receiver) */
|
||||
|
||||
TEST_CASE("numinterfaces", "[.cmd][.new]") {
|
||||
TEST_CASE("numinterfaces", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -1537,7 +1583,7 @@ TEST_CASE("numinterfaces", "[.cmd][.new]") {
|
||||
REQUIRE_THROWS(proxy.Call("numinterfaces", {"0"}, -1, PUT));
|
||||
}
|
||||
|
||||
TEST_CASE("udp_srcip", "[.cmd][.new]") {
|
||||
TEST_CASE("udp_srcip", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto prev_val = det.getSourceUDPIP();
|
||||
@ -1552,13 +1598,13 @@ TEST_CASE("udp_srcip", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("udp_dstip", "[.cmd][.new]") {
|
||||
TEST_CASE("udp_dstip", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
REQUIRE_THROWS(proxy.Call("udp_dstip", {"0.0.0.0"}, -1, PUT));
|
||||
}
|
||||
|
||||
TEST_CASE("udp_srcmac", "[.cmd][.new]") {
|
||||
TEST_CASE("udp_srcmac", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto prev_val = det.getSourceUDPMAC();
|
||||
@ -1573,13 +1619,13 @@ TEST_CASE("udp_srcmac", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("udp_dstmac", "[.cmd][.new]") {
|
||||
TEST_CASE("udp_dstmac", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
REQUIRE_THROWS(proxy.Call("udp_dstmac", {"00:00:00:00:00:00"}, -1, PUT));
|
||||
}
|
||||
|
||||
TEST_CASE("udp_dstport", "[.cmd][.new]") {
|
||||
TEST_CASE("udp_dstport", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto prev_val = det.getDestinationUDPPort();
|
||||
@ -1593,7 +1639,7 @@ TEST_CASE("udp_dstport", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("udp_srcip2", "[.cmd][.new]") {
|
||||
TEST_CASE("udp_srcip2", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -1606,12 +1652,15 @@ TEST_CASE("udp_srcip2", "[.cmd][.new]") {
|
||||
REQUIRE(oss.str() == "udp_srcip2 129.129.205.12\n");
|
||||
}
|
||||
for (int i = 0; i != det.size(); ++i) {
|
||||
if (prev_val[i] != sls::IpAddr{"0.0.0.0"})
|
||||
det.setSourceUDPIP2(prev_val[i], {i});
|
||||
}
|
||||
} else {
|
||||
REQUIRE_THROWS(proxy.Call("udp_srcip2", {}, -1, GET));
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("udp_dstip2", "[.cmd][.new]") {
|
||||
TEST_CASE("udp_dstip2", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -1622,7 +1671,7 @@ TEST_CASE("udp_dstip2", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("udp_srcmac2", "[.cmd][.new]") {
|
||||
TEST_CASE("udp_srcmac2", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -1643,7 +1692,7 @@ TEST_CASE("udp_srcmac2", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("udp_dstmac2", "[.cmd][.new]") {
|
||||
TEST_CASE("udp_dstmac2", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -1655,7 +1704,7 @@ TEST_CASE("udp_dstmac2", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("udp_dstport2", "[.cmd][.new]") {
|
||||
TEST_CASE("udp_dstport2", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -1675,21 +1724,21 @@ TEST_CASE("udp_dstport2", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("udp_reconfigure", "[.cmd][.new]") {
|
||||
TEST_CASE("udp_reconfigure", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
REQUIRE_THROWS(proxy.Call("udp_reconfigure", {}, -1, GET));
|
||||
REQUIRE_NOTHROW(proxy.Call("udp_reconfigure", {}, -1, PUT));
|
||||
}
|
||||
|
||||
TEST_CASE("udp_validate", "[.cmd][.new]") {
|
||||
TEST_CASE("udp_validate", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
REQUIRE_THROWS(proxy.Call("udp_validate", {}, -1, GET));
|
||||
REQUIRE_NOTHROW(proxy.Call("udp_validate", {}, -1, PUT));
|
||||
}
|
||||
|
||||
TEST_CASE("tengiga", "[.cmd][.new]") {
|
||||
TEST_CASE("tengiga", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
|
||||
@ -1713,7 +1762,7 @@ TEST_CASE("tengiga", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("flowcontrol10g", "[.cmd][.new]") {
|
||||
TEST_CASE("flowcontrol10g", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -1743,7 +1792,7 @@ TEST_CASE("flowcontrol10g", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("txndelay_frame", "[.cmd][.new]") {
|
||||
TEST_CASE("txndelay_frame", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -1772,7 +1821,7 @@ TEST_CASE("txndelay_frame", "[.cmd][.new]") {
|
||||
|
||||
/* ZMQ Streaming Parameters (Receiver<->Client) */
|
||||
|
||||
TEST_CASE("zmqport", "[.cmd][.new]") {
|
||||
TEST_CASE("zmqport", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
|
||||
@ -1820,7 +1869,7 @@ TEST_CASE("zmqport", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("zmqip", "[.cmd][.new]") {
|
||||
TEST_CASE("zmqip", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
std::ostringstream oss1, oss2;
|
||||
@ -1836,7 +1885,7 @@ TEST_CASE("zmqip", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("zmqhwm", "[.cmd][.new]") {
|
||||
TEST_CASE("zmqhwm", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto prev_val = det.getClientZmqHwm();
|
||||
@ -1865,7 +1914,7 @@ TEST_CASE("zmqhwm", "[.cmd][.new]") {
|
||||
|
||||
/* Advanced */
|
||||
|
||||
TEST_CASE("programfpga", "[.cmd][.new]") {
|
||||
TEST_CASE("programfpga", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -1881,7 +1930,7 @@ TEST_CASE("programfpga", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("resetfpga", "[.cmd][.new]") {
|
||||
TEST_CASE("resetfpga", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -1897,7 +1946,7 @@ TEST_CASE("resetfpga", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("copydetectorserver", "[.cmd][.new]") {
|
||||
TEST_CASE("copydetectorserver", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -1916,7 +1965,7 @@ TEST_CASE("copydetectorserver", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rebootcontroller", "[.cmd][.new]") {
|
||||
TEST_CASE("rebootcontroller", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -1932,7 +1981,7 @@ TEST_CASE("rebootcontroller", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("update", "[.cmd][.new]") {
|
||||
TEST_CASE("update", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -1950,7 +1999,7 @@ TEST_CASE("update", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("reg", "[.cmd][.new]") {
|
||||
TEST_CASE("reg", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -1993,7 +2042,7 @@ TEST_CASE("adcreg", "[.cmd]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("setbit", "[.cmd][.new]") {
|
||||
TEST_CASE("setbit", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -2015,7 +2064,7 @@ TEST_CASE("setbit", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("clearbit", "[.cmd][.new]") {
|
||||
TEST_CASE("clearbit", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -2037,7 +2086,7 @@ TEST_CASE("clearbit", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("getbit", "[.cmd][.new]") {
|
||||
TEST_CASE("getbit", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -2061,7 +2110,7 @@ TEST_CASE("getbit", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("firmwaretest", "[.cmd][.new]") {
|
||||
TEST_CASE("firmwaretest", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -2078,7 +2127,7 @@ TEST_CASE("firmwaretest", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("bustest", "[.cmd][.new]") {
|
||||
TEST_CASE("bustest", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -2095,7 +2144,7 @@ TEST_CASE("bustest", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("initialchecks", "[.cmd][.new]") {
|
||||
TEST_CASE("initialchecks", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto check = det.getInitialChecks();
|
||||
@ -2117,7 +2166,7 @@ TEST_CASE("initialchecks", "[.cmd][.new]") {
|
||||
det.setInitialChecks(check);
|
||||
}
|
||||
|
||||
TEST_CASE("adcinvert", "[.cmd][.new]") {
|
||||
TEST_CASE("adcinvert", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@ -2145,7 +2194,7 @@ TEST_CASE("adcinvert", "[.cmd][.new]") {
|
||||
|
||||
/* Insignificant */
|
||||
|
||||
TEST_CASE("port", "[.cmd][.new]") {
|
||||
TEST_CASE("port", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto prev_val = det.getControlPort({0}).squash();
|
||||
@ -2162,7 +2211,7 @@ TEST_CASE("port", "[.cmd][.new]") {
|
||||
det.setControlPort(prev_val, {0});
|
||||
}
|
||||
|
||||
TEST_CASE("stopport", "[.cmd][.new]") {
|
||||
TEST_CASE("stopport", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto prev_val = det.getStopPort({0}).squash();
|
||||
@ -2179,7 +2228,7 @@ TEST_CASE("stopport", "[.cmd][.new]") {
|
||||
det.setStopPort(prev_val, {0});
|
||||
}
|
||||
|
||||
TEST_CASE("lock", "[.cmd][.new]") {
|
||||
TEST_CASE("lock", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto prev_val = det.getDetectorLock();
|
||||
@ -2203,30 +2252,31 @@ TEST_CASE("lock", "[.cmd][.new]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("execcommand", "[.cmd][.new]") {
|
||||
TEST_CASE("execcommand", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
REQUIRE_NOTHROW(proxy.Call("execcommand", {"ls"}, -1, PUT));
|
||||
}
|
||||
|
||||
TEST_CASE("nframes", "[.cmd][.new]") {
|
||||
TEST_CASE("framecounter", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::MOENCH || det_type == defs::MYTHEN3 ||
|
||||
det_type == defs::GOTTHARD2) {
|
||||
auto nframes = det.getNumberOfFramesFromStart().squash();
|
||||
auto framecounter = det.getNumberOfFramesFromStart().squash();
|
||||
std::ostringstream oss;
|
||||
proxy.Call("nframes", {}, -1, GET, oss);
|
||||
REQUIRE(oss.str() == "nframes " + std::to_string(nframes) + "\n");
|
||||
REQUIRE_NOTHROW(proxy.Call("nframes", {}, -1, GET));
|
||||
proxy.Call("framecounter", {}, -1, GET, oss);
|
||||
REQUIRE(oss.str() ==
|
||||
"framecounter " + std::to_string(framecounter) + "\n");
|
||||
REQUIRE_NOTHROW(proxy.Call("framecounter", {}, -1, GET));
|
||||
} else {
|
||||
REQUIRE_THROWS(proxy.Call("nframes", {}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("framecounter", {}, -1, GET));
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("now", "[.cmd][.new]") {
|
||||
TEST_CASE("runtime", "[.cmd]") {
|
||||
// TODO! can we test this?
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
@ -2235,16 +2285,16 @@ TEST_CASE("now", "[.cmd][.new]") {
|
||||
det_type == defs::MOENCH || det_type == defs::MYTHEN3 ||
|
||||
det_type == defs::GOTTHARD2) {
|
||||
std::ostringstream oss;
|
||||
proxy.Call("now", {}, -1, GET, oss);
|
||||
proxy.Call("runtime", {}, -1, GET, oss);
|
||||
// Get only
|
||||
REQUIRE_THROWS(proxy.Call("now", {"2019"}, -1, PUT));
|
||||
REQUIRE_NOTHROW(proxy.Call("now", {}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("runtime", {"2019"}, -1, PUT));
|
||||
REQUIRE_NOTHROW(proxy.Call("runtime", {}, -1, GET));
|
||||
} else {
|
||||
REQUIRE_THROWS(proxy.Call("now", {}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("runtime", {}, -1, GET));
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("timestamp", "[.cmd][.new]") {
|
||||
TEST_CASE("frametime", "[.cmd]") {
|
||||
// TODO! can we test this?
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
@ -2253,16 +2303,16 @@ TEST_CASE("timestamp", "[.cmd][.new]") {
|
||||
det_type == defs::MOENCH || det_type == defs::MYTHEN3 ||
|
||||
det_type == defs::GOTTHARD2) {
|
||||
std::ostringstream oss;
|
||||
proxy.Call("timestamp", {}, -1, GET, oss);
|
||||
proxy.Call("frametime", {}, -1, GET, oss);
|
||||
// Get only
|
||||
REQUIRE_THROWS(proxy.Call("timestamp", {"2019"}, -1, PUT));
|
||||
REQUIRE_NOTHROW(proxy.Call("timestamp", {}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("frametime", {"2019"}, -1, PUT));
|
||||
REQUIRE_NOTHROW(proxy.Call("frametime", {}, -1, GET));
|
||||
} else {
|
||||
REQUIRE_THROWS(proxy.Call("timestamp", {}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("frametime", {}, -1, GET));
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("user", "[.cmd][.new]") {
|
||||
TEST_CASE("user", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
proxy.Call("user", {}, -1, GET);
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "catch.hpp"
|
||||
#include "sls/Result.h"
|
||||
#include "sls/ToString.h"
|
||||
#include "sls/TypeTraits.h"
|
||||
#include "catch.hpp"
|
||||
#include <string>
|
||||
|
||||
using sls::Result;
|
||||
|
@ -15,17 +15,15 @@ set(PUBLICHEADERS
|
||||
include/sls/Receiver.h
|
||||
)
|
||||
|
||||
|
||||
# HDF5
|
||||
# HDF5 file writing
|
||||
if (SLS_USE_HDF5)
|
||||
if (HDF5_FOUND)
|
||||
find_package(HDF5 1.10 COMPONENTS CXX REQUIRED)
|
||||
add_definitions(
|
||||
-DHDF5C ${HDF5_DEFINITIONS}
|
||||
)
|
||||
list (APPEND SOURCES
|
||||
src/HDF5File.cpp
|
||||
)
|
||||
endif ()
|
||||
endif (SLS_USE_HDF5)
|
||||
|
||||
# Create an object library to avoid building the library twice
|
||||
@ -86,7 +84,8 @@ endif()
|
||||
|
||||
|
||||
add_executable(slsReceiver
|
||||
src/ReceiverApp.cpp)
|
||||
src/ReceiverApp.cpp
|
||||
)
|
||||
|
||||
|
||||
set_target_properties(slsReceiver PROPERTIES
|
||||
@ -100,14 +99,14 @@ target_link_libraries(slsReceiver PUBLIC
|
||||
PUBLIC
|
||||
slsReceiverStatic
|
||||
pthread
|
||||
${ZeroMQ_LIBRARIES}
|
||||
rt
|
||||
PRIVATE
|
||||
slsProjectWarnings
|
||||
)
|
||||
|
||||
add_executable(slsMultiReceiver
|
||||
src/MultiReceiverApp.cpp)
|
||||
src/MultiReceiverApp.cpp
|
||||
)
|
||||
|
||||
|
||||
set_target_properties(slsMultiReceiver PROPERTIES
|
||||
@ -121,7 +120,6 @@ target_link_libraries(slsMultiReceiver
|
||||
PUBLIC
|
||||
slsReceiverStatic
|
||||
pthread
|
||||
${ZeroMQ_LIBRARIES}
|
||||
rt
|
||||
PRIVATE
|
||||
slsProjectWarnings
|
||||
@ -132,8 +130,6 @@ if (SLS_USE_TESTS)
|
||||
endif(SLS_USE_TESTS)
|
||||
|
||||
|
||||
|
||||
|
||||
install(TARGETS slsReceiverShared slsReceiver slsMultiReceiver slsReceiverObject slsReceiverStatic
|
||||
EXPORT "${TARGETS_EXPORT_NAME}"
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
@ -142,5 +138,3 @@ install(TARGETS slsReceiverShared slsReceiver slsMultiReceiver slsReceiverObject
|
||||
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/sls
|
||||
)
|
||||
|
||||
# install(FILES ${ZMQ_STATIC_ARCHIVE}
|
||||
# DESTINATION lib)
|
||||
|
@ -130,4 +130,4 @@ size_t CircularFifo<Element>::increment(size_t i) const {
|
||||
return i;
|
||||
}
|
||||
|
||||
}
|
||||
} // namespace sls
|
@ -4,8 +4,7 @@
|
||||
|
||||
class ClientInterface;
|
||||
|
||||
namespace sls
|
||||
{
|
||||
namespace sls {
|
||||
|
||||
class Receiver : private virtual slsDetectorDefs {
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include "Implementation.h"
|
||||
#include "sls/ServerSocket.h"
|
||||
#include "receiver_defs.h"
|
||||
#include "sls/ServerSocket.h"
|
||||
#include "sls/sls_detector_defs.h"
|
||||
#include "sls/sls_detector_funcs.h"
|
||||
class ServerInterface;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user