From 81cc6b083641585853dc3c903534b1f33aa82915 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Fri, 25 Nov 2022 16:02:59 +0100 Subject: [PATCH 01/24] release notes and help on python exptime help --- RELEASE.txt | 138 ++++++++++++++++++--- python/slsdet/detector.py | 22 +++- slsDetectorSoftware/include/sls/Detector.h | 2 +- 3 files changed, 138 insertions(+), 24 deletions(-) diff --git a/RELEASE.txt b/RELEASE.txt index 0c59b40bb..9f3a721f7 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -1,7 +1,7 @@ -SLS Detector Package Minor Release 7.0.0 released on 25.11.2021 -=============================================================== +SLS Detector Package Minor Release 7.0.0.rc1 released on xx.11.2021 +=================================================================== -This document describes the differences between v7.0.0 and v6.x.x +This document describes the differences between v7.0.0.rc1 and v6.1.2 @@ -14,25 +14,90 @@ This document describes the differences between v7.0.0 and v6.x.x 5. Download, Documentation & Support +Breaking API Resolved Issues +============================ + + Client + ------ + + . [Eiger] Number of UDP interfaces + Command line: numinterfaces, API: getNumberofUDPInterfaces + This command now reflects the actual number of udp interfaces for Eiger, + which is 2. + + . [Moench] Patsetbit and patsetmask + Command line: patsetbit API: getPatternBitMask/ setPatternBitMask + Command line: patmask API: getPatternMask/ setPatternMask + + Exchanging the help and masks for patsetbit and patsetmask in the detector + server, especially in loading settings. -1. New or Changed Features + . [Eiger] Datastream only for 10GbE + Command line: datastream, API: getDataStream/ setDataStream + + This command to enable/ disable data stream from left or right port + is now allowed only for 10GbE. + + + Python + ------- + + . Python sub-microsecond resolution + Reading back sub-microsecond exposure times from the Python API fixed by + addig Python datetime supports only micro seconds as lowest unit. + + This is fixed by introducing a new C++ type (DurationWrapper), which + holds number of nanoseconds as a uint64_t (only in python bindings) and + custom typecaster to convert to and from std::chrono::nanoseconds. + + A get using API now returns in DurationWrapper, instead of datetime. + Refer exptime help for examples. + + + Receiver + -------- + + . Arping for 10GbE + Command line: rx_arping API: getRxArping/ setRxArping + Starts a thread in the receiver to arping the interface it is listening + to in 10GbE mode every 60 s. + + Changes NUM_RX_THREAD_IDS (sls_detector_defs.h) from 8 to 9. + + +1. Other New or Changed Features ========================== -- Fixed minor warnings (will fix commandline print of excess packets for missing packets) -- ctb slow adcs and any other adcs (other than temp) goes to the control Server -- number of udp interfaces is 2 for Eiger (CHANGE IN API??) -- added module id for virtual servers into the udp header -- refactoring (rxr) -- fixed patsetbit and patsetmask for moench -- changed default vref of adc9257 to 2V for moench (from 1.33V) -- moench and ctb - can set the starting frame number of next acquisition -- mythen server kernel check incompatible (cet timezone) -- rx_arping -- rx_threadsids max is now 9 (breaking api) -- fixed datastream disabling for eiger. Its only available in 10g mode. -- m3 server crash (vthrehsold dac names were not provided) -- allow vtrim to be interpolated for Eiger settings + Client + ------ + + . [Moench][Ctb] Starting frame number + Command line: nextframenumber, API: getNextFrameNumber/ setNextFrameNumber + Added and default set up on detector server start up. + + . [Eiger] Vtr + Allow Vtrim to be interpolated for settings. + + Detector Server + --------------- + + . [Moench] ADC9257 Vref + ADC Vref voltage modified from 1.33V to 2V + + + + + Simulator + --------- + + . [Eiger][Junfrau][Gotthard2][Mythen3] Module Id + Added into udp header + + + + + - m3 setThresholdEnergy and setAllThresholdEnergy was overwriting gaincaps with settings enum - can set localhost with virtual server with minimum configuration: (hostname localhost, rx_hostname localhost, udp_dstip auto) - increases the progress according to listened index. (not processed index) @@ -131,10 +196,43 @@ This document describes the differences between v7.0.0 and v6.x.x - hardwareversion - jungfrau connected moduleid to detid_jungfrau.txt on board +- dac names for ctb? -2. Resolved Issues + +2. Other Resolved Issues ================== - - Reading back sub-microsecond exposure times from the Python API. + + + Client + ------ + + . [Ctb] ADC command goes back to control server + Slow ADCs, slow ADC temperature, get measured current and voltage values + are requested via the control server again insetad of the stop server + due to configuration and definitions in the control server. + + + Detecor Server + -------------- + + . [Mythne3] Kernel version compatibility test + Fix added to parse properly the kernel version with CET for corrected + version compatibility test. + + . [Mythen3] Server crash for setting vthrehsold + Fixed. + + + Receiver + -------- + + . refactored and fixed minor issues + - 200%in acquire + + . + + + 3. Firmware Requirements ======================== diff --git a/python/slsdet/detector.py b/python/slsdet/detector.py index 30d60f961..4c6da434c 100755 --- a/python/slsdet/detector.py +++ b/python/slsdet/detector.py @@ -466,16 +466,32 @@ class Detector(CppDetectorApi): ----- [Mythen3] sets exposure time to all gate signals in auto and trigger mode (internal gating). To specify gateIndex, use getExptime or setExptime. - :getter: always returns in seconds. To get in datetime.delta, use getExptime + :getter: always returns in seconds. To get in DurationWrapper, use getExptime Example ----------- + >>> # setting directly in seconds >>> d.exptime = 1.05 - >>> d.exptime = datetime.timedelta(minutes = 3, seconds = 1.23) + >>> + >>> # using timedelta (up to microseconds precision) + >>> from datatime import timedelta + >>> d.exptime = timedelta(seconds = 1, microseconds = 3) + >>> + >>> # using DurationWrapper to set in seconds + >>> from slsdet import DurationWrapper + >>> d.exptime = DurationWrapper(1.2) + >>> + >>> # using DurationWrapper to set in ns + >>> t = DurationWrapper() + >>> t.set_count(500) + >>> d.exptime = t + >>> + >>> # to get in seconds >>> d.exptime 181.23 + >>> >>> d.getExptime() - [datetime.timedelta(seconds=181, microseconds=230000)] + [sls::DurationWrapper(total_seconds: 1e-08 count: 10)] """ if self.type == detectorType.MYTHEN3: res = self.getExptimeForAllGates() diff --git a/slsDetectorSoftware/include/sls/Detector.h b/slsDetectorSoftware/include/sls/Detector.h index d0bb203b0..248607ca1 100644 --- a/slsDetectorSoftware/include/sls/Detector.h +++ b/slsDetectorSoftware/include/sls/Detector.h @@ -665,7 +665,7 @@ class Detector { * * * ************************************************/ - /** [Jungfrau][Gotthard2] */ + /** [Jungfrau][Gotthard2][Eiger] */ Result getNumberofUDPInterfaces(Positions pos = {}) const; /** [Jungfrau][Gotthard2] Number of udp interfaces to stream data from From aaab1e306cc4d15229cba89da423184157027af4 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Fri, 25 Nov 2022 17:06:41 +0100 Subject: [PATCH 02/24] udate --- RELEASE.txt | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/RELEASE.txt b/RELEASE.txt index 9f3a721f7..ca46be359 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -79,6 +79,8 @@ Breaking API Resolved Issues . [Eiger] Vtr Allow Vtrim to be interpolated for settings. + + Detector Server --------------- @@ -94,12 +96,16 @@ Breaking API Resolved Issues . [Eiger][Junfrau][Gotthard2][Mythen3] Module Id Added into udp header + . Minimum Configuration + One can setup with just: + hostname localhost + rx_hostname localhost + udp_dstip auto + -- m3 setThresholdEnergy and setAllThresholdEnergy was overwriting gaincaps with settings enum -- can set localhost with virtual server with minimum configuration: (hostname localhost, rx_hostname localhost, udp_dstip auto) - increases the progress according to listened index. (not processed index) - current frame index points to listened frame index (not processed index) - when in discard partial frames or empty mode, the frame number doesnt increase by 1, it increases to that number (so its faster) @@ -222,6 +228,9 @@ Breaking API Resolved Issues . [Mythen3] Server crash for setting vthrehsold Fixed. + . [Mythen3] Incorrect gaincaps + Setting threshold energy was overwriting gaincaps with settings enum. Fixed. + Receiver -------- From c472a8f54769060e04a053dfff6f469e5082133f Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Mon, 28 Nov 2022 13:52:47 +0100 Subject: [PATCH 03/24] release notes --- RELEASE.txt | 151 +++++++++++++++++++++++++++++++++------- docs/src/udpdetspec.rst | 28 ++++++-- 2 files changed, 146 insertions(+), 33 deletions(-) diff --git a/RELEASE.txt b/RELEASE.txt index ca46be359..ee71d4126 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -37,9 +37,16 @@ Breaking API Resolved Issues Command line: datastream, API: getDataStream/ setDataStream This command to enable/ disable data stream from left or right port - is now allowed only for 10GbE. + is now allowed only for 10GbE. Previously, it incorrectly allowed to do so. + . Non-blocking start + Allow non-blocking start at modular level again. + + + . [Gotthard][Gotthard2] Num modules + Only 2 modules allowed maximum in a detector shared memory. + Python ------- @@ -55,6 +62,20 @@ Breaking API Resolved Issues Refer exptime help for examples. + + Simulator + --------- + + . [Eiger] Only one executable + Only one executable for an Eiger virtual server. Master and top mode + can be provided via command line or config file to the detector server, + as well as via the client. See in Other New Features for more details. + + One can start a module using: + eigerDetectorServer_virtual # reads default config file (top master) + eigerDetectorServer_virtual -i #ignores the config file (bottom slave) + + Receiver -------- @@ -62,9 +83,28 @@ Breaking API Resolved Issues Command line: rx_arping API: getRxArping/ setRxArping Starts a thread in the receiver to arping the interface it is listening to in 10GbE mode every 60 s. - Changes NUM_RX_THREAD_IDS (sls_detector_defs.h) from 8 to 9. + . File write + File write is disabled by default. + + . Missing packets + Command line: rx_missingpackets, API: getNumMissingPackets + This now returns a signed 64 bit instead of unsigned. The negative polarity + depicts extra packets instead of missing packets and also takes care of + disabled ports. + + . Frames caught and frame index + Command line rx_framescaught, rx_frameindex, API: getFramesCaught/ getRxCurrentFrameIndex + They now return a vector for each port when there are 2 udp interfaces + in the receiver. + + . Geometry metadata + Added geometry (number of modules in each direction) to metadata in file. + + . HDF5 and Binary writer version + Changed from 6.3 to 6.4 + 1. Other New or Changed Features ========================== @@ -80,6 +120,29 @@ Breaking API Resolved Issues Allow Vtrim to be interpolated for settings. + . [Eiger][Gotthard][Gotthard2][Mythen3] Master + Command line: master, API: getMaster/ setMaster + All of them can get master mode from the client. + + Only Eiger can set a half module to master or slave from the client. + The others can set this only in a virtual server. + + Setting up on the detector or virtual server:- + [Eiger][Gotthard2][Mythen3][Gotthard] + Using command line 'master' or 'm' with argument (slave=0, master=1) + [Eiger][Gotthard] + Using config file with 'master' with argument (slave=0, master=1) + + . [Eiger] Top + Command line: top, API: getTop/ setTop + Sets the half module to top or bottom from the client. + + This can also be set up on the detector server: + Using command line 'top' or 't' with argument (top=0, bottom=1) + Using config file with 'top' with argument (top=0, bottom=1) + + + Detector Server --------------- @@ -88,7 +151,10 @@ Breaking API Resolved Issues ADC Vref voltage modified from 1.33V to 2V - + . Command line arguments + They have precedence over config files. The config files can also be + ignored by an argument from the command line, '--ignore-config' or '-i'. + Simulator --------- @@ -102,32 +168,37 @@ Breaking API Resolved Issues rx_hostname localhost udp_dstip auto + . [Eiger] + + + + Callback + -------- + + . [Gotthard2] 25um Image reconstruction for 2 modules + First module (master) interleaves with second modules(slave). First channel + of master is first channel of detector. + + Requires firmware update to reverse channels of slaves. + + Receiver + -------- + + . [Gotthard2] 25um image reconstruction in virtual HDF5 + Virtual HDF5 reconstructs complete image by interleaving first module + (master) with second module (slave). First channel of master is first + channel of detector. + + Requires firmware update to reverse channels of slaves. + -- increases the progress according to listened index. (not processed index) -- current frame index points to listened frame index (not processed index) -- when in discard partial frames or empty mode, the frame number doesnt increase by 1, it increases to that number (so its faster) -- file write disabled by default -- eiger 12 bit mode -- start non blocking acquisition at modular level -- connect master commands to api (allow set master for eiger) ---ignore-config command line -- command line argument 'master' mainly for virtual servers (also master/top for real eiger), only one virtual server for eiger, use command lines for master/top -- stop servers also check for errors at startup( in case it was running with an older version) -- hostname cmd failed when connecting to servers in update mode (ctb, moench, jungfrau, eiger) -- missingpackets signed (negative => extra packets) -- framescaught and frameindex now returns a vector for each port -- progress looks at activated or enabled ports, so progress does not stagnate -- (eiger) disable datastreaming also for virtual servers only for 10g -- missing packets also takes care of disabled ports -- added geometry to metadata -- 10g eiger nextframenumber get fixed. -- stop, able to set nextframenumber to a consistent (max + 1) for all modules if different (eiger/ctb/jungfrau/moench) - ctb: can set names for all the dacs - fpga/kernel programming, checks if drive is a special file and not a normal file -- gotthard 25 um image reconstructed in gui and virtual hdf5 (firmware updated for slave to reverse channels) + + - master binary file in json format now - fixed bug introduced in 6.0.0: hdf5 files created 1 file per frame after the initial file which had maxframesperfile - rx_roi @@ -217,6 +288,16 @@ Breaking API Resolved Issues are requested via the control server again insetad of the stop server due to configuration and definitions in the control server. + . [Eiger] Incorrect next frame number + Command line: nextframenumber, API: getNextFrameNumber/ setNextFrameNumber + Get next frame number for 10g was connected to 1g registers and gave + incorrect values. Fixed. + + . [Eiger][Jungfrau][Moench][Ctb] Stop affecting next frame number + Stopping acquisition sometimes results in different next frame numbers + for different moduels. Hence, after a stop, if the next frame numbers are + different, they are all set to their maximum value + 1. + Detecor Server -------------- @@ -231,21 +312,37 @@ Breaking API Resolved Issues . [Mythen3] Incorrect gaincaps Setting threshold energy was overwriting gaincaps with settings enum. Fixed. + . [Ctb][Moench] Hostname fail in update mode. + Fixed + + . Stop server startup errors + Stop servers now also check for errors at startup (including version + compatibility) and like the control server, it will translate to the + client when connecting to the first time (hostname command). + Receiver -------- . refactored and fixed minor issues - - 200%in acquire - - . + Fixed progress also in discard partial packaets mode and deactivated ports. + Fixed 200% progress. + + . [Eiger] Datastream command order + The order of commands to set datastream from client mattered previously. + Datastream had to be set before 10GbE enable. Order does not matter anymore. + 3. Firmware Requirements ======================== - + + + G2 Firmware update to reverse channels of slaves. + + Eiger ===== Compatible version : 08.10.2021 (v29) diff --git a/docs/src/udpdetspec.rst b/docs/src/udpdetspec.rst index de84e707b..cf9dd398e 100644 --- a/docs/src/udpdetspec.rst +++ b/docs/src/udpdetspec.rst @@ -49,13 +49,13 @@ Jungfrau +----------+--------------------+-----+----------------------------------------+ | 0 | High gain | 1 | High Gain enabled | | | +-----+----------------------------------------+ - | | | 0 | High Gain disabled | + | | | 0 | High Gain disabled | +----------+--------------------+-----+----------------------------------------+ | 1 | Fix gain stage 1 | 1 | Gain stage 1 fixed. The switch that | | | | | selects the gains stage 1 is active all| | | | | the time. | | | +-----+----------------------------------------+ - | | | 0 | Gain stage 1 unset. The switch that | + | | | 0 | Gain stage 1 unset. The switch that | | | | | selects the gains stage 1 is inactive | | | | | all the time. | +----------+--------------------+-----+----------------------------------------+ @@ -63,7 +63,7 @@ Jungfrau | | | | selects the gains stage 2 is active all| | | | | the time. | | | +-----+----------------------------------------+ - | | | 0 | Gain stage 2 unset. The switch that | + | | | 0 | Gain stage 2 unset. The switch that | | | | | selects the gains stage 2 is inactive | | | | | all the time. | +----------+--------------------+-----+----------------------------------------+ @@ -71,7 +71,7 @@ Jungfrau | | | | Dynamic-gain switching is therefore | | | | | disabled. | | | +-----+----------------------------------------+ - | | | 0 | On-chip comparator active. | + | | | 0 | On-chip comparator active. | +----------+--------------------+-----+-----+-----+----------------------------+ | 7-5 | Jungfrau chip |Bit 7|Bit 6|Bit 5| Description | | | version +-----+-----+-----+----------------------------+ @@ -90,7 +90,7 @@ Jungfrau | 12 | Force switching | 1 | Forced switching to gain stage 1 at the| | | to gain stage 1 | | start of the exposure period. | | | +-----+----------------------------------------+ - | | | 0 | Disabled forced gain switching to gain | + | | | 0 | Disabled forced gain switching to gain | | | | | stage 1. Dynamic gain switching | | | | | conditions apply. | +----------+--------------------+-----+----------------------------------------+ @@ -109,7 +109,7 @@ Jungfrau | 31 | External input flag| 1 | External input flag detected in the | | | | | last exposure. | | | +-----+----------------------------------------+ - | | | 0 | External input flag not detected in the| + | | | 0 | External input flag not detected in the| | | | | last exposure. | +----------+--------------------+-----+----------------------------------------+ @@ -131,6 +131,22 @@ Gotthard2 +----------+------------------------------+ +Mythen3 +---------- + +.. table:: Detector Specific Field + + +----------+------------------------------+ + | detSpec1 | 0 | + +----------+------------------------------+ + | detSpec2 | 0 | + +----------+------------------------------+ + | detSpec3 | 0 | + +----------+------------------------------+ + | detSpec4 | 0 | + +----------+------------------------------+ + + .. [#] **Bunch Id**: bunch identification number received by the detector at the moment of frame acquisition. .. [#] **Train Id**: train identification number received by the detector at the moment of frame acquisition. .. [#] **Bunch Id**: bunch identification number to identify every single exposure during a burst acquisition. From 44d9294270d579f18514a9cb530d524504ae9f99 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Mon, 28 Nov 2022 16:24:56 +0100 Subject: [PATCH 04/24] release notes --- RELEASE.txt | 102 +++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 90 insertions(+), 12 deletions(-) diff --git a/RELEASE.txt b/RELEASE.txt index ee71d4126..bad2422c4 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -47,6 +47,8 @@ Breaking API Resolved Issues . [Gotthard][Gotthard2] Num modules Only 2 modules allowed maximum in a detector shared memory. + . CopyDetectorServer + Python ------- @@ -62,6 +64,12 @@ Breaking API Resolved Issues Refer exptime help for examples. + Detector Server + --------------- + + . Deprecated CopyDetectorServer + Command line: copydetectorserver, API: copydetectorserver + Removed. Use updatedetectorserver Simulator --------- @@ -106,6 +114,33 @@ Breaking API Resolved Issues Changed from 6.3 to 6.4 + . Master file format to json + The format has been changed from ASCII to json. + + . Master file created at end of acquisition + The file is now written at the end of acquisition. So if any metadata + is changed during an acquisition, it will reflect the last value. + + + Callback + -------- + + . Datatype of Metadata [registerCallBackRawDataReady, registerCallBackRawDataModifyReady] + Datatype changed from char* to sls_receiver_header*. + + + . Datatype of Size [registerCallBackRawDataReady, registerCallBackRawDataModifyReady] + Datatype changed from uint32_t to size_t + + . Datatype of file name and file path [registerCallBackStartAcquisition] + Datatype changed from string to const string reference. + + . Incorrect image size [registerCallBackStartAcquisition] + Fixed. It used to give +120 bytes. + + + + 1. Other New or Changed Features ========================== @@ -142,6 +177,27 @@ Breaking API Resolved Issues Using config file with 'top' with argument (top=0, bottom=1) + . [Ctb] DAC names + Command line: daclist, API: getDacNames/ setDacNames + Can set and get dac names in the dac list now. + + + . [Mythen3] Polarity, interpolation, pump probe, analog pulsing, digital pulsing + Command line: polarity, interpolation, pumpprobe, apulse, dpulse + API: getPolarity/ setPolarity, getInterpolation/ setInterpolation, + getPumpProbe/ setPumpProbe, getAnalogPulsing/ setAnalogPulsing, + getDigitalPulsing/ setDigitalPulsing + + Added these commands. Enabling interpolation will also enable all counters. + + + Compilation + ----------- + + . Option to provide a custom location to look for ZeroMQ, if not found + using FindZeroMQ.cmake + -DZeroMQ_HINT=/usr/lib64 to use the system installed zmq + Detector Server @@ -155,6 +211,26 @@ Breaking API Resolved Issues They have precedence over config files. The config files can also be ignored by an argument from the command line, '--ignore-config' or '-i'. + . [Jungfrau][Moench][Ctb] Additional programming checks + Also checks if the drive to write to is a special file or a normal + file. If its a normal file, it throws asking to redo the command with a + '--please-delete' argument to delete the normal file and create the device + drive and restart FPGA programming. + + More readable error message insetad of "programfpga not implemented for + this detector'. This happens when 'hostname' command fails due to + server-firmware/client compatibility and the detector type becomes + 'GENERIC'. Fixed to suggest if 'hostname' executed properly. + + . [Jungfrau][Moench][Ctb] Additional server update process + Removes old server binary or target of linked file when updating + detector server for blackfin detectors as there is less space on blackfin. + + Clearing up absolute and respawn path (removing double '/') + + Raise error if server name to be copied is the same as final soft link name. + + Simulator --------- @@ -194,21 +270,11 @@ Breaking API Resolved Issues - -- ctb: can set names for all the dacs -- fpga/kernel programming, checks if drive is a special file and not a normal file +- adding LTO to test and disable them for Debug builds? +- support external build of python lib -- master binary file in json format now -- fixed bug introduced in 6.0.0: hdf5 files created 1 file per frame after the initial file which had maxframesperfile - rx_roi -- m3 polarity, interpolation (enables all counters when enabled), pump probe, analog pulsing, digital pulsing -- updatedetectorserver - removes old server current binary pointing to for blackfin -- removing copydetectorserver using tftp -- registerCallBackRawDataReady and registerCallBackRawDataModifyReady now gives a sls_receiver_header* instead of a char*, and uint32_t to size_t -- registerCallBackStartAcquisition gave incorrect imagesize (+120 bytes). corrected. -- registerCallBackStartAcquisition parameter is a const string reference -- m3 (runnig config second time with tengiga 0, dr !=32, counters !=0x7) calculated incorrect image size expected - fixed row column indexing (mainly for multi module Jungfrau 2 interfaces ) - eiger gui row indices not flipped anymore (fix in config) - m3 (settings dac check disabled temporarily?) @@ -298,6 +364,8 @@ Breaking API Resolved Issues for different moduels. Hence, after a stop, if the next frame numbers are different, they are all set to their maximum value + 1. + . [Mythen3] Incorrect gain caps when setting threshold energy + Gain caps overwritten with settings enum. Fixed. Detecor Server -------------- @@ -334,6 +402,16 @@ Breaking API Resolved Issues The order of commands to set datastream from client mattered previously. Datastream had to be set before 10GbE enable. Order does not matter anymore. + . Multiple files + This bug was introduced in v6.0.0, where 1 file was created per frame + after the first file. Fixed by resetting the number of frames in + current file when creating a new one. + + . [Mythen3] Incorrect number of packets calculated or tengiga not set up + Runnig config second time (with tengiga=0, dr !=32, counters !=0x7) + calculated incorrect image size expected due to inconsistent copy of + detector parameters. Fixed + 3. Firmware Requirements From a42ef3b591afab69266baf93c4b9b078b0ae4d2a Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Mon, 28 Nov 2022 16:25:22 +0100 Subject: [PATCH 05/24] release notes --- RELEASE.txt | 141 ++++++++++++++++++++++++++-------------------------- 1 file changed, 71 insertions(+), 70 deletions(-) diff --git a/RELEASE.txt b/RELEASE.txt index bad2422c4..466a6c298 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -270,6 +270,77 @@ Breaking API Resolved Issues +2. Other Resolved Issues +================== + + + Client + ------ + + . [Ctb] ADC command goes back to control server + Slow ADCs, slow ADC temperature, get measured current and voltage values + are requested via the control server again insetad of the stop server + due to configuration and definitions in the control server. + + . [Eiger] Incorrect next frame number + Command line: nextframenumber, API: getNextFrameNumber/ setNextFrameNumber + Get next frame number for 10g was connected to 1g registers and gave + incorrect values. Fixed. + + . [Eiger][Jungfrau][Moench][Ctb] Stop affecting next frame number + Stopping acquisition sometimes results in different next frame numbers + for different moduels. Hence, after a stop, if the next frame numbers are + different, they are all set to their maximum value + 1. + + . [Mythen3] Incorrect gain caps when setting threshold energy + Gain caps overwritten with settings enum. Fixed. + + Detecor Server + -------------- + + . [Mythne3] Kernel version compatibility test + Fix added to parse properly the kernel version with CET for corrected + version compatibility test. + + . [Mythen3] Server crash for setting vthrehsold + Fixed. + + . [Mythen3] Incorrect gaincaps + Setting threshold energy was overwriting gaincaps with settings enum. Fixed. + + . [Ctb][Moench] Hostname fail in update mode. + Fixed + + . Stop server startup errors + Stop servers now also check for errors at startup (including version + compatibility) and like the control server, it will translate to the + client when connecting to the first time (hostname command). + + + Receiver + -------- + + . refactored and fixed minor issues + Fixed progress also in discard partial packaets mode and deactivated ports. + Fixed 200% progress. + + + + . [Eiger] Datastream command order + The order of commands to set datastream from client mattered previously. + Datastream had to be set before 10GbE enable. Order does not matter anymore. + + . Multiple files + This bug was introduced in v6.0.0, where 1 file was created per frame + after the first file. Fixed by resetting the number of frames in + current file when creating a new one. + + . [Mythen3] Incorrect number of packets calculated or tengiga not set up + Runnig config second time (with tengiga=0, dr !=32, counters !=0x7) + calculated incorrect image size expected due to inconsistent copy of + detector parameters. Fixed + + - adding LTO to test and disable them for Debug builds? - support external build of python lib @@ -342,76 +413,6 @@ Breaking API Resolved Issues - dac names for ctb? -2. Other Resolved Issues -================== - - - Client - ------ - - . [Ctb] ADC command goes back to control server - Slow ADCs, slow ADC temperature, get measured current and voltage values - are requested via the control server again insetad of the stop server - due to configuration and definitions in the control server. - - . [Eiger] Incorrect next frame number - Command line: nextframenumber, API: getNextFrameNumber/ setNextFrameNumber - Get next frame number for 10g was connected to 1g registers and gave - incorrect values. Fixed. - - . [Eiger][Jungfrau][Moench][Ctb] Stop affecting next frame number - Stopping acquisition sometimes results in different next frame numbers - for different moduels. Hence, after a stop, if the next frame numbers are - different, they are all set to their maximum value + 1. - - . [Mythen3] Incorrect gain caps when setting threshold energy - Gain caps overwritten with settings enum. Fixed. - - Detecor Server - -------------- - - . [Mythne3] Kernel version compatibility test - Fix added to parse properly the kernel version with CET for corrected - version compatibility test. - - . [Mythen3] Server crash for setting vthrehsold - Fixed. - - . [Mythen3] Incorrect gaincaps - Setting threshold energy was overwriting gaincaps with settings enum. Fixed. - - . [Ctb][Moench] Hostname fail in update mode. - Fixed - - . Stop server startup errors - Stop servers now also check for errors at startup (including version - compatibility) and like the control server, it will translate to the - client when connecting to the first time (hostname command). - - - Receiver - -------- - - . refactored and fixed minor issues - Fixed progress also in discard partial packaets mode and deactivated ports. - Fixed 200% progress. - - - - . [Eiger] Datastream command order - The order of commands to set datastream from client mattered previously. - Datastream had to be set before 10GbE enable. Order does not matter anymore. - - . Multiple files - This bug was introduced in v6.0.0, where 1 file was created per frame - after the first file. Fixed by resetting the number of frames in - current file when creating a new one. - - . [Mythen3] Incorrect number of packets calculated or tengiga not set up - Runnig config second time (with tengiga=0, dr !=32, counters !=0x7) - calculated incorrect image size expected due to inconsistent copy of - detector parameters. Fixed - 3. Firmware Requirements From 843edfbf06667eac060b6feedb4719538ea93fa0 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Tue, 29 Nov 2022 16:12:43 +0100 Subject: [PATCH 06/24] release notes --- RELEASE.txt | 701 ++++++++++++++++++++--------- slsDetectorSoftware/src/CmdProxy.h | 2 +- 2 files changed, 482 insertions(+), 221 deletions(-) diff --git a/RELEASE.txt b/RELEASE.txt index 466a6c298..f612f63e8 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -14,139 +14,46 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2 5. Download, Documentation & Support -Breaking API Resolved Issues -============================ + + +1. New or Changed Features +========================== Client ------ + . Versioning + The client, receiver and detector servers now have semantic Versioning + along with the date and are managed with the Version class. + + --version argument to the executable gives the complete versioning with date. + + Using the client to get versions gives only the semantic version. An older + server will still give date. Hence, the return type is a string. + + Compatibility checks at hostname or rx_hostname command will only be for + backwards compatibility (ie. it only checks for the major version number). + If its an old server, then its expected to have the exact same date (as + before) + + Setting intitialchecks to 0 also bypasses the receiver compatibility check. + + + . Detector Specific fields + bunchid ->detSpec1 + reserved->detSpec2 + debug->detSpec3 + roundRnumber->detSpec4 + + Further details about each detector specific field can be found at: + https://slsdetectorgroup.github.io/devdoc/udpdetspec.html + + . [Eiger] Number of UDP interfaces Command line: numinterfaces, API: getNumberofUDPInterfaces This command now reflects the actual number of udp interfaces for Eiger, which is 2. - . [Moench] Patsetbit and patsetmask - Command line: patsetbit API: getPatternBitMask/ setPatternBitMask - Command line: patmask API: getPatternMask/ setPatternMask - - Exchanging the help and masks for patsetbit and patsetmask in the detector - server, especially in loading settings. - - - . [Eiger] Datastream only for 10GbE - Command line: datastream, API: getDataStream/ setDataStream - - This command to enable/ disable data stream from left or right port - is now allowed only for 10GbE. Previously, it incorrectly allowed to do so. - - - . Non-blocking start - Allow non-blocking start at modular level again. - - - . [Gotthard][Gotthard2] Num modules - Only 2 modules allowed maximum in a detector shared memory. - - . CopyDetectorServer - - Python - ------- - - . Python sub-microsecond resolution - Reading back sub-microsecond exposure times from the Python API fixed by - addig Python datetime supports only micro seconds as lowest unit. - - This is fixed by introducing a new C++ type (DurationWrapper), which - holds number of nanoseconds as a uint64_t (only in python bindings) and - custom typecaster to convert to and from std::chrono::nanoseconds. - - A get using API now returns in DurationWrapper, instead of datetime. - Refer exptime help for examples. - - - Detector Server - --------------- - - . Deprecated CopyDetectorServer - Command line: copydetectorserver, API: copydetectorserver - Removed. Use updatedetectorserver - - Simulator - --------- - - . [Eiger] Only one executable - Only one executable for an Eiger virtual server. Master and top mode - can be provided via command line or config file to the detector server, - as well as via the client. See in Other New Features for more details. - - One can start a module using: - eigerDetectorServer_virtual # reads default config file (top master) - eigerDetectorServer_virtual -i #ignores the config file (bottom slave) - - - Receiver - -------- - - . Arping for 10GbE - Command line: rx_arping API: getRxArping/ setRxArping - Starts a thread in the receiver to arping the interface it is listening - to in 10GbE mode every 60 s. - Changes NUM_RX_THREAD_IDS (sls_detector_defs.h) from 8 to 9. - - . File write - File write is disabled by default. - - . Missing packets - Command line: rx_missingpackets, API: getNumMissingPackets - This now returns a signed 64 bit instead of unsigned. The negative polarity - depicts extra packets instead of missing packets and also takes care of - disabled ports. - - . Frames caught and frame index - Command line rx_framescaught, rx_frameindex, API: getFramesCaught/ getRxCurrentFrameIndex - They now return a vector for each port when there are 2 udp interfaces - in the receiver. - - . Geometry metadata - Added geometry (number of modules in each direction) to metadata in file. - - . HDF5 and Binary writer version - Changed from 6.3 to 6.4 - - - . Master file format to json - The format has been changed from ASCII to json. - - . Master file created at end of acquisition - The file is now written at the end of acquisition. So if any metadata - is changed during an acquisition, it will reflect the last value. - - - Callback - -------- - - . Datatype of Metadata [registerCallBackRawDataReady, registerCallBackRawDataModifyReady] - Datatype changed from char* to sls_receiver_header*. - - - . Datatype of Size [registerCallBackRawDataReady, registerCallBackRawDataModifyReady] - Datatype changed from uint32_t to size_t - - . Datatype of file name and file path [registerCallBackStartAcquisition] - Datatype changed from string to const string reference. - - . Incorrect image size [registerCallBackStartAcquisition] - Fixed. It used to give +120 bytes. - - - - -1. Other New or Changed Features -========================== - - Client - ------ - . [Moench][Ctb] Starting frame number Command line: nextframenumber, API: getNextFrameNumber/ setNextFrameNumber Added and default set up on detector server start up. @@ -154,18 +61,22 @@ Breaking API Resolved Issues . [Eiger] Vtr Allow Vtrim to be interpolated for settings. + . Namespace sls + All files in slsSupportLib and tests have now been moved to sls namespace + including macros. Using the LOG, for example, will require the sls qualifier. - . [Eiger][Gotthard][Gotthard2][Mythen3] Master + + . [Eiger][Gotthard][Gotthard2][Mythen3][Jungfrau] Master + + Setting up from client: + [Eiger][Gotthard2][Jungfrau] Command line: master, API: getMaster/ setMaster All of them can get master mode from the client. - Only Eiger can set a half module to master or slave from the client. - The others can set this only in a virtual server. - - Setting up on the detector or virtual server:- - [Eiger][Gotthard2][Mythen3][Gotthard] + Setting up on the detector or virtual server: + [Eiger][Gotthard2 Virtual][Mythen3 Virtual][Gotthard Virtual] Using command line 'master' or 'm' with argument (slave=0, master=1) - [Eiger][Gotthard] + [Eiger][Gotthard2][Gotthard] Using config file with 'master' with argument (slave=0, master=1) . [Eiger] Top @@ -188,17 +99,236 @@ Breaking API Resolved Issues getPumpProbe/ setPumpProbe, getAnalogPulsing/ setAnalogPulsing, getDigitalPulsing/ setDigitalPulsing - Added these commands. Enabling interpolation will also enable all counters. + Added these commands. + + Enabling interpolation will also enable all counters and disable vth3. + Disabling sets to previous counter mask and previous vth values. + + In pump probe mode, only vth2 enabled. Disabling sets vth2 to prevevious + value. + + Setting counter mask will check interpolation and pump probe mode + requirements, else sets vthx dacs according to counter mask. + + Direct overwrite of any dac (including vthx) allowed using dac command + (as before). + . [Mythen3][Eiger] Save settings file + Command line: trimbits (sls_detector_get), API: saveTrimbits + Added + + . [Mythen3] Threshold + When settings trimbits or threshold, counter mask is set and hence, + vthx dacs are set accordingly. + + setAllThresholdEnergy takes 3 values for each counter and if one of them + is -1, the trimbits and setings for that counter is picked up from the + detector. + + . Udp Source IP + Command line: udp_srcip(2), API: getSourceUDPIP(2)/ setSourceUDPIP(2) + One can also set this to 'auto' for 1 GbE data. It will set to IP of + rx_hostname (as in udp_dstip) + + + . Storage cells in running receiver + Allowing the possibility to set this when receiver in running state. + + . [Gotthard2] Adapt to new HDI version + HDI module ID written to FPGA register + + . [Gotthard2] Parallel readout added + Command line: parallel, API: getParallelMode/ setParallelMode + Default for Gotthard2 is parallel. Non parallel mode only works in + continuous mode. + + . [Jungfrau] Software trigger added + Command line: trigger, API: sendSoftwareTrigger + Send software trigger instead of harware trigger. + + . [Eiger][Jungfrau] Blocking trigger + Commandline: blockingtrigger, API: sendSoftwareTrigger with argument true + Sends software trigger signal to detector and blocks until the frames + are sent out for that trigger. + + . [Jungfrau] Sync + Command line: sync, API: getSynchronization/ setSynchronization + Enables or disables synchronization between modules + + . [Moench][Ctb][Mythen3] Deprecated commands + Patloopx, patnloopx, patwaitx, patwaittimex + Please use instead patloop, patnloop, patwait and patwaittime commands + with the level as an argument. + + Old commands work with warning, but the server expects the new ones + such as a default pattern file to be loaded at startup for Moench. + + Renamed patternParameters struct member from 'loop' to 'startloop' and + 'stoploop'. + + + . [Moench][Ctb] Pattern levels + Changed from 3 to 6. + + . [Mythen3][Moench][Ctb] Default patwait and patloop addresses + Set default wait and loop addresses to 0x1fff (max value) for all levels + before loading pattern. Please use the pattern command instead of parameters. + This ensures defaults are set up and is faster. + + . [Mythen3] Bad channels + Command line: badchannels, API: getBadChannels/ setBadChannels + Set bad channels from file with a list of channels, which will be masked + out. Also does trimming. A detector level command will require the channel + numbers accordingly. The file also extended to include commas, colons range) + and removes duplicates. + + . Incrementing default receiver tcp port + Automatically incrementing the default receiver tcp port for every module + when creating shared memory. + + . [Gotthard2][Mythen3] Temperature readout + Command line: temp_fpga, API: getTemperature with TEMPERATURE_FPGA enum + Added + + . [Gotthard2][Mythen3] Round robin added + Command line: udp_dstlist, API: getDestinationUDPList/ setDestinationUDPList + Command line: udp_numdst, API: getNumberofUDPDestinations + One can set up to 32 (64 for Mythen3) entries in the destination list. + + . [Jungfrau] Module Id + Command line: moduleid, API: getModuleId + 16 bit value (ideally unique) that is streamed out in the udp header of + the detector. The on-board detector server picks it up from a file + (if it exists) called detid_jungfrau.txt. + + . [Jungfrau][[Gotthard2][Myhten3][Gotthard][Ctb][Moench] Hardware version + Command line: hardwareversion, API: getHardwareVersion + Gets the board or hardware version. + For example, Jungfrau returns 1.0 or 2.0. + It is also printed at on-board detector server start up. + Also printed before starting FPGA programming. + + + . [Eiger][Jugfrau][Mythen3] Transmission Delay + Command line: tx_delay, API: getTransmissionDelay/ setTransmissionDelay + Sets transmission delay for all modules in the detector using the step + size provided. Sets up for every module: + [Eiger] txdelay_left to (2 * mod_index * n_delay) + [Eiger] txdelay_right to ((2 * mod_index + 1) * n_delay) + [Eiger] txdelay_frame to (2 *num_modules * n_delay) + [Jungfrau][Mythen3] txdelay_frame to (num_modules * n_delay) + + . [Eiger][Jugfrau][Mythen3] Deprecated specific transmission delay commands + txndelay_frame -> txdelay_frame + txndelay_left -> txdelay_left + txndelay_right -> txdelay_right + + . Catch updated to latest 2.x version due to build failure in fedora + + . [Moench][Ctb] ADC Vpp + Command line: adcvpp, API: getADCVpp/ setADCVpp + Moved from SetDAC function into into its own. One can use mV values or + option numbers as before. + + . [Mythen3] Clock Divider 4 and 5 + Cannot be set anymore. Only read back. + + + . Deprecated CopyDetectorServer + Command line: copydetectorserver, API: copydetectorserver + Removed. Use updatedetectorserver + + . [Jungfrau][Moench][Ctb] Additional programming checks + Also checks if the drive to write to is a special file or a normal + file. If its a normal file, it throws asking to redo the command with a + '--please-delete' argument to delete the normal file and create the device + drive and restart FPGA programming. + + More readable error message insetad of "programfpga not implemented for + this detector'. This happens when 'hostname' command fails due to + server-firmware/client compatibility and the detector type becomes + 'GENERIC'. Fixed to suggest if 'hostname' executed properly. + + + + . Arping for 10GbE + Command line: rx_arping API: getRxArping/ setRxArping + Starts a thread in the receiver to arping the interface it is listening + to in 10GbE mode every 60 s. + Changes NUM_RX_THREAD_IDS (sls_detector_defs.h) from 8 to 9. + + + . Receiver Region of Interest + Command line: rx_roi, API: getRxROI/ setRxROI + Command line: rx_clearroi, API: clearRxROI + One can set an ROI in the receiver to write to file. 1D detectors can set + xmin and xmax, whereas the 2D can also set ymin and ymax. -1 values signify + no ROI. + + This is not at network level and can only be used to reduce size of file. + Virtual HDF5 files not created when this is enabled and also no link in + master file. No file created if module not in ROI. + + There can only be one ROI per detector. Therefore, can be set only at + detector level, but can be retrieved at module level as well. + + The GUI still shows the entire image, but has a yellow border around the + ROI. Status bar displays a message when Rx ROI enabled. + + + . Missing packets + Command line: rx_missingpackets, API: getNumMissingPackets + This now returns a signed 64 bit instead of unsigned. The negative polarity + depicts extra packets instead of missing packets and also takes care of + disabled ports. + + . Frames caught and frame index + Command line rx_framescaught, rx_frameindex, API: getFramesCaught/ getRxCurrentFrameIndex + They now return a vector for each port when there are 2 udp interfaces + in the receiver. + + + Python + ------ + + . Defines in sls_detector_defs + sls_detetor_defs parsed and #defines extracted into defines.py + For exmaple, one can use slsdet.LOCALHOST_IP + + + . Pybind11 (v2.10.0) + Pybind11 is removed as a submodule and instead built into package to + simplify for users. Now, there is no more need to clone with the '--recursive' + argument or to update submodule when switching to this package version + and above. + + . Conda packages + Removed conda packages for python 3.6 and 3.7. Added for python 3.11. + + + Compilation ----------- - . Option to provide a custom location to look for ZeroMQ, if not found + . Custom location to find ZeroMQ + Option to provide a custom location to look for ZeroMQ, if not found using FindZeroMQ.cmake - -DZeroMQ_HINT=/usr/lib64 to use the system installed zmq + + For example, to use the system installed zmq: + Using cmake: -DZeroMQ_HINT=/usr/lib64 + Using cmk.sh script: -q /usr/lib64 + . Support external build + Assuming already installed version of the slsDetectorPacakge exists, + external build of python bindings, gui, ctbgui and moench has been added. + + . Install python extension + Option to copy the python extension (slsdet folder and _slsdet-..so) + to CMAKE_INSTALL_PREFIX/python using + -DSLS_INSTALL_PYTHONEXT + Detector Server --------------- @@ -211,16 +341,7 @@ Breaking API Resolved Issues They have precedence over config files. The config files can also be ignored by an argument from the command line, '--ignore-config' or '-i'. - . [Jungfrau][Moench][Ctb] Additional programming checks - Also checks if the drive to write to is a special file or a normal - file. If its a normal file, it throws asking to redo the command with a - '--please-delete' argument to delete the normal file and create the device - drive and restart FPGA programming. - More readable error message insetad of "programfpga not implemented for - this detector'. This happens when 'hostname' command fails due to - server-firmware/client compatibility and the detector type becomes - 'GENERIC'. Fixed to suggest if 'hostname' executed properly. . [Jungfrau][Moench][Ctb] Additional server update process Removes old server binary or target of linked file when updating @@ -231,6 +352,30 @@ Breaking API Resolved Issues Raise error if server name to be copied is the same as final soft link name. + . [Mythen3] DAC check for settings + Verify DAC values for each setting has been temporarily switched off + + . [Mythen3] DAC min and max values + Vtrim minimum of 600 has been removed. + The threshold dacs minimum is 200 and maximum is 2400. + The other DACs minimum is 0 and maximum is 2800. + When out of range, will not throw, just a warning. + + . [Mythen3] Vicin Dac changed to 800 + + + . [Gotthard2] Clock Divider defaults + When chancing burst mode, clock dividers (2, 3 and 4) set to their + defaults according to burst mode. + + . [Moench][Ctb] 1 GbE Non blocking acquisition + Previously non blocking acquisition in 1 GbE would not send data. + This feature added now. + + + . [Jungfrau][Moench][Ctb] PLL reset at server start up + PLL reset now at server start up. + Simulator --------- @@ -244,9 +389,14 @@ Breaking API Resolved Issues rx_hostname localhost udp_dstip auto - . [Eiger] - + . [Eiger] Only one executable + Only one executable for an Eiger virtual server. Master and top mode + can be provided via command line or config file to the detector server, + as well as via the client. See in Other New Features for more details. + One can start a module using: + eigerDetectorServer_virtual # reads default config file (top master) + eigerDetectorServer_virtual -i #ignores the config file (bottom slave) Callback -------- @@ -257,10 +407,26 @@ Breaking API Resolved Issues Requires firmware update to reverse channels of slaves. + . Datatype of Metadata [registerCallBackRawDataReady, registerCallBackRawDataModifyReady] + Datatype changed from char* to sls_receiver_header. + + . Datatype of Size [registerCallBackRawDataReady, registerCallBackRawDataModifyReady] + Datatype changed from uint32_t to size_t + + . Datatype of file name and file path [registerCallBackStartAcquisition] + Datatype changed from string to const string reference. + + . Incorrect image size [registerCallBackStartAcquisition] + Fixed. It used to give +120 bytes. Receiver -------- + + . File write + File write is disabled by default. + + . [Gotthard2] 25um image reconstruction in virtual HDF5 Virtual HDF5 reconstructs complete image by interleaving first module (master) with second module (slave). First channel of master is first @@ -268,9 +434,54 @@ Breaking API Resolved Issues Requires firmware update to reverse channels of slaves. + . File name prefix + Slash '/' not allowed. + + . Memory size + Increased an internal fifo header by 8 bytes to align memory allocated for + to receive images. + + . Geometry metadata + Added geometry (number of modules in each direction) to metadata in file. + + . HDF5 and Binary writer version + Changed from 6.3 to 6.4 -2. Other Resolved Issues + . Master file format to json + The format has been changed from ASCII to json. + + . Master file created at end of acquisition + The file is now written at the end of acquisition. So if any metadata + is changed during an acquisition, it will reflect the last value. + + . Namespace sls + All the receiver source files have also been added to namespace sls. + + . HDF5 Dataset name + Changed to just "data" to simplify for user + + Gui + --- + + . [Jungfrau][Eiger] Gap pixels + Enabled by default in the gui. + + . High voltage moved from Developer tab to Settings tab. + + . Gain plot zooming + Zooming disabled. Instead, it automatically zooms in when you zoom in + the main plot or if min and max of x and y axis set up in plot tab. + + + . Qt5 and in-built compressed Qwt 6.1.5 + Ported from Qt4 to Qt5. + Compressed Qwt 6.1.5 added into the package in libs. It is unpacked and built + as a static library.This allows us to remove qwt as an external dependency + and reduces the risk of picking up the wrong version. + + +2. Resolved Issues ================== @@ -295,6 +506,42 @@ Breaking API Resolved Issues . [Mythen3] Incorrect gain caps when setting threshold energy Gain caps overwritten with settings enum. Fixed. + . [Mythen3] Non blocking start acquisition + Non-blocking start acquisition was sent out twice to the master. Fixed. + + . Free and config command fail + Free and config command checked mismatch of size of shared memory before + freeing or loading new config. Fixed. + + . sls_detector_help or sls_detector_get -h + Should not create Detector object. Fixed. + + + . [Moench] Patsetbit and patsetmask + Command line: patsetbit API: getPatternBitMask/ setPatternBitMask + Command line: patmask API: getPatternMask/ setPatternMask + + Exchanging the help and masks for patsetbit and patsetmask in the detector + server, especially in loading settings. + + + . [Eiger] Datastream only for 10GbE + Command line: datastream, API: getDataStream/ setDataStream + + This command to enable/ disable data stream from left or right port + is now allowed only for 10GbE. Previously, it incorrectly allowed to do so. + + + . Non-blocking start + Allow non-blocking start at modular level again. + + + . [Gotthard][Gotthard2] Num modules + Only 2 modules allowed maximum in a detector shared memory. + + + + Detecor Server -------------- @@ -314,18 +561,58 @@ Breaking API Resolved Issues . Stop server startup errors Stop servers now also check for errors at startup (including version compatibility) and like the control server, it will translate to the - client when connecting to the first time (hostname command). + client when connecting for the first time (hostname command). + + . [Mythen3][Gotthard2] System clock change effects + When changing the system clock (clkdiv 2), time settings should also be + affected (exptime, period etc.). Fixed. + + [Gotthard2] System frequency should be same irrespective of timing source. + Fixed. + + . [Jungfrau][Eiger] Clear UDP destination + Command line: udp_cleardst, API: clearUDPDestinations + Clearing udp destination also clears it in the FPGA now. + + + . [Jungfrau] Temporary fix for stop in 6.1.1 + Temporary fix introduced in 6.1.1 for not being able to start after a + stop command has been issued is removed. Reset core right after also has + been removed. It has been fixed in firmware instead. + + . [Ctb] Allow all clock dividers for PLL + Fixed. For example, 133 MHz would not really be set previously. Fixed by + changing totaldiv from float to an integer. + + . [Eiger][Jungfrau] Row column + [Jungfrau] Fixed row column indexing for multi module 2 interfaces + + + [Eiger] The row indicies were switched across the Y axis for the callback + only for Eiger. This is now changed and kept similar to the other detectors. + The row indices would be in the order of the half modules in the hostname + command. Therefore, to keep the image from callback, invert the hostname + order in the config file. + + Simulator + --------- + + . [Mythen3] Packet size + Fixed packet size calculation. Previously, sending only header with no data. + Receiver -------- - . refactored and fixed minor issues + . Refactored and fixed minor issues + Including memory structure and udp sockets. Fixed progress also in discard partial packaets mode and deactivated ports. Fixed 200% progress. - - - + Completely padded images now have detector type or version in metadata. + Fixed getting stuck at stop receiver when using zmq + Fixed clang compiler warnings + . [Eiger] Datastream command order The order of commands to set datastream from client mattered previously. Datastream had to be set before 10GbE enable. Order does not matter anymore. @@ -340,77 +627,51 @@ Breaking API Resolved Issues calculated incorrect image size expected due to inconsistent copy of detector parameters. Fixed + . Storage cells in receiver + Previously not updated in receiver. Fixed. + + . Virtual HDF5 Parameter datasets + Corner case bug when frames caught is not a multiple of frames per file. + Not found in virtual image datasets. Fixed. + + . Stuck when using zmq + More often in 6.1.1, gets stuck at stop receiver. + + . Udp destination MAC + If it has been set before, changing udp_dstip will not update udp_dstmac. + Fixed to always set it in detector even if it had a value before. + Udp_dstmac can still be used to overwrite again. This is useful when + using a router for example. + + + Gui + --- + + . [Mythen3] Inconsistent timing mode + Timing mode of the slaves should be discarded before squashing. Fixed. + + . [Mythen3][Gotthard2] Crashes + Additional locking Added + + + Python + ------- + + . Python sub-microsecond resolution + Reading back sub-microsecond exposure times from the Python API fixed by + addig Python datetime supports only micro seconds as lowest unit. + + This is fixed by introducing a new C++ type (DurationWrapper), which + holds number of nanoseconds as a uint64_t (only in python bindings) and + custom typecaster to convert to and from std::chrono::nanoseconds. + + A get using API now returns in DurationWrapper, instead of datetime. + Refer exptime help for examples. + + - adding LTO to test and disable them for Debug builds? -- support external build of python lib - - -- rx_roi -- fixed row column indexing (mainly for multi module Jungfrau 2 interfaces ) -- eiger gui row indices not flipped anymore (fix in config) -- m3 (settings dac check disabled temporarily?) -- m3 virtual server sends the right pacets now -- gap pixels in gui enabled by default -- rxr src files and classes (detectordata, ZmqSocket, helpDacs) added to sls namespace, and macros (namely from logger (logINFO etc)), slsDetectorGui (make_unique in implemtnation requires sls nemspace (points to std otherwise) but not deectorImpl.cpp) -- blackfin programing made seamless (nCE fixed which helps) --save settings file for m3 and eiger -- m3 threshold changes -- g2 and m3 clkdiv 2 (system clock) change should affect time settings (g2: exptime, period, delayaftertrigger, burstperiod, m3: exptime, gatedelay, gateperiod, period, delayaftertrigger) -- g2 system frequency is the same irrespective of timing source -- (apparently) rxr doesnt get stuck anymore from 6.1.1 -- rxr mem size changed (fifo header size from 8 to 16) due to sls rxr header = 112.. 112+ 16=128 (reduces packet losss especially for g2) --udp_srcip and udp_Srcip2: can set to auto (for virtual or 1g data networks) -- set dataset name for all hdf5 files to "data" only -- number of storage cells is not updated in teh receiver. done. and also allowing it to be modified in running status -- refactored memory structure in receiver and listener code (maybe resolves stuck issue, need to check) -- callback modified to have rx header and not rx header pointer -- adapted for g2 hdi v2.0. able to set master from server command line, server config file, and client. -- rx udp socket refactored (maybe resolves getting stuck?)remove check for eiger header and isntead checks for malformed packets for every detector -- jungfrau sw trigger , blocking trigger --help should not create a new object -- jungfrau master -- g2 parallel command -- jungfrau sync -- m3 bad channels (badchannel file also for g2 extended to include commas and colons, remove duplicates) -- m3 fix for gain caps to invert where needed when loading from trimbit file (fix for feature might have been added only in developer branch) -- pat loop and wait address default -- ctb and moench Fw fixed (to work with pattern commdand) )addreess length -- setting rx_hostname (or udp_dstip with rx_hostname not none) will always set udp_dstmac. solves problem of chaing udp_dstip and udp_dstmac stays the same -- jungfrau reset core and usleep removed (fix for 6.1.1 is now fixed in firmware) -- m3 clock update, m3 clk 4 and 5 cannot be set -- g2 change clkdivs 2 3 4 to defaults for burst and cw mode. -- ctb and moench: allowing 1g non blocking acquire to send data -- m3 and g2 rr -- m3 and g2 temp -- gain plot zooming fixed (disabled, acc. to main plot) -- ctb, moench, jungfrau (pll reset at start fixed, before no defines) -- pybind built into package, no need to update submodule when previous release had different pybind version -- adcvpp moved from dac.. and api added (ctb, moench) -- qt4->qt5 - - in built qt5 6.1.5 because rhel7 is not upto date with qt5, removed findqwt.cmake - - made a fix in qwt lib (qwt_plot_layout.h) to work with 5.15 and lower versions - - qt5 forms fixed, qt4 many hard coding forms switched to forms including qtabwidget, scrolls etc, fonts moved to forms - - docking option enabled by default, removed option to disable docking feature from "Mode" - - added qVersionResolve utility functions to handle compatibility before and after qt5.12 - - qtplots (ian's code) takes in gain mode enable to set some settings within the class, with proper gain plot ticks - - ensure gain plots have no zooming of z axis in 2d and y axis in 1d -- fixed some error messages in server side that were empty for fail in funcs (mostly minor as if this error, major issues) -- eiger (removed feb reset in stop acquisition as it caused processing bit to randomly not go high (leads to infinite loop waiting for it to go high). This is anyway done at prepare acquisition and set trimbits. - - left AND right registers monitored for processing bit done - - febProcessinginprogress returns STATUS_IDLE and not IDLE - - In feb stop acquisition, if processing bit is running forever, checks for 1 s, then if acq done bit is high, returns ok, else throws - - feb stop acquisition returns 1 if success and fucntion in list calling it compares properly instead of STATUS_IDLE (no effect, but incorrect logic) - - chipsignals to trimquad should only monitor right fpga (not both as it will throw) - - fixed error messages of readregister inconsistent values - - setmodule and read frame was returning fail without setting error messages (leading to broken tcp connection due to no error message) ) -- gui nios temperature added -- detector header change (bunchid, reserved, debug, roundRnumber) ->detSpec1 - 4 - -ctb and moench (allowing all clkdivs (totaldiv was a float instead of int)) - - txndelay_ ->txdelay_ (also for python), txdelay = delay for all with step - - hardwareversion -- jungfrau connected moduleid to detid_jungfrau.txt on board - -- dac names for ctb? +- support external build of python lib, diff --git a/slsDetectorSoftware/src/CmdProxy.h b/slsDetectorSoftware/src/CmdProxy.h index c0983d84a..3b5424830 100644 --- a/slsDetectorSoftware/src/CmdProxy.h +++ b/slsDetectorSoftware/src/CmdProxy.h @@ -1242,7 +1242,7 @@ class CmdProxy { "\n\tOn-board detector server software version"); GET_COMMAND(hardwareversion, getHardwareVersion, - "\n\tJungfrau][Gotthard2][Myhten3][Gotthard][Ctb][Moench] " + "\n\t[Jungfrau][Gotthard2][Myhten3][Gotthard][Ctb][Moench] " "Hardware version of detector."); GET_COMMAND( From 4ada8c79edc12b30582a563ccf128fb6d9f41d8b Mon Sep 17 00:00:00 2001 From: Dhanya Thattil <33750417+thattil@users.noreply.github.com> Date: Tue, 29 Nov 2022 16:28:24 +0100 Subject: [PATCH 07/24] allowing jungfrau to continue with just a waning if detid.txt file not found (#589) --- slsDetectorServers/slsDetectorServer/src/common.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/slsDetectorServers/slsDetectorServer/src/common.c b/slsDetectorServers/slsDetectorServer/src/common.c index 0d036eef6..eca942733 100644 --- a/slsDetectorServers/slsDetectorServer/src/common.c +++ b/slsDetectorServers/slsDetectorServer/src/common.c @@ -224,10 +224,16 @@ int getModuleIdInFile(int *ret, char *mess, char *fileName) { // open id file FILE *fd = fopen(fname, "r"); if (fd == NULL) { +#ifdef JUNGFRAUD + *ret = OK; + LOG(logWARNING, ("Could not find detid_jungfrau.txt to set module id\n")); + return 0; +#else *ret = FAIL; strcpy(mess, "Could not find detid file\n"); LOG(logERROR, ("%s\n\n", mess)); return -1; +#endif } LOG(logINFOBLUE, ("Reading det id file %s\n", fileName)); From e71f68d31bc7ebe2fc405373e7786facf4e77f95 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil <33750417+thattil@users.noreply.github.com> Date: Tue, 29 Nov 2022 16:36:54 +0100 Subject: [PATCH 08/24] reverted versions as the firmware dont increment (#590) --- slsSupportLib/include/sls/sls_detector_defs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/slsSupportLib/include/sls/sls_detector_defs.h b/slsSupportLib/include/sls/sls_detector_defs.h index 99b31ba13..9a145700b 100644 --- a/slsSupportLib/include/sls/sls_detector_defs.h +++ b/slsSupportLib/include/sls/sls_detector_defs.h @@ -45,8 +45,8 @@ #define MAX_UDP_DESTINATION 32 -#define SLS_DETECTOR_HEADER_VERSION 0x3 -#define SLS_DETECTOR_JSON_HEADER_VERSION 0x5 +#define SLS_DETECTOR_HEADER_VERSION 0x2 +#define SLS_DETECTOR_JSON_HEADER_VERSION 0x4 // ctb/ moench 1g udp (read from fifo) #define UDP_PACKET_DATA_BYTES (1344) From cac2c0b01df51001be84c9b301aa6bdaf852dc94 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Fri, 2 Dec 2022 12:12:25 +0100 Subject: [PATCH 09/24] removed decrement for sls detector header version number for virtual servers for ctb moench jungfrau g2 and m3 --- .../ctbDetectorServer/slsDetectorFunctionList.c | 2 +- .../gotthard2DetectorServer/slsDetectorFunctionList.c | 2 +- .../jungfrauDetectorServer/slsDetectorFunctionList.c | 4 ++-- .../moenchDetectorServer/slsDetectorFunctionList.c | 2 +- .../mythen3DetectorServer/slsDetectorFunctionList.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/slsDetectorServers/ctbDetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/ctbDetectorServer/slsDetectorFunctionList.c index 8c3fb618a..a55b61a28 100644 --- a/slsDetectorServers/ctbDetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/ctbDetectorServer/slsDetectorFunctionList.c @@ -2066,7 +2066,7 @@ void *start_timer(void *arg) { // set header sls_detector_header *header = (sls_detector_header *)(packetData); header->detType = (uint16_t)myDetectorType; - header->version = SLS_DETECTOR_HEADER_VERSION - 1; + header->version = SLS_DETECTOR_HEADER_VERSION; header->frameNumber = frameNr + iframes; header->packetNumber = i; header->modId = 0; diff --git a/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c index 5366e446e..7b1162277 100644 --- a/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c @@ -3334,7 +3334,7 @@ void *start_timer(void *arg) { // set header sls_detector_header *header = (sls_detector_header *)(packetData); header->detType = (uint16_t)myDetectorType; - header->version = SLS_DETECTOR_HEADER_VERSION - 1; + header->version = SLS_DETECTOR_HEADER_VERSION; header->frameNumber = virtual_currentFrameNumber; header->packetNumber = 0; header->modId = virtual_moduleid; diff --git a/slsDetectorServers/jungfrauDetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/jungfrauDetectorServer/slsDetectorFunctionList.c index 08532457b..e7d474840 100644 --- a/slsDetectorServers/jungfrauDetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/jungfrauDetectorServer/slsDetectorFunctionList.c @@ -2686,7 +2686,7 @@ void *start_timer(void *arg) { sls_detector_header *header = (sls_detector_header *)(packetData); header->detType = (uint16_t)myDetectorType; - header->version = SLS_DETECTOR_HEADER_VERSION - 1; + header->version = SLS_DETECTOR_HEADER_VERSION; header->frameNumber = frameNr + iframes; header->packetNumber = pnum; header->modId = virtual_moduleid; @@ -2713,7 +2713,7 @@ void *start_timer(void *arg) { sls_detector_header *header = (sls_detector_header *)(packetData2); header->detType = (uint16_t)myDetectorType; - header->version = SLS_DETECTOR_HEADER_VERSION - 1; + header->version = SLS_DETECTOR_HEADER_VERSION; header->frameNumber = frameNr + iframes; header->packetNumber = pnum; header->modId = virtual_moduleid; diff --git a/slsDetectorServers/moenchDetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/moenchDetectorServer/slsDetectorFunctionList.c index 27c1bdbb1..f327b5071 100644 --- a/slsDetectorServers/moenchDetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/moenchDetectorServer/slsDetectorFunctionList.c @@ -1739,7 +1739,7 @@ void *start_timer(void *arg) { memset(packetData, 0, packetSize); sls_detector_header *header = (sls_detector_header *)(packetData); header->detType = (uint16_t)myDetectorType; - header->version = SLS_DETECTOR_HEADER_VERSION - 1; + header->version = SLS_DETECTOR_HEADER_VERSION; header->frameNumber = frameNr + iframes; header->packetNumber = i; header->modId = 0; diff --git a/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c index 2b5c98403..215c06ba2 100644 --- a/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c @@ -2605,7 +2605,7 @@ void *start_timer(void *arg) { // set header sls_detector_header *header = (sls_detector_header *)(packetData); header->detType = (uint16_t)myDetectorType; - header->version = SLS_DETECTOR_HEADER_VERSION - 1; + header->version = SLS_DETECTOR_HEADER_VERSION; header->frameNumber = virtual_currentFrameNumber; header->packetNumber = i; header->modId = virtual_moduleid; From 51de419c2d653afe2b88e503142228250f5415c7 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Fri, 2 Dec 2022 12:59:21 +0100 Subject: [PATCH 10/24] reordered release notes --- CMakeLists.txt | 2 +- RELEASE.txt | 350 +++++++++++++++++++++++++++---------------------- 2 files changed, 196 insertions(+), 156 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 67476213b..7ee614911 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ # Copyright (C) 2021 Contributors to the SLS Detector Package cmake_minimum_required(VERSION 3.12) project(slsDetectorPackage) -set(PROJECT_VERSION 6.1.1) +set(PROJECT_VERSION 7.0.0) set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG") diff --git a/RELEASE.txt b/RELEASE.txt index f612f63e8..4cf64ce8c 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -22,6 +22,9 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2 Client ------ + + Breaking API: + . Versioning The client, receiver and detector servers now have semantic Versioning along with the date and are managed with the Version class. @@ -29,7 +32,7 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2 --version argument to the executable gives the complete versioning with date. Using the client to get versions gives only the semantic version. An older - server will still give date. Hence, the return type is a string. + server will still give date. Hence, the return type is a string, breaking API. Compatibility checks at hostname or rx_hostname command will only be for backwards compatibility (ie. it only checks for the major version number). @@ -49,22 +52,59 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2 https://slsdetectorgroup.github.io/devdoc/udpdetspec.html + . Namespace sls + All files in slsSupportLib and tests have now been moved to sls namespace + including macros. Using the LOG, for example, will require the sls qualifier. + + . [Eiger] Number of UDP interfaces Command line: numinterfaces, API: getNumberofUDPInterfaces This command now reflects the actual number of udp interfaces for Eiger, which is 2. - . [Moench][Ctb] Starting frame number - Command line: nextframenumber, API: getNextFrameNumber/ setNextFrameNumber - Added and default set up on detector server start up. - . [Eiger] Vtr - Allow Vtrim to be interpolated for settings. + . Deprecated CopyDetectorServer + Command line: copydetectorserver, API: copydetectorserver + Removed. Use updatedetectorserver - . Namespace sls - All files in slsSupportLib and tests have now been moved to sls namespace - including macros. Using the LOG, for example, will require the sls qualifier. + . [Eiger][Jugfrau][Mythen3] Deprecated specific transmission delay commands + txndelay_frame -> txdelay_frame + txndelay_left -> txdelay_left + txndelay_right -> txdelay_right + + + . Missing packets + Command line: rx_missingpackets, API: getNumMissingPackets + This now returns a signed 64 bit instead of unsigned. The negative polarity + depicts extra packets instead of missing packets and also takes care of + disabled ports. + + + . Frames caught and frame index + Command line rx_framescaught, rx_frameindex, API: getFramesCaught/ getRxCurrentFrameIndex + They now return a vector for each port when there are 2 udp interfaces + in the receiver. + + + . [Moench][Ctb][Mythen3] Deprecated commands + Patloopx, patnloopx, patwaitx, patwaittimex + Please use instead patloop, patnloop, patwait and patwaittime commands + with the level as an argument. + + Old commands work with warning, but the server expects the new ones + such as a default pattern file to be loaded at startup for Moench. + + Renamed patternParameters struct member from 'loop' to 'startloop' and + 'stoploop'. + + + . [Mythen3] Clock Divider 4 and 5 + Cannot be set anymore. Only read back. + + + + New commands: . [Eiger][Gotthard][Gotthard2][Mythen3][Jungfrau] Master @@ -79,6 +119,7 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2 [Eiger][Gotthard2][Gotthard] Using config file with 'master' with argument (slave=0, master=1) + . [Eiger] Top Command line: top, API: getTop/ setTop Sets the half module to top or bottom from the client. @@ -86,13 +127,89 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2 This can also be set up on the detector server: Using command line 'top' or 't' with argument (top=0, bottom=1) Using config file with 'top' with argument (top=0, bottom=1) + + + . [Mythen3][Eiger] Save settings file + Command line: trimbits (sls_detector_get), API: saveTrimbits + Added + + + . [Gotthard2] Parallel readout added + Command line: parallel, API: getParallelMode/ setParallelMode + Default for Gotthard2 is parallel. Non parallel mode only works in + continuous mode. + + + . [Jungfrau] Software trigger added + Command line: trigger, API: sendSoftwareTrigger + Send software trigger instead of harware trigger. + + + . [Eiger][Jungfrau] Blocking trigger + Commandline: blockingtrigger, API: sendSoftwareTrigger with argument true + Sends software trigger signal to detector and blocks until the frames + are sent out for that trigger. + + + . [Jungfrau] Sync + Command line: sync, API: getSynchronization/ setSynchronization + Enables or disables synchronization between modules + + + . [Gotthard2][Mythen3] Temperature readout + Command line: temp_fpga, API: getTemperature with TEMPERATURE_FPGA enum + Added + + + . [Gotthard2][Mythen3] Round robin added + Command line: udp_dstlist, API: getDestinationUDPList/ setDestinationUDPList + Command line: udp_numdst, API: getNumberofUDPDestinations + One can set up to 32 (64 for Mythen3) entries in the destination list. + + + . [Jungfrau] Module Id + Command line: moduleid, API: getModuleId + 16 bit value (ideally unique) that is streamed out in the udp header of + the detector. The on-board detector server picks it up from a file + (if it exists) called detid_jungfrau.txt. + + + . [Jungfrau][[Gotthard2][Myhten3][Gotthard][Ctb][Moench] Hardware version + Command line: hardwareversion, API: getHardwareVersion + Gets the board or hardware version. + For example, Jungfrau returns 1.0 or 2.0. + It is also printed at on-board detector server start up. + Also printed before starting FPGA programming. + + + . [Eiger][Jugfrau][Mythen3] Transmission Delay + Command line: tx_delay, API: getTransmissionDelay/ setTransmissionDelay + Sets transmission delay for all modules in the detector using the step + size provided. Sets up for every module: + [Eiger] txdelay_left to (2 * mod_index * n_delay) + [Eiger] txdelay_right to ((2 * mod_index + 1) * n_delay) + [Eiger] txdelay_frame to (2 *num_modules * n_delay) + [Jungfrau][Mythen3] txdelay_frame to (num_modules * n_delay) + + + . [Mythen3] Bad channels + Command line: badchannels, API: getBadChannels/ setBadChannels + Set bad channels from file with a list of channels, which will be masked + out. Also does trimming. A detector level command will require the channel + numbers accordingly. The file also extended to include commas, colons range) + and removes duplicates. + + + . [Moench][Ctb] Starting frame number + Command line: nextframenumber, API: getNextFrameNumber/ setNextFrameNumber + Added and default set up on detector server start up. . [Ctb] DAC names Command line: daclist, API: getDacNames/ setDacNames Can set and get dac names in the dac list now. - + . [Mythen3] Polarity, interpolation, pump probe, analog pulsing, digital pulsing Command line: polarity, interpolation, pumpprobe, apulse, dpulse API: getPolarity/ setPolarity, getInterpolation/ setInterpolation, @@ -113,144 +230,9 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2 Direct overwrite of any dac (including vthx) allowed using dac command (as before). - - . [Mythen3][Eiger] Save settings file - Command line: trimbits (sls_detector_get), API: saveTrimbits - Added - - . [Mythen3] Threshold - When settings trimbits or threshold, counter mask is set and hence, - vthx dacs are set accordingly. - - setAllThresholdEnergy takes 3 values for each counter and if one of them - is -1, the trimbits and setings for that counter is picked up from the - detector. - - . Udp Source IP - Command line: udp_srcip(2), API: getSourceUDPIP(2)/ setSourceUDPIP(2) - One can also set this to 'auto' for 1 GbE data. It will set to IP of - rx_hostname (as in udp_dstip) - - - . Storage cells in running receiver - Allowing the possibility to set this when receiver in running state. - - . [Gotthard2] Adapt to new HDI version - HDI module ID written to FPGA register - - . [Gotthard2] Parallel readout added - Command line: parallel, API: getParallelMode/ setParallelMode - Default for Gotthard2 is parallel. Non parallel mode only works in - continuous mode. - - . [Jungfrau] Software trigger added - Command line: trigger, API: sendSoftwareTrigger - Send software trigger instead of harware trigger. - - . [Eiger][Jungfrau] Blocking trigger - Commandline: blockingtrigger, API: sendSoftwareTrigger with argument true - Sends software trigger signal to detector and blocks until the frames - are sent out for that trigger. - - . [Jungfrau] Sync - Command line: sync, API: getSynchronization/ setSynchronization - Enables or disables synchronization between modules - - . [Moench][Ctb][Mythen3] Deprecated commands - Patloopx, patnloopx, patwaitx, patwaittimex - Please use instead patloop, patnloop, patwait and patwaittime commands - with the level as an argument. - - Old commands work with warning, but the server expects the new ones - such as a default pattern file to be loaded at startup for Moench. - - Renamed patternParameters struct member from 'loop' to 'startloop' and - 'stoploop'. - - - . [Moench][Ctb] Pattern levels - Changed from 3 to 6. - - . [Mythen3][Moench][Ctb] Default patwait and patloop addresses - Set default wait and loop addresses to 0x1fff (max value) for all levels - before loading pattern. Please use the pattern command instead of parameters. - This ensures defaults are set up and is faster. - - . [Mythen3] Bad channels - Command line: badchannels, API: getBadChannels/ setBadChannels - Set bad channels from file with a list of channels, which will be masked - out. Also does trimming. A detector level command will require the channel - numbers accordingly. The file also extended to include commas, colons range) - and removes duplicates. - - . Incrementing default receiver tcp port - Automatically incrementing the default receiver tcp port for every module - when creating shared memory. - - . [Gotthard2][Mythen3] Temperature readout - Command line: temp_fpga, API: getTemperature with TEMPERATURE_FPGA enum - Added - - . [Gotthard2][Mythen3] Round robin added - Command line: udp_dstlist, API: getDestinationUDPList/ setDestinationUDPList - Command line: udp_numdst, API: getNumberofUDPDestinations - One can set up to 32 (64 for Mythen3) entries in the destination list. - - . [Jungfrau] Module Id - Command line: moduleid, API: getModuleId - 16 bit value (ideally unique) that is streamed out in the udp header of - the detector. The on-board detector server picks it up from a file - (if it exists) called detid_jungfrau.txt. - - . [Jungfrau][[Gotthard2][Myhten3][Gotthard][Ctb][Moench] Hardware version - Command line: hardwareversion, API: getHardwareVersion - Gets the board or hardware version. - For example, Jungfrau returns 1.0 or 2.0. - It is also printed at on-board detector server start up. - Also printed before starting FPGA programming. - - - . [Eiger][Jugfrau][Mythen3] Transmission Delay - Command line: tx_delay, API: getTransmissionDelay/ setTransmissionDelay - Sets transmission delay for all modules in the detector using the step - size provided. Sets up for every module: - [Eiger] txdelay_left to (2 * mod_index * n_delay) - [Eiger] txdelay_right to ((2 * mod_index + 1) * n_delay) - [Eiger] txdelay_frame to (2 *num_modules * n_delay) - [Jungfrau][Mythen3] txdelay_frame to (num_modules * n_delay) - - . [Eiger][Jugfrau][Mythen3] Deprecated specific transmission delay commands - txndelay_frame -> txdelay_frame - txndelay_left -> txdelay_left - txndelay_right -> txdelay_right - - . Catch updated to latest 2.x version due to build failure in fedora - - . [Moench][Ctb] ADC Vpp - Command line: adcvpp, API: getADCVpp/ setADCVpp - Moved from SetDAC function into into its own. One can use mV values or - option numbers as before. - - . [Mythen3] Clock Divider 4 and 5 - Cannot be set anymore. Only read back. - - - . Deprecated CopyDetectorServer - Command line: copydetectorserver, API: copydetectorserver - Removed. Use updatedetectorserver - - . [Jungfrau][Moench][Ctb] Additional programming checks - Also checks if the drive to write to is a special file or a normal - file. If its a normal file, it throws asking to redo the command with a - '--please-delete' argument to delete the normal file and create the device - drive and restart FPGA programming. - - More readable error message insetad of "programfpga not implemented for - this detector'. This happens when 'hostname' command fails due to - server-firmware/client compatibility and the detector type becomes - 'GENERIC'. Fixed to suggest if 'hostname' executed properly. + New commands for Receiver only: . Arping for 10GbE Command line: rx_arping API: getRxArping/ setRxArping @@ -277,16 +259,69 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2 ROI. Status bar displays a message when Rx ROI enabled. - . Missing packets - Command line: rx_missingpackets, API: getNumMissingPackets - This now returns a signed 64 bit instead of unsigned. The negative polarity - depicts extra packets instead of missing packets and also takes care of - disabled ports. - . Frames caught and frame index - Command line rx_framescaught, rx_frameindex, API: getFramesCaught/ getRxCurrentFrameIndex - They now return a vector for each port when there are 2 udp interfaces - in the receiver. + Additonal options: + + . [Jungfrau][Moench][Ctb] Additional programming checks + Also checks if the drive to write to is a special file or a normal + file. If its a normal file, it throws asking to redo the command with a + '--please-delete' argument to delete the normal file and create the device + drive and restart FPGA programming. + + More readable error message insetad of "programfpga not implemented for + this detector'. This happens when 'hostname' command fails due to + server-firmware/client compatibility and the detector type becomes + 'GENERIC'. Fixed to suggest if 'hostname' executed properly. + + + . Udp Source IP + Command line: udp_srcip(2), API: getSourceUDPIP(2)/ setSourceUDPIP(2) + One can also set this to 'auto' for 1 GbE data. It will set to IP of + rx_hostname (as in udp_dstip) + + . Incrementing default receiver tcp port + Automatically incrementing the default receiver tcp port for every module + when creating shared memory. + + + + Changes: + + . [Jungfrau] Storage cells in running receiver + Allowing the possibility to set this when receiver in running state. + + + . [Eiger] Vtr + Allow Vtrim to be interpolated for settings. + + + . [Mythen3] Threshold + When settings trimbits or threshold, counter mask is set and hence, + vthx dacs are set accordingly. + + setAllThresholdEnergy takes 3 values for each counter and if one of them + is -1, the trimbits and setings for that counter is picked up from the + detector. + + + . [Moench][Ctb] Pattern levels + Changed from 3 to 6. + + + . [Mythen3][Moench][Ctb] Default patwait and patloop addresses + Set default wait and loop addresses to 0x1fff (max value) for all levels + before loading pattern. Please use the pattern command instead of parameters. + This ensures defaults are set up and is faster. + + + . [Moench][Ctb] ADC Vpp + Command line: adcvpp, API: getADCVpp/ setADCVpp + Moved from SetDAC function into into its own. One can use mV values or + option numbers as before. + + + + Python @@ -329,10 +364,15 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2 to CMAKE_INSTALL_PREFIX/python using -DSLS_INSTALL_PYTHONEXT + . Catch updated to latest 2.x version due to build failure in fedora Detector Server --------------- + . [Gotthard2] Adapt to new HDI version + HDI module ID written to FPGA register + + . [Moench] ADC9257 Vref ADC Vref voltage modified from 1.33V to 2V From d4be1af378e7de675ef2b40f32a455eb36284305 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Mon, 5 Dec 2022 09:52:10 +0100 Subject: [PATCH 11/24] release notes --- RELEASE.txt | 90 +++++++++++++++++++++++++++++------------------------ 1 file changed, 49 insertions(+), 41 deletions(-) diff --git a/RELEASE.txt b/RELEASE.txt index 4cf64ce8c..b10e85de6 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -19,6 +19,55 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2 1. New or Changed Features ========================== + + + Compilation + ----------- + + . Custom location to find ZeroMQ + Option to provide a custom location to look for ZeroMQ, if not found + using FindZeroMQ.cmake + + For example, to use the system installed zmq: + Using cmake: -DZeroMQ_HINT=/usr/lib64 + Using cmk.sh script: -q /usr/lib64 + + + . Support external build + Assuming already installed version of the slsDetectorPacakge exists, + external build of python bindings, gui, ctbgui and moench has been added. + + + . Catch updated to latest 2.x version due to build failure in fedora + + + + Python + ------ + + . Install python extension + Option to copy the python extension (slsdet folder and _slsdet-..so) + to CMAKE_INSTALL_PREFIX/python using + -DSLS_INSTALL_PYTHONEXT + + + . Pybind11 (v2.10.0) + Pybind11 is removed as a submodule and instead built into package to + simplify for users. Now, there is no more need to clone with the '--recursive' + argument or to update submodule when switching to this package version + and above. + + + . Conda packages + Removed conda packages for python 3.6 and 3.7. Added for python 3.11. + + + . Defines in sls_detector_defs + sls_detetor_defs parsed and #defines extracted into defines.py + For exmaple, one can use slsdet.LOCALHOST_IP + + + Client ------ @@ -324,47 +373,6 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2 - Python - ------ - - . Defines in sls_detector_defs - sls_detetor_defs parsed and #defines extracted into defines.py - For exmaple, one can use slsdet.LOCALHOST_IP - - - . Pybind11 (v2.10.0) - Pybind11 is removed as a submodule and instead built into package to - simplify for users. Now, there is no more need to clone with the '--recursive' - argument or to update submodule when switching to this package version - and above. - - . Conda packages - Removed conda packages for python 3.6 and 3.7. Added for python 3.11. - - - - Compilation - ----------- - - . Custom location to find ZeroMQ - Option to provide a custom location to look for ZeroMQ, if not found - using FindZeroMQ.cmake - - For example, to use the system installed zmq: - Using cmake: -DZeroMQ_HINT=/usr/lib64 - Using cmk.sh script: -q /usr/lib64 - - - . Support external build - Assuming already installed version of the slsDetectorPacakge exists, - external build of python bindings, gui, ctbgui and moench has been added. - - . Install python extension - Option to copy the python extension (slsdet folder and _slsdet-..so) - to CMAKE_INSTALL_PREFIX/python using - -DSLS_INSTALL_PYTHONEXT - - . Catch updated to latest 2.x version due to build failure in fedora Detector Server --------------- From ad21d76af25bf785c6eb992388a42bbea3964ebb Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Mon, 5 Dec 2022 11:08:58 +0100 Subject: [PATCH 12/24] release notes updated --- RELEASE.txt | 788 +++++++++++++++++++++++++++++----------------------- 1 file changed, 440 insertions(+), 348 deletions(-) diff --git a/RELEASE.txt b/RELEASE.txt index b10e85de6..11ec5b8ff 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -7,74 +7,143 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2 CONTENTS -------- - 1. New or Changed Features - 2. Resolved Issues - 3. Firmware Requirements - 4. Kernel Requirements - 5. Download, Documentation & Support + 1. New, Changed or Resolved Features + 1.1. Compilation + 1.2. Callback + 1.3. Python + 1.4. Client + 1.5. Detector Server + 1.6. Simulator + 1.7. Receiver + 2. Firmware Requirements + 3. Kernel Requirements + 4. Download, Documentation & Support +@Erik:- adding LTO to test and disable them for Debug builds? +@Erik:- support external build of python lib, + + 1. New or Changed Features ========================== +1.1. Compilation +---------------- - Compilation - ----------- - . Custom location to find ZeroMQ + General: + + + * Custom location to find ZeroMQ Option to provide a custom location to look for ZeroMQ, if not found using FindZeroMQ.cmake + For example, to use the system installed zmq: Using cmake: -DZeroMQ_HINT=/usr/lib64 Using cmk.sh script: -q /usr/lib64 - . Support external build + * Support external build Assuming already installed version of the slsDetectorPacakge exists, external build of python bindings, gui, ctbgui and moench has been added. - . Catch updated to latest 2.x version due to build failure in fedora + * Catch updated to latest 2.x version due to build failure in fedora - Python - ------ + Gui: - . Install python extension + + * Qt5 and in-built compressed Qwt 6.1.5 + Ported from Qt4 to Qt5. + Compressed Qwt 6.1.5 added into the package in libs. It is unpacked and built + as a static library.This allows us to remove qwt as an external dependency + and reduces the risk of picking up the wrong version. + + + Python: + + + * Install python extension Option to copy the python extension (slsdet folder and _slsdet-..so) to CMAKE_INSTALL_PREFIX/python using -DSLS_INSTALL_PYTHONEXT - . Pybind11 (v2.10.0) + * Pybind11 (v2.10.0) Pybind11 is removed as a submodule and instead built into package to simplify for users. Now, there is no more need to clone with the '--recursive' argument or to update submodule when switching to this package version and above. - . Conda packages + * Conda packages Removed conda packages for python 3.6 and 3.7. Added for python 3.11. - . Defines in sls_detector_defs + +1.2. Callback +------------- + + + * Datatype of Metadata [registerCallBackRawDataReady, registerCallBackRawDataModifyReady] + Datatype changed from char* to sls_receiver_header. + + + * Datatype of Size [registerCallBackRawDataReady, registerCallBackRawDataModifyReady] + Datatype changed from uint32_t to size_t + + + * Datatype of file name and file path [registerCallBackStartAcquisition] + Datatype changed from string to const string reference. + + + * Incorrect image size [registerCallBackStartAcquisition] + Fixed. It used to give +120 bytes. + + + * [Gotthard2] 25um Image reconstruction for 2 modules + First module (master) interleaves with second modules(slave). First channel + of master is first channel of detector. + + Requires firmware update to reverse channels of slaves. + + + +1.3. Python +----------- + + + * Defines in sls_detector_defs sls_detetor_defs parsed and #defines extracted into defines.py For exmaple, one can use slsdet.LOCALHOST_IP + * Python sub-microsecond resolution + Reading back sub-microsecond exposure times from the Python API fixed by + addig Python datetime supports only micro seconds as lowest unit. + + This is fixed by introducing a new C++ type (DurationWrapper), which + holds number of nanoseconds as a uint64_t (only in python bindings) and + custom typecaster to convert to and from std::chrono::nanoseconds. - Client - ------ + A get using API now returns in DurationWrapper, instead of datetime. + Refer exptime help for examples. + + +1.4. Client +----------- Breaking API: - . Versioning + + * Versioning The client, receiver and detector servers now have semantic Versioning along with the date and are managed with the Version class. @@ -91,7 +160,7 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2 Setting intitialchecks to 0 also bypasses the receiver compatibility check. - . Detector Specific fields + * Detector Specific fields bunchid ->detSpec1 reserved->detSpec2 debug->detSpec3 @@ -101,42 +170,69 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2 https://slsdetectorgroup.github.io/devdoc/udpdetspec.html - . Namespace sls + * Namespace sls All files in slsSupportLib and tests have now been moved to sls namespace including macros. Using the LOG, for example, will require the sls qualifier. - . [Eiger] Number of UDP interfaces + * [Eiger] Number of UDP interfaces Command line: numinterfaces, API: getNumberofUDPInterfaces This command now reflects the actual number of udp interfaces for Eiger, which is 2. - . Deprecated CopyDetectorServer + * [Eiger][Jungfrau] Row column + [Jungfrau] Fixed row column indexing for multi module 2 interfaces + + [Eiger] The row indicies were switched across the Y axis for the callback + only for Eiger. This is now changed and kept similar to the other detectors. + The row indices would be in the order of the half modules in the hostname + command. Therefore, to keep the image from callback, invert the hostname + order in the config file. + + + * Deprecated CopyDetectorServer Command line: copydetectorserver, API: copydetectorserver Removed. Use updatedetectorserver - . [Eiger][Jugfrau][Mythen3] Deprecated specific transmission delay commands + * [Eiger][Jugfrau][Mythen3] Deprecated specific transmission delay commands txndelay_frame -> txdelay_frame txndelay_left -> txdelay_left txndelay_right -> txdelay_right - . Missing packets + * [Eiger] Datastream only for 10GbE + Command line: datastream, API: getDataStream/ setDataStream + + This command to enable/ disable data stream from left or right port + is now allowed only for 10GbE. Previously, it incorrectly allowed to do so. + + + * [Eiger][Jungfrau][Moench][Ctb] Stop command effect on next frame number + Stopping acquisition sometimes results in different next frame numbers + for different moduels. Hence, after a stop, if the next frame numbers are + different, they are all set to their maximum value + 1. + + + * Missing packets Command line: rx_missingpackets, API: getNumMissingPackets This now returns a signed 64 bit instead of unsigned. The negative polarity depicts extra packets instead of missing packets and also takes care of disabled ports. - . Frames caught and frame index + * Frames caught and frame index Command line rx_framescaught, rx_frameindex, API: getFramesCaught/ getRxCurrentFrameIndex They now return a vector for each port when there are 2 udp interfaces in the receiver. - . [Moench][Ctb][Mythen3] Deprecated commands + * [Gotthard][Gotthard2] Num modules + Only 2 modules allowed maximum in a detector shared memory. + + + * [Moench][Ctb][Mythen3] Deprecated commands Patloopx, patnloopx, patwaitx, patwaittimex Please use instead patloop, patnloop, patwait and patwaittime commands with the level as an argument. @@ -148,82 +244,79 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2 'stoploop'. - . [Mythen3] Clock Divider 4 and 5 + * [Mythen3] Clock Divider 4 and 5 Cannot be set anymore. Only read back. New commands: - . [Eiger][Gotthard][Gotthard2][Mythen3][Jungfrau] Master + + * [Eiger][Gotthard][Gotthard2][Mythen3][Jungfrau] Master Setting up from client: [Eiger][Gotthard2][Jungfrau] Command line: master, API: getMaster/ setMaster All of them can get master mode from the client. - Setting up on the detector or virtual server: - [Eiger][Gotthard2 Virtual][Mythen3 Virtual][Gotthard Virtual] - Using command line 'master' or 'm' with argument (slave=0, master=1) - [Eiger][Gotthard2][Gotthard] - Using config file with 'master' with argument (slave=0, master=1) + This can also be set up on the detector server. Please refer to notes + on that section. - . [Eiger] Top + * [Eiger] Top Command line: top, API: getTop/ setTop Sets the half module to top or bottom from the client. - This can also be set up on the detector server: - Using command line 'top' or 't' with argument (top=0, bottom=1) - Using config file with 'top' with argument (top=0, bottom=1) - + This can also be set up on the detector server. Please refer to notes + on that section. - . [Mythen3][Eiger] Save settings file + + * [Mythen3][Eiger] Save settings file Command line: trimbits (sls_detector_get), API: saveTrimbits Added - . [Gotthard2] Parallel readout added + * [Gotthard2] Parallel readout added Command line: parallel, API: getParallelMode/ setParallelMode Default for Gotthard2 is parallel. Non parallel mode only works in continuous mode. - . [Jungfrau] Software trigger added + * [Jungfrau] Software trigger added Command line: trigger, API: sendSoftwareTrigger Send software trigger instead of harware trigger. - . [Eiger][Jungfrau] Blocking trigger + * [Eiger][Jungfrau] Blocking trigger Commandline: blockingtrigger, API: sendSoftwareTrigger with argument true Sends software trigger signal to detector and blocks until the frames are sent out for that trigger. - . [Jungfrau] Sync + * [Jungfrau] Sync Command line: sync, API: getSynchronization/ setSynchronization Enables or disables synchronization between modules - . [Gotthard2][Mythen3] Temperature readout + * [Gotthard2][Mythen3] Temperature readout Command line: temp_fpga, API: getTemperature with TEMPERATURE_FPGA enum Added - . [Gotthard2][Mythen3] Round robin added + * [Gotthard2][Mythen3] Round robin added Command line: udp_dstlist, API: getDestinationUDPList/ setDestinationUDPList Command line: udp_numdst, API: getNumberofUDPDestinations One can set up to 32 (64 for Mythen3) entries in the destination list. - . [Jungfrau] Module Id + * [Jungfrau] Module Id Command line: moduleid, API: getModuleId 16 bit value (ideally unique) that is streamed out in the udp header of the detector. The on-board detector server picks it up from a file (if it exists) called detid_jungfrau.txt. - . [Jungfrau][[Gotthard2][Myhten3][Gotthard][Ctb][Moench] Hardware version + * [Jungfrau][[Gotthard2][Myhten3][Gotthard][Ctb][Moench] Hardware version Command line: hardwareversion, API: getHardwareVersion Gets the board or hardware version. For example, Jungfrau returns 1.0 or 2.0. @@ -231,7 +324,7 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2 Also printed before starting FPGA programming. - . [Eiger][Jugfrau][Mythen3] Transmission Delay + * [Eiger][Jugfrau][Mythen3] Transmission Delay Command line: tx_delay, API: getTransmissionDelay/ setTransmissionDelay Sets transmission delay for all modules in the detector using the step size provided. Sets up for every module: @@ -241,7 +334,7 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2 [Jungfrau][Mythen3] txdelay_frame to (num_modules * n_delay) - . [Mythen3] Bad channels + * [Mythen3] Bad channels Command line: badchannels, API: getBadChannels/ setBadChannels Set bad channels from file with a list of channels, which will be masked out. Also does trimming. A detector level command will require the channel @@ -249,17 +342,17 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2 and removes duplicates. - . [Moench][Ctb] Starting frame number + * [Moench][Ctb] Starting frame number Command line: nextframenumber, API: getNextFrameNumber/ setNextFrameNumber Added and default set up on detector server start up. - . [Ctb] DAC names + * [Ctb] DAC names Command line: daclist, API: getDacNames/ setDacNames Can set and get dac names in the dac list now. - . [Mythen3] Polarity, interpolation, pump probe, analog pulsing, digital pulsing + * [Mythen3] Polarity, interpolation, pump probe, analog pulsing, digital pulsing Command line: polarity, interpolation, pumpprobe, apulse, dpulse API: getPolarity/ setPolarity, getInterpolation/ setInterpolation, getPumpProbe/ setPumpProbe, getAnalogPulsing/ setAnalogPulsing, @@ -283,14 +376,15 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2 New commands for Receiver only: - . Arping for 10GbE + + * Arping for 10GbE Command line: rx_arping API: getRxArping/ setRxArping Starts a thread in the receiver to arping the interface it is listening to in 10GbE mode every 60 s. Changes NUM_RX_THREAD_IDS (sls_detector_defs.h) from 8 to 9. - . Receiver Region of Interest + * Receiver Region of Interest Command line: rx_roi, API: getRxROI/ setRxROI Command line: rx_clearroi, API: clearRxROI One can set an ROI in the receiver to write to file. 1D detectors can set @@ -309,9 +403,14 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2 - Additonal options: + Additonal Features: - . [Jungfrau][Moench][Ctb] Additional programming checks + + * Non-blocking start + Allowing non-blocking start at modular level again. + + + * [Jungfrau][Moench][Ctb] Additional programming checks Also checks if the drive to write to is a special file or a normal file. If its a normal file, it throws asking to redo the command with a '--please-delete' argument to delete the normal file and create the device @@ -323,28 +422,46 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2 'GENERIC'. Fixed to suggest if 'hostname' executed properly. - . Udp Source IP + * Udp Source IP Command line: udp_srcip(2), API: getSourceUDPIP(2)/ setSourceUDPIP(2) One can also set this to 'auto' for 1 GbE data. It will set to IP of rx_hostname (as in udp_dstip) - . Incrementing default receiver tcp port + * Incrementing default receiver tcp port Automatically incrementing the default receiver tcp port for every module when creating shared memory. - Changes: + Changes or Fixes: - . [Jungfrau] Storage cells in running receiver + + * Free and config command fail + Free and config command checked mismatch of size of shared memory before + freeing or loading new config. Fixed. + + + * sls_detector_help or sls_detector_get -h + Should not create Detector object. Fixed. + + + * [Jungfrau] Storage cells in running receiver Allowing the possibility to set this when receiver in running state. - . [Eiger] Vtr + * [Eiger] Vtr Allow Vtrim to be interpolated for settings. - . [Mythen3] Threshold + * [Mythen3] Incorrect gain caps when setting threshold energy + Gain caps overwritten with settings enum. Fixed. + + + * [Mythen3] Non blocking start acquisition + Non-blocking start acquisition was sent out twice to the master. Fixed. + + + * [Mythen3] Threshold When settings trimbits or threshold, counter mask is set and hence, vthx dacs are set accordingly. @@ -353,45 +470,165 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2 detector. - . [Moench][Ctb] Pattern levels + * [Moench][Ctb] Pattern levels Changed from 3 to 6. - . [Mythen3][Moench][Ctb] Default patwait and patloop addresses + * [Mythen3][Moench][Ctb] Default patwait and patloop addresses Set default wait and loop addresses to 0x1fff (max value) for all levels before loading pattern. Please use the pattern command instead of parameters. This ensures defaults are set up and is faster. - . [Moench][Ctb] ADC Vpp + * [Moench] Patsetbit and patsetmask + Command line: patsetbit API: getPatternBitMask/ setPatternBitMask + Command line: patmask API: getPatternMask/ setPatternMask + + Exchanging the help and masks for patsetbit and patsetmask in the detector + server, especially in loading settings. + + + * [Moench][Ctb] ADC Vpp Command line: adcvpp, API: getADCVpp/ setADCVpp Moved from SetDAC function into into its own. One can use mV values or option numbers as before. + * [Ctb] ADC command goes back to control server + Slow ADCs, slow ADC temperature, get measured current and voltage values + are requested via the control server again insetad of the stop server + due to configuration and definitions in the control server. +1.5. Detector Server +-------------------- - Detector Server - --------------- + Config file: - . [Gotthard2] Adapt to new HDI version - HDI module ID written to FPGA register + * [Eiger][Gotthard2][Gotthard] Master + Using config file with 'master' with argument (master=1, slave=0) - . [Moench] ADC9257 Vref + * [Eiger] Top + Using config file with 'top' with argument (top=1, bottom=0) + + + + Command line arguments: + + * They have precedence over config files. + + + * [Eiger][Gotthard2 Virtual][Mythen3 Virtual][Gotthard Virtual] Master + Using command line '--master = 1' or '-m = 1' with argument + (master = 1, slave = 0) + + + * [Eiger] Top + Using command line '--top = 1' or '-t = 1' with argument (top=1, bottom=0) + + + * Ignore config file + The config files can also be ignored by an argument from the command line, + '--ignore-config' or '-i'. + + + + Fixes: + + + * [Jungfrau][Eiger] Clear UDP destination + Command line: udp_cleardst, API: clearUDPDestinations + Clearing udp destination also clears it in the FPGA now. + + + * [Eiger] Incorrect next frame number + Command line: nextframenumber, API: getNextFrameNumber/ setNextFrameNumber + Get next frame number for 10g was connected to 1g registers and gave + incorrect values. Fixed. + + + * [Mythen3][Gotthard2] System clock change effects + When changing the system clock (clkdiv 2), time settings should also be + affected (exptime, period etc.). Fixed. + + [Gotthard2] System frequency should be same irrespective of timing source. + Fixed. + + + * [Mythen3] Kernel version compatibility test + Fix added to parse properly the kernel version with CET for corrected + version compatibility test. + + + * [Mythen3] Server crash for setting vthrehsold + Fixed. + + + * [Mythen3] Incorrect gaincaps + Setting threshold energy was overwriting gaincaps with settings enum. Fixed. + + + * [Ctb][Moench] Hostname fail in update mode. + Fixed + + + + Changes: + + + * [Jungfrau] Temporary fix for stop in 6.1.1 + Temporary fix introduced in 6.1.1 for not being able to start after a + stop command has been issued is removed. Reset core right after also has + been removed. It has been fixed in firmware instead. + + + * [Gotthard2] Clock Divider defaults + When chancing burst mode, clock dividers (2, 3 and 4) set to their + defaults according to burst mode. + + + * [Mythen3] DAC check for settings + Verify DAC values for each setting has been temporarily switched off + + + * [Mythen3] DAC min and max values + Vtrim minimum of 600 has been removed. + The threshold dacs minimum is 200 and maximum is 2400. + The other DACs minimum is 0 and maximum is 2800. + When out of range, will not throw, just a warning. + + + * [Mythen3] Vicin Dac changed to 800 + + + * [Jungfrau][Moench][Ctb] PLL reset at server start up + PLL reset now at server start up. + + + * [Moench] ADC9257 Vref ADC Vref voltage modified from 1.33V to 2V - . Command line arguments - They have precedence over config files. The config files can also be - ignored by an argument from the command line, '--ignore-config' or '-i'. - + + * [Ctb] Allow all clock dividers for PLL + Fixed. For example, 133 MHz would not really be set previously. Fixed by + changing totaldiv from float to an integer. - . [Jungfrau][Moench][Ctb] Additional server update process + + Additional Features: + + + * Stop server startup errors + Stop servers now also check for errors at startup (including version + compatibility) and like the control server, it will translate to the + client when connecting for the first time (hostname command). + + + * [Jungfrau][Moench][Ctb] Additional server update process Removes old server binary or target of linked file when updating detector server for blackfin detectors as there is less space on blackfin. @@ -400,44 +637,24 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2 Raise error if server name to be copied is the same as final soft link name. - . [Mythen3] DAC check for settings - Verify DAC values for each setting has been temporarily switched off - - . [Mythen3] DAC min and max values - Vtrim minimum of 600 has been removed. - The threshold dacs minimum is 200 and maximum is 2400. - The other DACs minimum is 0 and maximum is 2800. - When out of range, will not throw, just a warning. - - . [Mythen3] Vicin Dac changed to 800 - - - . [Gotthard2] Clock Divider defaults - When chancing burst mode, clock dividers (2, 3 and 4) set to their - defaults according to burst mode. - - . [Moench][Ctb] 1 GbE Non blocking acquisition + * [Moench][Ctb] 1 GbE Non blocking acquisition Previously non blocking acquisition in 1 GbE would not send data. This feature added now. - - - . [Jungfrau][Moench][Ctb] PLL reset at server start up - PLL reset now at server start up. - Simulator - --------- + * [Gotthard2] Adapted to new HDI version + HDI module ID written to FPGA register - . [Eiger][Junfrau][Gotthard2][Mythen3] Module Id - Added into udp header - . Minimum Configuration - One can setup with just: - hostname localhost - rx_hostname localhost - udp_dstip auto - . [Eiger] Only one executable +1.6. Simulator +-------------- + + + * Command line arguments. Please refer to previous section on Detector Server. + + + * [Eiger] Only one executable Only one executable for an Eiger virtual server. Master and top mode can be provided via command line or config file to the detector server, as well as via the client. See in Other New Features for more details. @@ -446,283 +663,158 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2 eigerDetectorServer_virtual # reads default config file (top master) eigerDetectorServer_virtual -i #ignores the config file (bottom slave) - Callback - -------- - . [Gotthard2] 25um Image reconstruction for 2 modules - First module (master) interleaves with second modules(slave). First channel - of master is first channel of detector. - - Requires firmware update to reverse channels of slaves. - - . Datatype of Metadata [registerCallBackRawDataReady, registerCallBackRawDataModifyReady] - Datatype changed from char* to sls_receiver_header. - - . Datatype of Size [registerCallBackRawDataReady, registerCallBackRawDataModifyReady] - Datatype changed from uint32_t to size_t - - . Datatype of file name and file path [registerCallBackStartAcquisition] - Datatype changed from string to const string reference. - - . Incorrect image size [registerCallBackStartAcquisition] - Fixed. It used to give +120 bytes. - - Receiver - -------- + * [Eiger][Junfrau][Gotthard2][Mythen3] Module Id + Added into udp header - . File write - File write is disabled by default. + * Minimum Configuration + One can setup with just: + hostname localhost + rx_hostname localhost + udp_dstip auto - . [Gotthard2] 25um image reconstruction in virtual HDF5 - Virtual HDF5 reconstructs complete image by interleaving first module - (master) with second module (slave). First channel of master is first - channel of detector. - - Requires firmware update to reverse channels of slaves. - - . File name prefix - Slash '/' not allowed. - - . Memory size - Increased an internal fifo header by 8 bytes to align memory allocated for - to receive images. - - . Geometry metadata - Added geometry (number of modules in each direction) to metadata in file. - - . HDF5 and Binary writer version - Changed from 6.3 to 6.4 - - - . Master file format to json - The format has been changed from ASCII to json. - - . Master file created at end of acquisition - The file is now written at the end of acquisition. So if any metadata - is changed during an acquisition, it will reflect the last value. - - . Namespace sls - All the receiver source files have also been added to namespace sls. - - . HDF5 Dataset name - Changed to just "data" to simplify for user - - Gui - --- - - . [Jungfrau][Eiger] Gap pixels - Enabled by default in the gui. - - . High voltage moved from Developer tab to Settings tab. - - . Gain plot zooming - Zooming disabled. Instead, it automatically zooms in when you zoom in - the main plot or if min and max of x and y axis set up in plot tab. - - - . Qt5 and in-built compressed Qwt 6.1.5 - Ported from Qt4 to Qt5. - Compressed Qwt 6.1.5 added into the package in libs. It is unpacked and built - as a static library.This allows us to remove qwt as an external dependency - and reduces the risk of picking up the wrong version. - - -2. Resolved Issues -================== - - - Client - ------ - - . [Ctb] ADC command goes back to control server - Slow ADCs, slow ADC temperature, get measured current and voltage values - are requested via the control server again insetad of the stop server - due to configuration and definitions in the control server. - - . [Eiger] Incorrect next frame number - Command line: nextframenumber, API: getNextFrameNumber/ setNextFrameNumber - Get next frame number for 10g was connected to 1g registers and gave - incorrect values. Fixed. - - . [Eiger][Jungfrau][Moench][Ctb] Stop affecting next frame number - Stopping acquisition sometimes results in different next frame numbers - for different moduels. Hence, after a stop, if the next frame numbers are - different, they are all set to their maximum value + 1. - - . [Mythen3] Incorrect gain caps when setting threshold energy - Gain caps overwritten with settings enum. Fixed. - - . [Mythen3] Non blocking start acquisition - Non-blocking start acquisition was sent out twice to the master. Fixed. - - . Free and config command fail - Free and config command checked mismatch of size of shared memory before - freeing or loading new config. Fixed. - - . sls_detector_help or sls_detector_get -h - Should not create Detector object. Fixed. - - - . [Moench] Patsetbit and patsetmask - Command line: patsetbit API: getPatternBitMask/ setPatternBitMask - Command line: patmask API: getPatternMask/ setPatternMask - - Exchanging the help and masks for patsetbit and patsetmask in the detector - server, especially in loading settings. - - - . [Eiger] Datastream only for 10GbE - Command line: datastream, API: getDataStream/ setDataStream - - This command to enable/ disable data stream from left or right port - is now allowed only for 10GbE. Previously, it incorrectly allowed to do so. - - - . Non-blocking start - Allow non-blocking start at modular level again. - - - . [Gotthard][Gotthard2] Num modules - Only 2 modules allowed maximum in a detector shared memory. - - - - - Detecor Server - -------------- - - . [Mythne3] Kernel version compatibility test - Fix added to parse properly the kernel version with CET for corrected - version compatibility test. - - . [Mythen3] Server crash for setting vthrehsold - Fixed. - - . [Mythen3] Incorrect gaincaps - Setting threshold energy was overwriting gaincaps with settings enum. Fixed. - - . [Ctb][Moench] Hostname fail in update mode. - Fixed - - . Stop server startup errors - Stop servers now also check for errors at startup (including version - compatibility) and like the control server, it will translate to the - client when connecting for the first time (hostname command). - - . [Mythen3][Gotthard2] System clock change effects - When changing the system clock (clkdiv 2), time settings should also be - affected (exptime, period etc.). Fixed. - - [Gotthard2] System frequency should be same irrespective of timing source. - Fixed. - - . [Jungfrau][Eiger] Clear UDP destination - Command line: udp_cleardst, API: clearUDPDestinations - Clearing udp destination also clears it in the FPGA now. - - - . [Jungfrau] Temporary fix for stop in 6.1.1 - Temporary fix introduced in 6.1.1 for not being able to start after a - stop command has been issued is removed. Reset core right after also has - been removed. It has been fixed in firmware instead. - - . [Ctb] Allow all clock dividers for PLL - Fixed. For example, 133 MHz would not really be set previously. Fixed by - changing totaldiv from float to an integer. - - . [Eiger][Jungfrau] Row column - [Jungfrau] Fixed row column indexing for multi module 2 interfaces - - - [Eiger] The row indicies were switched across the Y axis for the callback - only for Eiger. This is now changed and kept similar to the other detectors. - The row indices would be in the order of the half modules in the hostname - command. Therefore, to keep the image from callback, invert the hostname - order in the config file. - - Simulator - --------- - - . [Mythen3] Packet size + * [Mythen3] Packet size Fixed packet size calculation. Previously, sending only header with no data. - Receiver - -------- +1.7. Receiver +------------- - . Refactored and fixed minor issues + + Breaking API: + + + * Namespace sls + All the receiver source files have also been added to namespace sls. + + + * HDF5 and Binary writer version + Changed from 6.3 to 6.4 + + + * Master file format to json + The format has been changed from ASCII to json. + + + * Geometry metadata + Added geometry (number of modules in each direction) to metadata in file. + + + * HDF5 Dataset name + Changed to just "data" to simplify for user + + + * File write + File write is disabled by default. + + + + Fixes: + + + * Refactored and fixed minor issues Including memory structure and udp sockets. Fixed progress also in discard partial packaets mode and deactivated ports. Fixed 200% progress. Completely padded images now have detector type or version in metadata. Fixed getting stuck at stop receiver when using zmq Fixed clang compiler warnings - - . [Eiger] Datastream command order - The order of commands to set datastream from client mattered previously. - Datastream had to be set before 10GbE enable. Order does not matter anymore. - . Multiple files + + * Multiple files This bug was introduced in v6.0.0, where 1 file was created per frame after the first file. Fixed by resetting the number of frames in current file when creating a new one. - . [Mythen3] Incorrect number of packets calculated or tengiga not set up - Runnig config second time (with tengiga=0, dr !=32, counters !=0x7) - calculated incorrect image size expected due to inconsistent copy of - detector parameters. Fixed - . Storage cells in receiver - Previously not updated in receiver. Fixed. + * [Eiger] Datastream command order + The order of commands to set datastream from client mattered previously. + Datastream had to be set before 10GbE enable. Order does not matter anymore. - . Virtual HDF5 Parameter datasets - Corner case bug when frames caught is not a multiple of frames per file. - Not found in virtual image datasets. Fixed. - . Stuck when using zmq - More often in 6.1.1, gets stuck at stop receiver. - - . Udp destination MAC + * Udp destination MAC If it has been set before, changing udp_dstip will not update udp_dstmac. Fixed to always set it in detector even if it had a value before. Udp_dstmac can still be used to overwrite again. This is useful when using a router for example. - Gui - --- + * Stuck when using zmq + More often in 6.1.1, gets stuck at stop receiver. - . [Mythen3] Inconsistent timing mode + + * [Mythen3] Incorrect number of packets calculated or tengiga not set up + Runnig config second time (with tengiga=0, dr !=32, counters !=0x7) + calculated incorrect image size expected due to inconsistent copy of + detector parameters. Fixed + + + * Storage cells in receiver + Previously not updated in receiver. Fixed. + + + * Virtual HDF5 Parameter datasets + Corner case bug when frames caught is not a multiple of frames per file. + Not found in virtual image datasets. Fixed. + + + + Changes: + + + * Master file created at end of acquisition + The file is now written at the end of acquisition. So if any metadata + is changed during an acquisition, it will reflect the last value. + + + * File name prefix + Slash '/' not allowed. + + + + Additional Features: + + + * [Gotthard2] 25um image reconstruction in virtual HDF5 + Virtual HDF5 reconstructs complete image by interleaving first module + (master) with second module (slave). First channel of master is first + channel of detector. + + Requires firmware update to reverse channels of slaves. + + + * Memory size + Increased an internal fifo header by 8 bytes to align memory allocated for + to receive images for efficiency. + + + +1.8. Gui +-------- + + * [Jungfrau][Eiger] Gap pixels + Enabled by default in the gui. + + + * High voltage moved from Developer tab to Settings tab. + + + * Gain plot zooming + Zooming disabled. Instead, it automatically zooms in when you zoom in + the main plot or if min and max of x and y axis set up in plot tab. + + + * [Mythen3] Inconsistent timing mode Timing mode of the slaves should be discarded before squashing. Fixed. - . [Mythen3][Gotthard2] Crashes + + * [Mythen3][Gotthard2] Crashes Additional locking Added - Python - ------- - - . Python sub-microsecond resolution - Reading back sub-microsecond exposure times from the Python API fixed by - addig Python datetime supports only micro seconds as lowest unit. - - This is fixed by introducing a new C++ type (DurationWrapper), which - holds number of nanoseconds as a uint64_t (only in python bindings) and - custom typecaster to convert to and from std::chrono::nanoseconds. - - A get using API now returns in DurationWrapper, instead of datetime. - Refer exptime help for examples. - - - -- adding LTO to test and disable them for Debug builds? -- support external build of python lib, - - - 3. Firmware Requirements ======================== From 34a43bcb6746d08587ab9b5d6cc2035cca984d87 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Mon, 5 Dec 2022 13:09:52 +0100 Subject: [PATCH 13/24] datastream help, versions fix for eiger (hardwareversion not impl), fix for tests --- slsDetectorSoftware/src/CmdProxy.cpp | 4 +- slsDetectorSoftware/src/CmdProxy.h | 2 +- .../tests/test-CmdProxy-eiger.cpp | 24 +++---- .../tests/test-CmdProxy-jungfrau.cpp | 32 --------- .../tests/test-CmdProxy-rx.cpp | 10 ++- slsDetectorSoftware/tests/test-CmdProxy.cpp | 69 ++++++++++++++++--- 6 files changed, 82 insertions(+), 59 deletions(-) diff --git a/slsDetectorSoftware/src/CmdProxy.cpp b/slsDetectorSoftware/src/CmdProxy.cpp index 35f3cf777..bb37e1db9 100644 --- a/slsDetectorSoftware/src/CmdProxy.cpp +++ b/slsDetectorSoftware/src/CmdProxy.cpp @@ -274,12 +274,13 @@ std::string CmdProxy::Versions(int action) { if (!args.empty()) { WrongNumberOfParameters(0); } + bool eiger = (det->getDetectorType().squash() == defs::EIGER); auto t = det->getFirmwareVersion(std::vector{det_id}); os << "\nType : " << OutString(det->getDetectorType()) << "\nRelease : " << det->getPackageVersion() << std::hex << "\nClient : " << det->getClientVersion(); os << "\nFirmware : "; - if (det->getDetectorType().squash() == defs::EIGER) { + if (eiger) { os << OutString(t); } else { os << OutStringHex(t); @@ -287,6 +288,7 @@ std::string CmdProxy::Versions(int action) { os << "\nServer : " << OutString( det->getDetectorServerVersion(std::vector{det_id})); + if (!eiger) os << "\nHardware : " << OutString(det->getHardwareVersion(std::vector{det_id})); os << "\nKernel : " diff --git a/slsDetectorSoftware/src/CmdProxy.h b/slsDetectorSoftware/src/CmdProxy.h index 3b5424830..dd3b69449 100644 --- a/slsDetectorSoftware/src/CmdProxy.h +++ b/slsDetectorSoftware/src/CmdProxy.h @@ -1599,7 +1599,7 @@ class CmdProxy { "data from detector. Default: 1.\n\tAlso enables second interface in " "receiver for listening (Writes a file per interface if writing " "enabled).\n\tAlso restarts client and receiver zmq sockets if zmq " - "streaming enabled."); + "streaming enabled.\n\t[Eiger] Only gets with result 2."); INTEGER_COMMAND_VEC_ID( selinterface, getSelectedUDPInterface, selectUDPInterface, diff --git a/slsDetectorSoftware/tests/test-CmdProxy-eiger.cpp b/slsDetectorSoftware/tests/test-CmdProxy-eiger.cpp index 4aadf686c..ebab79135 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy-eiger.cpp +++ b/slsDetectorSoftware/tests/test-CmdProxy-eiger.cpp @@ -235,7 +235,7 @@ TEST_CASE("Setting and reading back EIGER dacs", "[.cmd][.dacs]") { /* Network Configuration (Detector<->Receiver) */ -TEST_CASE("txndelay_left", "[.cmd]") { +TEST_CASE("txdelay_left", "[.cmd]") { Detector det; CmdProxy proxy(&det); auto det_type = det.getDetectorType().squash(); @@ -243,20 +243,20 @@ TEST_CASE("txndelay_left", "[.cmd]") { auto prev_val = det.getTransmissionDelayLeft(); { std::ostringstream oss1, oss2; - proxy.Call("txndelay_left", {"5000"}, -1, PUT, oss1); - REQUIRE(oss1.str() == "txndelay_left 5000\n"); - proxy.Call("txndelay_left", {}, -1, GET, oss2); - REQUIRE(oss2.str() == "txndelay_left 5000\n"); + proxy.Call("txdelay_left", {"5000"}, -1, PUT, oss1); + REQUIRE(oss1.str() == "txdelay_left 5000\n"); + proxy.Call("txdelay_left", {}, -1, GET, oss2); + REQUIRE(oss2.str() == "txdelay_left 5000\n"); } for (int i = 0; i != det.size(); ++i) { det.setTransmissionDelayLeft(prev_val[i]); } } else { - REQUIRE_THROWS(proxy.Call("txndelay_left", {}, -1, GET)); + REQUIRE_THROWS(proxy.Call("txdelay_left", {}, -1, GET)); } } -TEST_CASE("txndelay_right", "[.cmd]") { +TEST_CASE("txdelay_right", "[.cmd]") { Detector det; CmdProxy proxy(&det); auto det_type = det.getDetectorType().squash(); @@ -264,16 +264,16 @@ TEST_CASE("txndelay_right", "[.cmd]") { auto prev_val = det.getTransmissionDelayRight(); { std::ostringstream oss1, oss2; - proxy.Call("txndelay_right", {"5000"}, -1, PUT, oss1); - REQUIRE(oss1.str() == "txndelay_right 5000\n"); - proxy.Call("txndelay_right", {}, -1, GET, oss2); - REQUIRE(oss2.str() == "txndelay_right 5000\n"); + proxy.Call("txdelay_right", {"5000"}, -1, PUT, oss1); + REQUIRE(oss1.str() == "txdelay_right 5000\n"); + proxy.Call("txdelay_right", {}, -1, GET, oss2); + REQUIRE(oss2.str() == "txdelay_right 5000\n"); } for (int i = 0; i != det.size(); ++i) { det.setTransmissionDelayRight(prev_val[i]); } } else { - REQUIRE_THROWS(proxy.Call("txndelay_right", {}, -1, GET)); + REQUIRE_THROWS(proxy.Call("txdelay_right", {}, -1, GET)); } } diff --git a/slsDetectorSoftware/tests/test-CmdProxy-jungfrau.cpp b/slsDetectorSoftware/tests/test-CmdProxy-jungfrau.cpp index 87814f281..5ac516b9a 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy-jungfrau.cpp +++ b/slsDetectorSoftware/tests/test-CmdProxy-jungfrau.cpp @@ -98,38 +98,6 @@ TEST_CASE("Setting and reading back Jungfrau dacs", "[.cmd][.dacs]") { /* Network Configuration (Detector<->Receiver) */ -TEST_CASE("numinterfaces", "[.cmd]") { - Detector det; - CmdProxy proxy(&det); - auto det_type = det.getDetectorType().squash(); - if (det_type == defs::JUNGFRAU) { - auto prev_val = det.getNumberofUDPInterfaces().tsquash( - "inconsistent numinterfaces to test"); - { - std::ostringstream oss; - proxy.Call("numinterfaces", {"2"}, -1, PUT, oss); - REQUIRE(oss.str() == "numinterfaces 2\n"); - } - { - std::ostringstream oss; - proxy.Call("numinterfaces", {"1"}, -1, PUT, oss); - REQUIRE(oss.str() == "numinterfaces 1\n"); - } - { - std::ostringstream oss; - proxy.Call("numinterfaces", {}, -1, GET, oss); - REQUIRE(oss.str() == "numinterfaces 1\n"); - } - det.setNumberofUDPInterfaces(prev_val); - } else { - std::ostringstream oss; - proxy.Call("numinterfaces", {}, -1, GET, oss); - REQUIRE(oss.str() == "numinterfaces 1\n"); - REQUIRE_THROWS(proxy.Call("numinterfaces", {"1"}, -1, PUT)); - } - REQUIRE_THROWS(proxy.Call("numinterfaces", {"3"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("numinterfaces", {"0"}, -1, PUT)); -} TEST_CASE("selinterface", "[.cmd]") { Detector det; diff --git a/slsDetectorSoftware/tests/test-CmdProxy-rx.cpp b/slsDetectorSoftware/tests/test-CmdProxy-rx.cpp index 93a10227d..1f4b7e8fa 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy-rx.cpp +++ b/slsDetectorSoftware/tests/test-CmdProxy-rx.cpp @@ -4,6 +4,7 @@ #include "catch.hpp" #include "sls/Detector.h" #include "sls/sls_detector_defs.h" +#include "sls/Version.h" #include #include "sls/versionAPI.h" @@ -26,15 +27,15 @@ TEST_CASE("rx_version", "[.cmd][.rx]") { CmdProxy proxy(&det); std::ostringstream oss; proxy.Call("rx_version", {}, -1, GET, oss); + sls::Version v(APIRECEIVER); std::ostringstream vs; - vs << "rx_version 0x" << std::hex << APIRECEIVER << '\n'; + vs << "rx_version " << v.concise() << '\n'; REQUIRE(oss.str() == vs.str()); REQUIRE_THROWS(proxy.Call("rx_version", {"0"}, -1, PUT)); } /* acquisition */ - TEST_CASE("rx_start", "[.cmd][.rx]") { Detector det; CmdProxy proxy(&det); @@ -128,6 +129,9 @@ TEST_CASE("rx_missingpackets", "[.cmd][.rx]") { auto prev_val = det.getFileWrite(); det.setFileWrite(false); // avoid writing or error on file creation CmdProxy proxy(&det); + auto prev_frames = + det.getNumberOfFrames().tsquash("inconsistent #frames in test"); + det.setNumberOfFrames(100); { // some missing packets det.startReceiver(); @@ -144,6 +148,7 @@ TEST_CASE("rx_missingpackets", "[.cmd][.rx]") { { // 0 missing packets (takes into account that acquisition is stopped) det.startReceiver(); + det.startDetector(); det.stopDetector(); det.stopReceiver(); std::ostringstream oss; @@ -337,6 +342,7 @@ TEST_CASE("rx_padding", "[.cmd][.rx]") { } TEST_CASE("rx_udpsocksize", "[.cmd][.rx]") { + //exit(-1); Detector det; CmdProxy proxy(&det); int64_t prev_val = det.getRxUDPSocketBufferSize().tsquash( diff --git a/slsDetectorSoftware/tests/test-CmdProxy.cpp b/slsDetectorSoftware/tests/test-CmdProxy.cpp index f57a0bf71..6afeeac1e 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy.cpp +++ b/slsDetectorSoftware/tests/test-CmdProxy.cpp @@ -117,8 +117,15 @@ TEST_CASE("detectorserverversion", "[.cmd]") { TEST_CASE("hardwareversion", "[.cmd]") { Detector det; CmdProxy proxy(&det); - REQUIRE_NOTHROW(proxy.Call("hardwareversion", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("hardwareversion", {"0"}, -1, PUT)); + auto det_type = det.getDetectorType().squash(); + if (det_type != defs::EIGER) { + REQUIRE_NOTHROW(proxy.Call("hardwareversion", {}, -1, GET)); + REQUIRE_THROWS(proxy.Call("hardwareversion", {"0"}, -1, PUT)); + } else { + REQUIRE_THROWS(proxy.Call("hardwareversion", {"0"}, -1, PUT)); + REQUIRE_THROWS(proxy.Call("hardwareversion", {}, -1, GET)); + + } } TEST_CASE("kernelversion", "[.cmd]") { @@ -2382,6 +2389,46 @@ TEST_CASE("scanerrmsg", "[.cmd]") { /* Network Configuration (Detector<->Receiver) */ +TEST_CASE("numinterfaces", "[.cmd]") { + Detector det; + CmdProxy proxy(&det); + auto det_type = det.getDetectorType().squash(); + if (det_type == defs::JUNGFRAU) { + auto prev_val = det.getNumberofUDPInterfaces().tsquash( + "inconsistent numinterfaces to test"); + { + std::ostringstream oss; + proxy.Call("numinterfaces", {"2"}, -1, PUT, oss); + REQUIRE(oss.str() == "numinterfaces 2\n"); + } + { + std::ostringstream oss; + proxy.Call("numinterfaces", {"1"}, -1, PUT, oss); + REQUIRE(oss.str() == "numinterfaces 1\n"); + } + { + std::ostringstream oss; + proxy.Call("numinterfaces", {}, -1, GET, oss); + REQUIRE(oss.str() == "numinterfaces 1\n"); + } + det.setNumberofUDPInterfaces(prev_val); + } else if (det_type == defs::EIGER) { + REQUIRE_THROWS(proxy.Call("numinterfaces", {"1"}, -1, PUT)); + { + std::ostringstream oss; + proxy.Call("numinterfaces", {}, -1, GET, oss); + REQUIRE(oss.str() == "numinterfaces 2\n"); + } + } else { + std::ostringstream oss; + proxy.Call("numinterfaces", {}, -1, GET, oss); + REQUIRE(oss.str() == "numinterfaces 1\n"); + REQUIRE_THROWS(proxy.Call("numinterfaces", {"1"}, -1, PUT)); + } + REQUIRE_THROWS(proxy.Call("numinterfaces", {"3"}, -1, PUT)); + REQUIRE_THROWS(proxy.Call("numinterfaces", {"0"}, -1, PUT)); +} + TEST_CASE("udp_srcip", "[.cmd]") { Detector det; CmdProxy proxy(&det); @@ -2664,7 +2711,7 @@ TEST_CASE("flowcontrol10g", "[.cmd]") { } } -TEST_CASE("txndelay_frame", "[.cmd]") { +TEST_CASE("txdelay_frame", "[.cmd]") { Detector det; CmdProxy proxy(&det); auto det_type = det.getDetectorType().squash(); @@ -2678,16 +2725,16 @@ TEST_CASE("txndelay_frame", "[.cmd]") { std::string sval = std::to_string(val); { std::ostringstream oss1, oss2; - proxy.Call("txndelay_frame", {sval}, -1, PUT, oss1); - REQUIRE(oss1.str() == "txndelay_frame " + sval + "\n"); - proxy.Call("txndelay_frame", {}, -1, GET, oss2); - REQUIRE(oss2.str() == "txndelay_frame " + sval + "\n"); + proxy.Call("txdelay_frame", {sval}, -1, PUT, oss1); + REQUIRE(oss1.str() == "txdelay_frame " + sval + "\n"); + proxy.Call("txdelay_frame", {}, -1, GET, oss2); + REQUIRE(oss2.str() == "txdelay_frame " + sval + "\n"); } for (int i = 0; i != det.size(); ++i) { det.setTransmissionDelayFrame(prev_val[i]); } } else { - REQUIRE_THROWS(proxy.Call("txndelay_frame", {}, -1, GET)); + REQUIRE_THROWS(proxy.Call("txdelay_frame", {}, -1, GET)); } } @@ -2721,11 +2768,11 @@ TEST_CASE("txdelay", "[.cmd]") { for (int i = 0; i != det.size(); ++i) { if (eiger) { REQUIRE(det.getTransmissionDelayLeft({i}).squash(-1) == - (3 * i * val)); + (2 * i * val)); REQUIRE(det.getTransmissionDelayRight({i}).squash(-1) == - ((3 * i + 1) * val)); + ((2 * i + 1) * val)); REQUIRE(det.getTransmissionDelayFrame({i}).squash(-1) == - ((3 * i + 2) * val)); + (2 * det.size() * val)); } else { REQUIRE(det.getTransmissionDelayFrame({i}).squash(-1) == (i * val)); From 964bdf5fc359a1e4ab22c83a5607ab97c41d6193 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Mon, 5 Dec 2022 13:17:16 +0100 Subject: [PATCH 14/24] fix for changing udp socket buffer size --- slsDetectorSoftware/tests/test-CmdProxy-rx.cpp | 1 - slsReceiverSoftware/src/Listener.cpp | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/slsDetectorSoftware/tests/test-CmdProxy-rx.cpp b/slsDetectorSoftware/tests/test-CmdProxy-rx.cpp index 1f4b7e8fa..ce642829e 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy-rx.cpp +++ b/slsDetectorSoftware/tests/test-CmdProxy-rx.cpp @@ -342,7 +342,6 @@ TEST_CASE("rx_padding", "[.cmd][.rx]") { } TEST_CASE("rx_udpsocksize", "[.cmd][.rx]") { - //exit(-1); Detector det; CmdProxy proxy(&det); int64_t prev_val = det.getRxUDPSocketBufferSize().tsquash( diff --git a/slsReceiverSoftware/src/Listener.cpp b/slsReceiverSoftware/src/Listener.cpp index 1c970e21e..68ac3ca50 100644 --- a/slsReceiverSoftware/src/Listener.cpp +++ b/slsReceiverSoftware/src/Listener.cpp @@ -205,6 +205,8 @@ void Listener::CreateDummySocketForUDPSocketBufferSize(int s, int &actualSize) { // create dummy socket try { + // to allowe ports to be bound from udpsocket + udpSocket.reset(); UdpRxSocket g( udpPortNumber, packetSize, (eth.length() ? InterfaceNameToIp(eth).str().c_str() : nullptr), @@ -218,7 +220,7 @@ void Listener::CreateDummySocketForUDPSocketBufferSize(int s, int &actualSize) { } else { generalData->udpSocketBufferSize = actualSize / 2; } - + // to allow udp sockets to be able to bind in the future } catch (...) { throw RuntimeError("Could not create a test UDP socket on port " + std::to_string(udpPortNumber)); From c5e0b9def8adb074accf3830151b82864c04f7a8 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Mon, 5 Dec 2022 16:36:23 +0100 Subject: [PATCH 15/24] fixed tests --- slsDetectorSoftware/tests/test-CmdProxy-rx.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/slsDetectorSoftware/tests/test-CmdProxy-rx.cpp b/slsDetectorSoftware/tests/test-CmdProxy-rx.cpp index ce642829e..f2e88c59d 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy-rx.cpp +++ b/slsDetectorSoftware/tests/test-CmdProxy-rx.cpp @@ -493,9 +493,9 @@ TEST_CASE("rx_roi", "[.cmd]") { -1, PUT, oss); REQUIRE(oss.str() == std::string("rx_roi [1, ") + std::to_string(detsize.x - 5) + - std::string(", ") + + std::string(", 1, ") + std::to_string(detsize.y - 5) + - std::string(", 1]\n")); + std::string("]\n")); } REQUIRE_THROWS( proxy.Call("rx_roi", {"-1", "-1", "-1", "-1"}, -1, PUT)); From dae07dabf349d75d6c952ecfc9a5ff98e26600b0 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Mon, 5 Dec 2022 17:07:46 +0100 Subject: [PATCH 16/24] fixed tests to get headwareversion number instead of serial number to know ic 2.0 jf boards nd also the set master fail only if more than 1 detector (fix intests only) --- slsDetectorSoftware/tests/test-CmdProxy.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/slsDetectorSoftware/tests/test-CmdProxy.cpp b/slsDetectorSoftware/tests/test-CmdProxy.cpp index 6afeeac1e..b5b28bfee 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy.cpp +++ b/slsDetectorSoftware/tests/test-CmdProxy.cpp @@ -566,8 +566,8 @@ TEST_CASE("fliprows", "[.cmd]") { auto det_type = det.getDetectorType().squash(); bool jungfrauhw2 = false; if (det_type == defs::JUNGFRAU && - ((det.getSerialNumber().tsquash("inconsistent serial number to test") & - 0x30000) == 0x30000)) { + ((det.getHardwareVersion().tsquash("inconsistent serial number to test") + == "2.0"))) { jungfrauhw2 = true; } if (det_type == defs::EIGER || jungfrauhw2) { @@ -625,7 +625,9 @@ TEST_CASE("master", "[.cmd]") { proxy.Call("master", {"1"}, 0, PUT, oss1); REQUIRE(oss1.str() == "master 1\n"); } - REQUIRE_THROWS(proxy.Call("master", {"1"}, -1, PUT)); + if (det.size() > 1) { + REQUIRE_THROWS(proxy.Call("master", {"1"}, -1, PUT)); + } // set all to slaves, and then master for (int i = 0; i != det.size(); ++i) { det.setMaster(0, {i}); @@ -1650,9 +1652,8 @@ TEST_CASE("readnrows", "[.cmd]") { if (det_type == defs::EIGER || det_type == defs::JUNGFRAU) { bool jungfrauhw2 = false; if (det_type == defs::JUNGFRAU && - ((det.getSerialNumber().tsquash( - "inconsistent serial number to test") & - 0x30000) == 0x30000)) { + ((det.getHardwareVersion().tsquash("inconsistent hardware version number to test") + == "2.0"))) { jungfrauhw2 = true; } if (det_type == defs::JUNGFRAU && !jungfrauhw2) { From 1cc7d512e0042268233e51424f06885beef5c3d0 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Mon, 5 Dec 2022 17:43:01 +0100 Subject: [PATCH 17/24] tests: transmission delay cannot be got for a single module for jf and m3, resetting fpga is not an option to test others --- slsDetectorSoftware/tests/test-CmdProxy.cpp | 106 +++++++++++--------- 1 file changed, 61 insertions(+), 45 deletions(-) diff --git a/slsDetectorSoftware/tests/test-CmdProxy.cpp b/slsDetectorSoftware/tests/test-CmdProxy.cpp index b5b28bfee..8e5fc1b87 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy.cpp +++ b/slsDetectorSoftware/tests/test-CmdProxy.cpp @@ -2745,50 +2745,65 @@ TEST_CASE("txdelay", "[.cmd]") { auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER || det_type == defs::JUNGFRAU || det_type == defs::MYTHEN3) { - Result prev_left, prev_right; - bool eiger = false; - if (det_type == defs::EIGER) { - eiger = true; - prev_left = det.getTransmissionDelayLeft(); - prev_right = det.getTransmissionDelayRight(); - } - auto prev_frame = det.getTransmissionDelayFrame(); - auto val = 5000; - if (det_type == defs::JUNGFRAU || det_type == defs::MYTHEN3) { - val = 5; - } - std::string sval = std::to_string(val); - { - std::ostringstream oss1, oss2; - proxy.Call("txdelay", {sval}, -1, PUT, oss1); - REQUIRE(oss1.str() == "txdelay " + sval + "\n"); - proxy.Call("txdelay", {}, -1, GET, oss2); - REQUIRE(oss2.str() == "txdelay " + sval + "\n"); - } - // test other mods - for (int i = 0; i != det.size(); ++i) { - if (eiger) { - REQUIRE(det.getTransmissionDelayLeft({i}).squash(-1) == - (2 * i * val)); - REQUIRE(det.getTransmissionDelayRight({i}).squash(-1) == - ((2 * i + 1) * val)); - REQUIRE(det.getTransmissionDelayFrame({i}).squash(-1) == - (2 * det.size() * val)); - } else { - REQUIRE(det.getTransmissionDelayFrame({i}).squash(-1) == - (i * val)); - } - } - // not a module level command - REQUIRE_THROWS(proxy.Call("txdelay", {"5"}, 0, PUT)); - REQUIRE_THROWS(proxy.Call("txdelay", {}, 0, GET)); - for (int i = 0; i != det.size(); ++i) { - if (eiger) { - det.setTransmissionDelayLeft(prev_left[i]); - det.setTransmissionDelayRight(prev_right[i]); + // cannot get transmission delay with just one module + if ((det_type == defs::JUNGFRAU || det_type == defs::MYTHEN3) && (det.size() < 2)) { + REQUIRE_THROWS(proxy.Call("txdelay", {}, -1, GET)); + int val = 5; + std::string sval = std::to_string(val); + { + std::ostringstream oss1; + proxy.Call("txdelay", {sval}, -1, PUT, oss1); + REQUIRE(oss1.str() == "txdelay " + sval + "\n"); + } + } + + else { + Result prev_left, prev_right; + bool eiger = false; + if (det_type == defs::EIGER) { + eiger = true; + prev_left = det.getTransmissionDelayLeft(); + prev_right = det.getTransmissionDelayRight(); + } + auto prev_frame = det.getTransmissionDelayFrame(); + auto val = 5000; + if (det_type == defs::JUNGFRAU || det_type == defs::MYTHEN3) { + val = 5; + } + std::string sval = std::to_string(val); + { + std::ostringstream oss1, oss2; + proxy.Call("txdelay", {sval}, -1, PUT, oss1); + REQUIRE(oss1.str() == "txdelay " + sval + "\n"); + proxy.Call("txdelay", {}, -1, GET, oss2); + REQUIRE(oss2.str() == "txdelay " + sval + "\n"); + } + // test other mods + for (int i = 0; i != det.size(); ++i) { + if (eiger) { + REQUIRE(det.getTransmissionDelayLeft({i}).squash(-1) == + (2 * i * val)); + REQUIRE(det.getTransmissionDelayRight({i}).squash(-1) == + ((2 * i + 1) * val)); + REQUIRE(det.getTransmissionDelayFrame({i}).squash(-1) == + (2 * det.size() * val)); + } else { + REQUIRE(det.getTransmissionDelayFrame({i}).squash(-1) == + (i * val)); + } + } + // not a module level command + REQUIRE_THROWS(proxy.Call("txdelay", {"5"}, 0, PUT)); + REQUIRE_THROWS(proxy.Call("txdelay", {}, 0, GET)); + + for (int i = 0; i != det.size(); ++i) { + if (eiger) { + det.setTransmissionDelayLeft(prev_left[i]); + det.setTransmissionDelayRight(prev_right[i]); + } + det.setTransmissionDelayFrame(prev_frame[i]); } - det.setTransmissionDelayFrame(prev_frame[i]); } } else { REQUIRE_THROWS(proxy.Call("txdelay", {}, -1, GET)); @@ -2912,9 +2927,10 @@ TEST_CASE("resetfpga", "[.cmd]") { auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU || det_type == defs::CHIPTESTBOARD || det_type == defs::MOENCH) { - std::ostringstream oss; - proxy.Call("resetfpga", {}, -1, PUT, oss); - REQUIRE(oss.str() == "resetfpga successful\n"); + // reset will also reset udp info from config file (comment out for invdividual tests) + // std::ostringstream oss; + // proxy.Call("resetfpga", {}, -1, PUT, oss); + // REQUIRE(oss.str() == "resetfpga successful\n"); REQUIRE_THROWS(proxy.Call("resetfpga", {}, -1, GET)); } else { REQUIRE_THROWS(proxy.Call("resetfpga", {}, -1, GET)); From f8a612c0e271642f8f630165023b2c4e0deade9d Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Tue, 6 Dec 2022 10:08:23 +0100 Subject: [PATCH 18/24] fix tests to not allow setting udp interfaces at a single module level --- slsDetectorSoftware/tests/test-CmdProxy-rx.cpp | 9 +++++---- slsDetectorSoftware/tests/test-CmdProxy.cpp | 9 ++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/slsDetectorSoftware/tests/test-CmdProxy-rx.cpp b/slsDetectorSoftware/tests/test-CmdProxy-rx.cpp index f2e88c59d..4cb66bdbf 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy-rx.cpp +++ b/slsDetectorSoftware/tests/test-CmdProxy-rx.cpp @@ -163,6 +163,7 @@ TEST_CASE("rx_missingpackets", "[.cmd][.rx]") { for (int i = 0; i != det.size(); ++i) { det.setFileWrite(prev_val[i], {i}); } + det.setNumberOfFrames(prev_frames); } TEST_CASE("rx_frameindex", "[.cmd][.rx]") { @@ -797,7 +798,7 @@ TEST_CASE("rx_zmqport", "[.cmd][.rx]") { Detector det; CmdProxy proxy(&det); auto prev_val_zmqport = det.getRxZmqPort(); - auto prev_val_numinterfaces = det.getNumberofUDPInterfaces(); + auto prev_val_numinterfaces = det.getNumberofUDPInterfaces().tsquash("inconsistent number of udp interfaces to test"); int socketsperdetector = 1; auto det_type = det.getDetectorType().squash(); @@ -827,9 +828,9 @@ TEST_CASE("rx_zmqport", "[.cmd][.rx]") { } for (int i = 0; i != det.size(); ++i) { det.setRxZmqPort(prev_val_zmqport[i], i); - if (det_type == defs::JUNGFRAU) { - det.setNumberofUDPInterfaces(prev_val_numinterfaces[i], {i}); - } + } + if (det_type == defs::JUNGFRAU) { + det.setNumberofUDPInterfaces(prev_val_numinterfaces); } } diff --git a/slsDetectorSoftware/tests/test-CmdProxy.cpp b/slsDetectorSoftware/tests/test-CmdProxy.cpp index 8e5fc1b87..d668b6eaf 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy.cpp +++ b/slsDetectorSoftware/tests/test-CmdProxy.cpp @@ -28,7 +28,6 @@ TEST_CASE("Calling help doesn't throw or cause segfault") { } TEST_CASE("Unknown command", "[.cmd]") { - Detector det; CmdProxy proxy(&det); REQUIRE_THROWS(proxy.Call("vsaevrreavv", {}, -1, PUT)); @@ -572,7 +571,7 @@ TEST_CASE("fliprows", "[.cmd]") { } if (det_type == defs::EIGER || jungfrauhw2) { auto previous = det.getFlipRows(); - auto previous_numudp = det.getNumberofUDPInterfaces(); + auto previous_numudp = det.getNumberofUDPInterfaces().tsquash("inconsistent number of udp interfaces to test"); if (det_type == defs::JUNGFRAU) { det.setNumberofUDPInterfaces(2); } @@ -585,9 +584,9 @@ TEST_CASE("fliprows", "[.cmd]") { REQUIRE(oss3.str() == "fliprows 0\n"); for (int i = 0; i != det.size(); ++i) { det.setFlipRows(previous[i], {i}); - if (det_type == defs::JUNGFRAU) { - det.setNumberofUDPInterfaces(previous_numudp[i], {i}); - } + } + if (det_type == defs::JUNGFRAU) { + det.setNumberofUDPInterfaces(previous_numudp); } } else { REQUIRE_THROWS(proxy.Call("fliprows", {}, -1, GET)); From bb01f90e1f2aa3ccf537d09259c580f47313b8fd Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Tue, 6 Dec 2022 10:21:45 +0100 Subject: [PATCH 19/24] fix tests to not allow setting veto stream at a single module level --- .../tests/test-CmdProxy-gotthard2.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/slsDetectorSoftware/tests/test-CmdProxy-gotthard2.cpp b/slsDetectorSoftware/tests/test-CmdProxy-gotthard2.cpp index ea86b483e..4ee25036e 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy-gotthard2.cpp +++ b/slsDetectorSoftware/tests/test-CmdProxy-gotthard2.cpp @@ -33,7 +33,7 @@ TEST_CASE("timegotthard2", "[.cmd]") { { std::ostringstream oss; proxy.Call("exptime", {}, -1, GET, oss); - REQUIRE(oss.str() == "exptime 222ns\n"); + REQUIRE(oss.str() == "exptime 221ns\n"); } for (int i = 0; i != det.size(); ++i) { det.setExptime(prev_val[i], {i}); @@ -48,7 +48,7 @@ TEST_CASE("timegotthard2", "[.cmd]") { { std::ostringstream oss; proxy.Call("burstperiod", {}, -1, GET, oss); - REQUIRE(oss.str() == "burstperiod 222ns\n"); + REQUIRE(oss.str() == "burstperiod 221ns\n"); } for (int i = 0; i != det.size(); ++i) { det.setBurstPeriod(prev_val[i], {i}); @@ -63,7 +63,7 @@ TEST_CASE("timegotthard2", "[.cmd]") { { std::ostringstream oss; proxy.Call("delay", {}, -1, GET, oss); - REQUIRE(oss.str() == "delay 222ns\n"); + REQUIRE(oss.str() == "delay 221ns\n"); } for (int i = 0; i != det.size(); ++i) { det.setDelayAfterTrigger(prev_val[i], {i}); @@ -80,7 +80,7 @@ TEST_CASE("timegotthard2", "[.cmd]") { { std::ostringstream oss; proxy.Call("period", {}, -1, GET, oss); - REQUIRE(oss.str() == "period 222ns\n"); + REQUIRE(oss.str() == "period 221ns\n"); } for (int i = 0; i != det.size(); ++i) { det.setPeriod(prev_val[i], {i}); @@ -96,7 +96,7 @@ TEST_CASE("timegotthard2", "[.cmd]") { { std::ostringstream oss; proxy.Call("period", {}, -1, GET, oss); - REQUIRE(oss.str() == "period 222ns\n"); + REQUIRE(oss.str() == "period 221ns\n"); } for (int i = 0; i != det.size(); ++i) { det.setPeriod(prev_val[i], {i}); @@ -586,7 +586,7 @@ TEST_CASE("vetostream", "[.cmd]") { CmdProxy proxy(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::GOTTHARD2) { - auto prev_val = det.getVetoStream(); + auto prev_val = det.getVetoStream().tsquash("inconsistent veto stream to test"); { std::ostringstream oss; proxy.Call("vetostream", {"none"}, -1, PUT, oss); @@ -618,9 +618,7 @@ TEST_CASE("vetostream", "[.cmd]") { REQUIRE(oss.str() == "vetostream lll, 10gbe\n"); } REQUIRE_THROWS(proxy.Call("vetostream", {"lll", "none"}, -1, PUT)); - for (int i = 0; i != det.size(); ++i) { - det.setVetoStream(prev_val[i], {i}); - } + det.setVetoStream(prev_val); } else { REQUIRE_THROWS(proxy.Call("vetostream", {}, -1, GET)); REQUIRE_THROWS(proxy.Call("vetostream", {"none"}, -1, PUT)); From 4614e0873a9b2a30697ae308d993f137c62edff3 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Tue, 6 Dec 2022 10:34:17 +0100 Subject: [PATCH 20/24] fix to tests m3 --- slsDetectorSoftware/tests/test-CmdProxy-mythen3.cpp | 3 ++- slsDetectorSoftware/tests/test-CmdProxy.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/slsDetectorSoftware/tests/test-CmdProxy-mythen3.cpp b/slsDetectorSoftware/tests/test-CmdProxy-mythen3.cpp index dec3ab04c..02f0a49ad 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy-mythen3.cpp +++ b/slsDetectorSoftware/tests/test-CmdProxy-mythen3.cpp @@ -565,6 +565,7 @@ TEST_CASE("pumpprobe", "[.cmd]") { // mask with counter 2 disabled and enabled(to test vth2) uint32_t fixedMask[2] = {0x4, 0x3}; for (int i = 0; i != 2; ++i) { + std::cout << "i:"<< i < Date: Tue, 6 Dec 2022 10:52:33 +0100 Subject: [PATCH 21/24] fix m3 tests --- .../tests/test-CmdProxy-pattern.cpp | 6 +- slsDetectorSoftware/tests/test-CmdProxy.cpp | 140 +++++++++--------- 2 files changed, 76 insertions(+), 70 deletions(-) diff --git a/slsDetectorSoftware/tests/test-CmdProxy-pattern.cpp b/slsDetectorSoftware/tests/test-CmdProxy-pattern.cpp index 2b40bd175..5e5fc2a67 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy-pattern.cpp +++ b/slsDetectorSoftware/tests/test-CmdProxy-pattern.cpp @@ -40,8 +40,10 @@ TEST_CASE("savepattern", "[.cmd]") { det_type == defs::MYTHEN3) { REQUIRE_THROWS( proxy.Call("savepattern", {"/tmp/pattern.txt"}, -1, GET)); - REQUIRE_NOTHROW( - proxy.Call("savepattern", {"/tmp/pattern.txt"}, -1, PUT)); + if (det.size() == 1) { + REQUIRE_NOTHROW( + proxy.Call("savepattern", {"/tmp/pattern.txt"}, -1, PUT)); + } } else { REQUIRE_THROWS( proxy.Call("savepattern", {"/tmp/pattern.txt"}, -1, PUT)); diff --git a/slsDetectorSoftware/tests/test-CmdProxy.cpp b/slsDetectorSoftware/tests/test-CmdProxy.cpp index 203b501a3..74f06ba46 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy.cpp +++ b/slsDetectorSoftware/tests/test-CmdProxy.cpp @@ -2302,82 +2302,86 @@ TEST_CASE("scan", "[.cmd]") { // auto previous = det.getDAC(ind, false); // auto notImplementedPrevious = det.getDAC(notImplementedInd, false); - { - std::ostringstream oss; - proxy.Call("scan", {ToString(ind), "500", "1500", "500"}, -1, PUT, oss); - CHECK(oss.str() == "scan [" + ToString(ind) + ", 500, 1500, 500]\n"); - } - { - std::ostringstream oss; - proxy.Call("scan", {}, -1, GET, oss); - CHECK(oss.str() == "scan [enabled\ndac " + ToString(ind) + - "\nstart 500\nstop 1500\nstep " - "500\nsettleTime 1ms\n]\n"); - } - { - std::ostringstream oss; - proxy.Call("scan", {ToString(ind), "500", "1500", "500", "2s"}, -1, PUT, - oss); - CHECK(oss.str() == - "scan [" + ToString(ind) + ", 500, 1500, 500, 2s]\n"); - } - { - std::ostringstream oss; - proxy.Call("scan", {}, -1, GET, oss); - CHECK(oss.str() == "scan [enabled\ndac " + ToString(ind) + - "\nstart 500\nstop 1500\nstep " - "500\nsettleTime 2s\n]\n"); - } - { - std::ostringstream oss; - proxy.Call("scan", {"0"}, -1, PUT, oss); - CHECK(oss.str() == "scan [0]\n"); - } - { - std::ostringstream oss; - proxy.Call("scan", {}, -1, GET, oss); - CHECK(oss.str() == "scan [disabled]\n"); - } - { - std::ostringstream oss; - proxy.Call("scan", {ToString(ind), "1500", "500", "-500"}, -1, PUT, - oss); - CHECK(oss.str() == "scan [" + ToString(ind) + ", 1500, 500, -500]\n"); - } - CHECK_THROWS(proxy.Call( - "scan", {ToString(notImplementedInd), "500", "1500", "500"}, -1, PUT)); - CHECK_THROWS( - proxy.Call("scan", {ToString(ind), "500", "1500", "-500"}, -1, PUT)); - CHECK_THROWS( - proxy.Call("scan", {ToString(ind), "1500", "500", "500"}, -1, PUT)); - - if (det_type == defs::MYTHEN3 || defs::EIGER) { + if (det_type == defs::MYTHEN3 && det.size() > 1) { + ;// scan only allowed for single module due to sync + } else { { std::ostringstream oss; - proxy.Call("scan", {"trimbits", "0", "63", "16", "2s"}, -1, PUT, - oss); - CHECK(oss.str() == "scan [trimbits, 0, 63, 16, 2s]\n"); + proxy.Call("scan", {ToString(ind), "500", "1500", "500"}, -1, PUT, oss); + CHECK(oss.str() == "scan [" + ToString(ind) + ", 500, 1500, 500]\n"); } { std::ostringstream oss; proxy.Call("scan", {}, -1, GET, oss); - CHECK(oss.str() == - "scan [enabled\ndac trimbits\nstart 0\nstop 48\nstep " - "16\nsettleTime 2s\n]\n"); + CHECK(oss.str() == "scan [enabled\ndac " + ToString(ind) + + "\nstart 500\nstop 1500\nstep " + "500\nsettleTime 1ms\n]\n"); } + { + std::ostringstream oss; + proxy.Call("scan", {ToString(ind), "500", "1500", "500", "2s"}, -1, PUT, + oss); + CHECK(oss.str() == + "scan [" + ToString(ind) + ", 500, 1500, 500, 2s]\n"); + } + { + std::ostringstream oss; + proxy.Call("scan", {}, -1, GET, oss); + CHECK(oss.str() == "scan [enabled\ndac " + ToString(ind) + + "\nstart 500\nstop 1500\nstep " + "500\nsettleTime 2s\n]\n"); + } + { + std::ostringstream oss; + proxy.Call("scan", {"0"}, -1, PUT, oss); + CHECK(oss.str() == "scan [0]\n"); + } + { + std::ostringstream oss; + proxy.Call("scan", {}, -1, GET, oss); + CHECK(oss.str() == "scan [disabled]\n"); + } + { + std::ostringstream oss; + proxy.Call("scan", {ToString(ind), "1500", "500", "-500"}, -1, PUT, + oss); + CHECK(oss.str() == "scan [" + ToString(ind) + ", 1500, 500, -500]\n"); + } + CHECK_THROWS(proxy.Call( + "scan", {ToString(notImplementedInd), "500", "1500", "500"}, -1, PUT)); + CHECK_THROWS( + proxy.Call("scan", {ToString(ind), "500", "1500", "-500"}, -1, PUT)); + CHECK_THROWS( + proxy.Call("scan", {ToString(ind), "1500", "500", "500"}, -1, PUT)); + + if (det_type == defs::MYTHEN3 || defs::EIGER) { + { + std::ostringstream oss; + proxy.Call("scan", {"trimbits", "0", "63", "16", "2s"}, -1, PUT, + oss); + CHECK(oss.str() == "scan [trimbits, 0, 63, 16, 2s]\n"); + } + { + std::ostringstream oss; + proxy.Call("scan", {}, -1, GET, oss); + CHECK(oss.str() == + "scan [enabled\ndac trimbits\nstart 0\nstop 48\nstep " + "16\nsettleTime 2s\n]\n"); + } + } + + // Switch off scan for future tests + det.setScan(defs::scanParameters()); + // acquire for each? + + // when taking acquisition + // 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}); + // } } - - // Switch off scan for future tests - det.setScan(defs::scanParameters()); - // acquire for each? - - // when taking acquisition - // 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}); - // } } TEST_CASE("scanerrmsg", "[.cmd]") { From 76d9890eeaf1e228986287dc0c0de398e2e99dfa Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Tue, 6 Dec 2022 10:59:33 +0100 Subject: [PATCH 22/24] fix tests for gottthard1 --- .../tests/test-CmdProxy-gotthard.cpp | 35 +++++++++++-------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/slsDetectorSoftware/tests/test-CmdProxy-gotthard.cpp b/slsDetectorSoftware/tests/test-CmdProxy-gotthard.cpp index 0f48f16b3..4c26986c2 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy-gotthard.cpp +++ b/slsDetectorSoftware/tests/test-CmdProxy-gotthard.cpp @@ -105,20 +105,25 @@ TEST_CASE("roi", "[.cmd]") { auto det_type = det.getDetectorType().squash(); if (det_type == defs::GOTTHARD) { - auto prev_val = det.getROI(); - { - std::ostringstream oss; - proxy.Call("roi", {"0", "255"}, -1, PUT, oss); - REQUIRE(oss.str() == "roi [0, 255]\n"); - } - { - std::ostringstream oss; - proxy.Call("roi", {"256", "511"}, -1, PUT, oss); - REQUIRE(oss.str() == "roi [256, 511]\n"); - } - REQUIRE_THROWS(proxy.Call("roi", {"0", "256"}, -1, PUT)); - for (int i = 0; i != det.size(); ++i) { - det.setROI(prev_val[i], i); + if (det.size() > 1) { + REQUIRE_THROWS(proxy.Call("roi", {"0", "255"}, -1, PUT)); + REQUIRE_NOTHROW(proxy.Call("roi", {}, -1, GET)); + } else { + auto prev_val = det.getROI(); + { + std::ostringstream oss; + proxy.Call("roi", {"0", "255"}, -1, PUT, oss); + REQUIRE(oss.str() == "roi [0, 255]\n"); + } + { + std::ostringstream oss; + proxy.Call("roi", {"256", "511"}, -1, PUT, oss); + REQUIRE(oss.str() == "roi [256, 511]\n"); + } + REQUIRE_THROWS(proxy.Call("roi", {"0", "256"}, -1, PUT)); + for (int i = 0; i != det.size(); ++i) { + det.setROI(prev_val[i], i); + } } } else { REQUIRE_THROWS(proxy.Call("roi", {}, -1, GET)); @@ -135,7 +140,7 @@ TEST_CASE("clearroi", "[.cmd]") { { std::ostringstream oss; proxy.Call("clearroi", {}, -1, PUT, oss); - REQUIRE(oss.str() == "clearroi [-1, -1]\n"); + REQUIRE(oss.str() == "clearroi successful\n"); } for (int i = 0; i != det.size(); ++i) { det.setROI(prev_val[i], i); From b8b9921914808afc676bef53d14d6dc920b84880 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Tue, 6 Dec 2022 11:08:49 +0100 Subject: [PATCH 23/24] fix for tests ctb --- slsDetectorSoftware/tests/test-CmdProxy-chiptestboard.cpp | 8 ++++---- slsDetectorSoftware/tests/test-CmdProxy.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/slsDetectorSoftware/tests/test-CmdProxy-chiptestboard.cpp b/slsDetectorSoftware/tests/test-CmdProxy-chiptestboard.cpp index 5bbe38e1e..3ead23a64 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy-chiptestboard.cpp +++ b/slsDetectorSoftware/tests/test-CmdProxy-chiptestboard.cpp @@ -112,23 +112,23 @@ TEST_CASE("adcvpp", "[.cmd]") { { std::ostringstream oss; proxy.Call("adcvpp", {"1"}, -1, PUT, oss); - REQUIRE(oss.str() == "dac adcvpp 1\n"); + REQUIRE(oss.str() == "adcvpp 1\n"); } { std::ostringstream oss; proxy.Call("adcvpp", {"1140", "mv"}, -1, PUT, oss); - REQUIRE(oss.str() == "dac adcvpp 1140 mV\n"); + REQUIRE(oss.str() == "adcvpp 1140 mV\n"); } { std::ostringstream oss; proxy.Call("adcvpp", {"mv"}, -1, GET, oss); - REQUIRE(oss.str() == "dac adcvpp 1140 mV\n"); + REQUIRE(oss.str() == "adcvpp 1140 mV\n"); } for (int i = 0; i != det.size(); ++i) { det.setADCVpp(prev_val[i], false, {i}); } } else { - REQUIRE_THROWS(proxy.Call("dac adcvpp", {}, -1, GET)); + REQUIRE_THROWS(proxy.Call("adcvpp", {}, -1, GET)); } } diff --git a/slsDetectorSoftware/tests/test-CmdProxy.cpp b/slsDetectorSoftware/tests/test-CmdProxy.cpp index 74f06ba46..722a35ad6 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy.cpp +++ b/slsDetectorSoftware/tests/test-CmdProxy.cpp @@ -1867,7 +1867,7 @@ TEST_CASE("temp_fpga", "[.cmd]") { Detector det; CmdProxy proxy(&det); auto det_type = det.getDetectorType().squash(); - if (det_type != defs::MOENCH) { + if (det_type != defs::MOENCH && det_type != defs::CHIPTESTBOARD) { REQUIRE_NOTHROW(proxy.Call("temp_fpga", {}, -1, GET)); std::ostringstream oss; REQUIRE_NOTHROW(proxy.Call("temp_fpga", {}, 0, GET, oss)); @@ -2098,7 +2098,7 @@ TEST_CASE("start", "[.cmd]") { proxy.Call("start", {}, -1, PUT, oss); REQUIRE(oss.str() == "start successful\n"); } - { + if (det_type != defs::CHIPTESTBOARD) { std::ostringstream oss; proxy.Call("status", {}, -1, GET, oss); REQUIRE(oss.str() == "status running\n"); @@ -2133,7 +2133,7 @@ TEST_CASE("stop", "[.cmd]") { det.setPeriod(std::chrono::milliseconds(1)); det.setNumberOfFrames(2000); det.startDetector(); - { + if (det_type != defs::CHIPTESTBOARD) { std::ostringstream oss; proxy.Call("status", {}, -1, GET, oss); REQUIRE(oss.str() == "status running\n"); @@ -2176,7 +2176,7 @@ TEST_CASE("status", "[.cmd]") { det.setPeriod(std::chrono::milliseconds(1)); det.setNumberOfFrames(2000); det.startDetector(); - { + if (det_type != defs::CHIPTESTBOARD) { std::ostringstream oss; proxy.Call("status", {}, -1, GET, oss); REQUIRE(oss.str() == "status running\n"); From 96e107221b6a6e98b44a001170d745a7bf1aeb2c Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Tue, 6 Dec 2022 11:14:42 +0100 Subject: [PATCH 24/24] Test for moench done --- slsDetectorSoftware/tests/test-CmdProxy.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/slsDetectorSoftware/tests/test-CmdProxy.cpp b/slsDetectorSoftware/tests/test-CmdProxy.cpp index 722a35ad6..8357c64a1 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy.cpp +++ b/slsDetectorSoftware/tests/test-CmdProxy.cpp @@ -2098,7 +2098,7 @@ TEST_CASE("start", "[.cmd]") { proxy.Call("start", {}, -1, PUT, oss); REQUIRE(oss.str() == "start successful\n"); } - if (det_type != defs::CHIPTESTBOARD) { + if (det_type != defs::CHIPTESTBOARD && det_type != defs::MOENCH) { std::ostringstream oss; proxy.Call("status", {}, -1, GET, oss); REQUIRE(oss.str() == "status running\n"); @@ -2133,7 +2133,7 @@ TEST_CASE("stop", "[.cmd]") { det.setPeriod(std::chrono::milliseconds(1)); det.setNumberOfFrames(2000); det.startDetector(); - if (det_type != defs::CHIPTESTBOARD) { + if (det_type != defs::CHIPTESTBOARD && det_type != defs::MOENCH) { std::ostringstream oss; proxy.Call("status", {}, -1, GET, oss); REQUIRE(oss.str() == "status running\n"); @@ -2176,7 +2176,7 @@ TEST_CASE("status", "[.cmd]") { det.setPeriod(std::chrono::milliseconds(1)); det.setNumberOfFrames(2000); det.startDetector(); - if (det_type != defs::CHIPTESTBOARD) { + if (det_type != defs::CHIPTESTBOARD && det_type != defs::MOENCH) { std::ostringstream oss; proxy.Call("status", {}, -1, GET, oss); REQUIRE(oss.str() == "status running\n");