Merge branch 'developer' into jf_h5reader

This commit is contained in:
hinger_v 2025-03-10 16:46:42 +01:00
commit 9b13ddf6be
104 changed files with 20090 additions and 27263 deletions

View File

@ -1 +0,0 @@
# This file is generated by cmake for dependency checking of the CMakeCache.txt file

View File

@ -39,7 +39,6 @@ This document describes the differences between vx.x.x and vx.0.2
Jungfrau 9.0.0 Jungfrau 9.0.0
Mythen3 9.0.0 Mythen3 9.0.0
Gotthard2 9.0.0 Gotthard2 9.0.0
Gotthard 9.0.0
Moench 9.0.0 Moench 9.0.0
@ -75,9 +74,6 @@ This document describes the differences between vx.x.x and vx.0.2
Moench 26.10.2023 (v2.0) (updated in 9.0.0) Moench 26.10.2023 (v2.0) (updated in 9.0.0)
Gotthard 08.02.2018 (50um and 25um Master)
09.02.2018 (25 um Slave)
Detector Upgrade Detector Upgrade
---------------- ----------------
@ -90,8 +86,6 @@ This document describes the differences between vx.x.x and vx.0.2
Gotthard2 via command <.rbf> Gotthard2 via command <.rbf>
Moench via command <.pof> Moench via command <.pof>
Gotthard cannot be upgraded remotely
Except Eiger, Except Eiger,
upgrade upgrade
Using command 'programfpga' or Using command 'programfpga' or

View File

@ -21,7 +21,7 @@ print('\n\n\n\n SERVER CSV')
src = Path('@CMAKE_SOURCE_DIR@')/'slsDetectorServers/' src = Path('@CMAKE_SOURCE_DIR@')/'slsDetectorServers/'
detectors = ['Mythen3', 'Gotthard2', 'Eiger', detectors = ['Mythen3', 'Gotthard2', 'Eiger',
'Jungfrau', 'Moench', 'Gotthard', 'Ctb'] 'Jungfrau', 'Moench', 'Ctb']
for det in detectors: for det in detectors:

View File

@ -320,61 +320,6 @@ Moench
} }
} }
Gotthard I
^^^^^^^^^^^
.. code-block:: text
{
"Version": 7.2,
"Timestamp": "Wed Nov 13 15:16:19 2024",
"Detector Type": "Gotthard",
"Timing Mode": "auto",
"Geometry": {
"x": 1,
"y": 1
},
"Image Size in bytes": 2560,
"Pixels": {
"x": 1280,
"y": 1
},
"Max Frames Per File": 20000,
"Frame Discard Policy": "nodiscard",
"Frame Padding": 1,
"Scan Parameters": "[disabled]",
"Total Frames": 1,
"Receiver Roi": {
"xmin": 4294967295,
"xmax": 4294967295,
"ymin": 4294967295,
"ymax": 4294967295
},
"Exptime": "1.00001ms",
"Period": "1s",
"Detector Roi": {
"xmin": 4294967295,
"xmax": 4294967295
},
"Frames in File": 1,
"Frame Header Format": {
"Frame Number": "8 bytes",
"SubFrame Number/ExpLength": "4 bytes",
"Packet Number": "4 bytes",
"Bunch ID": "8 bytes",
"Timestamp": "8 bytes",
"Module Id": "2 bytes",
"Row": "2 bytes",
"Column": "2 bytes",
"Reserved": "2 bytes",
"Debug": "4 bytes",
"Round Robin Number": "2 bytes",
"Detector Type": "1 byte",
"Header Version": "1 byte",
"Packets Caught Mask": "64 bytes"
}
}
Chip Test Board Chip Test Board
^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^

View File

@ -131,42 +131,6 @@ Program from console
Gotthard I
-----------
Download
^^^^^^^^^^^^^
- detector server corresponding to package in slsDetectorPackage/serverBin
- `pof files <https://github.com/slsdetectorgroup/slsDetectorFirmware>`__
.. _firmware upgrade using blaster for blackfin:
Upgrade
^^^^^^^^
.. warning ::
| Gotthard firmware cannot be upgraded remotely and requires the use of USB-Blaster.
| 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>`__.
#. Start Quartus programmer, click on Hardware Setup. In the "Currently selected hardware" window, select USB-Blaster.
#. In the Mode combo box, select "Active Serial Programming".
#. 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 us.
#. Check "Program/Configure" and "Verify". Push the start button. Wait until the programming process is finished.
#. In case of error messages, check the polarity of cable (that pin1 corresponds) and that the correct programming connector is selected.
#. Reboot the detector.
Mythen III Mythen III
----------- -----------
@ -396,7 +360,3 @@ How to get back mtd3 drive remotely (udpating kernel)
more /proc/mtd # verify mtd3 is listed more /proc/mtd # verify mtd3 is listed
Last Resort using USB Blaster
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If none of these steps work, the last resort might be physically upgrading the firmware using a USB blaster, which also requires opening up the detector. Instructions for all the blackfin detectors are the same as the one for :ref:`gotthard firmware upgrade <firmware upgrade using blaster for blackfin>`.

View File

@ -288,56 +288,6 @@ Moench
| Frame Header Format | Expected frame header format for the data files | | Frame Header Format | Expected frame header format for the data files |
+-----------------------+-------------------------------------------------+ +-----------------------+-------------------------------------------------+
Gotthard I
^^^^^^^^^^^
+-----------------------+-------------------------------------------------+
| **Key** | **Description** |
+-----------------------+-------------------------------------------------+
| Version | Version of the master file |
| | Current value:8.0 |
+-----------------------+-------------------------------------------------+
| Timestamp | Timestamp of creation of master file |
+-----------------------+-------------------------------------------------+
| Detector Type | Detector type |
+-----------------------+-------------------------------------------------+
| Timing Mode | Timing Mode |
+-----------------------+-------------------------------------------------+
| Geometry | Number of UDP ports in x and y dimension for |
| | complete detector |
+-----------------------+-------------------------------------------------+
| Image Size in bytes | Image size in bytes per UDP port |
+-----------------------+-------------------------------------------------+
| Pixels | Number of pixels in x and y dimension |
| | per UDP port |
+-----------------------+-------------------------------------------------+
| Max Frames Per File | Maximum frames per file |
+-----------------------+-------------------------------------------------+
| Frame Discard Policy | Receiever Frame discard policy |
| | for partial frames |
+-----------------------+-------------------------------------------------+
| Frame Padding | Receiver Frame padding enable |
| | for partial frames |
+-----------------------+-------------------------------------------------+
| Scan Parameters | Scanning mode on detector |
+-----------------------+-------------------------------------------------+
| Total Frames | Total number of frames and triggers expected |
+-----------------------+-------------------------------------------------+
| Receiver Roi | Receiver ROI in file including xmax and ymax |
+-----------------------+-------------------------------------------------+
| Exptime | Exposure time |
+-----------------------+-------------------------------------------------+
| Period | Period between frames |
+-----------------------+-------------------------------------------------+
| Detector Roi | Roi in detector restricted to an ADC. |
| | Includes xmax |
+-----------------------+-------------------------------------------------+
| Burst Mode | Burst mode of detector |
+-----------------------+-------------------------------------------------+
| Frames in File | Number of frames written to file by Receiver 0 |
+-----------------------+-------------------------------------------------+
| Frame Header Format | Expected frame header format for the data files |
+-----------------------+-------------------------------------------------+
Chip Test Board Chip Test Board
^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^

View File

@ -89,18 +89,3 @@ DACS
:widths: 35, 35 :widths: 35, 35
:header-rows: 1 :header-rows: 1
Gotthard
-------------
.. csv-table:: Default values
:file: gotthard.csv
:widths: 35, 35
:header-rows: 1
DACS
^^^^^^^^^^^^^
.. csv-table:: Gotthard DACS
:file: gotthard-dacs.csv
:widths: 35, 35
:header-rows: 1

View File

@ -27,12 +27,11 @@ Arguments
-p, --port <port> : TCP communication port with client. -p, --port <port> : TCP communication port with client.
-g, --nomodule : [Mythen3][Gotthard2] -g, --nomodule : [Mythen3][Gotthard2]
Generic or No Module mode. Skips detector type checks. Generic or No Module mode. Skips detector type checks.
-f, --phaseshift <value> : [Gotthard] only. Sets phase shift.
-d, --devel : Developer mode. Skips firmware checks. -d, --devel : Developer mode. Skips firmware checks.
-u, --update : Update mode. Skips firmware checks and initial detector setup. -u, --update : Update mode. Skips firmware checks and initial detector setup.
-i, --ignore-config : [Eiger][Jungfrau][Gotthard][Gotthard2][Moench] -i, --ignore-config : [Eiger][Jungfrau][Gotthard2][Moench]
Ignore config file. Ignore config file.
-m, --master <master> : [Eiger][Mythen3][Gotthard][Gotthard2] -m, --master <master> : [Eiger][Mythen3][Gotthard2]
Set Master to 0 or 1. Precedence over config file. Only for virtual servers except Eiger. Set Master to 0 or 1. Precedence over config file. Only for virtual servers except Eiger.
-t, --top <top> : [Eiger] Set Top to 0 or 1. Precedence over config file. -t, --top <top> : [Eiger] Set Top to 0 or 1. Precedence over config file.
-s, --stopserver : Stop server. Do not use as it is created by control server -s, --stopserver : Stop server. Do not use as it is created by control server
@ -65,7 +64,7 @@ One can start the on-board detector server automatically upon powering on the bo
/home/root/executables/eigerDetectorServer &> /dev/null & /home/root/executables/eigerDetectorServer &> /dev/null &
exit 0 exit 0
Jungfrau | Moench | CTB | Gotthard I Jungfrau | Moench | CTB
.. code-block:: bash .. code-block:: bash
# Edit inittab on board # Edit inittab on board

View File

@ -385,14 +385,6 @@ Cannot get data without a module attached
You cannot get data without a module attached as a specific pin is floating. Attach module to get data. You cannot get data without a module attached as a specific pin is floating. Attach module to get data.
Gotthard
----------
Missing first frame or next frame after a delay
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Connect the data link from the Module directly to receiver pc or to a private network.
Mythen3 Mythen3
-------- --------

View File

@ -92,14 +92,14 @@ Detector Enum
================ ======== ================ ========
GENERIC 0 GENERIC 0
EIGER 1 EIGER 1
GOTTHARD 2 GOTTHARD* 2
JUNGFRAU 3 JUNGFRAU 3
CHIPTESTBOARD 4 CHIPTESTBOARD 4
MOENCH 5 MOENCH 5
MYTHEN3 6 MYTHEN3 6
GOTTHARD2 7 GOTTHARD2 7
================ ======== ================ ========
* deprecated since v10.0.0
Previous Versions Previous Versions

View File

@ -22,7 +22,6 @@ Binaries
eigerDetectorServer_virtual eigerDetectorServer_virtual
jungfrauDetectorServer_virtual jungfrauDetectorServer_virtual
gotthardDetectorServer_virtual
gotthard2DetectorServer_virtual gotthard2DetectorServer_virtual
mythen3DetectorServer_virtual mythen3DetectorServer_virtual
moenchDetectorServer_virtual moenchDetectorServer_virtual

View File

@ -1,12 +0,0 @@
# detector hostname
hostname bchip007
# receiver pc hostname of 1Gb IP of the machine
rx_hostname my_receiver_hostname
# output directory
fpath /bigRAID/datadir_gotthard/rec_test_data
# high voltage
highvoltage 120

View File

@ -37,7 +37,6 @@ set( PYTHON_FILES
slsdet/enums.py slsdet/enums.py
slsdet/errors.py slsdet/errors.py
slsdet/gaincaps.py slsdet/gaincaps.py
slsdet/gotthard.py
slsdet/pattern.py slsdet/pattern.py
slsdet/gotthard2.py slsdet/gotthard2.py
slsdet/moench.py slsdet/moench.py

View File

@ -55,7 +55,6 @@ servers = [
# "jungfrauDetectorServer", # "jungfrauDetectorServer",
"mythen3DetectorServer", "mythen3DetectorServer",
# "gotthard2DetectorServer", # "gotthard2DetectorServer",
# "gotthardDetectorServer",
# "ctbDetectorServer", # "ctbDetectorServer",
# "moenchDetectorServer", # "moenchDetectorServer",
] ]

View File

@ -9,7 +9,6 @@ from .detector import Detector
from .jungfrau import Jungfrau from .jungfrau import Jungfrau
from .mythen3 import Mythen3 from .mythen3 import Mythen3
from .gotthard2 import Gotthard2 from .gotthard2 import Gotthard2
from .gotthard import Gotthard
from .moench import Moench from .moench import Moench
from .pattern import Pattern, patternParameters from .pattern import Pattern, patternParameters
from .gaincaps import Mythen3GainCapsWrapper from .gaincaps import Mythen3GainCapsWrapper

View File

@ -274,7 +274,7 @@ class Detector(CppDetectorApi):
@property @property
@element @element
def serialnumber(self): def serialnumber(self):
"""Jungfrau][Gotthard][Mythen3][Gotthard2][CTB][Moench] Serial number of detector """ """Jungfrau][Mythen3][Gotthard2][CTB][Moench] Serial number of detector """
return ut.lhex(self.getSerialNumber()) return ut.lhex(self.getSerialNumber())
@property @property
@ -312,7 +312,7 @@ class Detector(CppDetectorApi):
----- -----
[Eiger] Options: 4, 8, 12, 16, 32. If set to 32, also sets clkdivider to 2 (quarter speed), else to 0 (full speed)\n [Eiger] Options: 4, 8, 12, 16, 32. If set to 32, also sets clkdivider to 2 (quarter speed), else to 0 (full speed)\n
[Mythen3] Options: 8, 16, 32 \n [Mythen3] Options: 8, 16, 32 \n
[Jungfrau][Moench][Gotthard][Ctb][Mythen3][Gotthard2][Xilinx Ctb] 16 [Jungfrau][Moench][Ctb][Mythen3][Gotthard2][Xilinx Ctb] 16
""" """
return self.getDynamicRange() return self.getDynamicRange()
@ -372,7 +372,6 @@ class Detector(CppDetectorApi):
[Eiger] Use threshold command to load settings [Eiger] Use threshold command to load settings
[Jungfrau] GAIN0, HIGHGAIN0 \n [Jungfrau] GAIN0, HIGHGAIN0 \n
[Gotthard] DYNAMICGAIN, HIGHGAIN, LOWGAIN, MEDIUMGAIN, VERYHIGHGAIN \n
[Gotthard2] DYNAMICGAIN, FIXGAIN1, FIXGAIN2 \n [Gotthard2] DYNAMICGAIN, FIXGAIN1, FIXGAIN2 \n
[Eiger] settings loaded from file found in settingspath [Eiger] settings loaded from file found in settingspath
[Moench] G1_HIGHGAIN, G1_LOWGAIN, G2_HIGHCAP_HIGHGAIN, G2_HIGHCAP_LOWGAIN, G2_LOWCAP_HIGHGAIN, G2_LOWCAP_LOWGAIN, G4_HIGHGAIN, G4_LOWGAIN [Moench] G1_HIGHGAIN, G1_LOWGAIN, G2_HIGHCAP_HIGHGAIN, G2_HIGHCAP_LOWGAIN, G2_LOWCAP_HIGHGAIN, G2_LOWCAP_LOWGAIN, G4_HIGHGAIN, G4_LOWGAIN
@ -404,7 +403,7 @@ class Detector(CppDetectorApi):
@element @element
def framesl(self): def framesl(self):
""" """
[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][CTB][Xilinx CTB] Number of frames left in acquisition.\n [Jungfrau][Moench][Mythen3][Gotthard2][CTB][Xilinx CTB] Number of frames left in acquisition.\n
Note Note
---- ----
@ -635,7 +634,7 @@ class Detector(CppDetectorApi):
@element @element
def periodl(self): def periodl(self):
""" """
[Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2][Xilinx Ctb] Period left for current frame. [Jungfrau][Moench][CTB][Mythen3][Gotthard2][Xilinx Ctb] Period left for current frame.
Note Note
----- -----
@ -657,7 +656,7 @@ class Detector(CppDetectorApi):
@element @element
def delay(self): def delay(self):
""" """
[Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2][Xilinx Ctb] Delay after trigger, accepts either a value in seconds, DurationWrapper or datetime.timedelta [Jungfrau][Moench][CTB][Mythen3][Gotthard2][Xilinx Ctb] Delay after trigger, accepts either a value in seconds, DurationWrapper or datetime.timedelta
:getter: always returns in seconds. To get in DurationWrapper, use getDelayAfterTrigger :getter: always returns in seconds. To get in DurationWrapper, use getDelayAfterTrigger
@ -699,7 +698,7 @@ class Detector(CppDetectorApi):
@element @element
def delayl(self): def delayl(self):
""" """
[Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2][Xilinx Ctb] Delay left after trigger during acquisition, accepts either a value in seconds, datetime.timedelta or DurationWrapper [Jungfrau][Moench][CTB][Mythen3][Gotthard2][Xilinx Ctb] Delay left after trigger during acquisition, accepts either a value in seconds, datetime.timedelta or DurationWrapper
Note Note
----- -----
@ -1444,8 +1443,6 @@ class Detector(CppDetectorApi):
@udp_srcip.setter @udp_srcip.setter
def udp_srcip(self, ip): def udp_srcip(self, ip):
if ip == "auto": if ip == "auto":
if self.type == detectorType.GOTTHARD:
raise NotImplementedError('Auto for udp_srcip cannot be used for GotthardI')
ip = socket.gethostbyname(self.hostname[0]) ip = socket.gethostbyname(self.hostname[0])
ip = ut.make_ip(ip) ip = ut.make_ip(ip)
ut.set_using_dict(self.setSourceUDPIP, ip) ut.set_using_dict(self.setSourceUDPIP, ip)
@ -1526,7 +1523,6 @@ class Detector(CppDetectorApi):
Note Note
----- -----
[Gotthard] 0, 90, 110, 120, 150, 180, 200 \n
[Eiger][Mythen3][Gotthard2] 0 - 200 \n [Eiger][Mythen3][Gotthard2] 0 - 200 \n
[Jungfrau][Moench][Ctb] 0, 60 - 200 [Jungfrau][Moench][Ctb] 0, 60 - 200
""" """
@ -1654,7 +1650,7 @@ class Detector(CppDetectorApi):
def master(self): def master(self):
""" """
[Eiger][Gotthard2][Jungfrau][Moench] Sets (half) module to master and other(s) to slaves.\n [Eiger][Gotthard2][Jungfrau][Moench] Sets (half) module to master and other(s) to slaves.\n
[Gotthard][Gotthard2][Mythen3][Eiger][Jungfrau][Moench] Gets if the current (half) module is master. [Gotthard2][Mythen3][Eiger][Jungfrau][Moench] Gets if the current (half) module is master.
""" """
return self.getMaster() return self.getMaster()
@ -1912,7 +1908,7 @@ class Detector(CppDetectorApi):
@property @property
def adcreg(self): def adcreg(self):
"""[Jungfrau][Moench][Ctb][Gotthard] Writes to an adc register """[Jungfrau][Moench][Ctb] Writes to an adc register
Note Note
----- -----
@ -1941,7 +1937,7 @@ class Detector(CppDetectorApi):
@element @element
def triggersl(self): def triggersl(self):
""" """
[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][CTB][Xilinx CTB] Number of triggers left in acquisition.\n [Jungfrau][Moench][Mythen3][Gotthard2][CTB][Xilinx CTB] Number of triggers left in acquisition.\n
Note Note
---- ----
@ -2206,7 +2202,7 @@ class Detector(CppDetectorApi):
Note Note
----- -----
Default: AUTO_TIMING \n Default: AUTO_TIMING \n
[Jungfrau][Moench][Gotthard][Ctb][Gotthard2][Xilinx Ctb] AUTO_TIMING, TRIGGER_EXPOSURE \n [Jungfrau][Moench][Ctb][Gotthard2][Xilinx Ctb] AUTO_TIMING, TRIGGER_EXPOSURE \n
[Mythen3] AUTO_TIMING, TRIGGER_EXPOSURE, GATED, TRIGGER_GATED \n [Mythen3] AUTO_TIMING, TRIGGER_EXPOSURE, GATED, TRIGGER_GATED \n
[Eiger] AUTO_TIMING, TRIGGER_EXPOSURE, GATED, BURST_TRIGGER [Eiger] AUTO_TIMING, TRIGGER_EXPOSURE, GATED, BURST_TRIGGER
""" """
@ -2263,7 +2259,7 @@ class Detector(CppDetectorApi):
def type(self): def type(self):
""" Returns detector type. """ Returns detector type.
Enum: detectorType Enum: detectorType
[EIGER, JUNGFRAU, GOTTHARD, MOENCH, MYTHEN3, GOTTHARD2, CHIPTESTBOARD] [EIGER, JUNGFRAU, MOENCH, MYTHEN3, GOTTHARD2, CHIPTESTBOARD]
:setter: Not implemented :setter: Not implemented
""" """
@ -3479,15 +3475,13 @@ class Detector(CppDetectorApi):
@property @property
@element @element
def adcphase(self): def adcphase(self):
"""[Gotthard][Jungfrau][Moench][CTB] Sets phase shift of ADC clock. """[Jungfrau][Moench][CTB] Sets phase shift of ADC clock.
Note Note
----- -----
[Jungfrau][Moench] Absolute phase shift. Changing Speed also resets adcphase to recommended defaults.\n [Jungfrau][Moench] Absolute phase shift. Changing Speed also resets adcphase to recommended defaults.\n
[Ctb] Absolute phase shift. Changing adcclk also resets adcphase and sets it to previous values.\n [Ctb] Absolute phase shift. Changing adcclk also resets adcphase and sets it to previous values.
[Gotthard] Relative phase shift.
:getter: Not implemented for Gotthard
""" """
return self.getADCPhase() return self.getADCPhase()
@ -4088,27 +4082,6 @@ class Detector(CppDetectorApi):
return ClkDivProxy(self) return ClkDivProxy(self)
"""
---------------------------<<<Gotthard specific>>>---------------------------
"""
@property
def exptimel(self):
"""[Gotthard] Exposure time left for current frame.
:getter: always returns in seconds. To get in DurationWrapper, use getExptimeLeft
:setter: Not Implemented
Example
-----------
>>> d.exptimel
181.23
>>> d.getExptimeLeft()
[sls::DurationWrapper(total_seconds: 181.23 count: 181230000000)]
"""
t = self.getExptimeLeft()
return reduce_time(t)
""" """
---------------------------<<<Mythen3 specific>>>--------------------------- ---------------------------<<<Mythen3 specific>>>---------------------------

View File

@ -1,53 +0,0 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
This file contains the specialization for the Moench detector
"""
from .detector import Detector, freeze
from .dacs import DetectorDacs
import _slsdet
dacIndex = _slsdet.slsDetectorDefs.dacIndex
from .detector_property import DetectorProperty
# @freeze
# vref_ds, vcascn_pb, vcascp_pb, vout_cm, vcasc_out, vin_cm, vref_comp, ib_test_c
class GotthardDacs(DetectorDacs):
_dacs = [('vref_ds', dacIndex.VREF_DS, 0, 4000, 660),
('vcascn_pb', dacIndex.VCASCN_PB, 0, 4000, 650),
('vcascp_pb,', dacIndex.VCASCP_PB, 0, 4000, 1480),
('vout_cm', dacIndex.VOUT_CM, 0, 4000, 1520),
('vcasc_out', dacIndex.VCASC_OUT, 0, 4000, 1320),
('vin_cm', dacIndex.VIN_CM, 0, 4000, 1350),
('vref_comp', dacIndex.VREF_COMP, 0, 4000, 350),
('ib_test_c', dacIndex.IB_TESTC, 0, 4000, 2001),
]
_dacnames = [_d[0] for _d in _dacs]
#vthreshold??
@freeze
class Gotthard(Detector):
"""
Subclassing Detector to set up correct dacs and detector specific
functions.
"""
_detector_dynamic_range = [16]
_settings = ['standard', 'highgain', 'lowgain', 'veryhighgain', 'verylowgain']
"""available settings for Eiger, note almost always standard"""
def __init__(self, id=0):
super().__init__(id)
self._frozen = False
self._dacs = GotthardDacs(self)
@property
def dacs(self):
return self._dacs

View File

@ -1293,20 +1293,6 @@ void init_det(py::module &m) {
(void (Detector::*)(defs::collectionMode, sls::Positions)) & (void (Detector::*)(defs::collectionMode, sls::Positions)) &
Detector::setCollectionMode, Detector::setCollectionMode,
py::arg(), py::arg() = Positions{}); py::arg(), py::arg() = Positions{});
CppDetectorApi.def("getROI",
(Result<defs::ROI>(Detector::*)(sls::Positions) const) &
Detector::getROI,
py::arg() = Positions{});
CppDetectorApi.def("setROI",
(void (Detector::*)(defs::ROI, int)) & Detector::setROI,
py::arg(), py::arg());
CppDetectorApi.def(
"clearROI", (void (Detector::*)(sls::Positions)) & Detector::clearROI,
py::arg() = Positions{});
CppDetectorApi.def("getExptimeLeft",
(Result<sls::ns>(Detector::*)(sls::Positions) const) &
Detector::getExptimeLeft,
py::arg() = Positions{});
CppDetectorApi.def("getNumberOfBursts", CppDetectorApi.def("getNumberOfBursts",
(Result<int64_t>(Detector::*)(sls::Positions) const) & (Result<int64_t>(Detector::*)(sls::Positions) const) &
Detector::getNumberOfBursts, Detector::getNumberOfBursts,

View File

@ -121,13 +121,9 @@ void init_enums(py::module &m) {
.value("VTHRESHOLD", slsDetectorDefs::dacIndex::VTHRESHOLD) .value("VTHRESHOLD", slsDetectorDefs::dacIndex::VTHRESHOLD)
.value("IO_DELAY", slsDetectorDefs::dacIndex::IO_DELAY) .value("IO_DELAY", slsDetectorDefs::dacIndex::IO_DELAY)
.value("VREF_DS", slsDetectorDefs::dacIndex::VREF_DS) .value("VREF_DS", slsDetectorDefs::dacIndex::VREF_DS)
.value("VCASCN_PB", slsDetectorDefs::dacIndex::VCASCN_PB)
.value("VCASCP_PB", slsDetectorDefs::dacIndex::VCASCP_PB)
.value("VOUT_CM", slsDetectorDefs::dacIndex::VOUT_CM) .value("VOUT_CM", slsDetectorDefs::dacIndex::VOUT_CM)
.value("VCASC_OUT", slsDetectorDefs::dacIndex::VCASC_OUT)
.value("VIN_CM", slsDetectorDefs::dacIndex::VIN_CM) .value("VIN_CM", slsDetectorDefs::dacIndex::VIN_CM)
.value("VREF_COMP", slsDetectorDefs::dacIndex::VREF_COMP) .value("VREF_COMP", slsDetectorDefs::dacIndex::VREF_COMP)
.value("IB_TESTC", slsDetectorDefs::dacIndex::IB_TESTC)
.value("VB_COMP", slsDetectorDefs::dacIndex::VB_COMP) .value("VB_COMP", slsDetectorDefs::dacIndex::VB_COMP)
.value("VDD_PROT", slsDetectorDefs::dacIndex::VDD_PROT) .value("VDD_PROT", slsDetectorDefs::dacIndex::VDD_PROT)
.value("VIN_COM", slsDetectorDefs::dacIndex::VIN_COM) .value("VIN_COM", slsDetectorDefs::dacIndex::VIN_COM)

View File

@ -1,155 +0,0 @@
// SPDX-License-Identifier: LGPL-3.0-or-other
// Copyright (C) 2021 Contributors to the SLS Detector Package
#ifndef GOTTHARD2MODULEDATANEW_H
#define GOTTHARD2MODULEDATANEW_H
#include "gotthardModuleDataNew.h"
class gotthardDoubleModuleDataNew : public slsDetectorData<uint16_t> {
private:
const int nModules;
const int offset;
int iframe;
public:
/**
Implements the slsReceiverData structure for the gotthard read out by a module
i.e. using the slsReceiver (1x1280 pixels, 2 packets 1286 large etc.) \param c
crosstalk parameter for the output buffer
*/
gotthardDoubleModuleDataNew(int off = 24 * 2, int nmod = 2)
: slsDetectorData<uint16_t>(1280 * nmod, 1, nmod * (1280 * 2 + off)),
nModules(nmod), offset(off), iframe(0) {
#ifdef BCHIP074_BCHIP075
cout << "This is a bchip074-bchip075 system " << endl;
#endif
uint16_t **dMask;
int **dMap;
int ix, iy;
int ypixels = 1;
int xpixels = 1280 * nmod;
int imod, ipix;
dMask = new uint16_t *[1];
dMap = new int *[1];
dMap[0] = new int[1280 * nmod];
dMask[0] = new uint16_t[1280 * nmod];
for (int ix = 0; ix < xpixels; ix++) {
imod = ix % 2;
if (imod == 0)
ipix = ix / 2;
else
ipix = 1280 - 1 - ix / 2;
if (imod == 0)
dMap[0][ix] = ipix * 2 + offset;
else
dMap[0][ix] = 1280 * 2 + 2 * offset +
ipix * 2; // dataSize-2-ix;//+2*offset;
// dMap[0][ix] = 2*ipix+offset*(imod+1)+1280*2*imod;
dMask[0][ix] = 0x0;
#ifdef BCHIP074_BCHIP075
int ibad = ix / 2 + 1280 * imod;
if ((ibad >= 128 * 4 && ibad < 128 * 5) ||
(ibad >= 9 * 128 && ibad < 10 * 128) ||
(ibad >= (1280 + 128 * 4) && ibad < ibad >= (1280 + 128 * 6)))
dataROIMask[0][ix] = 0;
#endif
}
setDataMap(dMap);
setDataMask(dMask);
};
/**
Returns the frame number for the given dataset.
\param buff pointer to the dataset
\returns frame number
*/
int getFrameNumber(char *buff) {
if (offset >= sizeof(sls_detector_header))
return ((sls_detector_header *)buff)->frameNumber;
return iframe;
}; //*((int*)(buff+5))&0xffffff;};
/**
gets the packets number (last packet is labelled with 0 and is replaced with
40) \param buff pointer to the memory \returns packet number
*/
int getPacketNumber(char *buff) {
if (offset >= sizeof(sls_detector_header))
return ((sls_detector_header *)buff)->packetNumber;
};
/**
Loops over a memory slot until a complete frame is found (i.e. all
packets 0 to nPackets, same frame number). purely virtual func \param
data pointer to the memory to be analyzed \param ndata reference to the
amount of data found for the frame, in case the frame is incomplete at
the end of the memory slot \param dsize size of the memory slot to be
analyzed \returns pointer to the beginning of the last good frame (might
be incomplete if ndata smaller than dataSize), or NULL if no frame is
found
*/
virtual char *findNextFrame(char *data, int &ndata, int dsize) {
if (dsize < dataSize)
ndata = dsize;
else
ndata = dataSize;
return data;
}
virtual char *readNextFrame(ifstream &filebin) {
int ff = -1, np = -1;
return readNextFrame(filebin, ff, np);
};
virtual char *readNextFrame(ifstream &filebin, int &ff) {
int np = -1;
return readNextFrame(filebin, ff, np);
};
virtual char *readNextFrame(ifstream &filebin, int &ff, int &np) {
char *data = new char[dataSize];
char *d = readNextFrame(filebin, ff, np, data);
if (d == NULL) {
delete[] data;
data = NULL;
}
return data;
}
virtual char *readNextFrame(ifstream &filebin, int &ff, int &np,
char *data) {
char *retval = 0;
int nd;
int fnum = -1;
np = 0;
int pn;
// cout << dataSize << endl;
if (ff >= 0)
fnum = ff;
if (filebin.is_open()) {
if (filebin.read(data, dataSize)) {
ff = getFrameNumber(data);
np = getPacketNumber(data);
return data;
}
}
return NULL;
};
};
#endif

View File

@ -1,105 +0,0 @@
// SPDX-License-Identifier: LGPL-3.0-or-other
// Copyright (C) 2021 Contributors to the SLS Detector Package
#ifndef GOTTHARDSHORTMODULEDATA_H
#define GOTTHARDSHORTMODULEDATA_H
#include "slsReceiverData.h"
class gotthardShortModuleData : public slsReceiverData<uint16_t> {
public:
/**
Implements the slsReceiverData structure for the gotthard short read out by a
module i.e. using the slsReceiver (1x256 pixels, 1 packet 256 large etc.)
\param c crosstalk parameter for the output buffer
*/
gotthardShortModuleData(double c = 0)
: slsReceiverData<uint16_t>(xpixels, ypixels, npackets, buffersize),
xtalk(c) {
uint16_t **dMask;
int **dMap;
int ix, iy;
int offset = 2;
dMask = new uint16_t *[ypixels];
dMap = new int *[ypixels];
for (int i = 0; i < ypixels; i++) {
dMap[i] = new int[xpixels];
dMask[i] = new uint16_t[xpixels];
}
for (ix = 0; ix < ypixels; ++ix)
for (iy = 0; iy < xpixels; ++iy)
dMask[ix][iy] = 0x0;
for (ix = 0; ix < ypixels; ++ix)
for (iy = 0; iy < xpixels; ++iy) {
dMap[ix][iy] = offset;
offset++;
}
setDataMap(dMap);
setDataMask(dMask);
};
/**
Returns the frame number for the given dataset.
\param buff pointer to the dataset
\returns frame number
*/
int getFrameNumber(char *buff) { return (*(int *)buff); };
/**
gets the packets number (last packet is labelled with 0 and is replaced with
40) \param buff pointer to the memory \returns packet number
*/
int getPacketNumber(char *buff) { return 1; };
/**
returns the pixel value as double correcting for the output buffer crosstalk
\param data pointer to the memory
\param ix coordinate in the x direction
\param iy coordinate in the y direction
\returns channel value as double
*/
double getValue(char *data, int ix, int iy = 0) {
// check how it is for gotthard
if (xtalk == 0)
return slsDetectorData<uint16_t>::getValue(data, ix, iy);
else
return slsDetectorData<uint16_t>::getValue(data, ix, iy) -
xtalk *
slsDetectorData<uint16_t>::getValue(data, ix - 1, iy);
};
/** sets the output buffer crosstalk correction parameter
\param c output buffer crosstalk correction parameter to be set
\returns current value for the output buffer crosstalk correction parameter
*/
double setXTalk(double c) {
xtalk = c;
return xtalk;
}
/** gets the output buffer crosstalk parameter
\returns current value for the output buffer crosstalk correction parameter
*/
double getXTalk() { return xtalk; }
private:
double xtalk; /**<output buffer crosstalk correction parameter */
const static int xpixels = 256;
const static int ypixels = 1;
const static int npackets = 1;
const static int buffersize = 518;
};
#endif

View File

@ -72,7 +72,7 @@
<enum>QTabWidget::North</enum> <enum>QTabWidget::North</enum>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>3</number> <number>2</number>
</property> </property>
<property name="elideMode"> <property name="elideMode">
<enum>Qt::ElideLeft</enum> <enum>Qt::ElideLeft</enum>
@ -178,309 +178,6 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="tab_roi">
<property name="enabled">
<bool>false</bool>
</property>
<property name="font">
<font>
<family>Cantarell</family>
<pointsize>10</pointsize>
</font>
</property>
<attribute name="title">
<string>Region of Interest</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_4">
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<family>Cantarell</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>X Min:</string>
</property>
</widget>
</item>
<item row="1" column="8">
<widget class="QPushButton" name="btnClearRoi">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>35</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>35</height>
</size>
</property>
<property name="font">
<font>
<family>Cantarell</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Clear ROI at detector level&lt;/p&gt;&lt;p&gt;#clearroi#&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Clear ROI </string>
</property>
<property name="icon">
<iconset resource="../include/icons.qrc">
<normaloff>:/icons/images/erase.png</normaloff>:/icons/images/erase.png</iconset>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="spinXmin">
<property name="minimumSize">
<size>
<width>120</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>120</width>
<height>25</height>
</size>
</property>
<property name="font">
<font>
<family>Cantarell</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Set ROI at detector level&lt;/p&gt;&lt;p&gt;#roi#&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="minimum">
<number>-1</number>
</property>
<property name="maximum">
<number>1279</number>
</property>
<property name="value">
<number>-1</number>
</property>
</widget>
</item>
<item row="1" column="7">
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="3">
<widget class="QLabel" name="label_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<family>Cantarell</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Set ROI at detector level&lt;/p&gt;&lt;p&gt;#roi#&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>X Max:</string>
</property>
</widget>
</item>
<item row="1" column="2">
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="4">
<widget class="QSpinBox" name="spinXmax">
<property name="minimumSize">
<size>
<width>120</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>120</width>
<height>25</height>
</size>
</property>
<property name="font">
<font>
<family>Cantarell</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Set ROI at detector level&lt;/p&gt;&lt;p&gt;#roi#&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="minimum">
<number>-1</number>
</property>
<property name="maximum">
<number>1279</number>
</property>
<property name="value">
<number>-1</number>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<family>Cantarell</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Readout: </string>
</property>
</widget>
</item>
<item row="2" column="3">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="6">
<widget class="QPushButton" name="btnSetRoi">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>35</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>35</height>
</size>
</property>
<property name="font">
<font>
<family>Cantarell</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Set ROI at detector level&lt;/p&gt;&lt;p&gt;#roi#&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Set ROI </string>
</property>
<property name="icon">
<iconset resource="../include/icons.qrc">
<normaloff>:/icons/images/refresh.png</normaloff>:/icons/images/refresh.png</iconset>
</property>
</widget>
</item>
<item row="1" column="5">
<spacer name="horizontalSpacer_6">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1" colspan="4">
<widget class="QComboBox" name="comboReadout">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>160</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>25</height>
</size>
</property>
<property name="font">
<font>
<family>Cantarell</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select readout to set ROI at detector level&lt;/p&gt;&lt;p&gt;#roi#&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_network"> <widget class="QWidget" name="tab_network">
<property name="font"> <property name="font">
<font> <font>
@ -2238,11 +1935,6 @@ Exposure Time of a sub frame. Only for Eiger in 32 bit mode
</widget> </widget>
<tabstops> <tabstops>
<tabstop>spinSetAllTrimbits</tabstop> <tabstop>spinSetAllTrimbits</tabstop>
<tabstop>comboReadout</tabstop>
<tabstop>spinXmin</tabstop>
<tabstop>spinXmax</tabstop>
<tabstop>btnSetRoi</tabstop>
<tabstop>btnClearRoi</tabstop>
<tabstop>comboDetector</tabstop> <tabstop>comboDetector</tabstop>
<tabstop>spinControlPort</tabstop> <tabstop>spinControlPort</tabstop>
<tabstop>spinStopPort</tabstop> <tabstop>spinStopPort</tabstop>

View File

@ -38,87 +38,21 @@
<string>Form</string> <string>Form</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="1" column="2" colspan="3"> <item row="4" column="5">
<widget class="QComboBox" name="comboHV"> <widget class="QSpinBox" name="spinThreshold2">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>140</width>
<height>25</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>140</width>
<height>25</height>
</size>
</property>
<property name="font">
<font>
<family>Cantarell</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;High Voltage&lt;/p&gt;&lt;p&gt; #highvoltage#&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<item>
<property name="text">
<string>0</string>
</property>
</item>
<item>
<property name="text">
<string>90</string>
</property>
</item>
<item>
<property name="text">
<string>110</string>
</property>
</item>
<item>
<property name="text">
<string>120</string>
</property>
</item>
<item>
<property name="text">
<string>150</string>
</property>
</item>
<item>
<property name="text">
<string>180</string>
</property>
</item>
<item>
<property name="text">
<string>200</string>
</property>
</item>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="lblSettings">
<property name="enabled"> <property name="enabled">
<bool>true</bool> <bool>false</bool>
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>110</width> <width>140</width>
<height>0</height> <height>25</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>110</width> <width>140</width>
<height>16777215</height> <height>25</height>
</size> </size>
</property> </property>
<property name="font"> <property name="font">
@ -128,52 +62,42 @@
</font> </font>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Settings of the detector. &lt;/p&gt;&lt;p&gt; #settings#&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Threshold energy of 2nd counter&lt;/p&gt;&lt;p&gt;#threshold#&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<property name="text"> <property name="keyboardTracking">
<string>Settings:</string> <bool>false</bool>
</property>
<property name="suffix">
<string> eV</string>
</property>
<property name="minimum">
<number>-100000</number>
</property>
<property name="maximum">
<number>100000</number>
</property>
<property name="singleStep">
<number>100</number>
</property>
<property name="value">
<number>-1</number>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="4" column="9">
<widget class="QLabel" name="lblComboHV"> <spacer name="horizontalSpacer_4">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<family>Cantarell</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;High Voltage&lt;/p&gt;&lt;p&gt; #highvoltage#&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>High Voltage: </string>
</property>
</widget>
</item>
<item row="8" column="2">
<spacer name="verticalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>40</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="7" column="4"> <item row="6" column="4">
<widget class="QCheckBox" name="chkCounter3"> <widget class="QCheckBox" name="chkCounter3">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
@ -201,29 +125,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="0"> <item row="4" column="7">
<widget class="QLabel" name="lblSpinHV">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<family>Cantarell</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;High Voltage. Range: 60 - 200V. Swich off high voltage by setting to 0.&lt;/p&gt;&lt;p&gt;-1 corresponds to different values from detectors.&lt;/p&gt;&lt;p&gt;#highvoltage#&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>High Voltage: </string>
</property>
</widget>
</item>
<item row="5" column="7">
<spacer name="horizontalSpacer_3"> <spacer name="horizontalSpacer_3">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
@ -239,97 +141,7 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="7" column="2"> <item row="1" column="2" colspan="3">
<widget class="QCheckBox" name="chkCounter1">
<property name="enabled">
<bool>false</bool>
</property>
<property name="maximumSize">
<size>
<width>50</width>
<height>16777215</height>
</size>
</property>
<property name="font">
<font>
<family>Cantarell</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Enable 1st counter&lt;/p&gt;&lt;p&gt;#counters#&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>1</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="lblThreshold">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimumSize">
<size>
<width>110</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>110</width>
<height>16777215</height>
</size>
</property>
<property name="font">
<font>
<family>Cantarell</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Threshold energy. The trim energy values need to be loaded first using &amp;quot;trimen&amp;quot;&lt;/p&gt;&lt;p&gt;#threshold#&lt;/p&gt;&lt;p&gt;#trimen#&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Threshold:</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="lblDynamicRange">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimumSize">
<size>
<width>110</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>110</width>
<height>16777215</height>
</size>
</property>
<property name="font">
<font>
<family>Cantarell</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Dynamic Range of pixel/channel of detector&lt;/p&gt;&lt;p&gt;#dr#&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Dynamic Range:</string>
</property>
</widget>
</item>
<item row="2" column="2" colspan="3">
<widget class="QSpinBox" name="spinHV"> <widget class="QSpinBox" name="spinHV">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed"> <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
@ -369,8 +181,8 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="7" column="3"> <item row="6" column="2">
<widget class="QCheckBox" name="chkCounter2"> <widget class="QCheckBox" name="chkCounter1">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
@ -387,17 +199,222 @@
</font> </font>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Enable 2nd counter&lt;/p&gt;&lt;p&gt;#counters#&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Enable 1st counter&lt;/p&gt;&lt;p&gt;#counters#&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<property name="text"> <property name="text">
<string>2</string> <string>1</string>
</property> </property>
<property name="checked"> <property name="checked">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="2" colspan="3"> <item row="7" column="2">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="4" column="6">
<widget class="QSpinBox" name="spinThreshold3">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimumSize">
<size>
<width>140</width>
<height>25</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>140</width>
<height>25</height>
</size>
</property>
<property name="font">
<font>
<family>Cantarell</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Threshold energy of 3rd counter&lt;/p&gt;&lt;p&gt;#threshold#&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="keyboardTracking">
<bool>false</bool>
</property>
<property name="suffix">
<string> eV</string>
</property>
<property name="minimum">
<number>-100000</number>
</property>
<property name="maximum">
<number>100000</number>
</property>
<property name="singleStep">
<number>100</number>
</property>
<property name="value">
<number>-1</number>
</property>
</widget>
</item>
<item row="4" column="2" colspan="3">
<widget class="QSpinBox" name="spinThreshold">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimumSize">
<size>
<width>140</width>
<height>25</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>140</width>
<height>25</height>
</size>
</property>
<property name="font">
<font>
<family>Cantarell</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Threshold energy. The trim energy values need to be loaded first using &amp;quot;trimen&amp;quot;&lt;/p&gt;&lt;p&gt;#threshold#&lt;/p&gt;&lt;p&gt;#trimen#&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="keyboardTracking">
<bool>false</bool>
</property>
<property name="suffix">
<string> eV</string>
</property>
<property name="minimum">
<number>-100000</number>
</property>
<property name="maximum">
<number>100000</number>
</property>
<property name="singleStep">
<number>100</number>
</property>
<property name="value">
<number>-1</number>
</property>
</widget>
</item>
<item row="5" column="2" colspan="3">
<widget class="QComboBox" name="comboDynamicRange">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>140</width>
<height>25</height>
</size>
</property>
<property name="font">
<font>
<family>Cantarell</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Dynamic Range of pixel/channel of detector&lt;/p&gt;&lt;p&gt;#dr#&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<item>
<property name="text">
<string>1.67772e+07</string>
</property>
</item>
<item>
<property name="text">
<string>65535</string>
</property>
</item>
<item>
<property name="text">
<string>4095</string>
</property>
</item>
<item>
<property name="text">
<string>255</string>
</property>
</item>
<item>
<property name="text">
<string>7</string>
</property>
</item>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="lblCounter">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimumSize">
<size>
<width>110</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>110</width>
<height>16777215</height>
</size>
</property>
<property name="font">
<font>
<family>Cantarell</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Enable counters&lt;/p&gt;&lt;p&gt;#counters#&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Counters:</string>
</property>
</widget>
</item>
<item row="2" column="2" colspan="3">
<widget class="QComboBox" name="comboSettings"> <widget class="QComboBox" name="comboSettings">
<property name="enabled"> <property name="enabled">
<bool>true</bool> <bool>true</bool>
@ -542,7 +559,7 @@
</item> </item>
</widget> </widget>
</item> </item>
<item row="5" column="8"> <item row="4" column="8">
<widget class="QPushButton" name="btnSetThreshold"> <widget class="QPushButton" name="btnSetThreshold">
<property name="enabled"> <property name="enabled">
<bool>true</bool> <bool>true</bool>
@ -626,130 +643,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="0"> <item row="3" column="2" colspan="3">
<widget class="QLabel" name="lblGainMode">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimumSize">
<size>
<width>110</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>110</width>
<height>16777215</height>
</size>
</property>
<property name="font">
<font>
<family>Cantarell</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Gain Mode of the detector&lt;/p&gt;&lt;p&gt;#gainmode#&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Fix G0 is to be used with utmost caution. Can damage the detector!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Gain Mode:</string>
</property>
</widget>
</item>
<item row="5" column="2" colspan="3">
<widget class="QSpinBox" name="spinThreshold">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimumSize">
<size>
<width>140</width>
<height>25</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>140</width>
<height>25</height>
</size>
</property>
<property name="font">
<font>
<family>Cantarell</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Threshold energy. The trim energy values need to be loaded first using &amp;quot;trimen&amp;quot;&lt;/p&gt;&lt;p&gt;#threshold#&lt;/p&gt;&lt;p&gt;#trimen#&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="keyboardTracking">
<bool>false</bool>
</property>
<property name="suffix">
<string> eV</string>
</property>
<property name="minimum">
<number>-100000</number>
</property>
<property name="maximum">
<number>100000</number>
</property>
<property name="singleStep">
<number>100</number>
</property>
<property name="value">
<number>-1</number>
</property>
</widget>
</item>
<item row="5" column="5">
<widget class="QSpinBox" name="spinThreshold2">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimumSize">
<size>
<width>140</width>
<height>25</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>140</width>
<height>25</height>
</size>
</property>
<property name="font">
<font>
<family>Cantarell</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Threshold energy of 2nd counter&lt;/p&gt;&lt;p&gt;#threshold#&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="keyboardTracking">
<bool>false</bool>
</property>
<property name="suffix">
<string> eV</string>
</property>
<property name="minimum">
<number>-100000</number>
</property>
<property name="maximum">
<number>100000</number>
</property>
<property name="singleStep">
<number>100</number>
</property>
<property name="value">
<number>-1</number>
</property>
</widget>
</item>
<item row="4" column="2" colspan="3">
<widget class="QComboBox" name="comboGainMode"> <widget class="QComboBox" name="comboGainMode">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
@ -813,21 +707,15 @@
</item> </item>
</widget> </widget>
</item> </item>
<item row="5" column="6"> <item row="6" column="3">
<widget class="QSpinBox" name="spinThreshold3"> <widget class="QCheckBox" name="chkCounter2">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="minimumSize">
<size>
<width>140</width>
<height>25</height>
</size>
</property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>140</width> <width>50</width>
<height>25</height> <height>16777215</height>
</size> </size>
</property> </property>
<property name="font"> <property name="font">
@ -837,112 +725,18 @@
</font> </font>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Threshold energy of 3rd counter&lt;/p&gt;&lt;p&gt;#threshold#&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;Enable 2nd counter&lt;/p&gt;&lt;p&gt;#counters#&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<property name="keyboardTracking"> <property name="text">
<bool>false</bool> <string>2</string>
</property> </property>
<property name="suffix"> <property name="checked">
<string> eV</string> <bool>true</bool>
</property>
<property name="minimum">
<number>-100000</number>
</property>
<property name="maximum">
<number>100000</number>
</property>
<property name="singleStep">
<number>100</number>
</property>
<property name="value">
<number>-1</number>
</property> </property>
</widget> </widget>
</item> </item>
<item row="6" column="2" colspan="3"> <item row="5" column="0">
<widget class="QComboBox" name="comboDynamicRange"> <widget class="QLabel" name="lblDynamicRange">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>140</width>
<height>25</height>
</size>
</property>
<property name="font">
<font>
<family>Cantarell</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Dynamic Range of pixel/channel of detector&lt;/p&gt;&lt;p&gt;#dr#&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<item>
<property name="text">
<string>1.67772e+07</string>
</property>
</item>
<item>
<property name="text">
<string>65535</string>
</property>
</item>
<item>
<property name="text">
<string>4095</string>
</property>
</item>
<item>
<property name="text">
<string>255</string>
</property>
</item>
<item>
<property name="text">
<string>7</string>
</property>
</item>
</widget>
</item>
<item row="3" column="1">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="7" column="0">
<widget class="QLabel" name="lblCounter">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
@ -965,30 +759,147 @@
</font> </font>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Enable counters&lt;/p&gt;&lt;p&gt;#counters#&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Dynamic Range of pixel/channel of detector&lt;/p&gt;&lt;p&gt;#dr#&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<property name="text"> <property name="text">
<string>Counters:</string> <string>Dynamic Range:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="5" column="9"> <item row="2" column="0">
<spacer name="horizontalSpacer_4"> <widget class="QLabel" name="lblSettings">
<property name="enabled">
<bool>true</bool>
</property>
<property name="minimumSize">
<size>
<width>110</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>110</width>
<height>16777215</height>
</size>
</property>
<property name="font">
<font>
<family>Cantarell</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Settings of the detector. &lt;/p&gt;&lt;p&gt; #settings#&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Settings:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<spacer name="horizontalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>40</width> <width>20</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="4" column="0">
<widget class="QLabel" name="lblThreshold">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimumSize">
<size>
<width>110</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>110</width>
<height>16777215</height>
</size>
</property>
<property name="font">
<font>
<family>Cantarell</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Threshold energy. The trim energy values need to be loaded first using &amp;quot;trimen&amp;quot;&lt;/p&gt;&lt;p&gt;#threshold#&lt;/p&gt;&lt;p&gt;#trimen#&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Threshold:</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="lblGainMode">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimumSize">
<size>
<width>110</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>110</width>
<height>16777215</height>
</size>
</property>
<property name="font">
<font>
<family>Cantarell</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Gain Mode of the detector&lt;/p&gt;&lt;p&gt;#gainmode#&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Fix G0 is to be used with utmost caution. Can damage the detector!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Gain Mode:</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="lblSpinHV">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<family>Cantarell</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;High Voltage. Range: 60 - 200V. Swich off high voltage by setting to 0.&lt;/p&gt;&lt;p&gt;-1 corresponds to different values from detectors.&lt;/p&gt;&lt;p&gt;#highvoltage#&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>High Voltage: </string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
<tabstops> <tabstops>
<tabstop>comboHV</tabstop>
<tabstop>spinHV</tabstop> <tabstop>spinHV</tabstop>
<tabstop>comboSettings</tabstop> <tabstop>comboSettings</tabstop>
<tabstop>comboGainMode</tabstop> <tabstop>comboGainMode</tabstop>

View File

@ -38,9 +38,6 @@ class qTabAdvanced : public QWidget, private Ui::TabAdvancedObject {
void SetRxrUDPMAC(bool force = false); void SetRxrUDPMAC(bool force = false);
void ForceSetRxrUDPMAC(); void ForceSetRxrUDPMAC();
void SetRxrZMQPort(int port); void SetRxrZMQPort(int port);
void GetROI();
void ClearROI();
void SetROI();
void SetAllTrimbits(); void SetAllTrimbits();
void SetNumStoragecells(int value); void SetNumStoragecells(int value);
void SetSubExposureTime(); void SetSubExposureTime();

View File

@ -192,7 +192,6 @@ void qDetectorMain::SetUpDetector(const std::string &config_file, int multiID) {
actionLoadTrimbits->setEnabled(true); actionLoadTrimbits->setEnabled(true);
actionSaveTrimbits->setEnabled(true); actionSaveTrimbits->setEnabled(true);
break; break;
case slsDetectorDefs::GOTTHARD:
case slsDetectorDefs::JUNGFRAU: case slsDetectorDefs::JUNGFRAU:
case slsDetectorDefs::MOENCH: case slsDetectorDefs::MOENCH:
case slsDetectorDefs::GOTTHARD2: case slsDetectorDefs::GOTTHARD2:
@ -405,12 +404,12 @@ void qDetectorMain::ExecuteUtilities(QAction *action) {
void qDetectorMain::ExecuteHelp(QAction *action) { void qDetectorMain::ExecuteHelp(QAction *action) {
if (action == actionAbout) { if (action == actionAbout) {
LOG(logINFO) << "About Common GUI for Jungfrau, Eiger, Mythen3, " LOG(logDEBUG) << "About Common GUI for Jungfrau, Eiger, Mythen3, "
"Gotthard, Gotthard2 and Moench detectors"; "Gotthard2 and Moench detectors";
std::string clientVersion = "unknown"; std::string packageVersion = "unknown";
try { try {
clientVersion = det->getClientVersion(); packageVersion = det->getPackageVersion();
} }
CATCH_DISPLAY("Could not get client version.", CATCH_DISPLAY("Could not get client version.",
"qDetectorMain::ExecuteHelp") "qDetectorMain::ExecuteHelp")
@ -419,12 +418,12 @@ void qDetectorMain::ExecuteHelp(QAction *action) {
qDefs::INFORMATION, qDefs::INFORMATION,
"<p style=\"font-family:verdana;\">" "<p style=\"font-family:verdana;\">"
"<b>SLS Detector Client version: " + "<b>SLS Detector Package: v" +
clientVersion + packageVersion +
"</b><br><br>" "</b><br><br>"
"Common GUI to control the SLS Detectors: " "Common GUI to control the SLS Detectors: "
"Jungfrau, Eiger, Mythen3, Gotthard, Gotthard2 and " "Jungfrau, Eiger, Mythen3, Gotthard2 and "
"Moench.<br><br>" "Moench.<br><br>"
"It can be operated in parallel with the command " "It can be operated in parallel with the command "

View File

@ -83,9 +83,7 @@ void qDrawPlot::SetupWidgetWindow() {
fileSaveName = "Image"; fileSaveName = "Image";
} }
gotthard25 = ((detType == slsDetectorDefs::GOTTHARD2 || gotthard25 = (detType == slsDetectorDefs::GOTTHARD2 && det->size() == 2);
detType == slsDetectorDefs::GOTTHARD) &&
det->size() == 2);
SetupPlots(); SetupPlots();
SetDataCallBack(true); SetDataCallBack(true);

View File

@ -28,9 +28,6 @@ void qTabAdvanced::SetupWidgetWindow() {
spinSubDeadTime->setEnabled(true); spinSubDeadTime->setEnabled(true);
comboSubDeadTimeUnit->setEnabled(true); comboSubDeadTimeUnit->setEnabled(true);
break; break;
case slsDetectorDefs::GOTTHARD:
tab_roi->setEnabled(true);
break;
case slsDetectorDefs::MYTHEN3: case slsDetectorDefs::MYTHEN3:
tab_trimming->setEnabled(true); tab_trimming->setEnabled(true);
lblDiscardBits->setEnabled(true); lblDiscardBits->setEnabled(true);
@ -114,14 +111,6 @@ void qTabAdvanced::Initialization() {
connect(spinRxrZMQPort, SIGNAL(valueChanged(int)), this, connect(spinRxrZMQPort, SIGNAL(valueChanged(int)), this,
SLOT(SetRxrZMQPort(int))); SLOT(SetRxrZMQPort(int)));
// roi
if (tab_roi->isEnabled()) {
connect(comboReadout, SIGNAL(currentIndexChanged(int)), this,
SLOT(GetROI()));
connect(btnSetRoi, SIGNAL(clicked()), this, SLOT(SetROI()));
connect(btnClearRoi, SIGNAL(clicked()), this, SLOT(ClearROI()));
}
// storage cells // storage cells
if (lblNumStoragecells->isEnabled()) { if (lblNumStoragecells->isEnabled()) {
connect(spinNumStoragecells, SIGNAL(valueChanged(int)), this, connect(spinNumStoragecells, SIGNAL(valueChanged(int)), this,
@ -173,23 +162,16 @@ void qTabAdvanced::PopulateDetectors() {
LOG(logDEBUG) << "Populating detectors"; LOG(logDEBUG) << "Populating detectors";
disconnect(comboDetector, SIGNAL(currentIndexChanged(int)), this, disconnect(comboDetector, SIGNAL(currentIndexChanged(int)), this,
SLOT(SetDetector())); SLOT(SetDetector()));
disconnect(comboReadout, SIGNAL(currentIndexChanged(int)), this,
SLOT(GetROI()));
comboDetector->clear(); comboDetector->clear();
comboReadout->clear();
auto res = det->getHostname(); auto res = det->getHostname();
for (auto &it : res) { for (auto &it : res) {
comboDetector->addItem(QString(it.c_str())); comboDetector->addItem(QString(it.c_str()));
comboReadout->addItem(QString(it.c_str()));
} }
comboDetector->setCurrentIndex(0); comboDetector->setCurrentIndex(0);
comboReadout->setCurrentIndex(0);
connect(comboDetector, SIGNAL(currentIndexChanged(int)), this, connect(comboDetector, SIGNAL(currentIndexChanged(int)), this,
SLOT(SetDetector())); SLOT(SetDetector()));
connect(comboReadout, SIGNAL(currentIndexChanged(int)), this,
SLOT(GetROI()));
} }
void qTabAdvanced::GetControlPort() { void qTabAdvanced::GetControlPort() {
@ -570,40 +552,6 @@ void qTabAdvanced::SetRxrZMQPort(int port) {
&qTabAdvanced::GetRxrZMQPort) &qTabAdvanced::GetRxrZMQPort)
} }
void qTabAdvanced::GetROI() {
LOG(logDEBUG) << "Getting ROI";
try {
slsDetectorDefs::ROI roi =
det->getROI({comboReadout->currentIndex()})[0];
spinXmin->setValue(roi.xmin);
spinXmax->setValue(roi.xmax);
}
CATCH_DISPLAY("Could not get ROI.", "qTabAdvanced::GetROI")
}
void qTabAdvanced::ClearROI() {
LOG(logINFO) << "Clearing ROI";
spinXmin->setValue(-1);
spinXmax->setValue(-1);
SetROI();
LOG(logDEBUG) << "ROIs cleared";
}
void qTabAdvanced::SetROI() {
slsDetectorDefs::ROI roi(spinXmin->value(), spinXmax->value());
// set roi
LOG(logINFO) << "Setting ROI: [" << roi.xmin << ", " << roi.xmax << "]";
try {
det->setROI(roi, {comboReadout->currentIndex()});
}
CATCH_DISPLAY("Could not set these ROIs.", "qTabAdvanced::SetROI")
// update corrected list
GetROI();
}
void qTabAdvanced::GetAllTrimbits() { void qTabAdvanced::GetAllTrimbits() {
LOG(logDEBUG) << "Getting all trimbits value"; LOG(logDEBUG) << "Getting all trimbits value";
disconnect(spinSetAllTrimbits, SIGNAL(valueChanged(int)), this, disconnect(spinSetAllTrimbits, SIGNAL(valueChanged(int)), this,
@ -831,11 +779,6 @@ void qTabAdvanced::Refresh() {
// update all network widgets // update all network widgets
SetDetector(); SetDetector();
// roi
if (tab_roi->isEnabled()) {
GetROI();
}
// storage cells // storage cells
if (lblNumStoragecells->isEnabled()) { if (lblNumStoragecells->isEnabled()) {
GetNumStoragecells(); GetNumStoragecells();

View File

@ -34,15 +34,6 @@ void qTabDeveloper::SetupWidgetWindow() {
new qDacWidget(this, det, false, sls::ToString(it), it)); new qDacWidget(this, det, false, sls::ToString(it), it));
} }
break; break;
case slsDetectorDefs::GOTTHARD:
ind = slsDetectorDefs::TEMPERATURE_ADC;
adcWidgets.push_back(
new qDacWidget(this, det, false, sls::ToString(ind), ind));
ind = slsDetectorDefs::TEMPERATURE_FPGA;
adcWidgets.push_back(
new qDacWidget(this, det, false, sls::ToString(ind), ind));
break;
case slsDetectorDefs::JUNGFRAU: case slsDetectorDefs::JUNGFRAU:
ind = slsDetectorDefs::TEMPERATURE_ADC; ind = slsDetectorDefs::TEMPERATURE_ADC;
adcWidgets.push_back( adcWidgets.push_back(

View File

@ -47,7 +47,6 @@ void qTabPlot::SetupWidgetWindow() {
// enabling according to det type // enabling according to det type
is1d = false; is1d = false;
switch (det->getDetectorType().squash()) { switch (det->getDetectorType().squash()) {
case slsDetectorDefs::GOTTHARD:
case slsDetectorDefs::MYTHEN3: case slsDetectorDefs::MYTHEN3:
is1d = true; is1d = true;
break; break;

View File

@ -18,8 +18,6 @@ qTabSettings::qTabSettings(QWidget *parent, Detector *detector)
qTabSettings::~qTabSettings() {} qTabSettings::~qTabSettings() {}
void qTabSettings::SetupWidgetWindow() { void qTabSettings::SetupWidgetWindow() {
comboHV->hide();
lblComboHV->hide();
lblSpinHV->hide(); lblSpinHV->hide();
spinHV->hide(); spinHV->hide();
hvmin = HV_MIN; hvmin = HV_MIN;
@ -100,9 +98,6 @@ void qTabSettings::SetupWidgetWindow() {
} else if (detType == slsDetectorDefs::MOENCH) { } else if (detType == slsDetectorDefs::MOENCH) {
lblSpinHV->show(); lblSpinHV->show();
spinHV->show(); spinHV->show();
} else if (detType == slsDetectorDefs::GOTTHARD) {
comboHV->show();
lblComboHV->show();
} else if (detType == slsDetectorDefs::GOTTHARD2) { } else if (detType == slsDetectorDefs::GOTTHARD2) {
lblSpinHV->show(); lblSpinHV->show();
spinHV->show(); spinHV->show();
@ -189,8 +184,6 @@ void qTabSettings::ShowFixG0(bool expertMode) {
void qTabSettings::Initialization() { void qTabSettings::Initialization() {
// High voltage // High voltage
connect(comboHV, SIGNAL(currentIndexChanged(int)), this,
SLOT(SetHighVoltage()));
connect(spinHV, SIGNAL(valueChanged(int)), this, SLOT(SetHighVoltage())); connect(spinHV, SIGNAL(valueChanged(int)), this, SLOT(SetHighVoltage()));
// Settings // Settings
@ -231,12 +224,10 @@ void qTabSettings::Initialization() {
void qTabSettings::GetHighVoltage() { void qTabSettings::GetHighVoltage() {
// not enabled for eiger // not enabled for eiger
if (!comboHV->isVisible() && !spinHV->isVisible()) if (!spinHV->isVisible())
return; return;
LOG(logDEBUG) << "Getting High Voltage"; LOG(logDEBUG) << "Getting High Voltage";
disconnect(spinHV, SIGNAL(valueChanged(int)), this, SLOT(SetHighVoltage())); disconnect(spinHV, SIGNAL(valueChanged(int)), this, SLOT(SetHighVoltage()));
disconnect(comboHV, SIGNAL(currentIndexChanged(int)), this,
SLOT(SetHighVoltage()));
try { try {
Result<int> retvals = det->getHighVoltage(); Result<int> retvals = det->getHighVoltage();
@ -258,55 +249,19 @@ void qTabSettings::GetHighVoltage() {
master_retvals.tsquash("Inconsistent values for high voltage."); master_retvals.tsquash("Inconsistent values for high voltage.");
} }
// spinHV
if (spinHV->isVisible()) {
if (retval != 0 && retval < hvmin && retval > HV_MAX) { if (retval != 0 && retval < hvmin && retval > HV_MAX) {
throw RuntimeError(std::string("Unknown High Voltage: ") + throw RuntimeError(std::string("Unknown High Voltage: ") +
std::to_string(retval)); std::to_string(retval));
} }
spinHV->setValue(retval); spinHV->setValue(retval);
} }
// combo HV
else {
switch (retval) {
case 0:
comboHV->setCurrentIndex(HV_0);
break;
case 90:
comboHV->setCurrentIndex(HV_90);
break;
case 110:
comboHV->setCurrentIndex(HV_110);
break;
case 120:
comboHV->setCurrentIndex(HV_120);
break;
case 150:
comboHV->setCurrentIndex(HV_150);
break;
case 180:
comboHV->setCurrentIndex(HV_180);
break;
case 200:
comboHV->setCurrentIndex(HV_200);
break;
default:
throw RuntimeError(std::string("Unknown High Voltage: ") +
std::to_string(retval));
}
}
}
CATCH_DISPLAY("Could not get high voltage.", "qTabSettings::GetHighVoltage") CATCH_DISPLAY("Could not get high voltage.", "qTabSettings::GetHighVoltage")
connect(spinHV, SIGNAL(valueChanged(int)), this, SLOT(SetHighVoltage())); connect(spinHV, SIGNAL(valueChanged(int)), this, SLOT(SetHighVoltage()));
connect(comboHV, SIGNAL(currentIndexChanged(int)), this,
SLOT(SetHighVoltage()));
} }
void qTabSettings::SetHighVoltage() { void qTabSettings::SetHighVoltage() {
int val = (comboHV->isVisible() ? comboHV->currentText().toInt() int val = spinHV->value();
: spinHV->value());
LOG(logINFO) << "Setting high voltage:" << val; LOG(logINFO) << "Setting high voltage:" << val;
try { try {
det->setHighVoltage(val); det->setHighVoltage(val);
} }

View File

@ -13,7 +13,6 @@ install(TARGETS slsProjectCSettings
add_subdirectory(ctbDetectorServer) add_subdirectory(ctbDetectorServer)
add_subdirectory(xilinx_ctbDetectorServer) add_subdirectory(xilinx_ctbDetectorServer)
add_subdirectory(eigerDetectorServer) add_subdirectory(eigerDetectorServer)
add_subdirectory(gotthardDetectorServer)
add_subdirectory(jungfrauDetectorServer) add_subdirectory(jungfrauDetectorServer)
add_subdirectory(mythen3DetectorServer) add_subdirectory(mythen3DetectorServer)
add_subdirectory(gotthard2DetectorServer) add_subdirectory(gotthard2DetectorServer)

View File

@ -4,7 +4,6 @@
# empty branch = developer branch in updateAPIVersion.sh # empty branch = developer branch in updateAPIVersion.sh
branch="" branch=""
det_list=("ctbDetectorServer det_list=("ctbDetectorServer
gotthardDetectorServer
gotthard2DetectorServer gotthard2DetectorServer
jungfrauDetectorServer jungfrauDetectorServer
mythen3DetectorServer mythen3DetectorServer

View File

@ -4,7 +4,6 @@
# empty branch = developer branch in updateAPIVersion.sh # empty branch = developer branch in updateAPIVersion.sh
branch="" branch=""
det_list=("ctbDetectorServer" det_list=("ctbDetectorServer"
"gotthardDetectorServer"
"gotthard2DetectorServer" "gotthard2DetectorServer"
"jungfrauDetectorServer" "jungfrauDetectorServer"
"mythen3DetectorServer" "mythen3DetectorServer"

View File

@ -1 +0,0 @@
AXIS_BUILDTYPE ?= cris-axis-linux-gnu

View File

@ -1,45 +0,0 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
add_executable(gotthardDetectorServer_virtual
slsDetectorFunctionList.c
../slsDetectorServer/src/slsDetectorServer.c
../slsDetectorServer/src/slsDetectorServer_funcs.c
../slsDetectorServer/src/communication_funcs.c
../slsDetectorServer/src/blackfin.c
../slsDetectorServer/src/AD9252.c
../slsDetectorServer/src/AD9257.c
../slsDetectorServer/src/LTC2620.c
../slsDetectorServer/src/common.c
../slsDetectorServer/src/commonServerFunctions.c
../slsDetectorServer/src/programViaBlackfin.c
../slsDetectorServer/src/communication_funcs_UDP.c
../slsDetectorServer/src/sharedMemory.c
../../slsSupportLib/src/md5.c
)
include_directories(
../slsDetectorServer/include
../../slsSupportLib/include
)
target_include_directories(gotthardDetectorServer_virtual
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
)
target_compile_definitions(gotthardDetectorServer_virtual
PUBLIC GOTTHARDD VIRTUAL STOP_SERVER
)
target_link_libraries(gotthardDetectorServer_virtual
PUBLIC pthread rt slsProjectCSettings
)
set_target_properties(gotthardDetectorServer_virtual PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
)
install(TARGETS gotthardDetectorServer_virtual
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
configure_file(config_gotthard.txt ${CMAKE_BINARY_DIR}/bin/config_gotthard.txt COPYONLY)

View File

@ -1,48 +0,0 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
current_dir = $(shell pwd)
main_inc = ../slsDetectorServer/include/
main_src = ../slsDetectorServer/src/
support_lib = ../../slsSupportLib/include/
md5_dir = ../../slsSupportLib/src/
CROSS = bfin-uclinux-
CC = $(CROSS)gcc
CFLAGS += -Wall -std=gnu99 -DGOTTHARDD -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(current_dir) #-DVERBOSEI #-DVERBOSE
LDLIBS += -lm -lrt -pthread
PROGS = gotthardDetectorServer
DESTDIR ?= bin
INSTMODE = 0777
SRCS = slsDetectorFunctionList.c
SRCS += $(main_src)slsDetectorServer.c $(main_src)slsDetectorServer_funcs.c $(main_src)communication_funcs.c $(main_src)blackfin.c $(main_src)AD9252.c $(main_src)AD9257.c $(main_src)LTC2620.c $(main_src)programViaBlackfin.c $(main_src)common.c $(main_src)commonServerFunctions.c $(main_src)/sharedMemory.c $(md5_dir)md5.c
OBJS = $(SRCS:.c=.o)
all: clean $(PROGS)
version: clean versioning $(PROGS)
boot: $(OBJS)
version_branch=$(API_BRANCH)
version_name=APIGOTTHARD
version_path=slsDetectorServers/gotthardDetectorServer
versioning:
cd ../../ && echo $(PWD) && echo `tput setaf 6; ./updateAPIVersion.sh $(version_name) $(version_path) $(version_branch); tput sgr0;`
$(PROGS): $(OBJS)
# echo $(OBJS)
mkdir -p $(DESTDIR)
$(CC) -o $@ $^ $(CFLAGS) $(LDLIBS)
mv $(PROGS) $(DESTDIR)
cp config_gotthard.txt $(DESTDIR)
rm *.gdb
rm $(main_src)*.o $(md5_dir)*.o
clean:
rm -rf $(DESTDIR)/$(PROGS) *.o *.gdb $(main_src)*.o $(md5_dir)*.o

View File

@ -1,394 +0,0 @@
// SPDX-License-Identifier: LGPL-3.0-or-other
// Copyright (C) 2021 Contributors to the SLS Detector Package
#pragma once
/* Definitions for FPGA*/
#define MEM_MAP_SHIFT (11)
/** Gain register */
#define GAIN_REG (0x10 << MEM_MAP_SHIFT)
#define GAIN_CONFGAIN_OFST (0)
#define GAIN_CONFGAIN_MSK (0x000000FF << GAIN_CONFGAIN_OFST)
#define GAIN_CONFGAIN_HGH_GAIN_VAL \
((0x0 << GAIN_CONFGAIN_OFST) & GAIN_CONFGAIN_MSK)
#define GAIN_CONFGAIN_DYNMC_GAIN_VAL \
((0x8 << GAIN_CONFGAIN_OFST) & GAIN_CONFGAIN_MSK)
#define GAIN_CONFGAIN_LW_GAIN_VAL \
((0x6 << GAIN_CONFGAIN_OFST) & GAIN_CONFGAIN_MSK)
#define GAIN_CONFGAIN_MDM_GAIN_VAL \
((0x2 << GAIN_CONFGAIN_OFST) & GAIN_CONFGAIN_MSK)
#define GAIN_CONFGAIN_VRY_HGH_GAIN_VAL \
((0x1 << GAIN_CONFGAIN_OFST) & GAIN_CONFGAIN_MSK)
/** Flow Control register */
// #define FLOW_CONTROL_REG (0x11 << MEM_MAP_SHIFT)
/** Flow Status register */
// #define FLOW_STATUS_REG (0x12 << MEM_MAP_SHIFT)
/** Frame register */
// #define FRAME_REG (0x13 << MEM_MAP_SHIFT)
/** Multi Purpose register */
#define MULTI_PURPOSE_REG (0x14 << MEM_MAP_SHIFT)
#define PHS_STP_OFST (0)
#define PHS_STP_MSK (0x00000001 << PHS_STP_OFST)
#define RST_CNTR_OFST (2)
#define RST_CNTR_MSK (0x00000001 << RST_CNTR_OFST)
#define SW1_OFST (5)
#define SW1_MSK (0x00000001 << SW1_OFST)
#define WRT_BCK_OFST (6)
#define WRT_BCK_MSK (0x00000001 << WRT_BCK_OFST)
#define RST_OFST (7)
#define RST_MSK (0x00000001 << RST_OFST)
#define PLL_CLK_SL_OFST (8)
#define PLL_CLK_SL_MSK (0x00000007 << PLL_CLK_SL_OFST)
#define PLL_CLK_SL_MSTR_VAL ((0x1 << PLL_CLK_SL_OFST) & PLL_CLK_SL_MSK)
#define PLL_CLK_SL_MSTR_ADC_VAL ((0x2 << PLL_CLK_SL_OFST) & PLL_CLK_SL_MSK)
#define PLL_CLK_SL_SLV_VAL ((0x3 << PLL_CLK_SL_OFST) & PLL_CLK_SL_MSK)
#define PLL_CLK_SL_SLV_ADC_VAL ((0x4 << PLL_CLK_SL_OFST) & PLL_CLK_SL_MSK)
#define ENT_RSTN_OFST (11)
#define ENT_RSTN_MSK (0x00000001 << ENT_RSTN_OFST)
#define INT_RSTN_OFST (12)
#define INT_RSTN_MSK (0x00000001 << INT_RSTN_OFST)
#define DGTL_TST_OFST (14)
#define DGTL_TST_MSK (0x00000001 << DGTL_TST_OFST)
#define CHNG_AT_PWR_ON_OFST (15) // Not used in SW
#define CHNG_AT_PWR_ON_MSK (0x00000001 << CHNG_AT_PWR_ON_OFST) // Not used in SW
#define RST_TO_SW1_DLY_OFST (16)
#define RST_TO_SW1_DLY_MSK (0x0000000F << RST_TO_SW1_DLY_OFST)
#define STRT_ACQ_DLY_OFST (20)
#define STRT_ACQ_DLY_MSK (0x0000000F << STRT_ACQ_DLY_OFST)
/** DAQ register */
#define DAQ_REG (0x15 << MEM_MAP_SHIFT)
#define DAQ_TKN_TMNG_OFST (0)
#define DAQ_TKN_TMNG_MSK (0x0000FFFF << DAQ_TKN_TMNG_OFST)
#define DAQ_TKN_TMNG_BRD_RVSN_1_VAL \
((0x1f16 << DAQ_TKN_TMNG_OFST) & DAQ_TKN_TMNG_MSK)
#define DAQ_TKN_TMNG_BRD_RVSN_2_VAL \
((0x1f10 << DAQ_TKN_TMNG_OFST) & DAQ_TKN_TMNG_MSK)
#define DAQ_PCKT_LNGTH_OFST (16)
#define DAQ_PCKT_LNGTH_MSK (0x0000FFFF << DAQ_PCKT_LNGTH_OFST)
#define DAQ_PCKT_LNGTH_NO_ROI_VAL \
((0x0013f << DAQ_PCKT_LNGTH_OFST) & DAQ_PCKT_LNGTH_MSK)
#define DAQ_PCKT_LNGTH_ROI_VAL \
((0x0007f << DAQ_PCKT_LNGTH_OFST) & DAQ_PCKT_LNGTH_MSK)
/** Time From Start register */
// #define TIME_FROM_START_REG (0x16 << MEM_MAP_SHIFT)
/** DAC Control register */
#define SPI_REG (0x17 << MEM_MAP_SHIFT)
#define SPI_DAC_SRL_CS_OTPT_OFST (0)
#define SPI_DAC_SRL_CS_OTPT_MSK (0x00000001 << SPI_DAC_SRL_CS_OTPT_OFST)
#define SPI_DAC_SRL_CLK_OTPT_OFST (1)
#define SPI_DAC_SRL_CLK_OTPT_MSK (0x00000001 << SPI_DAC_SRL_CLK_OTPT_OFST)
#define SPI_DAC_SRL_DGTL_OTPT_OFST (2)
#define SPI_DAC_SRL_DGTL_OTPT_MSK (0x00000001 << SPI_DAC_SRL_DGTL_OTPT_OFST)
/** ADC SPI register */
#define ADC_SPI_REG (0x18 << MEM_MAP_SHIFT)
#define ADC_SPI_SRL_CLK_OTPT_OFST (0)
#define ADC_SPI_SRL_CLK_OTPT_MSK (0x00000001 << ADC_SPI_SRL_CLK_OTPT_OFST)
#define ADC_SPI_SRL_DT_OTPT_OFST (1)
#define ADC_SPI_SRL_DT_OTPT_MSK (0x00000001 << ADC_SPI_SRL_DT_OTPT_OFST)
#define ADC_SPI_SRL_CS_OTPT_OFST (2)
#define ADC_SPI_SRL_CS_OTPT_MSK (0x0000001F << ADC_SPI_SRL_CS_OTPT_OFST)
/** ADC Sync register */
#define ADC_SYNC_REG (0x19 << MEM_MAP_SHIFT)
#define ADC_SYNC_ENET_STRT_DLY_OFST (0)
#define ADC_SYNC_ENET_STRT_DLY_MSK (0x0000000F << ADC_SYNC_ENET_STRT_DLY_OFST)
#define ADC_SYNC_ENET_STRT_DLY_VAL \
((0x4 << ADC_SYNC_ENET_STRT_DLY_OFST) & ADC_SYNC_ENET_STRT_DLY_MSK)
#define ADC_SYNC_TKN1_HGH_DLY_OFST (4)
#define ADC_SYNC_TKN1_HGH_DLY_MSK (0x0000000F << ADC_SYNC_TKN1_HGH_DLY_OFST)
#define ADC_SYNC_TKN1_HGH_DLY_VAL \
((0x1 << ADC_SYNC_TKN1_HGH_DLY_OFST) & ADC_SYNC_TKN1_HGH_DLY_MSK)
#define ADC_SYNC_TKN2_HGH_DLY_OFST (8)
#define ADC_SYNC_TKN2_HGH_DLY_MSK (0x0000000F << ADC_SYNC_TKN2_HGH_DLY_OFST)
#define ADC_SYNC_TKN2_HGH_DLY_VAL \
((0x2 << ADC_SYNC_TKN2_HGH_DLY_OFST) & ADC_SYNC_TKN2_HGH_DLY_MSK)
#define ADC_SYNC_TKN1_LOW_DLY_OFST (12)
#define ADC_SYNC_TKN1_LOW_DLY_MSK (0x0000000F << ADC_SYNC_TKN1_LOW_DLY_OFST)
#define ADC_SYNC_TKN1_LOW_DLY_VAL \
((0x2 << ADC_SYNC_TKN1_LOW_DLY_OFST) & ADC_SYNC_TKN1_LOW_DLY_MSK)
#define ADC_SYNC_TKN2_LOW_DLY_OFST (16)
#define ADC_SYNC_TKN2_LOW_DLY_MSK (0x0000000F << ADC_SYNC_TKN2_LOW_DLY_OFST)
#define ADC_SYNC_TKN2_LOW_DLY_VAL \
((0x3 << ADC_SYNC_TKN2_LOW_DLY_OFST) & ADC_SYNC_TKN2_LOW_DLY_MSK)
// 0x32214
#define ADC_SYNC_TKN_VAL \
(ADC_SYNC_ENET_STRT_DLY_VAL | ADC_SYNC_TKN1_HGH_DLY_VAL | \
ADC_SYNC_TKN2_HGH_DLY_VAL | ADC_SYNC_TKN1_LOW_DLY_VAL | \
ADC_SYNC_TKN2_LOW_DLY_VAL)
#define ADC_SYNC_CLEAN_FIFOS_OFST (20)
#define ADC_SYNC_CLEAN_FIFOS_MSK (0x00000001 << ADC_SYNC_CLEAN_FIFOS_OFST)
#define ADC_SYNC_ENET_DELAY_OFST (24)
#define ADC_SYNC_ENET_DELAY_MSK (0x000000FF << ADC_SYNC_ENET_DELAY_OFST)
#define ADC_SYNC_ENET_DELAY_NO_ROI_VAL \
((0x88 << ADC_SYNC_ENET_DELAY_OFST) & ADC_SYNC_ENET_DELAY_MSK)
#define ADC_SYNC_ENET_DELAY_ROI_VAL \
((0x1b << ADC_SYNC_ENET_DELAY_OFST) & ADC_SYNC_ENET_DELAY_MSK)
/** Time From Start register */
// #define MU_TIME_REG (0x1a << MEM_MAP_SHIFT)
/** Temperatre SPI In register */
#define TEMP_SPI_IN_REG (0x1b << MEM_MAP_SHIFT)
#define TEMP_SPI_IN_T1_CLK_OFST (0)
#define TEMP_SPI_IN_T1_CLK_MSK (0x00000001 << TEMP_SPI_IN_T1_CLK_OFST)
#define TEMP_SPI_IN_T1_CS_OFST (1)
#define TEMP_SPI_IN_T1_CS_MSK (0x00000001 << TEMP_SPI_IN_T1_CS_OFST)
#define TEMP_SPI_IN_T2_CLK_OFST (2)
#define TEMP_SPI_IN_T2_CLK_MSK (0x00000001 << TEMP_SPI_IN_T2_CLK_OFST)
#define TEMP_SPI_IN_T2_CS_OFST (3)
#define TEMP_SPI_IN_T2_CS_MSK (0x00000001 << TEMP_SPI_IN_T2_CS_OFST)
#define TEMP_SPI_IN_IDLE_MSK \
(TEMP_SPI_IN_T1_CS_MSK | TEMP_SPI_IN_T2_CS_MSK | TEMP_SPI_IN_T1_CLK_MSK | \
TEMP_SPI_IN_T2_CLK_MSK)
/** Temperatre SPI Out register */
#define TEMP_SPI_OUT_REG (0x1c << MEM_MAP_SHIFT)
#define TEMP_SPI_OUT_T1_DT_OFST (0)
#define TEMP_SPI_OUT_T1_DT_MSK (0x00000001 << TEMP_SPI_OUT_T1_DT_OFST)
#define TEMP_SPI_OUT_T2_DT_OFST (1)
#define TEMP_SPI_OUT_T2_DT_MSK (0x00000001 << TEMP_SPI_OUT_T2_DT_OFST)
/** TSE Configure register */
#define TSE_CONF_REG (0x1d << MEM_MAP_SHIFT)
/** SPI Configure register */
#define ENET_CONF_REG (0x1e << MEM_MAP_SHIFT)
/** Write TSE Shadow register */
// #define WRITE_TSE_SHADOW_REG (0x1f << MEM_MAP_SHIFT)
/** High Voltage register */
#define HV_REG (0x20 << MEM_MAP_SHIFT)
#define HV_ENBL_OFST (0)
#define HV_ENBL_MSK (0x00000001 << HV_ENBL_OFST)
#define HV_SEL_OFST (1)
#define HV_SEL_MSK (0x00000007 << HV_SEL_OFST)
#define HV_SEL_90_VAL ((0x0 << HV_SEL_OFST) & HV_SEL_MSK)
#define HV_SEL_110_VAL ((0x1 << HV_SEL_OFST) & HV_SEL_MSK)
#define HV_SEL_120_VAL ((0x2 << HV_SEL_OFST) & HV_SEL_MSK)
#define HV_SEL_150_VAL ((0x3 << HV_SEL_OFST) & HV_SEL_MSK)
#define HV_SEL_180_VAL ((0x4 << HV_SEL_OFST) & HV_SEL_MSK)
#define HV_SEL_200_VAL ((0x5 << HV_SEL_OFST) & HV_SEL_MSK)
/** Dummy register */
#define DUMMY_REG (0x21 << MEM_MAP_SHIFT)
/** Firmware Version register */
#define FPGA_VERSION_REG (0x22 << MEM_MAP_SHIFT)
#define FPGA_VERSION_OFST (0)
#define FPGA_VERSION_MSK \
(0x00FFFFFF << FPGA_VERSION_OFST) // to get in format yymmdd
/* Fix Pattern register */
#define FIX_PATT_REG (0x23 << MEM_MAP_SHIFT)
#define FIX_PATT_VAL (0xACDC1980)
/** 16 bit Control register */
#define CONTROL_REG (0x24 << MEM_MAP_SHIFT)
#define CONTROL_STRT_ACQ_OFST (0)
#define CONTROL_STRT_ACQ_MSK (0x00000001 << CONTROL_STRT_ACQ_OFST)
#define CONTROL_STP_ACQ_OFST (1)
#define CONTROL_STP_ACQ_MSK (0x00000001 << CONTROL_STP_ACQ_OFST)
#define CONTROL_STRT_FF_TST_OFST (2) // Not used in FW & SW
#define CONTROL_STRT_FF_TST_MSK (0x00000001 << CONTROL_STRT_FF_TST_OFST)
#define CONTROL_STP_FF_TST_OFST (3) // Not used in FW & SW
#define CONTROL_STP_FF_TST_MSK (0x00000001 << CONTROL_STP_FF_TST_OFST)
#define CONTROL_STRT_RDT_OFST (4)
#define CONTROL_STRT_RDT_MSK (0x00000001 << CONTROL_STRT_RDT_OFST)
#define CONTROL_STP_RDT_OFST (5)
#define CONTROL_STP_RDT_MSK (0x00000001 << CONTROL_STP_RDT_OFST)
#define CONTROL_STRT_EXPSR_OFST (6)
#define CONTROL_STRT_EXPSR_MSK (0x00000001 << CONTROL_STRT_EXPSR_OFST)
#define CONTROL_STP_EXPSR_OFST (7)
#define CONTROL_STP_EXPSR_MSK (0x00000001 << CONTROL_STP_EXPSR_OFST)
#define CONTROL_STRT_TRN_OFST (8)
#define CONTROL_STRT_TRN_MSK (0x00000001 << CONTROL_STRT_TRN_OFST)
#define CONTROL_STP_TRN_OFST (9)
#define CONTROL_STP_TRN_MSK (0x00000001 << CONTROL_STP_TRN_OFST)
#define CONTROL_SYNC_RST_OFST (10)
#define CONTROL_SYNC_RST_MSK (0x00000001 << CONTROL_SYNC_RST_OFST)
/** Status register */
#define STATUS_REG (0x25 << MEM_MAP_SHIFT)
#define STATUS_RN_BSY_OFST (0)
#define STATUS_RN_BSY_MSK (0x00000001 << STATUS_RN_BSY_OFST)
#define STATUS_RDT_BSY_OFST (1)
#define STATUS_RDT_BSY_MSK (0x00000001 << STATUS_RDT_BSY_OFST)
#define STATUS_WTNG_FR_TRGGR_OFST (3)
#define STATUS_WTNG_FR_TRGGR_MSK (0x00000001 << STATUS_WTNG_FR_TRGGR_OFST)
#define STATUS_DLY_BFR_OFST (4)
#define STATUS_DLY_BFR_MSK (0x00000001 << STATUS_DLY_BFR_OFST)
#define STATUS_DLY_AFTR_OFST (5)
#define STATUS_DLY_AFTR_MSK (0x00000001 << STATUS_DLY_AFTR_OFST)
#define STATUS_EXPSNG_OFST (6)
#define STATUS_EXPSNG_MSK (0x00000001 << STATUS_EXPSNG_OFST)
#define STATUS_CNT_ENBL_OFST (7)
#define STATUS_CNT_ENBL_MSK (0x00000001 << STATUS_CNT_ENBL_OFST)
#define STATUS_RD_STT_OFST (8)
#define STATUS_RD_STT_MSK (0x00000007 << STATUS_RD_STT_OFST)
#define STATUS_RN_STT_OFST (12)
#define STATUS_RN_STT_MSK (0x00000007 << STATUS_RN_STT_OFST)
#define STATUS_SM_FF_FLL_OFST (15)
#define STATUS_SM_FF_FLL_MSK (0x00000001 << STATUS_SM_FF_FLL_OFST)
#define STATUS_ALL_FF_EMPTY_OFST (11)
#define STATUS_ALL_FF_EMPTY_MSK (0x00000001 << STATUS_ALL_FF_EMPTY_OFST)
#define STATUS_RN_MSHN_BSY_OFST (17)
#define STATUS_RN_MSHN_BSY_MSK (0x00000001 << STATUS_RN_MSHN_BSY_OFST)
#define STATUS_RD_MSHN_BSY_OFST (18)
#define STATUS_RD_MSHN_BSY_MSK (0x00000001 << STATUS_RD_MSHN_BSY_OFST)
#define STATUS_RN_FNSHD_OFST (20)
#define STATUS_RN_FNSHD_MSK (0x00000001 << STATUS_RN_FNSHD_OFST)
#define STATUS_IDLE_MSK (0x0000FFFF << 0)
/** Config register */
#define CONFIG_REG (0x26 << MEM_MAP_SHIFT)
#define CONFIG_SLAVE_OFST (0) // Not used in FW & SW
#define CONFIG_SLAVE_MSK (0x00000001 << CONFIG_SLAVE_OFST)
#define CONFIG_MASTER_OFST (1) // Not used in FW & SW
#define CONFIG_MASTER_MSK (0x00000001 << CONFIG_MASTER_OFST)
#define CONFIG_TM_GT_ENBL_OFST (2) // Not used in FW & SW
#define CONFIG_TM_GT_ENBL_MSK (0x00000001 << CONFIG_TM_GT_ENBL_OFST)
#define CONFIG_CPU_RDT_OFST (12)
#define CONFIG_CPU_RDT_MSK (0x00000001 << CONFIG_CPU_RDT_OFST)
#define CONFIG_CNTNS_RDT_OFST (23) // Not used in FW & SW
#define CONFIG_CNTNS_RDT_MSK (0x00000001 << CONFIG_CNTNS_RDT_OFST)
#define CONFIG_ACCMLT_CNTS_OFST (24) // Not used in FW & SW
#define CONFIG_ACCMLT_CNTS_MSK (0x00000001 << CONFIG_ACCMLT_CNTS_OFST)
/** External Signal register */
#define EXT_SIGNAL_REG (0x27 << MEM_MAP_SHIFT)
#define EXT_SIGNAL_OFST (0)
#define EXT_SIGNAL_MSK (0x00000007 << EXT_SIGNAL_OFST)
#define EXT_SIGNAL_OFF_VAL ((0x0 << EXT_SIGNAL_OFST) & EXT_SIGNAL_MSK)
#define EXT_SIGNAL_TRGGR_IN_RSNG_VAL ((0x3 << EXT_SIGNAL_OFST) & EXT_SIGNAL_MSK)
#define EXT_SIGNAL_TRGGR_IN_FLLNG_VAL \
((0x4 << EXT_SIGNAL_OFST) & EXT_SIGNAL_MSK)
/** Look at me register */
// #define LOOK_AT_ME_REG (0x28 << MEM_MAP_SHIFT)
/** FPGA SVN register */
// #define FPGA_SVN_REG (0x29 << MEM_MAP_SHIFT)
/** Chip of Interest register */
#define CHIP_OF_INTRST_REG (0x2a << MEM_MAP_SHIFT)
#define CHIP_OF_INTRST_ADC_SEL_OFST (0)
#define CHIP_OF_INTRST_ADC_SEL_MSK (0x0000001F << CHIP_OF_INTRST_ADC_SEL_OFST)
#define CHIP_OF_INTRST_NUM_CHNNLS_OFST (16)
#define CHIP_OF_INTRST_NUM_CHNNLS_MSK \
(0x0000FFFF << CHIP_OF_INTRST_NUM_CHNNLS_OFST)
/** Out MUX register */
// #define OUT_MUX_REG (0x2b << MEM_MAP_SHIFT)
/** Board Version register */
#define BOARD_REVISION_REG (0x2c << MEM_MAP_SHIFT)
#define BOARD_REVISION_OFST (0)
#define BOARD_REVISION_MSK (0x0000FFFF << BOARD_REVISION_OFST)
#define DETECTOR_TYPE_OFST (16)
#define DETECTOR_TYPE_MSK (0x0000000F << DETECTOR_TYPE_OFST)
// #define DETECTOR_TYPE_GOTTHARD_VAL (??)
#define DETECTOR_TYPE_MOENCH_VAL (2)
/** Memory Test register */
// #define MEMORY_TEST_REG (0x2d << MEM_MAP_SHIFT)
/** Hit Threshold register */
// #define HIT_THRESHOLD_REG (0x2e << MEM_MAP_SHIFT)
/** Hit Count register */
// #define HIT_COUNT_REG (0x2f << MEM_MAP_SHIFT)
/* 16 bit Fifo Data register */
#define FIFO_DATA_REG (0x50 << MEM_MAP_SHIFT) // Not used in FW and SW (16bit)
/** Dacs Set 1 register */
// #define DACS_SET_1_REG (0x65 << MEM_MAP_SHIFT)
/** Dacs Set 2 register */
// #define DACS_SET_2_REG (0x66 << MEM_MAP_SHIFT)
/** Dacs Set 3 register */
// #define DACS_SET_3_REG (0x67 << MEM_MAP_SHIFT)
/* Set Delay 64 bit register */
#define SET_DELAY_LSB_REG (0x68 << MEM_MAP_SHIFT)
#define SET_DELAY_MSB_REG (0x69 << MEM_MAP_SHIFT)
/* Get Delay 64 bit register */
#define GET_DELAY_LSB_REG (0x6a << MEM_MAP_SHIFT)
#define GET_DELAY_MSB_REG (0x6b << MEM_MAP_SHIFT)
/* Set Triggers 64 bit register */
#define SET_TRAINS_LSB_REG (0x6c << MEM_MAP_SHIFT)
#define SET_TRAINS_MSB_REG (0x6d << MEM_MAP_SHIFT)
/* Get Triggers 64 bit register */
#define GET_TRAINS_LSB_REG (0x6e << MEM_MAP_SHIFT)
#define GET_TRAINS_MSB_REG (0x6f << MEM_MAP_SHIFT)
/* Set Frames 64 bit register */
#define SET_FRAMES_LSB_REG (0x70 << MEM_MAP_SHIFT)
#define SET_FRAMES_MSB_REG (0x71 << MEM_MAP_SHIFT)
/* Get Frames 64 bit register */
#define GET_FRAMES_LSB_REG (0x72 << MEM_MAP_SHIFT)
#define GET_FRAMES_MSB_REG (0x73 << MEM_MAP_SHIFT)
/* Set Period 64 bit register */
#define SET_PERIOD_LSB_REG (0x74 << MEM_MAP_SHIFT)
#define SET_PERIOD_MSB_REG (0x75 << MEM_MAP_SHIFT)
/* Get Period 64 bit register */
#define GET_PERIOD_LSB_REG (0x76 << MEM_MAP_SHIFT)
#define GET_PERIOD_MSB_REG (0x77 << MEM_MAP_SHIFT)
/* Set Exptime 64 bit register */
#define SET_EXPTIME_LSB_REG (0x78 << MEM_MAP_SHIFT)
#define SET_EXPTIME_MSB_REG (0x79 << MEM_MAP_SHIFT)
/* Get Exptime 64 bit register */
#define GET_EXPTIME_LSB_REG (0x7a << MEM_MAP_SHIFT)
#define GET_EXPTIME_MSB_REG (0x7b << MEM_MAP_SHIFT)
/* Set Gates 64 bit register */
// #define SET_GATES_LSB_REG (0x7c << MEM_MAP_SHIFT)
// #define SET_GATES_MSB_REG (0x7d << MEM_MAP_SHIFT)
/* Set Gates 64 bit register */
// #define GET_GATES_LSB_REG (0x7e << MEM_MAP_SHIFT)
// #define GET_GATES_MSB_REG (0x7f << MEM_MAP_SHIFT)
/* Dark Image starting address */
#define DARK_IMAGE_REG (0x81 << MEM_MAP_SHIFT)
/* Gain Image starting address */
#define GAIN_IMAGE_REG (0x82 << MEM_MAP_SHIFT)
/* Counter Block Memory starting address */
#define COUNTER_MEMORY_REG (0x85 << MEM_MAP_SHIFT)

View File

@ -1,23 +0,0 @@
#masterflags (no_master, is_master, is_slave)
masterflags no_master
#master default delay
masterdefaultdelay 70
#patternphase
patternphase 0
#adcphase
adcphase 0
#slave pattern phase
slavepatternphase 0
#slave adc phase
slaveadcphase 0
#rst to sw1 delay
rsttosw1delay 2
#start acquisition delay
startacqdelay 1

View File

@ -1,23 +0,0 @@
#masterflags (no_master, is_master, is_slave)
masterflags no_master
#master default delay
masterdefaultdelay 70
#patternphase
patternphase 0
#adcphase
adcphase 0
#slave pattern phase
slavepatternphase 0
#slave adc phase
slaveadcphase 0
#rst to sw1 delay
rsttosw1delay 2
#start acquisition delay
startacqdelay 1

View File

@ -1,159 +0,0 @@
// SPDX-License-Identifier: LGPL-3.0-or-other
// Copyright (C) 2021 Contributors to the SLS Detector Package
#pragma once
#include "sls/sls_detector_defs.h"
#include <stdlib.h>
#define NUM_HARDWARE_VERSIONS (2)
#define HARDWARE_VERSION_NUMBERS \
{ 0x1, 0x2 }
#define HARDWARE_VERSION_NAMES \
{ "1.0", "2.0" }
#define LINKED_SERVER_NAME "gotthardDetectorServer"
#ifdef VIRTUAL
#define CTRL_SRVR_INIT_TIME_US (2 * 1000 * 1000)
#else
#define CTRL_SRVR_INIT_TIME_US (300 * 1000)
#endif
/* Enums */
enum ADCINDEX { TEMP_FPGA, TEMP_ADC };
enum DACINDEX {
G_VREF_DS,
G_VCASCN_PB,
G_VCASCP_PB,
G_VOUT_CM,
G_VCASC_OUT,
G_VIN_CM,
G_VREF_COMP,
G_IB_TESTC
};
enum CLKINDEX { ADC_CLK, NUM_CLOCKS };
#define CLK_NAMES "adc"
#define DAC_NAMES \
"vref_ds", "vcascn_pb", "vcascp_pb", "vout_cm", "vcasc_out", "vin_cm", \
"vref_comp", "ib_testc"
#define DEFAULT_DAC_VALS \
{ \
660, /* G_VREF_DS */ \
650, /* G_VCASCN_PB */ \
1480, /* G_VCASCP_PB */ \
1520, /* G_VOUT_CM */ \
1320, /* G_VCASC_OUT */ \
1350, /* G_VIN_CM */ \
350, /* G_VREF_COMP */ \
2001 /* G_IB_TESTC */ \
};
/* for 25 um */
#define CONFIG_FILE "config_gotthard.txt"
/* Hardware Definitions */
#define NCHAN (128)
#define NCHIP (10)
#define NDAC (8)
#define NCHIPS_PER_ADC (2)
#define NCHAN_PER_ADC (256)
#define DYNAMIC_RANGE (16)
#define NUM_BITS_PER_PIXEL (DYNAMIC_RANGE / 8)
#define DATA_BYTES (NCHIP * NCHAN * NUM_BITS_PER_PIXEL)
#define CLK_FREQ (32007729) // Hz
#define MAX_EXT_SIGNALS (1)
/** Firmware Definitions */
#define IP_PACKET_SIZE_NO_ROI \
(NCHIP * (NCHAN / 2) * 2 + 14 + 20) // 2 packets, so divide by 2
#define IP_PACKET_SIZE_ROI (NCHIPS_PER_ADC * NCHAN * 2 + 14 + 20)
#define UDP_PACKETSIZE_NO_ROI \
(NCHIP * (NCHAN / 2) * 2 + 4 + 8 + 2) // 2 packets, so divide by 2
#define UDP_PACKETSIZE_ROI (NCHIPS_PER_ADC * NCHAN * 2 + 4 + 8 + 2)
/** Default Parameters */
#define DEFAULT_NUM_FRAMES (1)
#define DEFAULT_NUM_CYCLES (1)
#define DEFAULT_EXPTIME (1 * 1000 * 1000) // 1 ms
#define DEFAULT_PERIOD (1 * 1000 * 1000 * 1000) // 1 s
#define DEFAULT_DELAY (0)
#define DEFAULT_SETTINGS (DYNAMICGAIN)
#define DEFAULT_TIMING_MODE (AUTO_TIMING)
#define DEFAULT_TRIGGER_MODE (TRIGGER_IN_RISING_EDGE)
#define DEFAULT_HIGH_VOLTAGE (0)
#define DEFAULT_PHASE_SHIFT (120)
#define DEFAULT_TX_UDP_PORT (0xE185)
#define DAC_MIN_MV (0)
#define DAC_MAX_MV (2500)
/** ENEt conf structs */
typedef struct mac_header_struct {
u_int8_t mac_dest_mac2;
u_int8_t mac_dest_mac1;
u_int8_t mac_dummy1;
u_int8_t mac_dummy2;
u_int8_t mac_dest_mac6;
u_int8_t mac_dest_mac5;
u_int8_t mac_dest_mac4;
u_int8_t mac_dest_mac3;
u_int8_t mac_src_mac4;
u_int8_t mac_src_mac3;
u_int8_t mac_src_mac2;
u_int8_t mac_src_mac1;
u_int16_t mac_ether_type;
u_int8_t mac_src_mac6;
u_int8_t mac_src_mac5;
} mac_header;
typedef struct ip_header_struct {
u_int16_t ip_len;
u_int8_t ip_tos;
u_int8_t ip_ihl : 4, ip_ver : 4;
u_int16_t ip_offset : 13, ip_flag : 3;
u_int16_t ip_ident;
u_int16_t ip_chksum;
u_int8_t ip_protocol;
u_int8_t ip_ttl;
u_int32_t ip_sourceip;
u_int32_t ip_destip;
} ip_header;
typedef struct udp_header_struct {
u_int16_t udp_destport;
u_int16_t udp_srcport;
u_int16_t udp_chksum;
u_int16_t udp_len;
} udp_header;
typedef struct mac_conf_struct {
mac_header mac;
ip_header ip;
udp_header udp;
u_int32_t npack;
u_int32_t lpack;
u_int32_t npad;
u_int32_t cdone;
} mac_conf;
typedef struct tse_conf_struct {
u_int32_t rev; // 0x0
u_int32_t scratch;
u_int32_t command_config;
u_int32_t mac_0; // 0x3
u_int32_t mac_1;
u_int32_t frm_length;
u_int32_t pause_quant;
u_int32_t rx_section_empty; // 0x7
u_int32_t rx_section_full;
u_int32_t tx_section_empty;
u_int32_t tx_section_full;
u_int32_t rx_almost_empty; // 0xB
u_int32_t rx_almost_full;
u_int32_t tx_almost_empty;
u_int32_t tx_almost_full;
u_int32_t mdio_addr0; // 0xF
u_int32_t mdio_addr1;
} tse_conf;

View File

@ -1,32 +0,0 @@
// SPDX-License-Identifier: LGPL-3.0-or-other
// Copyright (C) 2021 Contributors to the SLS Detector Package
#pragma once
#include <inttypes.h>
/**
* Set Defines
* @param reg spi register
* @param cmsk chip select mask
* @param clkmsk clock output mask
* @param dmsk digital output mask
* @param dofst digital output offset
*/
void AD9252_SetDefines(uint32_t reg, uint32_t cmsk, uint32_t clkmsk,
uint32_t dmsk, int dofst);
/**
* Disable SPI
*/
void AD9252_Disable();
/**
* Set SPI reg value
* @param codata value to be set
*/
void AD9252_Set(int addr, int val);
/**
* Configure
*/
void AD9252_Configure();

View File

@ -2,27 +2,17 @@
// Copyright (C) 2021 Contributors to the SLS Detector Package // Copyright (C) 2021 Contributors to the SLS Detector Package
#include "sls/sls_detector_defs.h" #include "sls/sls_detector_defs.h"
#include "slsDetectorServer_defs.h" // DAC_INDEX, ADC_INDEX, also include RegisterDefs.h #include "slsDetectorServer_defs.h" // DAC_INDEX, ADC_INDEX, also include RegisterDefs.h
#ifdef GOTTHARDD
#include "AD9252.h" // old board compatibility #if defined(JUNGFRAUD) || defined(MOENCHD) || defined(CHIPTESTBOARDD)
#include "clogger.h" // runState(enum TLogLevel)
#endif
#if defined(GOTTHARDD) || defined(JUNGFRAUD) || defined(MOENCHD) || \
defined(CHIPTESTBOARDD)
#include "AD9257.h" // commonServerFunctions.h, blackfin.h, ansi.h #include "AD9257.h" // commonServerFunctions.h, blackfin.h, ansi.h
#endif #endif
#if defined(MYTHEN3D) || defined(GOTTHARD2D)
#include "programViaNios.h"
#elif defined(CHIPTESTBOARDD) || defined(JUNGFRAUD) || defined(MOENCHD) || \
defined(GOTTHARDD)
#include "programViaBlackfin.h"
#endif
#if defined(MYTHEN3D) || defined(GOTTHARD2D) #if defined(MYTHEN3D) || defined(GOTTHARD2D)
#include "nios.h" #include "nios.h"
#elif defined(GOTTHARDD) || defined(JUNGFRAUD) || defined(MOENCHD) || \ #include "programViaNios.h"
defined(CHIPTESTBOARDD) #elif defined(CHIPTESTBOARDD) || defined(JUNGFRAUD) || defined(MOENCHD)
#include "blackfin.h" #include "blackfin.h"
#include "programViaBlackfin.h"
#endif #endif
#ifdef ARMPROCESSOR #ifdef ARMPROCESSOR
@ -76,8 +66,7 @@ int testBus();
#endif #endif
#endif #endif
#if defined(GOTTHARDD) || \ #if ((defined(EIGERD) || defined(JUNGFRAUD) || defined(MOENCHD)) && \
((defined(EIGERD) || defined(JUNGFRAUD) || defined(MOENCHD)) && \
defined(VIRTUAL)) defined(VIRTUAL))
void setTestImageMode(int ival); void setTestImageMode(int ival);
int getTestImageMode(); int getTestImageMode();
@ -102,7 +91,7 @@ u_int16_t getHardwareVersionNumber();
u_int16_t getHardwareSerialNumber(); u_int16_t getHardwareSerialNumber();
#endif #endif
#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(GOTTHARD2D) || \ #if defined(JUNGFRAUD) || defined(MOENCHD) || defined(GOTTHARD2D) || \
defined(MYTHEN3D) || defined(GOTTHARDD) defined(MYTHEN3D)
int isHardwareVersion_1_0(); int isHardwareVersion_1_0();
#endif #endif
#if defined(JUNGFRAUD) #if defined(JUNGFRAUD)
@ -162,8 +151,7 @@ void setADIFDefaults();
#if defined(GOTTHARD2D) || defined(EIGERD) || defined(JUNGFRAUD) #if defined(GOTTHARD2D) || defined(EIGERD) || defined(JUNGFRAUD)
int readConfigFile(); int readConfigFile();
#endif #endif
#if defined(GOTTHARDD) || defined(GOTTHARD2D) || defined(EIGERD) || \ #if defined(GOTTHARD2D) || defined(EIGERD) || defined(MYTHEN3D)
defined(MYTHEN3D)
int checkCommandLineConfiguration(); int checkCommandLineConfiguration();
#endif #endif
#ifdef EIGERD #ifdef EIGERD
@ -177,9 +165,6 @@ int readRegister(uint32_t offset, uint32_t *retval);
int setBit(const uint32_t addr, const int nBit, int validate); int setBit(const uint32_t addr, const int nBit, int validate);
int clearBit(const uint32_t addr, const int nBit, int validate); int clearBit(const uint32_t addr, const int nBit, int validate);
int getBit(const uint32_t addr, const int nBit, int *retval); int getBit(const uint32_t addr, const int nBit, int *retval);
#elif GOTTHARDD
void writeRegister16And32(uint32_t offset, uint32_t data);
uint32_t readRegister16And32(uint32_t offset);
#endif #endif
// firmware functions (resets) // firmware functions (resets)
@ -205,26 +190,11 @@ int resetChip(char *mess);
void cleanFifos(); void cleanFifos();
void resetCore(); void resetCore();
void resetPeripheral(); void resetPeripheral();
#elif GOTTHARDD
void setPhaseShiftOnce();
void setPhaseShift(int numphaseshift);
void cleanFifos();
void setADCSyncRegister();
void setDAQRegister();
void setChipOfInterestRegister(int adc);
void setROIADC(int adc);
void setGbitReadout();
int readConfigFile();
void setMasterSlaveConfiguration();
#endif #endif
// parameters - dr, roi // parameters - dr, roi
int setDynamicRange(int dr); int setDynamicRange(int dr);
int getDynamicRange(int *retval); int getDynamicRange(int *retval);
#ifdef GOTTHARDD
int setROI(ROI arg);
ROI getROI();
#endif
#if defined(JUNGFRAUD) || defined(MOENCHD) #if defined(JUNGFRAUD) || defined(MOENCHD)
void setADCInvertRegister(uint32_t val); void setADCInvertRegister(uint32_t val);
uint32_t getADCInvertRegister(); uint32_t getADCInvertRegister();
@ -336,9 +306,8 @@ void updatePacketizing();
int64_t getNumFramesLeft(); int64_t getNumFramesLeft();
int64_t getNumTriggersLeft(); int64_t getNumTriggersLeft();
#endif #endif
#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(GOTTHARDD) || \ #if defined(JUNGFRAUD) || defined(MOENCHD) || defined(CHIPTESTBOARDD) || \
defined(CHIPTESTBOARDD) || defined(MYTHEN3D) || defined(GOTTHARD2D) || \ defined(MYTHEN3D) || defined(GOTTHARD2D) || defined(XILINX_CHIPTESTBOARDD)
defined(XILINX_CHIPTESTBOARDD)
int setDelayAfterTrigger(int64_t val); int setDelayAfterTrigger(int64_t val);
int64_t getDelayAfterTrigger(); int64_t getDelayAfterTrigger();
int64_t getDelayAfterTriggerLeft(); int64_t getDelayAfterTriggerLeft();
@ -347,9 +316,6 @@ int64_t getPeriodLeft();
#ifdef GOTTHARD2D #ifdef GOTTHARD2D
int64_t getNumBurstsLeft(); int64_t getNumBurstsLeft();
#endif #endif
#ifdef GOTTHARDD
int64_t getExpTimeLeft();
#endif
#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(CHIPTESTBOARDD) || \ #if defined(JUNGFRAUD) || defined(MOENCHD) || defined(CHIPTESTBOARDD) || \
defined(MYTHEN3D) || defined(GOTTHARD2D) || defined(XILINX_CHIPTESTBOARDD) defined(MYTHEN3D) || defined(GOTTHARD2D) || defined(XILINX_CHIPTESTBOARDD)
int64_t getFramesFromStart(); int64_t getFramesFromStart();
@ -462,8 +428,8 @@ int setMaster(enum MASTERINDEX m);
int setTop(enum TOPINDEX t); int setTop(enum TOPINDEX t);
int isTop(int *retval); int isTop(int *retval);
#endif #endif
#if defined(MYTHEN3D) || defined(EIGERD) || defined(GOTTHARDD) || \ #if defined(MYTHEN3D) || defined(EIGERD) || defined(GOTTHARD2D) || \
defined(GOTTHARD2D) || defined(JUNGFRAUD) || defined(MOENCHD) defined(JUNGFRAUD) || defined(MOENCHD)
int isMaster(int *retval); int isMaster(int *retval);
#endif #endif
@ -489,15 +455,12 @@ int setAnalogPulsing(int enable);
int setNegativePolarity(int enable); int setNegativePolarity(int enable);
int setDACS(int *dacs); int setDACS(int *dacs);
#endif #endif
#if defined(GOTTHARDD) || defined(MYTHEN3D) #if defined(MYTHEN3D)
void setExtSignal(int signalIndex, enum externalSignalFlag mode); void setExtSignal(int signalIndex, enum externalSignalFlag mode);
int getExtSignal(int signalIndex); int getExtSignal(int signalIndex);
#endif #endif
// configure mac // configure mac
#ifdef GOTTHARDD
void calcChecksum(mac_conf *mac, int sourceip, int destip);
#endif
#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(GOTTHARD2D) #if defined(JUNGFRAUD) || defined(MOENCHD) || defined(GOTTHARD2D)
void setNumberofUDPInterfaces(int val); void setNumberofUDPInterfaces(int val);
#endif #endif
@ -525,9 +488,6 @@ void setupHeader(int iRxEntry, enum interfaceType type, uint32_t destip,
defined(XILINX_CHIPTESTBOARDD) defined(XILINX_CHIPTESTBOARDD)
void calcChecksum(udp_header *udp); void calcChecksum(udp_header *udp);
#endif #endif
#ifdef GOTTHARDD
int getAdcConfigured();
#endif
int configureMAC(); int configureMAC();
int setDetectorPosition(int pos[]); int setDetectorPosition(int pos[]);
@ -641,10 +601,6 @@ int getActivate(int *retval);
int getDataStream(enum portPosition port, int *retval); int getDataStream(enum portPosition port, int *retval);
int setDataStream(enum portPosition port, int enable); int setDataStream(enum portPosition port, int enable);
// gotthard specific - adc phase
#elif GOTTHARDD
int setPhase(enum CLKINDEX ind, int val, int degrees);
#elif MYTHEN3D #elif MYTHEN3D
int checkDetectorType(char *mess); int checkDetectorType(char *mess);
int powerChip(int on); int powerChip(int on);
@ -763,16 +719,11 @@ int checkFifoForEndOfAcquisition();
int readFrameFromFifo(); int readFrameFromFifo();
#endif #endif
#if defined(GOTTHARDD) || defined(JUNGFRAUD) || defined(MOENCHD) || \ #if defined(JUNGFRAUD) || defined(MOENCHD) || defined(CHIPTESTBOARDD) || \
defined(CHIPTESTBOARDD) || defined(MYTHEN3D) || defined(GOTTHARD2D) || \ defined(MYTHEN3D) || defined(GOTTHARD2D) || defined(XILINX_CHIPTESTBOARDD)
defined(XILINX_CHIPTESTBOARDD)
u_int32_t runBusy(); u_int32_t runBusy();
#endif #endif
#ifdef GOTTHARDD
u_int32_t runState(enum TLogLevel lev);
#endif
// common // common
int calculateDataBytes(); int calculateDataBytes();
int getTotalNumberOfChannels(); int getTotalNumberOfChannels();

View File

@ -1,212 +0,0 @@
// SPDX-License-Identifier: LGPL-3.0-or-other
// Copyright (C) 2021 Contributors to the SLS Detector Package
#include "AD9252.h"
#include "blackfin.h"
#include "clogger.h"
#include "commonServerFunctions.h" // blackfin.h, ansi.h
/* AD9252 ADC DEFINES */
#define AD9252_ADC_NUMBITS (24)
// default value is 0xF
#define AD9252_DEV_IND_2_REG (0x04)
#define AD9252_CHAN_H_OFST (0)
#define AD9252_CHAN_H_MSK (0x00000001 << AD9252_CHAN_H_OFST)
#define AD9252_CHAN_G_OFST (1)
#define AD9252_CHAN_G_MSK (0x00000001 << AD9252_CHAN_G_OFST)
#define AD9252_CHAN_F_OFST (2)
#define AD9252_CHAN_F_MSK (0x00000001 << AD9252_CHAN_F_OFST)
#define AD9252_CHAN_E_OFST (3)
#define AD9252_CHAN_E_MSK (0x00000001 << AD9252_CHAN_E_OFST)
// default value is 0x0F
#define AD9252_DEV_IND_1_REG (0x05)
#define AD9252_CHAN_D_OFST (0)
#define AD9252_CHAN_D_MSK (0x00000001 << AD9252_CHAN_D_OFST)
#define AD9252_CHAN_C_OFST (1)
#define AD9252_CHAN_C_MSK (0x00000001 << AD9252_CHAN_C_OFST)
#define AD9252_CHAN_B_OFST (2)
#define AD9252_CHAN_B_MSK (0x00000001 << AD9252_CHAN_B_OFST)
#define AD9252_CHAN_A_OFST (3)
#define AD9252_CHAN_A_MSK (0x00000001 << AD9252_CHAN_A_OFST)
#define AD9252_CLK_CH_DCO_OFST (4)
#define AD9252_CLK_CH_DCO_MSK (0x00000001 << AD9252_CLK_CH_DCO_OFST)
#define AD9252_CLK_CH_IFCO_OFST (5)
#define AD9252_CLK_CH_IFCO_MSK (0x00000001 << AD9252_CLK_CH_IFCO_OFST)
// default value is 0x00
#define AD9252_POWER_MODE_REG (0x08)
#define AD9252_POWER_INTERNAL_OFST (0)
#define AD9252_POWER_INTERNAL_MSK (0x00000007 << AD9252_POWER_INTERNAL_OFST)
#define AD9252_INT_CHIP_RUN_VAL \
((0x0 << AD9252_POWER_INTERNAL_OFST) & AD9252_POWER_INTERNAL_MSK)
#define AD9252_INT_FULL_PWR_DWN_VAL \
((0x1 << AD9252_POWER_INTERNAL_OFST) & AD9252_POWER_INTERNAL_MSK)
#define AD9252_INT_STANDBY_VAL \
((0x2 << AD9252_POWER_INTERNAL_OFST) & AD9252_POWER_INTERNAL_MSK)
#define AD9252_INT_RESET_VAL \
((0x3 << AD9252_POWER_INTERNAL_OFST) & AD9252_POWER_INTERNAL_MSK)
// default value is 0x0
#define AD9252_TEST_MODE_REG (0x0D)
#define AD9252_OUT_TEST_OFST (0)
#define AD9252_OUT_TEST_MSK (0x0000000F << AD9252_OUT_TEST_OFST)
#define AD9252_TST_OFF_VAL ((0x0 << AD9252_OUT_TEST_OFST) & AD9252_OUT_TEST_MSK)
#define AD9252_TST_MDSCL_SHRT_VAL \
((0x1 << AD9252_OUT_TEST_OFST) & AD9252_OUT_TEST_MSK)
#define AD9252_TST_PSTV_FS_VAL \
((0x2 << AD9252_OUT_TEST_OFST) & AD9252_OUT_TEST_MSK)
#define AD9252_TST_NGTV_FS_VAL \
((0x3 << AD9252_OUT_TEST_OFST) & AD9252_OUT_TEST_MSK)
#define AD9252_TST_ALTRNTNG_CHKRBRD_VAL \
((0x4 << AD9252_OUT_TEST_OFST) & AD9252_OUT_TEST_MSK)
#define AD9252_TST_PN_23_SQNC_VAL \
((0x5 << AD9252_OUT_TEST_OFST) & AD9252_OUT_TEST_MSK)
#define AD9252_TST_PN_9_SQNC__VAL \
((0x6 << AD9252_OUT_TEST_OFST) & AD9252_OUT_TEST_MSK)
#define AD9252_TST_1_0_WRD_TGGL_VAL \
((0x7 << AD9252_OUT_TEST_OFST) & AD9252_OUT_TEST_MSK)
#define AD9252_TST_USR_INPT_VAL \
((0x8 << AD9252_OUT_TEST_OFST) & AD9252_OUT_TEST_MSK)
#define AD9252_TST_1_0_BT_TGGL_VAL \
((0x9 << AD9252_OUT_TEST_OFST) & AD9252_OUT_TEST_MSK)
#define AD9252_TST_1_x_SYNC_VAL \
((0xa << AD9252_OUT_TEST_OFST) & AD9252_OUT_TEST_MSK)
#define AD9252_TST_1_BIT_HGH_VAL \
((0xb << AD9252_OUT_TEST_OFST) & AD9252_OUT_TEST_MSK)
#define AD9252_TST_MXD_BT_FRQ_VAL \
((0xc << AD9252_OUT_TEST_OFST) & AD9252_OUT_TEST_MSK)
#define AD9252_TST_RST_SHRT_GN_OFST (4)
#define AD9252_TST_RST_SHRT_GN_MSK (0x00000001 << AD9252_TST_RST_SHRT_GN_OFST)
#define AD9252_TST_RST_LNG_GN_OFST (5)
#define AD9252_TST_RST_LNG_GN_MSK (0x00000001 << AD9252_TST_RST_LNG_GN_OFST)
#define AD9252_USER_IN_MODE_OFST (6)
#define AD9252_USER_IN_MODE_MSK (0x00000003 << AD9252_USER_IN_MODE_OFST)
#define AD9252_USR_IN_SNGL_VAL \
((0x0 << AD9252_USER_IN_MODE_OFST) & AD9252_USER_IN_MODE_MSK)
#define AD9252_USR_IN_ALTRNT_VAL \
((0x1 << AD9252_USER_IN_MODE_OFST) & AD9252_USER_IN_MODE_MSK)
#define AD9252_USR_IN_SNGL_ONC_VAL \
((0x2 << AD9252_USER_IN_MODE_OFST) & AD9252_USER_IN_MODE_MSK)
#define AD9252_USR_IN_ALTRNT_ONC_VAL \
((0x3 << AD9252_USER_IN_MODE_OFST) & AD9252_USER_IN_MODE_MSK)
// default value is 0x00
#define AD9252_OUT_MODE_REG (0x14)
#define AD9252_OUT_FORMAT_OFST (0)
#define AD9252_OUT_FORMAT_MSK (0x00000003 << AD9252_OUT_FORMAT_OFST)
#define AD9252_OUT_BINARY_OFST_VAL \
((0x0 << AD9252_OUT_FORMAT_OFST) & AD9252_OUT_FORMAT_MSK)
#define AD9252_OUT_TWOS_COMPL_VAL \
((0x1 << AD9252_OUT_FORMAT_OFST) & AD9252_OUT_FORMAT_MSK)
#define AD9252_OUT_OTPT_INVRT_OFST (2)
#define AD9252_OUT_OTPT_INVRT_MSK (0x00000001 << AD9252_OUT_OTPT_INVRT_OFST)
#define AD9252_OUT_LVDS_OPT_OFST (6)
#define AD9252_OUT_LVDS_OPT_MSK (0x00000001 << AD9252_OUT_LVDS_OPT_OFST)
#define AD9252_OUT_LVDS_ANSI_VAL \
((0x0 << AD9252_OUT_LVDS_OPT_OFST) & AD9252_OUT_LVDS_OPT_MSK)
#define AD9252_OUT_LVDS_IEEE_VAL \
((0x1 << AD9252_OUT_LVDS_OPT_OFST) & AD9252_OUT_LVDS_OPT_MSK)
// default value is 0x3
#define AD9252_OUT_PHASE_REG (0x16)
#define AD9252_OUT_CLK_OFST (0)
#define AD9252_OUT_CLK_MSK (0x0000000F << AD9252_OUT_CLK_OFST)
#define AD9252_OUT_CLK_0_VAL ((0x0 << AD9252_OUT_CLK_OFST) & AD9252_OUT_CLK_MSK)
#define AD9252_OUT_CLK_60_VAL \
((0x1 << AD9252_OUT_CLK_OFST) & AD9252_OUT_CLK_MSK)
#define AD9252_OUT_CLK_120_VAL \
((0x2 << AD9252_OUT_CLK_OFST) & AD9252_OUT_CLK_MSK)
#define AD9252_OUT_CLK_180_VAL \
((0x3 << AD9252_OUT_CLK_OFST) & AD9252_OUT_CLK_MSK)
#define AD9252_OUT_CLK_300_VAL \
((0x5 << AD9252_OUT_CLK_OFST) & AD9252_OUT_CLK_MSK)
#define AD9252_OUT_CLK_360_VAL \
((0x6 << AD9252_OUT_CLK_OFST) & AD9252_OUT_CLK_MSK)
#define AD9252_OUT_CLK_480_VAL \
((0x8 << AD9252_OUT_CLK_OFST) & AD9252_OUT_CLK_MSK)
#define AD9252_OUT_CLK_540_VAL \
((0x9 << AD9252_OUT_CLK_OFST) & AD9252_OUT_CLK_MSK)
#define AD9252_OUT_CLK_600_VAL \
((0xa << AD9252_OUT_CLK_OFST) & AD9252_OUT_CLK_MSK)
#define AD9252_OUT_CLK_660_VAL \
((0xb << AD9252_OUT_CLK_OFST) & AD9252_OUT_CLK_MSK) // 0xb - 0xf is 660
// defines from the fpga
uint32_t AD9252_Reg = 0x0;
uint32_t AD9252_CsMask = 0x0;
uint32_t AD9252_ClkMask = 0x0;
uint32_t AD9252_DigMask = 0x0;
int AD9252_DigOffset = 0x0;
void AD9252_SetDefines(uint32_t reg, uint32_t cmsk, uint32_t clkmsk,
uint32_t dmsk, int dofst) {
AD9252_Reg = reg;
AD9252_CsMask = cmsk;
AD9252_ClkMask = clkmsk;
AD9252_DigMask = dmsk;
AD9252_DigOffset = dofst;
}
void AD9252_Disable() {
bus_w(AD9252_Reg, (bus_r(AD9252_Reg) | AD9252_CsMask | AD9252_ClkMask) &
~(AD9252_DigMask));
}
void AD9252_Set(int addr, int val) {
u_int32_t codata;
codata = val + (addr << 8);
LOG(logINFO,
("\tSetting ADC SPI Register. Wrote 0x%04x at 0x%04x\n", val, addr));
serializeToSPI(AD9252_Reg, codata, AD9252_CsMask, AD9252_ADC_NUMBITS,
AD9252_ClkMask, AD9252_DigMask, AD9252_DigOffset, 0);
}
void AD9252_Configure() {
LOG(logINFOBLUE, ("Configuring ADC9252:\n"));
// power mode reset
LOG(logINFO, ("\tPower mode reset\n"));
AD9252_Set(AD9252_POWER_MODE_REG, AD9252_INT_RESET_VAL);
// power mode chip run
LOG(logINFO, ("\tPower mode chip run\n"));
AD9252_Set(AD9252_POWER_MODE_REG, AD9252_INT_CHIP_RUN_VAL);
// binary offset
LOG(logINFO, ("\tBinary offset\n"));
AD9252_Set(AD9252_OUT_MODE_REG, AD9252_OUT_BINARY_OFST_VAL);
// output clock phase
#ifdef GOTTHARDD
LOG(logINFO, ("\tOutput clock phase is at default: 180\n"));
#else
LOG(logINFO, ("\tOutput clock phase: 60\n"));
AD9257_Set(AD9257_OUT_PHASE_REG, AD9257_OUT_CLK_60_VAL);
#endif
// lvds-iee reduced , binary offset
LOG(logINFO, ("\tLvds-iee reduced, binary offset\n"));
AD9252_Set(AD9252_OUT_MODE_REG, AD9252_OUT_LVDS_IEEE_VAL);
// all devices on chip to receive next command
LOG(logINFO, ("\tAll devices on chip to receive next command\n"));
AD9252_Set(AD9252_DEV_IND_2_REG, AD9252_CHAN_H_MSK | AD9252_CHAN_G_MSK |
AD9252_CHAN_F_MSK | AD9252_CHAN_E_MSK);
AD9252_Set(AD9252_DEV_IND_1_REG, AD9252_CHAN_D_MSK | AD9252_CHAN_C_MSK |
AD9252_CHAN_B_MSK | AD9252_CHAN_A_MSK |
AD9252_CLK_CH_DCO_MSK |
AD9252_CLK_CH_IFCO_MSK);
// no test mode
LOG(logINFO, ("\tNo test mode\n"));
AD9252_Set(AD9252_TEST_MODE_REG, AD9252_TST_OFF_VAL);
#ifdef TESTADC
LOG(logINFOBLUE, ("Putting ADC in Test Mode!\n");
// mixed bit frequency test mode
LOG(logINFO, ("\tMixed bit frequency test mode\n"));
AD9252_Set(AD9252_TEST_MODE_REG, AD9252_TST_MXD_BT_FRQ_VAL);
#endif
}

View File

@ -318,7 +318,7 @@ void AD9257_Configure() {
AD9257_CLK_CH_IFCO_MSK); AD9257_CLK_CH_IFCO_MSK);
// vref // vref
#if defined(GOTTHARDD) || defined(MOENCHD) #if defined(MOENCHD)
LOG(logINFO, ("\tVref default at 2.0\n")); LOG(logINFO, ("\tVref default at 2.0\n"));
AD9257_SetVrefVoltage(AD9257_VREF_DEFAULT_VAL, 0); AD9257_SetVrefVoltage(AD9257_VREF_DEFAULT_VAL, 0);
#else #else

View File

@ -504,8 +504,7 @@ int setupDetectorServer(char *mess, char *sname) {
// blackfin boards (respawn) (only kept for backwards compatibility) // blackfin boards (respawn) (only kept for backwards compatibility)
#ifndef VIRTUAL #ifndef VIRTUAL
#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(CHIPTESTBOARDD) || \ #if defined(JUNGFRAUD) || defined(MOENCHD) || defined(CHIPTESTBOARDD)
defined(GOTTHARDD)
// delete every line with DetectorServer in /etc/inittab // delete every line with DetectorServer in /etc/inittab
strcpy(cmd, "sed -i '/DetectorServer/d' /etc/inittab"); strcpy(cmd, "sed -i '/DetectorServer/d' /etc/inittab");
if (executeCommand(cmd, retvals, logDEBUG1) == FAIL) { if (executeCommand(cmd, retvals, logDEBUG1) == FAIL) {

View File

@ -30,11 +30,7 @@ extern int checkModuleFlag;
extern int ignoreConfigFileFlag; extern int ignoreConfigFileFlag;
// Global variables from slsDetectorFunctionList // Global variables from slsDetectorFunctionList
#ifdef GOTTHARDD #if defined(GOTTHARD2D) || defined(EIGERD) || defined(MYTHEN3D)
extern int phaseShift;
#endif
#if defined(GOTTHARDD) || defined(GOTTHARD2D) || defined(EIGERD) || \
defined(MYTHEN3D)
extern int masterCommandLine; extern int masterCommandLine;
#endif #endif
#ifdef EIGERD #ifdef EIGERD
@ -59,8 +55,7 @@ int main(int argc, char *argv[]) {
char version[MAX_STR_LENGTH] = {0}; char version[MAX_STR_LENGTH] = {0};
memset(version, 0, MAX_STR_LENGTH); memset(version, 0, MAX_STR_LENGTH);
ignoreConfigFileFlag = 0; ignoreConfigFileFlag = 0;
#if defined(GOTTHARDD) || defined(GOTTHARD2D) || defined(EIGERD) || \ #if defined(GOTTHARD2D) || defined(EIGERD) || defined(MYTHEN3D)
defined(MYTHEN3D)
masterCommandLine = -1; masterCommandLine = -1;
#endif #endif
#ifdef EIGERD #ifdef EIGERD
@ -82,17 +77,16 @@ int main(int argc, char *argv[]) {
"\t-g, --nomodule : [Mythen3][Gotthard2][Xilinx Ctb] \n" "\t-g, --nomodule : [Mythen3][Gotthard2][Xilinx Ctb] \n"
"\t Generic or No Module mode. Skips " "\t Generic or No Module mode. Skips "
"detector type checks. \n" "detector type checks. \n"
"\t-f, --phaseshift <value> : [Gotthard] only. Sets phase shift. \n"
"\t-d, --devel : Developer mode. Skips firmware " "\t-d, --devel : Developer mode. Skips firmware "
"checks. \n" "checks. \n"
"\t-u, --update : Update mode. Skips firmware checks " "\t-u, --update : Update mode. Skips firmware checks "
"and " "and "
"initial detector setup. \n" "initial detector setup. \n"
"\t-i, --ignore-config : " "\t-i, --ignore-config : "
"[Eiger][Jungfrau][Gotthard][Gotthard2] \n" "[Eiger][Jungfrau][Gotthard2] \n"
"\t Ignore config file. \n" "\t Ignore config file. \n"
"\t-m, --master <master> : " "\t-m, --master <master> : "
"[Eiger][Mythen3][Gotthard][Gotthard2] \n" "[Eiger][Mythen3][Gotthard2] \n"
"\t Set Master to 0 or 1. Precedence " "\t Set Master to 0 or 1. Precedence "
"over " "over "
"config file. Only for virtual servers except Eiger. \n" "config file. Only for virtual servers except Eiger. \n"
@ -117,7 +111,6 @@ int main(int argc, char *argv[]) {
{"help", no_argument, NULL, 'h'}, {"help", no_argument, NULL, 'h'},
{"version", no_argument, NULL, 'v'}, {"version", no_argument, NULL, 'v'},
{"port", required_argument, NULL, 'p'}, {"port", required_argument, NULL, 'p'},
{"phaseshift", required_argument, NULL, 'f'},
{"nomodule", no_argument, NULL, 'g'}, // generic {"nomodule", no_argument, NULL, 'g'}, // generic
{"devel", no_argument, NULL, 'd'}, {"devel", no_argument, NULL, 'd'},
{"update", no_argument, NULL, 'u'}, {"update", no_argument, NULL, 'u'},
@ -133,7 +126,7 @@ int main(int argc, char *argv[]) {
int c = 0; int c = 0;
while (c != -1) { while (c != -1) {
c = getopt_long(argc, argv, "hvp:f:gduim:t:s", long_options, c = getopt_long(argc, argv, "hvp:gduim:t:s", long_options,
&option_index); &option_index);
// Detect the end of the options // Detect the end of the options
@ -143,9 +136,7 @@ int main(int argc, char *argv[]) {
switch (c) { switch (c) {
case 'v': case 'v':
#ifdef GOTTHARDD #ifdef EIGERD
strcpy(version, APIGOTTHARD);
#elif EIGERD
strcpy(version, APIEIGER); strcpy(version, APIEIGER);
#elif JUNGFRAUD #elif JUNGFRAUD
strcpy(version, APIJUNGFRAU); strcpy(version, APIJUNGFRAU);
@ -169,21 +160,6 @@ int main(int argc, char *argv[]) {
LOG(logINFO, ("Detected port: %d\n", portno)); LOG(logINFO, ("Detected port: %d\n", portno));
break; break;
case 'f':
#ifndef GOTTHARDD
LOG(logERROR,
("Phase shift argument not implemented for this detector\n"));
exit(EXIT_FAILURE);
#else
if (sscanf(optarg, "%d", &phaseShift) != 1) {
LOG(logERROR,
("Cannot scan phase shift argument\n%s", helpMessage));
exit(EXIT_FAILURE);
}
LOG(logINFO, ("Detected phase shift: %d\n", phaseShift));
#endif
break;
case 'g': case 'g':
LOG(logINFO, ("Detected generic mode (no module)\n")); LOG(logINFO, ("Detected generic mode (no module)\n"));
checkModuleFlag = 0; checkModuleFlag = 0;
@ -205,8 +181,7 @@ int main(int argc, char *argv[]) {
break; break;
case 'i': case 'i':
#if defined(EIGERD) || defined(GOTTHARDD) || defined(GOTTHARD2D) || \ #if defined(EIGERD) || defined(GOTTHARD2D) || defined(JUNGFRAUD)
defined(JUNGFRAUD)
LOG(logINFO, ("Ignoring config file\n")); LOG(logINFO, ("Ignoring config file\n"));
ignoreConfigFileFlag = 1; ignoreConfigFileFlag = 1;
#else #else
@ -220,8 +195,7 @@ int main(int argc, char *argv[]) {
LOG(logERROR, ("Cannot set master via the detector server for this " LOG(logERROR, ("Cannot set master via the detector server for this "
"detector\n")); "detector\n"));
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
#elif defined(GOTTHARDD) || defined(GOTTHARD2D) || defined(EIGERD) || \ #elif defined(GOTTHARD2D) || defined(EIGERD) || defined(MYTHEN3D)
defined(MYTHEN3D)
if (sscanf(optarg, "%d", &masterCommandLine) != 1) { if (sscanf(optarg, "%d", &masterCommandLine) != 1) {
LOG(logERROR, ("Cannot scan master argument\n%s", helpMessage)); LOG(logERROR, ("Cannot scan master argument\n%s", helpMessage));
exit(EXIT_FAILURE); exit(EXIT_FAILURE);

View File

@ -20,9 +20,7 @@
#include <unistd.h> #include <unistd.h>
// defined in the detector specific Makefile // defined in the detector specific Makefile
#ifdef GOTTHARDD #ifdef EIGERD
const enum detectorType myDetectorType = GOTTHARD;
#elif EIGERD
const enum detectorType myDetectorType = EIGER; const enum detectorType myDetectorType = EIGER;
#elif JUNGFRAUD #elif JUNGFRAUD
const enum detectorType myDetectorType = JUNGFRAU; const enum detectorType myDetectorType = JUNGFRAU;
@ -281,7 +279,6 @@ void function_table() {
flist[F_SET_STORAGE_CELL_DELAY] = &set_storage_cell_delay; flist[F_SET_STORAGE_CELL_DELAY] = &set_storage_cell_delay;
flist[F_GET_FRAMES_LEFT] = &get_frames_left; flist[F_GET_FRAMES_LEFT] = &get_frames_left;
flist[F_GET_TRIGGERS_LEFT] = &get_triggers_left; flist[F_GET_TRIGGERS_LEFT] = &get_triggers_left;
flist[F_GET_EXPTIME_LEFT] = &get_exptime_left;
flist[F_GET_PERIOD_LEFT] = &get_period_left; flist[F_GET_PERIOD_LEFT] = &get_period_left;
flist[F_GET_DELAY_AFTER_TRIGGER_LEFT] = &get_delay_after_trigger_left; flist[F_GET_DELAY_AFTER_TRIGGER_LEFT] = &get_delay_after_trigger_left;
flist[F_GET_MEASURED_PERIOD] = &get_measured_period; flist[F_GET_MEASURED_PERIOD] = &get_measured_period;
@ -290,8 +287,6 @@ void function_table() {
flist[F_GET_ACTUAL_TIME] = &get_actual_time; flist[F_GET_ACTUAL_TIME] = &get_actual_time;
flist[F_GET_MEASUREMENT_TIME] = &get_measurement_time; flist[F_GET_MEASUREMENT_TIME] = &get_measurement_time;
flist[F_SET_DYNAMIC_RANGE] = &set_dynamic_range; flist[F_SET_DYNAMIC_RANGE] = &set_dynamic_range;
flist[F_SET_ROI] = &set_roi;
flist[F_GET_ROI] = &get_roi;
flist[F_LOCK_SERVER] = &lock_server; flist[F_LOCK_SERVER] = &lock_server;
flist[F_GET_LAST_CLIENT_IP] = &get_last_client_ip; flist[F_GET_LAST_CLIENT_IP] = &get_last_client_ip;
flist[F_ENABLE_TEN_GIGA] = &enable_ten_giga; flist[F_ENABLE_TEN_GIGA] = &enable_ten_giga;
@ -643,7 +638,7 @@ int get_external_signal_flag(int file_des) {
LOG(logDEBUG1, ("Getting external signal flag (%d)\n", arg)); LOG(logDEBUG1, ("Getting external signal flag (%d)\n", arg));
#if !defined(GOTTHARDD) && !defined(MYTHEN3D) #if !defined(MYTHEN3D)
functionNotImplemented(); functionNotImplemented();
#else #else
// get // get
@ -674,7 +669,7 @@ int set_external_signal_flag(int file_des) {
LOG(logDEBUG1, LOG(logDEBUG1,
("Setting external signal flag [%d] to %d\n", signalIndex, flag)); ("Setting external signal flag [%d] to %d\n", signalIndex, flag));
#if !defined(GOTTHARDD) && !defined(MYTHEN3D) #if !defined(MYTHEN3D)
functionNotImplemented(); functionNotImplemented();
#else #else
if (Server_VerifyLock() == OK) { if (Server_VerifyLock() == OK) {
@ -832,8 +827,8 @@ int set_firmware_test(int file_des) {
memset(mess, 0, sizeof(mess)); memset(mess, 0, sizeof(mess));
LOG(logDEBUG1, ("Executing firmware test\n")); LOG(logDEBUG1, ("Executing firmware test\n"));
#if !defined(GOTTHARDD) && !defined(JUNGFRAUD) && !defined(MOENCHD) && \ #if !defined(JUNGFRAUD) && !defined(MOENCHD) && !defined(CHIPTESTBOARDD) && \
!defined(CHIPTESTBOARDD) && !defined(GOTTHARD2D) && !defined(MYTHEN3D) && \ !defined(GOTTHARD2D) && !defined(MYTHEN3D) && \
!defined(XILINX_CHIPTESTBOARDD) !defined(XILINX_CHIPTESTBOARDD)
functionNotImplemented(); functionNotImplemented();
#else #else
@ -851,8 +846,8 @@ int set_bus_test(int file_des) {
memset(mess, 0, sizeof(mess)); memset(mess, 0, sizeof(mess));
LOG(logDEBUG1, ("Executing bus test\n")); LOG(logDEBUG1, ("Executing bus test\n"));
#if !defined(GOTTHARDD) && !defined(JUNGFRAUD) && !defined(MOENCHD) && \ #if !defined(JUNGFRAUD) && !defined(MOENCHD) && !defined(CHIPTESTBOARDD) && \
!defined(CHIPTESTBOARDD) && !defined(GOTTHARD2D) && !defined(MYTHEN3D) !defined(GOTTHARD2D) && !defined(MYTHEN3D)
functionNotImplemented(); functionNotImplemented();
#else #else
ret = testBus(); ret = testBus();
@ -873,8 +868,7 @@ int set_image_test_mode(int file_des) {
return printSocketReadError(); return printSocketReadError();
LOG(logDEBUG1, ("Setting image test mode to \n", arg)); LOG(logDEBUG1, ("Setting image test mode to \n", arg));
#if defined(GOTTHARDD) || \ #if ((defined(EIGERD) || defined(JUNGFRAUD) || defined(MOENCHD)) && \
((defined(EIGERD) || defined(JUNGFRAUD) || defined(MOENCHD)) && \
defined(VIRTUAL)) defined(VIRTUAL))
setTestImageMode(arg); setTestImageMode(arg);
#else #else
@ -889,8 +883,7 @@ int get_image_test_mode(int file_des) {
int retval = -1; int retval = -1;
LOG(logDEBUG1, ("Getting image test mode\n")); LOG(logDEBUG1, ("Getting image test mode\n"));
#if defined(GOTTHARDD) || \ #if ((defined(EIGERD) || defined(JUNGFRAUD) || defined(MOENCHD)) && \
((defined(EIGERD) || defined(JUNGFRAUD) || defined(MOENCHD)) && \
defined(VIRTUAL)) defined(VIRTUAL))
retval = getTestImageMode(); retval = getTestImageMode();
LOG(logDEBUG1, ("image test mode retval: %d\n", retval)); LOG(logDEBUG1, ("image test mode retval: %d\n", retval));
@ -904,32 +897,7 @@ enum DACINDEX getDACIndex(enum dacIndex ind) {
enum DACINDEX serverDacIndex = -1; enum DACINDEX serverDacIndex = -1;
// check if dac exists for this detector // check if dac exists for this detector
switch (ind) { switch (ind) {
#ifdef GOTTHARDD #ifdef EIGERD
case VREF_DS:
serverDacIndex = G_VREF_DS;
break;
case VCASCN_PB:
serverDacIndex = G_VCASCN_PB;
break;
case VCASCP_PB:
serverDacIndex = G_VCASCP_PB;
break;
case VOUT_CM:
serverDacIndex = G_VOUT_CM;
break;
case VCASC_OUT:
serverDacIndex = G_VCASC_OUT;
break;
case VIN_CM:
serverDacIndex = G_VIN_CM;
break;
case VREF_COMP:
serverDacIndex = G_VREF_COMP;
break;
case IB_TESTC:
serverDacIndex = G_IB_TESTC;
break;
#elif EIGERD
case VTHRESHOLD: case VTHRESHOLD:
serverDacIndex = E_VTHRESHOLD; serverDacIndex = E_VTHRESHOLD;
break; break;
@ -1274,15 +1242,7 @@ int validateAndSetDac(enum dacIndex ind, int val, int mV) {
#endif #endif
#endif #endif
#ifdef GOTTHARDD #ifdef EIGERD
if (retval == -1) {
ret = FAIL;
strcpy(mess, "Invalid Voltage. Valid values are 0, 90, "
"110, 120, 150, 180, 200\n");
LOG(logERROR, (mess));
} else
validate(&ret, mess, val, retval, "set high voltage", DEC);
#elif EIGERD
if ((retval != SLAVE_HIGH_VOLTAGE_READ_VAL) && (retval < 0)) { if ((retval != SLAVE_HIGH_VOLTAGE_READ_VAL) && (retval < 0)) {
ret = FAIL; ret = FAIL;
if (retval == -1) if (retval == -1)
@ -1525,7 +1485,7 @@ int get_adc(int file_des) {
serverAdcIndex = TEMP_FPGA; serverAdcIndex = TEMP_FPGA;
break; break;
#endif #endif
#if defined(GOTTHARDD) || defined(JUNGFRAUD) || defined(MOENCHD) #if defined(JUNGFRAUD) || defined(MOENCHD)
case TEMPERATURE_FPGA: case TEMPERATURE_FPGA:
serverAdcIndex = TEMP_FPGA; serverAdcIndex = TEMP_FPGA;
break; break;
@ -1694,14 +1654,9 @@ int write_register(int file_des) {
sprintf(mess, "Could not write to register 0x%x.\n", addr); sprintf(mess, "Could not write to register 0x%x.\n", addr);
LOG(logERROR, (mess)); LOG(logERROR, (mess));
} }
#else
#ifdef GOTTHARDD
writeRegister16And32(addr, val);
uint32_t retval = readRegister16And32(addr);
#else #else
writeRegister(addr, val); writeRegister(addr, val);
uint32_t retval = readRegister(addr); uint32_t retval = readRegister(addr);
#endif
LOG(logDEBUG1, ("Write register retval (0x%x): 0x%x\n", addr, retval)); LOG(logDEBUG1, ("Write register retval (0x%x): 0x%x\n", addr, retval));
// validate // validate
if (validate && ret == OK && retval != val) { if (validate && ret == OK && retval != val) {
@ -1738,8 +1693,6 @@ int read_register(int file_des) {
addr); addr);
LOG(logERROR, (mess)); LOG(logERROR, (mess));
} }
#elif GOTTHARDD
retval = readRegister16And32(addr);
#else #else
retval = readRegister(addr); retval = readRegister(addr);
#endif #endif
@ -1873,12 +1826,6 @@ void validate_settings(enum detectorSettings sett) {
#elif JUNGFRAUD #elif JUNGFRAUD
case GAIN0: case GAIN0:
case HIGHGAIN0: case HIGHGAIN0:
#elif GOTTHARDD
case DYNAMICGAIN:
case HIGHGAIN:
case LOWGAIN:
case MEDIUMGAIN:
case VERYHIGHGAIN:
#elif GOTTHARD2D #elif GOTTHARD2D
case DYNAMICGAIN: case DYNAMICGAIN:
case FIXGAIN1: case FIXGAIN1:
@ -1939,16 +1886,6 @@ int set_settings(int file_des) {
if ((int)isett != GET_FLAG) { if ((int)isett != GET_FLAG) {
validate(&ret, mess, (int)isett, (int)retval, "set settings", DEC); validate(&ret, mess, (int)isett, (int)retval, "set settings", DEC);
#ifdef GOTTHARDD
if (ret == OK) {
ret = resetToDefaultDacs(0);
if (ret == FAIL) {
strcpy(mess, "Could change settings, but could not set to "
"default dacs\n");
LOG(logERROR, (mess));
}
}
#endif
#ifdef MYTHEN3D #ifdef MYTHEN3D
// changed for setsettings (direct), // changed for setsettings (direct),
// custom trimbit file (setmodule with myMod.reg as -1), // custom trimbit file (setmodule with myMod.reg as -1),
@ -2707,8 +2644,8 @@ int get_delay_after_trigger(int file_des) {
memset(mess, 0, sizeof(mess)); memset(mess, 0, sizeof(mess));
int64_t retval = -1; int64_t retval = -1;
#if !defined(JUNGFRAUD) && !defined(MOENCHD) && !defined(GOTTHARDD) && \ #if !defined(JUNGFRAUD) && !defined(MOENCHD) && !defined(CHIPTESTBOARDD) && \
!defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) && !defined(GOTTHARD2D) && \ !defined(MYTHEN3D) && !defined(GOTTHARD2D) && \
!defined(XILINX_CHIPTESTBOARDD) !defined(XILINX_CHIPTESTBOARDD)
functionNotImplemented(); functionNotImplemented();
#else #else
@ -2730,8 +2667,8 @@ int set_delay_after_trigger(int file_des) {
LOG(logDEBUG1, LOG(logDEBUG1,
("Setting delay after trigger %lld ns\n", (long long int)arg)); ("Setting delay after trigger %lld ns\n", (long long int)arg));
#if !defined(JUNGFRAUD) && !defined(MOENCHD) && !defined(GOTTHARDD) && \ #if !defined(JUNGFRAUD) && !defined(MOENCHD) && !defined(CHIPTESTBOARDD) && \
!defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) && !defined(GOTTHARD2D) && \ !defined(MYTHEN3D) && !defined(GOTTHARD2D) && \
!defined(XILINX_CHIPTESTBOARDD) !defined(XILINX_CHIPTESTBOARDD)
functionNotImplemented(); functionNotImplemented();
#else #else
@ -2941,8 +2878,8 @@ int get_frames_left(int file_des) {
memset(mess, 0, sizeof(mess)); memset(mess, 0, sizeof(mess));
int64_t retval = -1; int64_t retval = -1;
#if !defined(JUNGFRAUD) && !defined(MOENCHD) && !defined(GOTTHARDD) && \ #if !defined(JUNGFRAUD) && !defined(MOENCHD) && !defined(CHIPTESTBOARDD) && \
!defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) && !defined(GOTTHARD2D) && \ !defined(MYTHEN3D) && !defined(GOTTHARD2D) && \
!defined(XILINX_CHIPTESTBOARDD) !defined(XILINX_CHIPTESTBOARDD)
functionNotImplemented(); functionNotImplemented();
#else #else
@ -2959,8 +2896,8 @@ int get_triggers_left(int file_des) {
memset(mess, 0, sizeof(mess)); memset(mess, 0, sizeof(mess));
int64_t retval = -1; int64_t retval = -1;
#if !defined(JUNGFRAUD) && !defined(MOENCHD) && !defined(GOTTHARDD) && \ #if !defined(JUNGFRAUD) && !defined(MOENCHD) && !defined(CHIPTESTBOARDD) && \
!defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) && !defined(GOTTHARD2D) && \ !defined(MYTHEN3D) && !defined(GOTTHARD2D) && \
!defined(XILINX_CHIPTESTBOARDD) !defined(XILINX_CHIPTESTBOARDD)
functionNotImplemented(); functionNotImplemented();
#else #else
@ -2971,28 +2908,13 @@ int get_triggers_left(int file_des) {
return Server_SendResult(file_des, INT64, &retval, sizeof(retval)); return Server_SendResult(file_des, INT64, &retval, sizeof(retval));
} }
int get_exptime_left(int file_des) {
ret = OK;
memset(mess, 0, sizeof(mess));
int64_t retval = -1;
#ifndef GOTTHARDD
functionNotImplemented();
#else
// get only
retval = getExpTimeLeft();
LOG(logDEBUG1, ("retval exptime left %lld ns\n", (long long int)retval));
#endif
return Server_SendResult(file_des, INT64, &retval, sizeof(retval));
}
int get_period_left(int file_des) { int get_period_left(int file_des) {
ret = OK; ret = OK;
memset(mess, 0, sizeof(mess)); memset(mess, 0, sizeof(mess));
int64_t retval = -1; int64_t retval = -1;
#if !defined(JUNGFRAUD) && !defined(MOENCHD) && !defined(GOTTHARDD) && \ #if !defined(JUNGFRAUD) && !defined(MOENCHD) && !defined(CHIPTESTBOARDD) && \
!defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) && !defined(GOTTHARD2D) && \ !defined(MYTHEN3D) && !defined(GOTTHARD2D) && \
!defined(XILINX_CHIPTESTBOARDD) !defined(XILINX_CHIPTESTBOARDD)
functionNotImplemented(); functionNotImplemented();
#else #else
@ -3008,8 +2930,8 @@ int get_delay_after_trigger_left(int file_des) {
memset(mess, 0, sizeof(mess)); memset(mess, 0, sizeof(mess));
int64_t retval = -1; int64_t retval = -1;
#if !defined(JUNGFRAUD) && !defined(MOENCHD) && !defined(GOTTHARDD) && \ #if !defined(JUNGFRAUD) && !defined(MOENCHD) && !defined(CHIPTESTBOARDD) && \
!defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) && !defined(GOTTHARD2D) && \ !defined(MYTHEN3D) && !defined(GOTTHARD2D) && \
!defined(XILINX_CHIPTESTBOARDD) !defined(XILINX_CHIPTESTBOARDD)
functionNotImplemented(); functionNotImplemented();
#else #else
@ -3133,9 +3055,8 @@ int set_dynamic_range(int file_des) {
case 16: case 16:
case 32: case 32:
#endif #endif
#if defined(GOTTHARDD) || defined(JUNGFRAUD) || defined(MOENCHD) || \ #if defined(JUNGFRAUD) || defined(MOENCHD) || defined(CHIPTESTBOARDD) || \
defined(CHIPTESTBOARDD) || defined(GOTTHARD2D) || \ defined(GOTTHARD2D) || defined(XILINX_CHIPTESTBOARDD)
defined(XILINX_CHIPTESTBOARDD)
case 16: case 16:
#endif #endif
if (dr >= 0) { if (dr >= 0) {
@ -3166,67 +3087,6 @@ int set_dynamic_range(int file_des) {
return Server_SendResult(file_des, INT32, &retval, sizeof(retval)); return Server_SendResult(file_des, INT32, &retval, sizeof(retval));
} }
int set_roi(int file_des) {
ret = OK;
memset(mess, 0, sizeof(mess));
ROI arg;
// receive ROI
if (receiveData(file_des, &arg.xmin, sizeof(int), INT32) < 0)
return printSocketReadError();
if (receiveData(file_des, &arg.xmax, sizeof(int), INT32) < 0)
return printSocketReadError();
if (receiveData(file_des, &arg.ymin, sizeof(int), INT32) < 0)
return printSocketReadError();
if (receiveData(file_des, &arg.ymax, sizeof(int), INT32) < 0)
return printSocketReadError();
LOG(logDEBUG1, ("Set ROI: [%d, %d, %d, %d]\n", arg.xmin, arg.xmax, arg.ymin,
arg.ymax));
#ifndef GOTTHARDD
functionNotImplemented();
#else
// only set
if (Server_VerifyLock() == OK) {
ret = setROI(arg);
if (ret == FAIL) {
sprintf(mess, "Could not set ROI. Invalid xmin or xmax\n");
LOG(logERROR, (mess));
}
// old firmware requires a redo configure mac
else {
configure_mac();
}
}
#endif
return Server_SendResult(file_des, INT32, NULL, 0);
}
int get_roi(int file_des) {
ret = OK;
memset(mess, 0, sizeof(mess));
ROI retval;
#ifndef GOTTHARDD
functionNotImplemented();
#else
// only get
retval = getROI();
LOG(logDEBUG1, ("nRois: (%d, %d, %d, %d)\n", retval.xmin, retval.xmax,
retval.ymin, retval.ymax));
#endif
Server_SendResult(file_des, INT32, NULL, 0);
if (ret != FAIL) {
sendData(file_des, &retval.xmin, sizeof(int), INT32);
sendData(file_des, &retval.xmax, sizeof(int), INT32);
sendData(file_des, &retval.ymin, sizeof(int), INT32);
sendData(file_des, &retval.ymax, sizeof(int), INT32);
}
return ret;
}
int lock_server(int file_des) { int lock_server(int file_des) {
ret = OK; ret = OK;
memset(mess, 0, sizeof(mess)); memset(mess, 0, sizeof(mess));
@ -3276,8 +3136,8 @@ int enable_ten_giga(int file_des) {
return printSocketReadError(); return printSocketReadError();
LOG(logDEBUG, ("Setting 10GbE: %d\n", arg)); LOG(logDEBUG, ("Setting 10GbE: %d\n", arg));
#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(GOTTHARDD) || \ #if defined(JUNGFRAUD) || defined(MOENCHD) || defined(GOTTHARD2D) || \
defined(GOTTHARD2D) || defined(XILINX_CHIPTESTBOARDD) defined(XILINX_CHIPTESTBOARDD)
functionNotImplemented(); functionNotImplemented();
#else #else
// set & get // set & get
@ -3696,12 +3556,6 @@ int write_adc_register(int file_des) {
if (Server_VerifyLock() == OK) { if (Server_VerifyLock() == OK) {
#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(CHIPTESTBOARDD) #if defined(JUNGFRAUD) || defined(MOENCHD) || defined(CHIPTESTBOARDD)
AD9257_Set(addr, val); AD9257_Set(addr, val);
#elif GOTTHARDD
if (isHardwareVersion_1_0()) {
AD9252_Set(addr, val);
} else {
AD9257_Set(addr, val);
}
#endif #endif
} }
#endif #endif
@ -4068,7 +3922,7 @@ int program_fpga(int file_des) {
ret = OK; ret = OK;
memset(mess, 0, sizeof(mess)); memset(mess, 0, sizeof(mess));
#if defined(EIGERD) || defined(GOTTHARDD) #if defined(EIGERD)
functionNotImplemented(); functionNotImplemented();
return Server_SendResult(file_des, INT32, NULL, 0); return Server_SendResult(file_des, INT32, NULL, 0);
#else #else
@ -4082,8 +3936,7 @@ int reset_fpga(int file_des) {
memset(mess, 0, sizeof(mess)); memset(mess, 0, sizeof(mess));
LOG(logDEBUG1, ("Reset FPGA\n")); LOG(logDEBUG1, ("Reset FPGA\n"));
#if defined(EIGERD) || defined(GOTTHARDD) || defined(GOTTHARD2D) || \ #if defined(EIGERD) || defined(GOTTHARD2D) || defined(MYTHEN3D)
defined(MYTHEN3D)
functionNotImplemented(); functionNotImplemented();
#else #else
// only set // only set
@ -6060,7 +5913,7 @@ int set_clock_phase(int file_des) {
(args[2] == 0 ? "" : "degrees"))); (args[2] == 0 ? "" : "degrees")));
#if !defined(CHIPTESTBOARDD) && !defined(JUNGFRAUD) && !defined(MOENCHD) && \ #if !defined(CHIPTESTBOARDD) && !defined(JUNGFRAUD) && !defined(MOENCHD) && \
!defined(GOTTHARDD) && !defined(GOTTHARD2D) && !defined(MYTHEN3D) !defined(GOTTHARD2D) && !defined(MYTHEN3D)
functionNotImplemented(); functionNotImplemented();
#else #else
// only set // only set
@ -6070,8 +5923,7 @@ int set_clock_phase(int file_des) {
int inDegrees = args[2] == 0 ? 0 : 1; int inDegrees = args[2] == 0 ? 0 : 1;
enum CLKINDEX c = 0; enum CLKINDEX c = 0;
switch (ind) { switch (ind) {
#if defined(CHIPTESTBOARDD) || defined(JUNGFRAUD) || defined(MOENCHD) || \ #if defined(CHIPTESTBOARDD) || defined(JUNGFRAUD) || defined(MOENCHD)
defined(GOTTHARDD)
case ADC_CLOCK: case ADC_CLOCK:
c = ADC_CLK; c = ADC_CLK;
break; break;
@ -6101,15 +5953,6 @@ int set_clock_phase(int file_des) {
sprintf(modeName, "%s clock (%d) phase %s", clock_names[c], (int)c, sprintf(modeName, "%s clock (%d) phase %s", clock_names[c], (int)c,
(inDegrees == 0 ? "" : "(degrees)")); (inDegrees == 0 ? "" : "(degrees)"));
// gotthard1d doesnt take degrees and cannot get phase
#ifdef GOTTHARDD
if (inDegrees != 0) {
ret = FAIL;
strcpy(mess,
"Cannot set phase in degrees for this detector.\n");
LOG(logERROR, (mess));
}
#else
if (getPhase(c, inDegrees) == val) { if (getPhase(c, inDegrees) == val) {
LOG(logINFO, ("Same %s: %d\n", modeName, val)); LOG(logINFO, ("Same %s: %d\n", modeName, val));
} else if (inDegrees && (val < 0 || val > 359)) { } else if (inDegrees && (val < 0 || val > 359)) {
@ -6126,18 +5969,12 @@ int set_clock_phase(int file_des) {
"phase shifts)\n", "phase shifts)\n",
modeName, val, getMaxPhase(c) - 1); modeName, val, getMaxPhase(c) - 1);
LOG(logERROR, (mess)); LOG(logERROR, (mess));
} } else {
#endif
else {
int ret = setPhase(c, val, inDegrees); int ret = setPhase(c, val, inDegrees);
if (ret == FAIL) { if (ret == FAIL) {
sprintf(mess, "Could not set %s to %d.\n", modeName, val); sprintf(mess, "Could not set %s to %d.\n", modeName, val);
LOG(logERROR, (mess)); LOG(logERROR, (mess));
} } else {
// gotthard1d doesnt take degrees and cannot get phase
#ifndef GOTTHARDD
else {
int retval = getPhase(c, inDegrees); int retval = getPhase(c, inDegrees);
LOG(logDEBUG1, ("retval %s : %d\n", modeName, retval)); LOG(logDEBUG1, ("retval %s : %d\n", modeName, retval));
if (!inDegrees) { if (!inDegrees) {
@ -6153,7 +5990,6 @@ int set_clock_phase(int file_des) {
} }
} }
} }
#endif
} }
} }
} }
@ -7471,31 +7307,6 @@ int get_receiver_parameters(int file_des) {
if (n < 0) if (n < 0)
return printSocketReadError(); return printSocketReadError();
// roi
{
ROI roi;
#ifdef GOTTHARDD
roi = getROI();
#else
roi.xmin = -1;
roi.xmax = -1;
roi.ymin = -1;
roi.ymax = -1;
#endif
n += sendData(file_des, &roi.xmin, sizeof(int), INT32);
if (n < 0)
return printSocketReadError();
n += sendData(file_des, &roi.xmax, sizeof(int), INT32);
if (n < 0)
return printSocketReadError();
n += sendData(file_des, &roi.ymin, sizeof(int), INT32);
if (n < 0)
return printSocketReadError();
n += sendData(file_des, &roi.ymax, sizeof(int), INT32);
if (n < 0)
return printSocketReadError();
}
// counter mask // counter mask
#ifdef MYTHEN3D #ifdef MYTHEN3D
u32 = getCounterMask(); u32 = getCounterMask();
@ -8601,8 +8412,8 @@ int get_master(int file_des) {
LOG(logDEBUG1, ("Getting master\n")); LOG(logDEBUG1, ("Getting master\n"));
#if !defined(MYTHEN3D) && !defined(EIGERD) && !defined(GOTTHARDD) && \ #if !defined(MYTHEN3D) && !defined(EIGERD) && !defined(GOTTHARD2D) && \
!defined(GOTTHARD2D) && !defined(JUNGFRAUD) && !defined(MOENCHD) !defined(JUNGFRAUD) && !defined(MOENCHD)
functionNotImplemented(); functionNotImplemented();
#else #else
ret = isMaster(&retval); ret = isMaster(&retval);
@ -9897,8 +9708,7 @@ void receive_program_via_blackfin(int file_des, enum PROGRAM_INDEX index,
char *checksum, char *serverName, char *checksum, char *serverName,
int forceDeleteNormalFile) { int forceDeleteNormalFile) {
#if !defined(JUNGFRAUD) && !defined(MOENCHD) && !defined(CHIPTESTBOARDD) && \ #if !defined(JUNGFRAUD) && !defined(MOENCHD) && !defined(CHIPTESTBOARDD)
!defined(GOTTHARDD)
ret = FAIL; ret = FAIL;
sprintf(mess, sprintf(mess,
"Could not %s. program via blackfin not implmented for this " "Could not %s. program via blackfin not implmented for this "
@ -10605,15 +10415,9 @@ int set_bit(int file_des) {
ret = setBit(addr, nBit, validate); ret = setBit(addr, nBit, validate);
#else #else
uint32_t bitmask = (1 << nBit); uint32_t bitmask = (1 << nBit);
#ifdef GOTTHARDD
uint32_t val = readRegister16And32(addr) | bitmask;
writeRegister16And32(addr, val);
uint32_t retval = readRegister16And32(addr) | bitmask;
#else
uint32_t val = readRegister(addr) | bitmask; uint32_t val = readRegister(addr) | bitmask;
writeRegister(addr, val); writeRegister(addr, val);
uint32_t retval = readRegister(addr) | bitmask; uint32_t retval = readRegister(addr) | bitmask;
#endif
if (validate && (!(retval & bitmask))) { if (validate && (!(retval & bitmask))) {
ret = FAIL; ret = FAIL;
} }
@ -10654,15 +10458,9 @@ int clear_bit(int file_des) {
ret = clearBit(addr, nBit, validate); ret = clearBit(addr, nBit, validate);
#else #else
uint32_t bitmask = (1 << nBit); uint32_t bitmask = (1 << nBit);
#ifdef GOTTHARDD
uint32_t val = readRegister16And32(addr) & ~bitmask;
writeRegister16And32(addr, val);
uint32_t retval = readRegister16And32(addr) & ~bitmask;
#else
uint32_t val = readRegister(addr) & ~bitmask; uint32_t val = readRegister(addr) & ~bitmask;
writeRegister(addr, val); writeRegister(addr, val);
uint32_t retval = readRegister(addr) & ~bitmask; uint32_t retval = readRegister(addr) & ~bitmask;
#endif
if (validate && (retval & bitmask)) { if (validate && (retval & bitmask)) {
ret = FAIL; ret = FAIL;
} }
@ -10702,12 +10500,8 @@ int get_bit(int file_des) {
sprintf(mess, "Could not get bit %d.\n", nBit); sprintf(mess, "Could not get bit %d.\n", nBit);
LOG(logERROR, (mess)); LOG(logERROR, (mess));
} }
#else
#ifdef GOTTHARDD
uint32_t regval = readRegister16And32(addr);
#else #else
uint32_t regval = readRegister(addr); uint32_t regval = readRegister(addr);
#endif
retval = (regval & (1 << nBit)) >> nBit; retval = (regval & (1 << nBit)) >> nBit;
LOG(logDEBUG1, ("regval: 0x%x bit value:0%d\n", regval, retval)); LOG(logDEBUG1, ("regval: 0x%x bit value:0%d\n", regval, retval));
#endif #endif

View File

@ -492,6 +492,9 @@ void setTransceiverAlignment(int align) {
#endif #endif
int isTransceiverAligned() { int isTransceiverAligned() {
#ifdef VIRTUAL
return 1;
#endif
int times = 0; int times = 0;
int retval = bus_r(TRANSCEIVERSTATUS2) & RXLOCKED_MSK; int retval = bus_r(TRANSCEIVERSTATUS2) & RXLOCKED_MSK;
while (retval) { while (retval) {

View File

@ -78,6 +78,9 @@ def get_literal(ifstmt):
stringliteral = implicitCastExpr['inner'][0]['value'][1:-1] stringliteral = implicitCastExpr['inner'][0]['value'][1:-1]
retstmt = get_object_by_kind(ifstmt['inner'], 'ReturnStmt') retstmt = get_object_by_kind(ifstmt['inner'], 'ReturnStmt')
if retstmt is None:
print(f"Error: No 'ReturnStmt' found in: {ifstmt['inner']}")
exit(1)
declrefexpt = get_object_by_kind(retstmt['inner'], 'DeclRefExpr') declrefexpt = get_object_by_kind(retstmt['inner'], 'DeclRefExpr')
enum_val = declrefexpt["referencedDecl"]["name"] enum_val = declrefexpt["referencedDecl"]["name"]

View File

@ -80,7 +80,7 @@ _sd() {
local IS_PATH=0 local IS_PATH=0
local SLS_COMMANDS=" acquire activate adcclk adcenable adcenable10g adcindex adcinvert adclist adcname adcphase adcpipeline adcreg adcvpp apulse asamples autocompdisable badchannels blockingtrigger burstmode burstperiod bursts burstsl bustest cdsgain chipversion clearbit clearbusy clearroi clientversion clkdiv clkfreq clkphase collectionmode column compdisabletime confadc config configtransceiver counters currentsource dac dacindex daclist dacname dacvalues datastream dbitclk dbitphase dbitpipeline defaultdac defaultpattern delay delayl detectorserverversion detsize diodelay dpulse dr drlist dsamples execcommand exptime exptime1 exptime2 exptime3 exptimel extrastoragecells extsampling extsamplingsrc extsig fformat filtercells filterresistor findex firmwaretest firmwareversion fliprows flowcontrol10g fmaster fname foverwrite fpath framecounter frames framesl frametime free fwrite gaincaps gainmode gappixels gatedelay gatedelay1 gatedelay2 gatedelay3 gates getbit hardwareversion highvoltage hostname im_a im_b im_c im_d im_io imagetest initialchecks inj_ch interpolation interruptsubframe kernelversion lastclient led lock master maxadcphaseshift maxclkphaseshift maxdbitphaseshift measuredperiod measuredsubperiod moduleid nextframenumber nmod numinterfaces overflow packageversion parallel parameters partialreset patfname patioctrl patlimits patloop patloop0 patloop1 patloop2 patmask patnloop patnloop0 patnloop1 patnloop2 patsetbit pattern patternstart patwait patwait0 patwait1 patwait2 patwaittime patwaittime0 patwaittime1 patwaittime2 patword pedestalmode period periodl polarity port powerchip powerindex powerlist powername powervalues programfpga pulse pulsechip pulsenmove pumpprobe quad ratecorr readnrows readout readoutspeed readoutspeedlist rebootcontroller reg resetdacs resetfpga roi romode row runclk runtime rx_arping rx_clearroi rx_dbitlist rx_dbitoffset rx_discardpolicy rx_fifodepth rx_frameindex rx_framescaught rx_framesperfile rx_hostname rx_jsonaddheader rx_jsonpara rx_lastclient rx_lock rx_missingpackets rx_padding rx_printconfig rx_realudpsocksize rx_roi rx_silent rx_start rx_status rx_stop rx_tcpport rx_threads rx_udpsocksize rx_version rx_zmqfreq rx_zmqhwm rx_zmqip rx_zmqport rx_zmqstartfnum rx_zmqstream samples savepattern scan scanerrmsg selinterface serialnumber setbit settings settingslist settingspath signalindex signallist signalname sleep slowadc slowadcindex slowadclist slowadcname slowadcvalues start status stop stopport storagecell_delay storagecell_start subdeadtime subexptime sync syncclk temp_10ge temp_adc temp_control temp_dcdc temp_event temp_fpga temp_fpgaext temp_fpgafl temp_fpgafr temp_slowadc temp_sodl temp_sodr temp_threshold templist tempvalues tengiga threshold thresholdnotb timing timing_info_decoder timinglist timingsource top transceiverenable trigger triggers triggersl trimbits trimen trimval tsamples txdelay txdelay_frame txdelay_left txdelay_right type udp_cleardst udp_dstip udp_dstip2 udp_dstlist udp_dstmac udp_dstmac2 udp_dstport udp_dstport2 udp_firstdst udp_numdst udp_reconfigure udp_srcip udp_srcip2 udp_srcmac udp_srcmac2 udp_validate update updatedetectorserver updatekernel updatemode user v_a v_b v_c v_chip v_d v_io v_limit vchip_comp_adc vchip_comp_fe vchip_cs vchip_opa_1st vchip_opa_fd vchip_ref_comp_fe versions veto vetoalg vetofile vetophoton vetoref vetostream virtual vm_a vm_b vm_c vm_d vm_io zmqhwm zmqip zmqport " local SLS_COMMANDS=" acquire activate adcclk adcenable adcenable10g adcindex adcinvert adclist adcname adcphase adcpipeline adcreg adcvpp apulse asamples autocompdisable badchannels blockingtrigger burstmode burstperiod bursts burstsl bustest cdsgain chipversion clearbit clearbusy clientversion clkdiv clkfreq clkphase collectionmode column compdisabletime confadc config configtransceiver counters currentsource dac dacindex daclist dacname dacvalues datastream dbitclk dbitphase dbitpipeline defaultdac defaultpattern delay delayl detectorserverversion detsize diodelay dpulse dr drlist dsamples execcommand exptime exptime1 exptime2 exptime3 extrastoragecells extsampling extsamplingsrc extsig fformat filtercells filterresistor findex firmwaretest firmwareversion fliprows flowcontrol10g fmaster fname foverwrite fpath framecounter frames framesl frametime free fwrite gaincaps gainmode gappixels gatedelay gatedelay1 gatedelay2 gatedelay3 gates getbit hardwareversion highvoltage hostname im_a im_b im_c im_d im_io imagetest initialchecks inj_ch interpolation interruptsubframe kernelversion lastclient led lock master maxadcphaseshift maxclkphaseshift maxdbitphaseshift measuredperiod measuredsubperiod moduleid nextframenumber nmod numinterfaces overflow packageversion parallel parameters partialreset patfname patioctrl patlimits patloop patloop0 patloop1 patloop2 patmask patnloop patnloop0 patnloop1 patnloop2 patsetbit pattern patternstart patwait patwait0 patwait1 patwait2 patwaittime patwaittime0 patwaittime1 patwaittime2 patword pedestalmode period periodl polarity port powerchip powerindex powerlist powername powervalues programfpga pulse pulsechip pulsenmove pumpprobe quad ratecorr readnrows readout readoutspeed readoutspeedlist rebootcontroller reg resetdacs resetfpga romode row runclk runtime rx_arping rx_clearroi rx_dbitlist rx_dbitoffset rx_discardpolicy rx_fifodepth rx_frameindex rx_framescaught rx_framesperfile rx_hostname rx_jsonaddheader rx_jsonpara rx_lastclient rx_lock rx_missingpackets rx_padding rx_printconfig rx_realudpsocksize rx_roi rx_silent rx_start rx_status rx_stop rx_tcpport rx_threads rx_udpsocksize rx_version rx_zmqfreq rx_zmqhwm rx_zmqip rx_zmqport rx_zmqstartfnum rx_zmqstream samples savepattern scan scanerrmsg selinterface serialnumber setbit settings settingslist settingspath signalindex signallist signalname sleep slowadc slowadcindex slowadclist slowadcname slowadcvalues start status stop stopport storagecell_delay storagecell_start subdeadtime subexptime sync syncclk temp_10ge temp_adc temp_control temp_dcdc temp_event temp_fpga temp_fpgaext temp_fpgafl temp_fpgafr temp_slowadc temp_sodl temp_sodr temp_threshold templist tempvalues tengiga threshold thresholdnotb timing timing_info_decoder timinglist timingsource top transceiverenable trigger triggers triggersl trimbits trimen trimval tsamples txdelay txdelay_frame txdelay_left txdelay_right type udp_cleardst udp_dstip udp_dstip2 udp_dstlist udp_dstmac udp_dstmac2 udp_dstport udp_dstport2 udp_firstdst udp_numdst udp_reconfigure udp_srcip udp_srcip2 udp_srcmac udp_srcmac2 udp_validate update updatedetectorserver updatekernel updatemode user v_a v_b v_c v_chip v_d v_io v_limit vchip_comp_adc vchip_comp_fe vchip_cs vchip_opa_1st vchip_opa_fd vchip_ref_comp_fe versions veto vetoalg vetofile vetophoton vetoref vetostream virtual vm_a vm_b vm_c vm_d vm_io zmqhwm zmqip zmqport "
__acquire() { __acquire() {
FCN_RETURN="" FCN_RETURN=""
return 0 return 0
@ -351,10 +351,6 @@ fi
fi fi
return 0 return 0
} }
__clearroi() {
FCN_RETURN=""
return 0
}
__clientversion() { __clientversion() {
FCN_RETURN="" FCN_RETURN=""
return 0 return 0
@ -861,20 +857,6 @@ fi
fi fi
return 0 return 0
} }
__exptimel() {
FCN_RETURN=""
if [[ ${IS_GET} -eq 1 ]]; then
if [[ "${cword}" == "2" ]]; then
FCN_RETURN="ms ns s us"
fi
fi
if [[ ${IS_GET} -eq 0 ]]; then
if [[ "${cword}" == "2" ]]; then
FCN_RETURN="ms ns s us"
fi
fi
return 0
}
__extrastoragecells() { __extrastoragecells() {
FCN_RETURN="" FCN_RETURN=""
if [[ ${IS_GET} -eq 0 ]]; then if [[ ${IS_GET} -eq 0 ]]; then
@ -2034,18 +2016,6 @@ fi
fi fi
return 0 return 0
} }
__roi() {
FCN_RETURN=""
if [[ ${IS_GET} -eq 0 ]]; then
if [[ "${cword}" == "2" ]]; then
FCN_RETURN=""
fi
if [[ "${cword}" == "3" ]]; then
FCN_RETURN=""
fi
fi
return 0
}
__romode() { __romode() {
FCN_RETURN="" FCN_RETURN=""
if [[ ${IS_GET} -eq 0 ]]; then if [[ ${IS_GET} -eq 0 ]]; then

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@
_sd() { _sd() {
local SLS_COMMANDS=" acquire activate adcclk adcenable adcenable10g adcindex adcinvert adclist adcname adcphase adcpipeline adcreg adcvpp apulse asamples autocompdisable badchannels blockingtrigger burstmode burstperiod bursts burstsl bustest cdsgain chipversion clearbit clearbusy clearroi clientversion clkdiv clkfreq clkphase collectionmode column compdisabletime confadc config configtransceiver counters currentsource dac dacindex daclist dacname dacvalues datastream dbitclk dbitphase dbitpipeline defaultdac defaultpattern delay delayl detectorserverversion detsize diodelay dpulse dr drlist dsamples execcommand exptime exptime1 exptime2 exptime3 exptimel extrastoragecells extsampling extsamplingsrc extsig fformat filtercells filterresistor findex firmwaretest firmwareversion fliprows flowcontrol10g fmaster fname foverwrite fpath framecounter frames framesl frametime free fwrite gaincaps gainmode gappixels gatedelay gatedelay1 gatedelay2 gatedelay3 gates getbit hardwareversion highvoltage hostname im_a im_b im_c im_d im_io imagetest initialchecks inj_ch interpolation interruptsubframe kernelversion lastclient led lock master maxadcphaseshift maxclkphaseshift maxdbitphaseshift measuredperiod measuredsubperiod moduleid nextframenumber nmod numinterfaces overflow packageversion parallel parameters partialreset patfname patioctrl patlimits patloop patloop0 patloop1 patloop2 patmask patnloop patnloop0 patnloop1 patnloop2 patsetbit pattern patternstart patwait patwait0 patwait1 patwait2 patwaittime patwaittime0 patwaittime1 patwaittime2 patword pedestalmode period periodl polarity port powerchip powerindex powerlist powername powervalues programfpga pulse pulsechip pulsenmove pumpprobe quad ratecorr readnrows readout readoutspeed readoutspeedlist rebootcontroller reg resetdacs resetfpga roi romode row runclk runtime rx_arping rx_clearroi rx_dbitlist rx_dbitoffset rx_discardpolicy rx_fifodepth rx_frameindex rx_framescaught rx_framesperfile rx_hostname rx_jsonaddheader rx_jsonpara rx_lastclient rx_lock rx_missingpackets rx_padding rx_printconfig rx_realudpsocksize rx_roi rx_silent rx_start rx_status rx_stop rx_tcpport rx_threads rx_udpsocksize rx_version rx_zmqfreq rx_zmqhwm rx_zmqip rx_zmqport rx_zmqstartfnum rx_zmqstream samples savepattern scan scanerrmsg selinterface serialnumber setbit settings settingslist settingspath signalindex signallist signalname sleep slowadc slowadcindex slowadclist slowadcname slowadcvalues start status stop stopport storagecell_delay storagecell_start subdeadtime subexptime sync syncclk temp_10ge temp_adc temp_control temp_dcdc temp_event temp_fpga temp_fpgaext temp_fpgafl temp_fpgafr temp_slowadc temp_sodl temp_sodr temp_threshold templist tempvalues tengiga threshold thresholdnotb timing timing_info_decoder timinglist timingsource top transceiverenable trigger triggers triggersl trimbits trimen trimval tsamples txdelay txdelay_frame txdelay_left txdelay_right type udp_cleardst udp_dstip udp_dstip2 udp_dstlist udp_dstmac udp_dstmac2 udp_dstport udp_dstport2 udp_firstdst udp_numdst udp_reconfigure udp_srcip udp_srcip2 udp_srcmac udp_srcmac2 udp_validate update updatedetectorserver updatekernel updatemode user v_a v_b v_c v_chip v_d v_io v_limit vchip_comp_adc vchip_comp_fe vchip_cs vchip_opa_1st vchip_opa_fd vchip_ref_comp_fe versions veto vetoalg vetofile vetophoton vetoref vetostream virtual vm_a vm_b vm_c vm_d vm_io zmqhwm zmqip zmqport " local SLS_COMMANDS=" acquire activate adcclk adcenable adcenable10g adcindex adcinvert adclist adcname adcphase adcpipeline adcreg adcvpp apulse asamples autocompdisable badchannels blockingtrigger burstmode burstperiod bursts burstsl bustest cdsgain chipversion clearbit clearbusy clientversion clkdiv clkfreq clkphase collectionmode column compdisabletime confadc config configtransceiver counters currentsource dac dacindex daclist dacname dacvalues datastream dbitclk dbitphase dbitpipeline defaultdac defaultpattern delay delayl detectorserverversion detsize diodelay dpulse dr drlist dsamples execcommand exptime exptime1 exptime2 exptime3 extrastoragecells extsampling extsamplingsrc extsig fformat filtercells filterresistor findex firmwaretest firmwareversion fliprows flowcontrol10g fmaster fname foverwrite fpath framecounter frames framesl frametime free fwrite gaincaps gainmode gappixels gatedelay gatedelay1 gatedelay2 gatedelay3 gates getbit hardwareversion highvoltage hostname im_a im_b im_c im_d im_io imagetest initialchecks inj_ch interpolation interruptsubframe kernelversion lastclient led lock master maxadcphaseshift maxclkphaseshift maxdbitphaseshift measuredperiod measuredsubperiod moduleid nextframenumber nmod numinterfaces overflow packageversion parallel parameters partialreset patfname patioctrl patlimits patloop patloop0 patloop1 patloop2 patmask patnloop patnloop0 patnloop1 patnloop2 patsetbit pattern patternstart patwait patwait0 patwait1 patwait2 patwaittime patwaittime0 patwaittime1 patwaittime2 patword pedestalmode period periodl polarity port powerchip powerindex powerlist powername powervalues programfpga pulse pulsechip pulsenmove pumpprobe quad ratecorr readnrows readout readoutspeed readoutspeedlist rebootcontroller reg resetdacs resetfpga romode row runclk runtime rx_arping rx_clearroi rx_dbitlist rx_dbitoffset rx_discardpolicy rx_fifodepth rx_frameindex rx_framescaught rx_framesperfile rx_hostname rx_jsonaddheader rx_jsonpara rx_lastclient rx_lock rx_missingpackets rx_padding rx_printconfig rx_realudpsocksize rx_roi rx_silent rx_start rx_status rx_stop rx_tcpport rx_threads rx_udpsocksize rx_version rx_zmqfreq rx_zmqhwm rx_zmqip rx_zmqport rx_zmqstartfnum rx_zmqstream samples savepattern scan scanerrmsg selinterface serialnumber setbit settings settingslist settingspath signalindex signallist signalname sleep slowadc slowadcindex slowadclist slowadcname slowadcvalues start status stop stopport storagecell_delay storagecell_start subdeadtime subexptime sync syncclk temp_10ge temp_adc temp_control temp_dcdc temp_event temp_fpga temp_fpgaext temp_fpgafl temp_fpgafr temp_slowadc temp_sodl temp_sodr temp_threshold templist tempvalues tengiga threshold thresholdnotb timing timing_info_decoder timinglist timingsource top transceiverenable trigger triggers triggersl trimbits trimen trimval tsamples txdelay txdelay_frame txdelay_left txdelay_right type udp_cleardst udp_dstip udp_dstip2 udp_dstlist udp_dstmac udp_dstmac2 udp_dstport udp_dstport2 udp_firstdst udp_numdst udp_reconfigure udp_srcip udp_srcip2 udp_srcmac udp_srcmac2 udp_validate update updatedetectorserver updatekernel updatemode user v_a v_b v_c v_chip v_d v_io v_limit vchip_comp_adc vchip_comp_fe vchip_cs vchip_opa_1st vchip_opa_fd vchip_ref_comp_fe versions veto vetoalg vetofile vetophoton vetoref vetostream virtual vm_a vm_b vm_c vm_d vm_io zmqhwm zmqip zmqport "
__acquire() { __acquire() {
FCN_RETURN="" FCN_RETURN=""
return 0 return 0
@ -275,10 +275,6 @@ fi
fi fi
return 0 return 0
} }
__clearroi() {
FCN_RETURN=""
return 0
}
__clientversion() { __clientversion() {
FCN_RETURN="" FCN_RETURN=""
return 0 return 0
@ -785,20 +781,6 @@ fi
fi fi
return 0 return 0
} }
__exptimel() {
FCN_RETURN=""
if [[ ${IS_GET} -eq 1 ]]; then
if [[ "${cword}" == "2" ]]; then
FCN_RETURN="ms ns s us"
fi
fi
if [[ ${IS_GET} -eq 0 ]]; then
if [[ "${cword}" == "2" ]]; then
FCN_RETURN="ms ns s us"
fi
fi
return 0
}
__extrastoragecells() { __extrastoragecells() {
FCN_RETURN="" FCN_RETURN=""
if [[ ${IS_GET} -eq 0 ]]; then if [[ ${IS_GET} -eq 0 ]]; then
@ -1958,18 +1940,6 @@ fi
fi fi
return 0 return 0
} }
__roi() {
FCN_RETURN=""
if [[ ${IS_GET} -eq 0 ]]; then
if [[ "${cword}" == "2" ]]; then
FCN_RETURN=""
fi
if [[ "${cword}" == "3" ]]; then
FCN_RETURN=""
fi
fi
return 0
}
__romode() { __romode() {
FCN_RETURN="" FCN_RETURN=""
if [[ ${IS_GET} -eq 0 ]]; then if [[ ${IS_GET} -eq 0 ]]; then

View File

@ -441,7 +441,7 @@ period:
function: setPeriod function: setPeriod
delay: delay:
help: "[duration] [(optional unit) ns|us|ms|s]\n\t[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb][Moench][Xilinx Ctb] Delay after trigger" help: "[duration] [(optional unit) ns|us|ms|s]\n\t[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Moench][Xilinx Ctb] Delay after trigger"
inherit_actions: TIME_COMMAND inherit_actions: TIME_COMMAND
actions: actions:
GET: GET:
@ -496,14 +496,14 @@ burstperiod:
################# TIME_GET_COMMAND ############# ################# TIME_GET_COMMAND #############
delayl: delayl:
help: "\n\t[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Delay Left in Acquisition. \n\t[Gotthard2] only in continuous mode." help: "\n\t[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Delay Left in Acquisition. \n\t[Gotthard2] only in continuous mode."
inherit_actions: TIME_GET_COMMAND inherit_actions: TIME_GET_COMMAND
actions: actions:
GET: GET:
function: getDelayAfterTriggerLeft function: getDelayAfterTriggerLeft
periodl: periodl:
help: "\n\t[Gotthard][Jungfrau][Moench][Ctb][Mythen3][Gotthard2][Xilinx Ctb] Period left for current frame. \n\t[Gotthard2] only in continuous mode." help: "\n\t[Jungfrau][Moench][Ctb][Mythen3][Gotthard2][Xilinx Ctb] Period left for current frame. \n\t[Gotthard2] only in continuous mode."
inherit_actions: TIME_GET_COMMAND inherit_actions: TIME_GET_COMMAND
actions: actions:
GET: GET:
@ -523,13 +523,6 @@ measuredsubperiod:
GET: GET:
function: getMeasuredSubFramePeriod function: getMeasuredSubFramePeriod
exptimel:
help: "[(optional unit) ns|us|ms|s]\n\t[Gotthard] Exposure time left for current frame. "
inherit_actions: TIME_GET_COMMAND
actions:
GET:
function: getExptimeLeft
runtime: runtime:
help: "[(optional unit) ns|us|ms|s]\n\t[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Time from detector start up.\n\t[Gotthard2] not in burst and auto mode." help: "[(optional unit) ns|us|ms|s]\n\t[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Time from detector start up.\n\t[Gotthard2] not in burst and auto mode."
inherit_actions: TIME_GET_COMMAND inherit_actions: TIME_GET_COMMAND
@ -641,7 +634,7 @@ adcinvert:
################# INTEGER_COMMAND_VEC_ID ################# ################# INTEGER_COMMAND_VEC_ID #################
settings: settings:
help: "[standard, fast, highgain, dynamicgain, lowgain, mediumgain, veryhighgain, highgain0, fixgain1, fixgain2, forceswitchg1, forceswitchg2, verylowgain, g1_hg, g1_lg, g2_hc_hg, g2_hc_lg, g2_lc_hg, g2_lc_lg, g4_hg, g4_lg, gain0]\n\t Detector Settings\n\t[Jungfrau] - [ gain0 | highgain0]\n\t[Gotthard] - [dynamicgain | highgain | lowgain | mediumgain | veryhighgain]\n\t[Gotthard] Also loads default dacs on to the detector.\n\t[Gotthard2] - [dynamicgain | fixgain1 | fixgain2]\n\t[Mythen3] - [standard | fast | highgain] Also changes vrshaper and vrpreamp. \n\t[Eiger] Use threshold or thresholdnotb. \n\t[Eiger] threshold and settings loaded from file found in settingspath. \n\t[Moench] - [g1_hg | g1_lg | g2_hc_hg | g2_hc_lg | g2_lc_hg | g2_lc_lg | g4_hg | g4_lg]" help: "[standard, fast, highgain, dynamicgain, lowgain, mediumgain, veryhighgain, highgain0, fixgain1, fixgain2, forceswitchg1, forceswitchg2, verylowgain, g1_hg, g1_lg, g2_hc_hg, g2_hc_lg, g2_lc_hg, g2_lc_lg, g4_hg, g4_lg, gain0]\n\t Detector Settings\n\t[Jungfrau] - [ gain0 | highgain0]\n\t[Gotthard2] - [dynamicgain | fixgain1 | fixgain2]\n\t[Mythen3] - [standard | fast | highgain] Also changes vrshaper and vrpreamp. \n\t[Eiger] Use threshold or thresholdnotb. \n\t[Eiger] threshold and settings loaded from file found in settingspath. \n\t[Moench] - [g1_hg | g1_lg | g2_hc_hg | g2_hc_lg | g2_lc_hg | g2_lc_lg | g4_hg | g4_lg]"
inherit_actions: INTEGER_COMMAND_VEC_ID inherit_actions: INTEGER_COMMAND_VEC_ID
actions: actions:
GET: GET:
@ -688,7 +681,7 @@ column:
function: setColumn function: setColumn
timing: timing:
help: "[auto|trigger|gating|burst_trigger|trigger_gating]\n\tTiming Mode of detector.\n\t[Jungfrau][Moench][Gotthard][Ctb][Gotthard2][Xilinx Ctb] [auto|trigger]\n\t[Mythen3] [auto|trigger|gating|trigger_gating]\n\t[Eiger] [auto|trigger|gating|burst_trigger]" help: "[auto|trigger|gating|burst_trigger|trigger_gating]\n\tTiming Mode of detector.\n\t[Jungfrau][Moench][Ctb][Gotthard2][Xilinx Ctb] [auto|trigger]\n\t[Mythen3] [auto|trigger|gating|trigger_gating]\n\t[Eiger] [auto|trigger|gating|burst_trigger]"
inherit_actions: INTEGER_COMMAND_VEC_ID inherit_actions: INTEGER_COMMAND_VEC_ID
actions: actions:
GET: GET:
@ -698,7 +691,7 @@ timing:
input_types: [ defs::timingMode ] input_types: [ defs::timingMode ]
highvoltage: highvoltage:
help: "[n_value]\n\tHigh voltage to the sensor in Voltage. \n\t[Gotthard] [0|90|110|120|150|180|200] \n\t[Eiger][Mythen3][Gotthard2] 0-200 \n\t[Jungfrau][Moench][Ctb] [0|60-200]" help: "[n_value]\n\tHigh voltage to the sensor in Voltage. \n\t[Eiger][Mythen3][Gotthard2] 0-200 \n\t[Jungfrau][Moench][Ctb] [0|60-200]"
inherit_actions: INTEGER_COMMAND_VEC_ID inherit_actions: INTEGER_COMMAND_VEC_ID
actions: actions:
GET: GET:
@ -717,7 +710,7 @@ powerchip:
input_types: [ bool ] input_types: [ bool ]
imagetest: imagetest:
help: "[0, 1]\n\t[Gotthard] 1 adds channel intensity with precalculated values when taking an acquisition. Default is 0.\n\t[Eiger][Jungfrau][Moench] Only for Virtual servers. If 0, each pixel intensity incremented by 1. If 1, all pixels almost saturated." help: "[0, 1]\n\t[Eiger][Jungfrau][Moench] Only for Virtual servers. If 0, each pixel intensity incremented by 1. If 1, all pixels almost saturated."
inherit_actions: INTEGER_COMMAND_VEC_ID inherit_actions: INTEGER_COMMAND_VEC_ID
actions: actions:
GET: GET:
@ -1423,7 +1416,7 @@ lock:
master: master:
inherit_actions: INTEGER_COMMAND_VEC_ID_GET inherit_actions: INTEGER_COMMAND_VEC_ID_GET
help: "[0, 1]\n\t[Eiger][Gotthard2][Jungfrau][Moench] Sets (half) module to master and other(s) to slaves.\n\t[Gotthard][Gotthard2][Mythen3][Eiger][Jungfrau][Moench] Gets if the current (half) module is master." help: "[0, 1]\n\t[Eiger][Gotthard2][Jungfrau][Moench] Sets (half) module to master and other(s) to slaves.\n\t[Gotthard2][Mythen3][Eiger][Jungfrau][Moench] Gets if the current (half) module is master."
actions: actions:
GET: GET:
function: getMaster function: getMaster
@ -1514,7 +1507,7 @@ triggers:
dr: dr:
inherit_actions: INTEGER_COMMAND_SET_NOID_GET_ID inherit_actions: INTEGER_COMMAND_SET_NOID_GET_ID
help: "[value]\n\tDynamic Range or number of bits per pixel in detector.\n\t[Eiger] Options: 4, 8, 12, 16, 32. If set to 32, also sets clkdivider to 2, else to 0.\n\t[Mythen3] Options: 8, 16, 32\n\t[Jungfrau][Moench][Gotthard][Ctb][Mythen3][Gotthard2][Xilinx Ctb] 16" help: "[value]\n\tDynamic Range or number of bits per pixel in detector.\n\t[Eiger] Options: 4, 8, 12, 16, 32. If set to 32, also sets clkdivider to 2, else to 0.\n\t[Mythen3] Options: 8, 16, 32\n\t[Jungfrau][Moench][Ctb][Mythen3][Gotthard2][Xilinx Ctb] 16"
actions: actions:
GET: GET:
function: getDynamicRange function: getDynamicRange
@ -1777,13 +1770,6 @@ udp_validate:
PUT: PUT:
function: validateUDPConfiguration function: validateUDPConfiguration
clearroi:
inherit_actions: EXECUTE_SET_COMMAND
help: "\n\t[Gotthard] Resets Region of interest in detector. All channels enabled. Default is all channels enabled."
actions:
PUT:
function: clearROI
defaultpattern: defaultpattern:
inherit_actions: EXECUTE_SET_COMMAND inherit_actions: EXECUTE_SET_COMMAND
help: "\n\t[Mythen3] Loads and runs default pattern in pattern generator. It is to go back to initial settings." help: "\n\t[Mythen3] Loads and runs default pattern in pattern generator. It is to go back to initial settings."
@ -1807,21 +1793,21 @@ resetfpga:
rebootcontroller: rebootcontroller:
inherit_actions: EXECUTE_SET_COMMAND inherit_actions: EXECUTE_SET_COMMAND
help: "\n\t[Jungfrau][Moench][Ctb][Gotthard][Mythen3][Gotthard2][Xilinx Ctb] Reboot controller of detector." help: "\n\t[Jungfrau][Moench][Ctb][Mythen3][Gotthard2][Xilinx Ctb] Reboot controller of detector."
actions: actions:
PUT: PUT:
function: rebootController function: rebootController
firmwaretest: firmwaretest:
inherit_actions: EXECUTE_SET_COMMAND inherit_actions: EXECUTE_SET_COMMAND
help: "\n\t[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Firmware test, ie. reads a read fixed pattern from a register." help: "\n\t[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Firmware test, ie. reads a read fixed pattern from a register."
actions: actions:
PUT: PUT:
function: executeFirmwareTest function: executeFirmwareTest
bustest: bustest:
inherit_actions: EXECUTE_SET_COMMAND inherit_actions: EXECUTE_SET_COMMAND
help: "\n\t[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb] Bus test, ie. Writes different values in a R/W register and confirms the writes to check bus.\n\tAdvanced User function!" help: "\n\t[Jungfrau][Moench][Mythen3][Gotthard2][Ctb] Bus test, ie. Writes different values in a R/W register and confirms the writes to check bus.\n\tAdvanced User function!"
actions: actions:
PUT: PUT:
function: executeBusTest function: executeBusTest
@ -1893,21 +1879,21 @@ moduleid:
type: type:
inherit_actions: GET_COMMAND inherit_actions: GET_COMMAND
help: "\n\tReturns detector type. Can be Eiger, Jungfrau, Gotthard, Moench, Mythen3, Gotthard2, ChipTestBoard, Xilinx_ChipTestBoard" help: "\n\tReturns detector type. Can be Eiger, Jungfrau, Moench, Mythen3, Gotthard2, ChipTestBoard, Xilinx_ChipTestBoard"
actions: actions:
GET: GET:
function: getDetectorType function: getDetectorType
framesl: framesl:
inherit_actions: GET_COMMAND inherit_actions: GET_COMMAND
help: "\n\t[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number of frames left in acquisition. \n\t[Gotthard2] only in continuous auto mode." help: "\n\t[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number of frames left in acquisition. \n\t[Gotthard2] only in continuous auto mode."
actions: actions:
GET: GET:
function: getNumberOfFramesLeft function: getNumberOfFramesLeft
triggersl: triggersl:
inherit_actions: GET_COMMAND inherit_actions: GET_COMMAND
help: "\n\t[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number of triggers left in acquisition. Only when external trigger used." help: "\n\t[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number of triggers left in acquisition. Only when external trigger used."
actions: actions:
GET: GET:
function: getNumberOfTriggersLeft function: getNumberOfTriggersLeft
@ -2034,7 +2020,7 @@ framecounter:
################# GET_COMMAND_HEX ############################ ################# GET_COMMAND_HEX ############################
serialnumber: serialnumber:
inherit_actions: GET_COMMAND inherit_actions: GET_COMMAND
help: "\n\t[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb]\n\tSerial number of detector." help: "\n\t[Jungfrau][Moench][Mythen3][Gotthard2][Ctb]\n\tSerial number of detector."
actions: actions:
GET: GET:
function: getSerialNumber function: getSerialNumber
@ -2086,7 +2072,7 @@ templist:
################# GET_IND_COMMAND ############################ ################# GET_IND_COMMAND ############################
temp_adc: temp_adc:
inherit_actions: GET_IND_COMMAND inherit_actions: GET_IND_COMMAND
help: "[n_value]\n\t[Jungfrau][Moench][Gotthard] ADC Temperature" help: "[n_value]\n\t[Jungfrau][Moench] ADC Temperature"
actions: actions:
GET: GET:
function: getTemperature function: getTemperature
@ -2095,7 +2081,7 @@ temp_adc:
temp_fpga: temp_fpga:
inherit_actions: GET_IND_COMMAND inherit_actions: GET_IND_COMMAND
help: "[n_value]\n\t[Eiger][Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Xilinx CTB] FPGA Temperature" help: "[n_value]\n\t[Eiger][Jungfrau][Moench][Mythen3][Gotthard2][Xilinx CTB] FPGA Temperature"
actions: actions:
GET: GET:
function: getTemperature function: getTemperature
@ -2890,7 +2876,7 @@ Exptime:
exptime: exptime:
inherit_actions: Exptime inherit_actions: Exptime
help: "[duration] [(optional unit) ns|us|ms|s]\n\t[Eiger][Jungfrau][Moench][Gotthard][Gotthard2][Ctb][Xilinx Ctb] Exposure time\n\t[Mythen3] Exposure time of all gate signals in auto and trigger mode (internal gating). To specify gate index, use exptime1, exptime2, exptime3." help: "[duration] [(optional unit) ns|us|ms|s]\n\t[Eiger][Jungfrau][Moench][Gotthard2][Ctb][Xilinx Ctb] Exposure time\n\t[Mythen3] Exposure time of all gate signals in auto and trigger mode (internal gating). To specify gate index, use exptime1, exptime2, exptime3."
actions: actions:
GET: GET:
function: getExptime function: getExptime
@ -2984,7 +2970,7 @@ readoutspeed:
adcphase: adcphase:
infer_action: true infer_action: true
help: "[n_value] [(optional)deg]\n\t[Jungfrau][Moench][Ctb][Gotthard] Phase shift of ADC clock. \n\t[Jungfrau][Moench] Absolute phase shift. If deg used, then shift in degrees. Changing Speed also resets adcphase to recommended defaults.\n\t[Ctb] Absolute phase shift. If deg used, then shift in degrees. Changing adcclk also resets adcphase and sets it to previous values.\n\t[Gotthard] Relative phase shift. Cannot get" help: "[n_value] [(optional)deg]\n\t[Jungfrau][Moench][Ctb] Phase shift of ADC clock. \n\t[Jungfrau][Moench] Absolute phase shift. If deg used, then shift in degrees. Changing Speed also resets adcphase to recommended defaults.\n\t[Ctb] Absolute phase shift. If deg used, then shift in degrees. Changing adcclk also resets adcphase and sets it to previous values."
actions: actions:
GET: GET:
require_det_id: true require_det_id: true
@ -3220,7 +3206,7 @@ clkdiv:
output: [ 'args[0]', "' '", 'args[1]' ] output: [ 'args[0]', "' '", 'args[1]' ]
extsig: extsig:
help: "[n_signal] [signal_type]\n\t[Gotthard][Mythen3] External signal mode for trigger timing mode.\n\t[Gotthard] [0] [trigger_in_rising_edge|trigger_in_falling_edge]\n\t[Mythen3] [0-7] [trigger_in_rising_edge|trigger_in_falling_edge|inversion_on|inversion_off]\n\t where 0 is master input trigger signal, 1-3 is master input gate signals, 4 is busy out signal and 5-7 is master output gate signals." help: "[n_signal] [signal_type]\n\t[Mythen3] External signal mode for trigger timing mode.\n\t[Mythen3] [0-7] [trigger_in_rising_edge|trigger_in_falling_edge|inversion_on|inversion_off]\n\t where 0 is master input trigger signal, 1-3 is master input gate signals, 4 is busy out signal and 5-7 is master output gate signals."
actions: actions:
GET: GET:
argc: 1 argc: 1
@ -3291,7 +3277,7 @@ dac:
output: [ "args[0]", "' '", "args[1]", '" mV"' ] output: [ "args[0]", "' '", "args[1]", '" mV"' ]
resetdacs: resetdacs:
help: "[(optional) hard] \n\t[Eiger][Jungfrau][Moench][Gotthard][Gotthard2][Mythen3]Reset dac values to the defaults. A 'hard' optional reset will reset the dacs to the hardcoded defaults in on-board detector server." help: "[(optional) hard] \n\t[Eiger][Jungfrau][Moench][Gotthard2][Mythen3]Reset dac values to the defaults. A 'hard' optional reset will reset the dacs to the hardcoded defaults in on-board detector server."
actions: actions:
PUT: PUT:
function: resetToDefaultDacs function: resetToDefaultDacs
@ -3621,30 +3607,6 @@ pedestalmode:
input_types: [ defs::pedestalParameters ] input_types: [ defs::pedestalParameters ]
input: [ 'defs::pedestalParameters(StringTo<uint8_t>(args[0]), StringTo<uint16_t>(args[1]))' ] input: [ 'defs::pedestalParameters(StringTo<uint8_t>(args[0]), StringTo<uint16_t>(args[1]))' ]
roi:
help: "[xmin] [xmax] \n\t[Gotthard] Region of interest in detector.\n\tOptions: Only a single ROI per module. \n\tEither all channels or a single adc or 2 chips (256 channels). Default is all channels enabled (-1 -1). "
actions:
GET:
argc: 0
require_det_id: true
function: getROI
output: [ t ]
PUT:
argc: 2
exceptions:
- condition: 'det_id == -1 && det->size() > 1'
message: '"Cannot execute ROI at multi module level"'
require_det_id: true
convert_det_id: false
function: setROI
arg_types: [ int, int ]
extra_variables:
- name: t
type: defs::ROI
value: defs::ROI(StringTo<int>(args[0]), StringTo<int>(args[1]))
input: [ t ]
input_types: [ defs::ROI ]
output: [ 't' ]
inj_ch: inj_ch:
help: "[offset] [increment]\n\t[Gotthard2] Inject channels with current source for calibration. Offset is starting channel that is injected, increment determines succeeding channels to be injected." help: "[offset] [increment]\n\t[Gotthard2] Inject channels with current source for calibration. Offset is starting channel that is injected, increment determines succeeding channels to be injected."
@ -4179,7 +4141,7 @@ updatekernel:
output: [ '"successful"' ] output: [ '"successful"' ]
update: update:
help: "\n\tWithout tftp: [server_name (incl fullpath)] [fname.pof (incl full path)] This does not use tftp.\n\t\t[Jungfrau][Moench][Gotthard][Ctb] Updates the firmware, detector server, deletes old server, creates the symbolic link and then reboots detector controller. \n\t\t[Mythen3][Gotthard2] will require a script to start up the shorter named server link at start up. \n\t\tserver_name is full path name of detector server binary\n\t\tfname is full path of programming file" help: "\n\tWithout tftp: [server_name (incl fullpath)] [fname.pof (incl full path)] This does not use tftp.\n\t\t[Jungfrau][Moench][Ctb] Updates the firmware, detector server, deletes old server, creates the symbolic link and then reboots detector controller. \n\t\t[Mythen3][Gotthard2] will require a script to start up the shorter named server link at start up. \n\t\tserver_name is full path name of detector server binary\n\t\tfname is full path of programming file"
actions: actions:
PUT: PUT:
argc: 2 argc: 2
@ -4224,7 +4186,7 @@ reg:
cast_input: [ true, true, true ] cast_input: [ true, true, true ]
adcreg: adcreg:
help: "[address] [value]\n\t[Jungfrau][Moench][Ctb][Gotthard] Writes to an adc register in hex. Advanced user Function!" help: "[address] [value]\n\t[Jungfrau][Moench][Ctb] Writes to an adc register in hex. Advanced user Function!"
actions: actions:
PUT: PUT:
argc: 2 argc: 2

View File

@ -54,13 +54,9 @@ vcn: dac
vishaper: dac vishaper: dac
iodelay: dac iodelay: dac
vref_ds: dac vref_ds: dac
vcascn_pb: dac
vcascp_pb: dac
vout_cm: dac vout_cm: dac
vcasc_out: dac
vin_cm: dac vin_cm: dac
vref_comp: dac vref_comp: dac
ib_test_c: dac
vrshaper_n: dac vrshaper_n: dac
vipre: dac vipre: dac
vdcsh: dac vdcsh: dac
@ -151,7 +147,6 @@ storagecells: extrastoragecells
auto_comp_disable: autocompdisable auto_comp_disable: autocompdisable
comp_disable_time: compdisabletime comp_disable_time: compdisabletime
#Gotthard Specific
#Gotthard2 Specific #Gotthard2 Specific
#Mythen3 Specific #Mythen3 Specific
#CTB Specific #CTB Specific

View File

@ -480,12 +480,11 @@ adcphase:
store_result_in_t: false store_result_in_t: false
command_name: adcphase command_name: adcphase
function_alias: adcphase function_alias: adcphase
help: "[n_value] [(optional)deg]\n\t[Jungfrau][Moench][Ctb][Gotthard] Phase shift\ help: "[n_value] [(optional)deg]\n\t[Jungfrau][Moench][Ctb] Phase shift of ADC clock.\
\ of ADC clock. \n\t[Jungfrau][Moench] Absolute phase shift. If deg used, then\ \ \n\t[Jungfrau][Moench] Absolute phase shift. If deg used, then shift in degrees.\
\ shift in degrees. Changing Speed also resets adcphase to recommended defaults.\n\ \ Changing Speed also resets adcphase to recommended defaults.\n\t[Ctb] Absolute\
\t[Ctb] Absolute phase shift. If deg used, then shift in degrees. Changing adcclk\ \ phase shift. If deg used, then shift in degrees. Changing adcclk also resets\
\ also resets adcphase and sets it to previous values.\n\t[Gotthard] Relative\ \ adcphase and sets it to previous values."
\ phase shift. Cannot get"
infer_action: true infer_action: true
adcpipeline: adcpipeline:
actions: actions:
@ -552,8 +551,8 @@ adcreg:
store_result_in_t: false store_result_in_t: false
command_name: adcreg command_name: adcreg
function_alias: adcreg function_alias: adcreg
help: "[address] [value]\n\t[Jungfrau][Moench][Ctb][Gotthard] Writes to an adc register\ help: "[address] [value]\n\t[Jungfrau][Moench][Ctb] Writes to an adc register in\
\ in hex. Advanced user Function!" \ hex. Advanced user Function!"
infer_action: true infer_action: true
adcvpp: adcvpp:
actions: actions:
@ -1026,9 +1025,9 @@ bustest:
store_result_in_t: false store_result_in_t: false
command_name: bustest command_name: bustest
function_alias: bustest function_alias: bustest
help: "\n\t[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb] Bus test, ie. Writes\ help: "\n\t[Jungfrau][Moench][Mythen3][Gotthard2][Ctb] Bus test, ie. Writes different\
\ different values in a R/W register and confirms the writes to check bus.\n\t\ \ values in a R/W register and confirms the writes to check bus.\n\tAdvanced User\
Advanced User function!" \ function!"
infer_action: true infer_action: true
template: true template: true
cdsgain: cdsgain:
@ -1186,28 +1185,6 @@ clearbusy:
\ flag in shared memory before starting next acquisition" \ flag in shared memory before starting next acquisition"
infer_action: true infer_action: true
template: true template: true
clearroi:
actions:
PUT:
args:
- arg_types: []
argc: 0
cast_input: []
check_det_id: false
convert_det_id: true
function: clearROI
input: []
input_types: []
output:
- '"successful"'
require_det_id: true
store_result_in_t: false
command_name: clearroi
function_alias: clearroi
help: "\n\t[Gotthard] Resets Region of interest in detector. All channels enabled.\
\ Default is all channels enabled."
infer_action: true
template: true
clientversion: clientversion:
actions: actions:
GET: GET:
@ -2598,7 +2575,7 @@ delay:
store_result_in_t: false store_result_in_t: false
command_name: delay command_name: delay
function_alias: delay function_alias: delay
help: "[duration] [(optional unit) ns|us|ms|s]\n\t[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb][Moench][Xilinx\ help: "[duration] [(optional unit) ns|us|ms|s]\n\t[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Moench][Xilinx\
\ Ctb] Delay after trigger" \ Ctb] Delay after trigger"
infer_action: true infer_action: true
template: true template: true
@ -2633,8 +2610,8 @@ delayl:
store_result_in_t: true store_result_in_t: true
command_name: delayl command_name: delayl
function_alias: delayl function_alias: delayl
help: "\n\t[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Delay\ help: "\n\t[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Delay Left in\
\ Left in Acquisition. \n\t[Gotthard2] only in continuous mode." \ Acquisition. \n\t[Gotthard2] only in continuous mode."
infer_action: true infer_action: true
template: true template: true
detectorserverversion: detectorserverversion:
@ -2806,7 +2783,7 @@ dr:
function_alias: dr function_alias: dr
help: "[value]\n\tDynamic Range or number of bits per pixel in detector.\n\t[Eiger]\ help: "[value]\n\tDynamic Range or number of bits per pixel in detector.\n\t[Eiger]\
\ Options: 4, 8, 12, 16, 32. If set to 32, also sets clkdivider to 2, else to\ \ Options: 4, 8, 12, 16, 32. If set to 32, also sets clkdivider to 2, else to\
\ 0.\n\t[Mythen3] Options: 8, 16, 32\n\t[Jungfrau][Moench][Gotthard][Ctb][Mythen3][Gotthard2][Xilinx\ \ 0.\n\t[Mythen3] Options: 8, 16, 32\n\t[Jungfrau][Moench][Ctb][Mythen3][Gotthard2][Xilinx\
\ Ctb] 16" \ Ctb] 16"
infer_action: true infer_action: true
template: true template: true
@ -2994,7 +2971,7 @@ exptime:
store_result_in_t: false store_result_in_t: false
command_name: exptime command_name: exptime
function_alias: exptime function_alias: exptime
help: "[duration] [(optional unit) ns|us|ms|s]\n\t[Eiger][Jungfrau][Moench][Gotthard][Gotthard2][Ctb][Xilinx\ help: "[duration] [(optional unit) ns|us|ms|s]\n\t[Eiger][Jungfrau][Moench][Gotthard2][Ctb][Xilinx\
\ Ctb] Exposure time\n\t[Mythen3] Exposure time of all gate signals in auto and\ \ Ctb] Exposure time\n\t[Mythen3] Exposure time of all gate signals in auto and\
\ trigger mode (internal gating). To specify gate index, use exptime1, exptime2,\ \ trigger mode (internal gating). To specify gate index, use exptime1, exptime2,\
\ exptime3." \ exptime3."
@ -3327,41 +3304,6 @@ exptime3:
\ mode (internal gating)." \ mode (internal gating)."
infer_action: true infer_action: true
template: true template: true
exptimel:
actions:
GET:
args:
- arg_types: []
argc: 0
cast_input: []
check_det_id: false
convert_det_id: true
function: getExptimeLeft
input: []
input_types: []
output:
- OutString(t)
require_det_id: true
store_result_in_t: true
- arg_types:
- special::time_unit
argc: 1
cast_input: []
check_det_id: false
convert_det_id: true
function: getExptimeLeft
input: []
input_types: []
output:
- OutString(t , args[0])
require_det_id: true
store_result_in_t: true
command_name: exptimel
function_alias: exptimel
help: "[(optional unit) ns|us|ms|s]\n\t[Gotthard] Exposure time left for current\
\ frame. "
infer_action: true
template: true
extrastoragecells: extrastoragecells:
actions: actions:
GET: GET:
@ -3531,9 +3473,8 @@ extsig:
store_result_in_t: false store_result_in_t: false
command_name: extsig command_name: extsig
function_alias: extsig function_alias: extsig
help: "[n_signal] [signal_type]\n\t[Gotthard][Mythen3] External signal mode for\ help: "[n_signal] [signal_type]\n\t[Mythen3] External signal mode for trigger timing\
\ trigger timing mode.\n\t[Gotthard] [0] [trigger_in_rising_edge|trigger_in_falling_edge]\n\ \ mode.\n\t[Mythen3] [0-7] [trigger_in_rising_edge|trigger_in_falling_edge|inversion_on|inversion_off]\n\
\t[Mythen3] [0-7] [trigger_in_rising_edge|trigger_in_falling_edge|inversion_on|inversion_off]\n\
\t where 0 is master input trigger signal, 1-3 is master input gate signals, 4\ \t where 0 is master input trigger signal, 1-3 is master input gate signals, 4\
\ is busy out signal and 5-7 is master output gate signals." \ is busy out signal and 5-7 is master output gate signals."
infer_action: true infer_action: true
@ -3714,8 +3655,8 @@ firmwaretest:
store_result_in_t: false store_result_in_t: false
command_name: firmwaretest command_name: firmwaretest
function_alias: firmwaretest function_alias: firmwaretest
help: "\n\t[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Firmware\ help: "\n\t[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Firmware test,\
\ test, ie. reads a read fixed pattern from a register." \ ie. reads a read fixed pattern from a register."
infer_action: true infer_action: true
template: true template: true
firmwareversion: firmwareversion:
@ -4075,8 +4016,8 @@ framesl:
store_result_in_t: true store_result_in_t: true
command_name: framesl command_name: framesl
function_alias: framesl function_alias: framesl
help: "\n\t[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number\ help: "\n\t[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number of frames\
\ of frames left in acquisition. \n\t[Gotthard2] only in continuous auto mode." \ left in acquisition. \n\t[Gotthard2] only in continuous auto mode."
infer_action: true infer_action: true
template: true template: true
frametime: frametime:
@ -4847,8 +4788,8 @@ highvoltage:
store_result_in_t: false store_result_in_t: false
command_name: highvoltage command_name: highvoltage
function_alias: highvoltage function_alias: highvoltage
help: "[n_value]\n\tHigh voltage to the sensor in Voltage. \n\t[Gotthard] [0|90|110|120|150|180|200]\ help: "[n_value]\n\tHigh voltage to the sensor in Voltage. \n\t[Eiger][Mythen3][Gotthard2]\
\ \n\t[Eiger][Mythen3][Gotthard2] 0-200 \n\t[Jungfrau][Moench][Ctb] [0|60-200]" \ 0-200 \n\t[Jungfrau][Moench][Ctb] [0|60-200]"
infer_action: true infer_action: true
template: true template: true
hostname: hostname:
@ -5041,10 +4982,8 @@ imagetest:
store_result_in_t: false store_result_in_t: false
command_name: imagetest command_name: imagetest
function_alias: imagetest function_alias: imagetest
help: "[0, 1]\n\t[Gotthard] 1 adds channel intensity with precalculated values when\ help: "[0, 1]\n\t[Eiger][Jungfrau][Moench] Only for Virtual servers. If 0, each\
\ taking an acquisition. Default is 0.\n\t[Eiger][Jungfrau][Moench] Only for Virtual\ \ pixel intensity incremented by 1. If 1, all pixels almost saturated."
\ servers. If 0, each pixel intensity incremented by 1. If 1, all pixels almost\
\ saturated."
infer_action: true infer_action: true
template: true template: true
initialchecks: initialchecks:
@ -5370,8 +5309,8 @@ master:
command_name: master command_name: master
function_alias: master function_alias: master
help: "[0, 1]\n\t[Eiger][Gotthard2][Jungfrau][Moench] Sets (half) module to master\ help: "[0, 1]\n\t[Eiger][Gotthard2][Jungfrau][Moench] Sets (half) module to master\
\ and other(s) to slaves.\n\t[Gotthard][Gotthard2][Mythen3][Eiger][Jungfrau][Moench]\ \ and other(s) to slaves.\n\t[Gotthard2][Mythen3][Eiger][Jungfrau][Moench] Gets\
\ Gets if the current (half) module is master." \ if the current (half) module is master."
infer_action: true infer_action: true
template: true template: true
maxadcphaseshift: maxadcphaseshift:
@ -7183,8 +7122,8 @@ periodl:
store_result_in_t: true store_result_in_t: true
command_name: periodl command_name: periodl
function_alias: periodl function_alias: periodl
help: "\n\t[Gotthard][Jungfrau][Moench][Ctb][Mythen3][Gotthard2][Xilinx Ctb] Period\ help: "\n\t[Jungfrau][Moench][Ctb][Mythen3][Gotthard2][Xilinx Ctb] Period left for\
\ left for current frame. \n\t[Gotthard2] only in continuous mode." \ current frame. \n\t[Gotthard2] only in continuous mode."
infer_action: true infer_action: true
template: true template: true
polarity: polarity:
@ -7920,8 +7859,8 @@ rebootcontroller:
store_result_in_t: false store_result_in_t: false
command_name: rebootcontroller command_name: rebootcontroller
function_alias: rebootcontroller function_alias: rebootcontroller
help: "\n\t[Jungfrau][Moench][Ctb][Gotthard][Mythen3][Gotthard2][Xilinx Ctb] Reboot\ help: "\n\t[Jungfrau][Moench][Ctb][Mythen3][Gotthard2][Xilinx Ctb] Reboot controller\
\ controller of detector." \ of detector."
infer_action: true infer_action: true
template: true template: true
reg: reg:
@ -8052,7 +7991,7 @@ resetdacs:
store_result_in_t: false store_result_in_t: false
command_name: resetdacs command_name: resetdacs
function_alias: resetdacs function_alias: resetdacs
help: "[(optional) hard] \n\t[Eiger][Jungfrau][Moench][Gotthard][Gotthard2][Mythen3]Reset\ help: "[(optional) hard] \n\t[Eiger][Jungfrau][Moench][Gotthard2][Mythen3]Reset\
\ dac values to the defaults. A 'hard' optional reset will reset the dacs to the\ \ dac values to the defaults. A 'hard' optional reset will reset the dacs to the\
\ hardcoded defaults in on-board detector server." \ hardcoded defaults in on-board detector server."
infer_action: true infer_action: true
@ -8077,54 +8016,6 @@ resetfpga:
help: "\n\t[Jungfrau][Moench][Ctb][Xilinx Ctb] Reset FPGA." help: "\n\t[Jungfrau][Moench][Ctb][Xilinx Ctb] Reset FPGA."
infer_action: true infer_action: true
template: true template: true
roi:
actions:
GET:
args:
- arg_types: []
argc: 0
cast_input: []
check_det_id: false
convert_det_id: true
function: getROI
input: []
input_types: []
output:
- t
require_det_id: true
store_result_in_t: true
PUT:
args:
- arg_types:
- int
- int
argc: 2
cast_input:
- false
check_det_id: false
convert_det_id: false
exceptions:
- condition: det_id == -1 && det->size() > 1
message: '"Cannot execute ROI at multi module level"'
extra_variables:
- name: t
type: defs::ROI
value: defs::ROI(StringTo<int>(args[0]), StringTo<int>(args[1]))
function: setROI
input:
- t
input_types:
- defs::ROI
output:
- t
require_det_id: true
store_result_in_t: false
command_name: roi
function_alias: roi
help: "[xmin] [xmax] \n\t[Gotthard] Region of interest in detector.\n\tOptions:\
\ Only a single ROI per module. \n\tEither all channels or a single adc or 2 chips\
\ (256 channels). Default is all channels enabled (-1 -1). "
infer_action: true
romode: romode:
actions: actions:
GET: GET:
@ -9651,8 +9542,7 @@ serialnumber:
store_result_in_t: true store_result_in_t: true
command_name: serialnumber command_name: serialnumber
function_alias: serialnumber function_alias: serialnumber
help: "\n\t[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb]\n\tSerial number\ help: "\n\t[Jungfrau][Moench][Mythen3][Gotthard2][Ctb]\n\tSerial number of detector."
\ of detector."
infer_action: true infer_action: true
template: true template: true
setbit: setbit:
@ -9767,13 +9657,11 @@ settings:
help: "[standard, fast, highgain, dynamicgain, lowgain, mediumgain, veryhighgain,\ help: "[standard, fast, highgain, dynamicgain, lowgain, mediumgain, veryhighgain,\
\ highgain0, fixgain1, fixgain2, forceswitchg1, forceswitchg2, verylowgain, g1_hg,\ \ highgain0, fixgain1, fixgain2, forceswitchg1, forceswitchg2, verylowgain, g1_hg,\
\ g1_lg, g2_hc_hg, g2_hc_lg, g2_lc_hg, g2_lc_lg, g4_hg, g4_lg, gain0]\n\t Detector\ \ g1_lg, g2_hc_hg, g2_hc_lg, g2_lc_hg, g2_lc_lg, g4_hg, g4_lg, gain0]\n\t Detector\
\ Settings\n\t[Jungfrau] - [ gain0 | highgain0]\n\t[Gotthard] - [dynamicgain |\ \ Settings\n\t[Jungfrau] - [ gain0 | highgain0]\n\t[Gotthard2] - [dynamicgain\
\ highgain | lowgain | mediumgain | veryhighgain]\n\t[Gotthard] Also loads default\ \ | fixgain1 | fixgain2]\n\t[Mythen3] - [standard | fast | highgain] Also changes\
\ dacs on to the detector.\n\t[Gotthard2] - [dynamicgain | fixgain1 | fixgain2]\n\ \ vrshaper and vrpreamp. \n\t[Eiger] Use threshold or thresholdnotb. \n\t[Eiger]\
\t[Mythen3] - [standard | fast | highgain] Also changes vrshaper and vrpreamp.\ \ threshold and settings loaded from file found in settingspath. \n\t[Moench]\
\ \n\t[Eiger] Use threshold or thresholdnotb. \n\t[Eiger] threshold and settings\ \ - [g1_hg | g1_lg | g2_hc_hg | g2_hc_lg | g2_lc_hg | g2_lc_lg | g4_hg | g4_lg]"
\ loaded from file found in settingspath. \n\t[Moench] - [g1_hg | g1_lg | g2_hc_hg\
\ | g2_hc_lg | g2_lc_hg | g2_lc_lg | g4_hg | g4_lg]"
infer_action: true infer_action: true
template: true template: true
settingslist: settingslist:
@ -10736,7 +10624,7 @@ temp_adc:
store_result_in_t: true store_result_in_t: true
command_name: temp_adc command_name: temp_adc
function_alias: temp_adc function_alias: temp_adc
help: "[n_value]\n\t[Jungfrau][Moench][Gotthard] ADC Temperature" help: "[n_value]\n\t[Jungfrau][Moench] ADC Temperature"
infer_action: true infer_action: true
template: true template: true
temp_control: temp_control:
@ -10872,8 +10760,8 @@ temp_fpga:
store_result_in_t: true store_result_in_t: true
command_name: temp_fpga command_name: temp_fpga
function_alias: temp_fpga function_alias: temp_fpga
help: "[n_value]\n\t[Eiger][Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Xilinx\ help: "[n_value]\n\t[Eiger][Jungfrau][Moench][Mythen3][Gotthard2][Xilinx CTB] FPGA\
\ CTB] FPGA Temperature" \ Temperature"
infer_action: true infer_action: true
template: true template: true
temp_fpgaext: temp_fpgaext:
@ -11344,8 +11232,8 @@ timing:
command_name: timing command_name: timing
function_alias: timing function_alias: timing
help: "[auto|trigger|gating|burst_trigger|trigger_gating]\n\tTiming Mode of detector.\n\ help: "[auto|trigger|gating|burst_trigger|trigger_gating]\n\tTiming Mode of detector.\n\
\t[Jungfrau][Moench][Gotthard][Ctb][Gotthard2][Xilinx Ctb] [auto|trigger]\n\t\ \t[Jungfrau][Moench][Ctb][Gotthard2][Xilinx Ctb] [auto|trigger]\n\t[Mythen3] [auto|trigger|gating|trigger_gating]\n\
[Mythen3] [auto|trigger|gating|trigger_gating]\n\t[Eiger] [auto|trigger|gating|burst_trigger]" \t[Eiger] [auto|trigger|gating|burst_trigger]"
infer_action: true infer_action: true
template: true template: true
timing_info_decoder: timing_info_decoder:
@ -11614,8 +11502,8 @@ triggersl:
store_result_in_t: true store_result_in_t: true
command_name: triggersl command_name: triggersl
function_alias: triggersl function_alias: triggersl
help: "\n\t[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number\ help: "\n\t[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number of triggers\
\ of triggers left in acquisition. Only when external trigger used." \ left in acquisition. Only when external trigger used."
infer_action: true infer_action: true
template: true template: true
trimbits: trimbits:
@ -11960,8 +11848,8 @@ type:
store_result_in_t: true store_result_in_t: true
command_name: type command_name: type
function_alias: type function_alias: type
help: "\n\tReturns detector type. Can be Eiger, Jungfrau, Gotthard, Moench, Mythen3,\ help: "\n\tReturns detector type. Can be Eiger, Jungfrau, Moench, Mythen3, Gotthard2,\
\ Gotthard2, ChipTestBoard, Xilinx_ChipTestBoard" \ ChipTestBoard, Xilinx_ChipTestBoard"
infer_action: true infer_action: true
template: true template: true
udp_cleardst: udp_cleardst:
@ -12569,11 +12457,11 @@ update:
command_name: update command_name: update
function_alias: update function_alias: update
help: "\n\tWithout tftp: [server_name (incl fullpath)] [fname.pof (incl full path)]\ help: "\n\tWithout tftp: [server_name (incl fullpath)] [fname.pof (incl full path)]\
\ This does not use tftp.\n\t\t[Jungfrau][Moench][Gotthard][Ctb] Updates the firmware,\ \ This does not use tftp.\n\t\t[Jungfrau][Moench][Ctb] Updates the firmware, detector\
\ detector server, deletes old server, creates the symbolic link and then reboots\ \ server, deletes old server, creates the symbolic link and then reboots detector\
\ detector controller. \n\t\t[Mythen3][Gotthard2] will require a script to start\ \ controller. \n\t\t[Mythen3][Gotthard2] will require a script to start up the\
\ up the shorter named server link at start up. \n\t\tserver_name is full path\ \ shorter named server link at start up. \n\t\tserver_name is full path name of\
\ name of detector server binary\n\t\tfname is full path of programming file" \ detector server binary\n\t\tfname is full path of programming file"
infer_action: true infer_action: true
updatedetectorserver: updatedetectorserver:
actions: actions:

View File

@ -4,10 +4,36 @@ used to generate C++ cli commands. and bash autocompletion scripts.
### Overview ### Overview
If any changes to enums in slsDetectorDefs
```sh
# to generate the dump.json file
cd slsSupportLib/src
clang++ -Xclang -ast-dump=json -Xclang -ast-dump-filter -Xclang StringTo -c ToString.cpp -I ../include/ -std=gnu++11 > ../../slsDetectorSoftware/generator/autocomplete/dump.json
cd ../../slsDetectorSoftware/generator/autocomplete
python autocomplete.py -f
```
To Generate command line commands
```sh
python gen_commands.py -pgf
```
To generate autocomplete
```sh
python gen_commands.py -agf
source bash_autocomplete.sh
```
Always clang-format at the end
```sh
cd slsDetectorPackage/build
make format
```
### Details
Looks through the `dump.json` file for the different values of an enum and stores them in the dictionary `type_values`. Looks through the `dump.json` file for the different values of an enum and stores them in the dictionary `type_values`.
```sh ```sh
# To print the different values for enums # To print the different values for enums
python gen_commands.py -a python gen_commands.py -a
``` ```
also the autocomplete.py generates shell autocompletion scripts for both bash and zsh. It uses the template file `bash_autocomplete.in.sh` and adds the necessary code in an output file `bash_autocomplete.sh` (same for zsh). also the autocomplete.py generates shell autocompletion scripts for both bash and zsh. It uses the template file `bash_autocomplete.in.sh` and adds the necessary code in an output file `bash_autocomplete.sh` (same for zsh).
@ -29,6 +55,8 @@ The dump.json is the AST of the file `slsDetectorPackage/slsSupportLib/src/ToStr
# to generate the dump.json file # to generate the dump.json file
cd slsSupportLib/src cd slsSupportLib/src
clang++ -Xclang -ast-dump=json -Xclang -ast-dump-filter -Xclang StringTo -c ToString.cpp -I ../include/ -std=gnu++11 > ../../slsDetectorSoftware/generator/autocomplete/dump.json clang++ -Xclang -ast-dump=json -Xclang -ast-dump-filter -Xclang StringTo -c ToString.cpp -I ../include/ -std=gnu++11 > ../../slsDetectorSoftware/generator/autocomplete/dump.json
cd ../../slsDetectorSoftware/generator/autocomplete
python autocomplete.py -f
# clang version used: 14.0.0-1ubuntu1.1 # clang version used: 14.0.0-1ubuntu1.1
``` ```

View File

@ -97,7 +97,7 @@ class Detector {
Result<std::string> getKernelVersion(Positions pos = {}) const; Result<std::string> getKernelVersion(Positions pos = {}) const;
/* [Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][CTB] */ /* [Jungfrau][Moench][Mythen3][Gotthard2][CTB] */
Result<int64_t> getSerialNumber(Positions pos = {}) const; Result<int64_t> getSerialNumber(Positions pos = {}) const;
/** [Eiger][Gotthard2][Mythen3][Jungfrau][Moench] 6 bit value (ideally /** [Eiger][Gotthard2][Mythen3][Jungfrau][Moench] 6 bit value (ideally
@ -106,7 +106,7 @@ class Detector {
Result<std::string> getReceiverVersion(Positions pos = {}) const; Result<std::string> getReceiverVersion(Positions pos = {}) const;
/** Options: EIGER, JUNGFRAU, GOTTHARD, MOENCH, MYTHEN3, GOTTHARD2, /** Options: EIGER, JUNGFRAU, MOENCH, MYTHEN3, GOTTHARD2,
* CHIPTESTBOARD, XILINX_CHIPTESTBOARD */ * CHIPTESTBOARD, XILINX_CHIPTESTBOARD */
Result<defs::detectorType> getDetectorType(Positions pos = {}) const; Result<defs::detectorType> getDetectorType(Positions pos = {}) const;
@ -134,10 +134,10 @@ class Detector {
/** list of possible settings for this detector */ /** list of possible settings for this detector */
std::vector<defs::detectorSettings> getSettingsList() const; std::vector<defs::detectorSettings> getSettingsList() const;
/** [Jungfrau][Moench][Gotthard][Gotthard2][Mythen3] */ /** [Jungfrau][Moench][Gotthard2][Mythen3] */
Result<defs::detectorSettings> getSettings(Positions pos = {}) const; Result<defs::detectorSettings> getSettings(Positions pos = {}) const;
/** [Jungfrau] GAIN0, HIGHGAIN0 \n [Gotthard] DYNAMICGAIN, HIGHGAIN, /** [Jungfrau] GAIN0, HIGHGAIN0 \n DYNAMICGAIN, HIGHGAIN,
* LOWGAIN, MEDIUMGAIN, VERYHIGHGAIN \n [Gotthard2] DYNAMICGAIN, * LOWGAIN, MEDIUMGAIN, VERYHIGHGAIN \n [Gotthard2] DYNAMICGAIN,
* FIXGAIN1, FIXGAIN2 \n [Mythen3] STANDARD, FAST, * FIXGAIN1, FIXGAIN2 \n [Mythen3] STANDARD, FAST,
* HIGHGAIN. Also changes vrshaper and vrpreamp \n [Eiger] Use threshold * HIGHGAIN. Also changes vrshaper and vrpreamp \n [Eiger] Use threshold
@ -312,11 +312,11 @@ class Detector {
void setNumberOfTriggers(int64_t value); void setNumberOfTriggers(int64_t value);
/** [Gotthard][Jungfrau][Moench][Eiger][CTB][Xilinx CTB][Gotthard2] \n /** [Jungfrau][Moench][Eiger][CTB][Xilinx CTB][Gotthard2] \n
* [Mythen3] use function with gate index **/ * [Mythen3] use function with gate index **/
Result<ns> getExptime(Positions pos = {}) const; Result<ns> getExptime(Positions pos = {}) const;
/** [Gotthard][Jungfrau][Moench][Eiger][CTB][Xilinx CTB][Gotthard2] \n /** [Jungfrau][Moench][Eiger][CTB][Xilinx CTB][Gotthard2] \n
* [Mythen3] sets exptime for all gate signals. To specify gate index, use * [Mythen3] sets exptime for all gate signals. To specify gate index, use
* function with gate index **/ * function with gate index **/
void setExptime(ns t, Positions pos = {}); void setExptime(ns t, Positions pos = {});
@ -325,25 +325,25 @@ class Detector {
void setPeriod(ns t, Positions pos = {}); void setPeriod(ns t, Positions pos = {});
/** [Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2][Xilinx CTB] */ /** [Jungfrau][Moench][CTB][Mythen3][Gotthard2][Xilinx CTB] */
Result<ns> getDelayAfterTrigger(Positions pos = {}) const; Result<ns> getDelayAfterTrigger(Positions pos = {}) const;
/** [Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2][Xilinx CTB] */ /** [Jungfrau][Moench][CTB][Mythen3][Gotthard2][Xilinx CTB] */
void setDelayAfterTrigger(ns value, Positions pos = {}); void setDelayAfterTrigger(ns value, Positions pos = {});
/** [Gotthard][Jungfrau][Moench][CTB][Mythen3][Xilinx CTB] /** [Jungfrau][Moench][CTB][Mythen3][Xilinx CTB]
* [Gotthard2] only in continuous auto mode */ * [Gotthard2] only in continuous auto mode */
Result<int64_t> getNumberOfFramesLeft(Positions pos = {}) const; Result<int64_t> getNumberOfFramesLeft(Positions pos = {}) const;
/** [Gotthard][Jungfrau][Moench][CTB][Mythen3][Xilinx CTB] /** [Jungfrau][Moench][CTB][Mythen3][Xilinx CTB]
* Only when external trigger used */ * Only when external trigger used */
Result<int64_t> getNumberOfTriggersLeft(Positions pos = {}) const; Result<int64_t> getNumberOfTriggersLeft(Positions pos = {}) const;
/** [Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2][Xilinx CTB] /** [Jungfrau][Moench][CTB][Mythen3][Gotthard2][Xilinx CTB]
* [Gotthard2] only in continuous mode */ * [Gotthard2] only in continuous mode */
Result<ns> getPeriodLeft(Positions pos = {}) const; Result<ns> getPeriodLeft(Positions pos = {}) const;
/** [Gotthard][Jungfrau][Moench][CTB][Mythen3][Xilinx CTB] /** [Jungfrau][Moench][CTB][Mythen3][Xilinx CTB]
* [Gotthard2] only in continuous mode */ * [Gotthard2] only in continuous mode */
Result<ns> getDelayAfterTriggerLeft(Positions pos = {}) const; Result<ns> getDelayAfterTriggerLeft(Positions pos = {}) const;
@ -352,7 +352,7 @@ class Detector {
/** /**
* [Eiger] Options: 4, 8, 12, 16, 32. If i is 32, also sets clkdivider to 2, * [Eiger] Options: 4, 8, 12, 16, 32. If i is 32, also sets clkdivider to 2,
* else sets clkdivider to 1 \n [Mythen3] Options: 8, 16, 32 \n * else sets clkdivider to 1 \n [Mythen3] Options: 8, 16, 32 \n
* [Jungfrau][Moench][Gotthard][CTB][Mythen3][Gotthard2][Xilinx CTB] 16 * [Jungfrau][Moench][CTB][Mythen3][Gotthard2][Xilinx CTB] 16
*/ */
void setDynamicRange(int value); void setDynamicRange(int value);
@ -362,7 +362,7 @@ class Detector {
Result<defs::timingMode> getTimingMode(Positions pos = {}) const; Result<defs::timingMode> getTimingMode(Positions pos = {}) const;
/** /**
* [Gotthard][Jungfrau][Moench][Gotthard][CTB][Gotthard2][Xilinx CTB] * [Jungfrau][Moench][CTB][Gotthard2][Xilinx CTB]
* Options: AUTO_TIMING, TRIGGER_EXPOSURE \n [Mythen3] Options: AUTO_TIMING, * Options: AUTO_TIMING, TRIGGER_EXPOSURE \n [Mythen3] Options: AUTO_TIMING,
* TRIGGER_EXPOSURE, GATED, TRIGGER_GATED \n [Eiger] Options: AUTO_TIMING, * TRIGGER_EXPOSURE, GATED, TRIGGER_GATED \n [Eiger] Options: AUTO_TIMING,
* TRIGGER_EXPOSURE, GATED, BURST_TRIGGER * TRIGGER_EXPOSURE, GATED, BURST_TRIGGER
@ -391,25 +391,23 @@ class Detector {
/** [Jungfrau][Moench][CTB] */ /** [Jungfrau][Moench][CTB] */
Result<int> getADCPhase(Positions pos = {}) const; Result<int> getADCPhase(Positions pos = {}) const;
/** [Gotthard][Jungfrau][Moench][CTB] /** [Jungfrau][Moench][CTB]
* [Jungfrau][Moench] Absolute phase shift. Changing Speed also resets * [Jungfrau][Moench] Absolute phase shift. Changing Speed also resets
* adcphase to recommended defaults. \n [Ctb] Absolute phase shift. Changing * adcphase to recommended defaults. \n [Ctb] Absolute phase shift. Changing
* adcclk also resets adcphase and sets it to previous values. \n [Gotthard] * adcclk also resets adcphase and sets it to previous values.
* Relative phase shift
*/ */
void setADCPhase(int value, Positions pos = {}); void setADCPhase(int value, Positions pos = {});
/** [Jungfrau][Moench][CTB] */ /** [Jungfrau][Moench][CTB] */
Result<int> getMaxADCPhaseShift(Positions pos = {}) const; Result<int> getMaxADCPhaseShift(Positions pos = {}) const;
/** [Gotthard][Jungfrau][Moench][CTB] */ /** [Jungfrau][Moench][CTB] */
Result<int> getADCPhaseInDegrees(Positions pos = {}) const; Result<int> getADCPhaseInDegrees(Positions pos = {}) const;
/** [Gotthard][Jungfrau][Moench][CTB] /** [Jungfrau][Moench][CTB]
* [Jungfrau][Moench] Absolute phase shift. Changing Speed also resets * [Jungfrau][Moench] Absolute phase shift. Changing Speed also resets
* adcphase to recommended defaults. \n [Ctb] Absolute phase shift. Changing * adcphase to recommended defaults. \n [Ctb] Absolute phase shift. Changing
* adcclk also resets adcphase and sets it to previous values. \n [Gotthard] * adcclk also resets adcphase and sets it to previous values.
* Relative phase shift
*/ */
void setADCPhaseInDegrees(int value, Positions pos = {}); void setADCPhaseInDegrees(int value, Positions pos = {});
@ -462,7 +460,6 @@ class Detector {
Result<int> getHighVoltage(Positions pos = {}) const; Result<int> getHighVoltage(Positions pos = {}) const;
/** /**
* [Gotthard] Options: 0, 90, 110, 120, 150, 180, 200
* [Jungfrau][Moench][CTB] Options: 0, 60 - 200 * [Jungfrau][Moench][CTB] Options: 0, 60 - 200
* [Eiger][Mythen3][Gotthard2] Options: 0 - 200 * [Eiger][Mythen3][Gotthard2] Options: 0 - 200
*/ */
@ -482,11 +479,10 @@ class Detector {
*/ */
void setPowerChip(bool on, Positions pos = {}); void setPowerChip(bool on, Positions pos = {});
/** [Gotthard][Eiger virtual] */ /** [Eiger virtual] */
Result<int> getImageTestMode(Positions pos = {}); Result<int> getImageTestMode(Positions pos = {});
/** [Gotthard] If 1, adds channel intensity with precalculated values. /**
* Default is 0 \n
* [Eiger][Jungfrau][Moench] Only for virtual servers, if 1, pixels are * [Eiger][Jungfrau][Moench] Only for virtual servers, if 1, pixels are
* saturated. If 0, increasing intensity */ * saturated. If 0, increasing intensity */
void setImageTestMode(const int value, Positions pos = {}); void setImageTestMode(const int value, Positions pos = {});
@ -497,7 +493,6 @@ class Detector {
/** /**
* (Degrees) * (Degrees)
* [Mythen3][Gotthard2][Xilinx Ctb] Options: TEMPERATURE_FPGA * [Mythen3][Gotthard2][Xilinx Ctb] Options: TEMPERATURE_FPGA
* [Gotthard] Options: TEMPERATURE_ADC, TEMPERATURE_FPGA \n
* [Jungfrau][Moench] Options: TEMPERATURE_ADC, TEMPERATURE_FPGA \n * [Jungfrau][Moench] Options: TEMPERATURE_ADC, TEMPERATURE_FPGA \n
* [Eiger] Options: TEMPERATURE_FPGA, TEMPERATURE_FPGAEXT, TEMPERATURE_10GE, * [Eiger] Options: TEMPERATURE_FPGA, TEMPERATURE_FPGAEXT, TEMPERATURE_10GE,
* TEMPERATURE_DCDC, TEMPERATURE_SODL, TEMPERATURE_SODR, TEMPERATURE_FPGA2, * TEMPERATURE_DCDC, TEMPERATURE_SODL, TEMPERATURE_SODR, TEMPERATURE_FPGA2,
@ -508,10 +503,10 @@ class Detector {
/** gets list of dac enums for this detector */ /** gets list of dac enums for this detector */
std::vector<defs::dacIndex> getDacList() const; std::vector<defs::dacIndex> getDacList() const;
/** [Eiger][Jungfrau][Moench][Gotthard][Gotthard2][Mythen3] */ /** [Eiger][Jungfrau][Moench][Gotthard2][Mythen3] */
Result<int> getDefaultDac(defs::dacIndex index, Positions pos = {}); Result<int> getDefaultDac(defs::dacIndex index, Positions pos = {});
/** [Eiger][Jungfrau][Moench][Gotthard][Gotthard2][Mythen3] */ /** [Eiger][Jungfrau][Moench][Gotthard2][Mythen3] */
void setDefaultDac(defs::dacIndex index, int defaultValue, void setDefaultDac(defs::dacIndex index, int defaultValue,
Positions pos = {}); Positions pos = {});
@ -523,7 +518,7 @@ class Detector {
void setDefaultDac(defs::dacIndex index, int defaultValue, void setDefaultDac(defs::dacIndex index, int defaultValue,
defs::detectorSettings sett, Positions pos = {}); defs::detectorSettings sett, Positions pos = {});
/** [Eiger][Jungfrau][Moench][Gotthard][Gotthard2][Mythen3] /** [Eiger][Jungfrau][Moench][Gotthard2][Mythen3]
reset to defaults, hardReset will reset to hardcoded defaults on on-board reset to defaults, hardReset will reset to hardcoded defaults on on-board
server */ server */
void resetToDefaultDacs(const bool hardReset, Positions pos = {}); void resetToDefaultDacs(const bool hardReset, Positions pos = {});
@ -542,13 +537,12 @@ class Detector {
void setOnChipDAC(defs::dacIndex index, int chipIndex, int value, void setOnChipDAC(defs::dacIndex index, int chipIndex, int value,
Positions pos = {}); Positions pos = {});
/** [Gotthard] signal index is 0 /** [Mythen3] signal index 0-3 for master input, 4-7 master output signals
* [Mythen3] signal index 0-3 for master input, 4-7 master output signals */ */
Result<defs::externalSignalFlag> Result<defs::externalSignalFlag>
getExternalSignalFlags(int signalIndex, Positions pos = {}) const; getExternalSignalFlags(int signalIndex, Positions pos = {}) const;
/** [Gotthard] signal index is 0 /**
* Options: TRIGGER_IN_RISING_EDGE, TRIGGER_IN_FALLING_EDGE
* [Mythen3] signal index 0 is master input trigger signal, 1-3 for master * [Mythen3] signal index 0 is master input trigger signal, 1-3 for master
* input gate signals, 4 is busy out signal, 5-7 is master output gate * input gate signals, 4 is busy out signal, 5-7 is master output gate
* signals. * signals.
@ -1397,33 +1391,6 @@ class Detector {
///@} ///@}
/** @name Gotthard Specific */
///@{
/**************************************************
* *
* Gotthard Specific *
* *
* ************************************************/
/** [Gotthard]*/
Result<defs::ROI> getROI(Positions pos = {}) const;
/**
* [Gotthard] Region of interest in detector \n
* Options: Only a single ROI per module \n
* Either all channels or a single adc or 2 chips (256 channels). Default is
* all channels enabled (-1 -1). \n module_id is position index
*/
void setROI(defs::ROI value, int module_id);
/** [Gotthard] Clear ROI to all channels enabled. Default is all channels
* enabled. */
void clearROI(Positions pos = {});
/** [Gotthard] */
Result<ns> getExptimeLeft(Positions pos = {}) const;
///@}
/** @name Gotthard2 Specific */ /** @name Gotthard2 Specific */
///@{ ///@{
/************************************************** /**************************************************
@ -2006,7 +1973,7 @@ class Detector {
/** [CTB][Moench] */ /** [CTB][Moench] */
void setADCPipeline(int value, Positions pos = {}); void setADCPipeline(int value, Positions pos = {});
/** [Jungfrau][Moench][Gotthard][CTB][Mythen3][Gotthard2] /** [Jungfrau][Moench][CTB][Mythen3][Gotthard2]
* Advanced user Function! * Advanced user Function!
* Program firmware from command line, after which detector controller is * Program firmware from command line, after which detector controller is
* rebooted. forceDeleteNormalFile is true, if normal file found * rebooted. forceDeleteNormalFile is true, if normal file found
@ -2035,12 +2002,12 @@ class Detector {
*/ */
void updateKernel(const std::string &fname, Positions pos = {}); void updateKernel(const std::string &fname, Positions pos = {});
/** [Jungfrau][Moench][Gotthard][CTB][Mythen3][Gotthard2][Xilinx CTB] /** [Jungfrau][Moench][CTB][Mythen3][Gotthard2][Xilinx CTB]
* Advanced user Function! */ * Advanced user Function! */
void rebootController(Positions pos = {}); void rebootController(Positions pos = {});
/** /**
* Advanced user Function!\n [Jungfrau][Moench][Gotthard][CTB] Updates the * Advanced user Function!\n [Jungfrau][Moench][CTB] Updates the
* firmware, detector server, make a soft link and then reboots detector * firmware, detector server, make a soft link and then reboots detector
* controller. \n [Mythen3][Gotthard2] Will require a script to start up the * controller. \n [Mythen3][Gotthard2] Will require a script to start up the
* shorter named server link at start up \n sname is full path name of * shorter named server link at start up \n sname is full path name of
@ -2080,16 +2047,16 @@ class Detector {
/** Advanced user Function! */ /** Advanced user Function! */
Result<int> getBit(uint32_t addr, int bitnr, Positions pos = {}); Result<int> getBit(uint32_t addr, int bitnr, Positions pos = {});
/** [Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][CTB] Advanced user /** [Jungfrau][Moench][Mythen3][Gotthard2][CTB] Advanced user
* Function! */ * Function! */
void executeFirmwareTest(Positions pos = {}); void executeFirmwareTest(Positions pos = {});
/** [Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][CTB] Advanced user /** [Jungfrau][Moench][Mythen3][Gotthard2][CTB] Advanced user
* Function! Writes different values in a R/W register and confirms the * Function! Writes different values in a R/W register and confirms the
* writes to check bus */ * writes to check bus */
void executeBusTest(Positions pos = {}); void executeBusTest(Positions pos = {});
/** [Gotthard][Jungfrau][Moench][CTB] Advanced user Function! not possible /** [Jungfrau][Moench][CTB] Advanced user Function! not possible
* to read back */ * to read back */
void writeAdcRegister(uint32_t addr, uint32_t value, Positions pos = {}); void writeAdcRegister(uint32_t addr, uint32_t value, Positions pos = {});

View File

@ -532,10 +532,9 @@ std::string Caller::adcphase(int action) {
// print help // print help
if (action == slsDetectorDefs::HELP_ACTION) { if (action == slsDetectorDefs::HELP_ACTION) {
os << R"V0G0N([n_value] [(optional)deg] os << R"V0G0N([n_value] [(optional)deg]
[Jungfrau][Moench][Ctb][Gotthard] Phase shift of ADC clock. [Jungfrau][Moench][Ctb] Phase shift of ADC clock.
[Jungfrau][Moench] Absolute phase shift. If deg used, then shift in degrees. Changing Speed also resets adcphase to recommended defaults. [Jungfrau][Moench] Absolute phase shift. If deg used, then shift in degrees. Changing Speed also resets adcphase to recommended defaults.
[Ctb] Absolute phase shift. If deg used, then shift in degrees. Changing adcclk also resets adcphase and sets it to previous values. [Ctb] Absolute phase shift. If deg used, then shift in degrees. Changing adcclk also resets adcphase and sets it to previous values. )V0G0N"
[Gotthard] Relative phase shift. Cannot get )V0G0N"
<< std::endl; << std::endl;
return os.str(); return os.str();
} }
@ -725,7 +724,7 @@ std::string Caller::adcreg(int action) {
// print help // print help
if (action == slsDetectorDefs::HELP_ACTION) { if (action == slsDetectorDefs::HELP_ACTION) {
os << R"V0G0N([address] [value] os << R"V0G0N([address] [value]
[Jungfrau][Moench][Ctb][Gotthard] Writes to an adc register in hex. Advanced user Function! )V0G0N" [Jungfrau][Moench][Ctb] Writes to an adc register in hex. Advanced user Function! )V0G0N"
<< std::endl; << std::endl;
return os.str(); return os.str();
} }
@ -1318,7 +1317,7 @@ std::string Caller::bustest(int action) {
// print help // print help
if (action == slsDetectorDefs::HELP_ACTION) { if (action == slsDetectorDefs::HELP_ACTION) {
os << R"V0G0N( os << R"V0G0N(
[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb] Bus test, ie. Writes different values in a R/W register and confirms the writes to check bus. [Jungfrau][Moench][Mythen3][Gotthard2][Ctb] Bus test, ie. Writes different values in a R/W register and confirms the writes to check bus.
Advanced User function! )V0G0N" Advanced User function! )V0G0N"
<< std::endl; << std::endl;
return os.str(); return os.str();
@ -1589,45 +1588,6 @@ std::string Caller::clearbusy(int action) {
return os.str(); return os.str();
} }
std::string Caller::clearroi(int action) {
std::ostringstream os;
// print help
if (action == slsDetectorDefs::HELP_ACTION) {
os << R"V0G0N(
[Gotthard] Resets Region of interest in detector. All channels enabled. Default is all channels enabled. )V0G0N"
<< std::endl;
return os.str();
}
// check if action and arguments are valid
if (action == slsDetectorDefs::PUT_ACTION) {
if (1 && args.size() != 0) {
throw RuntimeError("Wrong number of arguments for action PUT");
}
if (args.size() == 0) {
}
}
else {
throw RuntimeError(
"INTERNAL ERROR: Invalid action: supported actions are ['PUT']");
}
// generate code for each action
if (action == slsDetectorDefs::PUT_ACTION) {
if (args.size() == 0) {
det->clearROI(std::vector<int>{det_id});
os << "successful" << '\n';
}
}
return os.str();
}
std::string Caller::clientversion(int action) { std::string Caller::clientversion(int action) {
std::ostringstream os; std::ostringstream os;
@ -3266,7 +3226,7 @@ std::string Caller::delay(int action) {
// print help // print help
if (action == slsDetectorDefs::HELP_ACTION) { if (action == slsDetectorDefs::HELP_ACTION) {
os << R"V0G0N([duration] [(optional unit) ns|us|ms|s] os << R"V0G0N([duration] [(optional unit) ns|us|ms|s]
[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb][Moench][Xilinx Ctb] Delay after trigger )V0G0N" [Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Moench][Xilinx Ctb] Delay after trigger )V0G0N"
<< std::endl; << std::endl;
return os.str(); return os.str();
} }
@ -3354,7 +3314,7 @@ std::string Caller::delayl(int action) {
// print help // print help
if (action == slsDetectorDefs::HELP_ACTION) { if (action == slsDetectorDefs::HELP_ACTION) {
os << R"V0G0N( os << R"V0G0N(
[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Delay Left in Acquisition. [Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Delay Left in Acquisition.
[Gotthard2] only in continuous mode. )V0G0N" [Gotthard2] only in continuous mode. )V0G0N"
<< std::endl; << std::endl;
return os.str(); return os.str();
@ -3615,7 +3575,7 @@ std::string Caller::dr(int action) {
Dynamic Range or number of bits per pixel in detector. Dynamic Range or number of bits per pixel in detector.
[Eiger] Options: 4, 8, 12, 16, 32. If set to 32, also sets clkdivider to 2, else to 0. [Eiger] Options: 4, 8, 12, 16, 32. If set to 32, also sets clkdivider to 2, else to 0.
[Mythen3] Options: 8, 16, 32 [Mythen3] Options: 8, 16, 32
[Jungfrau][Moench][Gotthard][Ctb][Mythen3][Gotthard2][Xilinx Ctb] 16 )V0G0N" [Jungfrau][Moench][Ctb][Mythen3][Gotthard2][Xilinx Ctb] 16 )V0G0N"
<< std::endl; << std::endl;
return os.str(); return os.str();
} }
@ -3781,7 +3741,7 @@ std::string Caller::exptime(int action) {
// print help // print help
if (action == slsDetectorDefs::HELP_ACTION) { if (action == slsDetectorDefs::HELP_ACTION) {
os << R"V0G0N([duration] [(optional unit) ns|us|ms|s] os << R"V0G0N([duration] [(optional unit) ns|us|ms|s]
[Eiger][Jungfrau][Moench][Gotthard][Gotthard2][Ctb][Xilinx Ctb] Exposure time [Eiger][Jungfrau][Moench][Gotthard2][Ctb][Xilinx Ctb] Exposure time
[Mythen3] Exposure time of all gate signals in auto and trigger mode (internal gating). To specify gate index, use exptime1, exptime2, exptime3. )V0G0N" [Mythen3] Exposure time of all gate signals in auto and trigger mode (internal gating). To specify gate index, use exptime1, exptime2, exptime3. )V0G0N"
<< std::endl; << std::endl;
return os.str(); return os.str();
@ -4175,53 +4135,6 @@ std::string Caller::exptime3(int action) {
return os.str(); return os.str();
} }
std::string Caller::exptimel(int action) {
std::ostringstream os;
// print help
if (action == slsDetectorDefs::HELP_ACTION) {
os << R"V0G0N([(optional unit) ns|us|ms|s]
[Gotthard] Exposure time left for current frame. )V0G0N"
<< std::endl;
return os.str();
}
// check if action and arguments are valid
if (action == slsDetectorDefs::GET_ACTION) {
if (1 && args.size() != 0 && args.size() != 1) {
throw RuntimeError("Wrong number of arguments for action GET");
}
if (args.size() == 0) {
}
if (args.size() == 1) {
}
}
else {
throw RuntimeError(
"INTERNAL ERROR: Invalid action: supported actions are ['GET']");
}
// generate code for each action
if (action == slsDetectorDefs::GET_ACTION) {
if (args.size() == 0) {
auto t = det->getExptimeLeft(std::vector<int>{det_id});
os << OutString(t) << '\n';
}
if (args.size() == 1) {
auto t = det->getExptimeLeft(std::vector<int>{det_id});
os << OutString(t, args[0]) << '\n';
}
}
return os.str();
}
std::string Caller::extrastoragecells(int action) { std::string Caller::extrastoragecells(int action) {
std::ostringstream os; std::ostringstream os;
@ -4420,8 +4333,7 @@ std::string Caller::extsig(int action) {
// print help // print help
if (action == slsDetectorDefs::HELP_ACTION) { if (action == slsDetectorDefs::HELP_ACTION) {
os << R"V0G0N([n_signal] [signal_type] os << R"V0G0N([n_signal] [signal_type]
[Gotthard][Mythen3] External signal mode for trigger timing mode. [Mythen3] External signal mode for trigger timing mode.
[Gotthard] [0] [trigger_in_rising_edge|trigger_in_falling_edge]
[Mythen3] [0-7] [trigger_in_rising_edge|trigger_in_falling_edge|inversion_on|inversion_off] [Mythen3] [0-7] [trigger_in_rising_edge|trigger_in_falling_edge|inversion_on|inversion_off]
where 0 is master input trigger signal, 1-3 is master input gate signals, 4 is busy out signal and 5-7 is master output gate signals. )V0G0N" where 0 is master input trigger signal, 1-3 is master input gate signals, 4 is busy out signal and 5-7 is master output gate signals. )V0G0N"
<< std::endl; << std::endl;
@ -4749,7 +4661,7 @@ std::string Caller::firmwaretest(int action) {
// print help // print help
if (action == slsDetectorDefs::HELP_ACTION) { if (action == slsDetectorDefs::HELP_ACTION) {
os << R"V0G0N( os << R"V0G0N(
[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Firmware test, ie. reads a read fixed pattern from a register. )V0G0N" [Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Firmware test, ie. reads a read fixed pattern from a register. )V0G0N"
<< std::endl; << std::endl;
return os.str(); return os.str();
} }
@ -5315,7 +5227,7 @@ std::string Caller::framesl(int action) {
// print help // print help
if (action == slsDetectorDefs::HELP_ACTION) { if (action == slsDetectorDefs::HELP_ACTION) {
os << R"V0G0N( os << R"V0G0N(
[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number of frames left in acquisition. [Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number of frames left in acquisition.
[Gotthard2] only in continuous auto mode. )V0G0N" [Gotthard2] only in continuous auto mode. )V0G0N"
<< std::endl; << std::endl;
return os.str(); return os.str();
@ -6142,7 +6054,6 @@ std::string Caller::highvoltage(int action) {
if (action == slsDetectorDefs::HELP_ACTION) { if (action == slsDetectorDefs::HELP_ACTION) {
os << R"V0G0N([n_value] os << R"V0G0N([n_value]
High voltage to the sensor in Voltage. High voltage to the sensor in Voltage.
[Gotthard] [0|90|110|120|150|180|200]
[Eiger][Mythen3][Gotthard2] 0-200 [Eiger][Mythen3][Gotthard2] 0-200
[Jungfrau][Moench][Ctb] [0|60-200] )V0G0N" [Jungfrau][Moench][Ctb] [0|60-200] )V0G0N"
<< std::endl; << std::endl;
@ -6406,7 +6317,6 @@ std::string Caller::imagetest(int action) {
// print help // print help
if (action == slsDetectorDefs::HELP_ACTION) { if (action == slsDetectorDefs::HELP_ACTION) {
os << R"V0G0N([0, 1] os << R"V0G0N([0, 1]
[Gotthard] 1 adds channel intensity with precalculated values when taking an acquisition. Default is 0.
[Eiger][Jungfrau][Moench] Only for Virtual servers. If 0, each pixel intensity incremented by 1. If 1, all pixels almost saturated. )V0G0N" [Eiger][Jungfrau][Moench] Only for Virtual servers. If 0, each pixel intensity incremented by 1. If 1, all pixels almost saturated. )V0G0N"
<< std::endl; << std::endl;
return os.str(); return os.str();
@ -6935,7 +6845,7 @@ std::string Caller::master(int action) {
if (action == slsDetectorDefs::HELP_ACTION) { if (action == slsDetectorDefs::HELP_ACTION) {
os << R"V0G0N([0, 1] os << R"V0G0N([0, 1]
[Eiger][Gotthard2][Jungfrau][Moench] Sets (half) module to master and other(s) to slaves. [Eiger][Gotthard2][Jungfrau][Moench] Sets (half) module to master and other(s) to slaves.
[Gotthard][Gotthard2][Mythen3][Eiger][Jungfrau][Moench] Gets if the current (half) module is master. )V0G0N" [Gotthard2][Mythen3][Eiger][Jungfrau][Moench] Gets if the current (half) module is master. )V0G0N"
<< std::endl; << std::endl;
return os.str(); return os.str();
} }
@ -9078,7 +8988,7 @@ std::string Caller::periodl(int action) {
// print help // print help
if (action == slsDetectorDefs::HELP_ACTION) { if (action == slsDetectorDefs::HELP_ACTION) {
os << R"V0G0N( os << R"V0G0N(
[Gotthard][Jungfrau][Moench][Ctb][Mythen3][Gotthard2][Xilinx Ctb] Period left for current frame. [Jungfrau][Moench][Ctb][Mythen3][Gotthard2][Xilinx Ctb] Period left for current frame.
[Gotthard2] only in continuous mode. )V0G0N" [Gotthard2] only in continuous mode. )V0G0N"
<< std::endl; << std::endl;
return os.str(); return os.str();
@ -10151,7 +10061,7 @@ std::string Caller::rebootcontroller(int action) {
// print help // print help
if (action == slsDetectorDefs::HELP_ACTION) { if (action == slsDetectorDefs::HELP_ACTION) {
os << R"V0G0N( os << R"V0G0N(
[Jungfrau][Moench][Ctb][Gotthard][Mythen3][Gotthard2][Xilinx Ctb] Reboot controller of detector. )V0G0N" [Jungfrau][Moench][Ctb][Mythen3][Gotthard2][Xilinx Ctb] Reboot controller of detector. )V0G0N"
<< std::endl; << std::endl;
return os.str(); return os.str();
} }
@ -10303,7 +10213,7 @@ std::string Caller::resetdacs(int action) {
// print help // print help
if (action == slsDetectorDefs::HELP_ACTION) { if (action == slsDetectorDefs::HELP_ACTION) {
os << R"V0G0N([(optional) hard] os << R"V0G0N([(optional) hard]
[Eiger][Jungfrau][Moench][Gotthard][Gotthard2][Mythen3]Reset dac values to the defaults. A 'hard' optional reset will reset the dacs to the hardcoded defaults in on-board detector server. )V0G0N" [Eiger][Jungfrau][Moench][Gotthard2][Mythen3]Reset dac values to the defaults. A 'hard' optional reset will reset the dacs to the hardcoded defaults in on-board detector server. )V0G0N"
<< std::endl; << std::endl;
return os.str(); return os.str();
} }
@ -10387,71 +10297,6 @@ std::string Caller::resetfpga(int action) {
return os.str(); return os.str();
} }
std::string Caller::roi(int action) {
std::ostringstream os;
// print help
if (action == slsDetectorDefs::HELP_ACTION) {
os << R"V0G0N([xmin] [xmax]
[Gotthard] Region of interest in detector.
Options: Only a single ROI per module.
Either all channels or a single adc or 2 chips (256 channels). Default is all channels enabled (-1 -1). )V0G0N"
<< std::endl;
return os.str();
}
// check if action and arguments are valid
if (action == slsDetectorDefs::GET_ACTION) {
if (1 && args.size() != 0) {
throw RuntimeError("Wrong number of arguments for action GET");
}
if (args.size() == 0) {
}
}
else if (action == slsDetectorDefs::PUT_ACTION) {
if (1 && args.size() != 2) {
throw RuntimeError("Wrong number of arguments for action PUT");
}
if (args.size() == 2) {
defs::ROI t =
defs::ROI(StringTo<int>(args[0]), StringTo<int>(args[1]));
}
}
else {
throw RuntimeError("INTERNAL ERROR: Invalid action: supported actions "
"are ['GET', 'PUT']");
}
// generate code for each action
if (action == slsDetectorDefs::GET_ACTION) {
if (args.size() == 0) {
auto t = det->getROI(std::vector<int>{det_id});
os << t << '\n';
}
}
if (action == slsDetectorDefs::PUT_ACTION) {
if (args.size() == 2) {
defs::ROI t =
defs::ROI(StringTo<int>(args[0]), StringTo<int>(args[1]));
if (det_id == -1 && det->size() > 1) {
throw RuntimeError("Cannot execute ROI at multi module level");
}
det->setROI(t, det_id);
os << t << '\n';
}
}
return os.str();
}
std::string Caller::romode(int action) { std::string Caller::romode(int action) {
std::ostringstream os; std::ostringstream os;
@ -12440,7 +12285,7 @@ std::string Caller::serialnumber(int action) {
// print help // print help
if (action == slsDetectorDefs::HELP_ACTION) { if (action == slsDetectorDefs::HELP_ACTION) {
os << R"V0G0N( os << R"V0G0N(
[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb] [Jungfrau][Moench][Mythen3][Gotthard2][Ctb]
Serial number of detector. )V0G0N" Serial number of detector. )V0G0N"
<< std::endl; << std::endl;
return os.str(); return os.str();
@ -12576,8 +12421,6 @@ std::string Caller::settings(int action) {
os << R"V0G0N([standard, fast, highgain, dynamicgain, lowgain, mediumgain, veryhighgain, highgain0, fixgain1, fixgain2, forceswitchg1, forceswitchg2, verylowgain, g1_hg, g1_lg, g2_hc_hg, g2_hc_lg, g2_lc_hg, g2_lc_lg, g4_hg, g4_lg, gain0] os << R"V0G0N([standard, fast, highgain, dynamicgain, lowgain, mediumgain, veryhighgain, highgain0, fixgain1, fixgain2, forceswitchg1, forceswitchg2, verylowgain, g1_hg, g1_lg, g2_hc_hg, g2_hc_lg, g2_lc_hg, g2_lc_lg, g4_hg, g4_lg, gain0]
Detector Settings Detector Settings
[Jungfrau] - [ gain0 | highgain0] [Jungfrau] - [ gain0 | highgain0]
[Gotthard] - [dynamicgain | highgain | lowgain | mediumgain | veryhighgain]
[Gotthard] Also loads default dacs on to the detector.
[Gotthard2] - [dynamicgain | fixgain1 | fixgain2] [Gotthard2] - [dynamicgain | fixgain1 | fixgain2]
[Mythen3] - [standard | fast | highgain] Also changes vrshaper and vrpreamp. [Mythen3] - [standard | fast | highgain] Also changes vrshaper and vrpreamp.
[Eiger] Use threshold or thresholdnotb. [Eiger] Use threshold or thresholdnotb.
@ -13885,7 +13728,7 @@ std::string Caller::temp_adc(int action) {
// print help // print help
if (action == slsDetectorDefs::HELP_ACTION) { if (action == slsDetectorDefs::HELP_ACTION) {
os << R"V0G0N([n_value] os << R"V0G0N([n_value]
[Jungfrau][Moench][Gotthard] ADC Temperature )V0G0N" [Jungfrau][Moench] ADC Temperature )V0G0N"
<< std::endl; << std::endl;
return os.str(); return os.str();
} }
@ -14089,7 +13932,7 @@ std::string Caller::temp_fpga(int action) {
// print help // print help
if (action == slsDetectorDefs::HELP_ACTION) { if (action == slsDetectorDefs::HELP_ACTION) {
os << R"V0G0N([n_value] os << R"V0G0N([n_value]
[Eiger][Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Xilinx CTB] FPGA Temperature )V0G0N" [Eiger][Jungfrau][Moench][Mythen3][Gotthard2][Xilinx CTB] FPGA Temperature )V0G0N"
<< std::endl; << std::endl;
return os.str(); return os.str();
} }
@ -14590,7 +14433,7 @@ std::string Caller::timing(int action) {
if (action == slsDetectorDefs::HELP_ACTION) { if (action == slsDetectorDefs::HELP_ACTION) {
os << R"V0G0N([auto|trigger|gating|burst_trigger|trigger_gating] os << R"V0G0N([auto|trigger|gating|burst_trigger|trigger_gating]
Timing Mode of detector. Timing Mode of detector.
[Jungfrau][Moench][Gotthard][Ctb][Gotthard2][Xilinx Ctb] [auto|trigger] [Jungfrau][Moench][Ctb][Gotthard2][Xilinx Ctb] [auto|trigger]
[Mythen3] [auto|trigger|gating|trigger_gating] [Mythen3] [auto|trigger|gating|trigger_gating]
[Eiger] [auto|trigger|gating|burst_trigger] )V0G0N" [Eiger] [auto|trigger|gating|burst_trigger] )V0G0N"
<< std::endl; << std::endl;
@ -15053,7 +14896,7 @@ std::string Caller::triggersl(int action) {
// print help // print help
if (action == slsDetectorDefs::HELP_ACTION) { if (action == slsDetectorDefs::HELP_ACTION) {
os << R"V0G0N( os << R"V0G0N(
[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number of triggers left in acquisition. Only when external trigger used. )V0G0N" [Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number of triggers left in acquisition. Only when external trigger used. )V0G0N"
<< std::endl; << std::endl;
return os.str(); return os.str();
} }
@ -15534,7 +15377,7 @@ std::string Caller::type(int action) {
// print help // print help
if (action == slsDetectorDefs::HELP_ACTION) { if (action == slsDetectorDefs::HELP_ACTION) {
os << R"V0G0N( os << R"V0G0N(
Returns detector type. Can be Eiger, Jungfrau, Gotthard, Moench, Mythen3, Gotthard2, ChipTestBoard, Xilinx_ChipTestBoard )V0G0N" Returns detector type. Can be Eiger, Jungfrau, Moench, Mythen3, Gotthard2, ChipTestBoard, Xilinx_ChipTestBoard )V0G0N"
<< std::endl; << std::endl;
return os.str(); return os.str();
} }
@ -16228,7 +16071,7 @@ std::string Caller::update(int action) {
if (action == slsDetectorDefs::HELP_ACTION) { if (action == slsDetectorDefs::HELP_ACTION) {
os << R"V0G0N( os << R"V0G0N(
Without tftp: [server_name (incl fullpath)] [fname.pof (incl full path)] This does not use tftp. Without tftp: [server_name (incl fullpath)] [fname.pof (incl full path)] This does not use tftp.
[Jungfrau][Moench][Gotthard][Ctb] Updates the firmware, detector server, deletes old server, creates the symbolic link and then reboots detector controller. [Jungfrau][Moench][Ctb] Updates the firmware, detector server, deletes old server, creates the symbolic link and then reboots detector controller.
[Mythen3][Gotthard2] will require a script to start up the shorter named server link at start up. [Mythen3][Gotthard2] will require a script to start up the shorter named server link at start up.
server_name is full path name of detector server binary server_name is full path name of detector server binary
fname is full path of programming file )V0G0N" fname is full path of programming file )V0G0N"

View File

@ -82,7 +82,6 @@ class Caller {
std::string chipversion(int action); std::string chipversion(int action);
std::string clearbit(int action); std::string clearbit(int action);
std::string clearbusy(int action); std::string clearbusy(int action);
std::string clearroi(int action);
std::string clientversion(int action); std::string clientversion(int action);
std::string clkdiv(int action); std::string clkdiv(int action);
std::string clkfreq(int action); std::string clkfreq(int action);
@ -120,7 +119,6 @@ class Caller {
std::string exptime1(int action); std::string exptime1(int action);
std::string exptime2(int action); std::string exptime2(int action);
std::string exptime3(int action); std::string exptime3(int action);
std::string exptimel(int action);
std::string extrastoragecells(int action); std::string extrastoragecells(int action);
std::string extsampling(int action); std::string extsampling(int action);
std::string extsamplingsrc(int action); std::string extsamplingsrc(int action);
@ -230,7 +228,6 @@ class Caller {
std::string reg(int action); std::string reg(int action);
std::string resetdacs(int action); std::string resetdacs(int action);
std::string resetfpga(int action); std::string resetfpga(int action);
std::string roi(int action);
std::string romode(int action); std::string romode(int action);
std::string row(int action); std::string row(int action);
std::string runclk(int action); std::string runclk(int action);
@ -428,7 +425,6 @@ class Caller {
{"chipversion", &Caller::chipversion}, {"chipversion", &Caller::chipversion},
{"clearbit", &Caller::clearbit}, {"clearbit", &Caller::clearbit},
{"clearbusy", &Caller::clearbusy}, {"clearbusy", &Caller::clearbusy},
{"clearroi", &Caller::clearroi},
{"clientversion", &Caller::clientversion}, {"clientversion", &Caller::clientversion},
{"clkdiv", &Caller::clkdiv}, {"clkdiv", &Caller::clkdiv},
{"clkfreq", &Caller::clkfreq}, {"clkfreq", &Caller::clkfreq},
@ -466,7 +462,6 @@ class Caller {
{"exptime1", &Caller::exptime1}, {"exptime1", &Caller::exptime1},
{"exptime2", &Caller::exptime2}, {"exptime2", &Caller::exptime2},
{"exptime3", &Caller::exptime3}, {"exptime3", &Caller::exptime3},
{"exptimel", &Caller::exptimel},
{"extrastoragecells", &Caller::extrastoragecells}, {"extrastoragecells", &Caller::extrastoragecells},
{"extsampling", &Caller::extsampling}, {"extsampling", &Caller::extsampling},
{"extsamplingsrc", &Caller::extsamplingsrc}, {"extsamplingsrc", &Caller::extsamplingsrc},
@ -579,7 +574,6 @@ class Caller {
{"reg", &Caller::reg}, {"reg", &Caller::reg},
{"resetdacs", &Caller::resetdacs}, {"resetdacs", &Caller::resetdacs},
{"resetfpga", &Caller::resetfpga}, {"resetfpga", &Caller::resetfpga},
{"roi", &Caller::roi},
{"romode", &Caller::romode}, {"romode", &Caller::romode},
{"row", &Caller::row}, {"row", &Caller::row},
{"runclk", &Caller::runclk}, {"runclk", &Caller::runclk},
@ -784,13 +778,9 @@ class Caller {
{"vishaper", "dac"}, {"vishaper", "dac"},
{"iodelay", "dac"}, {"iodelay", "dac"},
{"vref_ds", "dac"}, {"vref_ds", "dac"},
{"vcascn_pb", "dac"},
{"vcascp_pb", "dac"},
{"vout_cm", "dac"}, {"vout_cm", "dac"},
{"vcasc_out", "dac"},
{"vin_cm", "dac"}, {"vin_cm", "dac"},
{"vref_comp", "dac"}, {"vref_comp", "dac"},
{"ib_test_c", "dac"},
{"vrshaper_n", "dac"}, {"vrshaper_n", "dac"},
{"vipre", "dac"}, {"vipre", "dac"},
{"vdcsh", "dac"}, {"vdcsh", "dac"},

View File

@ -112,10 +112,6 @@ IpAddr Caller::getDstIpFromAuto() {
} }
IpAddr Caller::getSrcIpFromAuto() { IpAddr Caller::getSrcIpFromAuto() {
if (det->getDetectorType().squash() == defs::GOTTHARD) {
throw RuntimeError(
"Cannot use 'auto' for udp_srcip for GotthardI Detector.");
}
std::string hostname = std::string hostname =
det->getHostname(std::vector<int>{det_id}).squash("none"); det->getHostname(std::vector<int>{det_id}).squash("none");
// Hostname could be ip try to decode otherwise look up the hostname // Hostname could be ip try to decode otherwise look up the hostname
@ -511,7 +507,7 @@ std::string Caller::udp_srcip(int action) {
"ip.\n\t[Eiger] Set only for 10G. For 1G, detector will replace " "ip.\n\t[Eiger] Set only for 10G. For 1G, detector will replace "
"with its own DHCP IP address. \n\tOne can also set this to " "with its own DHCP IP address. \n\tOne can also set this to "
"'auto' for 1 GbE data and virtual detectors. It will set to IP " "'auto' for 1 GbE data and virtual detectors. It will set to IP "
"of detector. Not available for GotthardI" "of detector."
<< '\n'; << '\n';
} else if (action == defs::GET_ACTION) { } else if (action == defs::GET_ACTION) {
auto t = det->getSourceUDPIP(std::vector<int>{det_id}); auto t = det->getSourceUDPIP(std::vector<int>{det_id});

View File

@ -215,10 +215,6 @@ std::vector<defs::detectorSettings> Detector::getSettingsList() const {
return std::vector<defs::detectorSettings>{ return std::vector<defs::detectorSettings>{
defs::STANDARD, defs::HIGHGAIN, defs::LOWGAIN, defs::VERYHIGHGAIN, defs::STANDARD, defs::HIGHGAIN, defs::LOWGAIN, defs::VERYHIGHGAIN,
defs::VERYLOWGAIN}; defs::VERYLOWGAIN};
case defs::GOTTHARD:
return std::vector<defs::detectorSettings>{
defs::HIGHGAIN, defs::DYNAMICGAIN, defs::LOWGAIN, defs::MEDIUMGAIN,
defs::VERYHIGHGAIN};
case defs::JUNGFRAU: case defs::JUNGFRAU:
return std::vector<defs::detectorSettings>{defs::GAIN0, return std::vector<defs::detectorSettings>{defs::GAIN0,
defs::HIGHGAIN0}; defs::HIGHGAIN0};
@ -684,7 +680,6 @@ std::vector<defs::dacIndex> Detector::getTemperatureList() const {
return std::vector<defs::dacIndex>{defs::SLOW_ADC_TEMP}; return std::vector<defs::dacIndex>{defs::SLOW_ADC_TEMP};
case defs::JUNGFRAU: case defs::JUNGFRAU:
case defs::MOENCH: case defs::MOENCH:
case defs::GOTTHARD:
return std::vector<defs::dacIndex>{defs::TEMPERATURE_ADC, return std::vector<defs::dacIndex>{defs::TEMPERATURE_ADC,
defs::TEMPERATURE_FPGA}; defs::TEMPERATURE_FPGA};
case defs::EIGER: case defs::EIGER:
@ -747,10 +742,6 @@ std::vector<defs::dacIndex> Detector::getDacList() const {
defs::VCAL, defs::VCMP_RL, defs::RXB_RB, defs::RXB_LB, defs::VCAL, defs::VCMP_RL, defs::RXB_RB, defs::RXB_LB,
defs::VCMP_RR, defs::VCP, defs::VCN, defs::VISHAPER, defs::VCMP_RR, defs::VCP, defs::VCN, defs::VISHAPER,
defs::VTHRESHOLD}; defs::VTHRESHOLD};
case defs::GOTTHARD:
return std::vector<defs::dacIndex>{
defs::VREF_DS, defs::VCASCN_PB, defs::VCASCP_PB, defs::VOUT_CM,
defs::VCASC_OUT, defs::VIN_CM, defs::VREF_COMP, defs::IB_TESTC};
case defs::JUNGFRAU: case defs::JUNGFRAU:
return std::vector<defs::dacIndex>{ return std::vector<defs::dacIndex>{
defs::VB_COMP, defs::VDD_PROT, defs::VIN_COM, defs::VREF_PRECH, defs::VB_COMP, defs::VDD_PROT, defs::VIN_COM, defs::VREF_PRECH,
@ -1818,27 +1809,6 @@ void Detector::setCollectionMode(defs::collectionMode value, Positions pos) {
pimpl->Parallel(&Module::setCollectionMode, pos, value); pimpl->Parallel(&Module::setCollectionMode, pos, value);
} }
// Gotthard Specific
Result<defs::ROI> Detector::getROI(Positions pos) const {
return pimpl->Parallel(&Module::getROI, pos);
}
void Detector::setROI(defs::ROI value, int module_id) {
if (module_id < 0 && size() > 1) {
throw RuntimeError("Cannot set ROI for all modules simultaneously");
}
pimpl->Parallel(&Module::setROI, {module_id}, value);
}
void Detector::clearROI(Positions pos) {
pimpl->Parallel(&Module::clearROI, pos);
}
Result<ns> Detector::getExptimeLeft(Positions pos) const {
return pimpl->Parallel(&Module::getExptimeLeft, pos);
}
// Gotthard2 Specific // Gotthard2 Specific
Result<int64_t> Detector::getNumberOfBursts(Positions pos) const { Result<int64_t> Detector::getNumberOfBursts(Positions pos) const {

View File

@ -230,9 +230,9 @@ void DetectorImpl::addModule(const std::string &name) {
// get type by connecting // get type by connecting
detectorType type = Module::getTypeFromDetector(hostname, port); detectorType type = Module::getTypeFromDetector(hostname, port);
// gotthard cannot have more than 2 modules (50um=1, 25um=2 // gotthard2 cannot have more than 2 modules (50um=1, 25um=2
if ((type == GOTTHARD || type == GOTTHARD2) && modules.size() > 2) { if (type == GOTTHARD2 && modules.size() > 2) {
throw RuntimeError("Gotthard cannot have more than 2 modules. Please " throw RuntimeError("GotthardII cannot have more than 2 modules. Please "
"free the shared memory and start again."); "free the shared memory and start again.");
} }
@ -1187,11 +1187,6 @@ int DetectorImpl::acquire() {
if (acquisition_finished != nullptr) { if (acquisition_finished != nullptr) {
// status // status
auto statusList = Parallel(&Module::getRunStatus, {}); auto statusList = Parallel(&Module::getRunStatus, {});
// if any slave still waiting, wait up to 1s (gotthard)
for (int i = 0; i != 20 && statusList.any(WAITING); ++i) {
std::this_thread::sleep_for(std::chrono::milliseconds(50));
statusList = Parallel(&Module::getRunStatus, {});
}
runStatus status = statusList.squash(ERROR); runStatus status = statusList.squash(ERROR);
// inconsistent status (squash error), but none of them in error // inconsistent status (squash error), but none of them in error
if (status == ERROR && (!statusList.any(ERROR))) { if (status == ERROR && (!statusList.any(ERROR))) {
@ -1235,7 +1230,6 @@ bool DetectorImpl::handleSynchronization(Positions pos) {
switch (shm()->detType) { switch (shm()->detType) {
case defs::MYTHEN3: case defs::MYTHEN3:
case defs::GOTTHARD2: case defs::GOTTHARD2:
case defs::GOTTHARD:
handleSync = true; handleSync = true;
break; break;
case defs::JUNGFRAU: case defs::JUNGFRAU:
@ -1290,11 +1284,6 @@ void DetectorImpl::startAcquisition(const bool blocking, Positions pos) {
// ensure all status normal (slaves not blocking) // ensure all status normal (slaves not blocking)
// to catch those slaves that are still 'waiting' // to catch those slaves that are still 'waiting'
auto statusList = Parallel(&Module::getRunStatus, pos); auto statusList = Parallel(&Module::getRunStatus, pos);
// if any slave still waiting, wait up to 1s (gotthard)
for (int i = 0; i != 20 && statusList.any(WAITING); ++i) {
std::this_thread::sleep_for(std::chrono::milliseconds(50));
statusList = Parallel(&Module::getRunStatus, pos);
}
if (!statusList.contains_only(IDLE, STOPPED, RUN_FINISHED)) { if (!statusList.contains_only(IDLE, STOPPED, RUN_FINISHED)) {
throw RuntimeError("Acquisition not successful. " throw RuntimeError("Acquisition not successful. "
"Unexpected detector status"); "Unexpected detector status");
@ -1442,7 +1431,6 @@ std::vector<char> DetectorImpl::readProgrammingFile(const std::string &fname) {
} }
break; break;
case EIGER: case EIGER:
case GOTTHARD:
throw RuntimeError("programfpga not implemented for this detector"); throw RuntimeError("programfpga not implemented for this detector");
default: default:
throw RuntimeError( throw RuntimeError(

View File

@ -93,35 +93,19 @@ std::string GetHelpDac(std::string dac) {
} }
if (dac == "vref_ds") { if (dac == "vref_ds") {
return std::string("[dac or mV value][(optional unit) mV] " return std::string("[dac or mV value][(optional unit) mV] "
"\n\t[Gotthard][Jungfrau] Dac for ??"); "\n\t[Jungfrau] Dac for ??");
}
if (dac == "vcascn_pb") {
return std::string(
"[dac or mV value][(optional unit) mV] \n\t[Gotthard] Dac for ??");
}
if (dac == "vcascp_pb") {
return std::string(
"[dac or mV value][(optional unit) mV] \n\t[Gotthard] Dac for ??");
} }
if (dac == "vout_cm") { if (dac == "vout_cm") {
return std::string("[dac or mV value][(optional unit) mV] " return std::string("[dac or mV value][(optional unit) mV] "
"\n\t[Gotthard] Dac for ??\n\t[Moench] Dac for 5"); "\n\t[Moench] Dac for 5");
}
if (dac == "vcasc_out") {
return std::string(
"[dac or mV value][(optional unit) mV] \n\t[Gotthard] Dac for ??");
} }
if (dac == "vin_cm") { if (dac == "vin_cm") {
return std::string("[dac or mV value][(optional unit) mV] " return std::string("[dac or mV value][(optional unit) mV] "
"\n\t[Gotthard] Dac for ??\n\t[Moench] Dac for 2"); "\n\t[Moench] Dac for 2");
} }
if (dac == "vref_comp") { if (dac == "vref_comp") {
return std::string("[dac or mV value][(optional unit) mV] " return std::string("[dac or mV value][(optional unit) mV] "
"\n\t[Gotthard][Jungfrau] Dac for ??"); "\n\t[Jungfrau] Dac for ??");
}
if (dac == "ib_test_c") {
return std::string(
"[dac or mV value][(optional unit) mV] \n\t[Gotthard] Dac for ??");
} }
if (dac == "vrshaper_n") { if (dac == "vrshaper_n") {
return std::string( return std::string(

View File

@ -1967,29 +1967,6 @@ void Module::setCollectionMode(const defs::collectionMode value) {
sendToDetector(F_SET_COLLECTION_MODE, static_cast<int>(value), nullptr); sendToDetector(F_SET_COLLECTION_MODE, static_cast<int>(value), nullptr);
} }
// Gotthard Specific
slsDetectorDefs::ROI Module::getROI() const {
return sendToDetector<slsDetectorDefs::ROI>(F_GET_ROI);
}
void Module::setROI(slsDetectorDefs::ROI arg) {
if (arg.xmin < 0 || arg.xmax >= getNumberOfChannels().x) {
arg.xmin = -1;
arg.xmax = -1;
}
sendToDetector(F_SET_ROI, arg, nullptr);
if (shm()->useReceiverFlag) {
sendToReceiver(F_RECEIVER_SET_DETECTOR_ROI, arg, nullptr);
}
}
void Module::clearROI() { setROI(slsDetectorDefs::ROI{}); }
int64_t Module::getExptimeLeft() const {
return sendToDetectorStop<int64_t>(F_GET_EXPTIME_LEFT);
}
// Gotthard2 Specific // Gotthard2 Specific
int64_t Module::getNumberOfBursts() const { int64_t Module::getNumberOfBursts() const {
@ -3440,8 +3417,6 @@ const std::string Module::getDetectorAPI() const {
return APIEIGER; return APIEIGER;
case JUNGFRAU: case JUNGFRAU:
return APIJUNGFRAU; return APIJUNGFRAU;
case GOTTHARD:
return APIGOTTHARD;
case CHIPTESTBOARD: case CHIPTESTBOARD:
return APICTB; return APICTB;
case MOENCH: case MOENCH:

View File

@ -418,16 +418,6 @@ class Module : public virtual slsDetectorDefs {
defs::collectionMode getCollectionMode() const; defs::collectionMode getCollectionMode() const;
void setCollectionMode(const defs::collectionMode enable); void setCollectionMode(const defs::collectionMode enable);
/**************************************************
* *
* Gotthard Specific *
* *
* ************************************************/
slsDetectorDefs::ROI getROI() const;
void setROI(slsDetectorDefs::ROI arg);
void clearROI();
int64_t getExptimeLeft() const;
/************************************************** /**************************************************
* * * *
* Gotthard2 Specific * * Gotthard2 Specific *

View File

@ -426,18 +426,6 @@ int InferAction::clearbusy() {
} }
} }
int InferAction::clearroi() {
if (args.size() == 0) {
return slsDetectorDefs::PUT_ACTION;
}
else {
throw RuntimeError("Could not infer action: Wrong number of arguments");
}
}
int InferAction::clientversion() { int InferAction::clientversion() {
if (args.size() == 0) { if (args.size() == 0) {
@ -1032,22 +1020,6 @@ int InferAction::exptime3() {
} }
} }
int InferAction::exptimel() {
if (args.size() == 0) {
return slsDetectorDefs::GET_ACTION;
}
if (args.size() == 1) {
return slsDetectorDefs::GET_ACTION;
}
else {
throw RuntimeError("Could not infer action: Wrong number of arguments");
}
}
int InferAction::extrastoragecells() { int InferAction::extrastoragecells() {
if (args.size() == 0) { if (args.size() == 0) {
@ -2482,22 +2454,6 @@ int InferAction::resetfpga() {
} }
} }
int InferAction::roi() {
if (args.size() == 0) {
return slsDetectorDefs::GET_ACTION;
}
if (args.size() == 2) {
return slsDetectorDefs::PUT_ACTION;
}
else {
throw RuntimeError("Could not infer action: Wrong number of arguments");
}
}
int InferAction::romode() { int InferAction::romode() {
if (args.size() == 0) { if (args.size() == 0) {

View File

@ -39,7 +39,6 @@ class InferAction {
int chipversion(); int chipversion();
int clearbit(); int clearbit();
int clearbusy(); int clearbusy();
int clearroi();
int clientversion(); int clientversion();
int clkdiv(); int clkdiv();
int clkfreq(); int clkfreq();
@ -77,7 +76,6 @@ class InferAction {
int exptime1(); int exptime1();
int exptime2(); int exptime2();
int exptime3(); int exptime3();
int exptimel();
int extrastoragecells(); int extrastoragecells();
int extsampling(); int extsampling();
int extsamplingsrc(); int extsamplingsrc();
@ -187,7 +185,6 @@ class InferAction {
int reg(); int reg();
int resetdacs(); int resetdacs();
int resetfpga(); int resetfpga();
int roi();
int romode(); int romode();
int row(); int row();
int runclk(); int runclk();
@ -373,7 +370,6 @@ class InferAction {
{"chipversion", &InferAction::chipversion}, {"chipversion", &InferAction::chipversion},
{"clearbit", &InferAction::clearbit}, {"clearbit", &InferAction::clearbit},
{"clearbusy", &InferAction::clearbusy}, {"clearbusy", &InferAction::clearbusy},
{"clearroi", &InferAction::clearroi},
{"clientversion", &InferAction::clientversion}, {"clientversion", &InferAction::clientversion},
{"clkdiv", &InferAction::clkdiv}, {"clkdiv", &InferAction::clkdiv},
{"clkfreq", &InferAction::clkfreq}, {"clkfreq", &InferAction::clkfreq},
@ -411,7 +407,6 @@ class InferAction {
{"exptime1", &InferAction::exptime1}, {"exptime1", &InferAction::exptime1},
{"exptime2", &InferAction::exptime2}, {"exptime2", &InferAction::exptime2},
{"exptime3", &InferAction::exptime3}, {"exptime3", &InferAction::exptime3},
{"exptimel", &InferAction::exptimel},
{"extrastoragecells", &InferAction::extrastoragecells}, {"extrastoragecells", &InferAction::extrastoragecells},
{"extsampling", &InferAction::extsampling}, {"extsampling", &InferAction::extsampling},
{"extsamplingsrc", &InferAction::extsamplingsrc}, {"extsamplingsrc", &InferAction::extsamplingsrc},
@ -524,7 +519,6 @@ class InferAction {
{"reg", &InferAction::reg}, {"reg", &InferAction::reg},
{"resetdacs", &InferAction::resetdacs}, {"resetdacs", &InferAction::resetdacs},
{"resetfpga", &InferAction::resetfpga}, {"resetfpga", &InferAction::resetfpga},
{"roi", &InferAction::roi},
{"romode", &InferAction::romode}, {"romode", &InferAction::romode},
{"row", &InferAction::row}, {"row", &InferAction::row},
{"runclk", &InferAction::runclk}, {"runclk", &InferAction::runclk},

View File

@ -13,7 +13,6 @@ target_sources(tests PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/Caller/test-Caller-jungfrau.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Caller/test-Caller-jungfrau.cpp
${CMAKE_CURRENT_SOURCE_DIR}/Caller/test-Caller-mythen3.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Caller/test-Caller-mythen3.cpp
${CMAKE_CURRENT_SOURCE_DIR}/Caller/test-Caller-gotthard2.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Caller/test-Caller-gotthard2.cpp
${CMAKE_CURRENT_SOURCE_DIR}/Caller/test-Caller-gotthard.cpp
${CMAKE_CURRENT_SOURCE_DIR}/Caller/test-Caller-chiptestboard.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Caller/test-Caller-chiptestboard.cpp
${CMAKE_CURRENT_SOURCE_DIR}/Caller/test-Caller-xilinx-chiptestboard.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Caller/test-Caller-xilinx-chiptestboard.cpp
${CMAKE_CURRENT_SOURCE_DIR}/Caller/test-Caller-moench.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Caller/test-Caller-moench.cpp

View File

@ -530,15 +530,6 @@ TEST_CASE("dac", "[.cmdcall][.dacs]") {
REQUIRE_THROWS(caller.call("dac", {"vb_ds"}, -1, GET)); REQUIRE_THROWS(caller.call("dac", {"vb_ds"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vref_ds"}, -1, GET)); REQUIRE_THROWS(caller.call("dac", {"vref_ds"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vref_comp"}, -1, GET)); REQUIRE_THROWS(caller.call("dac", {"vref_comp"}, -1, GET));
// gotthard
REQUIRE_THROWS(caller.call("dac", {"vref_ds"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vcascn_pb"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vcascp_pb"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vout_cm"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vcasc_out"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vin_cm"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vref_comp"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"ib_test_c"}, -1, GET));
// mythen3 // mythen3
REQUIRE_THROWS(caller.call("dac", {"vrpreamp"}, -1, GET)); REQUIRE_THROWS(caller.call("dac", {"vrpreamp"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vrshaper"}, -1, GET)); REQUIRE_THROWS(caller.call("dac", {"vrshaper"}, -1, GET));

View File

@ -185,15 +185,6 @@ TEST_CASE("Setting and reading back EIGER dacs", "[.cmdcall][.dacs]") {
det.setDAC(defs::VCP, vcp[i], false, {i}); det.setDAC(defs::VCP, vcp[i], false, {i});
} }
} }
// gotthard
REQUIRE_THROWS(caller.call("vref_ds", {}, -1, GET));
REQUIRE_THROWS(caller.call("vcascn_pb", {}, -1, GET));
REQUIRE_THROWS(caller.call("vcascp_pb", {}, -1, GET));
REQUIRE_THROWS(caller.call("vout_cm", {}, -1, GET));
REQUIRE_THROWS(caller.call("vcasc_out", {}, -1, GET));
REQUIRE_THROWS(caller.call("vin_cm", {}, -1, GET));
REQUIRE_THROWS(caller.call("vref_comp", {}, -1, GET));
REQUIRE_THROWS(caller.call("ib_test_c", {}, -1, GET));
// mythen3 // mythen3
// REQUIRE_THROWS(caller.call("vrpreamp", {}, -1, GET)); // REQUIRE_THROWS(caller.call("vrpreamp", {}, -1, GET));
// REQUIRE_THROWS(caller.call("vrshaper", {}, -1, GET)); // REQUIRE_THROWS(caller.call("vrshaper", {}, -1, GET));

View File

@ -1,174 +0,0 @@
// SPDX-License-Identifier: LGPL-3.0-or-other
// Copyright (C) 2021 Contributors to the SLS Detector Package
#include "Caller.h"
#include "catch.hpp"
#include "sls/Detector.h"
#include "sls/sls_detector_defs.h"
#include <sstream>
#include "sls/Result.h"
#include "sls/ToString.h"
#include "sls/versionAPI.h"
#include "test-Caller-global.h"
#include "tests/globals.h"
namespace sls {
using test::GET;
using test::PUT;
/* dacs */
TEST_CASE("Setting and reading back GOTTHARD dacs", "[.cmdcall][.dacs]") {
// vref_ds, vcascn_pb, vcascp_pb, vout_cm, vcasc_out, vin_cm, vref_comp,
// ib_test_c
Detector det;
Caller caller(&det);
auto det_type = det.getDetectorType().squash();
if (det_type == defs::GOTTHARD) {
SECTION("vref_ds") { test_dac_caller(defs::VREF_DS, "vref_ds", 660); }
SECTION("vcascn_pb") {
test_dac_caller(defs::VCASCN_PB, "vcascn_pb", 650);
}
SECTION("vcascp_pb") {
test_dac_caller(defs::VCASCP_PB, "vcascp_pb", 1480);
}
SECTION("vout_cm") { test_dac_caller(defs::VOUT_CM, "vout_cm", 1520); }
SECTION("vcasc_out") {
test_dac_caller(defs::VCASC_OUT, "vcasc_out", 1320);
}
SECTION("vin_cm") { test_dac_caller(defs::VIN_CM, "vin_cm", 1350); }
SECTION("vref_comp") {
test_dac_caller(defs::VREF_COMP, "vref_comp", 350);
}
SECTION("ib_test_c") {
test_dac_caller(defs::IB_TESTC, "ib_test_c", 2001);
}
// eiger
REQUIRE_THROWS(caller.call("dac", {"vthreshold"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vsvp"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vsvn"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vtrim"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vrpreamp"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vrshaper"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vtgstv"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vcmp_ll"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vcmp_lr"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vcal"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vcmp_rl"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vcmp_rr"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"rxb_rb"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"rxb_lb"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vcp"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vcn"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vishaper"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"iodelay"}, -1, GET));
// jungfrau
REQUIRE_THROWS(caller.call("dac", {"vb_comp"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vdd_prot"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vin_com"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vref_prech"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vb_pixbuf"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vb_ds"}, -1, GET));
// REQUIRE_THROWS(caller.call("dac", {"vref_ds"}, -1, GET));
// REQUIRE_THROWS(caller.call("dac", {"vref_comp"}, -1, GET));
// mythen3
REQUIRE_THROWS(caller.call("dac", {"vrpreamp"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vrshaper"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vrshaper_n"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vipre"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vishaper"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vdcsh"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vth1"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vth2"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vth3"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vcal_n"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vcal_p"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vtrim"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vcassh"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vcas"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vicin"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vipre_out"}, -1, GET));
// gotthard2
REQUIRE_THROWS(caller.call("dac", {"vref_h_adc"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vb_comp_fe"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vb_comp_adc"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vcom_cds"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vref_rstore"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vb_opa_1st"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vref_comp_fe"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vcom_adc1"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vref_l_adc"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vref_cds"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vb_cs"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vb_opa_fd"}, -1, GET));
REQUIRE_THROWS(caller.call("dac", {"vcom_adc2"}, -1, GET));
}
}
/* Gotthard Specific */
TEST_CASE("roi", "[.cmdcall]") {
Detector det;
Caller caller(&det);
auto det_type = det.getDetectorType().squash();
if (det_type == defs::GOTTHARD) {
if (det.size() > 1) {
REQUIRE_THROWS(caller.call("roi", {"0", "255"}, -1, PUT));
REQUIRE_NOTHROW(caller.call("roi", {}, -1, GET));
} else {
auto prev_val = det.getROI();
{
std::ostringstream oss;
caller.call("roi", {"0", "255"}, -1, PUT, oss);
REQUIRE(oss.str() == "roi [0, 255]\n");
}
{
std::ostringstream oss;
caller.call("roi", {"256", "511"}, -1, PUT, oss);
REQUIRE(oss.str() == "roi [256, 511]\n");
}
REQUIRE_THROWS(caller.call("roi", {"0", "256"}, -1, PUT));
for (int i = 0; i != det.size(); ++i) {
det.setROI(prev_val[i], i);
}
}
} else {
REQUIRE_THROWS(caller.call("roi", {}, -1, GET));
}
}
TEST_CASE("clearroi", "[.cmdcall]") {
Detector det;
Caller caller(&det);
auto det_type = det.getDetectorType().squash();
if (det_type == defs::GOTTHARD) {
auto prev_val = det.getROI();
{
std::ostringstream oss;
caller.call("clearroi", {}, -1, PUT, oss);
REQUIRE(oss.str() == "clearroi successful\n");
}
for (int i = 0; i != det.size(); ++i) {
det.setROI(prev_val[i], i);
}
} else {
REQUIRE_THROWS(caller.call("clearroi", {}, -1, PUT));
}
}
TEST_CASE("exptimel", "[.cmdcall]") {
Detector det;
Caller caller(&det);
auto det_type = det.getDetectorType().squash();
if (det_type == defs::GOTTHARD) {
REQUIRE_NOTHROW(caller.call("exptimel", {}, -1, GET));
} else {
REQUIRE_THROWS(caller.call("exptimel", {}, -1, GET));
}
}
} // namespace sls

View File

@ -59,15 +59,6 @@ TEST_CASE("Setting and reading back Jungfrau dacs", "[.cmdcall][.dacs]") {
REQUIRE_THROWS(caller.call("vcn", {}, -1, GET)); REQUIRE_THROWS(caller.call("vcn", {}, -1, GET));
REQUIRE_THROWS(caller.call("vishaper", {}, -1, GET)); REQUIRE_THROWS(caller.call("vishaper", {}, -1, GET));
REQUIRE_THROWS(caller.call("iodelay", {}, -1, GET)); REQUIRE_THROWS(caller.call("iodelay", {}, -1, GET));
// gotthard
// REQUIRE_THROWS(caller.call("vref_ds", {}, -1, GET));
REQUIRE_THROWS(caller.call("vcascn_pb", {}, -1, GET));
REQUIRE_THROWS(caller.call("vcascp_pb", {}, -1, GET));
REQUIRE_THROWS(caller.call("vout_cm", {}, -1, GET));
REQUIRE_THROWS(caller.call("vcasc_out", {}, -1, GET));
REQUIRE_THROWS(caller.call("vin_cm", {}, -1, GET));
// REQUIRE_THROWS(caller.call("vref_comp", {}, -1, GET));
REQUIRE_THROWS(caller.call("ib_test_c", {}, -1, GET));
// mythen3 // mythen3
REQUIRE_THROWS(caller.call("vrpreamp", {}, -1, GET)); REQUIRE_THROWS(caller.call("vrpreamp", {}, -1, GET));
REQUIRE_THROWS(caller.call("vrshaper", {}, -1, GET)); REQUIRE_THROWS(caller.call("vrshaper", {}, -1, GET));

View File

@ -59,15 +59,6 @@ TEST_CASE("Setting and reading back moench dacs", "[.cmdcall][.dacs]") {
REQUIRE_THROWS(caller.call("vcn", {}, -1, GET)); REQUIRE_THROWS(caller.call("vcn", {}, -1, GET));
REQUIRE_THROWS(caller.call("vishaper", {}, -1, GET)); REQUIRE_THROWS(caller.call("vishaper", {}, -1, GET));
REQUIRE_THROWS(caller.call("iodelay", {}, -1, GET)); REQUIRE_THROWS(caller.call("iodelay", {}, -1, GET));
// gotthard
REQUIRE_THROWS(caller.call("vref_ds", {}, -1, GET));
REQUIRE_THROWS(caller.call("vcascn_pb", {}, -1, GET));
REQUIRE_THROWS(caller.call("vcascp_pb", {}, -1, GET));
// REQUIRE_THROWS(caller.call("vout_cm", {}, -1, GET));
REQUIRE_THROWS(caller.call("vcasc_out", {}, -1, GET));
// REQUIRE_THROWS(caller.call("vin_cm", {}, -1, GET));
REQUIRE_THROWS(caller.call("vref_comp", {}, -1, GET));
REQUIRE_THROWS(caller.call("ib_test_c", {}, -1, GET));
// mythen3 // mythen3
REQUIRE_THROWS(caller.call("vrpreamp", {}, -1, GET)); REQUIRE_THROWS(caller.call("vrpreamp", {}, -1, GET));
REQUIRE_THROWS(caller.call("vrshaper", {}, -1, GET)); REQUIRE_THROWS(caller.call("vrshaper", {}, -1, GET));

View File

@ -232,13 +232,6 @@ TEST_CASE("settings", "[.cmdcall]") {
sett.push_back("g4_hg"); sett.push_back("g4_hg");
sett.push_back("g4_lg"); sett.push_back("g4_lg");
break; break;
case defs::GOTTHARD:
sett.push_back("highgain");
sett.push_back("dynamicgain");
sett.push_back("lowgain");
sett.push_back("mediumgain");
sett.push_back("veryhighgain");
break;
case defs::GOTTHARD2: case defs::GOTTHARD2:
sett.push_back("dynamicgain"); sett.push_back("dynamicgain");
sett.push_back("fixgain1"); sett.push_back("fixgain1");
@ -613,8 +606,8 @@ TEST_CASE("master", "[.cmdcall]") {
Caller caller(&det); Caller caller(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
if (det_type == defs::EIGER || det_type == defs::MYTHEN3 || if (det_type == defs::EIGER || det_type == defs::MYTHEN3 ||
det_type == defs::GOTTHARD || det_type == defs::GOTTHARD2 || det_type == defs::GOTTHARD2 || det_type == defs::JUNGFRAU ||
det_type == defs::JUNGFRAU || det_type == defs::MOENCH) { det_type == defs::MOENCH) {
REQUIRE_NOTHROW(caller.call("master", {}, -1, GET)); REQUIRE_NOTHROW(caller.call("master", {}, -1, GET));
if (det_type == defs::EIGER || det_type == defs::GOTTHARD2 || if (det_type == defs::EIGER || det_type == defs::GOTTHARD2 ||
det_type == defs::JUNGFRAU || det_type == defs::MOENCH) { det_type == defs::JUNGFRAU || det_type == defs::MOENCH) {
@ -902,9 +895,6 @@ TEST_CASE("delay", "[.cmdcall]") {
if (det_type == defs::EIGER) { if (det_type == defs::EIGER) {
REQUIRE_THROWS(caller.call("delay", {"1"}, -1, PUT)); REQUIRE_THROWS(caller.call("delay", {"1"}, -1, PUT));
REQUIRE_THROWS(caller.call("delay", {}, -1, GET)); REQUIRE_THROWS(caller.call("delay", {}, -1, GET));
} else if (det_type == defs::GOTTHARD) {
// extra delays for master (can throw when setting)
REQUIRE_NOTHROW(caller.call("delay", {}, -1, GET));
} else { } else {
auto prev_val = det.getDelayAfterTrigger(); auto prev_val = det.getDelayAfterTrigger();
{ {
@ -1204,16 +1194,8 @@ TEST_CASE("adcphase", "[.cmdcall]") {
Detector det; Detector det;
Caller caller(&det); Caller caller(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
if (det_type == defs::GOTTHARD || det_type == defs::JUNGFRAU || if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
det_type == defs::MOENCH || det_type == defs::CHIPTESTBOARD) { det_type == defs::CHIPTESTBOARD) {
if (det_type == defs::GOTTHARD) {
std::ostringstream oss1;
caller.call("adcphase", {"20"}, -1, PUT, oss1);
REQUIRE(oss1.str() == "adcphase 20\n");
// cant get, cant use deg
REQUIRE_THROWS(caller.call("adcphase", {}, -1, GET));
REQUIRE_THROWS(caller.call("adcphase", {"20", "deg"}, -1, PUT));
} else {
auto prev_val = det.getADCPhase(); auto prev_val = det.getADCPhase();
{ {
std::ostringstream oss1, oss2; std::ostringstream oss1, oss2;
@ -1232,7 +1214,6 @@ TEST_CASE("adcphase", "[.cmdcall]") {
for (int i = 0; i != det.size(); ++i) { for (int i = 0; i != det.size(); ++i) {
det.setADCPhase(prev_val[i], {i}); det.setADCPhase(prev_val[i], {i});
} }
}
} else { } else {
REQUIRE_THROWS(caller.call("adcphase", {"0"}, -1, PUT)); REQUIRE_THROWS(caller.call("adcphase", {"0"}, -1, PUT));
REQUIRE_THROWS(caller.call("adcphase", {}, -1, GET)); REQUIRE_THROWS(caller.call("adcphase", {}, -1, GET));
@ -1426,26 +1407,8 @@ TEST_CASE("highvoltage", "[.cmdcall]") {
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
if (det_type != defs::XILINX_CHIPTESTBOARD) { if (det_type != defs::XILINX_CHIPTESTBOARD) {
auto prev_val = det.getHighVoltage(); auto prev_val = det.getHighVoltage();
// selected values
if (det_type == defs::GOTTHARD) {
REQUIRE_THROWS(caller.call("highvoltage", {"50"}, -1, PUT));
{
std::ostringstream oss1, oss2;
caller.call("highvoltage", {"90"}, -1, PUT, oss1);
REQUIRE(oss1.str() == "highvoltage 90\n");
caller.call("highvoltage", {}, -1, GET, oss2);
REQUIRE(oss2.str() == "highvoltage 90\n");
}
{
std::ostringstream oss1, oss2;
caller.call("highvoltage", {"0"}, -1, PUT, oss1);
REQUIRE(oss1.str() == "highvoltage 0\n");
caller.call("highvoltage", {}, -1, GET, oss2);
REQUIRE(oss2.str() == "highvoltage 0\n");
}
}
// range 0, 60 - 200 // range 0, 60 - 200
else if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH || if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
det_type == defs::CHIPTESTBOARD) { det_type == defs::CHIPTESTBOARD) {
REQUIRE_THROWS(caller.call("highvoltage", {"50"}, -1, PUT)); REQUIRE_THROWS(caller.call("highvoltage", {"50"}, -1, PUT));
{ {
@ -1580,26 +1543,7 @@ TEST_CASE("imagetest", "[.cmdcall]") {
Caller caller(&det); Caller caller(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
// cannot test only for virtual eiger/jungfrau // cannot test only for virtual eiger/jungfrau
if (det_type == defs::GOTTHARD) { if (det_type != defs::JUNGFRAU && det_type != defs::MOENCH &&
auto prev_val = det.getImageTestMode();
{
std::ostringstream oss1, oss2;
caller.call("imagetest", {"1"}, -1, PUT, oss1);
REQUIRE(oss1.str() == "imagetest 1\n");
caller.call("imagetest", {}, -1, GET, oss2);
REQUIRE(oss2.str() == "imagetest 1\n");
}
{
std::ostringstream oss1, oss2;
caller.call("imagetest", {"0"}, -1, PUT, oss1);
REQUIRE(oss1.str() == "imagetest 0\n");
caller.call("imagetest", {}, -1, GET, oss2);
REQUIRE(oss2.str() == "imagetest 0\n");
}
for (int i = 0; i != det.size(); ++i) {
det.setImageTestMode(prev_val[i], {i});
}
} else if (det_type != defs::JUNGFRAU && det_type != defs::MOENCH &&
det_type != defs::EIGER) { det_type != defs::EIGER) {
// wont fail for eiger and jungfrau/moench virtual servers // wont fail for eiger and jungfrau/moench virtual servers
REQUIRE_THROWS(caller.call("imagetest", {}, -1, GET)); REQUIRE_THROWS(caller.call("imagetest", {}, -1, GET));
@ -1610,32 +1554,7 @@ TEST_CASE("extsig", "[.cmdcall]") {
Detector det; Detector det;
Caller caller(&det); Caller caller(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
if (det_type == defs::GOTTHARD) { if (det_type == defs::MYTHEN3) {
auto prev_val = det.getExternalSignalFlags(0);
REQUIRE_THROWS(caller.call("extsig", {}, -1, GET));
REQUIRE_THROWS(caller.call("extsig", {"1"}, -1, GET));
REQUIRE_THROWS(caller.call("extsig", {"0", "inversion_on"}, -1, PUT));
REQUIRE_THROWS(caller.call("extsig", {"0", "inversion_off"}, -1, PUT));
{
std::ostringstream oss1, oss2;
caller.call("extsig", {"0", "trigger_in_rising_edge"}, -1, PUT,
oss1);
REQUIRE(oss1.str() == "extsig 0 trigger_in_rising_edge\n");
caller.call("extsig", {"0"}, -1, GET, oss2);
REQUIRE(oss2.str() == "extsig 0 trigger_in_rising_edge\n");
}
{
std::ostringstream oss1, oss2;
caller.call("extsig", {"0", "trigger_in_falling_edge"}, -1, PUT,
oss1);
REQUIRE(oss1.str() == "extsig 0 trigger_in_falling_edge\n");
caller.call("extsig", {"0"}, -1, GET, oss2);
REQUIRE(oss2.str() == "extsig 0 trigger_in_falling_edge\n");
}
for (int i = 0; i != det.size(); ++i) {
det.setExternalSignalFlags(0, prev_val[i], {i});
}
} else if (det_type == defs::MYTHEN3) {
auto prev_val_0 = det.getExternalSignalFlags(0); auto prev_val_0 = det.getExternalSignalFlags(0);
auto prev_val_1 = det.getExternalSignalFlags(1); auto prev_val_1 = det.getExternalSignalFlags(1);
REQUIRE_THROWS(caller.call("extsig", {}, -1, GET)); REQUIRE_THROWS(caller.call("extsig", {}, -1, GET));
@ -2022,8 +1941,7 @@ TEST_CASE("temp_adc", "[.cmdcall]") {
Detector det; Detector det;
Caller caller(&det); Caller caller(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH || if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH) {
det_type == defs::GOTTHARD) {
REQUIRE_NOTHROW(caller.call("temp_adc", {}, -1, GET)); REQUIRE_NOTHROW(caller.call("temp_adc", {}, -1, GET));
std::ostringstream oss; std::ostringstream oss;
REQUIRE_NOTHROW(caller.call("temp_adc", {}, 0, GET, oss)); REQUIRE_NOTHROW(caller.call("temp_adc", {}, 0, GET, oss));
@ -2518,7 +2436,7 @@ TEST_CASE("scan", "[.cmdcall]") {
break; break;
case defs::EIGER: case defs::EIGER:
ind = defs::VCMP_LL; ind = defs::VCMP_LL;
notImplementedInd = defs::VCASCP_PB; notImplementedInd = defs::VIN_COM;
break; break;
case defs::JUNGFRAU: case defs::JUNGFRAU:
ind = defs::VB_COMP; ind = defs::VB_COMP;
@ -2528,10 +2446,6 @@ TEST_CASE("scan", "[.cmdcall]") {
ind = defs::VIN_CM; ind = defs::VIN_CM;
notImplementedInd = defs::VSVP; notImplementedInd = defs::VSVP;
break; break;
case defs::GOTTHARD:
ind = defs::VREF_DS;
notImplementedInd = defs::VSVP;
break;
case defs::GOTTHARD2: case defs::GOTTHARD2:
ind = defs::VB_COMP_FE; ind = defs::VB_COMP_FE;
notImplementedInd = defs::VSVP; notImplementedInd = defs::VSVP;
@ -3284,8 +3198,7 @@ TEST_CASE("rebootcontroller", "[.cmdcall]") {
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH || if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3 || det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3 ||
det_type == defs::GOTTHARD2 || det_type == defs::GOTTHARD || det_type == defs::GOTTHARD2 || det_type == defs::XILINX_CHIPTESTBOARD) {
det_type == defs::XILINX_CHIPTESTBOARD) {
// TODO: reboot real server? // TODO: reboot real server?
// REQUIRE_NOTHROW(caller.call("rebootcontroller", {}, -1, PUT)); // REQUIRE_NOTHROW(caller.call("rebootcontroller", {}, -1, PUT));
REQUIRE_THROWS(caller.call("rebootcontroller", {}, -1, GET)); REQUIRE_THROWS(caller.call("rebootcontroller", {}, -1, GET));
@ -3357,7 +3270,7 @@ TEST_CASE("adcreg", "[.cmdcall]") {
Caller caller(&det); Caller caller(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH || if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
det_type == defs::CHIPTESTBOARD || det_type == defs::GOTTHARD) { det_type == defs::CHIPTESTBOARD) {
std::ostringstream oss; std::ostringstream oss;
caller.call("adcreg", {"0x8", "0x3"}, -1, PUT, oss); caller.call("adcreg", {"0x8", "0x3"}, -1, PUT, oss);
REQUIRE(oss.str() == "adcreg [0x8, 0x3]\n"); REQUIRE(oss.str() == "adcreg [0x8, 0x3]\n");
@ -3464,9 +3377,8 @@ TEST_CASE("firmwaretest", "[.cmdcall]") {
Caller caller(&det); Caller caller(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH || if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
det_type == defs::CHIPTESTBOARD || det_type == defs::GOTTHARD || det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3 ||
det_type == defs::MYTHEN3 || det_type == defs::GOTTHARD2 || det_type == defs::GOTTHARD2 || det_type == defs::XILINX_CHIPTESTBOARD) {
det_type == defs::XILINX_CHIPTESTBOARD) {
std::ostringstream oss; std::ostringstream oss;
caller.call("firmwaretest", {}, -1, PUT, oss); caller.call("firmwaretest", {}, -1, PUT, oss);
REQUIRE(oss.str() == "firmwaretest successful\n"); REQUIRE(oss.str() == "firmwaretest successful\n");
@ -3482,8 +3394,8 @@ TEST_CASE("bustest", "[.cmdcall]") {
Caller caller(&det); Caller caller(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH || if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
det_type == defs::CHIPTESTBOARD || det_type == defs::GOTTHARD || det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3 ||
det_type == defs::MYTHEN3 || det_type == defs::GOTTHARD2) { det_type == defs::GOTTHARD2) {
std::ostringstream oss; std::ostringstream oss;
caller.call("bustest", {}, -1, PUT, oss); caller.call("bustest", {}, -1, PUT, oss);
REQUIRE(oss.str() == "bustest successful\n"); REQUIRE(oss.str() == "bustest successful\n");

View File

@ -44,7 +44,7 @@ ClientInterface::~ClientInterface() {
} }
ClientInterface::ClientInterface(uint16_t portNumber) ClientInterface::ClientInterface(uint16_t portNumber)
: detType(GOTTHARD), portNumber(portNumber), server(portNumber) { : detType(GENERIC), portNumber(portNumber), server(portNumber) {
validatePortNumber(portNumber); validatePortNumber(portNumber);
functionTable(); functionTable();
parentThreadId = gettid(); parentThreadId = gettid();
@ -120,7 +120,6 @@ int ClientInterface::functionTable(){
flist[F_GET_LAST_RECEIVER_CLIENT_IP] = &ClientInterface::get_last_client_ip; flist[F_GET_LAST_RECEIVER_CLIENT_IP] = &ClientInterface::get_last_client_ip;
flist[F_GET_RECEIVER_VERSION] = &ClientInterface::get_version; flist[F_GET_RECEIVER_VERSION] = &ClientInterface::get_version;
flist[F_SETUP_RECEIVER] = &ClientInterface::setup_receiver; flist[F_SETUP_RECEIVER] = &ClientInterface::setup_receiver;
flist[F_RECEIVER_SET_DETECTOR_ROI] = &ClientInterface::set_detector_roi;
flist[F_RECEIVER_SET_NUM_FRAMES] = &ClientInterface::set_num_frames; flist[F_RECEIVER_SET_NUM_FRAMES] = &ClientInterface::set_num_frames;
flist[F_SET_RECEIVER_NUM_TRIGGERS] = &ClientInterface::set_num_triggers; flist[F_SET_RECEIVER_NUM_TRIGGERS] = &ClientInterface::set_num_triggers;
flist[F_SET_RECEIVER_NUM_BURSTS] = &ClientInterface::set_num_bursts; flist[F_SET_RECEIVER_NUM_BURSTS] = &ClientInterface::set_num_bursts;
@ -413,9 +412,6 @@ int ClientInterface::setup_receiver(Interface &socket) {
if (detType == CHIPTESTBOARD) { if (detType == CHIPTESTBOARD) {
impl()->setADCEnableMask(arg.adcMask); impl()->setADCEnableMask(arg.adcMask);
} }
if (detType == GOTTHARD) {
impl()->setDetectorROI(arg.roi);
}
if (detType == MYTHEN3) { if (detType == MYTHEN3) {
impl()->setCounterMask(arg.countermask); impl()->setCounterMask(arg.countermask);
impl()->setAcquisitionTime1( impl()->setAcquisitionTime1(
@ -443,7 +439,6 @@ int ClientInterface::setup_receiver(Interface &socket) {
void ClientInterface::setDetectorType(detectorType arg) { void ClientInterface::setDetectorType(detectorType arg) {
switch (arg) { switch (arg) {
case GOTTHARD:
case EIGER: case EIGER:
case CHIPTESTBOARD: case CHIPTESTBOARD:
case XILINX_CHIPTESTBOARD: case XILINX_CHIPTESTBOARD:
@ -482,22 +477,6 @@ void ClientInterface::setDetectorType(detectorType arg) {
impl()->setThreadIds(parentThreadId, tcpThreadId); impl()->setThreadIds(parentThreadId, tcpThreadId);
} }
int ClientInterface::set_detector_roi(Interface &socket) {
auto arg = socket.Receive<ROI>();
LOG(logDEBUG1) << "Set Detector ROI: " << ToString(arg);
if (detType != GOTTHARD)
functionNotImplemented();
verifyIdle(socket);
try {
impl()->setDetectorROI(arg);
} catch (const std::exception &e) {
throw RuntimeError("Could not set ROI [" + std::string(e.what()) + ']');
}
return socket.Send(OK);
}
int ClientInterface::set_num_frames(Interface &socket) { int ClientInterface::set_num_frames(Interface &socket) {
auto value = socket.Receive<int64_t>(); auto value = socket.Receive<int64_t>();
if (value <= 0) { if (value <= 0) {

View File

@ -63,7 +63,6 @@ class ClientInterface : private virtual slsDetectorDefs {
int get_version(ServerInterface &socket); int get_version(ServerInterface &socket);
int setup_receiver(ServerInterface &socket); int setup_receiver(ServerInterface &socket);
void setDetectorType(detectorType arg); void setDetectorType(detectorType arg);
int set_detector_roi(ServerInterface &socket);
int set_num_frames(ServerInterface &socket); int set_num_frames(ServerInterface &socket);
int set_num_triggers(ServerInterface &socket); int set_num_triggers(ServerInterface &socket);
int set_num_bursts(ServerInterface &socket); int set_num_bursts(ServerInterface &socket);

View File

@ -213,9 +213,8 @@ std::string DataProcessor::CreateVirtualFile(
"Skipping virtual hdf5 file since rx_roi is enabled."); "Skipping virtual hdf5 file since rx_roi is enabled.");
} }
bool gotthard25um = ((generalData->detType == GOTTHARD || bool gotthard25um =
generalData->detType == GOTTHARD2) && (generalData->detType == GOTTHARD2 && (numModX * numModY) == 2);
(numModX * numModY) == 2);
// 0 for infinite files // 0 for infinite files
uint32_t framesPerFile = uint32_t framesPerFile =
@ -505,16 +504,6 @@ void DataProcessor::PadMissingPackets(sls_receiver_header header, char *data) {
// missing packet // missing packet
switch (generalData->detType) { switch (generalData->detType) {
// for gotthard, 1st packet: 4 bytes fnum, CACA + CACA, 639*2 bytes
// data
// 2nd packet: 4 bytes fnum, previous 1*2 bytes data +
// 640*2 bytes data !!
case GOTTHARD:
if (pnum == 0u)
memset(data + (pnum * dsize), 0xFF, dsize - 2);
else
memset(data + (pnum * dsize), 0xFF, dsize + 2);
break;
case CHIPTESTBOARD: case CHIPTESTBOARD:
case XILINX_CHIPTESTBOARD: case XILINX_CHIPTESTBOARD:
if (pnum == (pperFrame - 1)) if (pnum == (pperFrame - 1))

View File

@ -22,10 +22,7 @@ DataStreamer::DataStreamer(int index) : ThreadObject(index, TypeName) {
LOG(logDEBUG) << "DataStreamer " << index << " created"; LOG(logDEBUG) << "DataStreamer " << index << " created";
} }
DataStreamer::~DataStreamer() { DataStreamer::~DataStreamer() { CloseZmqSocket(); }
CloseZmqSocket();
delete[] completeBuffer;
}
void DataStreamer::SetFifo(Fifo *f) { fifo = f; } void DataStreamer::SetFifo(Fifo *f) { fifo = f; }
@ -62,19 +59,7 @@ void DataStreamer::ResetParametersforNewAcquisition(const std::string &fname) {
StopRunning(); StopRunning();
startedFlag = false; startedFlag = false;
firstIndex = 0; firstIndex = 0;
fileNametoStream = fname; fileNametoStream = fname;
if (completeBuffer) {
delete[] completeBuffer;
completeBuffer = nullptr;
}
if (generalData->detType == GOTTHARD &&
generalData->detectorRoi.xmin != -1) {
adcConfigured =
generalData->GetAdcConfigured(index, generalData->detectorRoi);
completeBuffer = new char[generalData->imageSizeComplete];
memset(completeBuffer, 0, generalData->imageSizeComplete);
}
} }
void DataStreamer::RecordFirstIndex(uint64_t fnum, size_t firstImageIndex) { void DataStreamer::RecordFirstIndex(uint64_t fnum, size_t firstImageIndex) {
@ -160,41 +145,16 @@ void DataStreamer::ProcessAnImage(sls_detector_header header, size_t size,
uint64_t fnum = header.frameNumber; uint64_t fnum = header.frameNumber;
LOG(logDEBUG1) << "DataStreamer " << index << ": fnum:" << fnum; LOG(logDEBUG1) << "DataStreamer " << index << ": fnum:" << fnum;
// shortframe gotthard
if (completeBuffer) {
// disregarding the size modified from callback (always using
// imageSizeComplete instead of size because gui needs
// imagesizecomplete and listener writes imagesize to size
if (!SendDataHeader(header, generalData->imageSizeComplete,
generalData->nPixelsXComplete,
generalData->nPixelsYComplete)) {
LOG(logERROR) << "Could not send zmq header for fnum " << fnum
<< " and streamer " << index;
}
memcpy(completeBuffer + ((generalData->imageSize) * adcConfigured),
data, size);
if (!zmqSocket->SendData(completeBuffer,
generalData->imageSizeComplete)) {
LOG(logERROR) << "Could not send zmq data for fnum " << fnum
<< " and streamer " << index;
}
}
// normal
else {
if (!SendDataHeader(header, size, generalData->nPixelsX, if (!SendDataHeader(header, size, generalData->nPixelsX,
generalData->nPixelsY)) { generalData->nPixelsY)) {
LOG(logERROR) << "Could not send zmq header for fnum " << fnum LOG(logERROR) << "Could not send zmq header for fnum " << fnum
<< " and streamer " << index; << " and streamer " << index;
} }
if (!zmqSocket->SendData(data, size)) { if (!zmqSocket->SendData(data, size)) {
LOG(logERROR) << "Could not send zmq data for fnum " << fnum LOG(logERROR) << "Could not send zmq data for fnum " << fnum
<< " and streamer " << index; << " and streamer " << index;
} }
}
} }
int DataStreamer::SendDummyHeader() { int DataStreamer::SendDummyHeader() {

View File

@ -88,7 +88,6 @@ class DataStreamer : private virtual slsDetectorDefs, public ThreadObject {
const GeneralData *generalData{nullptr}; const GeneralData *generalData{nullptr};
Fifo *fifo{nullptr}; Fifo *fifo{nullptr};
ZmqSocket *zmqSocket{nullptr}; ZmqSocket *zmqSocket{nullptr};
int adcConfigured{-1};
uint64_t fileIndex{0}; uint64_t fileIndex{0};
bool flipRows{false}; bool flipRows{false};
std::map<std::string, std::string> additionalJsonHeader; std::map<std::string, std::string> additionalJsonHeader;
@ -107,8 +106,6 @@ class DataStreamer : private virtual slsDetectorDefs, public ThreadObject {
bool startedFlag{false}; bool startedFlag{false};
uint64_t firstIndex{0}; uint64_t firstIndex{0};
std::string fileNametoStream; std::string fileNametoStream;
/** Complete buffer used for detectorRoi, eg. shortGotthard */
char *completeBuffer{nullptr};
xy numPorts{1, 1}; xy numPorts{1, 1};
bool quadEnable{false}; bool quadEnable{false};

View File

@ -40,13 +40,6 @@ class GeneralData {
uint32_t fifoDepth{0}; uint32_t fifoDepth{0};
int numUDPInterfaces{1}; int numUDPInterfaces{1};
uint32_t headerPacketSize{0}; uint32_t headerPacketSize{0};
/** Streaming (for ROI - mainly short Gotthard) */
uint32_t nPixelsXComplete{0};
/** Streaming (for ROI - mainly short Gotthard) */
uint32_t nPixelsYComplete{0};
/** Streaming (for ROI - mainly short Gotthard) - Image size (in bytes) */
uint32_t imageSizeComplete{0};
/** if standard header implemented in firmware */
bool standardheader{false}; bool standardheader{false};
uint32_t udpSocketBufferSize{RECEIVE_SOCKET_BUFFER_SIZE}; uint32_t udpSocketBufferSize{RECEIVE_SOCKET_BUFFER_SIZE};
uint32_t vetoDataSize{0}; uint32_t vetoDataSize{0};
@ -62,7 +55,6 @@ class GeneralData {
slsDetectorDefs::readoutMode readoutType{slsDetectorDefs::ANALOG_ONLY}; slsDetectorDefs::readoutMode readoutType{slsDetectorDefs::ANALOG_ONLY};
uint32_t adcEnableMaskOneGiga{BIT32_MASK}; uint32_t adcEnableMaskOneGiga{BIT32_MASK};
uint32_t adcEnableMaskTenGiga{BIT32_MASK}; uint32_t adcEnableMaskTenGiga{BIT32_MASK};
slsDetectorDefs::ROI detectorRoi{};
uint32_t counterMask{0}; uint32_t counterMask{0};
uint32_t transceiverMask{0}; uint32_t transceiverMask{0};
slsDetectorDefs::frameDiscardPolicy frameDiscardMode{ slsDetectorDefs::frameDiscardPolicy frameDiscardMode{
@ -84,14 +76,12 @@ class GeneralData {
* Get Header Infomation (frame number, packet number) * Get Header Infomation (frame number, packet number)
* @param index thread index for debugging purposes * @param index thread index for debugging purposes
* @param packetData pointer to data * @param packetData pointer to data
* @param oddStartingPacket odd starting packet (gotthard)
* @param frameNumber frame number * @param frameNumber frame number
* @param packetNumber packet number * @param packetNumber packet number
* @param bunchId bunch Id * @param bunchId bunch Id
*/ */
virtual void GetHeaderInfo(int index, char *packetData, virtual void GetHeaderInfo(int index, char *packetData,
bool oddStartingPacket, uint64_t &frameNumber, uint64_t &frameNumber, uint32_t &packetNumber,
uint32_t &packetNumber,
uint64_t &bunchId) const { uint64_t &bunchId) const {
frameNumber = ((uint32_t)(*((uint32_t *)(packetData)))); frameNumber = ((uint32_t)(*((uint32_t *)(packetData))));
frameNumber++; frameNumber++;
@ -100,16 +90,6 @@ class GeneralData {
bunchId = -1; bunchId = -1;
} }
virtual void SetDetectorROI(slsDetectorDefs::ROI i) {
ThrowGenericError("SetDetectorROI");
};
/**@returns adc configured */
virtual int GetAdcConfigured(int index, slsDetectorDefs::ROI i) const {
ThrowGenericError("GetAdcConfigured");
return 0;
};
virtual void SetDynamicRange(int dr) { virtual void SetDynamicRange(int dr) {
ThrowGenericError("SetDynamicRange"); ThrowGenericError("SetDynamicRange");
}; };
@ -118,11 +98,6 @@ class GeneralData {
ThrowGenericError("SetTenGigaEnable"); ThrowGenericError("SetTenGigaEnable");
}; };
virtual bool SetOddStartingPacket(int index, char *packetData) {
ThrowGenericError("SetOddStartingPacket");
return false;
};
virtual void SetNumberofInterfaces(const int n) { virtual void SetNumberofInterfaces(const int n) {
ThrowGenericError("SetNumberofInterfaces"); ThrowGenericError("SetNumberofInterfaces");
}; };
@ -175,139 +150,6 @@ class GeneralData {
}; };
}; };
class GotthardData : public GeneralData {
private:
const int nChan = 128;
const int nChipsPerAdc = 2;
public:
GotthardData() {
detType = slsDetectorDefs::GOTTHARD;
nPixelsY = 1;
headerSizeinPacket = 6;
framesPerFile = MAX_FRAMES_PER_FILE;
UpdateImageSize();
};
/**
* Get Header Infomation (frame number, packet number)
* @param index thread index for debugging purposes
* @param packetData pointer to data
* @param oddStartingPacket odd starting packet (gotthard)
* @param frameNumber frame number
* @param packetNumber packet number
* @param bunchId bunch Id
*/
void GetHeaderInfo(int index, char *packetData, bool oddStartingPacket,
uint64_t &frameNumber, uint32_t &packetNumber,
uint64_t &bunchId) const {
if (nPixelsX == 1280) {
frameNumber = *reinterpret_cast<uint32_t *>(packetData);
if (oddStartingPacket)
frameNumber++;
packetNumber = frameNumber & packetIndexMask;
frameNumber = (frameNumber & frameIndexMask) >> frameIndexOffset;
} else {
frameNumber = *reinterpret_cast<uint32_t *>(packetData);
packetNumber = 0;
}
bunchId = -1;
}
/** @returns adc configured */
int GetAdcConfigured(int index, slsDetectorDefs::ROI i) const {
int adc = -1;
// single adc
if (i.xmin != -1) {
// gotthard can have only one adc per detector enabled (or all)
// adc = mid value/numchans also for only 1 roi
adc = ((((i.xmax) + (i.xmin)) / 2) / (nChan * nChipsPerAdc));
if ((adc < 0) || (adc > 4)) {
LOG(logWARNING) << index
<< ": Deleting ROI. "
"Adc value should be between 0 and 4";
adc = -1;
}
}
LOG(logINFO) << "Adc Configured: " << adc;
return adc;
};
/**
* Set odd starting packet (gotthard)
* @param index thread index for debugging purposes
* @param packetData pointer to data
* @returns true or false for odd starting packet number
*/
bool SetOddStartingPacket(int index, char *packetData) {
bool oddStartingPacket = true;
// care only if no roi
if (nPixelsX == 1280) {
uint32_t fnum = ((uint32_t)(*((uint32_t *)(packetData))));
uint32_t firstData = ((uint32_t)(*((uint32_t *)(packetData + 4))));
// first packet
if (firstData == 0xCACACACA) {
// packet number should be 0, but is 1 => so odd starting packet
if (fnum & packetIndexMask) {
oddStartingPacket = true;
} else {
oddStartingPacket = false;
}
}
// second packet
else {
// packet number should be 1, but is 0 => so odd starting packet
if (!(fnum & packetIndexMask)) {
oddStartingPacket = true;
} else {
oddStartingPacket = false;
}
}
}
return oddStartingPacket;
};
void SetDetectorROI(slsDetectorDefs::ROI i) {
detectorRoi = i;
UpdateImageSize();
};
private:
void UpdateImageSize() {
// all adcs
if (detectorRoi.xmin == -1) {
nPixelsX = 1280;
dataSize = 1280;
packetsPerFrame = 2;
frameIndexMask = 0xFFFFFFFE;
frameIndexOffset = 1;
packetIndexMask = 1;
framesPerFile = MAX_FRAMES_PER_FILE;
nPixelsXComplete = 0;
nPixelsYComplete = 0;
imageSizeComplete = 0;
fifoDepth = 50000;
} else {
nPixelsX = 256;
dataSize = 512;
packetsPerFrame = 1;
frameIndexMask = 0xFFFFFFFF;
frameIndexOffset = 0;
packetIndexMask = 0;
framesPerFile = SHORT_MAX_FRAMES_PER_FILE;
nPixelsXComplete = 1280;
nPixelsYComplete = 1;
imageSizeComplete = 1280 * 2;
fifoDepth = 75000;
}
imageSize = int(nPixelsX * nPixelsY * GetPixelDepth());
packetSize = headerSizeinPacket + dataSize;
packetsPerFrame = imageSize / dataSize;
};
};
class EigerData : public GeneralData { class EigerData : public GeneralData {
public: public:
@ -502,14 +344,12 @@ class Gotthard2Data : public GeneralData {
* Get Header Infomation (frame number, packet number) for veto packets * Get Header Infomation (frame number, packet number) for veto packets
* @param index thread index for debugging purposes * @param index thread index for debugging purposes
* @param packetData pointer to data * @param packetData pointer to data
* @param oddStartingPacket odd starting packet (gotthard)
* @param frameNumber frame number * @param frameNumber frame number
* @param packetNumber packet number * @param packetNumber packet number
* @param bunchId bunch Id * @param bunchId bunch Id
*/ */
void GetHeaderInfo(int index, char *packetData, bool oddStartingPacket, void GetHeaderInfo(int index, char *packetData, uint64_t &frameNumber,
uint64_t &frameNumber, uint32_t &packetNumber, uint32_t &packetNumber, uint64_t &bunchId) const {
uint64_t &bunchId) const {
frameNumber = *reinterpret_cast<uint64_t *>(packetData); frameNumber = *reinterpret_cast<uint64_t *>(packetData);
bunchId = *reinterpret_cast<uint64_t *>(packetData + 8); bunchId = *reinterpret_cast<uint64_t *>(packetData + 8);
packetNumber = 0; packetNumber = 0;

View File

@ -111,7 +111,6 @@ void Implementation::SetupFifoStructure() {
void Implementation::setDetectorType(const detectorType d) { void Implementation::setDetectorType(const detectorType d) {
switch (d) { switch (d) {
case GOTTHARD:
case EIGER: case EIGER:
case JUNGFRAU: case JUNGFRAU:
case MOENCH: case MOENCH:
@ -131,9 +130,6 @@ void Implementation::setDetectorType(const detectorType d) {
// set detector specific variables // set detector specific variables
switch (d) { switch (d) {
case GOTTHARD:
generalData = new GotthardData();
break;
case EIGER: case EIGER:
generalData = new EigerData(); generalData = new EigerData();
break; break;
@ -1007,7 +1003,6 @@ void Implementation::StartMasterWriter() {
generalData->readoutType == DIGITAL_AND_TRANSCEIVER) generalData->readoutType == DIGITAL_AND_TRANSCEIVER)
? 1 ? 1
: 0; : 0;
masterAttributes.detectorRoi = generalData->detectorRoi;
masterAttributes.counterMask = generalData->counterMask; masterAttributes.counterMask = generalData->counterMask;
masterAttributes.exptimeArray[0] = acquisitionTime1; masterAttributes.exptimeArray[0] = acquisitionTime1;
masterAttributes.exptimeArray[1] = acquisitionTime2; masterAttributes.exptimeArray[1] = acquisitionTime2;
@ -1600,22 +1595,6 @@ void Implementation::setDynamicRange(const uint32_t i) {
LOG(logINFO) << "Dynamic Range: " << generalData->dynamicRange; LOG(logINFO) << "Dynamic Range: " << generalData->dynamicRange;
} }
slsDetectorDefs::ROI Implementation::getROI() const {
return generalData->detectorRoi;
}
void Implementation::setDetectorROI(slsDetectorDefs::ROI arg) {
if (generalData->detectorRoi.xmin != arg.xmin ||
generalData->detectorRoi.xmax != arg.xmax) {
// only for gotthard
generalData->SetDetectorROI(arg);
SetupFifoStructure();
}
LOG(logINFO) << "Detector ROI: " << ToString(generalData->detectorRoi);
LOG(logINFO) << "Packets per Frame: " << (generalData->packetsPerFrame);
}
bool Implementation::getTenGigaEnable() const { bool Implementation::getTenGigaEnable() const {
return generalData->tengigaEnable; return generalData->tengigaEnable;
} }

View File

@ -211,9 +211,6 @@ class Implementation : private virtual slsDetectorDefs {
void setCounterMask(const uint32_t i); void setCounterMask(const uint32_t i);
uint32_t getDynamicRange() const; uint32_t getDynamicRange() const;
void setDynamicRange(const uint32_t i); void setDynamicRange(const uint32_t i);
ROI getROI() const;
/* [Gotthard] */
void setDetectorROI(ROI arg);
bool getTenGigaEnable() const; bool getTenGigaEnable() const;
/* [Eiger][Ctb] */ /* [Eiger][Ctb] */
void setTenGigaEnable(const bool b); void setTenGigaEnable(const bool b);

View File

@ -350,8 +350,6 @@ uint32_t Listener::ListenToAnImage(sls_receiver_header &dstHeader,
carryOverFlag = false; carryOverFlag = false;
} }
// until last packet isHeaderEmpty to account for gotthard short frame, else
// never entering this loop)
while (numpackets < pperFrame) { while (numpackets < pperFrame) {
// listen to new packet // listen to new packet
if (!udpSocketAlive || !udpSocket->ReceivePacket(&listeningPacket[0])) { if (!udpSocketAlive || !udpSocket->ReceivePacket(&listeningPacket[0])) {
@ -463,15 +461,6 @@ void Listener::CopyPacket(char *dst, char *src, uint32_t dataSize,
// copy packet data // copy packet data
switch (generalData->detType) { switch (generalData->detType) {
// for gotthard,
// 1st packet: 4 bytes fnum, CACA + CACA, 639*2 bytes data
// 2nd packet: 4 bytes fnum, previous 1*2 bytes data + 640*2 bytes data
case GOTTHARD:
if (!pnum)
memcpy(dst, &src[detHeaderSize + 2], dataSize - 2);
else
memcpy(dst + dataSize - 2, &src[detHeaderSize - 2], dataSize + 2);
break;
case CHIPTESTBOARD: case CHIPTESTBOARD:
case XILINX_CHIPTESTBOARD: case XILINX_CHIPTESTBOARD:
if (pnum == (generalData->packetsPerFrame - 1)) if (pnum == (generalData->packetsPerFrame - 1))
@ -517,14 +506,7 @@ void Listener::GetPacketIndices(uint64_t &fnum, uint32_t &pnum, uint64_t &bnum,
fnum = header->frameNumber; fnum = header->frameNumber;
pnum = header->packetNumber; pnum = header->packetNumber;
} else { } else {
// set first packet to be odd or even (check required when switching generalData->GetHeaderInfo(index, &packet[0], fnum, pnum, bnum);
// from roi to no roi)
if (generalData->detType == GOTTHARD && !startedFlag) {
oddStartingPacket =
generalData->SetOddStartingPacket(index, &packet[0]);
}
generalData->GetHeaderInfo(index, &packet[0], oddStartingPacket, fnum,
pnum, bnum);
} }
} }

View File

@ -156,12 +156,6 @@ class Listener : private virtual slsDetectorDefs, public ThreadObject {
// for print progress during acquisition*/ // for print progress during acquisition*/
uint32_t numPacketsStatistic{0}; uint32_t numPacketsStatistic{0};
uint32_t numFramesStatistic{0}; uint32_t numFramesStatistic{0};
/**
* starting packet number is odd or even, accordingly increment frame number
* to get first packet number as 0
* (pecific to gotthard, can vary between modules, hence defined here) */
bool oddStartingPacket{true};
}; };
} // namespace sls } // namespace sls

View File

@ -10,9 +10,6 @@ void MasterAttributes::GetBinaryAttributes(
w->StartObject(); w->StartObject();
GetCommonBinaryAttributes(w); GetCommonBinaryAttributes(w);
switch (detType) { switch (detType) {
case slsDetectorDefs::GOTTHARD:
GetGotthardBinaryAttributes(w);
break;
case slsDetectorDefs::JUNGFRAU: case slsDetectorDefs::JUNGFRAU:
GetJungfrauBinaryAttributes(w); GetJungfrauBinaryAttributes(w);
break; break;
@ -45,9 +42,6 @@ void MasterAttributes::GetBinaryAttributes(
void MasterAttributes::WriteHDF5Attributes(H5::H5File *fd, H5::Group *group) { void MasterAttributes::WriteHDF5Attributes(H5::H5File *fd, H5::Group *group) {
WriteCommonHDF5Attributes(fd, group); WriteCommonHDF5Attributes(fd, group);
switch (detType) { switch (detType) {
case slsDetectorDefs::GOTTHARD:
WriteGotthardHDF5Attributes(fd, group);
break;
case slsDetectorDefs::JUNGFRAU: case slsDetectorDefs::JUNGFRAU:
WriteJungfrauHDF5Attributes(fd, group); WriteJungfrauHDF5Attributes(fd, group);
break; break;
@ -385,23 +379,6 @@ void MasterAttributes::WriteHDF5TenGiga(H5::H5File *fd, H5::Group *group) {
dataset.write(&tenGiga, H5::PredType::NATIVE_INT); dataset.write(&tenGiga, H5::PredType::NATIVE_INT);
} }
void MasterAttributes::WriteHDF5ROI(H5::H5File *fd, H5::Group *group) {
// Roi xmin
{
H5::DataSpace dataspace = H5::DataSpace(H5S_SCALAR);
H5::DataSet dataset = group->createDataSet(
"roi xmin", H5::PredType::NATIVE_INT, dataspace);
dataset.write(&detectorRoi.xmin, H5::PredType::NATIVE_INT);
}
// Roi xmax
{
H5::DataSpace dataspace = H5::DataSpace(H5S_SCALAR);
H5::DataSet dataset = group->createDataSet(
"roi xmax", H5::PredType::NATIVE_INT, dataspace);
dataset.write(&detectorRoi.xmax, H5::PredType::NATIVE_INT);
}
}
void MasterAttributes::WriteHDF5NumUDPInterfaces(H5::H5File *fd, void MasterAttributes::WriteHDF5NumUDPInterfaces(H5::H5File *fd,
H5::Group *group) { H5::Group *group) {
H5::DataSpace dataspace = H5::DataSpace(H5S_SCALAR); H5::DataSpace dataspace = H5::DataSpace(H5S_SCALAR);
@ -606,30 +583,6 @@ void MasterAttributes::WriteHDF5TransceiverSamples(H5::H5File *fd,
} }
#endif #endif
void MasterAttributes::GetGotthardBinaryAttributes(
rapidjson::PrettyWriter<rapidjson::StringBuffer> *w) {
w->Key("Exptime");
w->String(ToString(exptime).c_str());
w->Key("Period");
w->String(ToString(period).c_str());
w->Key("Detector Roi");
w->StartObject();
w->Key("xmin");
w->Uint(detectorRoi.xmin);
w->Key("xmax");
w->Uint(detectorRoi.xmax);
w->EndObject();
};
#ifdef HDF5C
void MasterAttributes::WriteGotthardHDF5Attributes(H5::H5File *fd,
H5::Group *group) {
MasterAttributes::WriteHDF5Exptime(fd, group);
MasterAttributes::WriteHDF5Period(fd, group);
MasterAttributes::WriteHDF5ROI(fd, group);
}
#endif
void MasterAttributes::GetJungfrauBinaryAttributes( void MasterAttributes::GetJungfrauBinaryAttributes(
rapidjson::PrettyWriter<rapidjson::StringBuffer> *w) { rapidjson::PrettyWriter<rapidjson::StringBuffer> *w) {
w->Key("Exptime"); w->Key("Exptime");

View File

@ -56,7 +56,6 @@ class MasterAttributes {
uint32_t transceiverMask{0}; uint32_t transceiverMask{0};
uint32_t transceiver{0}; uint32_t transceiver{0};
uint32_t transceiverSamples{0}; uint32_t transceiverSamples{0};
slsDetectorDefs::ROI detectorRoi{};
slsDetectorDefs::ROI receiverRoi{}; slsDetectorDefs::ROI receiverRoi{};
uint32_t counterMask{0}; uint32_t counterMask{0};
std::array<ns, 3> exptimeArray{}; std::array<ns, 3> exptimeArray{};
@ -85,7 +84,6 @@ class MasterAttributes {
void WriteHDF5Period(H5::H5File *fd, H5::Group *group); void WriteHDF5Period(H5::H5File *fd, H5::Group *group);
void WriteHDF5DynamicRange(H5::H5File *fd, H5::Group *group); void WriteHDF5DynamicRange(H5::H5File *fd, H5::Group *group);
void WriteHDF5TenGiga(H5::H5File *fd, H5::Group *group); void WriteHDF5TenGiga(H5::H5File *fd, H5::Group *group);
void WriteHDF5ROI(H5::H5File *fd, H5::Group *group);
void WriteHDF5NumUDPInterfaces(H5::H5File *fd, H5::Group *group); void WriteHDF5NumUDPInterfaces(H5::H5File *fd, H5::Group *group);
void WriteHDF5ReadNRows(H5::H5File *fd, H5::Group *group); void WriteHDF5ReadNRows(H5::H5File *fd, H5::Group *group);
void WriteHDF5ThresholdEnergy(H5::H5File *fd, H5::Group *group); void WriteHDF5ThresholdEnergy(H5::H5File *fd, H5::Group *group);
@ -111,12 +109,6 @@ class MasterAttributes {
void WriteHDF5TransceiverSamples(H5::H5File *fd, H5::Group *group); void WriteHDF5TransceiverSamples(H5::H5File *fd, H5::Group *group);
#endif #endif
void GetGotthardBinaryAttributes(
rapidjson::PrettyWriter<rapidjson::StringBuffer> *w);
#ifdef HDF5C
void WriteGotthardHDF5Attributes(H5::H5File *fd, H5::Group *group);
#endif
void GetJungfrauBinaryAttributes( void GetJungfrauBinaryAttributes(
rapidjson::PrettyWriter<rapidjson::StringBuffer> *w); rapidjson::PrettyWriter<rapidjson::StringBuffer> *w);
#ifdef HDF5C #ifdef HDF5C

View File

@ -57,9 +57,6 @@ struct image_structure {
// parameters to calculate fifo depth // parameters to calculate fifo depth
#define SAMPLE_TIME_IN_NS (100000000) // 100ms #define SAMPLE_TIME_IN_NS (100000000) // 100ms
// to differentiate between gotthard and short gotthard
#define GOTTHARD_PACKET_SIZE (1286)
#define DUMMY_PACKET_VALUE (0xFFFFFFFF) #define DUMMY_PACKET_VALUE (0xFFFFFFFF)
#define LISTENER_PRIORITY (90) #define LISTENER_PRIORITY (90)

View File

@ -53,30 +53,3 @@
// CHECK(bunchId == 0xf012fb20010f195b); // CHECK(bunchId == 0xf012fb20010f195b);
// CHECK(subFrameNumber == -1); // CHECK(subFrameNumber == -1);
// } // }
// TEST_CASE("Parse header gotthard data", "[receiver]") {
// GotthardData data;
// struct packet {
// uint32_t frameNumber;
// unsigned char data[GOTTHARD_PACKET_SIZE];
// } __attribute__((packed));
// packet test_packet;
// test_packet.frameNumber = 25698u;
// int index = 0;
// char *packetData = reinterpret_cast<char *>(&test_packet);
// uint32_t dynamicRange{0};
// bool oddStartingPacket{0};
// uint64_t frameNumber{0};
// uint32_t packetNumber{0};
// uint32_t subFrameNumber{0};
// uint64_t bunchId{0};
// data.GetHeaderInfo(index, packetData, dynamicRange, oddStartingPacket,
// frameNumber, packetNumber, subFrameNumber, bunchId);
// CHECK(frameNumber == test_packet.frameNumber/2);
// CHECK(subFrameNumber == -1);
// CHECK(bunchId == -1);
// }

View File

@ -92,7 +92,7 @@ class slsDetectorDefs {
enum detectorType { enum detectorType {
GENERIC, GENERIC,
EIGER, EIGER,
GOTTHARD, GOTTHARD /** deprecated */,
JUNGFRAU, JUNGFRAU,
CHIPTESTBOARD, CHIPTESTBOARD,
MOENCH, MOENCH,
@ -333,13 +333,9 @@ typedef struct {
VTHRESHOLD, VTHRESHOLD,
IO_DELAY, IO_DELAY,
VREF_DS, VREF_DS,
VCASCN_PB,
VCASCP_PB,
VOUT_CM, VOUT_CM,
VCASC_OUT,
VIN_CM, VIN_CM,
VREF_COMP, VREF_COMP,
IB_TESTC,
VB_COMP, VB_COMP,
VDD_PROT, VDD_PROT,
VIN_COM, VIN_COM,
@ -648,7 +644,6 @@ enum streamingInterface {
readoutMode roMode{ANALOG_ONLY}; readoutMode roMode{ANALOG_ONLY};
uint32_t adcMask{0}; uint32_t adcMask{0};
uint32_t adc10gMask{0}; uint32_t adc10gMask{0};
ROI roi;
uint32_t countermask{0}; uint32_t countermask{0};
burstMode burstType{BURST_INTERNAL}; burstMode burstType{BURST_INTERNAL};
int64_t expTime1Ns{0}; int64_t expTime1Ns{0};
@ -704,12 +699,7 @@ struct detParameters {
explicit detParameters(slsDetectorDefs::detectorType type) { explicit detParameters(slsDetectorDefs::detectorType type) {
switch (type) { switch (type) {
case slsDetectorDefs::detectorType::GOTTHARD: case slsDetectorDefs::detectorType::GOTTHARD:
nChanX = 128; throw sls::RuntimeError("Gotthard is deprecated from v10.0.0!");
nChanY = 1;
nChipX = 10;
nChipY = 1;
nDacs = 8;
break;
case slsDetectorDefs::detectorType::MOENCH: case slsDetectorDefs::detectorType::MOENCH:
nChanX = 400; nChanX = 400;
nChanY = 400; nChanY = 400;

View File

@ -60,7 +60,7 @@ enum detFuncs {
F_SET_STORAGE_CELL_DELAY, F_SET_STORAGE_CELL_DELAY,
F_GET_FRAMES_LEFT, F_GET_FRAMES_LEFT,
F_GET_TRIGGERS_LEFT, F_GET_TRIGGERS_LEFT,
F_GET_EXPTIME_LEFT, F_GET_EXPTIME_LEFT /** deprecated, kept for backward compatibility */,
F_GET_PERIOD_LEFT, F_GET_PERIOD_LEFT,
F_GET_DELAY_AFTER_TRIGGER_LEFT, F_GET_DELAY_AFTER_TRIGGER_LEFT,
F_GET_MEASURED_PERIOD, F_GET_MEASURED_PERIOD,
@ -69,8 +69,8 @@ enum detFuncs {
F_GET_ACTUAL_TIME, F_GET_ACTUAL_TIME,
F_GET_MEASUREMENT_TIME, F_GET_MEASUREMENT_TIME,
F_SET_DYNAMIC_RANGE, F_SET_DYNAMIC_RANGE,
F_SET_ROI, F_SET_ROI /** deprecated, kept for backward compatibility */,
F_GET_ROI, F_GET_ROI /** deprecated, kept for backward compatibility */,
F_LOCK_SERVER, F_LOCK_SERVER,
F_GET_LAST_CLIENT_IP, F_GET_LAST_CLIENT_IP,
F_ENABLE_TEN_GIGA, F_ENABLE_TEN_GIGA,

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