Merge branch 'developer' into rr_rxr

This commit is contained in:
2021-10-22 16:12:04 +02:00
51 changed files with 530 additions and 482 deletions

View File

@ -23,13 +23,13 @@ This document describes the differences between v6.0.0 and v5.1.0.
Client
------
1. Shared libraries
They are versioned from this release on.
They are versioned from this release on (6.0.0).
2. [Jungfrau] Chip version
Features for chipv1.1 incorporated
Command line: chipversion, API: getchipVersion
gets chip version (1.0 or 1.1)
chipv1.1 requires config_jungfrau.txt on detector server.
chipv1.1 requires config_jungfrau.txt on detector server and HW 2.0.
3. [Jungfrau] Chip configuration (only chipv1.1)
powering on the chip and changing settings will configure the chip.
@ -39,13 +39,15 @@ This document describes the differences between v6.0.0 and v5.1.0.
Settings can be gain0 and highgain0. Gain mode can be dynamicgain,
forceswitchg1, forceswitchg2, fixg1, fixg2, fixg0. fixg0 must be
used with EXTRA caution as you can damage the detector.
Changing settings also changes dac values of 3 dacs () and reconfigures
chip (only v1.1)
Changing settings also changes dac values of 3 dacs
(vref_prech, vref_ds and vref_comp) and reconfigures chip (only v1.1)
5. [Jungfrau] Storage cells (only chipv1.1)
Additional number of storage cells not applicable for chipv1.1.
Storage cell start is only allowed from 0 - 3 for chipv1.1
(0 - 15 for chipv1.0).
Command line: extrastoragecells, Previous Command line: storagecells
API: remains the same.
6. [Gotthard2][Jungfrau] Filter Resistor
Command line: filterresistor, API: getFilterResistor/ setFilterResistor
@ -55,11 +57,11 @@ This document describes the differences between v6.0.0 and v5.1.0.
[Gotthard2] Options: [0|1|2|3]. Default is 0.
7. [Jungfrau] Filter cell (only chipv1.1)
Command line: filtercell, API: getFilterCell/ setFilterCell
Command line: filtercells, API: getNumberOfFilterCells/ setNumberOfFilterCells
Set filter cell. Options: [0-12]. Advanced user command.
8. [Jungfrau] Comparator disable time (only chipv1.1)
Command line: comp_disable_time, API: getComparatorDisableTime/
Command line: compdisabletime, API: getComparatorDisableTime/
setComparatorDisableTime
One can customize the period to disable comparator.
@ -167,13 +169,17 @@ This document describes the differences between v6.0.0 and v5.1.0.
[Eiger][Jungfrau] same as before.
[Gotthard2] New command to set readout speed. Options: 108, 144 (in MHz)
27. [Eiger][Jungfrau] Flip rows
27. [Eiger][Jungfrau] Flip rows
Command line: fliprows, API: getFlipRows/ setFlipRows
Previous command: flippeddatax, setBottom/ getBottom
[Jungfrau] Flips rows in detector only for HW v2.0.
slsReceiver and slsDetectorGui will not flip them again.
[Eiger] same as before.
28. [Jungfrau]
Command line changes: autocompdisable, Previous command line: auto_comp_disable
Detector servers
----------------
@ -244,7 +250,7 @@ This document describes the differences between v6.0.0 and v5.1.0.
7. [Eiger] fast quad fix for loading trimbits
8. [Eiger] Can also use copydetectorserver command.
[All] copydetectorserver command also creates a link to the binary compied
[All] copydetectorserver command also creates a link to the binary copied
with a shorter name ([detector]DetectorServer only)
Receiver
@ -263,7 +269,7 @@ This document describes the differences between v6.0.0 and v5.1.0.
1. It does not handle readnrows or partial readout. Only the summary
is adjusted to print in red. However, it will still write complete
images with missing data padded. Roi will be implemented in future
that can be complimented with this feature to remove the additional
that can be complemented with this feature to remove the additional
data in files.
2. Round robin is not implemented in receiver side, ie. one cannot configure
@ -301,11 +307,11 @@ This document describes the differences between v6.0.0 and v5.1.0.
Mythen3
=======
Compatible version : 10.09.2021 (development)
Compatible version : 10.09.2021 (v1.1)
Gotthard2
=========
Compatible version : 27.05.2021 (v1.0)
Compatible version : 27.05.2021 (v0.1)
Moench
======

View File

@ -1,8 +1,6 @@
Firmware Upgrade
=================
Eiger
-------------
@ -18,30 +16,9 @@ Upgrade
^^^^^^^^
#. Tftp must be already installed on your pc to use the bcp script.
#. Kill the on-board servers and copy new servers to the board.
#. Copy new servers to the board. See :ref:`how to upgrade detector servers<Detector Server Upgrade>` for more detals. A reboot should have started the new linked servers automatically. For Eiger, do not reboot yet as we need to program the firmware via bit files.
.. code-block:: bash
# Option 1: from detector console
# kill old server
ssh root@bebxxx
killall eigerDetectorServer
# copy new server
cd executables
scp user@pc:/path/eigerDetectorServerxxx .
chmod 777 eigerDetectorServerxxx
ln -sf eigerDetectorServerxxx eigerDetectorServer
sync
# Options 2: from client console for multiple modules
for i in bebxxx bebyyy;
do ssh root@$i killall eigerDetectorServer;
scp eigerDetectorServerxxx root@$i:~/executables/eigerDetectorServer;
ssh root@$i sync; done
* This is crucial when registers between firmwares change. Failure to do so will result in linux on boards to crash and boards can't be pinged anymore.
* This step is crucial when registers between firmwares change. Failure to do so will result in linux on boards to crash and boards can't be pinged anymore.
#. Bring the board into programmable mode using either of the 2 ways. Both methods result in only the central LED blinking.
@ -50,8 +27,13 @@ Upgrade
Do a hard reset for each half module on back panel boards, between the LEDs, closer to each of the 1G ethernet connectors. Push until all LEDs start to blink.
* Software:
.. code-block:: bash
# Option 1: if the old server is still running:
sls_detector_put execcommand "./boot_recovery"
# Option 2:
ssh root@bebxxx
cd executables
./boot_recovery
@ -79,11 +61,24 @@ Upgrade
#update front right fpga
bcp download.bit bebxxx:/febr
#update kernel (only if required by the SLS Detector Group)
#update kernel (only if required by us)
bcp download.bit bebxxx:/kernel
#. Reboot the detector.
.. code-block:: bash
# In the first terminal where we saw "Succeess"
# reconfig febX is necessary only if you have flashed a new feb firmware
reconfig febl
reconfig febr
# will reboot controller
reconfig fw0
.. note ::
If the detector servers did not start up automatically after reboot, you need to add scripts to do that. See :ref:`Automatic start<Automatic start servers>` for more details.
Jungfrau
-------------
@ -94,75 +89,26 @@ Download
- `pof files <https://github.com/slsdetectorgroup/slsDetectorFirmware>`__
Upgrade (from v4.x.x)
^^^^^^^^^^^^^^^^^^^^^^
Upgrade
^^^^^^^^
Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you run into issues while programming firmware.
.. note ::
#. Tftp must be installed on pc.
These instructions are for upgrades from v5.0.0. For earlier versions, contact us.
#. Update client package to the latest (5.x.x).
#. Disable server respawning or kill old server
.. code-block:: bash
# Option 1: if respawning enabled
telnet bchipxxx
# edit /etc/inittab
# comment out line #ttyS0::respawn:/jungfrauDetectorServervxxx
reboot
# ensure servers did not start up after reboot
telnet bchipxxx
ps
# Option 2: if respawning already disabled
telnet bchipxxx
killall jungfrauDetectorServerv*
#. Copy new server and start in update mode
.. code-block:: bash
tftp pcxxx -r jungfrauDetectorServervxxx -g
chmod 777 jungfrauDetectorServervxxx
./jungfrauDetectorServervxxx -u
#. Program fpga from the client console
.. code-block:: bash
sls_detector_get free
# Crucial that the next command executes without any errors
sls_detector_put hostname bchipxxx
sls_detector_put programfpga xxx.pof
#. After programming, kill 'update server' using Ctrl + C in server console.
#. Enable server respawning if needed
.. code-block:: bash
telnet bchipxxx
# edit /etc/inittab
# uncomment out line #ttyS0::respawn:/jungfrauDetectorServervxxx
# ensure the line has the new server name
reboot
# ensure both servers are running using ps
jungfrauDetectorServervxxx
jungfrauDetectorServervxxx --stop-server 1953
Upgrade (from v5.0.0)
^^^^^^^^^^^^^^^^^^^^^^^^^^
Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you run into issues while programming firmware.
Always ensure that the client and server software are of the same release.
#. Program from console
Program from console
.. code-block:: bash
# copies server from tftp folder of pc, programs fpga,
# removes old server from respawn, sets up new server to respawn
# and reboots
# copies server from tftp folder of pc, links new server to jungfrauDetectorServer,
# removes old server from respawn, sets up new lnked server to respawn
# programs fpga,
# reboots
sls_detector_put update jungfrauDetectorServervxxx pcxxx xx.pof
# Or only program firmware
@ -170,8 +116,8 @@ Always ensure that the client and server software are of the same release.
Gotthard
---------
Gotthard I
-----------
Download
^^^^^^^^^^^^^
@ -186,7 +132,7 @@ Upgrade
^^^^^^^^
.. warning ::
| Gotthard firmware cannot be upgraded remotely and requires the use of USB-Blaster.
| It is generally updated by the SLS Detector group.
| It is generally updated by us.
#. Download `Altera Quartus software or Quartus programmer <https://fpgasoftware.intel.com/20.1/?edition=standard&platform=linux&product=qprogrammer#tabs-4>`__.
@ -197,7 +143,7 @@ Upgrade
#. Plug the end of your USB-Blaster with the adaptor provided to the connector 'AS config' on the Gotthard board.
#. Click on 'Add file'. Select programming (pof) file provided by the SLS Detector group.
#. Click on 'Add file'. Select programming (pof) file provided by us.
#. Check "Program/Configure" and "Verify". Push the start button. Wait until the programming process is finished.
@ -206,68 +152,69 @@ Upgrade
#. Reboot the detector.
Mythen3
-------
Mythen III
-----------
.. note ::
As it is still in developement, the rbf files must be picked up from the SLS Detector Group.
As it is still in development, the rbf files must be picked up from us.
Download
^^^^^^^^^^^^^
- detector server corresponding to package in slsDetectorPackage/serverBin
- rbf files (in developement)
- `rbf files <https://github.com/slsdetectorgroup/slsDetectorFirmware>`__
Upgrade (from v5.0.0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Upgrade
^^^^^^^^
Always ensure that the client and server software are of the same release.
#. Program from console
Program from console
.. code-block:: bash
# copies server from tftp folder of pc, programs fpga,
# and reboots (new server not respawned currently)
# copies server from tftp folder of pc, links new server to mythen3DetectorServer,
# programs fpga,
# reboots
sls_detector_put update mythen3DetectorServervxxx pcxxx xxx.rbf
# Or only program firmware
sls_detector_put programfpga xxx.rbf
Gotthard2
-------------
.. note ::
As it is still in developement, the rbf files must be picked up from the SLS Detector Group.
If the detector servers did not start up automatically after reboot, you need to add scripts to do that. See :ref:`Automatic start<Automatic start servers>` for more details.
Gotthard II
-------------
Download
^^^^^^^^^^^^^
- detector server corresponding to package in slsDetectorPackage/serverBin
- rbf files (in development)
- `rbf files <https://github.com/slsdetectorgroup/slsDetectorFirmware>`__
Upgrade (from v5.0.0)
^^^^^^^^^^^^^^^^^^^^^^^^^^
Upgrade
^^^^^^^^
Always ensure that the client and server software are of the same release.
#. Program from console
Program from console
.. code-block:: bash
# copies server from tftp folder of pc, programs fpga,
# and reboots (new server not respawned currently)
# copies server from tftp folder of pc, links new server to gotthard2DetectorServer,
# programs fpga,
# reboots
sls_detector_put update gotthard2DetectorServervxxx pcxxx xxx.rbf
# Or only program firmware
sls_detector_put programfpga xxx.rbf
.. note ::
If the detector servers did not start up automatically after reboot, you need to add scripts to do that. See :ref:`Automatic start<Automatic start servers>` for more details.
Moench
-------
@ -279,19 +226,21 @@ Download
- `pof files <https://github.com/slsdetectorgroup/slsDetectorFirmware>`__
Upgrade (from v5.0.0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Upgrade
^^^^^^^^
Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you run into issues while programming firmware.
Always ensure that the client and server software are of the same release.
#. Program from console
Program from console
.. code-block:: bash
# copies server from tftp folder of pc, programs fpga,
# removes old server from respawn, sets up new server to respawn
# and reboots
# copies server from tftp folder of pc, links new server to moenchDetectorServer,
# removes old server from respawn, sets up new lnked server to respawn
# programs fpga,
# reboots
sls_detector_put update moenchDetectorServervxxx pcxxx xx.pof
# Or only program firmware
@ -307,19 +256,21 @@ Download
- `pof files <https://github.com/slsdetectorgroup/slsDetectorFirmware>`__
Upgrade (from v5.0.0)
^^^^^^^^^^^^^^^^^^^^^^^^^^
Upgrade
^^^^^^^^
Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you run into issues while programming firmware.
Always ensure that the client and server software are of the same release.
#. Program from console
Program from console
.. code-block:: bash
# copies server from tftp folder of pc, programs fpga,
# removes old server from respawn, sets up new server to respawn
# and reboots
# copies server from tftp folder of pc, links new server to ctbDetectorServer,
# removes old server from respawn, sets up new lnked server to respawn
# programs fpga,
# reboots
sls_detector_put update ctbDetectorServervxxx pcxxx xx.pof
# Or only program firmware

View File

@ -71,4 +71,19 @@ exposed to Python through pybind11.
:undoc-members:
.. autoclass:: timingSourceType
:undoc-members:
.. autoclass:: M3_GainCaps
:undoc-members:
.. autoclass:: portPosition
:undoc-members:
.. autoclass:: streamingInterface
:undoc-members:
.. autoclass:: vetoAlgorithm
:undoc-members:
.. autoclass:: gainMode
:undoc-members:

View File

@ -36,6 +36,7 @@ Detector Servers include:
When using a blocking acquire command (sls_detector_acquire or Detector::acquire), the control server is blocked until end of acquisition. However, stop server commands could be used in parallel.
.. _Automatic start servers:
Automatic start
------------------

View File

@ -1,114 +1,44 @@
.. _Detector Server Upgrade:
Detector Server Upgrade
=======================
Eiger
-------------
**Location:** slsDetectorPackage/serverBin/ folder for every release.
#. Kill old server and copy new server
.. code-block:: bash
# Option 1: from detector console
# kill old server
ssh root@bebxxx
killall eigerDetectorServer
# copy new server
cd executables
scp user@pc:/path/eigerDetectorServerxxx .
chmod 777 eigerDetectorServerxxx
ln -sf eigerDetectorServerxxx eigerDetectorServer
sync
# Options 2: from client console for multiple modules
for i in bebxxx bebyyy;
do ssh root@$i killall eigerDetectorServer;
scp eigerDetectorServerxxx root@$i:~/executables/eigerDetectorServer;
ssh root@$i sync; done
#. Reboot the detector.
Jungfrau
-------------
**Location:** slsDetectorPackage/serverBin/ folder for every release.
#. Install tftp and copy detector server binary to tftp folder
#. Program from console (only from 5.0.0-rcx)
#. Program from console
.. note ::
These instructions are for upgrades from v5.0.0. For earlier versions, contact us.
.. code-block:: bash
# copies new server from pc tftp folder, respawns and reboots
sls_detector_put copydetectorserver jungfrauDetectorServerxxx pcxxx
# copies new server from pc tftp folder, creates a soft link to xxxDetectorServerxxx
# [Jungfrau][CTB][Moench] also edits initttab to respawn server on reboot
# Then, the detector controller will reboot (except Eiger)
sls_detector_put copydetectorserver xxxDetectorServerxxx pcxxx
#. Copy the detector server specific config files or any others required to the detector:
.. code-block:: bash
sls_detector_put execcommand "tftp pcxxx -r configxxx -g"
Gotthard
---------
.. note ::
**Location:** slsDetectorPackage/serverBin/ folder for every release.
For Mythen3, Gotthard2 and Eiger, you need to add scripts to automatically start detector server upon power on. See :ref:`Automatic start<Automatic start servers>` for more details.
#. Install tftp and copy detector server binary to tftp folder
#. Program from console (only from 5.0.0-rcx)
.. code-block:: bash
.. note ::
# copies new server from pc tftp folder, respawns and reboots
sls_detector_put copydetectorserver gotthardDetectorServerxxx pcxxx
Eiger requires a manual reboot. Or killall the servers and restart the new linked one. If you are in the process of updating firmware, then don't reboot yet.
Mythen3
-------
**Location:** slsDetectorPackage/serverBin/ folder for every release.
#. Install tftp and copy detector server binary to tftp folder
#. Program from console (only from 5.0.0-rcx)
.. code-block:: bash
# copies new server from pc tftp folder and reboots (does not respawn)
sls_detector_put copydetectorserver mythen3DetectorServerxxx pcxxx
Gotthard2
----------
**Location:** slsDetectorPackage/serverBin/ folder for every release.
#. Install tftp and copy detector server binary to tftp folder
#. Program from console (only from 5.0.0-rcx)
.. code-block:: bash
# copies new server from pc tftp folder and reboots (does not respawn)
sls_detector_put copydetectorserver gotthard2DetectorServerxxx pcxxx
Moench
Errors
------
**Location:** slsDetectorPackage/serverBin/ folder for every release.
#. tftp write error: There is no space left. Please delete some old binaries and try again.
#. Install tftp and copy detector server binary to tftp folder
#. Program from console (only from 5.0.0-rcx)
.. code-block:: bash
# copies new server from pc tftp folder, respawns and reboots
sls_detector_put copydetectorserver moenchDetectorServerxxx pcxxx
Ctb
---
**Location:** slsDetectorPackage/serverBin/ folder for every release.
#. Install tftp and copy detector server binary to tftp folder
#. Program from console (only from 5.0.0-rcx)
.. code-block:: bash
# copies new server from pc tftp folder, respawns and reboots
sls_detector_put copydetectorserver ctbDetectorServerxxx pcxxx
#. text file busy: You are trying to copy the same server.

File diff suppressed because it is too large Load Diff

View File

@ -1072,13 +1072,13 @@ void init_det(py::module &m) {
(void (Detector::*)(const defs::gainMode, sls::Positions)) &
Detector::setGainMode,
py::arg(), py::arg() = Positions{})
.def("getFilterCell",
.def("getNumberOfFilterCells",
(Result<int>(Detector::*)(sls::Positions) const) &
Detector::getFilterCell,
Detector::getNumberOfFilterCells,
py::arg() = Positions{})
.def("setFilterCell",
.def("setNumberOfFilterCells",
(void (Detector::*)(int, sls::Positions)) &
Detector::setFilterCell,
Detector::setNumberOfFilterCells,
py::arg(), py::arg() = Positions{})
.def("getROI",
(Result<defs::ROI>(Detector::*)(sls::Positions) const) &

View File

@ -1,8 +1,7 @@
/* WARINING This file is auto generated any edits might be overwritten without warning */
// SPDX-License-Identifier: LGPL-3.0-or-other
// Copyright (C) 2021 Contributors to the SLS Detector Package
/* WARINING This file is auto generated any edits might be overwritten without
* warning */
#include <pybind11/chrono.h>
#include <pybind11/numpy.h>
#include <pybind11/operators.h>
@ -43,19 +42,15 @@ void init_enums(py::module &m) {
py::enum_<slsDetectorDefs::frameDiscardPolicy>(Defs, "frameDiscardPolicy")
.value("NO_DISCARD", slsDetectorDefs::frameDiscardPolicy::NO_DISCARD)
.value("DISCARD_EMPTY_FRAMES",
slsDetectorDefs::frameDiscardPolicy::DISCARD_EMPTY_FRAMES)
.value("DISCARD_PARTIAL_FRAMES",
slsDetectorDefs::frameDiscardPolicy::DISCARD_PARTIAL_FRAMES)
.value("NUM_DISCARD_POLICIES",
slsDetectorDefs::frameDiscardPolicy::NUM_DISCARD_POLICIES)
.value("DISCARD_EMPTY_FRAMES", slsDetectorDefs::frameDiscardPolicy::DISCARD_EMPTY_FRAMES)
.value("DISCARD_PARTIAL_FRAMES", slsDetectorDefs::frameDiscardPolicy::DISCARD_PARTIAL_FRAMES)
.value("NUM_DISCARD_POLICIES", slsDetectorDefs::frameDiscardPolicy::NUM_DISCARD_POLICIES)
.export_values();
py::enum_<slsDetectorDefs::fileFormat>(Defs, "fileFormat")
.value("BINARY", slsDetectorDefs::fileFormat::BINARY)
.value("HDF5", slsDetectorDefs::fileFormat::HDF5)
.value("NUM_FILE_FORMATS",
slsDetectorDefs::fileFormat::NUM_FILE_FORMATS)
.value("NUM_FILE_FORMATS", slsDetectorDefs::fileFormat::NUM_FILE_FORMATS)
.export_values();
py::enum_<slsDetectorDefs::dimension>(Defs, "dimension")
@ -64,25 +59,19 @@ void init_enums(py::module &m) {
.export_values();
py::enum_<slsDetectorDefs::externalSignalFlag>(Defs, "externalSignalFlag")
.value("TRIGGER_IN_RISING_EDGE",
slsDetectorDefs::externalSignalFlag::TRIGGER_IN_RISING_EDGE)
.value("TRIGGER_IN_FALLING_EDGE",
slsDetectorDefs::externalSignalFlag::TRIGGER_IN_FALLING_EDGE)
.value("INVERSION_ON",
slsDetectorDefs::externalSignalFlag::INVERSION_ON)
.value("INVERSION_OFF",
slsDetectorDefs::externalSignalFlag::INVERSION_OFF)
.value("TRIGGER_IN_RISING_EDGE", slsDetectorDefs::externalSignalFlag::TRIGGER_IN_RISING_EDGE)
.value("TRIGGER_IN_FALLING_EDGE", slsDetectorDefs::externalSignalFlag::TRIGGER_IN_FALLING_EDGE)
.value("INVERSION_ON", slsDetectorDefs::externalSignalFlag::INVERSION_ON)
.value("INVERSION_OFF", slsDetectorDefs::externalSignalFlag::INVERSION_OFF)
.export_values();
py::enum_<slsDetectorDefs::timingMode>(Defs, "timingMode")
.value("AUTO_TIMING", slsDetectorDefs::timingMode::AUTO_TIMING)
.value("TRIGGER_EXPOSURE",
slsDetectorDefs::timingMode::TRIGGER_EXPOSURE)
.value("TRIGGER_EXPOSURE", slsDetectorDefs::timingMode::TRIGGER_EXPOSURE)
.value("GATED", slsDetectorDefs::timingMode::GATED)
.value("BURST_TRIGGER", slsDetectorDefs::timingMode::BURST_TRIGGER)
.value("TRIGGER_GATED", slsDetectorDefs::timingMode::TRIGGER_GATED)
.value("NUM_TIMING_MODES",
slsDetectorDefs::timingMode::NUM_TIMING_MODES)
.value("NUM_TIMING_MODES", slsDetectorDefs::timingMode::NUM_TIMING_MODES)
.export_values();
py::enum_<slsDetectorDefs::dacIndex>(Defs, "dacIndex")
@ -170,16 +159,13 @@ void init_enums(py::module &m) {
.value("HIGH_VOLTAGE", slsDetectorDefs::dacIndex::HIGH_VOLTAGE)
.value("TEMPERATURE_ADC", slsDetectorDefs::dacIndex::TEMPERATURE_ADC)
.value("TEMPERATURE_FPGA", slsDetectorDefs::dacIndex::TEMPERATURE_FPGA)
.value("TEMPERATURE_FPGAEXT",
slsDetectorDefs::dacIndex::TEMPERATURE_FPGAEXT)
.value("TEMPERATURE_FPGAEXT", slsDetectorDefs::dacIndex::TEMPERATURE_FPGAEXT)
.value("TEMPERATURE_10GE", slsDetectorDefs::dacIndex::TEMPERATURE_10GE)
.value("TEMPERATURE_DCDC", slsDetectorDefs::dacIndex::TEMPERATURE_DCDC)
.value("TEMPERATURE_SODL", slsDetectorDefs::dacIndex::TEMPERATURE_SODL)
.value("TEMPERATURE_SODR", slsDetectorDefs::dacIndex::TEMPERATURE_SODR)
.value("TEMPERATURE_FPGA2",
slsDetectorDefs::dacIndex::TEMPERATURE_FPGA2)
.value("TEMPERATURE_FPGA3",
slsDetectorDefs::dacIndex::TEMPERATURE_FPGA3)
.value("TEMPERATURE_FPGA2", slsDetectorDefs::dacIndex::TEMPERATURE_FPGA2)
.value("TEMPERATURE_FPGA3", slsDetectorDefs::dacIndex::TEMPERATURE_FPGA3)
.value("TRIMBIT_SCAN", slsDetectorDefs::dacIndex::TRIMBIT_SCAN)
.value("V_POWER_A", slsDetectorDefs::dacIndex::V_POWER_A)
.value("V_POWER_B", slsDetectorDefs::dacIndex::V_POWER_B)
@ -218,20 +204,15 @@ void init_enums(py::module &m) {
.value("VERYLOWGAIN", slsDetectorDefs::detectorSettings::VERYLOWGAIN)
.value("G1_HIGHGAIN", slsDetectorDefs::detectorSettings::G1_HIGHGAIN)
.value("G1_LOWGAIN", slsDetectorDefs::detectorSettings::G1_LOWGAIN)
.value("G2_HIGHCAP_HIGHGAIN",
slsDetectorDefs::detectorSettings::G2_HIGHCAP_HIGHGAIN)
.value("G2_HIGHCAP_LOWGAIN",
slsDetectorDefs::detectorSettings::G2_HIGHCAP_LOWGAIN)
.value("G2_LOWCAP_HIGHGAIN",
slsDetectorDefs::detectorSettings::G2_LOWCAP_HIGHGAIN)
.value("G2_LOWCAP_LOWGAIN",
slsDetectorDefs::detectorSettings::G2_LOWCAP_LOWGAIN)
.value("G2_HIGHCAP_HIGHGAIN", slsDetectorDefs::detectorSettings::G2_HIGHCAP_HIGHGAIN)
.value("G2_HIGHCAP_LOWGAIN", slsDetectorDefs::detectorSettings::G2_HIGHCAP_LOWGAIN)
.value("G2_LOWCAP_HIGHGAIN", slsDetectorDefs::detectorSettings::G2_LOWCAP_HIGHGAIN)
.value("G2_LOWCAP_LOWGAIN", slsDetectorDefs::detectorSettings::G2_LOWCAP_LOWGAIN)
.value("G4_HIGHGAIN", slsDetectorDefs::detectorSettings::G4_HIGHGAIN)
.value("G4_LOWGAIN", slsDetectorDefs::detectorSettings::G4_LOWGAIN)
.value("GAIN0", slsDetectorDefs::detectorSettings::GAIN0)
.value("UNDEFINED", slsDetectorDefs::detectorSettings::UNDEFINED)
.value("UNINITIALIZED",
slsDetectorDefs::detectorSettings::UNINITIALIZED)
.value("UNINITIALIZED", slsDetectorDefs::detectorSettings::UNINITIALIZED)
.export_values();
py::enum_<slsDetectorDefs::clockIndex>(Defs, "clockIndex")
@ -244,8 +225,7 @@ void init_enums(py::module &m) {
py::enum_<slsDetectorDefs::readoutMode>(Defs, "readoutMode")
.value("ANALOG_ONLY", slsDetectorDefs::readoutMode::ANALOG_ONLY)
.value("DIGITAL_ONLY", slsDetectorDefs::readoutMode::DIGITAL_ONLY)
.value("ANALOG_AND_DIGITAL",
slsDetectorDefs::readoutMode::ANALOG_AND_DIGITAL)
.value("ANALOG_AND_DIGITAL", slsDetectorDefs::readoutMode::ANALOG_AND_DIGITAL)
.export_values();
py::enum_<slsDetectorDefs::speedLevel>(Defs, "speedLevel")
@ -259,18 +239,14 @@ void init_enums(py::module &m) {
py::enum_<slsDetectorDefs::burstMode>(Defs, "burstMode")
.value("BURST_INTERNAL", slsDetectorDefs::burstMode::BURST_INTERNAL)
.value("BURST_EXTERNAL", slsDetectorDefs::burstMode::BURST_EXTERNAL)
.value("CONTINUOUS_INTERNAL",
slsDetectorDefs::burstMode::CONTINUOUS_INTERNAL)
.value("CONTINUOUS_EXTERNAL",
slsDetectorDefs::burstMode::CONTINUOUS_EXTERNAL)
.value("CONTINUOUS_INTERNAL", slsDetectorDefs::burstMode::CONTINUOUS_INTERNAL)
.value("CONTINUOUS_EXTERNAL", slsDetectorDefs::burstMode::CONTINUOUS_EXTERNAL)
.value("NUM_BURST_MODES", slsDetectorDefs::burstMode::NUM_BURST_MODES)
.export_values();
py::enum_<slsDetectorDefs::timingSourceType>(Defs, "timingSourceType")
.value("TIMING_INTERNAL",
slsDetectorDefs::timingSourceType::TIMING_INTERNAL)
.value("TIMING_EXTERNAL",
slsDetectorDefs::timingSourceType::TIMING_EXTERNAL)
.value("TIMING_INTERNAL", slsDetectorDefs::timingSourceType::TIMING_INTERNAL)
.value("TIMING_EXTERNAL", slsDetectorDefs::timingSourceType::TIMING_EXTERNAL)
.export_values();
py::enum_<slsDetectorDefs::M3_GainCaps>(Defs, "M3_GainCaps")
@ -289,23 +265,14 @@ void init_enums(py::module &m) {
.value("BOTTOM", slsDetectorDefs::portPosition::BOTTOM)
.export_values();
py::enum_<slsDetectorDefs::streamingInterface>(Defs, "streamingInterface",
py::arithmetic())
py::enum_<slsDetectorDefs::streamingInterface>(Defs, "streamingInterface", py::arithmetic())
.value("NONE", slsDetectorDefs::streamingInterface::NONE)
.value("LOW_LATENCY_LINK",
slsDetectorDefs::streamingInterface::LOW_LATENCY_LINK)
.value("ETHERNET_10GB",
slsDetectorDefs::streamingInterface::ETHERNET_10GB)
.value("LOW_LATENCY_LINK", slsDetectorDefs::streamingInterface::LOW_LATENCY_LINK)
.value("ETHERNET_10GB", slsDetectorDefs::streamingInterface::ETHERNET_10GB)
.value("ALL", slsDetectorDefs::streamingInterface::ALL)
.export_values()
.def("__or__",
py::overload_cast<const slsDetectorDefs::streamingInterface &,
const slsDetectorDefs::streamingInterface &>(
&operator|))
.def("__and__",
py::overload_cast<const slsDetectorDefs::streamingInterface &,
const slsDetectorDefs::streamingInterface &>(
&operator&));
.def("__or__", py::overload_cast<const slsDetectorDefs::streamingInterface &, const slsDetectorDefs::streamingInterface &>(&operator|))
.def("__and__", py::overload_cast<const slsDetectorDefs::streamingInterface &, const slsDetectorDefs::streamingInterface &>(&operator&));
py::enum_<slsDetectorDefs::vetoAlgorithm>(Defs, "vetoAlgorithm")
.value("ALG_HITS", slsDetectorDefs::vetoAlgorithm::ALG_HITS)

View File

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

View File

@ -1 +0,0 @@
../slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv6.0.0-rc1

View File

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

View File

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

View File

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

View File

@ -1 +0,0 @@
../slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv6.0.0-rc1

View File

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

View File

@ -1 +0,0 @@
../slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv6.0.0-rc1

View File

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

View File

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

View File

@ -1 +0,0 @@
../slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv6.0.0-rc1

View File

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

View File

@ -1 +0,0 @@
../slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv6.0.0-rc1

View File

@ -1201,7 +1201,7 @@ Exposure Time of a sub frame. Only for Eiger in 32 bit mode
<bool>false</bool>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Number of additional storage cells. For Jungfrau only. &lt;/p&gt;&lt;p&gt;Default: 0. &lt;/p&gt;&lt;p&gt;Number of Images received: #frames * #triggers * (#storagecells+1) &lt;/p&gt;&lt;p&gt; #storagecells#&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Number of additional storage cells. For Jungfrau only. &lt;/p&gt;&lt;p&gt;Default: 0. &lt;/p&gt;&lt;p&gt;Number of Images received: #frames * #triggers * (#storagecells+1) &lt;/p&gt;&lt;p&gt;#&lt;span style=&quot; font-family:'Droid Sans Mono,monospace,monospace,Droid Sans Fallback'; font-size:14px; color:#ce9178;&quot;&gt;extrastoragecells#&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Number of Storage cells:</string>
@ -1402,7 +1402,7 @@ Default value is 0. A value less than the required minimum is ignored.
</size>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Number of additional storage cells. For Jungfrau only. &lt;/p&gt;&lt;p&gt;Default: 0. &lt;/p&gt;&lt;p&gt;Number of Images received: #frames * #triggers * (#storagecells+1) &lt;/p&gt;&lt;p&gt; #storagecells#&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Number of additional storage cells. For Jungfrau only. &lt;/p&gt;&lt;p&gt;Default: 0. &lt;/p&gt;&lt;p&gt;Number of Images received: #frames * #triggers * (#storagecells+1) &lt;/p&gt;&lt;p&gt;#&lt;span style=&quot; font-family:'Droid Sans Mono,monospace,monospace,Droid Sans Fallback'; font-size:14px; color:#ce9178;&quot;&gt;extrastoragecells&lt;/span&gt;#&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="statusTip">
<string/>

View File

@ -452,6 +452,7 @@ Time before end of exposure when comparator is disabled */
#define ASIC_CTRL_DS_TMR_OFST (8)
#define ASIC_CTRL_DS_TMR_MSK (0x000000FF << ASIC_CTRL_DS_TMR_OFST)
#define ASIC_CTRL_DS_TMR_VAL ((0x1F << ASIC_CTRL_DS_TMR_OFST) & ASIC_CTRL_DS_TMR_MSK)
#define ASIC_CTRL_DS_TMR_CHIP1_1_VAL ((0xFF << ASIC_CTRL_DS_TMR_OFST) & ASIC_CTRL_DS_TMR_MSK)
// tET = (ET + 1) * 25ns (increase timeout range between 2 consecutive storage
// cells)
#define ASIC_CTRL_EXPSRE_TMR_OFST (16)

View File

@ -498,7 +498,7 @@ void setupDetector() {
setFlipRows(DEFAULT_FLIP_ROWS);
if (getChipVersion() == 11) {
setFilterResistor(DEFAULT_FILTER_RESISTOR);
setFilterCell(DEFAULT_FILTER_CELL);
setNumberOfFilterCells(DEFAULT_FILTER_CELL);
}
setReadNRows(MAX_ROWS_PER_READOUT);
}
@ -842,7 +842,14 @@ int selectStoragecellStart(int pos) {
offset = CONFIG_V11_STATUS_STRG_CLL_OFST;
}
#endif
int retval = ((bus_r(addr) & mask) >> offset);
uint32_t regval = bus_r(addr);
#ifndef VIRTUAL
// flip all contents of register //TODO FIRMWARE FIX
if (getChipVersion() == 11) {
regval ^= BIT32_MASK;
}
#endif
uint32_t retval = ((regval & mask) >> offset);
if (getChipVersion() == 11) {
// get which bit
int max = getMaxStoragecellStart();
@ -1822,11 +1829,15 @@ int64_t getComparatorDisableTime() {
}
void configureASICTimer() {
LOG(logINFO, ("Configuring ASIC Timer\n"));
bus_w(ASIC_CTRL_REG, (bus_r(ASIC_CTRL_REG) & ~ASIC_CTRL_PRCHRG_TMR_MSK) |
ASIC_CTRL_PRCHRG_TMR_VAL);
bus_w(ASIC_CTRL_REG, (bus_r(ASIC_CTRL_REG) & ~ASIC_CTRL_DS_TMR_MSK) |
ASIC_CTRL_DS_TMR_VAL);
uint32_t val = ASIC_CTRL_DS_TMR_VAL;
if (getChipVersion() == 11) {
val = ASIC_CTRL_DS_TMR_CHIP1_1_VAL;
}
bus_w(ASIC_CTRL_REG, (bus_r(ASIC_CTRL_REG) & ~ASIC_CTRL_DS_TMR_MSK) | val);
LOG(logINFO, ("Configured ASIC Timer [0x%x]\n", bus_r(ASIC_CTRL_REG)));
}
int setReadoutSpeed(int val) {
@ -2165,7 +2176,7 @@ int getFilterResistor() {
#else
uint32_t addr = CONFIG_V11_STATUS_REG;
#endif
// 0 for lower value, 1 for higher value
// return 0 for lower value, 1 for higher value
if (bus_r(addr) & CONFIG_V11_STATUS_FLTR_RSSTR_SMLR_MSK) {
return 0;
}
@ -2191,19 +2202,24 @@ int setFilterResistor(int value) {
return FAIL;
}
int getFilterCell() {
int getNumberOfFilterCells() {
#ifdef VIRTUAL
uint32_t addr = CONFIG_V11_REG;
#else
uint32_t addr = CONFIG_V11_STATUS_REG;
#endif
uint32_t value =
(bus_r(addr) & CONFIG_V11_FLTR_CLL_MSK) >> CONFIG_V11_FLTR_CLL_OFST;
uint32_t regval = bus_r(addr);
#ifndef VIRTUAL
// flip all contents of register //TODO FIRMWARE FIX
regval ^= BIT32_MASK;
#endif
uint32_t retval =
(regval & CONFIG_V11_FLTR_CLL_MSK) >> CONFIG_V11_FLTR_CLL_OFST;
// count number of bits = which icell
return (__builtin_popcount(value));
return (__builtin_popcount(retval));
}
void setFilterCell(int iCell) {
void setNumberOfFilterCells(int iCell) {
if (iCell > MAX_FILTER_CELL_VAL) {
return;
}
@ -2220,8 +2236,8 @@ void setFilterCell(int iCell) {
bus_w(addr, bus_r(addr) | ((value << CONFIG_V11_FLTR_CLL_OFST) &
CONFIG_V11_FLTR_CLL_MSK));
}
LOG(logINFO,
("Setting Filter Cell to %d [Reg:0x%x]\n", iCell, bus_r(addr)));
LOG(logINFO, ("Setting Number of Filter Cells to %d [Reg:0x%x]\n", iCell,
bus_r(addr)));
}
void disableCurrentSource() {

View File

@ -73,7 +73,7 @@ enum DACINDEX {
#define SPECIAL_DEFAULT_DYNAMIC_GAIN_VALS \
{ 1450, 480, 420 }
#define SPECIAL_DEFAULT_DYNAMICHG0_GAIN_VALS \
{ 1450, 480, 420 }
{ 1550, 450, 620 }
enum NETWORKINDEX { TXN_FRAME, FLOWCTRL_10G };
enum CLKINDEX { RUN_CLK, ADC_CLK, DBIT_CLK, NUM_CLOCKS };
@ -154,7 +154,7 @@ enum CLKINDEX { RUN_CLK, ADC_CLK, DBIT_CLK, NUM_CLOCKS };
#define ADC_PHASE_HALF_SPEED_CHIP11 (160)
#define ADC_PHASE_QUARTER_SPEED_CHIP11 (160)
#define DBIT_PHASE_FULL_SPEED_CHIP11 (75)
#define DBIT_PHASE_FULL_SPEED_CHIP11 (80)
#define DBIT_PHASE_HALF_SPEED_CHIP11 (135)
#define DBIT_PHASE_QUARTER_SPEED_CHIP11 (135)
@ -177,9 +177,9 @@ enum CLKINDEX { RUN_CLK, ADC_CLK, DBIT_CLK, NUM_CLOCKS };
#define ADC_PHASE_HALF_SPEED_CHIP10 (160)
#define ADC_PHASE_QUARTER_SPEED_CHIP10 (160)
#define DBIT_PHASE_FULL_SPEED_CHIP10 (100)
#define DBIT_PHASE_HALF_SPEED_CHIP10 (150)
#define DBIT_PHASE_QUARTER_SPEED_CHIP10 (150)
#define DBIT_PHASE_FULL_SPEED_CHIP10 (125)
#define DBIT_PHASE_HALF_SPEED_CHIP10 (175)
#define DBIT_PHASE_QUARTER_SPEED_CHIP10 (175)
#define ADC_OFST_FULL_SPEED_VAL_CHIP10 (0x10)
#define ADC_OFST_HALF_SPEED_VAL_CHIP10 (0x08)

View File

@ -486,8 +486,8 @@ int getFlipRows();
void setFlipRows(int arg);
int setFilterResistor(int value);
int getFilterResistor();
int getFilterCell();
void setFilterCell(int iCell);
int getNumberOfFilterCells();
void setNumberOfFilterCells(int iCell);
void disableCurrentSource();
void enableCurrentSource(int fix, uint64_t select, int normal);
int getCurrentSource();

View File

@ -262,8 +262,8 @@ int get_comp_disable_time(int);
int set_comp_disable_time(int);
int get_flip_rows(int);
int set_flip_rows(int);
int get_filter_cell(int);
int set_filter_cell(int);
int get_num_filter_cells(int);
int set_num_filter_cells(int);
int set_adc_pipeline(int);
int get_adc_pipeline(int);
int set_dbit_pipeline(int);

View File

@ -399,8 +399,8 @@ void function_table() {
flist[F_SET_COMP_DISABLE_TIME] = &set_comp_disable_time;
flist[F_GET_FLIP_ROWS] = &get_flip_rows;
flist[F_SET_FLIP_ROWS] = &set_flip_rows;
flist[F_GET_FILTER_CELL] = &get_filter_cell;
flist[F_SET_FILTER_CELL] = &set_filter_cell;
flist[F_GET_NUM_FILTER_CELLS] = &get_num_filter_cells;
flist[F_SET_NUM_FILTER_CELLS] = &set_num_filter_cells;
flist[F_SET_ADC_PIPELINE] = &set_adc_pipeline;
flist[F_GET_ADC_PIPELINE] = &get_adc_pipeline;
flist[F_SET_DBIT_PIPELINE] = &set_dbit_pipeline;
@ -8886,31 +8886,31 @@ int set_flip_rows(int file_des) {
return Server_SendResult(file_des, INT32, NULL, 0);
}
int get_filter_cell(int file_des) {
int get_num_filter_cells(int file_des) {
ret = OK;
memset(mess, 0, sizeof(mess));
int retval = -1;
LOG(logDEBUG1, ("Getting filter cell\n"));
LOG(logDEBUG1, ("Getting number of filter cellsn"));
#ifndef JUNGFRAUD
functionNotImplemented();
#else
// get only
retval = getFilterCell();
LOG(logDEBUG1, ("filter cell retval: %u\n", retval));
retval = getNumberOfFilterCells();
LOG(logDEBUG1, ("num filter cells retval: %u\n", retval));
#endif
return Server_SendResult(file_des, INT32, &retval, sizeof(retval));
}
int set_filter_cell(int file_des) {
int set_num_filter_cells(int file_des) {
ret = OK;
memset(mess, 0, sizeof(mess));
int arg = -1;
if (receiveData(file_des, &arg, sizeof(arg), INT32) < 0)
return printSocketReadError();
LOG(logDEBUG1, ("Setting filter cell: %u\n", (int)arg));
LOG(logDEBUG1, ("Setting number of filter cells: %u\n", (int)arg));
#ifndef JUNGFRAUD
functionNotImplemented();
@ -8921,7 +8921,8 @@ int set_filter_cell(int file_des) {
if (arg < 0 || arg > MAX_FILTER_CELL_VAL) {
ret = FAIL;
sprintf(mess,
"Could not set filter cell. Invalid argument %d. Options: "
"Could not set number of filter cells. Invalid argument "
"%d. Options: "
"0 - %d\n",
arg, MAX_FILTER_CELL_VAL);
LOG(logERROR, (mess));
@ -8929,11 +8930,12 @@ int set_filter_cell(int file_des) {
// only for chipv1.1
else if (getChipVersion() == 10) {
ret = FAIL;
strcpy(mess, "Could not set filter cell. Only available for "
"chip version 1.1\n");
strcpy(mess,
"Could not set number of filter cells. Only available for "
"chip version 1.1\n");
LOG(logERROR, (mess));
} else {
setFilterCell(arg);
setNumberOfFilterCells(arg);
// no validation as it might take time to update status register if
// acquiring
}

View File

@ -30,6 +30,14 @@ class Detector {
std::unique_ptr<DetectorImpl> pimpl;
public:
/** @name Configuration */
///@{
/**************************************************
* *
* Configuration *
* *
* ************************************************/
/**
* @param shm_id detector shared memory id
* Default value is 0. Can be set to more values for
@ -38,13 +46,6 @@ class Detector {
*/
Detector(int shm_id = 0);
~Detector();
/** @name Configuration */
///@{
/**************************************************
* *
* Configuration *
* *
* ************************************************/
/** Free the shared memory of this detector and all modules
belonging to it */
@ -191,7 +192,7 @@ class Detector {
void setFlipRows(bool value, Positions pos = {});
Result<bool> isVirtualDetectorServer(Positions pos = {}) const;
///@{
///@}
/** @name Callbacks */
///@{
@ -222,7 +223,7 @@ class Detector {
void registerDataCallback(void (*func)(detectorData *, uint64_t, uint32_t,
void *),
void *pArg);
///@{
///@}
/** @name Acquisition Parameters */
///@{
@ -526,7 +527,7 @@ class Detector {
*/
void setReadNRows(const int lines, Positions pos = {});
///@{
///@}
/** @name Acquisition */
///@{
@ -613,7 +614,7 @@ class Detector {
/** Gets Scan error message if scan ended in error for non blocking
* acquisitions.*/
Result<std::string> getScanErrorMessage(Positions pos = {}) const;
///@{
///@}
/** @name Network Configuration (Detector<->Receiver) */
///@{
@ -802,7 +803,7 @@ class Detector {
* port
*/
void setTransmissionDelayRight(int value, Positions pos = {});
///@{
///@}
/** @name Receiver Configuration */
///@{
@ -893,7 +894,7 @@ class Detector {
* streamer yet or there is no second interface, it gives 0 in its place. */
Result<std::array<pid_t, NUM_RX_THREAD_IDS>>
getRxThreadIds(Positions pos = {}) const;
///@{
///@}
/** @name File */
///@{
@ -949,7 +950,7 @@ class Detector {
/** Default depends on detector type. \n 0 will set frames per file in an
* acquisition to unlimited */
void setFramesPerFile(int n, Positions pos = {});
///@{
///@}
/** @name ZMQ Streaming Parameters (Receiver<->Client) */
///@{
@ -1058,7 +1059,7 @@ class Detector {
*/
void setRxZmqHwm(const int limit);
///@{
///@}
/** @name Eiger Specific */
///@{
@ -1157,7 +1158,7 @@ class Detector {
void setDataStream(const defs::portPosition port, const bool enable,
Positions pos = {});
///@{
///@}
/** @name Jungfrau Specific */
///@{
@ -1257,13 +1258,13 @@ class Detector {
void setGainMode(const defs::gainMode mode, Positions pos = {});
/** [Jungfrau] Advanced */
Result<int> getFilterCell(Positions pos = {}) const;
Result<int> getNumberOfFilterCells(Positions pos = {}) const;
/** [Jungfrau] Advanced Options[0-12], only for chip v1.1
*/
void setFilterCell(int cell, Positions pos = {});
void setNumberOfFilterCells(int cell, Positions pos = {});
///@{
///@}
/** @name Gotthard Specific */
///@{
@ -1290,7 +1291,7 @@ class Detector {
/** [Gotthard] */
Result<ns> getExptimeLeft(Positions pos = {}) const;
///@{
///@}
/** @name Gotthard2 Specific */
///@{
@ -1407,7 +1408,7 @@ class Detector {
/** [Gotthard2] */
void setBadChannels(const std::string &fname, Positions pos = {});
///@{
///@}
/** @name Mythen3 Specific */
///@{
@ -1464,7 +1465,7 @@ class Detector {
Result<int> getGainCaps(Positions pos = {});
///@{
///@}
/** @name CTB / Moench Specific */
///@{
@ -1523,7 +1524,7 @@ class Detector {
/** [CTB][Moench] If any of a consecutive 4 bits are enabled, the "
"complete 4 bits are enabled */
void setTenGigaADCEnableMask(uint32_t mask, Positions pos = {});
///@{
///@}
/** @name CTB Specific */
///@{
@ -1605,7 +1606,7 @@ class Detector {
/** [CTB] Default is enabled. */
void setLEDEnable(bool enable, Positions pos = {});
///@{
///@}
/** @name Pattern */
///@{
@ -1692,7 +1693,7 @@ class Detector {
/** [Mythen3] */
void startPattern(Positions pos = {});
///@{
///@}
/** @name Moench specific */
///@{
@ -1726,7 +1727,7 @@ class Detector {
void setAdditionalJsonParameter(const std::string &key,
const std::string &value,
Positions pos = {});
///@{
///@}
/** @name Advanced */
///@{
@ -1823,7 +1824,7 @@ class Detector {
/** [CTB][Moench][Jungfrau] Advanced user Function! \n
[Jungfrau] Inversions on top of default mask */
void setADCInvert(uint32_t value, Positions pos = {});
///@{
///@}
/** @name Insignificant */
///@{
@ -1875,7 +1876,7 @@ class Detector {
std::string getUserDetails() const;
Result<uint64_t> getRxCurrentFrameIndex(Positions pos = {}) const;
///@{
///@}
private:
std::vector<int> getPortNumbers(int start_port);

View File

@ -82,9 +82,14 @@ std::map<std::string, std::string> CmdProxy::GetDepreciatedCommands() {
}
void CmdProxy::WrongNumberOfParameters(size_t expected) {
throw RuntimeError(
"Command " + cmd + " expected <=" + std::to_string(expected) +
" parameter/s but got " + std::to_string(args.size()) + "\n");
if (expected == 0) {
throw RuntimeError("Command " + cmd +
" expected no parameter/s but got " +
std::to_string(args.size()) + "\n");
}
throw RuntimeError("Command " + cmd + " expected (or >=) " +
std::to_string(expected) + " parameter/s but got " +
std::to_string(args.size()) + "\n");
}
/************************************************

View File

@ -725,6 +725,10 @@ class CmdProxy {
{"resmat", "partialreset"},
/* Jungfrau Specific */
{"storagecells", "extrastoragecells"},
{"auto_comp_disable", "autocompdisable"},
{"comp_disable_time", "compdisabletime"},
/* Gotthard Specific */
/* Gotthard2 Specific */
/* Mythen3 Specific */
@ -942,13 +946,13 @@ class CmdProxy {
{"temp_threshold", &CmdProxy::temp_threshold},
{"temp_control", &CmdProxy::temp_control},
{"temp_event", &CmdProxy::TemperatureEvent},
{"auto_comp_disable", &CmdProxy::auto_comp_disable},
{"comp_disable_time", &CmdProxy::comp_disable_time},
{"storagecells", &CmdProxy::storagecells},
{"autocompdisable", &CmdProxy::autocompdisable},
{"compdisabletime", &CmdProxy::compdisabletime},
{"extrastoragecells", &CmdProxy::extrastoragecells},
{"storagecell_start", &CmdProxy::storagecell_start},
{"storagecell_delay", &CmdProxy::storagecell_delay},
{"gainmode", &CmdProxy::gainmode},
{"filtercell", &CmdProxy::filtercell},
{"filtercells", &CmdProxy::filtercells},
/* Gotthard Specific */
{"roi", &CmdProxy::ROI},
@ -1905,30 +1909,30 @@ class CmdProxy {
"cleared.");
INTEGER_COMMAND_VEC_ID(
auto_comp_disable, getAutoComparatorDisable, setAutoComparatorDisable,
autocompdisable, getAutoComparatorDisable, setAutoComparatorDisable,
StringTo<int>,
"[0, 1]\n\t[Jungfrau] Auto comparator disable mode. By default, the "
"on-chip gain switching is active during the entire exposure.This mode "
"disables the on - chip gain switching comparator automatically after "
"93.75% (only for chipv1.0) of exposure time (only for longer than "
"100us). It is possible to set the duration for chipv1.1 using "
"comp_disable_time command.\n\tDefault is 0 or this mode "
"compdisabletime command.\n\tDefault is 0 or this mode "
"disabled(comparator enabled throughout). 1 enables mode. 0 disables "
"mode. ");
TIME_COMMAND(comp_disable_time, getComparatorDisableTime,
TIME_COMMAND(compdisabletime, getComparatorDisableTime,
setComparatorDisableTime,
"[duration] [(optional unit) ns|us|ms|s]\n\t[Jungfrau] Time "
"before end of exposure when comparator is disabled. It is "
"only possible for chipv1.1.");
INTEGER_COMMAND_SET_NOID_GET_ID(
storagecells, getNumberOfAdditionalStorageCells,
extrastoragecells, getNumberOfAdditionalStorageCells,
setNumberOfAdditionalStorageCells, StringTo<int>,
"[0-15]\n\t[Jungfrau] Only for chipv1.0. Number of additional storage "
"cells. Default is "
"0. For advanced users only. \n\tThe #images = #frames x #triggers x "
"(#storagecells + 1).");
"(#extrastoragecells + 1).");
INTEGER_COMMAND_VEC_ID(
storagecell_start, getStorageCellStart, setStorageCellStart,
@ -1951,8 +1955,8 @@ class CmdProxy {
"Jungfrau] Gain mode.\n\tCAUTION: Do not use fixg0 without caution, "
"you can damage the detector!!!");
INTEGER_COMMAND_VEC_ID(filtercell, getFilterCell, setFilterCell,
sls::StringTo<int>,
INTEGER_COMMAND_VEC_ID(filtercells, getNumberOfFilterCells,
setNumberOfFilterCells, sls::StringTo<int>,
"[0-12]\n\t[Jungfrau] Set Filter Cell. Only for "
"chipv1.1. Advanced user Command");

View File

@ -1582,12 +1582,12 @@ void Detector::setGainMode(const defs::gainMode mode, Positions pos) {
pimpl->Parallel(&Module::setGainMode, pos, mode);
}
Result<int> Detector::getFilterCell(Positions pos) const {
return pimpl->Parallel(&Module::getFilterCell, pos);
Result<int> Detector::getNumberOfFilterCells(Positions pos) const {
return pimpl->Parallel(&Module::getNumberOfFilterCells, pos);
}
void Detector::setFilterCell(int cell, Positions pos) {
pimpl->Parallel(&Module::setFilterCell, pos, cell);
void Detector::setNumberOfFilterCells(int cell, Positions pos) {
pimpl->Parallel(&Module::setNumberOfFilterCells, pos, cell);
}
// Gotthard Specific
@ -2161,7 +2161,9 @@ void Detector::resetFPGA(Positions pos) {
void Detector::copyDetectorServer(const std::string &fname,
const std::string &hostname, Positions pos) {
pimpl->Parallel(&Module::copyDetectorServer, pos, fname, hostname);
rebootController(pos);
if (getDetectorType().squash() != defs::EIGER) {
rebootController(pos);
}
}
void Detector::rebootController(Positions pos) {

View File

@ -1855,12 +1855,12 @@ void Module::setGainMode(const slsDetectorDefs::gainMode mode) {
sendToDetector(F_SET_GAIN_MODE, mode, nullptr);
}
int Module::getFilterCell() const {
return sendToDetector<int>(F_GET_FILTER_CELL);
int Module::getNumberOfFilterCells() const {
return sendToDetector<int>(F_GET_NUM_FILTER_CELLS);
}
void Module::setFilterCell(int value) {
sendToDetector(F_SET_FILTER_CELL, value, nullptr);
void Module::setNumberOfFilterCells(int value) {
sendToDetector(F_SET_NUM_FILTER_CELLS, value, nullptr);
}
// Gotthard Specific

View File

@ -395,8 +395,8 @@ class Module : public virtual slsDetectorDefs {
void setStorageCellDelay(int64_t value);
gainMode getGainMode() const;
void setGainMode(const gainMode mode);
int getFilterCell() const;
void setFilterCell(int value);
int getNumberOfFilterCells() const;
void setNumberOfFilterCells(int value);
/**************************************************
* *

View File

@ -255,7 +255,7 @@ TEST_CASE("temp_event", "[.cmd]") {
}
}
TEST_CASE("auto_comp_disable", "[.cmd]") {
TEST_CASE("autocompdisable", "[.cmd]") {
Detector det;
CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash();
@ -263,29 +263,29 @@ TEST_CASE("auto_comp_disable", "[.cmd]") {
auto prev_val = det.getAutoComparatorDisable();
{
std::ostringstream oss;
proxy.Call("auto_comp_disable", {"0"}, -1, PUT, oss);
REQUIRE(oss.str() == "auto_comp_disable 0\n");
proxy.Call("autocompdisable", {"0"}, -1, PUT, oss);
REQUIRE(oss.str() == "autocompdisable 0\n");
}
{
std::ostringstream oss;
proxy.Call("auto_comp_disable", {"1"}, -1, PUT, oss);
REQUIRE(oss.str() == "auto_comp_disable 1\n");
proxy.Call("autocompdisable", {"1"}, -1, PUT, oss);
REQUIRE(oss.str() == "autocompdisable 1\n");
}
{
std::ostringstream oss;
proxy.Call("auto_comp_disable", {}, -1, GET, oss);
REQUIRE(oss.str() == "auto_comp_disable 1\n");
proxy.Call("autocompdisable", {}, -1, GET, oss);
REQUIRE(oss.str() == "autocompdisable 1\n");
}
for (int i = 0; i != det.size(); ++i) {
det.setAutoComparatorDisable(prev_val[i], {i});
}
} else {
REQUIRE_THROWS(proxy.Call("auto_comp_disable", {}, -1, GET));
REQUIRE_THROWS(proxy.Call("auto_comp_disable", {"0"}, -1, PUT));
REQUIRE_THROWS(proxy.Call("autocompdisable", {}, -1, GET));
REQUIRE_THROWS(proxy.Call("autocompdisable", {"0"}, -1, PUT));
}
}
TEST_CASE("comp_disable_time", "[.cmd]") {
TEST_CASE("compdisabletime", "[.cmd]") {
Detector det;
CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash();
@ -294,29 +294,29 @@ TEST_CASE("comp_disable_time", "[.cmd]") {
auto prev_val = det.getComparatorDisableTime();
{
std::ostringstream oss;
proxy.Call("comp_disable_time", {"125ns"}, -1, PUT, oss);
REQUIRE(oss.str() == "comp_disable_time 125ns\n");
proxy.Call("compdisabletime", {"125ns"}, -1, PUT, oss);
REQUIRE(oss.str() == "compdisabletime 125ns\n");
}
{
std::ostringstream oss;
proxy.Call("comp_disable_time", {}, -1, GET, oss);
REQUIRE(oss.str() == "comp_disable_time 125ns\n");
proxy.Call("compdisabletime", {}, -1, GET, oss);
REQUIRE(oss.str() == "compdisabletime 125ns\n");
}
{
std::ostringstream oss;
proxy.Call("comp_disable_time", {"0"}, -1, PUT, oss);
REQUIRE(oss.str() == "comp_disable_time 0\n");
proxy.Call("compdisabletime", {"0"}, -1, PUT, oss);
REQUIRE(oss.str() == "compdisabletime 0\n");
}
for (int i = 0; i != det.size(); ++i) {
det.setComparatorDisableTime(prev_val[i], {i});
}
} else {
REQUIRE_THROWS(proxy.Call("comp_disable_time", {}, -1, GET));
REQUIRE_THROWS(proxy.Call("comp_disable_time", {"0"}, -1, PUT));
REQUIRE_THROWS(proxy.Call("compdisabletime", {}, -1, GET));
REQUIRE_THROWS(proxy.Call("compdisabletime", {"0"}, -1, PUT));
}
}
TEST_CASE("storagecells", "[.cmd]") {
TEST_CASE("extrastoragecells", "[.cmd]") {
Detector det;
CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash();
@ -327,35 +327,35 @@ TEST_CASE("storagecells", "[.cmd]") {
"inconsistent #additional storage cells to test");
{
std::ostringstream oss;
proxy.Call("storagecells", {"1"}, -1, PUT, oss);
REQUIRE(oss.str() == "storagecells 1\n");
proxy.Call("extrastoragecells", {"1"}, -1, PUT, oss);
REQUIRE(oss.str() == "extrastoragecells 1\n");
}
{
std::ostringstream oss;
proxy.Call("storagecells", {"15"}, -1, PUT, oss);
REQUIRE(oss.str() == "storagecells 15\n");
proxy.Call("extrastoragecells", {"15"}, -1, PUT, oss);
REQUIRE(oss.str() == "extrastoragecells 15\n");
}
{
std::ostringstream oss;
proxy.Call("storagecells", {"0"}, -1, PUT, oss);
REQUIRE(oss.str() == "storagecells 0\n");
proxy.Call("extrastoragecells", {"0"}, -1, PUT, oss);
REQUIRE(oss.str() == "extrastoragecells 0\n");
}
{
std::ostringstream oss;
proxy.Call("storagecells", {}, -1, GET, oss);
REQUIRE(oss.str() == "storagecells 0\n");
proxy.Call("extrastoragecells", {}, -1, GET, oss);
REQUIRE(oss.str() == "extrastoragecells 0\n");
}
REQUIRE_THROWS(proxy.Call("storagecells", {"16"}, -1, PUT));
REQUIRE_THROWS(proxy.Call("extrastoragecells", {"16"}, -1, PUT));
det.setNumberOfAdditionalStorageCells(prev_val);
}
// chip version 1.1
else {
// cannot set number of addl. storage cells
REQUIRE_THROWS(proxy.Call("storagecells", {"1"}, -1, PUT));
REQUIRE_THROWS(proxy.Call("extrastoragecells", {"1"}, -1, PUT));
}
} else {
REQUIRE_THROWS(proxy.Call("storagecells", {}, -1, GET));
REQUIRE_THROWS(proxy.Call("storagecells", {"0"}, -1, PUT));
REQUIRE_THROWS(proxy.Call("extrastoragecells", {}, -1, GET));
REQUIRE_THROWS(proxy.Call("extrastoragecells", {"0"}, -1, PUT));
}
}
@ -494,47 +494,47 @@ TEST_CASE("gainmode", "[.cmd]") {
}
}
TEST_CASE("filtercell", "[.cmd]") {
TEST_CASE("filtercells", "[.cmd]") {
Detector det;
CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash();
if (det_type == defs::JUNGFRAU) {
// chip version 1.1
if (det.getChipVersion().squash() * 10 == 11) {
auto prev_val = det.getFilterCell();
auto prev_val = det.getNumberOfFilterCells();
{
std::ostringstream oss;
proxy.Call("filtercell", {"1"}, -1, PUT, oss);
REQUIRE(oss.str() == "filtercell 1\n");
proxy.Call("filtercells", {"1"}, -1, PUT, oss);
REQUIRE(oss.str() == "filtercells 1\n");
}
{
std::ostringstream oss;
proxy.Call("filtercell", {"12"}, -1, PUT, oss);
REQUIRE(oss.str() == "filtercell 12\n");
proxy.Call("filtercells", {"12"}, -1, PUT, oss);
REQUIRE(oss.str() == "filtercells 12\n");
}
{
std::ostringstream oss;
proxy.Call("filtercell", {"0"}, -1, PUT, oss);
REQUIRE(oss.str() == "filtercell 0\n");
proxy.Call("filtercells", {"0"}, -1, PUT, oss);
REQUIRE(oss.str() == "filtercells 0\n");
}
{
std::ostringstream oss;
proxy.Call("filtercell", {}, -1, GET, oss);
REQUIRE(oss.str() == "filtercell 0\n");
proxy.Call("filtercells", {}, -1, GET, oss);
REQUIRE(oss.str() == "filtercells 0\n");
}
REQUIRE_THROWS(proxy.Call("filtercell", {"13"}, -1, PUT));
REQUIRE_THROWS(proxy.Call("filtercells", {"13"}, -1, PUT));
for (int i = 0; i != det.size(); ++i) {
det.setFilterCell(prev_val[i], {i});
det.setNumberOfFilterCells(prev_val[i], {i});
}
}
// chip version 1.0
else {
// cannot set/get filter cell
REQUIRE_THROWS(proxy.Call("filtercell", {"1"}, -1, PUT));
REQUIRE_THROWS(proxy.Call("filtercell", {}, -1, GET));
REQUIRE_THROWS(proxy.Call("filtercells", {"1"}, -1, PUT));
REQUIRE_THROWS(proxy.Call("filtercells", {}, -1, GET));
}
} else {
REQUIRE_THROWS(proxy.Call("filtercell", {}, -1, GET));
REQUIRE_THROWS(proxy.Call("filtercell", {"0"}, -1, PUT));
REQUIRE_THROWS(proxy.Call("filtercells", {}, -1, GET));
REQUIRE_THROWS(proxy.Call("filtercells", {"0"}, -1, PUT));
}
}

View File

@ -238,8 +238,8 @@ enum detFuncs {
F_SET_COMP_DISABLE_TIME,
F_GET_FLIP_ROWS,
F_SET_FLIP_ROWS,
F_GET_FILTER_CELL,
F_SET_FILTER_CELL,
F_GET_NUM_FILTER_CELLS,
F_SET_NUM_FILTER_CELLS,
F_SET_ADC_PIPELINE,
F_GET_ADC_PIPELINE,
F_SET_DBIT_PIPELINE,
@ -593,8 +593,8 @@ const char* getFunctionNameFromEnum(enum detFuncs func) {
case F_SET_COMP_DISABLE_TIME: return "F_SET_COMP_DISABLE_TIME";
case F_GET_FLIP_ROWS: return "F_GET_FLIP_ROWS";
case F_SET_FLIP_ROWS: return "F_SET_FLIP_ROWS";
case F_GET_FILTER_CELL: return "F_GET_FILTER_CELL";
case F_SET_FILTER_CELL: return "F_SET_FILTER_CELL";
case F_GET_NUM_FILTER_CELLS: return "F_GET_NUM_FILTER_CELLS";
case F_SET_NUM_FILTER_CELLS: return "F_SET_NUM_FILTER_CELLS";
case F_SET_ADC_PIPELINE: return "F_SET_ADC_PIPELINE";
case F_GET_ADC_PIPELINE: return "F_GET_ADC_PIPELINE";
case F_SET_DBIT_PIPELINE: return "F_SET_DBIT_PIPELINE";

View File

@ -1,15 +1,15 @@
// SPDX-License-Identifier: LGPL-3.0-or-other
// Copyright (C) 2021 Contributors to the SLS Detector Package
/** API versions */
#define GITBRANCH "6.0.0-rc1"
#define GITBRANCH "6.0.0"
#define APILIB 0x211008
#define APIRECEIVER 0x211007
#define APIGUI 0x210819
#define APICTB 0x211019
#define APIGOTTHARD 0x211019
#define APIGOTTHARD2 0x211019
#define APIJUNGFRAU 0x211019
#define APIMYTHEN3 0x211019
#define APIMOENCH 0x211019
#define APIEIGER 0x211019
#define APILIB 0x211021
#define APIRECEIVER 0x211020
#define APIGUI 0x211021
#define APICTB 0x211021
#define APIGOTTHARD 0x211021
#define APIGOTTHARD2 0x211021
#define APIJUNGFRAU 0x211021
#define APIMYTHEN3 0x211021
#define APIMOENCH 0x211021
#define APIEIGER 0x211021