diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index ee5446272..107e1c436 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/checkout@v3 - uses: awalsh128/cache-apt-pkgs-action@latest with: - packages: libzmq3-dev libhdf5-dev qtbase5-dev qt5-qmake libqt5svg5-dev + packages: libhdf5-dev qtbase5-dev qt5-qmake libqt5svg5-dev version: 1.0 - name: Configure CMake diff --git a/CMakeFiles/cmake.check_cache b/CMakeFiles/cmake.check_cache new file mode 100644 index 000000000..3dccd7317 --- /dev/null +++ b/CMakeFiles/cmake.check_cache @@ -0,0 +1 @@ +# This file is generated by cmake for dependency checking of the CMakeCache.txt file diff --git a/CMakeLists.txt b/CMakeLists.txt index 39103a84b..1313c48bb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,15 @@ # Copyright (C) 2021 Contributors to the SLS Detector Package cmake_minimum_required(VERSION 3.14) project(slsDetectorPackage) -set(PROJECT_VERSION 8.0.2) + +# Read VERSION file into project version +set(VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/VERSION") +file(READ "${VERSION_FILE}" VERSION_CONTENT) +string(STRIP "${VERSION_CONTENT}" PROJECT_VERSION_STRING) +set(PROJECT_VERSION ${PROJECT_VERSION_STRING}) + +# Pass it to the compiler +add_compile_definitions(SLS_DET_VERSION="${PROJECT_VERSION}") set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG") @@ -148,7 +156,6 @@ set(SLS_INTERNAL_QWT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libs/qwt-6.1.5) set(ClangFormat_EXCLUDE_PATTERNS "build/" "libs/" "slsDetectorCalibration/" - "ctbGui/" "manual/" "python/" "sample/" @@ -232,6 +239,8 @@ if (NOT TARGET slsProjectCSettings) -Wredundant-decls -Wdouble-promotion -Werror=return-type + -Wno-format-overflow + -Wno-format-truncation ) sls_disable_c_warning("-Wstringop-truncation") endif() @@ -244,6 +253,7 @@ if(SLS_USE_SANITIZER) # target_link_libraries(slsProjectOptions INTERFACE -fsanitize=thread) endif() + if(SLS_TUNE_LOCAL) target_compile_options(slsProjectOptions INTERFACE -mtune=native -march=native) endif() @@ -294,19 +304,20 @@ if (SLS_USE_INTEGRATION_TESTS) endif (SLS_USE_INTEGRATION_TESTS) if (SLS_USE_PYTHON) - find_package (Python 3.6 COMPONENTS Interpreter Development) + find_package (Python 3.8 COMPONENTS Interpreter Development) if(SLS_FETCH_PYBIND11_FROM_GITHUB) FetchContent_Declare( pybind11 GIT_REPOSITORY https://github.com/pybind/pybind11 - GIT_TAG v2.11.0 + GIT_TAG v2.13.6 ) else() + # https://github.com/pybind/pybind11/releases FetchContent_Declare( pybind11 - URL ${CMAKE_SOURCE_DIR}/libs/pybind11/v2.11.0.tar.gz - URL_HASH MD5=90c4946e87c64d8d8fc0ae4edf35d780 + URL ${CMAKE_CURRENT_SOURCE_DIR}/libs/pybind11/v2.13.6.tar.gz + URL_HASH MD5=a04dead9c83edae6d84e2e343da7feeb ) endif() FetchContent_MakeAvailable(pybind11) @@ -315,7 +326,7 @@ if (SLS_USE_PYTHON) endif(SLS_USE_PYTHON) if (SLS_USE_CTBGUI) - add_subdirectory(ctbGui) + add_subdirectory(pyctbgui) endif(SLS_USE_CTBGUI) configure_file( .clang-tidy @@ -344,4 +355,4 @@ if(SLS_MASTER_PROJECT) set(CMAKE_INSTALL_DIR "share/cmake/${PROJECT_NAME}") set(PROJECT_LIBRARIES slsSupportShared slsDetectorShared slsReceiverShared) include(cmake/package_config.cmake) -endif() +endif() \ No newline at end of file diff --git a/README.md b/README.md index abee0e773..ebd84e4d0 100755 --- a/README.md +++ b/README.md @@ -2,7 +2,11 @@ Before building from source make sure that you have the [software wiki](https://slsdetectorgroup.github.io/devdoc/dependencies.html) installed. If installing using conda, conda will manage the dependencies. Avoid also installing packages with pip. ## Documentaion -Detailed documentation can be found in the [software wiki](https://slsdetectorgroup.github.io/devdoc/index.html) and on the [official site](https://www.psi.ch/en/detectors/software). +Detailed documentation including installation can be found in the [software wiki](https://slsdetectorgroup.github.io/devdoc/index.html). + +Different releases can be found on the [official site](https://www.psi.ch/en/lxn/software-releases). + +Firmware compatiblity can be found in [firmware page](https://github.com/slsdetectorgroup/slsDetectorFirmware) ## Installation @@ -42,33 +46,20 @@ conda search slsdet conda search slsdetgui ``` -### 2. Build from source +## 2. Build from source -##### 2.1 Download Source Code from github +### 2.1 Download Source Code from github ``` git clone https://github.com/slsdetectorgroup/slsDetectorPackage.git --branch 7.0.0 ``` -**Pybind for Python**
-* **v7.0.0+**: -pybind11 packaged into 'libs/pybind'. No longer a submodule. No need for "recursive" or "submodule update". - -* **Older versions**: - pybind11 is a submodule. Must be cloned using "recursive" and updated when switching between versions using the following commands. - -``` -# clone using recursive to get pybind11 submodule -git clone --recursive https://github.com/slsdetectorgroup/slsDetectorPackage.git - -# update submodule when switching between releases -cd slsDetectorPackage -git submodule update --init -``` - -##### 2.2 Build from source +> **Note:** For v6.x.x of slsDetectorPackage and older, refer [pybind11 notes on cloning](#Pybind-and-Zeromq). -###### Build using CMake +### 2.2 Build from source + + +### Build using CMake ``` # outside slsDetecorPackage folder @@ -94,26 +85,28 @@ Instead of the cmake command, one can use ccmake to get a list of options to con ccmake .. # choose the options -# first press [c] - configure +# first press [c] - configure (unil you see [g]) # then press [g] - generate ``` |Example cmake options|Comment| |---|---| | -DSLS_USE_PYTHON=ON | Python | -| -DPython_FIND_VIRTUALENV=ONLY | Python from only the conda environment | -| -DZeroMQ_HINT=/usr/lib64 | Use system zmq instead | +| -DPython_FIND_VIRTUALENV=ONLY | Python from only the conda env | | -DSLS_USE_GUI=ON | GUI | +| -DSLS_USE_HDF5=ON | HDF5 | +| -DSLS_USE_SIMULATOR=ON | Simulator | +> **Note:** For v7.x.x of slsDetectorPackage and older, refer [zeromq notes for cmake option to hint library location](#Pybind-and-Zeromq). -###### Build using in-built cmk.sh script +### Build using in-built cmk.sh script ``` The binaries are generated in slsDetectorPackage/build/bin directory. -Usage: ./cmk.sh [-b] [-c] [-d ] [e] [g] [-h] [i] [-j ] -[-k ] [-l ] [m] [n] [-p] [-q ] -[r] [s] [t] [u] [z] +Usage: $0 [-b] [-c] [-d ] [-e] [-g] [-h] [-i] +[-j ] [-k ] [-l ] +[-m] [-n] [-p] [-r] [-s] [-t] [-u] [-z] -[no option]: only make -b: Builds/Rebuilds CMake files normal mode -c: Clean @@ -128,14 +121,13 @@ Usage: ./cmk.sh [-b] [-c] [-d ] [e] [g] [-h] [i] [-j ] [e] [g] [-h] [i] [-j **Note:** For v7.x.x of slsDetectorPackage and older, refer [zeromq notes for cmk script option to hint library location](#Pybind-and-Zeromq). + +### Build on old distributions If your linux distribution doesn't come with a C++11 compiler (gcc>4.8) then it's possible to install a newer gcc using conda and build the slsDetectorPackage @@ -166,7 +161,10 @@ cmake ../slsDetectorPackage -DCMAKE_PREFIX_PATH=$CONDA_PREFIX make -j12 ``` -###### Build slsDetectorGui (Qt5) +> **Note:** For v7.x.x of slsDetectorPackage and older, refer [zeromq notes for dependencies for conda](#Pybind-and-Zeromq). + + +### Build slsDetectorGui (Qt5) 1. Using pre-built binary on conda ``` @@ -180,7 +178,14 @@ yum install qt5-qtbase-devel.x86_64 yum install qt5-qtsvg-devel.x86_64 ``` -3. Using conda +3. Using system installation on RHEL8 +``` +yum install qt5-qtbase-devel.x86_64 +yum install qt5-qtsvg-devel.x86_64 +yum install expat-devel.x86_64 +``` + +4. Using conda ``` #Add channels for dependencies and our library conda config --add channels conda-forge @@ -208,13 +213,15 @@ cd slsDetectorPackage ./cmk.sh -cbgj9 ``` -###### Build documentation from package +> **Note:** For v7.x.x of slsDetectorPackage and older, refer [zeromq notes for dependencies for conda](#Pybind-and-Zeromq). + +### Build documentation from package The documentation for the slsDetectorPackage is build using a combination of Doxygen, Sphinx and Breathe. The easiest way to install the dependencies is to use conda ``` -conda create -n myenv python sphinx_rtd_theme breathe +conda create -n myenv python=3.12 sphinx sphinx_rtd_theme breathe doxygen numpy ``` ``` @@ -228,6 +235,47 @@ make rst # rst only, saves time in case the API did not change ``` + +## Pybind and Zeromq + +### Pybind11 for Python +**v8.0.0+**: +pybind11 is built +* by default from tar file in repo (libs/pybind/v2.1x.0.tar.gz) +* or use advanced option SLS_FETCH_PYBIND11_FROM_GITHUB [link]. + * v9.0.0+: pybind11 (v2.13.6) + * v8.x.x : pybind11 (v2.11.0) + +**v7.x.x**: +pybind11 packaged into ‘libs/pybind’. No longer a submodule. No need for “recursive” or “submodule update”. + +**Older versions**: +pybind11 is a submodule. Must be cloned using “recursive” and updated when switching between versions using the following commands. + +``` +# Note: Only for v6.x.x versions and older + +# clone using recursive to get pybind11 submodule +git clone --recursive https://github.com/slsdetectorgroup/slsDetectorPackage.git + +# update submodule when switching between releases +cd slsDetectorPackage +git submodule update --init +``` + +### Zeromq +**v8.0.0+**: +zeromq (v4.3.4) is built +* by default from tar file in repo (libs/libzmq/libzmq-4.3.4.tar.gz) +* or use advanced option SLS_FETCH_ZMQ_FROM_GITHUB [link]. + +**v7.x.x and older**: +zeromq-devel must be installed and one can hint its location using +* cmake option:’-DZeroMQ_HINT=/usr/lib64’ or +* option ‘-q’ in cmk.sh script: : ./cmk.sh -cbj5 -q /usr/lib64 +* ‘zeromq’ dependency added when installing using conda + + ## Support dhanya.thattil@psi.ch - erik.frojdh@psi.ch + erik.frojdh@psi.ch \ No newline at end of file diff --git a/RELEASE.txt b/RELEASE.txt index 390880d9e..3d6916213 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -1,123 +1,284 @@ -SLS Detector Package Bug Fix Release 8.0.2 released on 18.09.2024 -================================================================= +SLS Detector Package Major Release 9.0.0 released on 25.11.2024 +=============================================================== -This document describes the differences between v8.0.2 and v8.0.1 +This document describes the differences between v9.0.0 and v8.0.2 CONTENTS -------- - 1 Resolved Issues - 2 On-board Detector Server Compatibility - 3 Firmware Requirements - 4 Kernel Requirements - 5 Download, Documentation & Support + 1 Compilation Changes + 2 New or Changed Features + 2.1 Breaking API + 2.2 Resolved or Changed Features + 2.3 New Features + 3 On-board Detector Server Compatibility + 4 Firmware Requirements + 5 Kernel Requirements + 6 Download, Documentation & Support -1 Resolved Issues -================= +2 Compilation Changes +===================== - Compilation - ----------- + * Python version + Minimum python version is changed from 3.6 to 3.8 - * Rapidjson compilation with gcc 14 - Fixed a compile issue with gcc 14. Same fix in later commits to rapidjson. + * Pybind11 version + In-built version and the one picked up from github + updated from v2.11.0 to v2.13.6 - Client - ------ + * Python lib versioning + slsdet.__version__ now returns the package release version. - * getenv("HOME") returning nullptr - When this happens, especially for systemd, it segfaults. Protection - provided by using empty string in this case. + * Python version in conda build + Added python 3.13 also to conda build - * [Mythen3] Bad channel list for multi module - Exception thrown when loading multi module bad channel file skipping - modules in between. Fixed. + +2 New, Changed or Resolved Features +===================================== - * [Gotthard2] Stopping a blocking acquisition - A check added in v8.0.0 to catch slaves that might be in waiting forever - also catches Gotthard2 25um slaves that might only be in waiting - temporarily. This is fixed with a 50ms sleep before checking again - (upto 1s). - - * [Moench] Acquire finished processing call back - New executable 'sls_detector_acquire_zmq' added to listen to all zmq - packets from post processor or external process to signal end of post - processing. Post processor refactoring of zmq socket creation added. - - - Gui / Callback - -------------- - - - * [Gotthard2] Stopping a blocking acquisition - From the previous issue, call back for acquisition finished status gives - error for inconsistent states. Again, a check every 50ms upto 1s is - added to let go the temporarily waiting slave. - - - * Different file paths - Fixes file path resetting when different modules have different fpath set. +2.1 Breaking API +================== Receiver -------- - * HDF5 fill value - Fix the fill value to accomodate all datatypes. + * Receiver callbacks + Brought much more metadata to receiver callbacks to construct the image. + Update MultiReceiverApp to reflect this change. - - Firmware + + * File path + At start of acquisition or at rx_start command, the file path is only + then verified if it exists and created if it does not. + + + Client + ------ + + + * Removed receiver/publisher ZMQ IP + Command line: rx_zmqip gives a warning and does nothing + Python : rx_zmqip removed + C++ API: get/setRxZmqIP removed + + Publisher zmq IP set to '0.0.0.0' or to listen on all interfaces. + The publisher will determine which interface to stream out from based on + the network route to the subscriber IP. Hence, receiver zmq IP is not + required. + + + * Write register, Set or Clear bit + Validation for this advanced feature has been removed by default. + One can force validation by using --validate in the command line or by + setting the validate option in the API. + + + ZMQ + --- + + + * Publisher socket constructor does not take an IP anymore. + The details are above under 'Removed receiver/publisher ZMQ IP'. + + + GUI/ Client Callback + -------------------- + + + * completeImage member in detectorData attribute now returns false only + if any the sub images (from different udp ports) have completeImage + set to false in the JSON header. This is set if therea are any missing + packets for that udp port on slsReceiver/slsMultiReceiver. + + The different subimages are anyway not synchronized. This errs when + there are different missing images across multiple UDP ports. + + The Gui does not show "complete image" in the status bar anymore. + If any of the udp ports have missing packets for that current disaplayed + image, then the "missing packets" will show in red in the status bar. + + + Detector Server + --------------- + + + * [Mythen3] Only run clock can be set + Clock 0 is now the run clock and the only one that can be set. + The others are be read only. + This affects the following commands: + Command line or python API: clkdiv, clkfreq, clkphase, maxclkphaseshift + C++ API: get/setClockDivider, getClockFrequency, get/setClockPhase, + getMaxClockPhaseShift + + + * [Jungfrau] Temperature Control + Temperature control is enabled by default at on-board detector server + startup. + As before, the default temperature threshold is 65°C and crossing this + value will set a temperature event. + + + +2.2 Resolved or Changed Features +================================ + + + Compilation + ----------- + + + * cmake_source_dir + Fixed compilation error when using python and adding the slsDetectorPackage + as a subfolder due to cmake source directory changing. + + + Client + ------ + + + * Command line Code Generation + The command line parsing code is now generated from a yaml file. This is + transparent to the user. + + + * Clearer error message about freeing shared memory. + + + Detector Server + --------------- + + + * [Gotthard2] Chip reconfiguration + + - Powering off/on the chip will now switch off chip configuration + property/ configure the chip every time. + + - Switching off high voltage from a non zero value will now wait + 10s to return for safety reasons. + + - Powering off the chip requires high voltage to have been + switched off prior. + + - Acquisition requires chip to have been configured prior. + + + * [Gotthard2] Burst mode options restricted + Burst mode external and continuous mode internal are not allowed to be set + anymore as they are anyway not implemented. + + + Receiver -------- - * [Moench] Overflow with exptime of 0 - Fixed overflow when subtracting 1 clock cycle from exptime. + * [Gotthard I] fixed header stripping fixing segfault. - On-board Detector Server - ------------------------ + * Error or help message for invalid arguments to slsMultiReceiver. - * [Moench] Few changes in Server: - - Max shifts of adc clock changed from 240 to 200. - - - Fixed overflow when subtracting 2 clock cycles from exptime of 0ms. - - - Default readout speed to half speed from quarter. - - - Change default ADC phase to 150 for full readout speed. - - - Change default vipre_cds dac from 800 to 1280. + Simulator + --------- - * [Mythen3] Change Clk divider from 10 (100MHz) to 20 (50MHz) at startup. + * Refactored stop server to have better start up. - * [Jungfrau] Fix for HW v1.0 boards for unreliable ADC 2 - Issues sometimes seen on some HW v 1.0 boards are fixed with phase - relationship of 120 degrees. HW v2.0 boards are not affected. + * Fixed possible memory leak when taking non blocking acquisitions. + + + * [Jungfrau] Valid gain values in data sent out. Previously, 2 was also sent out. + + + ZMQ + --- + + + * Publiser socket constructor + + - enables keep alive socket options to send heartbeat messages to prevent + discarded TCP flows if there is no packet for a longer period. + + - enables IPv6 interfaces + + * Prints specific error for ENOENT (endpoint does not exist) + + + +2.3 New Features +================ + + + Client + ------ + + + * Auto completion + bash_autocomplete.sh or zsh_autocomplete.sh must be sourced from the + main package folder to enable auto completion of commands and arguments + for the command line on that shell. + + + * sls_detector + New executable that can be used instead of 'sls_detector_get' and + 'sls_detector_put' for most commands. It will infer from the number of + arguments, which executable (sls_detector_put or sls_detector_get) to use. + For the rare commands that cannot be inferred from the number of arguments, + it will complain accordingly. + + + * [Jungfrau] Timing Info Decoder (Advanced configuration) + Command line or python API: timing_info_decoder + C++ API: get/setTimingInfoDecoder. Options: SWISSFEL (Default), SHINE + + + * [Jungfrau] Collection Mode (Advanced configuration) + Command line or python API: collectionmode + C++ API: get/setCollectionMode. Options: ELECTRON, HOLE (Default) + If chip v1.1, also configures the chip afterwards. + + * [Gotthard2] Next frame number + 'Stop' in G2 25um is not synchronous and hence might trigger an extra set + of frames in the slave module, resulting in the next acquiistion starting + with inconsistent frame numbers between master and slave. Solved by + setting next frame number to the larger value (max + 1) after a stop command. + Requires a firmware update. - Documentation - ------------- + Command line or python API: nextframenumber + C++ API: get/setNextFrameNumber + Can set/get the starting frame number for the next acquistion. - * Updated troubleshooting documentaion to check links and disable firewall + * [Mythen3] Readout speed + Command line, python API: readoutspeed. Options: full_speed (10MHz), + half_speed (20MHz, default), quarter_speed (40MHz) + C++ API: get/setReadoutSpeed + Also affect: + Command line, python API: readoutspeedlist + C++ API: getReadoutSpeedList - * Excluded non UTF-8 encoded libzmq documents due to machine dependent - compilation issues. + * Sleep + Command line, python/ C++ API: sleep + Client sleeps for required time. Advanced command mainly for firmware + developers to use in config files. + + + * Xilinx Chip Test Board added @@ -125,20 +286,24 @@ This document describes the differences between v8.0.2 and v8.0.1 ========================================== - Eiger 8.0.0 - Jungfrau 8.0.2 - Mythen3 8.0.2 - Gotthard2 8.0.0 - Gotthard 8.0.0 - Moench 8.0.2 - Ctb 8.0.0 - + Eiger 9.0.0 + Jungfrau 9.0.0 + Mythen3 9.0.0 + Gotthard2 9.0.0 + Gotthard 9.0.0 + Moench 9.0.0 + On-board Detector Server Upgrade -------------------------------- From v6.1.0 (without tftp): - Using command 'updatedetectorserver' + update only on-board detector server + Using command 'updatedetectorserver' + + + udpate both on-board detector server and firmware simultaneously + Using command 'update' Instructions available at https://slsdetectorgroup.github.io/devdoc/serverupgrade.html @@ -155,18 +320,15 @@ This document describes the differences between v8.0.2 and v8.0.1 Jungfrau 20.09.2023 (v1.5, HW v1.0) (updated in 8.0.0) 21.09.2023 (v2.5, HW v2.0) (updated in 8.0.0) - Mythen3 24.01.2023 (v1.4) (updated in 7.0.0) + Mythen3 13.11.2024 (v2.0) (updated in 9.0.0) - Gotthard2 23.11.2022 (v0.3) (updated in 7.0.0) + Gotthard2 03.10.2024 (v1.0) (updated in 9.0.0) + + Moench 26.10.2023 (v2.0) (updated in 8.0.2) Gotthard 08.02.2018 (50um and 25um Master) 09.02.2018 (25 um Slave) - Moench 26.10.2023 (v0.3.2) (updated in 8.0.2, - under development) - - Ctb 28.08.2023 (v1.2) (updated in 8.0.0) - Detector Upgrade ---------------- @@ -178,16 +340,15 @@ This document describes the differences between v8.0.2 and v8.0.1 Mythen3 via command <.rbf> Gotthard2 via command <.rbf> Moench via command <.pof> - Ctb via command <.pof> Gotthard cannot be upgraded remotely Except Eiger, upgrade - using command 'programfpga' or + Using command 'programfpga' or - udpate both server and firmware simultaneously - using command 'update' + udpate both on-board detector server and firmware simultaneously + Using command 'update' Instructions available at diff --git a/VERSION b/VERSION new file mode 100644 index 000000000..c9277c5a6 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +9.0.0 \ No newline at end of file diff --git a/bash_autocomplete.sh b/bash_autocomplete.sh new file mode 120000 index 000000000..f79749d0d --- /dev/null +++ b/bash_autocomplete.sh @@ -0,0 +1 @@ +slsDetectorSoftware/generator/autocomplete/bash_autocomplete.sh \ No newline at end of file diff --git a/conda-recepie/build_pylib.sh b/conda-recepie/build_pylib.sh deleted file mode 100755 index f7cbdc496..000000000 --- a/conda-recepie/build_pylib.sh +++ /dev/null @@ -1,6 +0,0 @@ -# SPDX-License-Identifier: LGPL-3.0-or-other -# Copyright (C) 2021 Contributors to the SLS Detector Package - -echo "|<-------- starting python build" -cd python -${PYTHON} setup.py install diff --git a/conda-recepie/build.sh b/conda-recipe/build.sh similarity index 86% rename from conda-recepie/build.sh rename to conda-recipe/build.sh index b8f77843e..251b04477 100755 --- a/conda-recepie/build.sh +++ b/conda-recipe/build.sh @@ -1,8 +1,12 @@ # SPDX-License-Identifier: LGPL-3.0-or-other # Copyright (C) 2021 Contributors to the SLS Detector Package -mkdir build -mkdir install +if [ ! -d "build" ]; then + mkdir build +fi +if [ ! -d "install" ]; then + mkdir install +fi cd build cmake .. \ -DCMAKE_PREFIX_PATH=$CONDA_PREFIX \ diff --git a/conda-recipe/build_pylib.sh b/conda-recipe/build_pylib.sh new file mode 100755 index 000000000..b2a2fb05f --- /dev/null +++ b/conda-recipe/build_pylib.sh @@ -0,0 +1,14 @@ +# SPDX-License-Identifier: LGPL-3.0-or-other +# Copyright (C) 2021 Contributors to the SLS Detector Package + +echo "|<-------- starting python build" + +cd python + +# copy VERSION into slsdet for installation +cp ../VERSION slsdet/VERSION + +# to be used to get project version in meta.yaml +export SLS_DET_VERSION=$(cat python/slsdet/VERSION) + +${PYTHON} setup.py install diff --git a/conda-recepie/conda_build_config.yaml b/conda-recipe/conda_build_config.yaml similarity index 83% rename from conda-recepie/conda_build_config.yaml rename to conda-recipe/conda_build_config.yaml index b1396f187..0f51da017 100644 --- a/conda-recepie/conda_build_config.yaml +++ b/conda-recipe/conda_build_config.yaml @@ -4,4 +4,5 @@ python: - 3.10 - 3.11 - 3.12 - + - 3.13 + diff --git a/conda-recepie/copy_ctbgui.sh b/conda-recipe/copy_ctbgui.sh similarity index 100% rename from conda-recepie/copy_ctbgui.sh rename to conda-recipe/copy_ctbgui.sh diff --git a/conda-recepie/copy_gui.sh b/conda-recipe/copy_gui.sh similarity index 100% rename from conda-recepie/copy_gui.sh rename to conda-recipe/copy_gui.sh diff --git a/conda-recepie/copy_lib.sh b/conda-recipe/copy_lib.sh similarity index 100% rename from conda-recepie/copy_lib.sh rename to conda-recipe/copy_lib.sh diff --git a/conda-recepie/copy_moench.sh b/conda-recipe/copy_moench.sh similarity index 100% rename from conda-recepie/copy_moench.sh rename to conda-recipe/copy_moench.sh diff --git a/conda-recepie/meta.yaml b/conda-recipe/meta.yaml similarity index 92% rename from conda-recepie/meta.yaml rename to conda-recipe/meta.yaml index da620c859..ca770779d 100755 --- a/conda-recepie/meta.yaml +++ b/conda-recipe/meta.yaml @@ -1,15 +1,19 @@ +{% set version = environ.get('SLS_DET_VERSION', '0.0.0') %} + + package: name: sls_detector_software - version: {{ environ.get('GIT_DESCRIBE_TAG', '') }} + version: "{{ version }}" + source: - - path: .. + path: .. build: number: 0 binary_relocation: True - rpaths: + rpaths: - lib/ requirements: @@ -61,13 +65,11 @@ outputs: - libstdcxx-ng - libgcc-ng - run: - libstdcxx-ng - libgcc-ng - name: slsdet - script: build_pylib.sh requirements: @@ -77,12 +79,13 @@ outputs: - {{compiler('cxx')}} - {{ pin_subpackage('slsdetlib', exact=True) }} - setuptools - - pybind11=2.11 + - pybind11=2.13 host: - python - {{ pin_subpackage('slsdetlib', exact=True) }} - - pybind11=2.11 + - setuptools + - pybind11=2.13 run: @@ -92,11 +95,11 @@ outputs: - numpy - {{ pin_subpackage('slsdetlib', exact=True) }} - test: imports: - slsdet + - name: slsdetgui script: copy_gui.sh requirements: diff --git a/conda-recepie/run_test.sh b/conda-recipe/run_test.sh similarity index 100% rename from conda-recepie/run_test.sh rename to conda-recipe/run_test.sh diff --git a/ctbGui/CMakeLists.txt b/ctbGui/CMakeLists.txt deleted file mode 100644 index 1799bddc5..000000000 --- a/ctbGui/CMakeLists.txt +++ /dev/null @@ -1,90 +0,0 @@ -# SPDX-License-Identifier: LGPL-3.0-or-other -# Copyright (C) 2021 Contributors to the SLS Detector Package - - -find_package(ROOT CONFIG REQUIRED COMPONENTS Core Gui) -find_package(TIFF REQUIRED) - -target_include_directories(ROOT::Core INTERFACE "${ROOT_INCLUDE_DIRS}") -add_library(ROOT::Flags_CXX IMPORTED INTERFACE) -separate_arguments(ROOT_CXX_FLAGS) -target_compile_options(ROOT::Flags_CXX INTERFACE ${ROOT_CXX_FLAGS}) -separate_arguments(ROOT_DEFINITIONS) -target_compile_definitions(ROOT::Flags_CXX INTERFACE ${ROOT_DEFINITIONS}) - -# This fixes a bug in the linker flags -string(REPLACE "-L " "-L" ROOT_EXE_LINKER_FLAGS "${ROOT_EXE_LINKER_FLAGS}") -separate_arguments(ROOT_EXE_LINKER_FLAGS) - -# Stuck into using old property method due to separate -L and -l arguments -# (A full path to -l is better!) -set_property(TARGET ROOT::Flags_CXX PROPERTY - INTERFACE_LINK_LIBRARIES ${ROOT_EXE_LINKER_FLAGS}) -set_property(TARGET ROOT::Core PROPERTY - INTERFACE_INCLUDE_DIRECTORIES "${ROOT_INCLUDE_DIRS}") - - -add_executable(ctbGui - ctbGui.cpp - ctbMain.cpp - ctbDacs.cpp - ctbPowers.cpp - ctbSlowAdcs.cpp - ctbSignals.cpp - ctbAdcs.cpp - ctbPattern.cpp - ctbAcquisition.cpp - ${CMAKE_SOURCE_DIR}/slsDetectorCalibration/tiffio/src/tiffIO.cpp -) - - -#TODO! Replace with target -target_include_directories(ctbGui PRIVATE - ${CMAKE_SOURCE_DIR}/slsDetectorCalibration/dataStructures - ${CMAKE_SOURCE_DIR}/slsDetectorCalibration/interpolations - ${CMAKE_SOURCE_DIR}/slsDetectorCalibration/ - ${CMAKE_SOURCE_DIR}/slsDetectorCalibration/tiffio/include/ -) - -# Headders needed for ROOT dictionary generation -set( HEADERS - ctbDefs.h - ctbMain.h - ctbDacs.h - ctbPattern.h - ctbSignals.h - ctbAdcs.h - ctbAcquisition.h - ctbPowers.h - ctbSlowAdcs.h -) - -#set(ROOT_INCLUDE_PATH ${CMAKE_CURRENT_SOURCE_DIR}) - -# ROOT dictionary generation -root_generate_dictionary(ctbDict ${HEADERS} LINKDEF ctbLinkDef.h) -add_library(ctbRootLib SHARED ctbDict.cxx) -target_include_directories(ctbRootLib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) -target_link_libraries(ctbRootLib PUBLIC - ROOT::Core - slsDetectorShared - ${ROOT_LIBRARIES} - ${ROOT_EXE_LINKER_FLAGS} -) - -set_target_properties( - ctbRootLib PROPERTIES - LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin -) - -target_link_libraries(ctbGui PUBLIC - slsDetectorShared - ctbRootLib - ${TIFF_LIBRARIES} -) - -set_target_properties(ctbGui PROPERTIES - RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin - -) - diff --git a/ctbGui/Makefile.root5 b/ctbGui/Makefile.root5 deleted file mode 100644 index 050acbc17..000000000 --- a/ctbGui/Makefile.root5 +++ /dev/null @@ -1,46 +0,0 @@ -# SPDX-License-Identifier: LGPL-3.0-or-other -# Copyright (C) 2021 Contributors to the SLS Detector Package - - -INCS=ctbMain.h ctbDacs.h ctbPattern.h ctbSignals.h ctbAdcs.h ctbAcquisition.h ctbPowers.h ctbSlowAdcs.h -SRC= $(INCS:.h=.cpp) ctbDict.cpp -LINKDEF=ctbLinkDef.h -ZMQLIB=../slsReceiverSoftware/include -LIBRARYCBF=$(CBFLIBDIR)/lib/*.o - -INCDIR=-I../slsReceiverSoftware/include/ -I../slsDetectorSoftware/include/ -I../slsSupportLib/include/ -I../slsDetectorCalibration -I../slsDetectorCalibration/dataStructures -I$(CBFLIBDIR)/include -I../slsDetectorCalibration/interpolations -LDFLAG=-L../build/bin -lSlsDetector -lSlsSupport -L/usr/lib64/ -lpthread -lm -lstdc++ -lzmq -pthread -lrt -ltiff -L$(ZMQLIB) -L$(CBFLIBDIR)/lib/ -std=c++11 -# -MAIN=ctbGui.cpp - -DESTDIR?=../build/bin - - -OBJS = $(SRC:.cpp=.o) $(MAIN:.cpp=.o) - -all: $(DESTDIR)/ctbGui - - -doc: - cd manual && make DESTDIR=$(DESTDIR) - -htmldoc: - cd manual && make html DESTDIR=$(DESTDIR) - -ctbDict.cpp: $(INCS) $(LINKDEF) - rootcint -f ctbDict.cpp -c $(INCS) $(LINKDEF) - -%.o : %.cpp - echo $@ - g++ -DMYROOT `root-config --cflags --glibs` -lMinuit -DCTB $(LDFLAG) -o $@ -c $< $(INCDIR) -#$(CXX) -o $@ -c $< $(INCLUDES) $(DFLAGS) -fPIC $(EPICSFLAGS) -lpthread #$(FLAGS) - - - -$(DESTDIR)/ctbGui: $(OBJS) $(LINKDEF) - g++ -DMYROOT `root-config --cflags --glibs` -lMinuit -DCTB $(LDFLAG) -o ctbGui $(INCDIR) $(OBJS) ../slsDetectorCalibration/tiffIO.cpp - mv ctbGui $(DESTDIR) - -clean: - rm -f $(DESTDIR)/ctbGui *.o ctbDict.* $(OBJS) - diff --git a/ctbGui/Makefile.root6 b/ctbGui/Makefile.root6 deleted file mode 100644 index 338949617..000000000 --- a/ctbGui/Makefile.root6 +++ /dev/null @@ -1,48 +0,0 @@ -# SPDX-License-Identifier: LGPL-3.0-or-other -# Copyright (C) 2021 Contributors to the SLS Detector Package - - -INCS=ctbMain.h ctbDacs.h ctbPattern.h ctbSignals.h ctbAdcs.h ctbAcquisition.h ctbPowers.h ctbSlowAdcs.h -SRC= $(INCS:.h=.cpp) ctbDict.cpp -LINKDEF=ctbLinkDef.h -#ctbActions.h -ZMQLIB=../slsReceiverSoftware/include -LIBRARYCBF=$(CBFLIBDIR)/lib/*.o - -INCDIR=-I../slsReceiverSoftware/include/ -I../slsDetectorSoftware/include/ -I../slsSupportLib/include/ -I../slsDetectorCalibration -I../slsDetectorCalibration/dataStructures -I$(CBFLIBDIR)/include -I../slsDetectorCalibration/interpolations - -LDFLAG=-L../build/bin -lSlsDetector -lSlsSupport -L/usr/lib64/ -lpthread -lm -lstdc++ -lzmq -pthread -lrt -ltiff -L$(ZMQLIB) -L$(CBFLIBDIR)/lib/ -std=c++11 -# -MAIN=ctbGui.cpp - -DESTDIR?=../build/bin - - -OBJS = $(SRC:.cpp=.o) $(MAIN:.cpp=.o) - -all: $(DESTDIR)/ctbGui - - -doc: - cd manual && make DESTDIR=$(DESTDIR) - -htmldoc: - cd manual && make html DESTDIR=$(DESTDIR) - -ctbDict.cpp: $(INCS) $(LINKDEF) - rootcling -f ctbDict.cpp -c $(INCS) $(LINKDEF) - -%.o : %.cpp - echo $@ - g++ -DMYROOT `source root-config --cflags --glibs` -lMinuit -DCTB $(LDFLAG) -o $@ -c $< $(INCDIR) -#$(CXX) -o $@ -c $< $(INCLUDES) $(DFLAGS) -fPIC $(EPICSFLAGS) -lpthread #$(FLAGS) - - - -$(DESTDIR)/ctbGui: $(OBJS) $(LINKDEF) - g++ -DMYROOT `source root-config --cflags --glibs` -lMinuit -DCTB $(LDFLAG) -o ctbGui $(INCDIR) $(OBJS) ../slsDetectorCalibration/tiffIO.cpp - mv ctbGui $(DESTDIR) - -clean: - rm -f $(DESTDIR)/ctbGui *.o ctbDict.* $(OBJS) - diff --git a/ctbGui/ctbAcquisition.cpp b/ctbGui/ctbAcquisition.cpp deleted file mode 100644 index 8de365271..000000000 --- a/ctbGui/ctbAcquisition.cpp +++ /dev/null @@ -1,2277 +0,0 @@ -// SPDX-License-Identifier: LGPL-3.0-or-other -// Copyright (C) 2021 Contributors to the SLS Detector Package -//#define TESTADC - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#include -#include -#include -#include - -#include "ctbAcquisition.h" -#include "ctbDefs.h" -#include "sls/Detector.h" -#include "sls/sls_detector_defs.h" -#include "ctbMain.h" -#include "moench03CtbData.h" -//#include "moench03TCtbData.h" -//#include "moench03T1CtbData.h" -#include "moench03CommonMode.h" -#include "moench03T1ZmqDataNew.h" -#include "moench02CtbData.h" -//#include "jungfrau10ModuleData.h" -#include "moenchCommonMode.h" -#include "singlePhotonDetector.h" -#include "Mythen3_01_jctbData.h" -#include "Mythen3_02_jctbData.h" -#include "adcSar2_jctbData.h" -#include "moench04CtbZmqData.h" -#include "moench04CtbZmq10GbData.h" -#include "deserializer.h" -#include "sls/detectorData.h" -#include "imageZmq16bit.h" -#include "imageZmq32bit.h" - - -using namespace std; - - - - -ctbAcquisition::ctbAcquisition(TGVerticalFrame *page, sls::Detector *det) : TGGroupFrame(page,"Acquisition",kVerticalFrame), myDet(det), myCanvas(NULL), globalPlot(0), tenG(0), nAnalogSamples(1), nDigitalSamples(1), dataStructure(NULL), photonFinder(NULL), cmSub(0), dBitMask(0xffffffffffffffff), deserializer(0) { - - adcFit=NULL; - bitPlot=NULL; - countsFit=NULL; - - page->AddFrame(this,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 10,10,10,10)); - MapWindow(); - - TGHorizontalFrame *hframe=new TGHorizontalFrame(this, 800,50); - AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 10,10,10,10)); - hframe->MapWindow(); - - char tit[100]; - - cout << "outfile "<< endl; - - cFileSave= new TGCheckButton(hframe, "Output file: "); - hframe->AddFrame(cFileSave,new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX, 5, 5, 5, 5)); - cFileSave->MapWindow(); - cFileSave->SetTextJustify(kTextRight); - cFileSave->Connect("Toggled(Bool_t)","ctbAcquisition",this,"setFsave(Bool_t)"); - - std::string temp = "run"; - try { - temp = myDet->getFileNamePrefix().tsquash("Different values"); - } CATCH_DISPLAY ("Could not get file name prefix.", "ctbAcquisition::ctbAcquisition") - eFname = new TGTextEntry(hframe, temp.c_str()); - - hframe->AddFrame(eFname,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 5, 5, 5, 5)); - eFname->MapWindow(); - eFname->Resize(150,30); - - eFname->Connect("ReturnPressed()","ctbAcquisition",this,"setFname()"); - - - TGLabel *label=new TGLabel(hframe,"index: "); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5)); - label->MapWindow(); - label->SetTextJustify(kTextRight); - - - eFindex = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger, - TGNumberFormat::kNEANonNegative, - TGNumberFormat::kNELNoLimits); - hframe->AddFrame( eFindex,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); - eFindex->MapWindow(); - eFindex->Resize(150,30); - TGTextEntry *e= eFindex->TGNumberEntry::GetNumberEntry(); - e->Connect("ReturnPressed()","ctbAcquisition",this,"setFindex()"); - - - - - cout << "outdir "<< endl; - - - hframe=new TGHorizontalFrame(this, 800,50); - AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 10,10,10,10)); - hframe->MapWindow(); - - label=new TGLabel(hframe,"Output directory: "); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5)); - label->MapWindow(); - label->SetTextJustify(kTextRight); - - - - temp = "/tmp/"; - try { - temp = myDet->getFilePath().tsquash("Different values"); - } CATCH_DISPLAY ("Could not get file path.", "ctbAcquisition::ctbAcquisition") - eOutdir = new TGTextEntry(hframe, temp.c_str()); - - hframe->AddFrame(eOutdir,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 5, 5, 5, 5)); - eOutdir->MapWindow(); - eOutdir->Resize(150,30); - - - eOutdir->Connect("ReturnPressed()","ctbAcquisition",this,"setOutdir()"); - - hframe=new TGHorizontalFrame(this, 800,50); - AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 10,10,10,10)); - hframe->MapWindow(); - - - cout << "meas "<< endl; -label=new TGLabel(hframe,"Number of Measurements (fake): "); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5)); - label->MapWindow(); - label->SetTextJustify(kTextRight); - - - eMeasurements = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger, - TGNumberFormat::kNEANonNegative, - TGNumberFormat::kNELNoLimits); - hframe->AddFrame( eMeasurements,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); - eMeasurements->MapWindow(); - eMeasurements->Resize(150,30); - eMeasurements->SetNumber(1); - e= eMeasurements->TGNumberEntry::GetNumberEntry(); - e->Connect("ReturnPressed()","ctbAcquisition",this,"setMeasurements()"); - - - - -hframe=new TGHorizontalFrame(this, 800,50); - AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 10,10,10,10)); - hframe->MapWindow(); - - - - - cout << "pattern "<< endl; - - - - - cCompile= new TGCheckButton(hframe, "Compile"); - hframe->AddFrame(cCompile,new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX, 5, 5, 5, 5)); - cCompile->MapWindow(); - cCompile->SetOn(); - // cCompile->Connect("Toggled(Bool_t)","ctbAcquisition",this,"setFsave(Bool_t)"); - - - cLoad= new TGTextButton(hframe, "Load"); - hframe->AddFrame(cLoad,new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX, 5, 5, 5, 5)); - cLoad->MapWindow(); - cLoad->Connect("Clicked()","ctbAcquisition",this,"loadPattern()"); - - -// cRun= new TGCheckButton(hframe, "Run"); -// hframe->AddFrame(cRun,new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX, 5, 5, 5, 5)); -// cRun->MapWindow(); -// // cCompile->Connect("Toggled(Bool_t)","ctbAcquisition",this,"setFsave(Bool_t)"); - - - - - - - bStatus=new TGTextButton(hframe, "Start"); - hframe->AddFrame(bStatus,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 5, 5, 5, 5)); - bStatus->MapWindow(); - bStatus->Connect("Clicked()","ctbAcquisition",this,"toggleAcquisition()"); - - - - - - cout << "plot "<< endl; - - hframe=new TGHorizontalFrame(this, 800,50); - AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 10,10,10,10)); - hframe->MapWindow(); - - - - - label=new TGLabel(hframe,"Plot: "); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5)); - label->MapWindow(); - label->SetTextJustify(kTextRight); - - - - - - - TGButtonGroup *bgPlot = new TGButtonGroup(hframe); - // horizontal->SetTitlePos(TGGroupFrame::kCenter); - rbPlotOff=new TGRadioButton(hframe, "No plot"); - rbWaveform=new TGRadioButton(hframe, "Waveform"); - rbDistribution=new TGRadioButton(hframe, "Distribution"); - rb2D=new TGRadioButton(hframe, "Image"); - // rbScan=new TGRadioButton(hframe, "Scan"); - - cbDetType=new TGComboBox(hframe); - // enum {DESERIALIZER, MOENCH04, MOENCH02, ADCSAR2, MYTHEN301, MYTHEN302, MAXDET}; - cbDetType->AddEntry("Deserializer", DESERIALIZER); - cbDetType->AddEntry("MOENCH02", MOENCH02); - cbDetType->AddEntry("MOENCH04", MOENCH04); - // cbDetType->AddEntry("JUNGFRAU1.0", 2); - cbDetType->AddEntry("MOENCH03",MOENCH03); - cbDetType->AddEntry("IMAGE32BIT",IMAGE32B); - cbDetType->AddEntry("IMAGE16BIT",IMAGE16B); - - //cbDetType->AddEntry("MOENCH03", iiii++); - // cbDetType->AddEntry("MYTHEN3 0.1", MYTHEN301); - // cbDetType->AddEntry("ADCSAR2", ADCSAR2); - // cbDetType->AddEntry("MYTHEN3 0.2", MYTHEN302); - - cbDetType->SetHeight(20); - cbDetType->Select(0); - - bgPlot->Insert(rbPlotOff,0); - bgPlot->Insert(rbWaveform,1); - bgPlot->Insert(rbDistribution,2); - bgPlot->Insert(rb2D,3); - // bgPlot->Insert(rbScan,4); - - bgPlot->Connect("Clicked(Int_t)", "ctbAcquisition", this, "changePlot(Int_t)"); - // hframe->AddFrame(bgPlot, new TGLayoutHints(kLHintsExpandX)); - - cbDetType->Connect("Selected(Int_t)", "ctbAcquisition",this, "changeDetector(Int_t)"); - hframe->AddFrame(rbPlotOff, new TGLayoutHints(kLHintsTop | kLHintsExpandX)); - hframe->AddFrame(rbWaveform, new TGLayoutHints(kLHintsTop | kLHintsExpandX)); - hframe->AddFrame(rbDistribution, new TGLayoutHints(kLHintsTop | kLHintsExpandX)); - hframe->AddFrame(rb2D, new TGLayoutHints(kLHintsTop | kLHintsExpandX)); - // hframe->AddFrame(rbScan, new TGLayoutHints(kLHintsTop | kLHintsExpandX)); - hframe->AddFrame(cbDetType, new TGLayoutHints(kLHintsTop | kLHintsExpandX| kLHintsExpandY)); - - - bgPlot->SetExclusive(kTRUE); - rbWaveform->SetOn(); - rbPlotOff->MapWindow(); - rbWaveform->MapWindow(); - rbDistribution->MapWindow(); - rb2D->MapWindow(); - // rbScan->MapWindow(); - cbDetType->MapWindow(); - - - - - // cout << "off "<< endl; - - - hframe=new TGHorizontalFrame(this, 800,50); - AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 10,10,10,10)); - hframe->MapWindow(); - - - - label=new TGLabel(hframe,"Serial offset:"); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5)); - label->MapWindow(); - label->SetTextJustify(kTextRight); - - - eSerOff=new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger, - TGNumberFormat::kNEANonNegative, - TGNumberFormat::kNELLimitMinMax,0,16535); - hframe->AddFrame(eSerOff,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); - eSerOff->MapWindow(); - eSerOff->SetNumber(0); - e= eSerOff->TGNumberEntry::GetNumberEntry(); - eSerOff->Connect("ValueSet(Long_t)","ctbAcquisition",this,"ChangeSerialOffset(Long_t)"); - e->Connect("ReturnPressed()","ctbAcquisition",this,"ChangeSerialOffset()"); - - - label=new TGLabel(hframe,"N counters:"); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5)); - label->MapWindow(); - label->SetTextJustify(kTextRight); - - - eNumCount=new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger, - TGNumberFormat::kNEANonNegative, - TGNumberFormat::kNELLimitMinMax,0,16535); - hframe->AddFrame(eNumCount,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); - eNumCount->MapWindow();; - eNumCount->SetNumber(128*3); - e= eNumCount->TGNumberEntry::GetNumberEntry(); - eNumCount->Connect("ValueSet(Long_t)","ctbAcquisition",this,"ChangeNumberOfChannels(Long_t)"); - e->Connect("ReturnPressed()","ctbAcquisition",this,"ChangeNumberOfChannels()"); - - - - cout << "dr "<< endl; - - label=new TGLabel(hframe,"Dynamic Range:"); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5)); - label->MapWindow(); - label->SetTextJustify(kTextRight); - - - eDynRange=new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger, - TGNumberFormat::kNEANonNegative, - TGNumberFormat::kNELLimitMinMax,0,16535); - hframe->AddFrame(eDynRange,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); - eDynRange->MapWindow();; - eDynRange->SetNumber(24); - e= eDynRange->TGNumberEntry::GetNumberEntry(); - eDynRange->Connect("ValueSet(Long_t)","ctbAcquisition",this,"ChangeDynamicRange(Long_t)"); - e->Connect("ReturnPressed()","ctbAcquisition",this,"ChangeDynamicRange()"); - - - - - - hframe=new TGHorizontalFrame(this, 800,50); - AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 10,10,10,10)); - hframe->MapWindow(); - - - - label=new TGLabel(hframe,"Image Pixels"); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5)); - label->MapWindow(); - label->SetTextJustify(kTextLeft); - - - label=new TGLabel(hframe,"X: "); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5)); - label->MapWindow(); - label->SetTextJustify(kTextRight); - - - ePixX=new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger, - TGNumberFormat::kNEANonNegative, - TGNumberFormat::kNELLimitMinMax,0,16535); - hframe->AddFrame(ePixX,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); - ePixX->MapWindow(); - ePixX->SetNumber(400); - e= ePixX->TGNumberEntry::GetNumberEntry(); - ePixX->Connect("ValueSet(Long_t)","ctbAcquisition",this,"ChangeImagePixels(Long_t)"); - e->Connect("ReturnPressed()","ctbAcquisition",this,"ChangeImagePixels()"); - - - - label=new TGLabel(hframe,"Y: "); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5)); - label->MapWindow(); - label->SetTextJustify(kTextRight); - - - ePixY=new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger, - TGNumberFormat::kNEANonNegative, - TGNumberFormat::kNELLimitMinMax,0,16535); - hframe->AddFrame(ePixY,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); - ePixY->MapWindow(); - ePixY->SetNumber(400); - e= ePixY->TGNumberEntry::GetNumberEntry(); - ePixY->Connect("ValueSet(Long_t)","ctbAcquisition",this,"ChangeImagePixels(Long_t)"); - e->Connect("ReturnPressed()","ctbAcquisition",this,"ChangeImagePixels()"); - - - - - hframe=new TGHorizontalFrame(this, 800,50); - AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 10,10,10,10)); - hframe->MapWindow(); - - - - label=new TGLabel(hframe,"Pedestal "); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5)); - label->MapWindow(); - label->SetTextJustify(kTextRight); - - - - cbGetPedestal= new TGCheckButton(hframe, "Acquire"); - hframe->AddFrame(cbGetPedestal,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5)); - cbGetPedestal->MapWindow(); - - cbSubtractPedestal= new TGCheckButton(hframe, "Subtract"); - hframe->AddFrame(cbSubtractPedestal,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5)); - cbSubtractPedestal->MapWindow(); - - - cbSubtractPedestal->Connect("Toggled(Bool_t)","ctbAcquisition",this,"TogglePedSub(Bool_t)"); - - cbCommonMode= new TGCheckButton(hframe, "Common Mode"); - hframe->AddFrame(cbCommonMode,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5)); - cbCommonMode->MapWindow(); - - - cbCommonMode->Connect("Toggled(Bool_t)","ctbAcquisition",this,"ToggleCommonMode(Bool_t)"); - - - bResetPedestal= new TGTextButton(hframe, "Reset"); - hframe->AddFrame(bResetPedestal,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5)); - bResetPedestal->MapWindow(); - - - bResetPedestal->Connect("Clicked()","ctbAcquisition",this,"resetPedestal()"); - - - - - - hframe=new TGHorizontalFrame(this, 800,50); - AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 10,10,10,10)); - hframe->MapWindow(); - - - cMinMaxRaw=new TGCheckButton(hframe,"Raw data "); - hframe->AddFrame(cMinMaxRaw,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5)); - cMinMaxRaw->MapWindow(); - cMinMaxRaw->Connect("Toggled(Bool_t)","ctbAcquisition",this,"ChangeHistoLimitsRaw(Bool_t)"); - - - - - label=new TGLabel(hframe,"Min: "); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5)); - label->MapWindow(); - label->SetTextJustify(kTextRight); - - - eMinRaw=new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger, - TGNumberFormat::kNEANonNegative, - TGNumberFormat::kNELLimitMinMax,0,16535); - hframe->AddFrame(eMinRaw,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); - eMinRaw->MapWindow();; - eMinRaw->SetNumber(0); - e= eMinRaw->TGNumberEntry::GetNumberEntry(); - eMinRaw->Connect("ValueSet(Long_t)","ctbAcquisition",this,"ChangeHistoLimitsRaw(Long_t)"); - e->Connect("ReturnPressed()","ctbAcquisition",this,"ChangeHistoLimitsRaw()"); - - - label=new TGLabel(hframe,"Max: "); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5)); - label->MapWindow(); - label->SetTextJustify(kTextRight); - - - - - eMaxRaw=new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger, - TGNumberFormat::kNEANonNegative, - TGNumberFormat::kNELLimitMinMax,0,16535); - hframe->AddFrame(eMaxRaw,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); - eMaxRaw->MapWindow();; - eMaxRaw->SetNumber(16535); - - e= eMaxRaw->TGNumberEntry::GetNumberEntry(); - eMaxRaw->Connect("ValueSet(Long_t)","ctbAcquisition",this,"ChangeHistoLimitsRaw(Long_t)"); - e->Connect("ReturnPressed()","ctbAcquisition",this,"ChangeHistoLimitsRaw()"); - - - hframe=new TGHorizontalFrame(this, 800,50); - AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 10,10,10,10)); - hframe->MapWindow(); - - - - cMinMaxPedSub=new TGCheckButton(hframe,"Pedestal Subtracted "); - hframe->AddFrame(cMinMaxPedSub,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5)); - cMinMaxPedSub->MapWindow(); - cMinMaxPedSub->Connect("Toggled(Bool_t)","ctbAcquisition",this,"ChangeHistoLimitsPedSub(Bool_t)"); - - - label=new TGLabel(hframe,"Min: "); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5)); - label->MapWindow(); - label->SetTextJustify(kTextRight); - - - eMinPedSub=new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger, - TGNumberFormat::kNEAAnyNumber, - TGNumberFormat::kNELLimitMinMax,-16535,16535); - hframe->AddFrame(eMinPedSub,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); - eMinPedSub->MapWindow();; - eMinPedSub->SetNumber(-100); - - e= eMinPedSub->TGNumberEntry::GetNumberEntry(); - - eMinPedSub->Connect("ValueSet(Long_t)","ctbAcquisition",this,"ChangeHistoLimitsPedSub(Long_t)"); - e->Connect("ReturnPressed()","ctbAcquisition",this,"ChangeHistoLimitsPedSub()"); - - - label=new TGLabel(hframe,"Max: "); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5)); - label->MapWindow(); - label->SetTextJustify(kTextRight); - - - eMaxPedSub=new TGNumberEntry(hframe,0, 9,999, TGNumberFormat::kNESInteger, - TGNumberFormat::kNEAAnyNumber, - TGNumberFormat::kNELLimitMinMax,-16535,16535); - hframe->AddFrame(eMaxPedSub,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); - eMaxPedSub->MapWindow();; - eMaxPedSub->SetNumber(100); - - - e= eMaxPedSub->TGNumberEntry::GetNumberEntry(); - eMaxPedSub->Connect("ValueSet(Long_t)","ctbAcquisition",this,"ChangeHistoLimitsPedSub(Long_t)"); - e->Connect("ReturnPressed()","ctbAcquisition",this,"ChangeHistoLimitsPedSub()"); - - - hframe=new TGHorizontalFrame(this, 800,50); - AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 10,10,10,10)); - hframe->MapWindow(); - - - - - - TGTextButton *b= new TGTextButton(hframe, "Fit Panel ADC:"); - hframe->AddFrame(b,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5)); - b->MapWindow(); - - - b->Connect("Clicked()","ctbAcquisition",this,"FitADC()"); - - - eFitADC=new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger, - TGNumberFormat::kNEANonNegative, - TGNumberFormat::kNELLimitMinMax,0,31); - hframe->AddFrame( eFitADC,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); - eFitADC->MapWindow();; - - - - hframe=new TGHorizontalFrame(this, 800,50); - AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 10,10,10,10)); - hframe->MapWindow(); - - - - - - b= new TGTextButton(hframe, "Plot bit:"); - hframe->AddFrame(b,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5)); - b->MapWindow(); - - - b->Connect("Clicked()","ctbAcquisition",this,"plotBit()"); - - - eBitPlot=new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger, - TGNumberFormat::kNEANonNegative, - TGNumberFormat::kNELLimitMinMax,0,64); - hframe->AddFrame( eBitPlot,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); - eBitPlot->MapWindow();; - - - - - - hframe=new TGHorizontalFrame(this, 800,50); - AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 10,10,10,10)); - hframe->MapWindow(); - - - - label=new TGLabel(hframe,"X "); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5)); - label->MapWindow(); - label->SetTextJustify(kTextRight); - - - label=new TGLabel(hframe," "); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5)); - label->MapWindow(); - label->SetTextJustify(kTextLeft); - lClickX=label; - - - - label=new TGLabel(hframe,"Y "); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5)); - label->MapWindow(); - label->SetTextJustify(kTextRight); - - - - label=new TGLabel(hframe," "); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5)); - label->MapWindow(); - label->SetTextJustify(kTextLeft); - lClickY=label; - - - label=new TGLabel(hframe,"Value "); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5)); - label->MapWindow(); - label->SetTextJustify(kTextRight); - - - - - - label=new TGLabel(hframe," "); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5)); - label->MapWindow(); - label->SetTextJustify(kTextLeft); - lClickValue=label; - - - - - - - - b= new TGTextButton(hframe, "Refresh"); - hframe->AddFrame(b,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5)); - b->MapWindow(); - - - b->Connect("Clicked()","ctbAcquisition",this,"Draw()"); - - - - - - - - - - - acqThread = new TThread("acqThread", - ctbAcquisition::ThreadHandle,(void*)this); - - cout <<"Registering data callback" << endl; - try { - myDet->registerDataCallback(&dataCallback, (void*)this); - } CATCH_DISPLAY ("Could not get register call back.", "ctbAcquisition::ctbAcquisition") - try { - myDet->setRxZmqDataStream(true); - } CATCH_DISPLAY ("Could not get set RxZmqDataStream.", "ctbAcquisition::ctbAcquisition") - cout <<"Done" << endl; - - // mgAdcs=new TMultiGraph(); - adcStack=new THStack(); - TH1F *h; - int nSamples=nAnalogSamples; - - for (int i=0; iSetLineColor(i+1); - h->SetLineWidth(2); - adcStack->Add(h); - adcHisto[i]=h; - plotFlag[i]=0; - // h->SetMinimum(-1); - // h->SetMaximum(16385); - } - - - // mgAdcs=new TMultiGraph(); - bitStack=new THStack(); - // bitStack=adcStack; - TH1F *hb; - for (int i=0; iSetLineColor(i+1); - hb->SetLineWidth(2); - bitStack->Add(hb); - bitHisto[i]=hb; - bitOffset[i]=0; - bitPlotFlag[i]=0; - // h->SetMinimum(-1); - // h->SetMaximum(16385); - } - - - countsStack=new THStack(); - TH1F *h1; - for (int i=0; iSetLineColor(i+1); - h1->SetFillColor(i+1); - h1->SetLineWidth(2); - countsStack->Add(h1); - countsHisto[i]=h1; - } - - dataStructure=NULL; - commonMode=NULL; - photonFinder=NULL; - h2DMapAn=NULL; - h2DMapDig=NULL; - //h2Scan=NULL; - h1DMap=NULL; - - changeDetector(cbDetType->GetSelected()); - - - - // display could be updated with TTimer instead of with histogramfillthread: - // plotTimer= new TTimer("ctbAcquisition::Draw()",100); - - - // plotTimer->Connect("TurnOff()", "ctbAcquisition", this, "Draw()"); -} - - - - -void ctbAcquisition::canvasClicked() { - int event = gPad->GetEvent(); - if (event != 11) return; - TObject *select = gPad->GetSelected(); - if (!select) return; - - if (select->InheritsFrom("TH2")) { - TH2* hh=(TH2*)select; - - - - - int px = gPad->GetEventX(); - int py = gPad->GetEventY(); - Float_t upy = gPad->AbsPixeltoY(py); - Float_t y = gPad->PadtoY(upy); - Float_t upx = gPad->AbsPixeltoX(px); - Float_t x = gPad->PadtoY(upx); - - - // cout << "x: " << x << " y: " << y << " " << hh->GetBinContent(hh->GetXaxis()->FindBin(x), hh->GetYaxis()->FindBin(y)) << endl; - - - lClickX->SetText(hh->GetXaxis()->FindBin(x)-1); - lClickY->SetText( hh->GetYaxis()->FindBin(y)-1); - lClickValue->SetText(hh->GetBinContent(hh->GetXaxis()->FindBin(x), hh->GetYaxis()->FindBin(y))); - - - - - - - } else if (select->InheritsFrom("TH1")) { - - TH1* h1=(TH1*)select; - int px = gPad->GetEventX(); - Float_t upx = gPad->AbsPixeltoX(px); - Float_t x = gPad->PadtoY(upx); - - - // cout << "x: " << x << " y: " << y << " " << hh->GetBinContent(hh->GetXaxis()->FindBin(x), hh->GetYaxis()->FindBin(y)) << endl; - - - lClickX->SetText(h1->GetXaxis()->FindBin(x)-1); - lClickY->SetText(" "); - lClickValue->SetText(h1->GetBinContent(h1->GetXaxis()->FindBin(x))); - - - - - - } else// if ((select->ClassName())=="THStack") { - { - - - int px = gPad->GetEventX(); - int py = gPad->GetEventY(); - Float_t upy = gPad->AbsPixeltoY(py); - Float_t y = gPad->PadtoY(upy); - Float_t upx = gPad->AbsPixeltoX(px); - Float_t x = gPad->PadtoY(upx); - - - lClickX->SetText(x); - lClickY->SetText(y); - lClickValue->SetText(""); - - - - } - -} - - - - - - -void ctbAcquisition::setCanvas(TCanvas* c) { - myCanvas=c; - myCanvas->cd(); - myCanvas->AddExec("dynamic",Form("((ctbAcquisition*)%p)->canvasClicked()",this)); - // myCanvas->AddExec("ex","canvasClicked()"); -} -void ctbAcquisition::dataCallback(sls::detectorData *data, long unsigned int index, unsigned int dum, void* pArgs) { - - // return - ((ctbAcquisition*)pArgs)->plotData(data,index); -} - - -int ctbAcquisition::plotData(sls::detectorData *data, int index) { - - /* -****************************************************************** -When selecting dbit -amount of data is nadc * nasamples * 16 bit + ndbitlist * ndsamples (bits) -order of data -analog: -sample0 (adc0 + adc1 +...) -sample1 (adc0 + adc1 +...) -digital: -dbit0 (sample0 + sample1 ...) -dbit1 (sample0 + sample1..) - -when setting dbit to all -amount of data: nadc * nasamples * 16 bit + 8 * ndsamples * 64 bit -what you had before.. -except analog first, then digital -analog: -sample0 (adc0 + adc1 +...) -sample1 (adc0 + adc1 +...) -digital: -sample0 (dbit0 + dbit1 +...) -sample1 (dbit0 + dbit1 +...)if (cmd == "rx_dbitlist") { - - if (action == PUT_ACTION) { - std::vector dbitlist; - - // if not all digital bits enabled - if (std::string(args[1]) != "all") { - for (int i = 1; i < narg; ++i) { - int temp = 0; - if (!sscanf(args[i], "%d", &temp)) - return std::string("Could not scan dbitlist value ") + - std::string(args[i]); - if (temp < 0 || temp > 63) - return std::string("dbitlist value should be between 0 and 63 ") + - std::string(args[i]); - dbitlist.push_back(temp); - } - if (dbitlist.size() > 64) { - return std::string("Max number of values for dbitlist is 64 "); - } - } - - myDet->setReceiverDbitList(dbitlist, detPos); - } - -****************************************************************** -*/ - - // cout << "plot data" << endl; - - - // cout <<"global plot is " << globalPlot << endl; - // cout << "*******************************************" <progressIndex << " nx:" << data->nx << " ny: " << data->ny << " " << data->fileName << " bytes: " << data->databytes << " dr:"<< data->dynamicRange << " fi: " << data ->fileIndex << endl; - if (globalPlot || cbGetPedestal->IsOn()) { - //#ifdef TESTADC - // cout <<"------"<< index << " " << ip << " " << data->npoints << endl; - //#endif - int ig=0; - int i, ii, ib; - // TList *l= adcStack->GetHists(); - // TList *l1= countsStack->GetHists(); - TH1F *h; - TH1F *h1; - TH1F *hb; - int x; - double ped=0; - int dsize=-1; - int *val=NULL; - int nx=1, ny=1; - - if (dataStructure) { - dataStructure->getDetectorSize(nx,ny); - cout << "Data structure: " << dataStructure << " size " << nx << " " << ny << endl; - } - int dr=24, soff=2; - if (deserializer) { - nx=eNumCount->GetIntNumber(); - dr=eDynRange->GetIntNumber(); - soff=eSerOff->GetIntNumber(); - // cout <<"deserializer: " << endl; - // cout << "Number of chans:\t" << nx << endl; - // cout << "Serial Offset:\t" << soff << endl; - // cout << "Dynamic range:\t" << dr << endl; - - } - - i=0; - int nadc; - int ndbit; - - tenG = 0; - - - - - if (adclist.empty()) - nadc=32; - else - nadc=adclist.size(); - - std::vector plotlist; - if (dbitlist.empty()) { - ndbit=64; - dBitOffset=0; - for (ib=0; ib<64; ib++){ - if (bitPlotFlag[ib]) { - plotlist.push_back(ib); - } - } - } else - ndbit=dbitlist.size(); - if (tenG){ - - if (nDigitalSamples && nAnalogSamples){ - if (nDigitalSamples>nAnalogSamples) - dsize=nDigitalSamples*(32*2+8); - else - dsize=nAnalogSamples*(32*2+8); - } else - dsize=32*2*nAnalogSamples+8*nDigitalSamples; - - } else - dsize=nadc*2*nAnalogSamples+ndbit*(nDigitalSamples-dBitOffset/8)/8; - - cout << "dataBytes is " << data->databytes << " expected " << dsize << endl; - - cout << "*******************************************" <data; - else - d_data = data->data+2*nadc*nAnalogSamples; - char dval; - - - if (dataStructure) { - - - for (int x=0; xgetValue(data->data,x,y); - //aval=dataStructure->getChannel(data->data,x,y); - // cout << x << " " <IsOn()) { - if (photonFinder) { - photonFinder->addToPedestal(aval,x,y); - } - } - - if (cbSubtractPedestal->IsOn()) { - if (photonFinder) { - ped=photonFinder->getPedestal(x,y,cmSub); - } - } - if (h2DMapAn) - h2DMapAn->SetBinContent(x+1,y+1,aval-ped); - - - - - if (h2DMapDig) - h2DMapDig->SetBinContent(x+1,y+1,dataStructure->getGain(data->data,x,y)); - - - } - } - } else - if (deserializer) { - cout << "deserializer"<< endl; - if (dbitlist.empty()) - val=deserializer::deserializeAll(d_data,plotlist,dr,nx,soff);//dataStructure->getData(d_data); - else - val=deserializer::deserializeList(d_data,dbitlist,dr,nx,soff);//dataStructure->getData(d_data); - - - if (val) { - if (h1DMap){ - for (x=0; xSetBinContent(x+1,val[x]); - } - } - delete [] val; - } else - cout << "get val did not succeed"<getChannel(i); - // else - aval=data->getChannel(i);//*((uint16_t*)(data->cvalues+i*2));// - - if (plotFlag[ig]) { - - //if (enableFlag[ig]) { - h=adcHisto[ig]; - h1=countsHisto[ig]; - //} - - // cout << data->getChannel(i) << endl; - h->SetBinContent(ip+1,aval); - h1->Fill(aval); - } - - i++; - } - if (tenG) i+=4; - - } - - - cout << "bit histo"<< endl; - - if (dbitlist.empty()) { - for (ip=0; ipSetBinContent(ip+1,1+bitOffset[ib]); - else - hb->SetBinContent(ip+1,bitOffset[ib]); - } - } - - } - } - } else { - ii=0; - int iii=0; - for (const auto &value : dbitlist) { - ib=value; - hb=bitHisto[ib]; - // cout << dec <SetBinContent(iii,1+bitOffset[ib]); - else - hb->SetBinContent(iii,bitOffset[ib]); - iii++; - } - } - } - ii++; - } - } - } - Draw(); - // iScanStep++; - if (photonFinder) - photonFinder->newFrame(); - } - return 0; - -} - - - -void ctbAcquisition::Draw(){ - if (globalPlot) { - // TThread::Lock(); - cout << "Draw" << endl; - if (myCanvas) { - if (adcPlot && dbitPlot) { - - myCanvas->cd(1); - // myCanvas->Modified(); - // myCanvas->Update(); - gPad->Modified(); - gPad->Update(); - - myCanvas->cd(2); - // myCanvas->Modified(); - // myCanvas->Update(); - gPad->Modified(); - gPad->Update(); - - } else { - - myCanvas->cd(); - myCanvas->Modified(); - myCanvas->Update(); - - } - } - // TThread::UnLock(); - } - -} - - -//here!! -void ctbAcquisition::changePlot(){ - if (rbPlotOff->IsOn()) { - adcPlot=0; - dbitPlot=0; - try { - myDet->registerDataCallback(nullptr, this); - } CATCH_DISPLAY ("Could not get unregister call back.", "ctbAcquisition::ctbAcquisition") - try { - myDet->setRxZmqDataStream(false); - } CATCH_DISPLAY ("Could not get unset RxZmqDataStream.", "ctbAcquisition::ctbAcquisition") - } else { - try { - myDet->registerDataCallback(&dataCallback, (void*)this); - } CATCH_DISPLAY ("Could not get register call back.", "ctbAcquisition::ctbAcquisition") - try { - myDet->setRxZmqDataStream(true); - } CATCH_DISPLAY ("Could not get set RxZmqDataStream.", "ctbAcquisition::ctbAcquisition") - adcPlot=0; - dbitPlot=0; - for (int ii=0; iiGetPad(1)==NULL || myCanvas->GetPad(2)==NULL) { - myCanvas->Clear(); - myCanvas->Divide(1,2); - } else - cout << "Pad already there" << endl; - myCanvas->cd(1); - } else { - myCanvas->Clear(); - // myCanvas->Divide(1,1); - myCanvas->cd(); - } - - if (adcPlot) { - if (rbWaveform->IsOn()) - if (adcStack) - adcStack->Draw("NOSTACK"); - else - cout << "adcStack is NULL" << endl; - else if (rbDistribution->IsOn()) - if (countsStack) - countsStack->Draw("NOSTACK"); - else - cout << "countsStack is NULL" << endl; - else if (rb2D->IsOn()) { - if (h2DMapAn) - h2DMapAn->Draw("colz"); - else if (h1DMap) - h1DMap->Draw(); - else - cout << "h2DMap and h1DMap are NULL" << endl; - } - } - - if (dbitPlot) { - if (adcPlot) - myCanvas->cd(2); - if (rb2D->IsOn()) { - if (h2DMapDig) - h2DMapDig->Draw("colz"); - else if (h1DMap) - h1DMap->Draw(); - } else if (bitStack) - bitStack->Draw("NOSTACK"); - else - cout << "bitStack is NULL" << endl; - } - - - // else if (rbScan->IsOn()) { - // if (h2Scan) - // h2Scan->Draw("colz"); - // else - // cout << "h2Scan is NULL" << endl; - // } - - Draw(); - - } -} - - - - - -void ctbAcquisition::changeDetector(){ - // cout << "change detector " << i << " old " << cbDetType->GetSelected() << endl; - - if (dataStructure) delete dataStructure; - if (commonMode) delete commonMode; - if (photonFinder) delete photonFinder; - if (h2DMapAn) delete h2DMapAn; - if (h2DMapDig) delete h2DMapDig; - if (h1DMap) delete h1DMap; - // if (h2Scan) delete h2Scan; - h2DMapAn=NULL; - h2DMapDig=NULL; - h1DMap=NULL; - // h2Scan=NULL; - photonFinder=NULL; - dataStructure=NULL; - commonMode=NULL; - - // TH2F *h2ScanOld=h2Scan; - - - int nx,ny; - int csize=3; - int nsigma=5; - commonModeSubtraction* cm=0; - eNumCount->SetState(kFALSE); - eDynRange->SetState(kFALSE); - eSerOff->SetState(kFALSE); - ePixX->SetState(kFALSE); - ePixY->SetState(kFALSE); - - deserializer=0; - if (rb2D->IsOn() ) {//|| rbScan->IsOn() - switch (cbDetType->GetSelected()) { - case DESERIALIZER: - deserializer=1; - cout << "DESERIALIZER!" << endl; - // dataStructure=new moench03T1CtbData(); - // commonMode=new moench03CommonMode(); - break; - case MOENCH04: - try { - auto retval = myDet->getTenGiga().tsquash("Different values"); - if (retval) { - dataStructure=new moench04CtbZmq10GbData(nAnalogSamples, nDigitalSamples); - } else { - dataStructure=new moench04CtbZmqData(nAnalogSamples, nDigitalSamples); - } - } CATCH_DISPLAY ("Could not get ten giga enable.", "ctbAcquisition::changeDetector") - - cout << "MOENCH 0.4!" << endl; - commonMode=new moench03CommonMode(); - break; - case MOENCH03: - //try { - // auto retval = myDet->getTenGiga().tsquash("Different values"); - // if (retval) { - dataStructure=new moench03T1ZmqDataNew(nAnalogSamples); - // } else { - // dataStructure=new moench04CtbZmqData(nAnalogSamples, nDigitalSamples); - // } - //} CATCH_DISPLAY ("Could not get ten giga enable.", "ctbAcquisition::changeDetector") - - cout << "MOENCH 0.3! USE JUNGFRAU MODULE!" << endl; - commonMode=new moench03CommonMode(); - break; - case IMAGE32B: - //try { - // auto retval = myDet->getTenGiga().tsquash("Different values"); - // if (retval) { - // if (deserializer) { - ePixX->SetState(kTRUE); - ePixY->SetState(kTRUE); - // } - dataStructure=new imageZmq32bit(ePixX->GetIntNumber(),ePixY->GetIntNumber()); - // } else { - // dataStructure=new moench04CtbZmqData(nAnalogSamples, nDigitalSamples); - // } - //} CATCH_DISPLAY ("Could not get ten giga enable.", "ctbAcquisition::changeDetector") - - cout << "Image 32bit, no channel shuffling" << endl; - commonMode=NULL; - break; - - case IMAGE16B: - //try { - // auto retval = myDet->getTenGiga().tsquash("Different values"); - // if (retval) { - // if (deserializer) { - ePixX->SetState(kTRUE); - ePixY->SetState(kTRUE); - // } - dataStructure=new imageZmq16bit(ePixX->GetIntNumber(),ePixY->GetIntNumber()); - // } else { - // dataStructure=new moench04CtbZmqData(nAnalogSamples, nDigitalSamples); - // } - //} CATCH_DISPLAY ("Could not get ten giga enable.", "ctbAcquisition::changeDetector") - - cout << "Image 16bit, no channel shuffling" << endl; - commonMode=NULL; - break; - - // case 1: - // cout << "************** T!!!!!!!!!!" << endl; - // dataStructure=new moench03TCtbData(); - // commonMode=new moench03CommonMode(); - // break; - case MOENCH02: - cout << "MOENCH 0.2" << endl; - dataStructure=new moench02CtbData(); - commonMode=new moenchCommonMode(); - break; - // case 2: - // dataStructure=new jungfrau10ModuleData(); - // commonMode=new commonModeSubtraction(); - // break; - // case 3: - // cout << "************** Flat!!!!!!!!!!" << endl; - // dataStructure=new moench03CtbData(); - // commonMode=new moench03CommonMode(); - // break; - // case MYTHEN301: - // deserializer=1; - // cout << "MYTHEN 3 0.1" << endl; - // dataStructure=new mythen3_01_jctbData(eNumCount->GetIntNumber(),eDynRange->GetIntNumber(),eSerOff->GetIntNumber()); - // //( int nch=64*3,int dr=24, int off=5) - // eNumCount->SetState(kTRUE); - // eDynRange->SetState(kTRUE); - // eSerOff->SetState(kTRUE); - // commonMode=NULL; - // dim=1; - // break; - // case ADCSAR2: - // deserializer=1; - // //adcsar2 - // dataStructure=new adcSar2_jctbData(); - // //need to use configurable number of counters, offset or dynamic range? - // commonMode=NULL; - // dim=1; - // break; - - // case MYTHEN302: - // deserializer=1; - // cout << "MYTHEN 3 0.2" << endl; - // dataStructure=new mythen3_02_jctbData(eNumCount->GetIntNumber(),eDynRange->GetIntNumber(),eSerOff->GetIntNumber()); - // //( int nch=64*3,int dr=24, int off=5) - // eNumCount->SetState(kTRUE); - // eDynRange->SetState(kTRUE); - // eSerOff->SetState(kTRUE); - // commonMode=NULL; - // dim=1; - // break; - default: - dataStructure=NULL; - commonMode=NULL; - } - if (cbCommonMode->IsOn()) cm=commonMode; - } - - if (dataStructure || deserializer) { - if (dataStructure) { - photonFinder=new singlePhotonDetector(dataStructure,csize,nsigma,1,cm); //sign is positive - should correct with ADC mask, no common mode - //photonFinder=new singlePhotonDetector(dataStructure,csize,nsigma,1,cm); //sign is positive - should correct with ADC mask, no common mode - dataStructure->getDetectorSize(nx,ny); - - } - if (deserializer) { - ny=1; - nx=eNumCount->GetIntNumber(); - eNumCount->SetState(kTRUE); - eDynRange->SetState(kTRUE); - eSerOff->SetState(kTRUE); - } - // cout << "h size is " << nx << " " << ny << endl; - int ymax=ny, xmax=nx; - // if (ny>500) {ny=ny/2;} - // if (nx>500) {nx=nx/2;} - cout << "*** " << nx << " " << ny << endl; - if (rb2D->IsOn()) { - if (ny>1) { - h2DMapAn=new TH2F("h2dmapAn","",nx,0,xmax,ny,0,ymax); - h2DMapAn->SetStats(kFALSE); - cout << "Created h2DMapAn"<< endl; - if (dbitPlot && adcPlot){ - h2DMapDig=new TH2F("h2dmapDig","",nx,0,xmax,ny,0,ymax); - h2DMapDig->SetStats(kFALSE); - cout << "Created h2DMapDig"<< endl; - } - } else { - h1DMap=new TH1F("h1dmap","",nx,0,xmax); - h1DMap->SetStats(kFALSE); - cout << "Created h1DMap"<< endl; - } - } // else if (rbScan->IsOn()) { - // int nsteps=0;//myDet->getScanSteps(0); - // double stepmin=0, stepmax=1; - // if (nsteps>0) { - // stepmin=myDet->getScanStep(0,0); - // stepmax=myDet->getScanStep(0,nsteps-1); - // } - // cout << "************ creating scan histogram " << nx*ny << " " << nsteps << " " << stepmin << " " << stepmax << endl; - // if (nsteps<1) nsteps=1; - // double hmin=stepmin, hmax=stepmax; - // if (stepmin>stepmax) { - // hmin=stepmax; - // hmax=stepmin; - // } - // h2Scan=new TH2F("h2scan","",nx*ny,0,nx*ny,nsteps,hmin,hmax); - // } - - } - - - cout << "done " << endl; -} - - - -void ctbAcquisition::changeDetector(int i){ - changePlot(); - changeDetector(); -} - -void ctbAcquisition::changePlot(int i){ - changePlot(); - changeDetector(); -} - - - -void ctbAcquisition::setGraph(int i ,int en, Pixel_t col) { - char name[100]; - // TList *l= mgAdcs->GetListOfGraphs(); - sprintf(name,"adc%d",i); - - // TList *l= adcStack->GetHists(); - TH1F *h=adcHisto[i];//(TH1F*)l->At(i);; - TH1F *h1=countsHisto[i];//(TH1F*)(countsStack->GetHists()->At(i)); - if (en) { - plotFlag[i]=1; - h->SetLineColor(TColor::GetColor(col)); - h1->SetLineColor(TColor::GetColor(col)); - h1->SetFillColor(TColor::GetColor(col)); - - if (adcStack->GetHists()) - // if (adcStack->GetHists()->GetEntries()) - if (adcStack->GetHists()->Contains(h)==0) - adcStack->Add(h); - - if (countsStack->GetHists()) - if (countsStack->GetHists()->Contains(h1)==0) - countsStack->Add(h1); - - cout << "Enable plot " << i << " color " << col << endl; - } else { - cout << "Disable plot " << i << endl; - plotFlag[i]=0; - if (adcStack->GetHists()) - // if (adcStack->GetHists()->GetEntries()) - if (adcStack->GetHists()->Contains(h)) - adcStack->RecursiveRemove(h); - if (countsStack->GetHists()) - if (countsStack->GetHists()->Contains(h1)) - countsStack->RecursiveRemove(h1); - } - cout << countsStack->GetHists()->GetEntries() << endl; - - cout << "Number of histos " << adcStack->GetHists()->GetEntries() << endl; - - changePlot(); - - // globalPlot=0; - // for (int ii=0; iiGetListOfGraphs(); - sprintf(name,"bit%d",i); - // TList *l= adcStack->GetHists(); - TH1F *h=bitHisto[i];//(TH1F*)l->At(i);; - if (en) { - //cout<< "enabling plot of bit "<SetLineColor(TColor::GetColor(col)); - if (bitStack->GetHists()) - //if (bitStack->GetHists()->GetEntries()) - if (bitStack->GetHists()->Contains(h)==0) - bitStack->Add(h); - - - cout << "Enable bit plot " << i << " color " << col << endl; - } else { - cout << "Disable bit plot " << i << endl; - bitPlotFlag[i]=0; - if (bitStack->GetHists()) - // if (bitStack->GetHists()->GetEntries()) - if (bitStack->GetHists()->Contains(h)) - bitStack->RecursiveRemove(h); - } - cout << "Number of histos " << bitStack->GetHists()->GetEntries() << endl; - - changePlot(); - - float off=0; - for (int ii=0; ii(1.5); - cout << "bit " << ii << " offset " << bitOffset[ii] << endl; - } - } - - // globalPlot=0; - // for (int ii=0; iisetFilePath(eOutdir->GetText()); - } CATCH_DISPLAY ("Could not set file path", "ctbAcquisition::setOutdir") -} - -void ctbAcquisition::setFname() { - try { - myDet->setFileNamePrefix(eFname->GetText()); - } CATCH_DISPLAY ("Could not set file name prefix", "ctbAcquisition::setFname") -} - -void ctbAcquisition::setFindex() { - try { - myDet->setAcquisitionIndex(eFindex->GetNumber()); - } CATCH_DISPLAY ("Could not set acquisition index", "ctbAcquisition::setFindex") -} - -void ctbAcquisition::setFsave(Bool_t b) { - try { - myDet->setFileWrite(b); - eFname->SetState(b); - eOutdir->SetState(b); - } CATCH_DISPLAY ("Could not set file write", "ctbAcquisition::setFsave") -} - -void ctbAcquisition::update() { - try { - auto retval = myDet->getFileNamePrefix().tsquash("Different values"); - eFname->SetText(retval.c_str()); - } CATCH_DISPLAY ("Could not get file name prefix", "ctbAcquisition::update") - - try { - auto retval = myDet->getAcquisitionIndex().tsquash("Different values"); - eFindex->SetNumber(retval); - } CATCH_DISPLAY ("Could not get acquisition index", "ctbAcquisition::update") - - try { - auto retval = myDet->getFileWrite().tsquash("Different values"); - cFileSave->SetOn(retval); - } CATCH_DISPLAY ("Could not get file write", "ctbAcquisition::update") - - eFname->SetState(cFileSave->IsOn()); - eOutdir->SetState(cFileSave->IsOn()); - eFindex->SetState(cFileSave->IsOn()); - - try { - auto retval = myDet->getNumberOfAnalogSamples().tsquash("Different values"); - setAnalogSamples(retval); - } CATCH_DISPLAY ("Could not get number of analog samples", "ctbAcquisition::update") - - try { - auto retval = myDet->getNumberOfDigitalSamples().tsquash("Different values"); - setDigitalSamples(retval); - } CATCH_DISPLAY ("Could not get number of digital samples", "ctbAcquisition::update") - - try { - roMode = static_cast(myDet->getReadoutMode().tsquash("Different values")); - setReadoutMode(roMode); - } CATCH_DISPLAY ("Could not get readout mode", "ctbAcquisition::update") - - updateChans(); - - if (dataStructure) { - cout << cbDetType->GetSelected()<< endl; - // if (cbDetType->GetSelected()==MYTHEN301 || cbDetType->GetSelected()==MYTHEN302){ - // cout << "settings deserialiation parameters for MYTHEN" << endl; - // mythen3_01_jctbData* ms=(mythen3_01_jctbData*)dataStructure; - // eSerOff->SetNumber( ms->setSerialOffset(-1)); - // eDynRange->SetNumber( ms->setDynamicRange(-1)); - // eNumCount->SetNumber( ms->setNumberOfCounters(-1)); - // } - - } - - if (myDet->getDetectorType().squash() == slsDetectorDefs::MOENCH) { - dBitOffset = 0; - } else { - try { - dBitOffset = myDet->getRxDbitOffset().tsquash("Different values"); - } CATCH_DISPLAY ("Could not get receiver dbit offset", "ctbAcquisition::update") - } - try { - tenG = myDet->getTenGiga().tsquash("Different values"); - } CATCH_DISPLAY ("Could not get ten giga enable", "ctbAcquisition::update") - - // char aargs[10][100]; - // char *args[10]; - // for (int i=0; i<10; i++) - // args[i]=aargs[i]; - - // string retval; - // sprintf(args[0],"adcdisable"); - // slsDetectorCommand *cmd=new slsDetectorCommand(myDet); - // retval=cmd->executeLine(1,args,slsDetectorDefs::GET_ACTION); - // delete cmd; - // int mask; - // sscanf(retval.c_str(),"adcdisable %d",&mask); - // for (int i=0; iGetState()==1 || acqThread->GetState()==6) { - - - if (cCompile->IsOn()) { - sprintf(fname,"%s %s",patternCompiler,patternFile); - cout << "Compile: " << fname << endl; - strcpy(currdir,gSystem->pwd()); - - std::size_t found = string(patternCompiler).rfind('/'); - if (found!=std::string::npos) - gSystem->cd(string(patternCompiler).substr(0,found).c_str()); - - gSystem->cd(cdir); - system(fname); - gSystem->cd(currdir); - } - - if (string(patternCompiler).rfind(".pat")!=std::string::npos) - strcpy(fname,patternFile); - else if (string(patternCompiler).rfind(".npat")!=std::string::npos) - strcpy(fname,patternFile); - else - sprintf(fname,"%sat",patternFile); - - cout << "Load: " << fname << endl; - try { - myDet->loadParameters(fname); - } CATCH_DISPLAY ("Could not load parameters", "ctbAcquisition::loadPattern") - } -} - - -void ctbAcquisition::toggleAcquisition() { - - - if (acqThread->GetState()==1 || acqThread->GetState()==6) { - /** update all infos useful for the acquisition! */ - - try { - auto retval = myDet->getNumberOfAnalogSamples().tsquash("Different values"); - setAnalogSamples(retval); - } CATCH_DISPLAY ("Could not get number of analog samples", "ctbAcquisition::toggleAcquisition") - - try { - auto retval = myDet->getNumberOfDigitalSamples().tsquash("Different values"); - setDigitalSamples(retval); - } CATCH_DISPLAY ("Could not get number of digital samples", "ctbAcquisition::toggleAcquisition") - - if (myDet->getDetectorType().squash() == slsDetectorDefs::MOENCH) { - dBitOffset = 0; - } else { - try { - dBitOffset = myDet->getRxDbitOffset().tsquash("Different values"); - } CATCH_DISPLAY ("Could not get receiver dbit offset", "ctbAcquisition::toggleAcquisition") - } - - try { - roMode = static_cast(myDet->getReadoutMode().tsquash("Different values")); - setReadoutMode(roMode); - } CATCH_DISPLAY ("Could not get readout mode", "ctbAcquisition::toggleAcquisition") - - - cout << "Run" << endl; - bStatus->SetText("Stop"); - ip=0; - for (int i=0; iGetListOfFunctions()) - adcHisto[i]->GetListOfFunctions()->Delete(); - - adcHisto[i]->Reset(); - - if (countsHisto[i]->GetListOfFunctions()) - countsHisto[i]->GetListOfFunctions()->Delete(); - countsHisto[i]->Reset(); - // ((TH1F*)adcStack->GetHists()->At(i))->Reset(); - // ((TH1F*)countsStack->GetHists()->At(i))->Reset(); - } - for (int i=0; iReset(); - } - cout << "reset 2d an" << endl;; - if (h2DMapAn) h2DMapAn->Reset(); - cout << "reset 2d dig" << endl;; - if (h2DMapDig) h2DMapDig->Reset(); - cout << "reset 1d" << endl;; - if (h1DMap) h1DMap->Reset(); - cout << "done" << endl;; - // if (h2Scan) h2Scan->Reset(); - // cout << "reset 1d" << endl;; - // if (rbWaveform->IsOn()) -// adcStack->Draw("NOSTACK"); -// else if (rbDistribution->IsOn()) -// countsStack->Draw("NOSTACK"); -// else if (rb2D->IsOn()) -// h2DMap->Draw("colz"); - - // cout << "timer" << endl; - changePlot(); - - // plotTimer->TurnOn(); - // cout << "thread" << endl; - acqThread->Run(); - StopFlag=0; - - - - - - } else { - StopFlag=1; - try{ - myDet->stopDetector(); - } CATCH_DISPLAY ("Could not stop acquisition", "ctbAcquisition::toggleAcquisition") - stop=1; - bStatus->SetText("Start"); - // acqThread->Kill(); - } -} - -void ctbAcquisition::acquisitionFinished() { - bStatus->SetText("Start"); - cout << "finished " << endl; - // plotTimer->TurnOff(); - Draw(); -} - -void ctbAcquisition::startAcquisition(){ - cout << "Detector started " <GetNumber()<< endl; - stop=0; - - try { - tenG = myDet->getTenGiga().tsquash("Different values"); - } CATCH_DISPLAY ("Could not get ten giga enable", "ctbAcquisition::startAcquisition") - - for (int im=0; imGetNumber(); im++) { - try { - myDet->acquire(); - } CATCH_DISPLAY ("Could not acquire", "ctbAcquisition::startAcquisition") - - cout << im << endl; - if (stop) - break; - } -} - -void* ctbAcquisition::ThreadHandle(void *arg) -{ - ctbAcquisition *acq = static_cast(arg); - - acq->startAcquisition(); - acq->acquisitionFinished(); - - return nullptr; -} - - void ctbAcquisition::progressCallback(double f,void* arg) { - - - // ctbAcquisition *acq = static_cast(arg); - - - cout << "*********" << f << "*******" << endl; - - - - - } - -void ctbAcquisition::setPatternFile(const char* t) { - - - cout << "New pattern is " << t << endl; - - strcpy(patternFile,t); - } - -void ctbAcquisition::setPatternCompiler(const char* t) { - - - cout << "New compiler is " << t << endl; - strcpy(patternCompiler,t); - - } -void ctbAcquisition::setMeasurements() { - -} - -void ctbAcquisition::setAnalogSamples(int n) { - - - cout<< "Set number of analog samples to " << dec<< n << endl; - if (n>0 && n<8192) - nAnalogSamples=n; - - // TList *l= adcStack->GetHists(); - TH1 *h; - // if (l) { - for (int i=0; iAt(i); - if (h) { - - h->SetBins(nAnalogSamples,0,nAnalogSamples); - } - } - - h=adcStack->GetHistogram(); - if (h) - h->SetBins(nAnalogSamples,0,nAnalogSamples); -} - - - -void ctbAcquisition::setDigitalSamples(int n) { - - - cout<< "Set number of digital samples to " << dec<< n << endl; - if (n>0 && n<8192) - nDigitalSamples=n; - - TH1 *h; - for (int i=0; iAt(i); - if (h) { - - h->SetBins(nDigitalSamples,0,nDigitalSamples); - } - - } - // cout<< "histos resized " << dec<< h->GetNbinsX() << endl; - - h=bitStack->GetHistogram(); - if (h) - h->SetBins(nDigitalSamples,0,nDigitalSamples); - -} - -void ctbAcquisition::setReadoutMode(int f) { - - roMode=f; - slsDetectorDefs::readoutMode flag=(slsDetectorDefs::readoutMode)f; - if (flag == slsDetectorDefs::DIGITAL_ONLY) { - nAnalogSamples=0; - adclist.clear(); - } else if (flag ==slsDetectorDefs::ANALOG_AND_DIGITAL) { - ; - } - else { - nDigitalSamples=0; - dbitlist.clear(); - } - - // for (int i=0; igetDetectorType().squash() == slsDetectorDefs::MOENCH) { - dbitlist.clear(); - } else { - try { - auto retval = myDet->getRxDbitList().tsquash("Different values"); - dbitlist.clear(); - if (!retval.empty()) { - for (const auto &value : retval) - dbitlist.push_back(value); - } - } CATCH_DISPLAY ("Could not get receiver dbit list.", "ctbAcquisition::updateChans") - } - - // adc mask - try { - auto retval = myDet->getADCEnableMask().tsquash("Different values"); - adclist.clear(); - if (retval!=0xffffffff) { - for (int i=0; inewDataSet(); - }; - -} - -void ctbAcquisition::ToggleCommonMode(Bool_t b) { - if (photonFinder) { - if (b) { - photonFinder->setCommonModeSubtraction(commonMode); - cmSub=1; - cout << "Enable common mode" << endl; - } else { - photonFinder->setCommonModeSubtraction(NULL); - cmSub=0; - cout << "Disable common mode" << endl; - } - } - -} - - -void ctbAcquisition::TogglePedSub(Bool_t b) { - if (b) { - ChangeHistoLimitsPedSub(); - } else { - ChangeHistoLimitsRaw(); - } - -} - - -void ctbAcquisition::FitADC() { - int iadc=eFitADC->GetNumber(); - if (iadc<0 || iadc>=NADCS) return; - cout << "fit panel for adc " << eFitADC->GetNumber() << endl; - if (rbWaveform->IsOn()) { - if (adcHisto[iadc]==NULL) return; - new TCanvas("Cadcfit"); - if (adcFit) { - delete adcFit; - adcFit=NULL; - } - adcFit=(TH1F*)(adcHisto[iadc]->Clone("adcfit")); - adcFit->Draw(); - adcFit->FitPanel(); - - } else if (rbDistribution->IsOn()) { - if (countsHisto[iadc]==NULL) return; - new TCanvas("Ccountsfit"); - - if (countsFit) { - delete countsFit; - countsFit=NULL; - } - - countsFit=(TH1F*)(countsHisto[iadc]->Clone("countsfit")); - countsFit->Draw(); - countsFit->FitPanel(); - } -} - - -void ctbAcquisition::plotBit() { - int iadc=eBitPlot->GetNumber(); - if (iadc<0 || iadc>=NSIGNALS) return; - cout << "plot panel for bit " << eBitPlot->GetNumber() << endl; - if (bitHisto[iadc]==NULL) return; - new TCanvas("Cbitplot"); - if (bitPlot) { - delete bitPlot; - bitPlot=NULL; - } - bitPlot=(TH1F*)(bitHisto[iadc]->Clone("bitplot")); - bitPlot->Draw(); -} - - - - - - - - - - -void ctbAcquisition::ChangeSerialOffset(Long_t a){ - ChangeSerialOffset(); -}; - - -void ctbAcquisition::ChangeDynamicRange(Long_t a){ - ChangeDynamicRange(); -}; - -void ctbAcquisition::ChangeNumberOfChannels(Long_t a){ - ChangeNumberOfChannels(); -}; - - - -void ctbAcquisition::ChangeSerialOffset(){ - changeDetector(); - // if (dataStructure) { - - // cout << cbDetType->GetSelected()<< endl; - // if (cbDetType->GetSelected()==MYTHEN301 || cbDetType->GetSelected()==MYTHEN302 ){ - // cout << "settings offsets for MYTHEN" << endl; - // mythen3_01_jctbData* ms=(mythen3_01_jctbData*)dataStructure; - // ms->setSerialOffset(eSerOff->GetIntNumber()); - - // } - // } -}; - - -void ctbAcquisition::ChangeDynamicRange(){ - changeDetector(); - // if (dataStructure) { - - // cout << cbDetType->GetSelected()<< endl; - // if (cbDetType->GetSelected()==MYTHEN301 || cbDetType->GetSelected()==MYTHEN302){ - // cout << "settings dynamic range for MYTHEN" << endl; - // mythen3_01_jctbData* ms=(mythen3_01_jctbData*)dataStructure; - // ms->setDynamicRange(eDynRange->GetIntNumber()); - - // } - // } -}; - -void ctbAcquisition::ChangeNumberOfChannels(){ - changeDetector(); - // if (dataStructure) { - // cout << cbDetType->GetSelected()<< endl; - // if (cbDetType->GetSelected()==MYTHEN301 || cbDetType->GetSelected()==MYTHEN302){ - // cout << "settings number of channels for MYTHEN" << endl; - // mythen3_01_jctbData* ms=(mythen3_01_jctbData*)dataStructure; - // ms->setNumberOfCounters(eNumCount->GetIntNumber()); - - // } - // } - if (deserializer) - changePlot(); -}; - -void ctbAcquisition::ChangeImagePixels(Long_t a){ - ChangeImagePixels(); -}; - -void ctbAcquisition::ChangeImagePixels(){ - changeDetector(); - // if (dataStructure) { - // cout << cbDetType->GetSelected()<< endl; - // if (cbDetType->GetSelected()==MYTHEN301 || cbDetType->GetSelected()==MYTHEN302){ - // cout << "settings number of channels for MYTHEN" << endl; - // mythen3_01_jctbData* ms=(mythen3_01_jctbData*)dataStructure; - // ms->setNumberOfCounters(eNumCount->GetIntNumber()); - - // } - // } - // if (deserializer) - // changePlot(); -}; - - -void ctbAcquisition::ChangeHistoLimitsPedSub(Long_t a){ - ChangeHistoLimitsPedSub(); -}; - - -void ctbAcquisition::ChangeHistoLimitsRaw(Long_t a){ - ChangeHistoLimitsRaw(); -} - -void ctbAcquisition::ChangeHistoLimitsPedSub(Bool_t a){ - ChangeHistoLimitsPedSub(); -}; - - -void ctbAcquisition::ChangeHistoLimitsRaw(Bool_t a){ - ChangeHistoLimitsRaw(); -} - - -void ctbAcquisition::ChangeHistoLimitsPedSub(){ - - cout << "set Limits ped sub hist " << eMinPedSub->GetNumber() << " " << eMaxPedSub->GetNumber() << endl; - - if (eMinPedSub->GetNumber()>eMaxPedSub->GetNumber()) - return; - - if (cbSubtractPedestal->IsOn()) { - if (cMinMaxPedSub->IsOn()) { - adcStack->SetMaximum( eMaxPedSub->GetNumber()); - adcStack->SetMinimum( eMinPedSub->GetNumber()); - if (h2DMapAn) { - h2DMapAn->SetMaximum( eMaxPedSub->GetNumber()); - h2DMapAn->SetMinimum( eMinPedSub->GetNumber()); - } - if (h1DMap) { - h1DMap->SetMaximum( eMaxPedSub->GetNumber()); - h1DMap->SetMinimum( eMinPedSub->GetNumber()); - } - if (countsStack->GetHistogram()) - countsStack->GetHistogram()->GetXaxis()->SetRangeUser(eMinPedSub->GetNumber(), eMaxPedSub->GetNumber()); - } else { - if (adcStack->GetHistogram()) - adcStack->GetHistogram()->GetYaxis()->UnZoom(); - if (h2DMapAn) { - h2DMapAn->GetZaxis()->UnZoom(); - } - if (h1DMap) { - h1DMap->GetYaxis()->UnZoom(); - } - if (countsStack->GetHistogram()) - countsStack->GetHistogram()->GetXaxis()->UnZoom(); - } - } - - -}; - - -void ctbAcquisition::ChangeHistoLimitsRaw(){ - - cout << "set Limits raw hist " << eMinRaw->GetNumber() << " " << eMaxRaw->GetNumber() << endl; - if (eMinRaw->GetNumber()>eMaxRaw->GetNumber()) - return; - - if (cbSubtractPedestal->IsOn()==0) { - if (cMinMaxRaw->IsOn()) { - adcStack->SetMaximum( eMaxRaw->GetNumber()); - adcStack->SetMinimum( eMinRaw->GetNumber()); - if (h2DMapAn) { - h2DMapAn->SetMaximum( eMaxRaw->GetNumber()); - h2DMapAn->SetMinimum( eMinRaw->GetNumber()); - } - if (h1DMap) { - h1DMap->SetMaximum( eMaxRaw->GetNumber()); - h1DMap->SetMinimum( eMinRaw->GetNumber()); - } - if (countsStack->GetHistogram()) - countsStack->GetHistogram()->GetXaxis()->SetRangeUser(eMinRaw->GetNumber(), eMaxRaw->GetNumber()); - } else { - - if (adcStack->GetHistogram()) - adcStack->GetHistogram()->GetYaxis()->UnZoom(); - if (h2DMapAn) { - h2DMapAn->GetZaxis()->UnZoom(); - } - - if (h1DMap) { - h1DMap->GetYaxis()->UnZoom(); - } - if (countsStack->GetHistogram()) - countsStack->GetHistogram()->GetXaxis()->UnZoom(); - - } - } - -} diff --git a/ctbGui/ctbAcquisition.h b/ctbGui/ctbAcquisition.h deleted file mode 100644 index 3d5524eda..000000000 --- a/ctbGui/ctbAcquisition.h +++ /dev/null @@ -1,248 +0,0 @@ -// SPDX-License-Identifier: LGPL-3.0-or-other -// Copyright (C) 2021 Contributors to the SLS Detector Package -#ifndef CTBACQUISITION_H -#define CTBACQUISITION_H -#include - -#include "ctbAdcs.h" -#include "ctbSignals.h" -#include "ctbPattern.h" -class TGTextEntry; -class TGLabel; -class TGNumberEntry; -class TGCheckButton; -class TThread; -class TGraph; -class TMultiGraph; -class THStack; -class TGButtonGroup; -class TGRadioButton; -class TGComboBox; -class TTimer; -class TCanvas; -class TH2F; -class TH1F; -class TGLabel; -class TGTextButton; - -namespace sls -{ - class Detector; - class detectorData; -}; - -template class slsDetectorData; - -class singlePhotonDetector; -//class singlePhotonDetector; -class commonModeSubtraction; - -#include -#include -using namespace std; - -class ctbAcquisition : public TGGroupFrame { - - - enum {DESERIALIZER, MOENCH04, MOENCH02, MOENCH03, IMAGE32B, IMAGE16B, ADCSAR2, MYTHEN301, MYTHEN302}; - - - private: - TGTextEntry *eOutdir; - TGTextEntry *eFname; - TGNumberEntry *eFindex; - TGCheckButton *cFileSave; - - - TGNumberEntry *eSerOff; - TGNumberEntry *eDynRange; - TGNumberEntry *eNumCount; - - - TGNumberEntry *ePixX; - TGNumberEntry *ePixY; - - TGNumberEntry *eFitADC; - TGNumberEntry *eBitPlot; - TGNumberEntry *eMinRaw; - TGNumberEntry *eMaxRaw; - TGNumberEntry *eMinPedSub; - TGNumberEntry *eMaxPedSub; - TGCheckButton *cMinMaxRaw; - TGCheckButton *cMinMaxPedSub; - - - - - TGNumberEntry *eMeasurements; - - - - TGTextButton *bStatus; - // TGTextButton - TGCheckButton *cCompile; - TGTextButton *cLoad; - // TGCheckButton *cRun; - - TThread *acqThread; - - - THStack *adcStack; - THStack *bitStack; - THStack *countsStack; - - - TH1F *adcHisto[NADCS]; - TH1F *countsHisto[NADCS]; - - TH1F *bitHisto[NSIGNALS]; - float bitOffset[NSIGNALS]; - - // int enableFlag[NADCS+4]; - int roMode; - - int dBitOffset; - - - - TH1F *adcFit; - TH1F *bitPlot; - TH1F *countsFit; - - - - TH2F *h2DMapAn; // for 2D detectors - TH2F *h2DMapDig; // for 2D detectors - TH1F *h1DMap; //for 1D detectors - - // TH2F *h2Scan; // for 2D detectors - // TMultiGraph *mgAdcs; - // TH1I *plotAdc[NADCS]; - - - sls::Detector* myDet; - - int plotFlag[NADCS]; - int bitPlotFlag[NSIGNALS]; - - int ip; - // int nChannels; - // int chanEnable; - //int nADCs; - - std::vector dbitlist; - std::vector adclist; - - TGButtonGroup *bgPlot;// = new TGVButtonGroup(main_frame); - TGRadioButton *rbPlotOff; - TGRadioButton *rbWaveform; - TGRadioButton *rbDistribution; - TGRadioButton *rb2D; - // TGRadioButton *rbScan; - TGComboBox *cbDetType; - TGCheckButton *cbGetPedestal; - TGCheckButton *cbSubtractPedestal; - TGCheckButton *cbCommonMode; - TGTextButton *bResetPedestal; - - TGLabel *lClickX; - TGLabel *lClickY; - TGLabel *lClickValue; - - - TCanvas *myCanvas; - TTimer *plotTimer; - - char patternFile[10000]; - char patternCompiler[10000]; - - int globalPlot; - int adcPlot; - int dbitPlot; - int tenG; - - int nAnalogSamples, nDigitalSamples; - // int iScanStep; - - slsDetectorData *dataStructure; - singlePhotonDetector *photonFinder; - //singlePhotonDetector *photonFinder; - commonModeSubtraction *commonMode; - int cmSub; - - int stop; - - uint64_t dBitMask; - - int deserializer; - - public: - ctbAcquisition(TGVerticalFrame*, sls::Detector*); - void setOutdir(); - void setFname(); - void setMeasurements(); - void setFsave(Bool_t); - void changePlot(Int_t); - void changeDetector(Int_t); - void changePlot(); - void changeDetector(); - void setFindex(); - void Draw(); - void setCanvas(TCanvas*); - - void toggleAcquisition(); - void loadPattern(); - static void* ThreadHandle(void *arg); - void update(); - void acquisitionFinished(); - // string getParameters(); - - void setGraph (int i ,int en, Pixel_t col); - void setBitGraph (int i ,int en, Pixel_t col); - void startAcquisition(); - static void progressCallback(double,void*); - static void dataCallback(sls::detectorData*, long unsigned int, unsigned int, void*); - int StopFlag; - - int plotData(sls::detectorData*, int); - - void setPatternFile(const char* t); - - void setPatternCompiler(const char* t); - - void setAnalogSamples(int); - void setDigitalSamples(int); - - void setADCEnable(Int_t); - void setDbitEnable(Int_t); - void setReadoutMode(int); - void updateChans(); - - void resetPedestal(); - - void ToggleCommonMode(Bool_t); - void TogglePedSub(Bool_t); - void ChangeHistoLimitsPedSub(Long_t ); - void ChangeHistoLimitsRaw(Long_t); - void ChangeHistoLimitsPedSub( ); - void ChangeHistoLimitsRaw(); - void ChangeHistoLimitsPedSub(Bool_t ); - void ChangeHistoLimitsRaw(Bool_t); - - - void ChangeSerialOffset(); - void ChangeSerialOffset(Long_t); - void ChangeNumberOfChannels(); - void ChangeNumberOfChannels(Long_t); - void ChangeDynamicRange(); - void ChangeDynamicRange(Long_t); - void ChangeImagePixels(); - void ChangeImagePixels(Long_t); - - void canvasClicked(); - void FitADC(); - void plotBit(); - ClassDef(ctbAcquisition,0) -}; - -#endif diff --git a/ctbGui/ctbAdcs.cpp b/ctbGui/ctbAdcs.cpp deleted file mode 100644 index 694f5ff13..000000000 --- a/ctbGui/ctbAdcs.cpp +++ /dev/null @@ -1,616 +0,0 @@ -// SPDX-License-Identifier: LGPL-3.0-or-other -// Copyright (C) 2021 Contributors to the SLS Detector Package -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "ctbAdcs.h" -#include "ctbDefs.h" -#include "sls/Detector.h" - -using namespace std; - - - -ctbAdc::ctbAdc(TGVerticalFrame *page, int i, sls::Detector *det) - : TGHorizontalFrame(page, 800,800), id(i), myDet(det) { - - TGHorizontalFrame *hframe=this; - char tit[100]; - - page->AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1)); - hframe->MapWindow(); - - - - - - sprintf(tit, "ADC%d", id); - - sAdcLabel= new TGLabel(hframe, tit); - hframe->AddFrame(sAdcLabel,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - sAdcLabel->MapWindow(); - sAdcLabel->SetTextJustify(kTextLeft); - - - - - - - sAdcInvert= new TGCheckButton(hframe, "Inv"); - hframe->AddFrame( sAdcInvert,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - sAdcInvert->MapWindow(); - sAdcInvert->Connect("Toggled(Bool_t)","ctbAdc",this,"ToggledInvert(Bool_t)"); - - - sAdcEnable= new TGCheckButton(hframe, "En"); - hframe->AddFrame( sAdcEnable,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - sAdcEnable->MapWindow(); - // sAdcEnable->SetOn(kTRUE); - // sAdcEnable->SetEnabled(kFALSE); - sAdcEnable->Connect("Toggled(Bool_t)","ctbAdc",this,"ToggledEnable(Bool_t)"); - - - - sAdcPlot= new TGCheckButton(hframe, "Plot"); - hframe->AddFrame( sAdcPlot,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - sAdcPlot->MapWindow(); - - - sAdcPlot->Connect("Toggled(Bool_t)","ctbAdc",this,"ToggledPlot(Bool_t)"); - - - - fColorSel = new TGColorSelect(hframe, id+1, 0); - - fColorSel->Connect("ColorSelected(Pixel_t)","ctbAdc",this,"ColorChanged(Pixel_t)"); - hframe->AddFrame(fColorSel, new TGLayoutHints(kLHintsTop | - kLHintsLeft, 2, 0, 2, 2)); - - - fColorSel->SetColor(TColor::Number2Pixel(id+1)); - // sprintf(tit,"adc%d",id); -// gADC=new TGraph(); -// gADC->SetName(tit); -// gADC->SetLineColor(id+1); -// gADC->SetMarkerColor(id+1); - - - -}; -Pixel_t ctbAdc::getColor(){ - return fColorSel->GetColor(); -} -Bool_t ctbAdc::getEnabled(){ - return getPlot(); -} -Bool_t ctbAdc::getPlot(){ - return sAdcPlot->IsOn(); -} -Bool_t ctbAdc::getInverted(){ - return sAdcInvert->IsOn(); -} - -Bool_t ctbAdc::getEnable(){ - return sAdcEnable->IsOn(); -} - - - -void ctbAdc::setInverted(Bool_t b){ - // cout << id << "set enabled " << b << endl; - if (b) - sAdcInvert->SetOn(kTRUE,kTRUE); - else - sAdcInvert->SetOn(kFALSE,kTRUE); - -} - - -void ctbAdc::setEnable(Bool_t b){ - // cout << id << "set enabled " << b << endl; - if (b) - sAdcEnable->SetOn(kTRUE,kFALSE); - else - sAdcEnable->SetOn(kFALSE,kFALSE); - -} - - - - - -void ctbAdc::setAdcAlias(char *tit, int plot, int color) { - if (tit) - sAdcLabel->SetText(tit); - if (plot>0) - sAdcPlot->SetOn(kTRUE,kTRUE); - else if (plot==0) - sAdcPlot->SetOn(kFALSE,kTRUE); - if (color>=0) - fColorSel->SetColor(color); - fColorSel->SetEnabled(sAdcPlot->IsOn()); -} - - -string ctbAdc::getAdcAlias() { - - char line[1000]; - sprintf(line,"ADC%d %s %d %lx\n",id,sAdcLabel->GetText()->Data(),sAdcPlot->IsOn(),fColorSel->GetColor()); - return string(line); -} - -void ctbAdc::update() { - - - //Emit("ToggledAdcEnable(Int_t)", id); - -} - - -void ctbAdc::ToggledPlot(Bool_t b){ - - // Long_t mask=b<SetEnabled(kTRUE); - else - fColorSel->SetEnabled(kFALSE); - - // fColorSel->SetEnabled(sAdcPlot->IsOn()); - Emit("ToggledAdcPlot(Int_t)", id); - -} - - - -void ctbAdc::ToggledInvert(Bool_t b){ - - - // fColorSel->SetEnabled(sAdcPlot->IsOn()); - Emit("ToggledAdcInvert(Int_t)", id); - -} - - - -void ctbAdc::ToggledEnable(Bool_t b){ - - - fColorSel->SetEnabled(sAdcPlot->IsOn()); - Emit("ToggledAdcEnable(Int_t)", id); - -} - - - - - - -void ctbAdc::ColorChanged(Pixel_t) { - - Emit("ToggledAdcPlot(Int_t)", id); - -} - -void ctbAdc::ToggledAdcPlot(Int_t b){ - - - Emit("ToggledAdcPlot(Int_t)", id); - -} - -void ctbAdc::ToggledAdcInvert(Int_t b){ - - - Emit("ToggledAdcInvert(Int_t)", id); - -} - -void ctbAdc::ToggledAdcEnable(Int_t b){ - - - Emit("ToggledAdcEnable(Int_t)", id); - -} - - - - -void ctbAdc::setEnabled(Bool_t b){ - // cout << id << "set enabled " << b << endl; - if (b) - sAdcPlot->SetOn(kTRUE,kFALSE); - else - sAdcPlot->SetOn(kFALSE,kFALSE); - -} - - - -void ctbAdc::setPlot(Bool_t b){ - // cout << id << "set enabled " << b << endl; - if (b) - sAdcPlot->SetOn(kTRUE,kTRUE); - else - sAdcPlot->SetOn(kFALSE,kTRUE); - - -} - - - - - - - -ctbAdcs::ctbAdcs(TGVerticalFrame *page, sls::Detector *det) - : TGGroupFrame(page,"Adcs",kVerticalFrame), myDet(det) { - - - SetTitlePos(TGGroupFrame::kLeft); - page->AddFrame(this,new TGLayoutHints( kLHintsTop | kLHintsExpandX , 10,10,10,10)); - MapWindow(); - - - - TGHorizontalFrame* hframe=new TGHorizontalFrame(this, 800,800); - AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1)); - hframe->MapWindow(); - - - - - int idac=0; - - - - - - TGHorizontalFrame* hhframe=new TGHorizontalFrame(this, 800,800); - AddFrame(hhframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1)); - hhframe->MapWindow(); - - TGVerticalFrame *vframe; - - - - - for (idac=0; idacAddFrame(vframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1)); - vframe->MapWindow(); - - - - } - - sAdc[idac]=new ctbAdc(vframe,idac,myDet); - - - sAdc[idac]->Connect("ToggledAdcPlot(Int_t)","ctbAdcs",this,"ToggledAdcPlot(Int_t)"); - sAdc[idac]->Connect("ToggledAdcInvert(Int_t)","ctbAdcs",this,"ToggledAdcInvert(Int_t)"); - sAdc[idac]->Connect("ToggledAdcEnable(Int_t)","ctbAdcs",this,"ToggledAdcEnable(Int_t)"); - - } - - hframe=new TGHorizontalFrame(this, 800,800); - AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1)); - hframe->MapWindow(); - - - bCheckHalf[0]=new TGTextButton(hframe, "All 0-15"); - hframe->AddFrame(bCheckHalf[0],new TGLayoutHints(kLHintsTop | kLHintsExpandX, 5, 5, 5, 5)); - bCheckHalf[0]->MapWindow(); - bCheckHalf[0]->Connect("Clicked()","ctbAdcs",this,"CheckHalf0()"); - - - bRemoveHalf[0]=new TGTextButton(hframe, "None 0-15"); - hframe->AddFrame(bRemoveHalf[0],new TGLayoutHints(kLHintsBottom | kLHintsExpandX, 5, 5, 5, 5)); - bRemoveHalf[0]->MapWindow(); - bRemoveHalf[0]->Connect("Clicked()","ctbAdcs",this,"RemoveHalf0()"); - - - bCheckHalf[1]=new TGTextButton(hframe, "All 16-23"); - hframe->AddFrame(bCheckHalf[1],new TGLayoutHints(kLHintsTop | kLHintsExpandX, 5, 5, 5, 5)); - bCheckHalf[1]->MapWindow(); - bCheckHalf[1]->Connect("Clicked()","ctbAdcs",this,"CheckHalf1()"); - // bCheckAll->Connect("Clicked()","ctbAdcs",this,"CheckAll()"); - - - bRemoveHalf[1]=new TGTextButton(hframe, "None 16-23"); - hframe->AddFrame(bRemoveHalf[1],new TGLayoutHints(kLHintsBottom | kLHintsExpandX, 5, 5, 5, 5)); - bRemoveHalf[1]->MapWindow(); - bRemoveHalf[1]->Connect("Clicked()","ctbAdcs",this,"RemoveHalf1()"); - // bRemoveAll->Connect("Clicked()","ctbAdcs",this,"RemoveAll()"); - - - - - hframe=new TGHorizontalFrame(this, 800,800); - AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1)); - hframe->MapWindow(); - - - bCheckAll=new TGTextButton(hframe, "All"); - hframe->AddFrame(bCheckAll,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 5, 5, 5, 5)); - bCheckAll->MapWindow(); - bCheckAll->Connect("Clicked()","ctbAdcs",this,"CheckAll()"); - - - bRemoveAll=new TGTextButton(hframe, "None"); - hframe->AddFrame(bRemoveAll,new TGLayoutHints(kLHintsBottom | kLHintsExpandX, 5, 5, 5, 5)); - bRemoveAll->MapWindow(); - bRemoveAll->Connect("Clicked()","ctbAdcs",this,"RemoveAll()"); - - - - hframe=new TGHorizontalFrame(this, 800,50); - AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1)); - hframe->MapWindow(); - - - TGLabel *label= new TGLabel(hframe, "Inversion mask: "); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - label->MapWindow(); - label->SetTextJustify(kTextLeft); - - - eInversionMask = new TGNumberEntry(hframe, 0, 16,999, TGNumberFormat::kNESHex, - TGNumberFormat::kNEANonNegative, - TGNumberFormat::kNELNoLimits); - - hframe->AddFrame(eInversionMask,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); - eInversionMask->MapWindow(); - eInversionMask->Resize(150,30); - eInversionMask->SetState(kFALSE); - - - hframe=new TGHorizontalFrame(this, 800,50); - AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1)); - hframe->MapWindow(); - - - label= new TGLabel(hframe, "Enable mask: "); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - label->MapWindow(); - label->SetTextJustify(kTextLeft); - - - eEnableMask = new TGNumberEntry(hframe, 0, 16,999, TGNumberFormat::kNESHex, - TGNumberFormat::kNEANonNegative, - TGNumberFormat::kNELNoLimits); - - hframe->AddFrame(eEnableMask,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); - eEnableMask->MapWindow(); - eEnableMask->Resize(150,30); - eEnableMask->SetState(kFALSE); - -} - - -int ctbAdcs::setEnable(int reg) { - - try { - if (reg > -1) { - myDet->setADCEnableMask(reg); - } - auto retval = myDet->getADCEnableMask().tsquash("Different values"); - eEnableMask->SetHexNumber(retval); - return retval; - } CATCH_DISPLAY ("Could not set/get adc enablemask.", "ctbAdcs::setEnable") - - return -1; -} - -int ctbAdcs::setInvert(int reg) { - - try { - if (reg > -1) { - myDet->setADCInvert(reg); - } - auto retval = myDet->getADCInvert().tsquash("Different values"); - eInversionMask->SetHexNumber(retval); - return retval; - } CATCH_DISPLAY ("Could not set/get adc enablemask.", "ctbAdcs::setEnable") - - return -1; -} - - - -void ctbAdcs::update() { - Int_t invreg; - Int_t disreg; - - disreg=setEnable(); - invreg=setInvert(); - - for (int is=0; issetAdcAlias(NULL,-1,-1); - if (invreg & (1<setInverted(kTRUE); - else - sAdc[is]->setInverted(kFALSE); - - if (disreg & (1<setEnable(kTRUE); - else - sAdc[is]->setEnable(kFALSE); - } - - Emit("AdcEnable(Int_t)", disreg); - -} -string ctbAdcs::getAdcParameters() { - ostringstream line; - line << "reg "<< hex << setInvert() << "# ADC invert reg" << dec << endl; - line << "reg "<< hex << setEnable() << " # ADC enable reg"<< dec << endl; - return line.str(); - -} - - -void ctbAdcs::CheckAll() { - for (int is=0; issetPlot(kTRUE); - } -} - - -void ctbAdcs::RemoveAll() { - for (int is=0; issetPlot(kFALSE); - } -} - - - -void ctbAdcs::CheckHalf0() { - for (int is=0; issetPlot(kTRUE); - } -} - - -void ctbAdcs::RemoveHalf0() { - for (int is=0; issetPlot(kFALSE); - } -} - -void ctbAdcs::CheckHalf1() { - for (int is=NADCS/2; issetPlot(kTRUE); - } -} - - -void ctbAdcs::RemoveHalf1() { - for (int is=NADCS/2; issetPlot(kFALSE); - } -} - - -int ctbAdcs::setAdcAlias(string line) { - - int is=-1, plot=0, color=-1; - char tit[100]; - int narg=sscanf(line.c_str(),"ADC%d %s %d %x",&is,tit,&plot, &color); - if (narg<2) - return -1; - if (narg!=3) - color=-1; - if (is>=0 && issetAdcAlias(tit,plot,color); - } - return is; - -} - -string ctbAdcs::getAdcAlias() { - - ostringstream line; - - for (int is=0; isgetAdcAlias(); - - return line.str(); -} - - -void ctbAdcs::ToggledAdcPlot(Int_t b){ - - - Emit("ToggledAdcPlot(Int_t)", b); - -} - -void ctbAdcs::AdcEnable(Int_t b){ - Emit("AdcEnable(Int_t)", b); -} - - -void ctbAdcs::ToggledAdcEnable(Int_t b){ - - Int_t oreg=setEnable(); - Int_t m=1<getEnable()) - oreg|=m; - else - oreg&=~m; - - setEnable(oreg); - - Emit("AdcEnable(Int_t)", oreg); -} - - -void ctbAdcs::ToggledAdcInvert(Int_t b){ - - Int_t oreg=setInvert(); - Int_t m=1<getInverted()) - oreg|=m; - else - oreg&=~m; - - setInvert(oreg); -} - - - - - -Pixel_t ctbAdcs::getColor(int i){ - if (i>=0 && igetColor(); - return static_cast(-1); -} - -Bool_t ctbAdcs::getEnabled(int i){ - if (i>=0 && igetEnabled(); - return static_cast(-1); -} - -Bool_t ctbAdcs::getEnable(int i){ - if (i>=0 && igetEnable(); - return static_cast(-1); -} - -Bool_t ctbAdcs::getPlot(int i){ - if (i>=0 && igetPlot(); - return static_cast(-1); -} diff --git a/ctbGui/ctbAdcs.h b/ctbGui/ctbAdcs.h deleted file mode 100644 index 3a4cf35da..000000000 --- a/ctbGui/ctbAdcs.h +++ /dev/null @@ -1,157 +0,0 @@ -// SPDX-License-Identifier: LGPL-3.0-or-other -// Copyright (C) 2021 Contributors to the SLS Detector Package - - - -#ifndef CTBADCS_H -#define CTBADCS_H -#include - - -#define NADCS 32 - -class TRootEmbeddedCanvas; -class TGButtonGroup; -class TGVerticalFrame; -class TGHorizontalFrame; -class TGTextEntry; -class TGLabel; -class TGNumberEntry; -class TH2F; -class TGComboBox; -class TGCheckButton; -class TGColorSelect; -class TColor; - -class THStack; -class TGraphErrors; -class TGTextButton; -class TGTab; - -class TGraph; - -namespace sls -{ - class Detector; -}; - -#include -using namespace std; - -class ctbAdc : public TGHorizontalFrame { - - - private: - - - TGLabel *sAdcLabel; - TGCheckButton *sAdcEnable; - TGCheckButton *sAdcPlot; - TGCheckButton *sAdcInvert; - - TGColorSelect *fColorSel; - - // TGraph *gADC; - - int id; - sls::Detector *myDet; - - public: - ctbAdc(TGVerticalFrame *page, int i, sls::Detector *det); - - - void setAdcAlias(char *tit, int plot, int color); - string getAdcAlias(); - void ToggledAdcPlot(Int_t b); - void ToggledAdcEnable(Int_t b); - void ToggledAdcInvert(Int_t b); - - - void ToggledPlot(Bool_t b); - void ToggledEnable(Bool_t b); - void ToggledInvert(Bool_t b); - void ColorChanged(Pixel_t); - void setEnabled(Bool_t b); - Bool_t getEnabled(); - // TGraph *getGraph(); - void update(); - - Pixel_t getColor(); - - Bool_t getEnable(); - void setEnable(Bool_t); - void setPlot(Bool_t); - Bool_t getInverted(); - Bool_t getPlot(); - void setInverted(Bool_t); - - ClassDef(ctbAdc,0) - }; - - - -class ctbAdcs : public TGGroupFrame { -private: - - ctbAdc *sAdc[NADCS]; - sls::Detector *myDet; - - - TGTextButton *bCheckAll; - TGTextButton *bRemoveAll; - TGTextButton *bCheckHalf[2]; - TGTextButton *bRemoveHalf[2]; - TGNumberEntry *eInversionMask; - TGNumberEntry *eEnableMask; - - -/* TGTextButton *bPlotSelected; */ -/* TGNumberEntry *eMinX; */ -/* TGNumberEntry *eMaxX; */ -/* TGNumberEntry *eMinY; */ -/* TGNumberEntry *eMaxY; */ - - - -/* TGTextButton *bGetPixel; */ -/* TGNumberEntry *ePixelX; */ -/* TGNumberEntry *ePixelY; */ -/* TGLabel *lPixelValue; */ - -public: - - ctbAdcs(TGVerticalFrame *page, sls::Detector *det); - int setAdcAlias(string line); - string getAdcAlias(); - string getAdcParameters(); - void ToggledAdcPlot(Int_t); - void ToggledAdcInvert(Int_t); - void ToggledAdcEnable(Int_t); - void AdcEnable(Int_t b); - // TGraph *getGraph(int i); - void CheckAll(); - void RemoveAll(); - void update(); - - int setInvert(int reg=-1); - int setEnable(int reg=-1); - - - Pixel_t getColor(int i); - Bool_t getEnabled(int i); - Bool_t getPlot(int i); - Bool_t getEnable(int i); - - void CheckHalf0(); - void RemoveHalf0(); - - void CheckHalf1(); - void RemoveHalf1(); - - - ClassDef(ctbAdcs,0) -}; - -#endif - - diff --git a/ctbGui/ctbDacs.cpp b/ctbGui/ctbDacs.cpp deleted file mode 100644 index dd2763fdf..000000000 --- a/ctbGui/ctbDacs.cpp +++ /dev/null @@ -1,235 +0,0 @@ -// SPDX-License-Identifier: LGPL-3.0-or-other -// Copyright (C) 2021 Contributors to the SLS Detector Package - -#include -#include -#include - -#include -#include -#include -#include - -#include "ctbDacs.h" -#include "ctbDefs.h" -#include "sls/Detector.h" -#include "sls/sls_detector_defs.h" - -using namespace std; - - -ctbDac::ctbDac(TGGroupFrame *page, int idac, sls::Detector *det) : TGHorizontalFrame(page, 800,50) , id(idac), myDet(det) { - - TGHorizontalFrame *hframe=this; - - page->AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1)); - MapWindow(); - - char tit[100]; - - - sprintf(tit, "DAC %d:",idac); - - dacsLabel= new TGCheckButton(hframe, tit);// new TGLabel(hframe, tit); - dacsLabel->SetOn(kTRUE, kTRUE); - - dacsLabel->Connect("Toggled(Bool_t)","ctbDac",this,"setOn(Bool_t)"); - - - hframe->AddFrame(dacsLabel,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5)); - dacsLabel->MapWindow(); - dacsLabel->SetTextJustify(kTextLeft); - - - dacsEntry = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger, - TGNumberFormat::kNEANonNegative, - TGNumberFormat::kNELLimitMinMax, - 0, 65535); - - hframe->AddFrame(dacsEntry,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 5, 5, 5, 5)); - dacsEntry->MapWindow(); - dacsEntry->Resize(150,30); - - - dacsUnit= new TGCheckButton(hframe, "mV"); - // if (idac!=slsDetectorDefs::ADC_VPP) { - hframe->AddFrame( dacsUnit,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5)); - dacsUnit->MapWindow(); - if (idac==slsDetectorDefs::ADC_VPP) { - dacsUnit->SetEnabled(kFALSE); - hframe->HideFrame(dacsUnit); - dacsUnit->MapWindow(); - cout << "hiding!" << endl; - } - if (idac==slsDetectorDefs::HIGH_VOLTAGE) { - dacsUnit->SetText("V"); - dacsUnit->SetOn(kTRUE,kTRUE); - dacsUnit->SetEnabled(kFALSE); - } - //} - - - - sprintf(tit, "xxx"); - dacsValue= new TGLabel(hframe, tit); - hframe->AddFrame( dacsValue,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5)); - dacsValue->MapWindow(); - dacsValue->SetTextJustify(kTextLeft); - - TGTextEntry *e=dacsEntry->TGNumberEntry::GetNumberEntry(); - e->Connect("ReturnPressed()","ctbDac",this,"setValue()"); - // e->Connect("ValueSet(Long_t)","ctbDac",this,"setValue(Long_t)"); - dacsEntry->Connect("ValueSet(Long_t)","ctbDac",this,"setValue(Long_t)"); - // cout << "(((((((((((((((((((((((((((((((" << dacsEntry->GetListOfSignals()->At(0)->IsA() << endl; - - -} - - - -int ctbDac::setLabel(char *tit, int mv) { - if(tit) - dacsLabel->SetText(tit); - if (mv==1) - dacsUnit->SetOn(kTRUE,kTRUE); - else if (mv==0) - dacsUnit->SetOn(kFALSE,kTRUE); - // else if (mv==2) { - // ;} - // else if (mv==3) - // ; - return id; - -} - -string ctbDac::getLabel() { - ostringstream line; - line << dacsLabel->GetText() << " " << dacsUnit->IsOn() << endl; - // line << "DAC" << dec << id << " " << dacsUnit->IsOn() << endl; - return line.str(); - -} - -int ctbDac::getMoenchDacId() { - slsDetectorDefs::dacIndex moenchDacIndices[8] = {slsDetectorDefs::VBP_COLBUF, slsDetectorDefs::VIPRE, slsDetectorDefs::VIN_CM, slsDetectorDefs::VB_SDA, slsDetectorDefs::VCASC_SFP, slsDetectorDefs::VOUT_CM, slsDetectorDefs::VIPRE_CDS, slsDetectorDefs::IBIAS_SFP}; - - if (id >= 8) { - return id; - } - return static_cast(moenchDacIndices[id]); -} - -void ctbDac::setValue(Long_t a) {setValue();} - -void ctbDac::setValue() { - cout << "setting dac! "<< id << " value " << dacsEntry->GetIntNumber() << " units " << dacsUnit->IsOn() << endl; - - try { - int sid = id; - if (myDet->getDetectorType().squash() == slsDetectorDefs::MOENCH) { - sid = getMoenchDacId(); - } - myDet->setDAC(static_cast(sid), dacsEntry->GetIntNumber(), dacsUnit->IsOn()); - } CATCH_DISPLAY ("Could not set dac " + to_string(id) + ".", "ctbDac::setValue") - - getValue(); -} - -void ctbDac::setOn(Bool_t b) { - // cout << "setting dac! "<< id << endl; - if ( dacsLabel->IsOn()) { - setValue(); - } else { - try { - int sid = id; - if (myDet->getDetectorType().squash() == slsDetectorDefs::MOENCH) { - sid = getMoenchDacId(); - } - myDet->setDAC(static_cast(sid), -100, false); - } CATCH_DISPLAY ("Could not power off dac " + to_string(id) + ".", "ctbDac::setOn") - } - getValue(); -} - -int ctbDac::getValue() { - try { - int sid = id; - if (myDet->getDetectorType().squash() == slsDetectorDefs::MOENCH) { - sid = getMoenchDacId(); - } - int val = myDet->getDAC(static_cast(sid), dacsUnit->IsOn()).tsquash("Different values"); - cout << "dac " << id << " " << val << endl; - dacsValue->SetText(to_string(val).c_str()); - if (val >= 0) { - dacsLabel->SetOn(kTRUE); - } else { - dacsLabel->SetOn(kFALSE); - } - return val; - } CATCH_DISPLAY ("Could not get dac " + to_string(id) + ".", "ctbDac::getValue") - - return -1; -} - - -ctbDacs::ctbDacs(TGVerticalFrame *page, sls::Detector *det) : TGGroupFrame(page,"DACs",kVerticalFrame) , myDet(det){ - - SetTitlePos(TGGroupFrame::kLeft); - page->AddFrame(this,new TGLayoutHints( kLHintsTop | kLHintsExpandX , 10,10,10,10)); - MapWindow(); - - // cout << "window mapped " << endl; - - for (int idac=0; idacsetLabel((char*)"ADC Vpp",2); - dacs[NDACS+1]->setLabel((char*)"High Voltage",3); -} - - -int ctbDacs::setDacAlias(string line) { - int is=-1, mv=0; - char tit[100]; - int narg=sscanf(line.c_str(),"DAC%d %s %d",&is,tit,&mv); - if (narg<2) - return -1; - if (is>=0 && issetLabel(tit,mv); - return is; - -} - -string ctbDacs::getDacAlias() { - ostringstream line; - - for (int i=0; igetLabel() << endl; - return line.str(); -} - - - - - -string ctbDacs::getDacParameters() { - ostringstream line; - - for (int i=0; igetValue << endl; - line << "dac:" << i << " " << dacs[i]->getValue() << endl; - } - return line.str(); -} - - - -void ctbDacs::update() { - for (int idac=0; idacgetValue(); - } -} diff --git a/ctbGui/ctbDacs.h b/ctbGui/ctbDacs.h deleted file mode 100644 index 818c0c42d..000000000 --- a/ctbGui/ctbDacs.h +++ /dev/null @@ -1,77 +0,0 @@ -// SPDX-License-Identifier: LGPL-3.0-or-other -// Copyright (C) 2021 Contributors to the SLS Detector Package - - -#ifndef CTBDACS_H -#define CTBDACS_H -#include - - -#define NDACS 18 -//#define NDACS 16 - - -class TGTextEntry; -class TGLabel; -class TGNumberEntry; -class TGCheckButton; - - -namespace sls -{ - class Detector; -}; - -#include -using namespace std; - - -class ctbDac : public TGHorizontalFrame { - - - protected: - // TGLabel *dacsLabel; - TGNumberEntry *dacsEntry; - TGCheckButton *dacsUnit; - TGCheckButton *dacsLabel; - TGLabel *dacsValue; - int id; - - sls::Detector* myDet; - public: - ctbDac(TGGroupFrame*, int , sls::Detector*); - void setValue(); - void setValue(Long_t); - int getValue(); - void setOn(Bool_t); - - int setLabel(char *tit, int mv); - string getLabel(); -int getMoenchDacId(); - - - ClassDef(ctbDac,0) -}; - -class ctbDacs : public TGGroupFrame { -private: - - ctbDac *dacs[NDACS+2]; - - sls::Detector* myDet; - -public: - ctbDacs(TGVerticalFrame *page, sls::Detector*); - - int setDacAlias(string line); - // int setDacAlias(string line); - string getDacAlias(); - string getDacParameters(); - - void update(); - - ClassDef(ctbDacs,0) -}; - -#endif - diff --git a/ctbGui/ctbDefs.h b/ctbGui/ctbDefs.h deleted file mode 100644 index 85d7e1b8a..000000000 --- a/ctbGui/ctbDefs.h +++ /dev/null @@ -1,86 +0,0 @@ -// SPDX-License-Identifier: LGPL-3.0-or-other -// Copyright (C) 2021 Contributors to the SLS Detector Package -#pragma once - -#include -#include -#include - -//#include "sls/sls_detector_exceptions.h" -//#include "sls/ansi.h" -#define RED "\x1b[31m" -#define RESET "\x1b[0m" -#define BOLD "\x1b[1m" -#define cprintf(code, format, ...) printf(code format RESET, ##__VA_ARGS__) - - -#define CATCH_DISPLAY(m, s) catch(...) { ctbDefs::DisplayExceptions(m, s); } -#define CATCH_HANDLE(...) catch(...) { ctbDefs::HandleExceptions(__VA_ARGS__); } - -class ctbDefs { - public: - /** - * Empty Constructor - */ - ctbDefs(){}; - - // convert double seconds to chrono ns - static std::chrono::nanoseconds ConvertDoubleStoChronoNS(double timeS) { - using std::chrono::duration; - using std::chrono::duration_cast; - using std::chrono::nanoseconds; - return duration_cast(duration(timeS)); - } - - // convert chrono ns to doubel s - static double ConvertChronoNStoDoubleS(std::chrono::nanoseconds timeNs) { - using std::chrono::duration; - using std::chrono::duration_cast; - return duration_cast>(timeNs).count(); - } - - static void DisplayExceptions(std::string emsg, std::string src) { - try { - throw; - } /* catch (const sls::SocketError &e) { - throw; - } catch (const sls::SharedMemoryError &e) { - throw; - } */catch (const std::exception &e) { - ExceptionMessage(emsg, e.what(), src); - } - }; - - template struct NonDeduced { using type = CT; }; - template - static void HandleExceptions(const std::string emsg, const std::string src, S* s, - RT (S::*somefunc)(CT...), - typename NonDeduced::type... Args) { - try { - throw; - } /*catch (const sls::SocketError &e) { - throw; - } catch (const sls::SharedMemoryError &e) { - throw; - } */catch (const std::exception &e) { - - ExceptionMessage(emsg, e.what(), src); - (s->*somefunc)(Args...); - } - }; - - static void ExceptionMessage(std::string message, - std::string exceptionMessage, - std::string source) { - // because sls_detector_exceptions cannot be included - if (exceptionMessage.find("hared memory") != std::string::npos) { - throw; - } - if (exceptionMessage.find("annot connect") != std::string::npos) { - throw; - } - cprintf(RED, "Warning (%s): %s [Caught Exception: %s]\n", source.c_str(), message.c_str(), exceptionMessage.c_str()); - //return Message(qDefs::WARNING, message + std::string("\nCaught exception:\n") + exceptionMessage, source); - }; - -}; diff --git a/ctbGui/ctbGui.cpp b/ctbGui/ctbGui.cpp deleted file mode 100644 index 5c34d8ee0..000000000 --- a/ctbGui/ctbGui.cpp +++ /dev/null @@ -1,159 +0,0 @@ -// SPDX-License-Identifier: LGPL-3.0-or-other -// Copyright (C) 2021 Contributors to the SLS Detector Package -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "sls/Detector.h" -#include "sls/sls_detector_defs.h" -//#include "sls_receiver_defs.h" -#include "ctbMain.h" -#include "ctbDefs.h" -using namespace std; - - -int main(int argc, char **argv) { - - - string afname, cfname, pfname; - int id=0; - - int af=0, cf=0, pf=0; - - - cout << " *** " << argc << endl; - for (int ia=0; ialoadConfig(cfname); - cout << "Config file loaded successfully" << endl; - } else { - cout << "No config file specified" << endl; - } - cout << "hostname " << myDet->getHostname() << endl; - - if (pf) { - myDet->loadParameters(pfname); - cout << "Loaded parameter file successfully" << endl; - } else{ - cout << "No parameter file specified" << endl; - } - } CATCH_DISPLAY ("Could not create detector/ load config/parameters.", "ctbGui::main") - - /***********Create GUI stuff *******************/ - TApplication theApp("App",&argc,argv); - - - gStyle->SetDrawBorder(0); - gStyle->SetCanvasColor(kWhite); - gStyle->SetCanvasDefH(800); - gStyle->SetCanvasDefW(800); - gStyle->SetCanvasBorderMode(0); - gStyle->SetPadBorderMode(0); - gStyle->SetPaintTextFormat("5.2f"); - gStyle->SetLineWidth(2); - gStyle->SetTextSize(1.1); - gStyle->SetLabelSize(0.04,"xy"); - gStyle->SetTitleSize(0.05,"xy"); - gStyle->SetTitleOffset(1.0,"x"); - gStyle->SetTitleOffset(1.1,"y"); - gStyle->SetPadTopMargin(0.15); - gStyle->SetPadRightMargin(0.15); - gStyle->SetPadBottomMargin(0.15); - gStyle->SetPadLeftMargin(0.15); - gStyle->SetLegendBorderSize(1); - gStyle->SetFrameBorderMode(0); - gStyle->SetFrameFillColor(kWhite); - // gStyle->SetLegendFillColor(kWhite); - gStyle->SetTitleFillColor(kWhite); - gStyle->SetFillColor(kWhite); - gStyle->SetStatFontSize(0.03); - gStyle->SetStatBorderSize(1); - gStyle->SetStatFormat("6.4g"); - gStyle->SetStatX(0.95); - gStyle->SetStatY(0.95); - gStyle->SetStatW(0.2); - gStyle->SetStatH(0.2); - gStyle->SetTitleX(0.1); - gStyle->SetTitleY(0.95); - gStyle->SetTitleBorderSize(0); - gStyle->SetTitleFontSize(0.05); - gROOT->SetStyle("Default"); - - - TColor::InitializeColors(); - const Int_t NRGBs = 5; - const Int_t NCont = 90; - - Double_t stops[NRGBs] = { 0.00, 0.34, 0.61, 0.84, 1.00 }; - Double_t red[NRGBs] = { 0.00, 0.00, 0.87, 1.00, 0.51 }; - Double_t green[NRGBs] = { 0.00, 0.81, 1.00, 0.20, 0.00 }; - Double_t blue[NRGBs] = { 0.51, 1.00, 0.12, 0.00, 0.00 }; - TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont); - gStyle->SetNumberContours(NCont); - - - gROOT->ForceStyle(); - ctbMain *mf=new ctbMain(gClient->GetRoot(), myDet); - - cout << " *** " << argc << endl; - for (int ia=0; ialoadAlias(afname); - else - cout << "no alias specified" << endl; - - theApp.Run(); - - return 0; -} diff --git a/ctbGui/ctbLinkDef.h b/ctbGui/ctbLinkDef.h deleted file mode 100644 index f041a01fd..000000000 --- a/ctbGui/ctbLinkDef.h +++ /dev/null @@ -1,17 +0,0 @@ -// SPDX-License-Identifier: LGPL-3.0-or-other -// Copyright (C) 2021 Contributors to the SLS Detector Package -#pragma link C++ class ctbMain; -#pragma link C++ class ctbDacs; -#pragma link C++ class ctbDac; -#pragma link C++ class ctbSignals; -#pragma link C++ class ctbSignal; -#pragma link C++ class ctbAdc; -#pragma link C++ class ctbAdcs; -#pragma link C++ class ctbLoop; -#pragma link C++ class ctbWait; -#pragma link C++ class ctbPattern; -#pragma link C++ class ctbAcquisition; -#pragma link C++ class ctbPower; -#pragma link C++ class ctbPowers; -#pragma link C++ class ctbSlowAdc; -#pragma link C++ class ctbSlowAdcs; diff --git a/ctbGui/ctbMain.cpp b/ctbGui/ctbMain.cpp deleted file mode 100644 index 0308589bb..000000000 --- a/ctbGui/ctbMain.cpp +++ /dev/null @@ -1,588 +0,0 @@ -// SPDX-License-Identifier: LGPL-3.0-or-other -// Copyright (C) 2021 Contributors to the SLS Detector Package -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -//#include -//#include - - - - -#include -#include -#include -#include - -#include "sls/Detector.h" -#include "ctbDefs.h" -#include "ctbMain.h" -#include "ctbDacs.h" -#include "ctbSlowAdcs.h" -#include "ctbPowers.h" -#include "ctbSignals.h" -#include "ctbPattern.h" -#include "ctbAdcs.h" -#include "ctbAcquisition.h" -//#include "ctbActions.h" - -using namespace std; - - - -ctbMain::ctbMain(const TGWindow *p, sls::Detector *det) - : TGMainFrame(p,800,800), pwrs(NULL), senses(NULL) { - - myDet=det; - - Connect("CloseWindow()", "ctbMain", this, "CloseWindow()"); - - - - - -// fMenuDock = new TGDockableFrame(this); -// AddFrame(fMenuDock, new TGLayoutHints(kLHintsExpandX, 0, 0, 1, 0)); -// fMenuDock->SetWindowName("GuiTest Menu"); - - fMenuBarLayout = new TGLayoutHints(kLHintsTop | kLHintsExpandX); - fMenuBarItemLayout = new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0); - fMenuBarHelpLayout = new TGLayoutHints(kLHintsTop | kLHintsRight); - - fMenuFile = new TGPopupMenu(gClient->GetRoot()); - int im=0; - - fMenuFile->AddEntry("Open Alias", im++); - fMenuFile->AddEntry("Save Alias", im++); - fMenuFile->AddSeparator(); - fMenuFile->AddEntry("Open Parameters", im++); - fMenuFile->AddEntry("Save Parameters", im++); - fMenuFile->AddSeparator(); - fMenuFile->AddEntry("Open Configuration", im++); - fMenuFile->AddEntry("Save Configuration", im++); - fMenuFile->AddSeparator(); - fMenuFile->AddEntry("Open Pattern", im++); - fMenuFile->AddEntry("Save Pattern", im++); - fMenuFile->AddSeparator(); - fMenuFile->AddEntry("Exit", im++); - - fMenuFile->Connect("Activated(Int_t)", "ctbMain", this, - "HandleMenu(Int_t)"); - - - i_dacs=-1; - i_pwrs=-1; - i_senses=-1; - i_sig=-1; - i_adcs=-1; - i_pat=-1; - i_acq=-1; - - int i_page=0; - - - - - - - - - - - - - - - - - - TGVerticalFrame *vframe=new TGVerticalFrame(this, 800,1200); //main frame - - - - fMenuBar = new TGMenuBar(vframe, 1, 1, kHorizontalFrame); - fMenuBar->AddPopup("&File", fMenuFile, fMenuBarItemLayout); -// fMenuBar->AddPopup("&Test", fMenuTest, fMenuBarItemLayout); -// fMenuBar->AddPopup("&View", fMenuView, fMenuBarItemLayout); -// fMenuBar->AddPopup("&Help", fMenuHelp, fMenuBarHelpLayout); - - vframe->AddFrame(fMenuBar, fMenuBarLayout); - - TGHorizontalFrame* hpage=new TGHorizontalFrame(vframe, 800,1200); //horizontal frame. Inside there should be the tab and the canvas - mtab=new TGTab(hpage, 1500, 1200); //tab! - // page=new TGVerticalFrame(mtab, 1500,1200); - - cout << "DACS" << endl; - - TGCompositeFrame *tf = mtab->AddTab("DACs"); - TGVerticalFrame *page=new TGVerticalFrame(tf, 1500,1200); - tf->AddFrame(page, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 10,10,10,1)); - dacs=new ctbDacs(page, myDet); - i_dacs=i_page++; - - - cout << "power " << endl; - tf = mtab->AddTab("Power Supplies"); - page=new TGVerticalFrame(tf, 1500,1200); - tf->AddFrame(page, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 10,10,10,1)); - pwrs=new ctbPowers(page, myDet); - - i_pwrs=i_page++; - - cout << "sense " << endl; - tf = mtab->AddTab("Sense"); - page=new TGVerticalFrame(tf, 1500,1200); - tf->AddFrame(page, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 10,10,10,1)); - senses=new ctbSlowAdcs(page, myDet); - - i_senses=i_page++; - - - - cout << "signals " << endl; - tf = mtab->AddTab("Signals"); - page=new TGVerticalFrame(tf, 1500,1200); - tf->AddFrame(page, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 10,10,10,1)); - sig=new ctbSignals(page, myDet); - sig->Connect("ToggledSignalPlot(Int_t)","ctbMain",this,"setSignalPlot(Int_t)"); - - i_sig=i_page++; - - cout << "adcs " << endl; - tf = mtab->AddTab("ADCs"); - page=new TGVerticalFrame(tf, 1500,1200); - tf->AddFrame(page, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 10,10,10,1)); - adcs=new ctbAdcs(page, myDet); - adcs->Connect("ToggledAdcPlot(Int_t)","ctbMain",this,"setADCPlot(Int_t)"); - adcs->Connect("AdcEnable(Int_t)","ctbMain",this,"setADCEnable(Int_t)"); - i_adcs=i_page++; - - - cout << "pattern" << endl; - - tf = mtab->AddTab("Pattern"); - page=new TGVerticalFrame(tf, 1500,1200); - tf->AddFrame(page, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 10,10,10,1)); - pat=new ctbPattern(page, myDet); - pat->Connect("patternFileChanged(const char*)","ctbMain",this,"setPatternFile(const char*)"); - pat->Connect("patternCompilerChanged(const char*)","ctbMain",this,"setPatternCompiler(const char*)"); - pat->Connect("analogSamplesChanged(const int)","ctbMain",this,"setAnalogSamples(int)"); - pat->Connect("digitalSamplesChanged(const int)","ctbMain",this,"setDigitalSamples(int)"); - pat->Connect("readoutModeChanged(int)","ctbMain",this,"setReadoutMode(int)"); - - i_pat=i_page++; - - cout << "acquisition" << endl; - - tf = mtab->AddTab("Acquisition"); - page=new TGVerticalFrame(tf, 1500,1200); - tf->AddFrame(page, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 10,10,10,1)); - acq=new ctbAcquisition(page, myDet); - - - i_acq=i_page++; - - - // cout << "actions" << endl; - // tf = mtab->AddTab("Actions"); - // page=new TGVerticalFrame(tf, 1500,1200); - // tf->AddFrame(page, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 10,10,10,1)); - // actions=new ctbActions(page, myDet); - - - // i_actions=i_page++; - - - - cout << "tabs finished" << endl; - - hpage->AddFrame(mtab,new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 10,10,10,1)); - - vframe->AddFrame(hpage,new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 10,10,10,1)); - - AddFrame(vframe,new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 10,10,10,1)); - vframe->MapWindow(); - hpage->MapWindow(); - mtab->MapWindow(); - page->MapWindow(); - - // Sets window name and shows the main frame - cout << "dockabel" << endl; - TGDockableFrame *fdock=new TGDockableFrame(hpage); - hpage->AddFrame(fdock, new TGLayoutHints(kLHintsBottom | kLHintsCenterX | kLHintsExpandX | kLHintsExpandY, 10,10,10,10)); - fdock->MapWindow(); - - cout << "canvas" << endl; -// // Creates widgets of the example - - - fEcanvas = new TRootEmbeddedCanvas ("Ecanvas",fdock,800,800);//hpage,800,800); - //fEcanvas = new TRootEmbeddedCanvas ("Ecanvas",this,800,800);//hpage,800,800); - // fEcanvas->Resize(); - // fEcanvas->GetCanvas()->Update(); - //AddFrame(fEcanvas, new TGLayoutHints(kLHintsBottom | kLHintsCenterX | kLHintsExpandX | kLHintsExpandY, 10,10,10,10)); - - // // hpage-> - fdock->AddFrame(fEcanvas, new TGLayoutHints(kLHintsBottom | kLHintsCenterX | kLHintsExpandX | kLHintsExpandY, 10,10,10,10)); - - - fEcanvas->MapWindow(); - - acq->setCanvas(getCanvas()); - - - - hpage->MapSubwindows(); - mtab->Connect("Selected(Int_t)","ctbMain",this,"tabSelected(Int_t)"); - - - - cout << "connect mtab" << endl; - - try{ - setReadoutMode(pat->getReadoutMode()); - } CATCH_DISPLAY ("Could not get readout flags", "ctbPattern::getReadoutMode") - - setADCEnable(adcs->setEnable()); - setAnalogSamples(pat->getAnalogSamples()); - setDigitalSamples(pat->getDigitalSamples()); - - tabSelected(0); - - SetWindowName("CTB Gui"); - MapSubwindows(); - Resize(1500,1200); - - MapWindow(); -} - -void ctbMain::CloseWindow() { - gApplication->Terminate(); -} - -TCanvas* ctbMain::getCanvas() { - return fEcanvas->GetCanvas(); -} - - - -void ctbMain::HandleMenu(Int_t id) -{ - // Handle menu items. - - - - - switch (id) { - - case 0: // fMenuFile->AddEntry("Open Alias", im++); - cout << "Open Alias" << endl; - { - static TString dir("."); - TGFileInfo fi; - //fi.fFileTypes = filetypes; - fi.fIniDir = StrDup(dir); - printf("fIniDir = %s\n", fi.fIniDir); - new TGFileDialog(gClient->GetRoot(), this, kFDOpen, &fi); - printf("Open file: %s (dir: %s)\n", fi.fFilename, fi.fIniDir); - // dir = fi.fIniDir; - if (fi.fFilename) - loadAlias(fi.fFilename); - } - break; - - case 1: // fMenuFile->AddEntry("Save Alias", im++); - cout << "Save Alias" << endl; - { - static TString dir("."); - TGFileInfo fi; - //fi.fFileTypes = filetypes; - fi.fIniDir = StrDup(dir); - printf("fIniDir = %s\n", fi.fIniDir); - new TGFileDialog(gClient->GetRoot(), this, kFDSave, &fi); - printf("Save file: %s (dir: %s)\n", fi.fFilename, fi.fIniDir); - // dir = fi.fIniDir; - if (fi.fFilename) - saveAlias(fi.fFilename); - } - break; - case 2: //fMenuFile->AddEntry("Open Parameters", im++); - cout << "Open Parameters" << endl; - { - static TString dir("."); - TGFileInfo fi; - //fi.fFileTypes = filetypes; - fi.fIniDir = StrDup(dir); - printf("fIniDir = %s\n", fi.fIniDir); - new TGFileDialog(gClient->GetRoot(), this, kFDOpen, &fi); - printf("Open file: %s (dir: %s)\n", fi.fFilename, fi.fIniDir); - // dir = fi.fIniDir; - if (fi.fFilename) - loadParameters(fi.fFilename); - } - break; - - case 3: // fMenuFile->AddEntry("Open Configuration", im++); - cout << "Open configuration" << endl; - { - static TString dir("."); - TGFileInfo fi; - //fi.fFileTypes = filetypes; - fi.fIniDir = StrDup(dir); - printf("fIniDir = %s\n", fi.fIniDir); - new TGFileDialog(gClient->GetRoot(), this, kFDOpen, &fi); - printf("Open file: %s (dir: %s)\n", fi.fFilename, fi.fIniDir); - // dir = fi.fIniDir; - if (fi.fFilename) - loadConfiguration(fi.fFilename); - } - break; - - case 4: //fMenuFile->AddEntry("Open Pattern", im++); - cout << "Open pattern" << endl; - { - static TString dir("."); - TGFileInfo fi; - //fi.fFileTypes = filetypes; - fi.fIniDir = StrDup(dir); - printf("fIniDir = %s\n", fi.fIniDir); - new TGFileDialog(gClient->GetRoot(), this, kFDOpen, &fi); - printf("Open file: %s (dir: %s)\n", fi.fFilename, fi.fIniDir); - // dir = fi.fIniDir; - if (fi.fFilename) - loadParameters(fi.fFilename); - } - break; - - case 5: //fMenuFile->AddEntry("Save Pattern", im++); - cout << "Save pattern" << endl; - { - static TString dir("."); - TGFileInfo fi; - //fi.fFileTypes = filetypes; - fi.fIniDir = StrDup(dir); - printf("fIniDir = %s\n", fi.fIniDir); - new TGFileDialog(gClient->GetRoot(), this, kFDSave, &fi); - printf("Open file: %s (dir: %s)\n", fi.fFilename, fi.fIniDir); - // dir = fi.fIniDir; - if (fi.fFilename) - savePattern(fi.fFilename); - } - break; - - case 6: // fMenuFile->AddEntry("Exit", im++); - CloseWindow(); - - default: - printf("Menu item %d selected\n", id); - break; - } -} - - - -int ctbMain::setADCPlot(Int_t i) { - - // cout << "ADC " << i << " plot or color toggled" << endl; - // acq->setGraph(i,adcs->getGraph(i)); - acq->setGraph(i,adcs->getEnabled(i),adcs->getColor(i)); - return -1; -} - - -int ctbMain::setSignalPlot(Int_t i) { - - // cout << "ADC " << i << " plot or color toggled" << endl; - // acq->setGraph(i,adcs->getGraph(i)); - acq->setBitGraph(i,sig->getPlot(i),sig->getColor(i)); - return -1; -} - - - -void ctbMain::loadConfiguration(string fname) { - try{ - myDet->loadConfig(fname); - } CATCH_DISPLAY ("Could not load config.", "ctbMain::loadConfiguration") -} - -void ctbMain::loadParameters(string fname) { - try{ - myDet->loadParameters(fname); - } CATCH_DISPLAY ("Could not load parameters.", "ctbMain::loadParameters") -} - -void ctbMain::savePattern(string fname) { - try{ - myDet->savePattern(fname); - } CATCH_DISPLAY ("Could not save pattern.", "ctbMain::savePattern") -} - - - -int ctbMain::loadAlias(string fname) { - - - string line; - char aaaa[1000]; - int i; - ifstream myfile (fname.c_str()); - if (myfile.is_open()) - { - while ( getline (myfile,line) ) - { - // cout << line ; - if (sscanf(line.c_str(),"BIT%d",&i)>0) { - //cout << "*******" << line<< endl; - sig->setSignalAlias(line); - // cout << line ; - } else if (sscanf(line.c_str(),"DAC%d",&i)>0) { - dacs->setDacAlias(line); - // cout << "+++++++++" << line<< endl; - } else if (sscanf(line.c_str(),"ADC%d",&i)>0) { - adcs->setAdcAlias(line); - // cout << "---------" << line<< endl; - } // else - // cout << "<<<<<<<" << line << endl; - else if (sscanf(line.c_str(),"PAT%s",aaaa)>0) { - pat->setPatternAlias(line); - // cout << "---------" << line<< endl; - } else if (sscanf(line.c_str(),"V%s",aaaa)>0) { - if (pwrs) pwrs->setPwrAlias(line); - // cout << "+++++++++" << line<< endl; - } else if (sscanf(line.c_str(),"SENSE%d",&i)>0) { - if (senses) senses->setSlowAdcAlias(line); - // cout << "+++++++++" << line<< endl; - } - - } - myfile.close(); - } - - else cout << "Unable to open file"; - - return 0; - -} - - - - - -int ctbMain::saveAlias(string fname) { - - - string line; - ofstream myfile (fname.c_str()); - if (myfile.is_open()) - { - //while ( getline (myfile,line) ) - // { - // cout << line ; - //if (sscanf(line.c_str(),"BIT%d",&i)>0) { - //cout << "*******" << line<< endl; - myfile << sig->getSignalAlias(); - // cout << line ; - // } else if (sscanf(line.c_str(),"DAC%d",&i)>0) { - myfile << dacs->getDacAlias(); - if (pwrs) myfile << pwrs->getPwrAlias(); - if (senses) myfile << senses->getSlowAdcAlias(); - // cout << "+++++++++" << line<< endl; - // } else if (sscanf(line.c_str(),"ADC%d",&i)>0) { - myfile << adcs->getAdcAlias(); - // cout << "---------" << line<< endl; - // } // else - // cout << "<<<<<<<" << line << endl; - myfile << pat->getPatternAlias(); - - //} - myfile.close(); - } - - else cout << "Unable to open file"; - - return 0; - -} - - - - - - - - - - - -void ctbMain::tabSelected(Int_t i) { - - // cout << "Selected tab " << i << endl; - // cout << "Current tab is " << mtab->GetCurrent() << endl; - - if (i==i_dacs) dacs->update(); - else if (i==i_pwrs) pwrs->update(); - else if (i==i_senses) ;//senses->update(); - else if (i==i_sig) sig->update(); - else if (i==i_adcs) adcs->update(); - else if (i==i_pat) pat->update(); - else if (i==i_acq) acq->update(); - else if (i==i_acq) acq->update(); - // else if (i==i_actions) actions->update(); - else cout << "Unknown tab " << i << endl; - - -} - -void ctbMain::setPatternFile(const char* t) { - acq->setPatternFile(t); - -} - -void ctbMain::setPatternCompiler(const char* t) { - acq->setPatternCompiler(t); - - -} - -void ctbMain::setAnalogSamples(const int n) { - acq->setAnalogSamples(n); - - -} - -void ctbMain::setDigitalSamples(const int n) { - acq->setDigitalSamples(n); - - -} - -void ctbMain::setReadoutMode(int flags) { - acq->setReadoutMode(flags); -} - -void ctbMain::setADCEnable(Int_t reg){ - acq->setADCEnable(reg); -} diff --git a/ctbGui/ctbMain.h b/ctbGui/ctbMain.h deleted file mode 100644 index 34ff8d429..000000000 --- a/ctbGui/ctbMain.h +++ /dev/null @@ -1,130 +0,0 @@ -// SPDX-License-Identifier: LGPL-3.0-or-other -// Copyright (C) 2021 Contributors to the SLS Detector Package -#ifndef CTBMAIN_H -#define CTBMAIN_H -#include - - -class TRootEmbeddedCanvas; -class TGButtonGroup; -class TGVerticalFrame; -class TGHorizontalFrame; -class TGTextEntry; -class TGLabel; -class TGNumberEntry; -class TH2F; -class TGComboBox; -class TGCheckButton; - -class THStack; -class TGraphErrors; -class TGTextButton; -class TGTab; - -class TGMenuBar; -class TGPopupMenu; -class TGDockableFrame; -class TGLayoutHints; -class TGCanvas; -class TCanvas; - -class ctbDacs; -class ctbSlowAdcs; -class ctbPowers; - - -class ctbSignals; - -namespace sls -{ - class Detector; -}; - -class ctbPattern; -class ctbAdcs; -class ctbAcquisition; -//class ctbActions; - -#include -using namespace std; - -class ctbMain : public TGMainFrame { -private: - - - sls::Detector *myDet; - - - - TRootEmbeddedCanvas *fEcanvas; - TRootEmbeddedCanvas *fModulecanvas; - TGButtonGroup *br; - - TGTab *mtab; - - - ctbDacs *dacs; - int i_dacs; - - ctbPowers *pwrs; - int i_pwrs; - - ctbSlowAdcs *senses; - int i_senses; - - - ctbSignals *sig; - int i_sig; - - - ctbAdcs *adcs; - int i_adcs; - - - ctbPattern *pat; - int i_pat; - - ctbAcquisition *acq; - int i_acq; - - // ctbActions *actions; - int i_actions; - - TGDockableFrame *fMenuDock; - - TGMenuBar *fMenuBar; - TGPopupMenu *fMenuFile, *fMenuTest, *fMenuView, *fMenuHelp; - TGPopupMenu *fCascadeMenu, *fCascade1Menu, *fCascade2Menu; - TGPopupMenu *fMenuNew1, *fMenuNew2; - TGLayoutHints *fMenuBarLayout, *fMenuBarItemLayout, *fMenuBarHelpLayout; - TGCanvas *myCanvas; - - -public: - ctbMain(const TGWindow *p, sls::Detector *det); - - - int loadAlias(string fname); - int saveAlias(string fname); - void loadParameters(string fname); - void savePattern(string fname); - void loadConfiguration(string fname); - void tabSelected(Int_t); - int setADCPlot(Int_t); - int setSignalPlot(Int_t); - void CloseWindow(); - - void setPatternFile(const char* t); - - void setPatternCompiler(const char* t); - void setAnalogSamples(const int); - void setDigitalSamples(const int); - void setReadoutMode(int); - void setADCEnable(Int_t); - - void HandleMenu(Int_t); - TCanvas* getCanvas(); - ClassDef(ctbMain,0) -}; - -#endif diff --git a/ctbGui/ctbPattern.cpp b/ctbGui/ctbPattern.cpp deleted file mode 100644 index 5d3d49a5e..000000000 --- a/ctbGui/ctbPattern.cpp +++ /dev/null @@ -1,1111 +0,0 @@ -// SPDX-License-Identifier: LGPL-3.0-or-other -// Copyright (C) 2021 Contributors to the SLS Detector Package -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "ctbPattern.h" -#include "ctbDefs.h" -#include "sls/Detector.h" -#include -using namespace std; - - - - - -ctbLoop::ctbLoop(TGGroupFrame *page, int i, sls::Detector *det) : TGHorizontalFrame(page, 800,800), id(i), myDet(det) { - - TGHorizontalFrame *hframe=this; - - char tit[100]; - - page->AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1)); - MapWindow(); - - - - - - sprintf(tit, "Loop %d Repetitions: ", id); - - TGLabel *label= new TGLabel(hframe, tit); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - label->MapWindow(); - label->SetTextJustify(kTextLeft); - - - - - eLoopNumber = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger, - TGNumberFormat::kNEANonNegative, - TGNumberFormat::kNELNoLimits); - hframe->AddFrame( eLoopNumber,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); - eLoopNumber->MapWindow(); - eLoopNumber->Resize(150,30); - TGTextEntry *e= eLoopNumber->TGNumberEntry::GetNumberEntry(); - e->Connect("ReturnPressed()","ctbLoop",this,"setNLoops()"); - - - - - sprintf(tit, "Start Address: "); - - label= new TGLabel(hframe, tit); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - label->MapWindow(); - label->SetTextJustify(kTextLeft); - - - - - eLoopStartAddr = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESHex, - TGNumberFormat::kNEANonNegative, - TGNumberFormat::kNELLimitMinMax, - 0, 1024); - hframe->AddFrame( eLoopStartAddr,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); - eLoopStartAddr->MapWindow(); - eLoopStartAddr->Resize(150,30); - - // eLoopStartAddr->SetState(kFALSE); - - label= new TGLabel(hframe, "Stop Address: "); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - label->MapWindow(); - label->SetTextJustify(kTextLeft); - - - - - - eLoopStopAddr = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESHex, - TGNumberFormat::kNEANonNegative, - TGNumberFormat::kNELLimitMinMax, - 0, 1024); - hframe->AddFrame( eLoopStopAddr,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); - eLoopStopAddr->MapWindow(); - eLoopStopAddr->Resize(150,30); - - - - // eLoopStopAddr->SetState(kFALSE); - - - - - - -} - -void ctbLoop::setNLoops() { - try{ - myDet->setPatternLoopCycles(id, eLoopNumber->GetNumber()); - } CATCH_DISPLAY ("Could not set number of pattern loops for level " + to_string(id) + ".", "ctbLoop::setNLoops") -} - - - -void ctbLoop::update() { - try{ - - auto loop = myDet->getPatternLoopCycles(id).tsquash("Different values"); - eLoopNumber->SetNumber(loop); - auto loopaddr = myDet->getPatternLoopAddresses(id).tsquash("Different values"); - eLoopStartAddr->SetHexNumber(loopaddr[0]); - eLoopStopAddr->SetHexNumber(loopaddr[1]); - - - } CATCH_DISPLAY ("Could not get pattern loops for level " + to_string(id) + ".", "ctbLoop::update") -} - - - -ctbWait::ctbWait(TGGroupFrame *page, int i, sls::Detector *det) : TGHorizontalFrame(page, 800,800), id(i), myDet(det) { - - char tit[100]; - TGHorizontalFrame *hframe=this; - page->AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1)); - MapWindow(); - - - - sprintf(tit, "Wait %d (run clk): ", id); - - TGLabel *label= new TGLabel(hframe, tit); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - label->MapWindow(); - label->SetTextJustify(kTextLeft); - - - - - eWaitTime = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger, - TGNumberFormat::kNEANonNegative, - TGNumberFormat::kNELNoLimits); - hframe->AddFrame( eWaitTime,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); - eWaitTime->MapWindow(); - eWaitTime->Resize(150,30); - TGTextEntry *e= eWaitTime->TGNumberEntry::GetNumberEntry(); - e->Connect("ReturnPressed()","ctbWait",this,"setWaitTime()"); - - - - sprintf(tit, "Wait Address: "); - - label= new TGLabel(hframe, tit); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - label->MapWindow(); - label->SetTextJustify(kTextLeft); - - - - - eWaitAddr = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESHex, - TGNumberFormat::kNEANonNegative, - TGNumberFormat::kNELLimitMinMax, - 0, 1024); - hframe->AddFrame( eWaitAddr,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); - eWaitAddr->MapWindow(); - eWaitAddr->Resize(150,30); - - // eWaitAddr->SetState(kFALSE); - -} - - - -void ctbWait::setWaitTime() { - try{ - - myDet->setPatternWaitTime(id, eWaitTime->GetNumber()); - - } CATCH_DISPLAY ("Could not set pattern wait time for level " + to_string(id) + ".", "ctbWait::setWaitTime") -} - - - -void ctbWait::update() { - try{ - - auto time = myDet->getPatternWaitTime(id).tsquash("Different values"); - auto addr = myDet->getPatternWaitAddr(id).tsquash("Different values"); - - eWaitAddr->SetHexNumber(addr); - eWaitTime->SetNumber(time); - - } CATCH_DISPLAY ("Could not get pattern loops for level " + to_string(id) + ".", "ctbWait::update") -} - - - - - - - - - -ctbPattern::ctbPattern(TGVerticalFrame *page, sls::Detector *det) - : TGGroupFrame(page,"Pattern",kVerticalFrame), myDet(det) { - - - SetTitlePos(TGGroupFrame::kLeft); - page->AddFrame(this,new TGLayoutHints( kLHintsTop | kLHintsExpandX , 10,10,10,10)); - MapWindow(); - - - char tit[100]; - - - TGHorizontalFrame* hframe=new TGHorizontalFrame(this, 800,800); - AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1)); - hframe->MapWindow(); - - - sprintf(tit, "Run Clock Frequency (MHz): "); - - TGLabel *label= new TGLabel(hframe, tit); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - label->MapWindow(); - label->SetTextJustify(kTextLeft); - - - - - eRunClkFreq = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger, - TGNumberFormat::kNEANonNegative, - TGNumberFormat::kNELLimitMinMax, - 0, 400); - hframe->AddFrame( eRunClkFreq,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); - eRunClkFreq->MapWindow(); - eRunClkFreq->Resize(150,30); - TGTextEntry *e= eRunClkFreq->TGNumberEntry::GetNumberEntry(); - e->Connect("ReturnPressed()","ctbPattern",this,"setRunFreq()"); - - - - - - hframe=new TGHorizontalFrame(this, 800,800); - AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1)); - hframe->MapWindow(); - - - - - sprintf(tit, "ADC Clock Frequency (MHz): "); - - label= new TGLabel(hframe, tit); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - label->MapWindow(); - label->SetTextJustify(kTextLeft); - - - - - eAdcClkFreq = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger, - TGNumberFormat::kNEANonNegative, - TGNumberFormat::kNELLimitMinMax, - 0, 40); - hframe->AddFrame( eAdcClkFreq,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); - eAdcClkFreq->MapWindow(); - eAdcClkFreq->Resize(150,30); - e= eAdcClkFreq->TGNumberEntry::GetNumberEntry(); - e->Connect("ReturnPressed()","ctbPattern",this,"setAdcFreq()"); - - - - - sprintf(tit, "DBIT Clock Frequency (MHz): "); - - label= new TGLabel(hframe, tit); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - label->MapWindow(); - label->SetTextJustify(kTextLeft); - - - - - eDBitClkFreq = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger, - TGNumberFormat::kNEANonNegative, - TGNumberFormat::kNELLimitMinMax, - 0, 400); - hframe->AddFrame( eDBitClkFreq,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); - eDBitClkFreq->MapWindow(); - eDBitClkFreq->Resize(150,30); - e= eDBitClkFreq->TGNumberEntry::GetNumberEntry(); - e->Connect("ReturnPressed()","ctbPattern",this,"setDBitFreq()"); - - - - - - - - - - - hframe=new TGHorizontalFrame(this, 800,800); - AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1)); - hframe->MapWindow(); - - - - - label= new TGLabel(hframe, "ADC Clock Phase (a.u.): "); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - label->MapWindow(); - label->SetTextJustify(kTextLeft); - - - - - - eAdcClkPhase = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger, - TGNumberFormat::kNEAAnyNumber, - TGNumberFormat::kNELLimitMinMax, - -255, 255); - hframe->AddFrame( eAdcClkPhase,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); - eAdcClkPhase->MapWindow(); - eAdcClkPhase->Resize(150,30); - e= eAdcClkPhase->TGNumberEntry::GetNumberEntry(); - e->Connect("ReturnPressed()","ctbPattern",this,"setAdcPhase()"); - - - - - label= new TGLabel(hframe, "DBit Clock Phase (a.u.): "); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - label->MapWindow(); - label->SetTextJustify(kTextLeft); - - - - - - eDBitClkPhase = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger, - TGNumberFormat::kNEAAnyNumber, - TGNumberFormat::kNELLimitMinMax, - -255, 255); - hframe->AddFrame( eDBitClkPhase,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); - eDBitClkPhase->MapWindow(); - eDBitClkPhase->Resize(150,30); - e= eDBitClkPhase->TGNumberEntry::GetNumberEntry(); - e->Connect("ReturnPressed()","ctbPattern",this,"setDBitPhase()"); - - -// label= new TGLabel(hframe, " Phase (0.15ns step): "); -// hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); -// label->MapWindow(); -// label->SetTextJustify(kTextLeft); - - - - - -// eRunClkPhase = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger, -// TGNumberFormat::kNEANonNegative, -// TGNumberFormat::kNELLimitMinMax, -// 0, 200); -// hframe->AddFrame( eRunClkPhase,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); -// eRunClkPhase->MapWindow(); -// eRunClkPhase->Resize(150,30); -// e= eRunClkPhase->TGNumberEntry::GetNumberEntry(); -// e->Connect("ReturnPressed()","ctbPattern",this,"setRunPhase()"); - - - - - - hframe=new TGHorizontalFrame(this, 800,800); - AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1)); - hframe->MapWindow(); - - - - - label= new TGLabel(hframe, "Adc pipeline: "); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - label->MapWindow(); - label->SetTextJustify(kTextLeft); - - - - - - eAdcPipeline = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger, - TGNumberFormat::kNEANonNegative, - TGNumberFormat::kNELLimitMinMax, - 0, 64); - hframe->AddFrame( eAdcPipeline,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); - eAdcPipeline->MapWindow(); - eAdcPipeline->Resize(150,30); - e= eAdcPipeline->TGNumberEntry::GetNumberEntry(); - e->Connect("ReturnPressed()","ctbPattern",this,"setAdcPipeline()"); - - - - - - - label= new TGLabel(hframe, "DBIT pipeline: "); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - label->MapWindow(); - label->SetTextJustify(kTextLeft); - - - - - - eDBitPipeline = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger, - TGNumberFormat::kNEANonNegative, - TGNumberFormat::kNELLimitMinMax, - 0, 64); - hframe->AddFrame( eDBitPipeline,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); - eDBitPipeline->MapWindow(); - eDBitPipeline->Resize(150,30); - e= eDBitPipeline->TGNumberEntry::GetNumberEntry(); - e->Connect("ReturnPressed()","ctbPattern",this,"setDBitPipeline()"); - - - - - - - - - hframe=new TGHorizontalFrame(this, 800,800); - AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1)); - hframe->MapWindow(); - - - sprintf(tit, "Number of triggers: "); - - label= new TGLabel(hframe, tit); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - label->MapWindow(); - label->SetTextJustify(kTextLeft); - - - - - eTriggers = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger, - TGNumberFormat::kNEANonNegative, - TGNumberFormat::kNELNoLimits); - hframe->AddFrame( eTriggers,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); - eTriggers->MapWindow(); - eTriggers->Resize(150,30); - e= eTriggers->TGNumberEntry::GetNumberEntry(); - e->Connect("ReturnPressed()","ctbPattern",this,"setTriggers()"); - - - // sprintf(tit, "Number of measurements: "); - - // label= new TGLabel(hframe, tit); - // hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - // label->MapWindow(); - // label->SetTextJustify(kTextLeft); - - - - - // eMeasurements = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger, - // TGNumberFormat::kNEANonNegative, - // TGNumberFormat::kNELNoLimits); - // hframe->AddFrame( eMeasurements,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); - // eMeasurements->MapWindow(); - // eMeasurements->Resize(150,30); - // e= eMeasurements->TGNumberEntry::GetNumberEntry(); - // e->Connect("ReturnPressed()","ctbPattern",this,"setMeasurements()"); - - - hframe=new TGHorizontalFrame(this, 800,800); - AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1)); - hframe->MapWindow(); - - - sprintf(tit, "Number of frames: "); - - label= new TGLabel(hframe, tit); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - label->MapWindow(); - label->SetTextJustify(kTextLeft); - - - - - eFrames = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger, - TGNumberFormat::kNEANonNegative, - TGNumberFormat::kNELNoLimits); - hframe->AddFrame( eFrames,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); - eFrames->MapWindow(); - eFrames->Resize(150,30); - e= eFrames->TGNumberEntry::GetNumberEntry(); - e->Connect("ReturnPressed()","ctbPattern",this,"setFrames()"); - - - label= new TGLabel(hframe, " Period (s): "); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - label->MapWindow(); - label->SetTextJustify(kTextLeft); - - - - - - ePeriod = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESReal, - TGNumberFormat::kNEANonNegative, - TGNumberFormat::kNELNoLimits); - hframe->AddFrame( ePeriod,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); - ePeriod->MapWindow(); - ePeriod->Resize(150,30); - e= ePeriod->TGNumberEntry::GetNumberEntry(); - e->Connect("ReturnPressed()","ctbPattern",this,"setPeriod()"); - - - - - - - hframe=new TGHorizontalFrame(this, 800,800); - AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1)); - hframe->MapWindow(); - - - sprintf(tit, "Start Address: "); - - label= new TGLabel(hframe, tit); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - label->MapWindow(); - label->SetTextJustify(kTextLeft); - - - - - eStartAddr = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESHex, - TGNumberFormat::kNEANonNegative, - TGNumberFormat::kNELLimitMinMax, - 0, 1024); - hframe->AddFrame( eStartAddr,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); - eStartAddr->MapWindow(); - eStartAddr->Resize(150,30); - - eStartAddr->SetState(kFALSE); - - label= new TGLabel(hframe, "Stop Address: "); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - label->MapWindow(); - label->SetTextJustify(kTextLeft); - - - - - - eStopAddr = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESHex, - TGNumberFormat::kNEANonNegative, - TGNumberFormat::kNELLimitMinMax, - 0, 1024); - hframe->AddFrame( eStopAddr,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); - eStopAddr->MapWindow(); - eStopAddr->Resize(150,30); - - - - - eStopAddr->SetState(kFALSE); - - - - - - - int idac=0; - for (idac=0; idacMapWindow(); - - - - label= new TGLabel(hframe, "Compiler: "); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - label->MapWindow(); - label->SetTextJustify(kTextLeft); - - - - - patternCompiler=new TGTextEntry(hframe,"generate.sh"); - hframe->AddFrame(patternCompiler,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - patternCompiler->MapWindow(); - // patternCompiler->SetTextJustify(kTextLeft); - patternCompiler->Connect("ReturnPressed()","ctbPattern",this,"setCompiler()"); - - - browseCompiler=new TGTextButton(hframe,"Browse"); - hframe->AddFrame(browseCompiler,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - browseCompiler->MapWindow(); - // patternCompiler->SetTextJustify(kTextLeft); - browseCompiler->Connect("Clicked()","ctbPattern",this,"chooseCompiler()"); - - - - - hframe=new TGHorizontalFrame(this, 800,800); - AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1)); - hframe->MapWindow(); - - - label= new TGLabel(hframe, "Pattern: "); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - label->MapWindow(); - label->SetTextJustify(kTextLeft); - - - patternFile=new TGTextEntry(hframe,"file.p"); - hframe->AddFrame(patternFile,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - patternFile->MapWindow(); - patternFile->Connect("ReturnPressed()","ctbPattern",this,"setFile()"); - // patternFile->SetTextJustify(kTextLeft); - - - - browseFile=new TGTextButton(hframe,"Browse"); - hframe->AddFrame(browseFile,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - browseFile->MapWindow(); - // patternCompiler->SetTextJustify(kTextLeft); - browseFile->Connect("Clicked()","ctbPattern",this,"choosePattern()"); - - - - - hframe=new TGHorizontalFrame(this, 800,800); - AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1)); - hframe->MapWindow(); - - - sprintf(tit, "Samples per frame - "); - - label= new TGLabel(hframe, tit); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - label->MapWindow(); - label->SetTextJustify(kTextLeft); - - - sprintf(tit, "Analog: "); - - label= new TGLabel(hframe, tit); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - label->MapWindow(); - label->SetTextJustify(kTextLeft); - - - - eAnalogSamples = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger, - TGNumberFormat::kNEANonNegative, - TGNumberFormat::kNELLimitMinMax, - 1, 8192); - hframe->AddFrame( eAnalogSamples,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); - eAnalogSamples->MapWindow(); - eAnalogSamples->Resize(150,30); - e= eAnalogSamples->TGNumberEntry::GetNumberEntry(); - e->Connect("ReturnPressed()","ctbPattern",this,"setAnalogSamples()"); - - sprintf(tit, "Digital: "); - - label= new TGLabel(hframe, tit); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - label->MapWindow(); - label->SetTextJustify(kTextLeft); - - - - eDigitalSamples = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger, - TGNumberFormat::kNEANonNegative, - TGNumberFormat::kNELLimitMinMax, - 1, 8192); - hframe->AddFrame( eDigitalSamples,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); - eDigitalSamples->MapWindow(); - eDigitalSamples->Resize(150,30); - e= eDigitalSamples->TGNumberEntry::GetNumberEntry(); - e->Connect("ReturnPressed()","ctbPattern",this,"setDigitalSamples()"); - - - hframe=new TGHorizontalFrame(this, 800,800); - AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1)); - hframe->MapWindow(); - - - sprintf(tit, "Read Out Mode: "); - - label= new TGLabel(hframe, tit); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - label->MapWindow(); - label->SetTextJustify(kTextLeft); - - - cbAnalog= new TGCheckButton(hframe, "Analog"); - hframe->AddFrame(cbAnalog,new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX, 5, 5, 5, 5)); - cbAnalog->MapWindow(); - cbAnalog->SetTextJustify(kTextRight); - cbAnalog->Connect("Toggled(Bool_t)","ctbPattern",this,"setReadoutMode(Bool_t)"); - - cbDigital= new TGCheckButton(hframe, "Digital"); - hframe->AddFrame(cbDigital,new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX, 5, 5, 5, 5)); - cbDigital->MapWindow(); - cbDigital->SetTextJustify(kTextRight); - cbDigital->Connect("Toggled(Bool_t)","ctbPattern",this,"setReadoutMode(Bool_t)"); - - - - -} - -void ctbPattern::update() { - try{ - auto retval = myDet->getRUNClock().tsquash("Different values"); - eRunClkFreq->SetNumber(retval); - } CATCH_DISPLAY ("Could not get run clock.", "ctbPattern::update") - - try{ - auto retval = myDet->getADCClock().tsquash("Different values"); - eAdcClkFreq->SetNumber(retval); - } CATCH_DISPLAY ("Could not get adc clock.", "ctbPattern::update") - - try{ - auto retval = myDet->getADCPhase().tsquash("Different values"); - eAdcClkPhase->SetNumber(retval); - } CATCH_DISPLAY ("Could not get adc phase shift.", "ctbPattern::update") - - try{ - auto retval = myDet->getADCPipeline().tsquash("Different values"); - eAdcPipeline->SetNumber(retval); - } CATCH_DISPLAY ("Could not get adc pipeline.", "ctbPattern::update") - - try{ - auto retval = myDet->getDBITClock().tsquash("Different values"); - eDBitClkFreq->SetNumber(retval); - } CATCH_DISPLAY ("Could not get dbit clock.", "ctbPattern::update") - - try{ - auto retval = myDet->getDBITPhase().tsquash("Different values"); - eDBitClkPhase->SetNumber(retval); - } CATCH_DISPLAY ("Could not get dbit phase shift.", "ctbPattern::update") - - try{ - auto retval = myDet->getDBITPipeline().tsquash("Different values"); - eDBitPipeline->SetNumber(retval); - } CATCH_DISPLAY ("Could not get dbit pipeline.", "ctbPattern::update") - - try{ - auto retval = myDet->getNumberOfFrames().tsquash("Different values"); - eFrames->SetNumber(retval); - } CATCH_DISPLAY ("Could not get number of frames.", "ctbPattern::update") - - try{ - auto timeNs = myDet->getPeriod().tsquash("Different values"); - ePeriod->SetNumber(ctbDefs::ConvertChronoNStoDoubleS(timeNs)); - } CATCH_DISPLAY ("Could not get period.", "ctbPattern::update") - - try{ - auto retval = myDet->getNumberOfTriggers().tsquash("Different values"); - eTriggers->SetNumber(retval); - } CATCH_DISPLAY ("Could not get number of triggers.", "ctbPattern::update") - - try{ - auto retval = myDet->getPatternLoopAddresses(-1).tsquash("Different values"); - eStartAddr->SetHexNumber(retval[0]); - eStopAddr->SetHexNumber(retval[1]); - } CATCH_DISPLAY ("Could not get dbit phase shift.", "ctbPattern::update") - - for (int iloop=0; iloopupdate(); - } - - for (int iwait=0; iwaitupdate(); - } - - getAnalogSamples(); - getDigitalSamples(); - getReadoutMode(); -} - - -void ctbPattern::setFile() { - patternFileChanged(patternFile->GetText()); - -} - - -void ctbPattern::setCompiler() { - patternCompilerChanged(patternCompiler->GetText()); -} - - -void ctbPattern::patternFileChanged(const char* t){ - Emit("patternFileChanged(const char*)", t); -} - - -void ctbPattern::patternCompilerChanged(const char* t){ - Emit("patternCompilerChanged(const char*)", t); - -} - - -void ctbPattern::setPatternAlias(string line){ - char fname[10000]; - if (sscanf(line.c_str(),"PATCOMPILER %s",fname)) { - patternCompiler->SetText(fname); - patternCompilerChanged(patternCompiler->GetText()); - } else if (sscanf(line.c_str(),"PATFILE %s",fname)) { - patternFile->SetText(fname); - patternFileChanged(patternFile->GetText()); - } -} - - -string ctbPattern::getPatternAlias() { - char line[100000]; - sprintf(line, "PATCOMPILER %s\nPATFILE %s\n",patternCompiler->GetText(),patternFile->GetText()); - return line; -} - - -void ctbPattern::chooseCompiler() { - static TString dir("."); - TGFileInfo fi; - //fi.fFileTypes = filetypes; - fi.fIniDir = StrDup(dir); - printf("fIniDir = %s\n", fi.fIniDir); - new TGFileDialog(gClient->GetRoot(), this, kFDOpen, &fi); - printf("Open file: %s (dir: %s)\n", fi.fFilename, fi.fIniDir); - // dir = fi.fIniDir; - if (fi.fFilename) { - patternCompiler->SetText(fi.fFilename); - patternCompilerChanged(patternCompiler->GetText()); - } -} - - -void ctbPattern::choosePattern() { - static TString dir("."); - TGFileInfo fi; - //fi.fFileTypes = filetypes; - fi.fIniDir = StrDup(dir); - printf("fIniDir = %s\n", fi.fIniDir); - new TGFileDialog(gClient->GetRoot(), this, kFDOpen, &fi); - printf("Open file: %s (dir: %s)\n", fi.fFilename, fi.fIniDir); - // dir = fi.fIniDir; - if (fi.fFilename) { - patternFile->SetText(fi.fFilename); - patternFileChanged(patternFile->GetText()); - } - -} - - -string ctbPattern::getCompiler() { - return string(patternCompiler->GetText()); - -} - -string ctbPattern::getPatternFile() { - return string(patternFile->GetText()); - -} - -void ctbPattern::setFrames() { - try{ - myDet->setNumberOfFrames(eFrames->GetNumber()); - } CATCH_DISPLAY ("Could not set number of frames", "ctbPattern::setFrames") -} - -void ctbPattern::setTriggers() { - try{ - myDet->setNumberOfTriggers(eTriggers->GetNumber()); - } CATCH_DISPLAY ("Could not set number of triggers", "ctbPattern::setTriggers") -} - -void ctbPattern::setPeriod() { - using std::chrono::duration; - using std::chrono::duration_cast; - using std::chrono::nanoseconds; - try{ - auto timeNs = ctbDefs::ConvertDoubleStoChronoNS(ePeriod->GetNumber()); - myDet->setPeriod(timeNs); - } CATCH_DISPLAY ("Could not set period", "ctbPattern::setPeriod") -} - -void ctbPattern::setAdcFreq() { - try{ - myDet->setADCClock(eAdcClkFreq->GetNumber()); - } CATCH_DISPLAY ("Could not set adc clock", "ctbPattern::setAdcFreq") -} - -void ctbPattern::setRunFreq() { - try{ - myDet->setRUNClock(eRunClkFreq->GetNumber()); - } CATCH_DISPLAY ("Could not set run clock", "ctbPattern::setRunFreq") -} - -void ctbPattern::setDBitFreq() { - try{ - myDet->setDBITClock(eDBitClkFreq->GetNumber()); - } CATCH_DISPLAY ("Could not set dbit clock", "ctbPattern::setDBitFreq") -} - -void ctbPattern::setAdcPhase() { - try{ - myDet->setADCPhase(eAdcClkPhase->GetNumber()); - } CATCH_DISPLAY ("Could not set adc phase shift", "ctbPattern::setAdcPhase") -} - -void ctbPattern::setDBitPhase() { - try{ - myDet->setDBITPhase(eDBitClkPhase->GetNumber()); - } CATCH_DISPLAY ("Could not set dbit phase shift", "ctbPattern::setDBitPhase") -} - -void ctbPattern::setAdcPipeline() { - try{ - myDet->setADCPipeline(eAdcPipeline->GetNumber()); - } CATCH_DISPLAY ("Could not set adc pipeline", "ctbPattern::setAdcPipeline") -} - -void ctbPattern::setDBitPipeline() { - try{ - myDet->setDBITPipeline(eDBitPipeline->GetNumber()); - } CATCH_DISPLAY ("Could not set dbit pipeline", "ctbPattern::setDBitPipeline") -} - - -void ctbPattern::setAnalogSamples() { - try{ - myDet->setNumberOfAnalogSamples(eAnalogSamples->GetNumber()); - } CATCH_DISPLAY ("Could not set number of analog sampels", "ctbPattern::setAnalogSamples") - - analogSamplesChanged(eAnalogSamples->GetNumber()); -} - -void ctbPattern::setDigitalSamples() { - try{ - myDet->setNumberOfDigitalSamples(eDigitalSamples->GetNumber()); - } CATCH_DISPLAY ("Could not set number of digital samples", "ctbPattern::setDigitalSamples") - - digitalSamplesChanged(eDigitalSamples->GetNumber()); -} - -void ctbPattern::setReadoutMode(Bool_t) { - try { - slsDetectorDefs::readoutMode flag = slsDetectorDefs::ANALOG_ONLY; - if (cbAnalog->IsOn() && cbDigital->IsOn()) - flag=slsDetectorDefs::ANALOG_AND_DIGITAL; - else if (~cbAnalog->IsOn() && cbDigital->IsOn()) - flag=slsDetectorDefs::DIGITAL_ONLY; - else if (cbAnalog->IsOn() && ~cbDigital->IsOn()) - flag=slsDetectorDefs::ANALOG_ONLY; - else { - throw runtime_error("unkown readout flag"); - } - myDet->setReadoutMode(flag); - cout << "Set readout flag: " << flag << endl; - } CATCH_DISPLAY ("Could not set readout flag", "ctbPattern::setReadoutMode") - - getReadoutMode(); -} - -void ctbPattern::readoutModeChanged(int flags) { - Emit("readoutModeChanged(Int_t)",(int)flags); - -} - -int ctbPattern::getReadoutMode() { - int retval=slsDetectorDefs::ANALOG_ONLY; - - if (myDet->getDetectorType().squash() == slsDetectorDefs::CHIPTESTBOARD) { - try{ - retval = myDet->getReadoutMode().tsquash("Different values"); - } CATCH_DISPLAY ("Could not get readout flags", "ctbPattern::getReadoutMode") - - switch(retval) { - case slsDetectorDefs::ANALOG_AND_DIGITAL: - cout << "analog and digital" << endl; - cbAnalog->SetOn(kTRUE); - cbDigital->SetOn(kTRUE); - break; - case slsDetectorDefs::DIGITAL_ONLY: - cout << "digital only" << endl; - cbAnalog->SetOn(kFALSE); - cbDigital->SetOn(kTRUE); - break; - case slsDetectorDefs::ANALOG_ONLY: - cout << "analog only" << endl; - cbAnalog->SetOn(kTRUE); - cbDigital->SetOn(kFALSE); - break; - default: - throw("unknown readout flag"); - } - } else { - cbAnalog->SetOn(kTRUE); - cbDigital->SetOn(kFALSE); - } - - Emit("readoutModeChanged(int)",static_cast(retval)); - return retval; - - -} - -int ctbPattern::getAnalogSamples() { - try{ - auto retval = myDet->getNumberOfAnalogSamples().tsquash("Different values"); - eAnalogSamples->SetNumber((Double_t)retval); - Emit("analogSamplesChanged(const int)", eAnalogSamples->GetNumber()); - return eAnalogSamples->GetNumber(); - } CATCH_DISPLAY ("Could not get number of triggers.", "ctbPattern::update") - - return -1; -} - -int ctbPattern::getDigitalSamples() { - int retval=0; - if (myDet->getDetectorType().squash() == slsDetectorDefs::CHIPTESTBOARD) { - try{ - auto retval = myDet->getNumberOfDigitalSamples().tsquash("Different values"); - } CATCH_DISPLAY ("Could not get number of digital samples.", "ctbPattern::getDigitalSamples") - } - eDigitalSamples->SetNumber((Double_t)retval); - Emit("digitalSamplesChanged(const int)", eDigitalSamples->GetNumber()); - return eDigitalSamples->GetNumber(); - - - return -1; -} - - -void ctbPattern::analogSamplesChanged(const int t){ - Emit("analogSamplesChanged(const int)", t); -} - -void ctbPattern::digitalSamplesChanged(const int t){ - Emit("digitalSamplesChanged(const int)", t); -} diff --git a/ctbGui/ctbPattern.h b/ctbGui/ctbPattern.h deleted file mode 100644 index 6f85974a1..000000000 --- a/ctbGui/ctbPattern.h +++ /dev/null @@ -1,181 +0,0 @@ -// SPDX-License-Identifier: LGPL-3.0-or-other -// Copyright (C) 2021 Contributors to the SLS Detector Package -#ifndef CTBPATTERN_H -#define CTBPATTERN_H -#include - - -#define NLOOPS 3 -#define NWAITS 3 -#define NADCS 32 -#define PATLEN 1024 - -class TRootEmbeddedCanvas; -class TGButtonGroup; -class TGVerticalFrame; -class TGHorizontalFrame; -class TGTextEntry; -class TGLabel; -class TGNumberEntry; -class TH2F; -class TGComboBox; -class TGCheckButton; -class TGTextEntry; -class TGCheckButton; - -class THStack; -class TGraphErrors; -class energyCalibration; -class TGTextButton; -class TGTab; - -namespace sls -{ - class Detector; -}; - - -#include -using namespace std; - - - -class ctbLoop : public TGHorizontalFrame { - - - private: - - TGNumberEntry *eLoopStartAddr; - TGNumberEntry *eLoopStopAddr; - TGNumberEntry *eLoopNumber; - - int id; - - sls::Detector *myDet; - - public: - ctbLoop(TGGroupFrame *page, int i,sls::Detector *det); - - void setNLoops(); - void update(); - - ClassDef(ctbLoop,0) - }; - -class ctbWait : public TGHorizontalFrame { - - - private: - - TGNumberEntry *eWaitAddr; - TGNumberEntry *eWaitTime; - - int id; - - sls::Detector *myDet; - - public: - ctbWait(TGGroupFrame *page, int i,sls::Detector *det); - - void setWaitTime(); - void update(); - - ClassDef(ctbWait,0) - }; - - - - - - - -class ctbPattern : public TGGroupFrame { -private: - - - TGNumberEntry *eAdcClkFreq; - TGNumberEntry *eRunClkFreq; - TGNumberEntry *eDBitClkFreq; - TGNumberEntry *eAdcClkPhase; - TGNumberEntry *eDBitClkPhase; - //TGNumberEntry *eRunClkPhase; - - TGNumberEntry *eStartAddr; - TGNumberEntry *eStopAddr; - TGNumberEntry *eFrames; - TGNumberEntry *ePeriod; - TGNumberEntry *eTriggers; - // TGNumberEntry *eMeasurements; - TGNumberEntry *eAdcPipeline; - TGNumberEntry *eDBitPipeline; - - ctbLoop *eLoop[NLOOPS]; - ctbWait *eWait[NWAITS]; - - TGTextEntry *patternCompiler; - TGTextEntry *patternFile; - - TGTextButton *browseCompiler; - TGTextButton *browseFile; - - - TGNumberEntry *eAnalogSamples; - TGNumberEntry *eDigitalSamples; - - TGCheckButton *cbAnalog; - TGCheckButton *cbDigital; - - char pat[PATLEN*8]; - - sls::Detector *myDet; - -public: - - ctbPattern(TGVerticalFrame *page, sls::Detector *det); - - void update(); - void setAdcFreq(); - void setRunFreq(); - void setDBitFreq(); - void setAdcPhase(); - void setDBitPhase(); - // void setRunPhase(); - void setAdcPipeline(); - void setDBitPipeline(); - void setFrames(); - void setTriggers(); - // void setMeasurements(); - void setPeriod(); - - - void chooseCompiler(); - void choosePattern(); - - string getCompiler(); - string getPatternFile(); - - void setPatternAlias(string); - string getPatternAlias(); - - - int getAnalogSamples(); - void setAnalogSamples(); - int getDigitalSamples(); - void setDigitalSamples(); - void setReadoutMode(Bool_t); - int getReadoutMode(); - - - void setFile(); - void setCompiler(); - void patternFileChanged(const char*); - void patternCompilerChanged(const char*); - void analogSamplesChanged(const int t); - void digitalSamplesChanged(const int t); - void readoutModeChanged(int); - - - ClassDef(ctbPattern,0) -}; - -#endif diff --git a/ctbGui/ctbPowers.cpp b/ctbGui/ctbPowers.cpp deleted file mode 100644 index 498ec2c13..000000000 --- a/ctbGui/ctbPowers.cpp +++ /dev/null @@ -1,225 +0,0 @@ -// SPDX-License-Identifier: LGPL-3.0-or-other -// Copyright (C) 2021 Contributors to the SLS Detector Package -#include - - -#include -#include -#include -#include - -#include -#include -#include - -#include "ctbDefs.h" -#include "ctbDacs.h" -#include "ctbPowers.h" -#include "sls/Detector.h" -#include "sls/sls_detector_defs.h" - -using namespace std; - - - -ctbPower::ctbPower(TGGroupFrame* f, int i, sls::Detector* d) - : ctbDac(f, i, d) -{ - cout << "****************************************************************power " << i << endl; - dacsUnit->SetOn(kTRUE); - dacsUnit->SetEnabled(kFALSE); - - switch(i) { - case slsDetectorDefs::V_POWER_IO: - dacsLabel->SetText("VIO"); - break; - case slsDetectorDefs::V_POWER_A: - dacsLabel->SetText("VA"); - break; - case slsDetectorDefs::V_POWER_B: - dacsLabel->SetText("VB"); - break; - case slsDetectorDefs::V_POWER_C: - dacsLabel->SetText("VC"); - break; - case slsDetectorDefs::V_POWER_D: - dacsLabel->SetText("VD"); - break; - case slsDetectorDefs::V_POWER_CHIP: - dacsLabel->SetText("VCHIP"); - dacsLabel->SetEnabled(kFALSE); - break; - default: - dacsLabel->SetText("Bad index"); - break; - }; - - - TGTextEntry *e=dacsEntry->TGNumberEntry::GetNumberEntry(); - e->Disconnect ("ReturnPressed()"); - e->Disconnect ("ValueSet(Long_t)"); - - e->Connect("ReturnPressed()","ctbPower",this,"setValue()"); - dacsEntry->Connect("ValueSet(Long_t)","ctbPower",this,"setValue(Long_t)"); - }; - - -string ctbPower::getLabel() { - - ostringstream line; - switch (id) { - case slsDetectorDefs::V_POWER_IO: - line << "VIO"; - break; - case slsDetectorDefs::V_POWER_A: - line << "VA"; - break; - case slsDetectorDefs::V_POWER_B: - line << "VB"; - break; - case slsDetectorDefs::V_POWER_C: - line << "VC"; - break; - case slsDetectorDefs::V_POWER_D: - line << "VD"; - break; - case slsDetectorDefs::V_POWER_CHIP: - line << "VCHIP"; - break; - default: - line << "VBAD"; - break; - - } - line << " " << dacsLabel->GetText() << endl; - return line.str(); -} - -void ctbPower::setValue(Long_t a) {ctbPower::setValue();} - -void ctbPower::setValue() { - cout << "***************************Setting power " << dacsEntry->GetIntNumber() << " " << id << " " << 1 << endl; - - try { - myDet->setVoltage(static_cast(id), dacsEntry->GetIntNumber()); - } CATCH_DISPLAY ("Could not set power " + to_string(id) + ".", "ctbPower::setValue") - - getValue(); -} - - -int ctbPower::getValue() { - try { - - int val = myDet->getVoltage(static_cast(id)).tsquash("Different values"); - cout << "****************************Getting power " << val << " " << id << " " << 1 << endl; - - dacsValue->SetText(to_string(val).c_str()); - if (val > 0) { - if (id != static_cast(slsDetectorDefs::V_POWER_CHIP)) - dacsLabel->SetOn(kTRUE); - } else { - dacsLabel->SetOn(kFALSE); - } - - return val; - - } CATCH_DISPLAY ("Could not get power " + to_string(id) + ".", "ctbPower::getValue") - - return -1; -} - - - -ctbPowers::ctbPowers(TGVerticalFrame* page, sls::Detector* det) : TGGroupFrame(page,"Power Supplies",kVerticalFrame) , myDet(det){ - - - SetTitlePos(TGGroupFrame::kLeft); - page->AddFrame(this,new TGLayoutHints( kLHintsTop | kLHintsExpandX , 10,10,10,10)); - MapWindow(); - - // cout << "window mapped " << endl; - - for (int idac=0; idacsetLabel(tit,1); - is=0; - } - - if (sscanf(line.c_str(),"VB %s",tit)) { - dacs[1]->setLabel(tit,1); - is=1; - } - - if (sscanf(line.c_str(),"VC %s",tit)) { - dacs[2]->setLabel(tit,1); - is=2; - } - - if (sscanf(line.c_str(),"VD %s",tit)) { - dacs[3]->setLabel(tit,1); - is=3; - } - - if (sscanf(line.c_str(),"VIO %s",tit)) { - dacs[4]->setLabel(tit,1); - is=4; - } - - if (sscanf(line.c_str(),"VCHIP %s",tit)) { - dacs[5]->setLabel(tit,1); - is=5; - } - - return is; - -} - -string ctbPowers::getPwrAlias() { - - ostringstream line; - - for (int i=0; igetLabel() << endl; - return line.str(); - -} - - - - -string ctbPowers::getPwrParameters() { - - ostringstream line; - line << "v_a" << " " << dacs[0]->getValue() << " mv" << endl; - line << "v_b" << " " << dacs[1]->getValue() << " mv" << endl; - line << "v_c" << " " << dacs[2]->getValue() << " mv" << endl; - line << "v_d" << " " << dacs[3]->getValue() << " mv" << endl; - line << "v_io" << " " << dacs[4]->getValue() << " mv" << endl; - line << "v_chip" << " " << dacs[5]->getValue() << " mv" << endl; - // for (int i=0; igetValue << endl; - // line << "dac:" << i << " " << dacs[i]->getValue() << endl; - // } - return line.str(); -} - - - -void ctbPowers::update() { - for (int idac=0; idacgetValue(); - - } -} diff --git a/ctbGui/ctbPowers.h b/ctbGui/ctbPowers.h deleted file mode 100644 index d0c39f1c7..000000000 --- a/ctbGui/ctbPowers.h +++ /dev/null @@ -1,69 +0,0 @@ -// SPDX-License-Identifier: LGPL-3.0-or-other -// Copyright (C) 2021 Contributors to the SLS Detector Package -#ifndef CTBPOWERS_H -#define CTBPOWERS_H - -#include - -#define NPOWERS 6 - - - -class TGTextEntry; -class TGLabel; -class TGNumberEntry; -class TGCheckButton; - - - - -namespace sls -{ - class Detector; -}; - -#include -using namespace std; - - -class ctbPower : public ctbDac { - - - - - public: - - ctbPower(TGGroupFrame* f, int i, sls::Detector* d); - - string getLabel(); - - int getValue(); - void setValue(); - void setValue(Long_t); - - ClassDef(ctbPower,0) -}; - - -class ctbPowers : public TGGroupFrame -{ - private: - - ctbPower *dacs[NPOWERS]; - - sls::Detector* myDet; - -public: - //ctbPowers(); - ctbPowers(TGVerticalFrame*, sls::Detector*); - - int setPwrAlias(string); - string getPwrAlias(); - string getPwrParameters(); - - void update(); - - ClassDef(ctbPowers,0) -}; - -#endif diff --git a/ctbGui/ctbSignals.cpp b/ctbGui/ctbSignals.cpp deleted file mode 100644 index f1e0c840f..000000000 --- a/ctbGui/ctbSignals.cpp +++ /dev/null @@ -1,543 +0,0 @@ -// SPDX-License-Identifier: LGPL-3.0-or-other -// Copyright (C) 2021 Contributors to the SLS Detector Package -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#include "ctbSignals.h" -#include "ctbDefs.h" -#include "sls/Detector.h" - -using namespace std; - - - -//#define DEFAULTFN "run_0.encal" - - -ctbSignal::ctbSignal(TGFrame *page, int i, sls::Detector *det) - : TGHorizontalFrame(page, 800,50), myDet(det), id(i), hsig(NULL) { - - - TGHorizontalFrame *hframe=this; - char tit[100]; - - - - sprintf(tit, "BIT%d ",id); - - sLabel= new TGLabel(hframe, tit); - hframe->AddFrame( sLabel,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - sLabel->MapWindow(); - sLabel->SetTextJustify(kTextLeft); - - - - sOutput= new TGCheckButton(hframe, "Out"); - hframe->AddFrame( sOutput,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - sOutput->MapWindow(); - - - sOutput->Connect("Toggled(Bool_t)","ctbSignal",this,"ToggledOutput(Bool_t)"); - - sDbitList= new TGCheckButton(hframe, "DB List"); - hframe->AddFrame( sDbitList,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - sDbitList->MapWindow(); - - sDbitList->Connect("Toggled(Bool_t)","ctbSignal",this,"ToggledDbitList(Bool_t)"); - - - sPlot= new TGCheckButton(hframe, "Plot"); - hframe->AddFrame( sPlot,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - sPlot->MapWindow(); - - sPlot->Connect("Toggled(Bool_t)","ctbSignal",this,"ToggledPlot(Bool_t)"); - - fColorSel = new TGColorSelect(hframe, id+1, 0); - fColorSel->Connect("ColorSelected(Pixel_t)","ctbSignal",this,"ColorChanged(Pixel_t)"); - hframe->AddFrame(fColorSel, new TGLayoutHints(kLHintsTop | - kLHintsLeft, 2, 0, 2, 2)); - - - fColorSel->SetColor(TColor::Number2Pixel(id+1)); - - - ToggledOutput(kFALSE); - - - ToggledPlot(kFALSE); - - // if (id==63) { -// sOutput->SetOn(kTRUE); -// sOutput->SetEnabled(kFALSE); -// } -// #ifdef CTB -// if (id==62) { -// sOutput->SetOn(kTRUE); -// sOutput->SetEnabled(kFALSE); -// } - -// // if (id>=32 && id<48) -// // fixOutput(1); -// // else if (id>=48 && id<64) -// // fixOutput(0); - -// #endif -} -int ctbSignal::setSignalAlias(char *tit, int plot, int col) { - - if (tit) - sLabel->SetText(tit); - - if (plot>0) { - sPlot->SetOn(kTRUE,kTRUE); - } else if (plot==0) - sPlot->SetOn(kFALSE,kTRUE); - - if (col>=0) - fColorSel->SetColor(col);//TColor::Number2Pixel(col+1)); - - fColorSel->SetEnabled(sPlot->IsOn()); - return 0; - -} - -string ctbSignal::getSignalAlias() { - - - ostringstream oss; - oss << "BIT" << dec << id << " " << sLabel->GetText()->Data() << " " << sPlot->IsOn() << hex << " " << fColorSel->GetColor() << endl; - return oss.str(); - - - - -} -int ctbSignal::setOutput(Long64_t r) { - - - // cout << hex << r << dec <SetOn(kTRUE,kTRUE); - else - sOutput->SetOn(kFALSE,kTRUE); - - return sOutput->IsOn(); - -} - -int ctbSignal::fixOutput(int i) { - - if (i) { - sPlot->SetOn(kFALSE); - //sClock->SetOn(kFALSE,kTRUE); - sOutput->SetOn(kTRUE); - // sPlot->SetEnabled(kFALSE); - // sClock->SetEnabled(kTRUE); - } else { - sOutput->SetOn(kFALSE,kTRUE); - // sClock->SetOn(kFALSE); - // sClock->SetEnabled(kFALSE); - sPlot->SetEnabled(kTRUE); - } - sOutput->SetEnabled(kFALSE); - return 0; - -} - -int ctbSignal::setDbitList(Long64_t r) { - - if (r) - sDbitList->SetOn(kTRUE,kFALSE); - else - sDbitList->SetOn(kFALSE,kFALSE); - - return sDbitList->IsOn(); - -} - -int ctbSignal::isDbitList() { return sDbitList->IsOn();} -int ctbSignal::isOutput() { return sOutput->IsOn();} -int ctbSignal::isPlot() { return sPlot->IsOn();} -Pixel_t ctbSignal::getColor(){return fColorSel->GetColor();} - -void ctbSignal::ToggledOutput(Bool_t b) { - ToggledSignalOutput(id); - if (b) { - // sClock->SetEnabled(kTRUE); - sPlot->SetOn(kFALSE); - // sPlot->SetEnabled(kFALSE); - fColorSel->SetEnabled(kFALSE); - } else { - // sClock->SetEnabled(kFALSE); - // sClock->SetOn(kFALSE); - sPlot->SetEnabled(kTRUE); - if ( sPlot->IsOn()) - fColorSel->SetEnabled(kFALSE); - else - fColorSel->SetEnabled(kTRUE); - } - - -} - -void ctbSignal::ToggledDbitList(Bool_t b){ - Long_t mask=id; - ToggledSignalDbitList(mask); -} - - -void ctbSignal::ToggledPlot(Bool_t b){ - Long_t mask=b<SetEnabled(b); -} - -void ctbSignal::ColorChanged(Pixel_t p){ - ToggledSignalPlot(id); -} - - -void ctbSignal::ToggledSignalOutput(Int_t b) { - cout << "Toggle signal " << id << " " << b << " " << sOutput->IsOn() <AddFrame(this,new TGLayoutHints( kLHintsTop | kLHintsExpandX , 10,10,10,10)); - MapWindow(); - - - TGHorizontalFrame *hframe; - - TGHorizontalFrame* hhframe=new TGHorizontalFrame(this, 800,800); - AddFrame(hhframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1)); - hhframe->MapWindow(); - - TGVerticalFrame *vframe; - - - - - int idac=0; - for (idac=0; idacAddFrame(vframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1)); - vframe->MapWindow(); - } - - - signals[idac]=new ctbSignal(vframe,idac,myDet); - signals[idac]->Connect("ToggledSignalOutput(Int_t)","ctbSignals",this,"ToggledOutReg(Int_t)"); - signals[idac]->Connect("ToggledSignalDbitList(Int_t)","ctbSignals",this,"ToggledDbitList(Int_t)"); - signals[idac]->Connect("ToggledSignalPlot(Int_t)","ctbSignals",this,"ToggledPlot(Int_t)"); - - vframe->AddFrame(signals[idac],new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1)); - signals[idac]->MapWindow(); - - - } - - hframe=new TGHorizontalFrame(vframe, 800,50); - vframe->AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1)); - hframe->MapWindow(); - - - TGLabel *label= new TGLabel(hframe, "IO Control Register: "); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - label->MapWindow(); - label->SetTextJustify(kTextLeft); - - - eIOCntrlRegister = new TGNumberEntry(hframe, 0, 16,999, TGNumberFormat::kNESHex, - TGNumberFormat::kNEANonNegative, - TGNumberFormat::kNELNoLimits); - - hframe->AddFrame(eIOCntrlRegister,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); - eIOCntrlRegister->MapWindow(); - eIOCntrlRegister->Resize(150,30); - - - - - hframe=new TGHorizontalFrame(vframe, 800,50); - vframe->AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1)); - hframe->MapWindow(); - - - label= new TGLabel(hframe, "DBit Offset: "); - hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1)); - label->MapWindow(); - label->SetTextJustify(kTextLeft); - - - eDbitOffset = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger, - TGNumberFormat::kNEANonNegative, - TGNumberFormat::kNELNoLimits); - - hframe->AddFrame(eDbitOffset,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1)); - eDbitOffset->MapWindow(); - eDbitOffset->Resize(150,30); - - - TGTextEntry *e= eDbitOffset->TGNumberEntry::GetNumberEntry(); - e->Connect("ReturnPressed()","ctbSignals",this,"setDbitOffset()"); - - e->Connect("ValueSet(Long_t)","ctbSignals",this,"setDbitOffset(Long_t)"); -} - - - - -int ctbSignals::setSignalAlias(string line) { - - int is=-1, plot=0, col=-1; - char tit[100]; - int narg=sscanf(line.c_str(),"BIT%d %s %d %d",&is,tit,&plot,&col); - if (narg<2) - return -1; - if (is>=0 && issetSignalAlias(tit,plot,col); - } - return is; - -} - -string ctbSignals::getSignalAlias() { - - ostringstream oss; - for (int is=0; isgetSignalAlias() << endl; - - - return oss.str(); - -} - - -void ctbSignals::update() { - try { - - Long64_t oreg = static_cast(myDet->getPatternIOControl().tsquash("Different values")); - cout << hex << oreg << dec << endl; - - for (int idac=0; idacsetOutput(oreg); - } - - } CATCH_DISPLAY ("Could not get patternIOcontrol.", "ctbSignals::update") - - if (myDet->getDetectorType().squash() == slsDetectorDefs::MOENCH) { - // enable all - for (int is=0; is<64; is++) { - signals[is]->setDbitList(1); - } - eDbitOffset->SetNumber(0); - } - - // ctb - else { - try { - - auto dbitlist = myDet->getRxDbitList().tsquash("Different values"); - // enable all - if (dbitlist.empty()) { - for (int is=0; is<64; is++) { - signals[is]->setDbitList(1); - } - } - else { - // disable all - for (int is=0; is<64; is++) { - signals[is]->setDbitList(0); - } - // enable selected - for (const auto &value : dbitlist) { - signals[value]->setDbitList(1); - } - } - - } CATCH_DISPLAY ("Could not get receiver dbit list.", "ctbSignals::update") - - try { - auto val = myDet->getRxDbitOffset().tsquash("Different values"); - eDbitOffset->SetNumber(val); - } CATCH_DISPLAY ("Could not get receiver dbit offset.", "ctbSignals::update") - } -} - - -string ctbSignals::getSignalParameters() { - - try { - - auto val = myDet->getPatternIOControl().tsquash("Different values"); - ostringstream line; - line << "patioctrl " << hex << val << dec << endl; - return line.str(); - - } CATCH_DISPLAY ("Could not get patternIOcontrol.", "ctbSignals::getSignalParameters") - - return (""); -} - -void ctbSignals::ToggledOutReg(Int_t mask) { - try { - - Long64_t oreg = static_cast(myDet->getPatternIOControl().tsquash("Different values")); - Long64_t m=((Long64_t)1)<isOutput()) { - cout << " or " << m ; - oreg|=m; - } else { - cout << " not " << ~m ; - oreg&=~m; - } - cout << " after " << oreg << endl; - - myDet->setPatternIOControl(static_cast(oreg)); - oreg = static_cast(myDet->getPatternIOControl().tsquash("Different values")); - cout << dec << sizeof(Long64_t) << " " << mask << " " << hex << m << " ioreg " << oreg << endl; - - eIOCntrlRegister->SetText(to_string(oreg).c_str()); - - } CATCH_DISPLAY ("Could not get/set patternIOcontrol.", "ctbSignals::ToggledOutReg") - -} - - - -void ctbSignals::ToggledDbitList(Int_t mask){ - try { - - auto dbitlist = myDet->getRxDbitList().tsquash("Different values"); - - // anyway all enabled - if ((dbitlist.empty()) && (signals[mask]->isDbitList())) { - ; - } - // set the dbitlist - else { - std::vector new_dbitlist; - for (int is=0; is<64; is++) { - if (signals[is]->isDbitList()){ - new_dbitlist.push_back(is); - cout << is << " " << new_dbitlist.size() - 1 << endl; - } - } - if (new_dbitlist.size() > 64) - new_dbitlist.clear(); - myDet->setRxDbitList(new_dbitlist); - // get list again - dbitlist = myDet->getRxDbitList().tsquash("Different values"); - } - - // enable all - if (dbitlist.empty()) { - for (int is=0; is<64; is++) { - signals[is]->setDbitList(1); - } - } - else { - // disable all - for (int is=0; is<64; is++) { - signals[is]->setDbitList(0); - } - // enable selected - for (const auto &value : dbitlist) { - signals[value]->setDbitList(1); - } - } - - } CATCH_DISPLAY ("Could not get/set receiver dbit list.", "ctbSignals::ToggledDbitList") -} - - - - -void ctbSignals::ToggledPlot(Int_t b) { - - Emit("ToggledSignalPlot(Int_t)", b); - -} - - -void ctbSignals::ToggledSignalPlot(Int_t b) { - - Emit("ToggledSignalPlot(Int_t)", b); - -} - - -Pixel_t ctbSignals::getColor(int i){ - if (i>=0 && igetColor(); - return static_cast(-1); -} - -int ctbSignals::getPlot(int i){ - if (i>=0 && iisPlot(); - return -1; -}; - -void ctbSignals::setDbitOffset(Long_t) { - setDbitOffset(); -} - -void ctbSignals::setDbitOffset(){ - try { - myDet->setRxDbitOffset(eDbitOffset->GetNumber()); - } CATCH_DISPLAY ("Could not set receiver dbit offset.", "ctbSignals::setDbitOffset") -} diff --git a/ctbGui/ctbSignals.h b/ctbGui/ctbSignals.h deleted file mode 100644 index eb3deb221..000000000 --- a/ctbGui/ctbSignals.h +++ /dev/null @@ -1,123 +0,0 @@ -// SPDX-License-Identifier: LGPL-3.0-or-other -// Copyright (C) 2021 Contributors to the SLS Detector Package -#ifndef CTBSIGNALS_H -#define CTBSIGNALS_H -#include - - -#define NSIGNALS 64 - -#define NIOSIGNALS 64 //for moench board was 52 - - -#define ADCLATCH 63 -#define DIGSIGLATCH 62 - - - - -class TGTextEntry; -class TGLabel; -class TGNumberEntry; -class TGCheckButton; -class TH1I; -class TGTextButton; -class TGColorSelect; - - - -class TGNumberEntry; -namespace sls -{ - class Detector; -}; -class ctbSignal; - -#include -using namespace std; - -class ctbSignal : public TGHorizontalFrame { - - // RQ_OBJECT("ctbSignal") - -private: - - TGLabel *sLabel; - TGCheckButton *sOutput; - TGCheckButton *sDbitList; - TGCheckButton *sPlot; - TGLabel *sValue; - TGNumberEntry *sEntry; - TGColorSelect *fColorSel; - - sls::Detector *myDet; - Int_t id; - - TH1I *hsig; - -public: - - ctbSignal(TGFrame *page, int i, sls::Detector *det); - int setSignalAlias(char *tit, int plot, int col); - string getSignalAlias(); - - TH1I *getPlot() {return hsig;}; - int setOutput(Long64_t); - int fixOutput(int); - int setDbitList(Long64_t); - - void ToggledOutput(Bool_t); - void ToggledDbitList(Bool_t); - void ToggledPlot(Bool_t); - void ColorChanged(Pixel_t); - - int isDbitList(); - int isOutput(); - int isPlot(); - Pixel_t getColor(); - - - void ToggledSignalOutput(Int_t); //*SIGNAL* - void ToggledSignalDbitList(Int_t); //*SIGNAL* - void ToggledSignalPlot(Int_t); //*SIGNAL* - - - - ClassDef(ctbSignal,0) -}; - -class ctbSignals : public TGGroupFrame { -private: - - ctbSignal *signals[NSIGNALS]; - - TGNumberEntry *eIOCntrlRegister; - TGNumberEntry *eDbitOffset; - - sls::Detector *myDet; - -public: - ctbSignals(TGVerticalFrame *page, sls::Detector *det); - int setSignalAlias(string line); - string getSignalAlias(); - - int getPlot(int); - Pixel_t getColor(int); - - void update(); - // void saveParameters(); - string getSignalParameters(); - - //void setDbitList(Int_t); - void setDbitOffset(Long_t); - void setDbitOffset(); - - void ToggledOutReg(Int_t); - void ToggledDbitList(Int_t); - void ToggledPlot(Int_t); - void ToggledSignalPlot(Int_t); //*SIGNAL* - - ClassDef(ctbSignals,0) -}; - -#endif diff --git a/ctbGui/ctbSlowAdcs.cpp b/ctbGui/ctbSlowAdcs.cpp deleted file mode 100644 index 6507e0d17..000000000 --- a/ctbGui/ctbSlowAdcs.cpp +++ /dev/null @@ -1,184 +0,0 @@ -// SPDX-License-Identifier: LGPL-3.0-or-other -// Copyright (C) 2021 Contributors to the SLS Detector Package - -#include -#include -#include - -#include -#include -#include -#include - -#include "ctbSlowAdcs.h" -#include "ctbDefs.h" -#include "sls/Detector.h" -#include "sls/sls_detector_defs.h" - -using namespace std; - - - - -ctbSlowAdc::ctbSlowAdc(TGGroupFrame *page, int idac, sls::Detector *det) : TGHorizontalFrame(page, 800,50) , id(idac), myDet(det) { - - - TGHorizontalFrame *hframe=this; - - page->AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1)); - MapWindow(); - - char tit[100]; - - - sprintf(tit, "SENSE %d:",idac-1000); - - dacsLabel= new TGLabel(hframe, tit);// new TGLabel(hframe, tit); - - - - hframe->AddFrame(dacsLabel,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5)); - dacsLabel->MapWindow(); - dacsLabel->SetTextJustify(kTextLeft); - - - - - sprintf(tit, "xxx"); - dacsValue= new TGLabel(hframe, tit); - hframe->AddFrame( dacsValue,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5)); - dacsValue->MapWindow(); - dacsValue->SetTextJustify(kTextLeft); - - - - TGTextButton *b= new TGTextButton(hframe, "Update"); - hframe->AddFrame( b,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5)); - b->MapWindow(); - b->SetTextJustify(kTextLeft); - - b->Connect("Clicked()","ctbSlowAdc",this,"getValue()"); -} - - - -int ctbSlowAdc::setLabel(char *tit) { - if(tit) - dacsLabel->SetText(tit); - - return id; - -} - -string ctbSlowAdc::getLabel() { - ostringstream line; - line << dacsLabel->GetText() << endl; - - // line << "DAC" << dec << id << " " << dacsUnit->IsOn() << endl; - - return line.str(); -} - - - -int ctbSlowAdc::getValue() { - try { - std::string s; - - // temp - if (id == static_cast(slsDetectorDefs::SLOW_ADC_TEMP)) { - - int val = myDet->getTemperature(static_cast(id)).tsquash("Different values"); - cout << "slow adc temp" << " " << val << endl; - - s = to_string(val) + " " + to_string(0x00b0) + "C";//�C - dacsValue->SetText(s.c_str()); - return val; - } - - // mv - else { - - int val = myDet->getSlowADC(static_cast(id)).tsquash("Different values"); - cout << "slow adc " << id << " " << val << endl; - - s = to_string(val) + " mV"; - dacsValue->SetText(s.c_str()); - return val; - } - - } CATCH_DISPLAY ("Could not get slow dac " + to_string(id) + ".", "ctbSlowAdc::getValue") - - return -1; -} - - - - - - - -ctbSlowAdcs::ctbSlowAdcs(TGVerticalFrame *page, sls::Detector *det) : TGGroupFrame(page,"Sense",kVerticalFrame) , myDet(det){ - - SetTitlePos(TGGroupFrame::kLeft); - page->AddFrame(this,new TGLayoutHints( kLHintsTop | kLHintsExpandX , 10,10,10,10)); - MapWindow(); - - // cout << "window mapped " << endl; - - - for (int idac=0; idacsetLabel((char*)"Temperature"); -} - - - - -int ctbSlowAdcs::setSlowAdcAlias(string line) { - - int is=-1, mv=0; - char tit[100]; - int narg=sscanf(line.c_str(),"SENSE%d %s %d",&is,tit,&mv); - if (narg<2) - return -1; - if (is>=0 && issetLabel(tit); - return is; - -} - -string ctbSlowAdcs::getSlowAdcAlias() { - - ostringstream line; - - for (int i=0; igetLabel() << endl; - return line.str(); -} - - - - -string ctbSlowAdcs::getAdcParameters() { - - ostringstream line; - - for (int i=0; igetValue << endl; - line << "adc:" << i << " " << adcs[i]->getValue() << endl; - } - line << "adc:-1" << adcs[NSLOWADCS]->getValue() << endl; - return line.str(); -} - - - -void ctbSlowAdcs::update() { - for (int idac=0; idacgetValue(); - } -} diff --git a/ctbGui/ctbSlowAdcs.h b/ctbGui/ctbSlowAdcs.h deleted file mode 100644 index a25bbe5b1..000000000 --- a/ctbGui/ctbSlowAdcs.h +++ /dev/null @@ -1,80 +0,0 @@ -// SPDX-License-Identifier: LGPL-3.0-or-other -// Copyright (C) 2021 Contributors to the SLS Detector Package - - -#ifndef CTBSLOWADCS_H -#define CTBSLOWADCS_H -#include - - -//#define NDACS 16 -#define NSLOWADCS 8 - - - - -class TGTextEntry; -class TGLabel; -class TGNumberEntry; -class TGCheckButton; -class TGTextButton; - - - -namespace sls -{ - class Detector; -}; - -#include -using namespace std; - -class ctbSlowAdc : public TGHorizontalFrame { - - - protected: - // TGLabel *dacsLabel; - // TGNumberEntry *dacsEntry; - // TGCheckButton *dacsUnit; - TGLabel *dacsLabel; - TGLabel *dacsValue; - int id; - - sls::Detector* myDet; - public: - ctbSlowAdc(TGGroupFrame*, int , sls::Detector*); - int getValue(); - - int setLabel(char *tit); - string getLabel(); - - - - ClassDef(ctbSlowAdc,0) -}; - - -class ctbSlowAdcs : public TGGroupFrame { -private: - - - - ctbSlowAdc *adcs[NSLOWADCS+1]; - - sls::Detector* myDet; - -public: - ctbSlowAdcs(TGVerticalFrame *page, sls::Detector*); - - int setSlowAdcAlias(string line); - // int setDacAlias(string line); - string getSlowAdcAlias(); - string getAdcParameters(); - - void update(); - - ClassDef(ctbSlowAdcs,0) -}; - -#endif - diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 92c682694..3a50020d6 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -58,6 +58,12 @@ set(SPHINX_SOURCE_FILES src/udpheader.rst src/udpconfig.rst src/udpdetspec.rst + src/fileformat.rst + src/slsreceiverheaderformat.rst + src/masterfileattributes.rst + src/binaryfileformat.rst + src/hdf5fileformat.rst + src/zmqjsonheaderformat.rst ) foreach(filename ${SPHINX_SOURCE_FILES}) diff --git a/docs/src/binaryfileformat.rst b/docs/src/binaryfileformat.rst new file mode 100644 index 000000000..67f041ae8 --- /dev/null +++ b/docs/src/binaryfileformat.rst @@ -0,0 +1,438 @@ +Binary File Format +==================== + +This is the default file format that can be configured using command `fformat `_. + + .. code-block:: bash + + sls_detector_put fformat binary + + +Master File +-------------- + +* File Name: [fpath]/[fname]_master_[findex].json :ref:`Details here` + +* It is in json format and created for every acquisition. + +* It contains :ref:`attributes` relevant to the acquisition. This can vary with detector type shown in :ref:`master json file examples ` here. + +* It shows the :ref:`**SLS Receiver Header** ` format used in data files. + +* Enabled/disabled using command `fmaster `_. + + +Data File +---------- + +* File Name: [fpath]/[fname]_dx_fy_[findex].raw :ref:`Details here` + +* It store multiple frames sequentially, with total number of frames determined by `rx_framesperfile `_ parameter. + +* Each frame includes a :ref:`**sls_receiver_header** ` structure, followed by the actual frame data. + + + +.. _json master file examples: + +JSON Master File Examples +--------------------------------------------------- + +Eiger +^^^^^ + +.. code-block:: text + + { + "Version": 7.2, + "Timestamp": "Wed Nov 13 15:46:30 2024", + "Detector Type": "Eiger", + "Timing Mode": "auto", + "Geometry": { + "x": 2, + "y": 1 + }, + "Image Size in bytes": 262144, + "Pixels": { + "x": 512, + "y": 256 + }, + "Max Frames Per File": 10000, + "Frame Discard Policy": "nodiscard", + "Frame Padding": 1, + "Scan Parameters": "[disabled]", + "Total Frames": 1, + "Receiver Roi": { + "xmin": 4294967295, + "xmax": 4294967295, + "ymin": 4294967295, + "ymax": 4294967295 + }, + "Dynamic Range": 16, + "Ten Giga": 0, + "Exptime": "1s", + "Period": "1s", + "Threshold Energy": -1, + "Sub Exptime": "2.62144ms", + "Sub Period": "2.62144ms", + "Quad": 0, + "Number of rows": 256, + "Rate Corrections": "[0]", + "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" + } + } + + + +Jungfrau +^^^^^^^^ + +.. code-block:: text + + { + "Version": 7.2, + "Timestamp": "Wed Nov 13 13:03:53 2024", + "Detector Type": "Jungfrau", + "Timing Mode": "auto", + "Geometry": { + "x": 1, + "y": 1 + }, + "Image Size in bytes": 1048576, + "Pixels": { + "x": 1024, + "y": 512 + }, + "Max Frames Per File": 10000, + "Frame Discard Policy": "nodiscard", + "Frame Padding": 1, + "Scan Parameters": "[disabled]", + "Total Frames": 1000, + "Receiver Roi": { + "xmin": 4294967295, + "xmax": 4294967295, + "ymin": 4294967295, + "ymax": 4294967295 + }, + "Exptime": "10us", + "Period": "2ms", + "Number of UDP Interfaces": 1, + "Number of rows": 512, + "Frames in File": 10, + "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" + } + } + + +Gotthard2 +^^^^^^^^^^^^ + +.. code-block:: text + + { + "Version": 7.2, + "Timestamp": "Wed Nov 13 14:18:17 2024", + "Detector Type": "Gotthard2", + "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": 10, + "Receiver Roi": { + "xmin": 4294967295, + "xmax": 4294967295, + "ymin": 4294967295, + "ymax": 4294967295 + }, + "Exptime": "0ns", + "Period": "0ns", + "Burst Mode": "burst_internal", + "Frames in File": 10, + "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" + } + } + +Mythen3 +^^^^^^^ + +.. code-block:: text + + { + "Version": 7.2, + "Timestamp": "Wed Nov 13 14:39:14 2024", + "Detector Type": "Mythen3", + "Timing Mode": "auto", + "Geometry": { + "x": 1, + "y": 1 + }, + "Image Size in bytes": 15360, + "Pixels": { + "x": 3840, + "y": 1 + }, + "Max Frames Per File": 10000, + "Frame Discard Policy": "nodiscard", + "Frame Padding": 1, + "Scan Parameters": "[disabled]", + "Total Frames": 1, + "Receiver Roi": { + "xmin": 4294967295, + "xmax": 4294967295, + "ymin": 4294967295, + "ymax": 4294967295 + }, + "Dynamic Range": 32, + "Ten Giga": 1, + "Period": "2ms", + "Counter Mask": "0x7", + "Exptime1": "0.1s", + "Exptime2": "0.1s", + "Exptime3": "0.1s", + "GateDelay1": "0ns", + "GateDelay2": "0ns", + "GateDelay3": "0ns", + "Gates": 1, + "Threshold Energies": "[-1, -1, -1]", + "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" + } + } + + +Moench +^^^^^^ + +.. code-block:: text + + { + "Version": 7.2, + "Timestamp": "Wed Nov 13 14:41:32 2024", + "Detector Type": "Moench", + "Timing Mode": "auto", + "Geometry": { + "x": 1, + "y": 1 + }, + "Image Size in bytes": 320000, + "Pixels": { + "x": 400, + "y": 400 + }, + "Max Frames Per File": 100000, + "Frame Discard Policy": "discardpartial", + "Frame Padding": 1, + "Scan Parameters": "[disabled]", + "Total Frames": 1, + "Receiver Roi": { + "xmin": 4294967295, + "xmax": 4294967295, + "ymin": 4294967295, + "ymax": 4294967295 + }, + "Exptime": "10us", + "Period": "2ms", + "Number of UDP Interfaces": 1, + "Number of rows": 400, + "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" + } + } + +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 +^^^^^^^^^^^^^^^ + +.. code-block:: text + + { + "Version": 7.2, + "Timestamp": "Wed Nov 13 15:32:59 2024", + "Detector Type": "ChipTestBoard", + "Timing Mode": "auto", + "Geometry": { + "x": 1, + "y": 1 + }, + "Image Size in bytes": 48018, + "Pixels": { + "x": 3, + "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": "0ns", + "Period": "0.18s", + "Ten Giga": 0, + "ADC Mask": "0x2202", + "Analog Flag": 1, + "Analog Samples": 8003, + "Digital Flag": 0, + "Digital Samples": 1000, + "Dbit Offset": 0, + "Dbit Bitset": 0, + "Transceiver Mask": "0x3", + "Transceiver Flag": 0, + "Transceiver Samples": 1, + "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" + } + } diff --git a/docs/src/commandline.rst b/docs/src/commandline.rst index fb4e9f866..4b54da9b9 100644 --- a/docs/src/commandline.rst +++ b/docs/src/commandline.rst @@ -8,7 +8,7 @@ Commands can be used either with sls_detector_get or sls_detector_put .. code-block:: - sls_detector_get vrf + sls_detector_get exptime Help -------- @@ -24,6 +24,16 @@ Help # get help for a particular command sls_detector_get -h fpath sls_detector_help fpath + + # list of deprecated commands + list deprecated + + # autocompletion + # bash_autocomplete.sh or zsh_autocomplete.sh must be sourced from the + # main package folder to enable auto completion of commands and arguments + # for the command line on that shell. + source bash_autocomplete.sh + Commands @@ -32,14 +42,14 @@ Commands .. include:: ../commands.rst -Depreciated commands +Deprecated commands ------------------------ .. note :: All the dac commands are preceded with the **dac** command. Use command **daclist** to get correct list of dac command arguments for current detector. -.. csv-table:: Depreciated commands - :file: ../depreciated.csv +.. csv-table:: Deprecated commands + :file: ../deprecated.csv :widths: 35, 35 :header-rows: 1 diff --git a/docs/src/dependencies.rst b/docs/src/dependencies.rst index 846fc0ff1..344c41b24 100644 --- a/docs/src/dependencies.rst +++ b/docs/src/dependencies.rst @@ -20,8 +20,8 @@ the shared libraries these are needed: Python bindings ----------------------- - * Python > 3.6 - * pybind11 2.11.0 (packaged in libs) + * Python >= 3.8 + * pybind11 2.13.6 (packaged in libs) .. note :: diff --git a/docs/src/fileformat.rst b/docs/src/fileformat.rst new file mode 100644 index 000000000..f35498d0c --- /dev/null +++ b/docs/src/fileformat.rst @@ -0,0 +1,62 @@ +File format +================================ + +If `fwrite `_ is enabled, the receiver will write data to files. + +Number of Files +---------------- + +Every acquisition will create a master file and data files. + +An acquisition can have multiple data files for a single frame. The number of files is determined by the number of UDP ports per module and the number of modules. + + * Every modules has its own receiver process. Every receiver process can have 1 or 2 UDP ports. + * Each UDP port will create its own file. Therefore, each receiver can write 1 or 2 files. + * So, for example a detector with 4 modules with 2 UDP ports each will create a total of 8 files with file names containing UDP port index **'_d0'** to **'_d7'**. + +A new file containing **'_f[file_index]'** in file name is also created when reaching the maximum frames per file. Configured using `rx_framesperfile `_. + +.. _file name format: + +Naming +------- +| Master File Name: [fpath]/[fname]_master_[findex].[ext] + + +| Data File Name: [fpath]/[fname]_dx_fy_[findex].[ext] + + * fpath: file path set using command `fpath `_. Default: '/' + * fname: file name prefix using command `fname `_. Default: "run" + * findex: acquisition index using command `findex `_. Automatically incremented for every acquisition with `sls_detector_acquire `_ (if `fwrite `_ enabled). + * x: unique udp port index. New file per UDP port. + * y: file index. New file created after reaching max frames per file. + * ext: file extension. Default: "raw"(data file) or "json"(master file) + + +Some file name examples: + + .. code-block:: bash + + # first file + path-to-file/run_d0_f0_0.raw + + # first file for second UDP port + path-to-file/run_d1_f0_0.raw + + # second file after reaching max frames in first file + path-to-file/run_d0_f1_0.raw + + # second acquisition, first file + path-to-file/run_d0_f0_1.raw + + +Formats +-------- + +There are 2 file formats supported by the receiver: + + * Binary - extension .json (master file) or .raw (data files) + * HDF5 - extension .h5 + +The default is binary. HDF5 can be enabled by compiling the package with HDF5 option enabled. The file format is set using the command `fformat `_. + diff --git a/docs/src/firmware.rst b/docs/src/firmware.rst index a372ecb04..0a9bc9296 100644 --- a/docs/src/firmware.rst +++ b/docs/src/firmware.rst @@ -98,7 +98,7 @@ Upgrade * 6.1.2 server has a fix for seamless fpga programming - * We recommend first updating the on-board detector server to 6.1.2 (with client 6.1.x) using command 'updatedetectorserver' or 'copydetectorserver'. + * We recommend first updating the on-board detector server to 6.1.2 (with client 6.1.x) using command `updatedetectorserver `_. * Then use command 'programfpga' to only update firmware or use command 'update' to update firmware and server to the latest release. @@ -257,7 +257,7 @@ Upgrade * 6.1.2 server has a fix for seamless fpga programming - * We recommend first updating the on-board detector server to 6.1.2 (with client 6.1.x) using command 'updatedetectorserver' or 'copydetectorserver'. + * We recommend first updating the on-board detector server to 6.1.2 (with client 6.1.x) using command `updatedetectorserver `_. * Then use command 'programfpga' to only update firmware or use command 'update' to update firmware and server to the latest release. diff --git a/docs/src/gendoc.cpp b/docs/src/gendoc.cpp index 78c0520f3..2854f6d22 100644 --- a/docs/src/gendoc.cpp +++ b/docs/src/gendoc.cpp @@ -11,7 +11,7 @@ #include #include -#include "CmdProxy.h" +#include "Caller.h" #include "sls/Detector.h" #include "sls/sls_detector_defs.h" @@ -37,8 +37,8 @@ int main() { std::cout << "Generating command line documentation!\n"; - sls::CmdProxy proxy(nullptr); - auto commands = proxy.GetProxyCommands(); + sls::Caller caller(nullptr); + auto commands = caller.getAllCommands(); std::ofstream fs("commands.rst"); fs << ".. glossary::\n"; @@ -46,7 +46,7 @@ int main() { for (const auto &cmd : commands) { std::ostringstream os; std::cout << cmd << '\n'; - proxy.Call(cmd, {}, -1, slsDetectorDefs::HELP_ACTION, os); + caller.call(cmd, {}, -1, slsDetectorDefs::HELP_ACTION, os); auto tmp = os.str().erase(0, cmd.size()); auto usage = tmp.substr(0, tmp.find_first_of('\n')); @@ -55,9 +55,9 @@ int main() { fs << '\t' << cmd << usage << help << "\n"; } - std::ofstream fs2("depreciated.csv"); + std::ofstream fs2("deprecated.csv"); fs2 << "Old, New\n"; - auto cmds = proxy.GetDepreciatedCommands(); + auto cmds = caller.GetDeprecatedCommands(); for (auto it : cmds) { fs2 << it.first << ", " << it.second << '\n'; } diff --git a/docs/src/hdf5fileformat.rst b/docs/src/hdf5fileformat.rst new file mode 100644 index 000000000..892cde3b2 --- /dev/null +++ b/docs/src/hdf5fileformat.rst @@ -0,0 +1,89 @@ + + +HDF5 File Format +================================ + +Compilation +------------- + +#. Compile the package with HDF5 option enabled + + #. Using cmk script: ./cmk.sh -hj9 -d [path of hdf5 dir] (-d is optional and for custom installation folder) + + #. Enable using cmake option **-DSLS_USE_HDF5=ON** and **-DCMAKE_INSTALL_PREFIX=/path/to/custom/hdf/installation** (optional). + + +Setup +------- + +#. Start Receiver process + +#. Load config file + +#. Set file format using command `fformat `_. + + .. code-block:: bash + + sls_detector_put fformat hdf5 + + +Master File +------------- + +* File Name: [fpath]/[fname]_master_[findex].h5 :ref:`Details here` + +* It contains :ref:`attributes` relevant to the acquisition. This can vary with detector type. + +.. code-block:: text + + / # Root level + |---> entry # entry group + | |---> data # data group + | |---> column # dataset of each sls_receiver_header member + | |---> data + | |---> detector header version + | |---> detector specific 1 + | |---> detector specific 2 + | |---> detector specific 3 + | |---> detector specific 4 + | |---> detector type + | |---> exp length or sub exposure time + | |---> frame number + | |---> mod id + | |---> packets caught + | |---> packets caught bit mask + | |---> row + | |---> timestamp + | |---> instrument # instrument group + | |---> beam # beam group + | |---> detector # detector group + | |---> Master File Attribute 1 # dataset of each master file attribute + | |---> Master File Attribute 2 + | |---> Master File Attribute 3 + | |---> Master File Attribute .. + | |---> sample # sample group + + +If more than 1 data file per frame: + * The dataset of each :ref:`**SLS Receiver Header** ` member is a virtual dataset. + * **data** dataset is a virtual dataset. + + +More details regarding master file attributes can be found :ref:`here`. + +Data File +----------- + +* File Name: [fpath]/[fname]_dx_fy_[findex].h5 :ref:`Details here` + + +Virtual Data File +------------------ + +* File Name: [fpath]/[fname]_virtual_[findex].h5 :ref:`Details here` + +* For multiple modules, a virtual file linking data from all the modules is created. The individual files are expected to be present. + +* It is linked in the master file. + + diff --git a/docs/src/index.rst b/docs/src/index.rst index 1bdca9dd1..2a333c03e 100644 --- a/docs/src/index.rst +++ b/docs/src/index.rst @@ -12,7 +12,7 @@ Welcome to slsDetectorPackage's documentation! For further documentation, visit the official page: https://www.psi.ch/en/detectors/documentation .. toctree:: - :maxdepth: 1 + :maxdepth: 3 :caption: Installation: installation @@ -82,6 +82,22 @@ Welcome to slsDetectorPackage's documentation! receivers slsreceiver +.. toctree:: + :caption: Receiver Files + :maxdepth: 3 + + fileformat + slsreceiverheaderformat + masterfileattributes + binaryfileformat + hdf5fileformat + +.. toctree:: + :caption: Receiver ZMQ Stream + :maxdepth: 2 + + zmqjsonheaderformat + .. toctree:: :caption: Troubleshooting diff --git a/docs/src/installation.rst b/docs/src/installation.rst index c8717851f..c63098425 100644 --- a/docs/src/installation.rst +++ b/docs/src/installation.rst @@ -1,9 +1,4 @@ -.. warning :: - - Before building from source make sure that you have the - :doc:`dependencies <../dependencies>` installed. If installing using conda, conda will - manage the dependencies. Avoid also installing packages with pip. - + .. _Installation: @@ -11,8 +6,18 @@ Installation =============== +One can either install pre-built binaries using conda or build from source. + +.. warning :: + + Before building from source make sure that you have the + :doc:`dependencies <../dependencies>` installed. If installing using conda, conda will + manage the dependencies. Avoid also installing packages with pip. + + + Install binaries using conda -------------------------------- +---------------------------------- Conda is not only useful to manage python environments but can also be used as a user space package manager. Dates in the tag (for eg. 2020.07.23.dev0) @@ -55,7 +60,7 @@ We have three different packages available: Build from source -------------------- +---------------------- 1. Download Source Code from github ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -75,8 +80,10 @@ Build from source 2. Build from Source ^^^^^^^^^^^^^^^^^^^^^^^^^^ +One can either build using cmake or use the in-built cmk.sh script. + Build using CMake -^^^^^^^^^^^^^^^^^^^^^^ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code-block:: bash @@ -103,7 +110,7 @@ Instead of the cmake command, one can use ccmake to get a list of options to con ccmake .. # choose the options - # first press [c] - configure (maybe multiple times till you see [g]) + # first press [c] - configure (until you see [g]) # then press [g] - generate @@ -123,7 +130,7 @@ Example cmake options Comment Build using in-built cmk.sh script -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code-block:: bash @@ -173,7 +180,7 @@ Build using in-built cmk.sh script Build on old distributions -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ If your linux distribution doesn't come with a C++11 compiler (gcc>4.8) then it's possible to install a newer gcc using conda and build the slsDetectorPackage @@ -198,9 +205,10 @@ using this compiler Build slsDetectorGui (Qt5) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1. Using pre-built binary on conda + .. code-block:: bash conda create -n myenv slsdetgui=7.0.0 @@ -208,13 +216,22 @@ Build slsDetectorGui (Qt5) 2. Using system installation on RHEL7 + .. code-block:: bash yum install qt5-qtbase-devel.x86_64 yum install qt5-qtsvg-devel.x86_64 +3. Using system installation on RHEL8 + + .. code-block:: bash + + yum install qt5-qtbase-devel.x86_64 + yum install qt5-qtsvg-devel.x86_64 + yum install expat-devel.x86_64 + +4. Using conda -3. Using conda .. code-block:: bash #Add channels for dependencies and our library @@ -249,7 +266,7 @@ Build slsDetectorGui (Qt5) Build this documentation -^^^^^^^^^^^^^^^^^^^^^^^^ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The documentation for the slsDetectorPackage is build using a combination of Doxygen, Sphinx and Breathe. The easiest way to install the dependencies @@ -272,16 +289,18 @@ is to use conda Pybind and Zeromq -^^^^^^^^^^^^^^^^^^^ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. _pybind for different slsDetectorPackage versions: -| **Pybind for Python** -| v8.0.0+: -| pybind11 (v2.11.0) is built -| * by default from tar file in repo (libs/pybind/v2.11.0.tar.gz) +| **Pybind11 for Python** +| v8.0.0+: +| pybind11 is built +| * by default from tar file in repo (libs/pybind/v2.1x.0.tar.gz) | * or use advanced option SLS_FETCH_PYBIND11_FROM_GITHUB [`link `__]. +| * v9.0.0+: pybind11 (v2.13.6) +| * v8.x.x : pybind11 (v2.11.0) | | v7.x.x: | pybind11 packaged into 'libs/pybind'. No longer a submodule. No need for "recursive" or "submodule update". @@ -312,7 +331,7 @@ Pybind and Zeromq | * or use advanced option SLS_FETCH_ZMQ_FROM_GITHUB [`link `__]. | | v7.x.x and older: -| zeromq must be installed and one can hint its location using +| zeromq-devel must be installed and one can hint its location using | * cmake option:'-DZeroMQ_HINT=/usr/lib64' or | * option '-q' in cmk.sh script: : ./cmk.sh -cbj5 -q /usr/lib64 | * 'zeromq' dependency added when installing using conda diff --git a/docs/src/masterfileattributes.rst b/docs/src/masterfileattributes.rst new file mode 100644 index 000000000..fb3aba0e5 --- /dev/null +++ b/docs/src/masterfileattributes.rst @@ -0,0 +1,408 @@ + +.. _master file attributes: +Master File Attributes +======================= + +These attributes are the same in binary and HDF5 file, but vary depending on detector type. + + +Eiger +^^^^^ + + +-----------------------+-------------------------------------------------+ + | **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 | + +-----------------------+-------------------------------------------------+ + | Dynamic Range | Bits per pixel | + +-----------------------+-------------------------------------------------+ + | Ten Giga | 10GbE enable for data | + +-----------------------+-------------------------------------------------+ + | Exptime | Exposure time | + +-----------------------+-------------------------------------------------+ + | Period | Period between frames | + +-----------------------+-------------------------------------------------+ + | Threshold Energy | Threshold energy | + +-----------------------+-------------------------------------------------+ + | Sub Exptime | Sub exposure time in 32 bit mode | + +-----------------------+-------------------------------------------------+ + | Sub Period | Sub period between frames in 32 bit mode | + +-----------------------+-------------------------------------------------+ + | Quad | Quad enable (hardware) | + +-----------------------+-------------------------------------------------+ + | Number of rows | Number of rows enabled for readout | + +-----------------------+-------------------------------------------------+ + | Rate Corrections | Rate Corrections | + +-----------------------+-------------------------------------------------+ + | Frames in File | Number of frames written to file by Receiver 0 | + +-----------------------+-------------------------------------------------+ + | Frame Header Format | Expected frame header format for the data files | + +-----------------------+-------------------------------------------------+ + + +Jungfrau +^^^^^^^^ + + +-----------------------+-------------------------------------------------+ + | **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 | + +-----------------------+-------------------------------------------------+ + | Number of UDP | Number of UDP Interfaces enabled per module | + | Interfaces | | + +-----------------------+-------------------------------------------------+ + | Number of rows | Number of rows enabled for readout | + +-----------------------+-------------------------------------------------+ + | Frames in File | Number of frames written to file by Receiver 0 | + +-----------------------+-------------------------------------------------+ + | Frame Header Format | Expected frame header format for the data files | + +-----------------------+-------------------------------------------------+ + +Gotthard II +^^^^^^^^^^^^ + + +-----------------------+-------------------------------------------------+ + | **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 | + +-----------------------+-------------------------------------------------+ + | 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 | + +-----------------------+-------------------------------------------------+ + +Mythen3 +^^^^^^^ + + + +-----------------------+-------------------------------------------------+ + | **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 | + +-----------------------+-------------------------------------------------+ + | Dynamic Range | Bits per pixel | + +-----------------------+-------------------------------------------------+ + | Ten Giga | 10GbE enable for data | + +-----------------------+-------------------------------------------------+ + | Period | Period between frames | + +-----------------------+-------------------------------------------------+ + | Counter Mask | Mask of counters enabled | + +-----------------------+-------------------------------------------------+ + | Exptime1 | Exposure time of counter 1 | + +-----------------------+-------------------------------------------------+ + | Exptime2 | Exposure time of counter 2 | + +-----------------------+-------------------------------------------------+ + | Exptime3 | Exposure time of counter 3 | + +-----------------------+-------------------------------------------------+ + | GateDelay1 | Gate delay of counter 1 | + +-----------------------+-------------------------------------------------+ + | GateDelay2 | Gate delay of counter 2 | + +-----------------------+-------------------------------------------------+ + | GateDelay3 | Gate delay of counter 3 | + +-----------------------+-------------------------------------------------+ + | Gates | Number of gates | + +-----------------------+-------------------------------------------------+ + | Threshold energies | Threshold energy of all 3 counters | + +-----------------------+-------------------------------------------------+ + | Frames in File | Number of frames written to file by Receiver 0 | + +-----------------------+-------------------------------------------------+ + | Frame Header Format | Expected frame header format for the data files | + +-----------------------+-------------------------------------------------+ + + +Moench +^^^^^^ + + +-----------------------+-------------------------------------------------+ + | **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 | + +-----------------------+-------------------------------------------------+ + | Number of UDP | Number of UDP Interfaces enabled per module | + | Interfaces | | + +-----------------------+-------------------------------------------------+ + | Number of rows | Number of rows enabled for readout | + +-----------------------+-------------------------------------------------+ + | Frames in File | Number of frames written to file by Receiver 0 | + +-----------------------+-------------------------------------------------+ + | 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 +^^^^^^^^^^^^^^^ + + + +-----------------------+-------------------------------------------------+ + | **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 | + +-----------------------+-------------------------------------------------+ + | Ten Giga | Ten giga enable | + +-----------------------+-------------------------------------------------+ + | ADC Mask | Mask of channels enabled in ADC | + +-----------------------+-------------------------------------------------+ + | Analog Flag | Analog readout enable | + +-----------------------+-------------------------------------------------+ + | Analog Samples | Number of analog samples | + +-----------------------+-------------------------------------------------+ + | Digital Flag | Digital readout enable | + +-----------------------+-------------------------------------------------+ + | Digital Samples | Number of digital samples | + +-----------------------+-------------------------------------------------+ + | Dbit Offset | Digital offset of valid data in bytes | + +-----------------------+-------------------------------------------------+ + | Dbit Bitset | Digital 64 bit mask of bits enabled in receiver | + +-----------------------+-------------------------------------------------+ + | Transceiver Mask | Mask of channels enabled in Transceiver | + +-----------------------+-------------------------------------------------+ + | Transceiver Flag | Transceiver readout enable | + +-----------------------+-------------------------------------------------+ + | Transceiver Samples | Number of transceiver samples | + +-----------------------+-------------------------------------------------+ + | Frames in File | Number of frames written to file by Receiver 0 | + +-----------------------+-------------------------------------------------+ + | Frame Header Format | Expected frame header format for the data files | + +-----------------------+-------------------------------------------------+ \ No newline at end of file diff --git a/docs/src/pygettingstarted.rst b/docs/src/pygettingstarted.rst index 5caf8723e..547d597e0 100644 --- a/docs/src/pygettingstarted.rst +++ b/docs/src/pygettingstarted.rst @@ -6,7 +6,7 @@ Getting Started Which Python? -------------------- -We require at least Python 3.6 and strongly recommended that you don't use the system +We require at least Python 3.8 and strongly recommended that you don't use the system Python installation. The examples in this documentation uses `conda `_ since it provides good support also for non Python packages but there are also other alternatives like, pyenv. diff --git a/docs/src/slsreceiver.rst b/docs/src/slsreceiver.rst index 0cccaf012..0413eb10a 100644 --- a/docs/src/slsreceiver.rst +++ b/docs/src/slsreceiver.rst @@ -91,245 +91,6 @@ Client Commands sls_detector_get -h rx_framescaught -ZMQ: Json Header Format ------------------------- - - -**Change in field names from slsDetectorPackage v6.x.x to v7.0.0** - -* detSpec1 <- bunchId -* detSpec2 <- reserved -* detSpec3 <- debug -* detSpec4 <- roundRNumber - - -**Format** - - .. code-block:: bash - - { - "jsonversion": unsigned int, - "bitmode": unsigned int, - "fileIndex": unsigned long int, - "detshape": [ - unsigned int, - unsigned int - ], - "shape": [ - unsigned int, - unsigned int - ], - "size": unsigned int, - "acqIndex": unsigned long int, - "frameIndex": unsigned long int, - "progress": double, - "fname": string, - "data": unsigned int, - "completeImage": unsigned int, - - "frameNumber": unsigned long long int, - "expLength": unsigned int, - "packetNumber": unsigned int, - "detSpec1": unsigned long int, - "timestamp": unsigned long int, - "modId": unsigned int, - "row": unsigned int, - "column": unsigned int, - "detSpec2": unsigned int, - "detSpec3": unsigned int, - "detSpec4": unsigned int, - "detType": unsigned int, - "version": unsigned int, - - "flipRows": unsigned int, - "quad": unsigned int, - "addJsonHeader": { - string : string - } - } - - +--------------+----------------------------------------------+ - | Field | Description | - +--------------+----------------------------------------------+ - | jsonversion | Version of the json header. | - | | Value at 4 for v6.x.x and v7.x.x | - +--------------+----------------------------------------------+ - | bitmode | Bits per pixel [4|8|16|32] | - +--------------+----------------------------------------------+ - | fileIndex | Current file acquisition index | - +--------------+----------------------------------------------+ - | detshape | Geometry of the entire detector | - +--------------+----------------------------------------------+ - | shape | Geometry of the current port streamed out | - +--------------+----------------------------------------------+ - | size | Size of image of current port in bytesout | - +--------------+----------------------------------------------+ - | acqIndex | Frame number from the detector (redundant) | - +--------------+----------------------------------------------+ - | frameIndex | Frame number of current acquisition | - | | (Starting at 0) | - +--------------+----------------------------------------------+ - | progress | Progress of current acquisition in % | - +--------------+----------------------------------------------+ - | fname | Current file name | - +--------------+----------------------------------------------+ - | data | 1 if there is data following | - | | 0 if dummy header | - +--------------+----------------------------------------------+ - | completeImage| 1 if no missing packets for this frame | - | | in this port, else 0 | - +--------------+----------------------------------------------+ - | frameNumber | Frame number | - | | [From detector udp header] | - +--------------+----------------------------------------------+ - | expLength | subframe number (32 bit eiger) | - | | or real time exposure time in 100ns (others) | - | | [From detector udp header] | - +--------------+----------------------------------------------+ - | packetNumber | Number of packets caught for that frame | - +--------------+----------------------------------------------+ - | detSpec1 | See :ref:`here` | - | | [From detector udp header] | - +--------------+----------------------------------------------+ - | timestamp | Timestamp with 10 MHz clock | - | | [From detector udp header] | - +--------------+----------------------------------------------+ - | modId | Module Id | - | | [From detector udp header] | - +--------------+----------------------------------------------+ - | row | Row number in detector | - | | [From detector udp header] | - +--------------+----------------------------------------------+ - | column | Column number in detector | - | | [From detector udp header] | - +--------------+----------------------------------------------+ - | detSpec2 | See :ref:`here` | - | | [From detector udp header] | - +--------------+----------------------------------------------+ - | detSpec3 | See :ref:`here` | - | | [From detector udp header] | - +--------------+----------------------------------------------+ - | detSpec4 | See :ref:`here` | - | | [From detector udp header] | - +--------------+----------------------------------------------+ - | detType | Detector type enum | - | detSpec3 | See :ref:`Detector enum` | - | | [From detector udp header] | - +--------------+----------------------------------------------+ - | version | Detector header version. At 2 | - | | [From detector udp header] | - +--------------+----------------------------------------------+ - | flipRows | 1 if rows should be flipped. | - | | Usually for Eiger bottom. | - +--------------+----------------------------------------------+ - | quad | 1 if its an Eiger quad. | - +--------------+----------------------------------------------+ - | addJsonHeader| Optional custom parameters that is required | - | | for processing code. | - +--------------+----------------------------------------------+ - - -SLS Receiver Header Format --------------------------- - -It is 112 bytes and consists of: - * 48 bytes of the SLS Detector Header (described in :ref:`the current detector header `) - * 64 bytes of packet mask - -.. code-block:: cpp - - typedef struct { - uint64_t frameNumber; - uint32_t expLength; - uint32_t packetNumber; - uint64_t detSpec1; - uint64_t timestamp; - uint16_t modId; - uint16_t row; - uint16_t column; - uint16_t detSpec2; - uint32_t detSpec3; - uint16_t detSpec4; - uint8_t detType; - uint8_t version; - } sls_detector_header; - - struct sls_receiver_header { - sls_detector_header detHeader; /**< is the detector header */ - sls_bitset packetsMask; /**< is the packets caught bit mask */ - }; - - -.. note :: - - | The packetNumber in the SLS Receiver Header will be modified to number of packets caught by receiver for that frame. For eg. Jungfrau will have 128 packets per frame. If it is less, then this is a partial frame due to missing packets. - - | Furthermore, the bit mask will specify which packets have been received. - - - - -File format --------------- - -Master file is in json format. - -The file name format is [fpath]/[fname]_dx_fy_[findex].raw, where x is module index and y is file index. **fname** is file name prefix and by default "run". **fpath** is '/' by default. - - -Each acquisition will have an increasing acquisition index or findex (if file write enabled). This can be retrieved by using **findex** command. - - -Each acquisition can have multiple files (the file index number **y**), with **rx_framesperfile** being the maximum number of frames per file. The default varies for each detector type. - - -Some file name examples: - - .. code-block:: bash - - # first file - path-to-file/run_d0_f0_0.raw - - # second file after reaching max frames in first file - path-to-file/run_d0_f1_0.raw - - # second acquisition, first file - path-to-file/run_d0_f0_1.raw - - -Each acquisition will create a master file that can be enabled/disabled using **fmaster**. This should have parameters relevant to the acquisition. - - -**Binary file format** - -This is the default file format. - - -Each data file will consist of frames, each consisting of slsReceiver Header followed by data for 1 frame. - - -Master file is of ASCII format and will also include the format of the slsReceiver Header. - - -**HDF5 file formats** - -#. Compile the package with HDF5 option enabled - - #. Using cmk script: ./cmk.sh -hj9 -d [path of hdf5 dir] - - #. Enable using cmake **-DCMAKE_INSTALL_PREFIX=/path/to/hdf/installation** and **-DSLS_USE_HDF5=ON** - -#. Start Receiver process - -#. Load config file - -#. Set file format from client or in config file - .. code-block:: bash - - sls_detector_put fformat hdf5 - - -| For multiple, modules, a virtual file linking all the modules is created. Both the data files and virtual files are linked in the master file. Performance diff --git a/docs/src/slsreceiverheaderformat.rst b/docs/src/slsreceiverheaderformat.rst new file mode 100644 index 000000000..9449db88f --- /dev/null +++ b/docs/src/slsreceiverheaderformat.rst @@ -0,0 +1,40 @@ + +.. _sls receiver header format: + +SLS Receiver Header Format +==================================================== + +It is 112 bytes and consists of: + * 48 bytes of the SLS Detector Header + * 64 bytes of packet mask + +.. code-block:: cpp + + typedef struct { + uint64_t frameNumber; + uint32_t expLength; + uint32_t packetNumber; + uint64_t detSpec1; + uint64_t timestamp; + uint16_t modId; + uint16_t row; + uint16_t column; + uint16_t detSpec2; + uint32_t detSpec3; + uint16_t detSpec4; + uint8_t detType; + uint8_t version; + } sls_detector_header; + + struct sls_receiver_header { + sls_detector_header detHeader; /**< is the detector header */ + sls_bitset packetsMask; /**< is the packets caught bit mask */ + }; + + + +| **sls_detector_header** (described in :ref:`the current detector header `) + +| The **packetNumber** from detector UDP header is modified in **sls_receiver_header** to number of packets caught by receiver for that frame and the bit mask for each packet caught is the **packetsMask**. The packetsMask is a total of 512 bits due to the largest number of packets per frame among our detectors. + +| For eg. Jungfrau has 128 packets per frame. If **packetNumeber** is 128, then this frame is complete. If it is 127 or less, it is a partial frame due to missing packets. If one would still like to use it, the **packetsMask** will specify which packet has been received or is missing. diff --git a/docs/src/troubleshooting.rst b/docs/src/troubleshooting.rst index 65214846b..041f34b02 100644 --- a/docs/src/troubleshooting.rst +++ b/docs/src/troubleshooting.rst @@ -394,6 +394,14 @@ 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 +-------- + +Detector status is waiting even in auto timing mode +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Check if the control board or the flat band cable is connected properly. If not, connect them properly and try again. + + Jungfrau --------- diff --git a/docs/src/udpheader.rst b/docs/src/udpheader.rst index 04f3a5a6a..56e59a387 100644 --- a/docs/src/udpheader.rst +++ b/docs/src/udpheader.rst @@ -3,7 +3,7 @@ Format ======= -The UDP data format for the packets consist of a common header for all detectors, followed by the data for that one packet. +The UDP data format for the packets consist of a common header of 48 bytes for all detectors, followed by the data for that one packet. Current Version @@ -11,6 +11,25 @@ Current Version **v2.0 (slsDetectorPackage v7.0.0+)** +.. code-block:: cpp + + typedef struct { + uint64_t frameNumber; + uint32_t expLength; + uint32_t packetNumber; + uint64_t detSpec1; + uint64_t timestamp; + uint16_t modId; + uint16_t row; + uint16_t column; + uint16_t detSpec2; + uint32_t detSpec3; + uint16_t detSpec4; + uint8_t detType; + uint8_t version; + } sls_detector_header; + + .. table:: <---------------------------------------------------- 8 bytes per row ---------------------------------------------> :align: center :widths: 30,30,30,15,15 @@ -63,6 +82,8 @@ Description * **version**: current version of the detector header (0x2). +.. _detector enum: + Detector Enum -------------- diff --git a/docs/src/zmqjsonheaderformat.rst b/docs/src/zmqjsonheaderformat.rst new file mode 100644 index 000000000..c898f97c2 --- /dev/null +++ b/docs/src/zmqjsonheaderformat.rst @@ -0,0 +1,137 @@ +ZMQ: Json Header Format +======================== + + +**Change in field names from slsDetectorPackage v6.x.x to v7.0.0** + +* detSpec1 <- bunchId +* detSpec2 <- reserved +* detSpec3 <- debug +* detSpec4 <- roundRNumber + + +**Format** + + .. code-block:: bash + + { + "jsonversion": unsigned int, + "bitmode": unsigned int, + "fileIndex": unsigned long int, + "detshape": [ + unsigned int, + unsigned int + ], + "shape": [ + unsigned int, + unsigned int + ], + "size": unsigned int, + "acqIndex": unsigned long int, + "frameIndex": unsigned long int, + "progress": double, + "fname": string, + "data": unsigned int, + "completeImage": unsigned int, + + "frameNumber": unsigned long long int, + "expLength": unsigned int, + "packetNumber": unsigned int, + "detSpec1": unsigned long int, + "timestamp": unsigned long int, + "modId": unsigned int, + "row": unsigned int, + "column": unsigned int, + "detSpec2": unsigned int, + "detSpec3": unsigned int, + "detSpec4": unsigned int, + "detType": unsigned int, + "version": unsigned int, + + "flipRows": unsigned int, + "quad": unsigned int, + "addJsonHeader": { + string : string + } + } + + +--------------+----------------------------------------------+ + | Field | Description | + +--------------+----------------------------------------------+ + | jsonversion | Version of the json header. | + | | Value at 4 for v6.x.x and v7.x.x | + +--------------+----------------------------------------------+ + | bitmode | Bits per pixel [4|8|16|32] | + +--------------+----------------------------------------------+ + | fileIndex | Current file acquisition index | + +--------------+----------------------------------------------+ + | detshape | Geometry of the entire detector | + +--------------+----------------------------------------------+ + | shape | Geometry of the current port streamed out | + +--------------+----------------------------------------------+ + | size | Size of image of current port in bytesout | + +--------------+----------------------------------------------+ + | acqIndex | Frame number from the detector (redundant) | + +--------------+----------------------------------------------+ + | frameIndex | Frame number of current acquisition | + | | (Starting at 0) | + +--------------+----------------------------------------------+ + | progress | Progress of current acquisition in % | + +--------------+----------------------------------------------+ + | fname | Current file name | + +--------------+----------------------------------------------+ + | data | 1 if there is data following | + | | 0 if dummy header | + +--------------+----------------------------------------------+ + | completeImage| 1 if no missing packets for this frame | + | | in this port, else 0 | + +--------------+----------------------------------------------+ + | frameNumber | Frame number | + | | [From detector udp header] | + +--------------+----------------------------------------------+ + | expLength | subframe number (32 bit eiger) | + | | or real time exposure time in 100ns (others) | + | | [From detector udp header] | + +--------------+----------------------------------------------+ + | packetNumber | Number of packets caught for that frame | + +--------------+----------------------------------------------+ + | detSpec1 | See :ref:`here` | + | | [From detector udp header] | + +--------------+----------------------------------------------+ + | timestamp | Timestamp with 10 MHz clock | + | | [From detector udp header] | + +--------------+----------------------------------------------+ + | modId | Module Id | + | | [From detector udp header] | + +--------------+----------------------------------------------+ + | row | Row number in detector | + | | [From detector udp header] | + +--------------+----------------------------------------------+ + | column | Column number in detector | + | | [From detector udp header] | + +--------------+----------------------------------------------+ + | detSpec2 | See :ref:`here` | + | | [From detector udp header] | + +--------------+----------------------------------------------+ + | detSpec3 | See :ref:`here` | + | | [From detector udp header] | + +--------------+----------------------------------------------+ + | detSpec4 | See :ref:`here` | + | | [From detector udp header] | + +--------------+----------------------------------------------+ + | detType | Detector type enum | + | detSpec3 | See :ref:`Detector enum` | + | | [From detector udp header] | + +--------------+----------------------------------------------+ + | version | Detector header version. At 2 | + | | [From detector udp header] | + +--------------+----------------------------------------------+ + | flipRows | 1 if rows should be flipped. | + | | Usually for Eiger bottom. | + +--------------+----------------------------------------------+ + | quad | 1 if its an Eiger quad. | + +--------------+----------------------------------------------+ + | addJsonHeader| Optional custom parameters that is required | + | | for processing code. | + +--------------+----------------------------------------------+ + diff --git a/libs/pybind11/v2.11.0.tar.gz b/libs/pybind11/v2.11.0.tar.gz deleted file mode 100644 index ef7cf6f55..000000000 Binary files a/libs/pybind11/v2.11.0.tar.gz and /dev/null differ diff --git a/libs/pybind11/v2.13.6.tar.gz b/libs/pybind11/v2.13.6.tar.gz new file mode 100644 index 000000000..7dcec1d75 Binary files /dev/null and b/libs/pybind11/v2.13.6.tar.gz differ diff --git a/psi-pmodules/DetectorSoftware/slsDetectorPackage/files/variants b/psi-pmodules/DetectorSoftware/slsDetectorPackage/files/variants index 27216a3b2..5a33d75dc 100644 --- a/psi-pmodules/DetectorSoftware/slsDetectorPackage/files/variants +++ b/psi-pmodules/DetectorSoftware/slsDetectorPackage/files/variants @@ -3,3 +3,12 @@ slsDetectorPackage/7.0.1_rh7 stable cmake/3.15.5 zeromq/4.3.4 Qt/5.12.10 slsDetectorPackage/7.0.1_rh8 stable cmake/3.15.5 zeromq/4.3.4 Qt/5.12.10 slsDetectorPackage/7.0.2_rh7 stable cmake/3.15.5 zeromq/4.3.4 Qt/5.12.10 slsDetectorPackage/7.0.2_rh8 stable cmake/3.15.5 zeromq/4.3.4 Qt/5.12.10 +slsDetectorPackage/7.0.3_rh7 stable cmake/3.15.5 zeromq/4.3.4 Qt/5.12.10 +slsDetectorPackage/7.0.3_rh8 stable cmake/3.15.5 zeromq/4.3.4 Qt/5.12.10 +slsDetectorPackage/8.0.0_rh7 stable cmake/3.15.5 Qt/5.12.10 +slsDetectorPackage/8.0.0_rh8 stable cmake/3.15.5 Qt/5.12.10 +slsDetectorPackage/8.0.1_rh7 stable cmake/3.15.5 Qt/5.12.10 +slsDetectorPackage/8.0.1_rh8 stable cmake/3.15.5 Qt/5.12.10 +slsDetectorPackage/8.0.2_rh7 stable cmake/3.15.5 Qt/5.12.10 +slsDetectorPackage/8.0.2_rh8 stable cmake/3.15.5 Qt/5.12.10 + diff --git a/pyctbgui/.github/workflows/build-and-test-inplace.yml b/pyctbgui/.github/workflows/build-and-test-inplace.yml new file mode 100644 index 000000000..465bfcd13 --- /dev/null +++ b/pyctbgui/.github/workflows/build-and-test-inplace.yml @@ -0,0 +1,35 @@ +name: Build inplace, run tests and linting + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [ "3.10", "3.11"] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install ".[dev]" + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Build C extension + run: | + make + - name: Run tests using pytest + run: | + make test + - name: check code formatting + run: | + make check_format + - name: lint the code with ruff + run: | + make lint \ No newline at end of file diff --git a/pyctbgui/.gitignore b/pyctbgui/.gitignore new file mode 100644 index 000000000..53456bd67 --- /dev/null +++ b/pyctbgui/.gitignore @@ -0,0 +1,133 @@ +nohup.out +.idea/ +tests/.tmp +run_* +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ diff --git a/pyctbgui/.pre-commit-config.yaml b/pyctbgui/.pre-commit-config.yaml new file mode 100644 index 000000000..f45532776 --- /dev/null +++ b/pyctbgui/.pre-commit-config.yaml @@ -0,0 +1,18 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: +- repo: https://github.com/google/yapf + rev: v0.40.1 + hooks: + - id: yapf + name: yapf + language: python + entry: yapf + args: [-i,--style,pyproject.toml] + types: [python] + +- repo: https://github.com/astral-sh/ruff-pre-commit + # Ruff version. + rev: v0.0.285 + hooks: + - id: ruff diff --git a/pyctbgui/CtbGui b/pyctbgui/CtbGui new file mode 100755 index 000000000..0312b6d61 --- /dev/null +++ b/pyctbgui/CtbGui @@ -0,0 +1,11 @@ +#!/usr/bin/env python3 +from PyQt5 import QtWidgets +import sys + +from pyctbgui.ui import MainWindow + +if __name__ == "__main__": + app = QtWidgets.QApplication(sys.argv) + main = MainWindow() + main.show() + app.exec_() diff --git a/pyctbgui/MANIFEST.in b/pyctbgui/MANIFEST.in new file mode 100644 index 000000000..f0aa8ba82 --- /dev/null +++ b/pyctbgui/MANIFEST.in @@ -0,0 +1,2 @@ +include pyctbgui/ui/*.ui +recursive-include src *.c *.h \ No newline at end of file diff --git a/pyctbgui/Makefile b/pyctbgui/Makefile new file mode 100644 index 000000000..f1b26ec09 --- /dev/null +++ b/pyctbgui/Makefile @@ -0,0 +1,39 @@ +# TODO! Add support for making the pkg? +# Which tests should we have? + +default: ext + +ext: ## [DEFAULT] build c extension in place + rm -rf build/ pyctbgui/_decoder.cpython* + python setup.py build_ext --inplace + +clean: ## Remove the build folder and the shared library + rm -rf build/ pyctbgui/_decoder.cpython* + +test: ## Run unit tests using pytest + python -m pytest -v tests/unit + +test_gui: ## Run E2E tests using pytest + python -m pytest -v tests/gui + +setup_gui_test: ## Setup the environment for the E2E tests + ctbDetectorServer_virtual > /tmp/simulator.log 2>&1 & + slsReceiver > /tmp/slsReceiver.log 2>&1 & + sleep 3 + sls_detector_put config tests/gui/data/simulator.config + +killall: ## Kill all the processes started by setup_gui_test + killall slsReceiver ctbDetectorServer_virtual + + +lint: ## run ruff linter to check formatting errors + @ruff check tests pyctbgui *.py && echo "Ruff checks passed ✅" + +format: ## format code inplace using style in pyproject.toml + yapf --style pyproject.toml -m -r -i tests pyctbgui *.py + +check_format: ## Check if source is formatted properly + yapf --style pyproject.toml -r -d tests pyctbgui *.py + +help: # from compiler explorer + @grep -E '^[0-9a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' diff --git a/pyctbgui/README.md b/pyctbgui/README.md new file mode 100644 index 000000000..d38bdfb40 --- /dev/null +++ b/pyctbgui/README.md @@ -0,0 +1,31 @@ +# New Chip Test Board Gui using Python +Prototype for a new python based GUI for the Chip Test Board + + +## Getting started + +```bash +git clone https://github.com/slsdetectorgroup/pyctbgui.git +cd pyctbgui +make #compiles the c extension inplace +./CtbGui +``` + + +## Display help for the Makefile + +``` +$ make help +check_format Check if source is formatted properly +clean Remove the build folder and the shared library +ext [DEFAULT] build c extension in place +format format code inplace using style in pyproject.toml +lint run ruff linter to check formatting errors +test Run unit tests using pytest +``` + + +## setup pre-commit hooks +``` +pre-commit install +``` diff --git a/pyctbgui/client.py b/pyctbgui/client.py new file mode 100644 index 000000000..a8fba1bab --- /dev/null +++ b/pyctbgui/client.py @@ -0,0 +1,73 @@ +import json +import zmq +import numpy as np + +from slsdet import Detector +import matplotlib.pyplot as plt + +det = Detector() + +zmqIp = det.zmqip +zmqport = det.zmqport +zmq_stream = det.rx_zmqstream + + +def zmq_receiver(): + context = zmq.Context() + socket = context.socket(zmq.SUB) + socket.connect(f"tcp://{zmqIp}:{zmqport}") + socket.subscribe("") + + while True: + msg = socket.recv_multipart() + if len(msg) == 2: + header, data = msg + jsonHeader = json.loads(header) + print(jsonHeader) + print(f'Data size: {len(data)}') + data_array = np.array(np.frombuffer(data, dtype=np.uint16)) + break + return data_array + + +def analog(data_array): + adc_numbers = [ + 9, 8, 11, 10, 13, 12, 15, 14, 1, 0, 3, 2, 5, 4, 7, 6, 23, 22, 21, 20, 19, 18, 17, 16, 31, 30, 29, 28, 27, 26, + 25, 24 + ] + + n_pixels_per_sc = 5000 + + sc_width = 25 + analog_frame = np.zeros((400, 400)) + order_sc = np.zeros((400, 400)) + + for n_pixel in range(n_pixels_per_sc): + #these_dbits = int(digital_data[n_pixel]) + + for i_sc, adc_nr in enumerate(adc_numbers): + # ANALOG + col = ((adc_nr % 16) * sc_width) + (n_pixel % sc_width) + if i_sc < 16: + row = 199 - int(n_pixel / sc_width) + else: + row = 200 + int(n_pixel / sc_width) + + index_min = n_pixel * 32 + i_sc + + pixel_value = data_array[index_min] + analog_frame[row, col] = pixel_value + order_sc[row, col] = i_sc + return analog_frame + + +fig, ax = plt.subplots() +data = analog(data_array=zmq_receiver()) +im = ax.imshow(data) +ax.invert_yaxis() +fig.colorbar(im) +plt.show() +# pg.image(data, title="test") + +# if __name__ == '__main__': +# pg.QtWidgets.QApplication.exec_() diff --git a/pyctbgui/pyctbgui/__init__.py b/pyctbgui/pyctbgui/__init__.py new file mode 100644 index 000000000..561a39e95 --- /dev/null +++ b/pyctbgui/pyctbgui/__init__.py @@ -0,0 +1,2 @@ +from .utils.defines import Defines as defs +from .utils import bit_utils, alias_utility diff --git a/pyctbgui/pyctbgui/services/ADC.py b/pyctbgui/pyctbgui/services/ADC.py new file mode 100644 index 000000000..f470fc917 --- /dev/null +++ b/pyctbgui/pyctbgui/services/ADC.py @@ -0,0 +1,401 @@ +import logging +import typing +from functools import partial +from pathlib import Path + +import numpy as np +from PyQt5 import QtWidgets, uic +import pyqtgraph as pg +from pyqtgraph import LegendItem + +from pyctbgui.utils import decoder +from pyctbgui.utils.bit_utils import bit_is_set, manipulate_bit +from pyctbgui.utils.defines import Defines +import pyctbgui.utils.pixelmap as pm +from pyctbgui.utils.recordOrApplyPedestal import recordOrApplyPedestal + +if typing.TYPE_CHECKING: + from pyctbgui.services import AcquisitionTab, PlotTab + + +class AdcTab(QtWidgets.QWidget): + + def __init__(self, parent, *args, **kwargs): + super().__init__(parent, *args, **kwargs) + uic.loadUi(Path(__file__).parent.parent / 'ui' / "adc.ui", parent) + self.view = parent + self.mainWindow = None + self.det = None + self.plotTab: PlotTab | None = None + self.acquisitionTab: AcquisitionTab | None = None + self.legend: LegendItem | None = None + self.logger = logging.getLogger('AdcTab') + + def setup_ui(self): + self.plotTab = self.mainWindow.plotTab + self.acquisitionTab = self.mainWindow.acquisitionTab + for i in range(Defines.adc.count): + self.setADCButtonColor(i, self.plotTab.getRandomColor()) + self.initializeAllAnalogPlots() + + self.legend = self.mainWindow.plotAnalogWaveform.getPlotItem().legend + self.legend.clear() + # subscribe to toggle legend + self.plotTab.subscribeToggleLegend(self.updateLegend) + + def initializeAllAnalogPlots(self): + self.mainWindow.plotAnalogWaveform = pg.plot() + self.mainWindow.plotAnalogWaveform.addLegend(colCount=Defines.colCount) + self.mainWindow.verticalLayoutPlot.addWidget(self.mainWindow.plotAnalogWaveform, 1) + self.mainWindow.analogPlots = {} + waveform = np.zeros(1000) + for i in range(Defines.adc.count): + pen = pg.mkPen(color=self.getADCButtonColor(i), width=1) + legendName = getattr(self.view, f"labelADC{i}").text() + self.mainWindow.analogPlots[i] = self.mainWindow.plotAnalogWaveform.plot(waveform, + pen=pen, + name=legendName) + self.mainWindow.analogPlots[i].hide() + + self.mainWindow.plotAnalogImage = pg.ImageView() + self.mainWindow.nAnalogRows = 0 + self.mainWindow.nAnalogCols = 0 + self.mainWindow.analog_frame = np.zeros((self.mainWindow.nAnalogRows, self.mainWindow.nAnalogCols)) + self.mainWindow.plotAnalogImage.getView().invertY(False) + self.mainWindow.plotAnalogImage.setImage(self.mainWindow.analog_frame) + self.mainWindow.verticalLayoutPlot.addWidget(self.mainWindow.plotAnalogImage, 2) + + def connect_ui(self): + for i in range(Defines.adc.count): + getattr(self.view, f"checkBoxADC{i}Inv").stateChanged.connect(partial(self.setADCInv, i)) + getattr(self.view, f"checkBoxADC{i}En").stateChanged.connect(partial(self.setADCEnable, i)) + getattr(self.view, f"checkBoxADC{i}Plot").stateChanged.connect(partial(self.setADCEnablePlot, i)) + getattr(self.view, f"pushButtonADC{i}").clicked.connect(partial(self.selectADCColor, i)) + self.view.checkBoxADC0_15En.stateChanged.connect(partial(self.setADCEnableRange, 0, Defines.adc.half)) + self.view.checkBoxADC16_31En.stateChanged.connect( + partial(self.setADCEnableRange, Defines.adc.half, Defines.adc.count)) + self.view.checkBoxADC0_15Plot.stateChanged.connect(partial(self.setADCEnablePlotRange, 0, Defines.adc.half)) + self.view.checkBoxADC16_31Plot.stateChanged.connect( + partial(self.setADCEnablePlotRange, Defines.adc.half, Defines.adc.count)) + self.view.checkBoxADC0_15Inv.stateChanged.connect(partial(self.setADCInvRange, 0, Defines.adc.half)) + self.view.checkBoxADC16_31Inv.stateChanged.connect( + partial(self.setADCInvRange, Defines.adc.half, Defines.adc.count)) + self.view.lineEditADCInversion.editingFinished.connect(self.setADCInvReg) + self.view.lineEditADCEnable.editingFinished.connect(self.setADCEnableReg) + + def refresh(self): + self.updateADCNames() + self.updateADCInv() + self.updateADCEnable() + + # ADCs Tab functions + + def getEnabledPlots(self): + """ + return plots that are shown (checkBoxADC#Plot is checked) + """ + enabledPlots = [] + self.legend.clear() + for i in range(Defines.adc.count): + if getattr(self.view, f'checkBoxADC{i}Plot').isChecked(): + plotName = getattr(self.view, f"labelADC{i}").text() + enabledPlots.append((self.mainWindow.analogPlots[i], plotName)) + return enabledPlots + + def updateLegend(self): + """ + update the legend for the ADC waveform plot + should be called after checking or unchecking plot checkbox + """ + if not self.mainWindow.showLegend: + self.legend.clear() + else: + for plot, name in self.getEnabledPlots(): + self.legend.addItem(plot, name) + + def updateADCNames(self): + """ + get adc names from detector and update them in the UI + """ + for i, adc_name in enumerate(self.det.getAdcNames()): + getattr(self.view, f"labelADC{i}").setText(adc_name) + + def processWaveformData(self, data: bytes, aSamples: int) -> dict[str, np.ndarray]: + """ + view function + plots processed waveform data + @param data: raw waveform data + @param aSamples: analog samples + @return: waveform dict returned to handle it for saving the output + """ + + waveforms = {} + analog_array = self._processWaveformData(data, aSamples, self.mainWindow.nADCEnabled) + idx = 0 + for i in range(Defines.adc.count): + checkBoxPlot = getattr(self.view, f"checkBoxADC{i}Plot") + checkBoxEn = getattr(self.view, f"checkBoxADC{i}En") + + if checkBoxEn.isChecked() and checkBoxPlot.isChecked(): + waveform = analog_array[:, idx] + idx += 1 + self.mainWindow.analogPlots[i].setData(waveform) + plotName = getattr(self.view, f"labelADC{i}").text() + waveforms[plotName] = waveform + return waveforms + + @recordOrApplyPedestal + def _processWaveformData(self, data: bytes, aSamples: int, nADCEnabled: int) -> np.ndarray: + """ + model function + processes raw waveform data + @param data: raw waveform data + @param aSamples: analog samples + @param nADCEnabled: number of enabled ADCs + @return: processed waveform data + """ + analog_array = np.array(np.frombuffer(data, dtype=np.uint16, count=nADCEnabled * aSamples)) + return analog_array.reshape(-1, nADCEnabled) + + def processImageData(self, data, aSamples): + """ + process the raw receiver data for analog image + data: raw analog image + aSamples: analog samples + """ + # get zoom state + viewBox = self.mainWindow.plotAnalogImage.getView() + state = viewBox.getState() + try: + self.mainWindow.analog_frame = self._processImageData(data, aSamples, self.mainWindow.nADCEnabled) + self.plotTab.ignoreHistogramSignal = True + self.mainWindow.plotAnalogImage.setImage(self.mainWindow.analog_frame.T) + except Exception: + self.logger.exception('Exception Caught') + self.mainWindow.statusbar.setStyleSheet("color:red") + message = f'Warning: Invalid size for Analog Image. Expected' \ + f' {self.mainWindow.nAnalogRows * self.mainWindow.nAnalogCols} ' \ + f'size, got {self.mainWindow.analog_frame.size} instead.' + self.acquisitionTab.updateCurrentFrame('Invalid Image') + + self.mainWindow.statusbar.showMessage(message) + print(message) + + self.plotTab.setFrameLimits(self.mainWindow.analog_frame) + + # keep the zoomed in state (not 1st image) + if self.mainWindow.firstAnalogImage: + self.mainWindow.firstAnalogImage = False + else: + viewBox.setState(state) + return self.mainWindow.analog_frame.T + + @recordOrApplyPedestal + def _processImageData(self, data, aSamples, nADCEnabled): + analog_array = np.array(np.frombuffer(data, dtype=np.uint16, count=nADCEnabled * aSamples)) + return decoder.decode(analog_array, pm.moench04_analog()) + + def getADCEnableReg(self): + retval = self.det.adcenable + if self.det.tengiga: + retval = self.det.adcenable10g + self.view.lineEditADCEnable.editingFinished.disconnect() + self.view.lineEditADCEnable.setText("0x{:08x}".format(retval)) + self.view.lineEditADCEnable.editingFinished.connect(self.setADCEnableReg) + return retval + + def setADCEnableReg(self): + self.view.lineEditADCEnable.editingFinished.disconnect() + try: + mask = int(self.mainWindow.lineEditADCEnable.text(), 16) + if self.det.tengiga: + self.det.adcenable10g = mask + else: + self.det.adcenable = mask + except Exception as e: + QtWidgets.QMessageBox.warning(self.mainWindow, "ADC Enable Fail", str(e), QtWidgets.QMessageBox.Ok) + pass + # TODO: handling double event exceptions + self.view.lineEditADCEnable.editingFinished.connect(self.setADCEnableReg) + self.updateADCEnable() + + def getADCEnable(self, i, mask): + checkBox = getattr(self.view, f"checkBoxADC{i}En") + checkBox.stateChanged.disconnect() + checkBox.setChecked(bit_is_set(mask, i)) + checkBox.stateChanged.connect(partial(self.setADCEnable, i)) + + def updateADCEnable(self): + retval = self.getADCEnableReg() + self.mainWindow.nADCEnabled = bin(retval).count('1') + for i in range(Defines.adc.count): + self.getADCEnable(i, retval) + self.getADCEnablePlot(i) + self.getADCEnableColor(i) + self.plotTab.addSelectedAnalogPlots(i) + self.getADCEnableRange(retval) + self.getADCEnablePlotRange() + + def setADCEnable(self, i): + checkBox = getattr(self.view, f"checkBoxADC{i}En") + try: + if self.det.tengiga: + enableMask = manipulate_bit(checkBox.isChecked(), self.det.adcenable10g, i) + self.det.adcenable10g = enableMask + else: + enableMask = manipulate_bit(checkBox.isChecked(), self.det.adcenable, i) + self.det.adcenable = enableMask + except Exception as e: + QtWidgets.QMessageBox.warning(self.mainWindow, "ADC Enable Fail", str(e), QtWidgets.QMessageBox.Ok) + + self.updateADCEnable() + + def getADCEnableRange(self, mask): + self.view.checkBoxADC0_15En.stateChanged.disconnect() + self.view.checkBoxADC16_31En.stateChanged.disconnect() + self.view.checkBoxADC0_15En.setChecked((mask & Defines.adc.BIT0_15_MASK) == Defines.adc.BIT0_15_MASK) + self.view.checkBoxADC16_31En.setChecked((mask & Defines.adc.BIT16_31_MASK) == Defines.adc.BIT16_31_MASK) + self.view.checkBoxADC0_15En.stateChanged.connect(partial(self.setADCEnableRange, 0, Defines.adc.half)) + self.view.checkBoxADC16_31En.stateChanged.connect( + partial(self.setADCEnableRange, Defines.adc.half, Defines.adc.count)) + + def setADCEnableRange(self, start_nr, end_nr): + mask = self.getADCEnableReg() + checkBox = getattr(self.view, f"checkBoxADC{start_nr}_{end_nr - 1}En") + for i in range(start_nr, end_nr): + mask = manipulate_bit(checkBox.isChecked(), mask, i) + try: + if self.det.tengiga: + self.det.adcenable10g = mask + else: + self.det.adcenable = mask + except Exception as e: + QtWidgets.QMessageBox.warning(self.mainWindow, "ADC Enable Fail", str(e), QtWidgets.QMessageBox.Ok) + pass + self.updateADCEnable() + + def getADCEnablePlot(self, i): + checkBox = getattr(self.view, f"checkBoxADC{i}En") + checkBoxPlot = getattr(self.view, f"checkBoxADC{i}Plot") + checkBoxPlot.setEnabled(checkBox.isChecked()) + + def setADCEnablePlot(self, i): + pushButton = getattr(self.view, f"pushButtonADC{i}") + checkBox = getattr(self.view, f"checkBoxADC{i}Plot") + pushButton.setEnabled(checkBox.isChecked()) + + self.getADCEnablePlotRange() + self.plotTab.addSelectedAnalogPlots(i) + self.updateLegend() + + def getADCEnablePlotRange(self): + self.view.checkBoxADC0_15Plot.stateChanged.disconnect() + self.view.checkBoxADC16_31Plot.stateChanged.disconnect() + self.view.checkBoxADC0_15Plot.setEnabled( + all(getattr(self.view, f"checkBoxADC{i}Plot").isEnabled() for i in range(Defines.adc.half))) + self.view.checkBoxADC16_31Plot.setEnabled( + all( + getattr(self.view, f"checkBoxADC{i}Plot").isEnabled() + for i in range(Defines.adc.half, Defines.adc.count))) + self.view.checkBoxADC0_15Plot.setChecked( + all(getattr(self.view, f"checkBoxADC{i}Plot").isChecked() for i in range(Defines.adc.half))) + self.view.checkBoxADC16_31Plot.setChecked( + all( + getattr(self.view, f"checkBoxADC{i}Plot").isChecked() + for i in range(Defines.adc.half, Defines.adc.count))) + self.view.checkBoxADC0_15Plot.stateChanged.connect(partial(self.setADCEnablePlotRange, 0, Defines.adc.half)) + self.view.checkBoxADC16_31Plot.stateChanged.connect( + partial(self.setADCEnablePlotRange, Defines.adc.half, Defines.adc.count)) + + def setADCEnablePlotRange(self, start_nr, end_nr): + checkBox = getattr(self.view, f"checkBoxADC{start_nr}_{end_nr - 1}Plot") + enable = checkBox.isChecked() + for i in range(start_nr, end_nr): + checkBox = getattr(self.view, f"checkBoxADC{i}Plot") + checkBox.setChecked(enable) + self.plotTab.addAllSelectedAnalogPlots() + + def getADCEnableColor(self, i): + checkBox = getattr(self.view, f"checkBoxADC{i}Plot") + pushButton = getattr(self.view, f"pushButtonADC{i}") + pushButton.setEnabled(checkBox.isEnabled() and checkBox.isChecked()) + + def selectADCColor(self, i): + pushButton = getattr(self.view, f"pushButtonADC{i}") + self.plotTab.showPalette(pushButton) + pen = pg.mkPen(color=self.getADCButtonColor(i), width=1) + self.mainWindow.analogPlots[i].setPen(pen) + + def getADCButtonColor(self, i): + pushButton = getattr(self.view, f"pushButtonADC{i}") + return self.plotTab.getActiveColor(pushButton) + + def setADCButtonColor(self, i, color): + pushButton = getattr(self.view, f"pushButtonADC{i}") + return self.plotTab.setActiveColor(pushButton, color) + + def getADCInvReg(self): + retval = self.det.adcinvert + self.view.lineEditADCInversion.editingFinished.disconnect() + self.view.lineEditADCInversion.setText("0x{:08x}".format(retval)) + self.view.lineEditADCInversion.editingFinished.connect(self.setADCInvReg) + return retval + + def setADCInvReg(self): + self.view.lineEditADCInversion.editingFinished.disconnect() + try: + self.det.adcinvert = int(self.mainWindow.lineEditADCInversion.text(), 16) + except Exception as e: + QtWidgets.QMessageBox.warning(self.mainWindow, "ADC Inversion Fail", str(e), QtWidgets.QMessageBox.Ok) + pass + # TODO: handling double event exceptions + self.view.lineEditADCInversion.editingFinished.connect(self.setADCInvReg) + self.updateADCInv() + + def getADCInv(self, i, inv): + checkBox = getattr(self.view, f"checkBoxADC{i}Inv") + checkBox.stateChanged.disconnect() + checkBox.setChecked(bit_is_set(inv, i)) + checkBox.stateChanged.connect(partial(self.setADCInv, i)) + + def updateADCInv(self): + retval = self.getADCInvReg() + for i in range(Defines.adc.count): + self.getADCInv(i, retval) + self.getADCInvRange(retval) + + def setADCInv(self, i): + out = self.det.adcinvert + checkBox = getattr(self.view, f"checkBoxADC{i}Inv") + mask = manipulate_bit(checkBox.isChecked(), out, i) + self.det.adcinvert = mask + + retval = self.getADCInvReg() + self.getADCInv(i, retval) + self.getADCInvRange(retval) + + def getADCInvRange(self, inv): + self.view.checkBoxADC0_15Inv.stateChanged.disconnect() + self.view.checkBoxADC16_31Inv.stateChanged.disconnect() + self.view.checkBoxADC0_15Inv.setChecked((inv & Defines.adc.BIT0_15_MASK) == Defines.adc.BIT0_15_MASK) + self.view.checkBoxADC16_31Inv.setChecked((inv & Defines.adc.BIT16_31_MASK) == Defines.adc.BIT16_31_MASK) + self.view.checkBoxADC0_15Inv.stateChanged.connect(partial(self.setADCInvRange, 0, Defines.adc.half)) + self.view.checkBoxADC16_31Inv.stateChanged.connect( + partial(self.setADCInvRange, Defines.adc.half, Defines.adc.count)) + + def setADCInvRange(self, start_nr, end_nr): + out = self.det.adcinvert + checkBox = getattr(self.view, f"checkBoxADC{start_nr}_{end_nr - 1}Inv") + mask = getattr(Defines.adc, f"BIT{start_nr}_{end_nr - 1}_MASK") + if checkBox.isChecked(): + self.det.adcinvert = out | mask + else: + self.det.adcinvert = out & ~mask + + self.updateADCInv() + + def saveParameters(self) -> list[str]: + return [ + f"adcenable {self.view.lineEditADCEnable.text()}", + f"adcinvert {self.view.lineEditADCInversion.text()}", + ] diff --git a/pyctbgui/pyctbgui/services/Acquisition.py b/pyctbgui/pyctbgui/services/Acquisition.py new file mode 100644 index 000000000..d87cad767 --- /dev/null +++ b/pyctbgui/pyctbgui/services/Acquisition.py @@ -0,0 +1,719 @@ +import json +import typing +from pathlib import Path +import numpy as np +import time +import zmq +from PyQt5 import QtWidgets, uic +import logging + +from slsdet import readoutMode, runStatus +from pyctbgui.utils.defines import Defines +from pyctbgui.utils.numpyWriter.npy_writer import NumpyFileManager +from pyctbgui.utils.numpyWriter.npz_writer import NpzFileWriter + +if typing.TYPE_CHECKING: + # only used for type hinting. To avoid circular dependencies these + # won't be imported in runtime + from pyctbgui.services import SignalsTab, TransceiverTab, AdcTab, PlotTab + + +class AcquisitionTab(QtWidgets.QWidget): + + def __init__(self, parent): + self.__isWaveform = None + super().__init__(parent) + self.currentMeasurement = None + self.dsamples = None + self.stoppedFlag = None + self.asamples = None + self.tsamples = None + uic.loadUi(Path(__file__).parent.parent / 'ui' / "acquisition.ui", parent) + self.view = parent + self.mainWindow = None + self.det = None + self.signalsTab: SignalsTab = None + self.transceiverTab: TransceiverTab = None + self.adcTab: AdcTab = None + self.plotTab: PlotTab = None + self.writeNumpy: bool = False + self.outputDir: Path = Path('/') + self.outputFileNamePrefix: str = '' + self.numpyFileManagers: dict[str, NumpyFileManager] = {} + + self.logger = logging.getLogger('AcquisitionTab') + + def setup_ui(self): + self.signalsTab = self.mainWindow.signalsTab + self.transceiverTab = self.mainWindow.transceiverTab + self.adcTab = self.mainWindow.adcTab + self.plotTab = self.mainWindow.plotTab + self.toggleStartButton(False) + + def connect_ui(self): + # For Acquistions Tab + self.view.comboBoxROMode.currentIndexChanged.connect(self.setReadOut) + self.view.spinBoxRunF.editingFinished.connect(self.setRunFrequency) + self.view.spinBoxTransceiver.editingFinished.connect(self.setTransceiver) + self.view.spinBoxAnalog.editingFinished.connect(self.setAnalog) + self.view.spinBoxDigital.editingFinished.connect(self.setDigital) + self.view.spinBoxADCF.editingFinished.connect(self.setADCFrequency) + self.view.spinBoxADCPhase.editingFinished.connect(self.setADCPhase) + self.view.spinBoxADCPipeline.editingFinished.connect(self.setADCPipeline) + self.view.spinBoxDBITF.editingFinished.connect(self.setDBITFrequency) + self.view.spinBoxDBITPhase.editingFinished.connect(self.setDBITPhase) + self.view.spinBoxDBITPipeline.editingFinished.connect(self.setDBITPipeline) + + self.view.checkBoxFileWriteRaw.stateChanged.connect(self.setFileWrite) + self.view.checkBoxFileWriteNumpy.stateChanged.connect(self.setFileWriteNumpy) + self.view.lineEditFileName.editingFinished.connect(self.setFileName) + self.view.lineEditFilePath.editingFinished.connect(self.setFilePath) + self.view.pushButtonFilePath.clicked.connect(self.browseFilePath) + self.view.spinBoxAcquisitionIndex.editingFinished.connect(self.setAccquisitionIndex) + self.view.spinBoxFrames.editingFinished.connect(self.setFrames) + self.view.spinBoxPeriod.editingFinished.connect(self.setPeriod) + self.view.comboBoxPeriod.currentIndexChanged.connect(self.setPeriod) + self.view.spinBoxTriggers.editingFinished.connect(self.setTriggers) + + def refresh(self): + self.getReadout() + self.getRunFrequency() + self.getTransceiver() + self.getAnalog() + self.getDigital() + self.getADCFrequency() + self.getADCPhase() + self.getADCPipeline() + self.getDBITFrequency() + self.getDBITPhase() + self.getDBITPipeline() + self.getFileWrite() + self.getFileName() + self.getFilePath() + self.getAccquisitionIndex() + self.getFrames() + self.getTriggers() + self.getPeriod() + self.updateDetectorStatus(self.det.status) + + # Acquisition Tab functions + + def getReadout(self): + self.view.comboBoxROMode.currentIndexChanged.disconnect() + self.view.spinBoxAnalog.editingFinished.disconnect() + self.view.spinBoxDigital.editingFinished.disconnect() + self.view.spinBoxTransceiver.editingFinished.disconnect() + + self.mainWindow.romode = self.det.romode + self.view.comboBoxROMode.setCurrentIndex(self.mainWindow.romode.value) + match self.mainWindow.romode: + case readoutMode.ANALOG_ONLY: + self.view.spinBoxAnalog.setEnabled(True) + self.view.labelAnalog.setEnabled(True) + self.view.spinBoxDigital.setDisabled(True) + self.view.labelDigital.setDisabled(True) + self.view.labelTransceiver.setDisabled(True) + self.view.spinBoxTransceiver.setDisabled(True) + case readoutMode.DIGITAL_ONLY: + self.view.spinBoxAnalog.setDisabled(True) + self.view.labelAnalog.setDisabled(True) + self.view.spinBoxDigital.setEnabled(True) + self.view.labelDigital.setEnabled(True) + self.view.labelTransceiver.setDisabled(True) + self.view.spinBoxTransceiver.setDisabled(True) + case readoutMode.ANALOG_AND_DIGITAL: + self.view.spinBoxAnalog.setEnabled(True) + self.view.labelAnalog.setEnabled(True) + self.view.spinBoxDigital.setEnabled(True) + self.view.labelDigital.setEnabled(True) + self.view.labelTransceiver.setDisabled(True) + self.view.spinBoxTransceiver.setDisabled(True) + case readoutMode.TRANSCEIVER_ONLY: + self.view.spinBoxAnalog.setDisabled(True) + self.view.labelAnalog.setDisabled(True) + self.view.spinBoxDigital.setDisabled(True) + self.view.labelDigital.setDisabled(True) + self.view.labelTransceiver.setEnabled(True) + self.view.spinBoxTransceiver.setEnabled(True) + case _: + self.view.spinBoxAnalog.setDisabled(True) + self.view.labelAnalog.setDisabled(True) + self.view.spinBoxDigital.setEnabled(True) + self.view.labelDigital.setEnabled(True) + self.view.labelTransceiver.setEnabled(True) + self.view.spinBoxTransceiver.setEnabled(True) + + self.view.comboBoxROMode.currentIndexChanged.connect(self.setReadOut) + self.view.spinBoxAnalog.editingFinished.connect(self.setAnalog) + self.view.spinBoxDigital.editingFinished.connect(self.setDigital) + self.view.spinBoxTransceiver.editingFinished.connect(self.setTransceiver) + self.getAnalog() + self.getDigital() + self.plotTab.showPlot() + + def plotReferesh(self): + self.read_zmq() + + def setReadOut(self): + self.view.comboBoxROMode.currentIndexChanged.disconnect() + try: + if self.view.comboBoxROMode.currentIndex() == 0: + self.det.romode = readoutMode.ANALOG_ONLY + elif self.view.comboBoxROMode.currentIndex() == 1: + self.det.romode = readoutMode.DIGITAL_ONLY + elif self.view.comboBoxROMode.currentIndex() == 2: + self.det.romode = readoutMode.ANALOG_AND_DIGITAL + elif self.view.comboBoxROMode.currentIndex() == 3: + self.det.romode = readoutMode.TRANSCEIVER_ONLY + else: + self.det.romode = readoutMode.DIGITAL_AND_TRANSCEIVER + except Exception as e: + QtWidgets.QMessageBox.warning(self.mainWindow, "Readout Mode Fail", str(e), QtWidgets.QMessageBox.Ok) + # TODO: handling double event exceptions + self.view.comboBoxROMode.currentIndexChanged.connect(self.setReadOut) + self.getReadout() + + def getRunFrequency(self): + self.view.spinBoxRunF.editingFinished.disconnect() + self.view.spinBoxRunF.setValue(self.det.runclk) + self.view.spinBoxRunF.editingFinished.connect(self.setRunFrequency) + + def setRunFrequency(self): + self.view.spinBoxRunF.editingFinished.disconnect() + try: + self.det.runclk = self.view.spinBoxRunF.value() + except Exception as e: + QtWidgets.QMessageBox.warning(self.mainWindow, "Run Frequency Fail", str(e), QtWidgets.QMessageBox.Ok) + # TODO: handling double event exceptions + self.view.spinBoxRunF.editingFinished.connect(self.setRunFrequency) + self.getRunFrequency() + + def getTransceiver(self): + self.view.spinBoxTransceiver.editingFinished.disconnect() + self.tsamples = self.det.tsamples + self.view.spinBoxTransceiver.setValue(self.tsamples) + self.view.spinBoxTransceiver.editingFinished.connect(self.setTransceiver) + + def setTransceiver(self): + self.view.spinBoxTransceiver.editingFinished.disconnect() + try: + self.det.tsamples = self.view.spinBoxTransceiver.value() + except Exception as e: + QtWidgets.QMessageBox.warning(self.mainWindow, "Transceiver Samples Fail", str(e), + QtWidgets.QMessageBox.Ok) + # TODO: handling double event exceptions + self.view.spinBoxTransceiver.editingFinished.connect(self.setTransceiver) + self.getTransceiver() + + def getAnalog(self): + self.view.spinBoxAnalog.editingFinished.disconnect() + self.asamples = self.det.asamples + self.view.spinBoxAnalog.setValue(self.asamples) + self.view.spinBoxAnalog.editingFinished.connect(self.setAnalog) + + def setAnalog(self): + self.view.spinBoxAnalog.editingFinished.disconnect() + try: + self.det.asamples = self.view.spinBoxAnalog.value() + except Exception as e: + QtWidgets.QMessageBox.warning(self.mainWindow, "Digital Samples Fail", str(e), QtWidgets.QMessageBox.Ok) + # TODO: handling double event exceptions + self.view.spinBoxAnalog.editingFinished.connect(self.setAnalog) + self.getAnalog() + + def getDigital(self): + self.view.spinBoxDigital.editingFinished.disconnect() + self.dsamples = self.det.dsamples + self.view.spinBoxDigital.setValue(self.dsamples) + self.view.spinBoxDigital.editingFinished.connect(self.setDigital) + + def setDigital(self): + self.view.spinBoxDigital.editingFinished.disconnect() + try: + self.det.dsamples = self.view.spinBoxDigital.value() + except Exception as e: + QtWidgets.QMessageBox.warning(self.mainWindow, "Digital Samples Fail", str(e), QtWidgets.QMessageBox.Ok) + # TODO: handling double event exceptions + self.view.spinBoxDigital.editingFinished.connect(self.setDigital) + self.getDigital() + + def getADCFrequency(self): + self.view.spinBoxADCF.editingFinished.disconnect() + self.view.spinBoxADCF.setValue(self.det.adcclk) + self.view.spinBoxADCF.editingFinished.connect(self.setADCFrequency) + + def setADCFrequency(self): + self.view.spinBoxADCF.editingFinished.disconnect() + try: + self.det.adcclk = self.view.spinBoxADCF.value() + except Exception as e: + QtWidgets.QMessageBox.warning(self.mainWindow, "ADC Frequency Fail", str(e), QtWidgets.QMessageBox.Ok) + # TODO: handling double event exceptions + self.view.spinBoxADCF.editingFinished.connect(self.setADCFrequency) + self.getADCFrequency() + + def getADCPhase(self): + self.view.spinBoxADCPhase.editingFinished.disconnect() + self.view.spinBoxADCPhase.setValue(self.det.adcphase) + self.view.spinBoxADCPhase.editingFinished.connect(self.setADCPhase) + + def setADCPhase(self): + self.view.spinBoxADCPhase.editingFinished.disconnect() + try: + self.det.adcphase = self.view.spinBoxADCPhase.value() + except Exception as e: + QtWidgets.QMessageBox.warning(self.mainWindow, "ADC Phase Fail", str(e), QtWidgets.QMessageBox.Ok) + # TODO: handling double event exceptions + self.view.spinBoxADCPhase.editingFinished.connect(self.setADCPhase) + self.getADCPhase() + + def getADCPipeline(self): + self.view.spinBoxADCPipeline.editingFinished.disconnect() + self.view.spinBoxADCPipeline.setValue(self.det.adcpipeline) + self.view.spinBoxADCPipeline.editingFinished.connect(self.setADCPipeline) + + def setADCPipeline(self): + self.view.spinBoxADCPipeline.editingFinished.disconnect() + try: + self.det.adcpipeline = self.view.spinBoxADCPipeline.value() + except Exception as e: + QtWidgets.QMessageBox.warning(self.mainWindow, "ADC Pipeline Fail", str(e), QtWidgets.QMessageBox.Ok) + # TODO: handling double event exceptions + self.view.spinBoxADCPipeline.editingFinished.connect(self.setADCPipeline) + self.getADCPipeline() + + def getDBITFrequency(self): + self.view.spinBoxDBITF.editingFinished.disconnect() + self.view.spinBoxDBITF.setValue(self.det.dbitclk) + self.view.spinBoxDBITF.editingFinished.connect(self.setDBITFrequency) + + def setDBITFrequency(self): + self.view.spinBoxDBITF.editingFinished.disconnect() + try: + self.det.dbitclk = self.view.spinBoxDBITF.value() + except Exception as e: + QtWidgets.QMessageBox.warning(self.mainWindow, "DBit Frequency Fail", str(e), QtWidgets.QMessageBox.Ok) + # TODO: handling double event exceptions + self.view.spinBoxDBITF.editingFinished.connect(self.setDBITFrequency) + self.getDBITFrequency() + + def getDBITPhase(self): + self.view.spinBoxDBITPhase.editingFinished.disconnect() + self.view.spinBoxDBITPhase.setValue(self.det.dbitphase) + self.view.spinBoxDBITPhase.editingFinished.connect(self.setDBITPhase) + + def setDBITPhase(self): + self.view.spinBoxDBITPhase.editingFinished.disconnect() + try: + self.det.dbitphase = self.view.spinBoxDBITPhase.value() + except Exception as e: + QtWidgets.QMessageBox.warning(self.mainWindow, "DBit Phase Fail", str(e), QtWidgets.QMessageBox.Ok) + # TODO: handling double event exceptions + self.view.spinBoxDBITPhase.editingFinished.connect(self.setDBITPhase) + self.getDBITPhase() + + def getDBITPipeline(self): + self.view.spinBoxDBITPipeline.editingFinished.disconnect() + self.view.spinBoxDBITPipeline.setValue(self.det.dbitpipeline) + self.view.spinBoxDBITPipeline.editingFinished.connect(self.setDBITPipeline) + + def setDBITPipeline(self): + self.view.spinBoxDBITPipeline.editingFinished.disconnect() + try: + self.det.dbitpipeline = self.view.spinBoxDBITPipeline.value() + except Exception as e: + QtWidgets.QMessageBox.warning(self.mainWindow, "DBit Pipeline Fail", str(e), QtWidgets.QMessageBox.Ok) + # TODO: handling double event exceptions + self.view.spinBoxDBITPipeline.editingFinished.connect(self.setDBITPipeline) + self.getDBITPipeline() + + def getFileWrite(self): + self.view.checkBoxFileWriteRaw.stateChanged.disconnect() + self.view.checkBoxFileWriteRaw.setChecked(self.det.fwrite) + self.view.checkBoxFileWriteRaw.stateChanged.connect(self.setFileWrite) + + def setFileWrite(self): + self.det.fwrite = self.view.checkBoxFileWriteRaw.isChecked() + self.getFileWrite() + + def setFileWriteNumpy(self): + """ + slot for saving the data in numpy (.npy) format + """ + self.writeNumpy = not self.writeNumpy + + def getFileName(self): + """ + set the lineEditFilePath input widget to the filename value from the detector + """ + + self.view.lineEditFileName.editingFinished.disconnect() + fileName = self.det.fname + self.view.lineEditFileName.setText(fileName) + self.outputFileNamePrefix = fileName + self.view.lineEditFileName.editingFinished.connect(self.setFileName) + + def setFileName(self): + """ + slot for setting the filename from the widget to the detector + """ + self.det.fname = self.view.lineEditFileName.text() + self.getFileName() + + def getFilePath(self): + """ + set the lineEditFilePath input widget to the path value from the detector + """ + self.view.lineEditFilePath.editingFinished.disconnect() + path = self.det.fpath + self.view.lineEditFilePath.setText(str(path)) + self.view.lineEditFilePath.editingFinished.connect(self.setFilePath) + self.outputDir = path + + def setFilePath(self): + """ + slot to set the directory of the output for the detector + """ + self.det.fpath = Path(self.view.lineEditFilePath.text()) + self.getFilePath() + + def saveNumpyFile(self, data: np.ndarray | dict[str, np.ndarray], jsonHeader): + """ + save the acquisition data (waveform or image) in the specified path + save waveform in multiple .npy files + save image as npy file format + @note: frame number can be up to 100,000 so the data arrays cannot be fully loaded to memory + """ + if not self.writeNumpy: + return + if self.outputDir == Path('/'): + self.outputDir = Path('./') + if self.outputFileNamePrefix == '': + self.outputFileNamePrefix = 'run' + + for device in data: + if device not in self.numpyFileManagers: + tmpPath = self.outputDir / f'{self.outputFileNamePrefix}_{device}_{jsonHeader["fileIndex"]}.npy' + self.numpyFileManagers[device] = NumpyFileManager(tmpPath, 'w', data[device].shape, data[device].dtype) + self.numpyFileManagers[device].writeOneFrame(data[device]) + + if 'progress' in jsonHeader and jsonHeader['progress'] >= 100: + # close opened files after saving the last frame + self.closeOpenedNumpyFiles(jsonHeader) + + def closeOpenedNumpyFiles(self, jsonHeader): + """ + create npz file for waveform plots and close opened numpy files to persist their data + """ + if not self.writeNumpy: + return + if len(self.numpyFileManagers) == 0: + return + oneFile: bool = len(self.numpyFileManagers) == 1 + + filepaths = [npw.file.name for device, npw in self.numpyFileManagers.items()] + filenames = list(self.numpyFileManagers.keys()) + ext = 'npy' if oneFile else 'npz' + newPath = self.outputDir / f'{self.outputFileNamePrefix}_{jsonHeader["fileIndex"]}.{ext}' + + if not oneFile: + # if there is multiple .npy files group them in an .npz file + self.numpyFileManagers.clear() + NpzFileWriter.zipNpyFiles(newPath, filepaths, filenames, deleteOriginals=True, compressed=False) + else: + # rename files from "run_ADC0_0.npy" to "run_0.npy" if it is a single .npy file + oldPath = self.outputDir / f'{self.outputFileNamePrefix}_' \ + f'{self.numpyFileManagers.popitem()[0]}_{jsonHeader["fileIndex"]}.{ext}' + Path.rename(oldPath, newPath) + + self.logger.info(f'Saving numpy data in {newPath} Finished') + + def browseFilePath(self): + response = QtWidgets.QFileDialog.getExistingDirectory(parent=self.mainWindow, + caption="Select Path to Save Output File", + directory=str(Path.cwd()), + options=(QtWidgets.QFileDialog.ShowDirsOnly + | QtWidgets.QFileDialog.DontResolveSymlinks) + # filter='README (*.md *.ui)' + ) + if response: + self.view.lineEditFilePath.setText(response) + self.setFilePath() + + def getAccquisitionIndex(self): + self.view.spinBoxAcquisitionIndex.editingFinished.disconnect() + self.view.spinBoxAcquisitionIndex.setValue(self.det.findex) + self.view.spinBoxAcquisitionIndex.editingFinished.connect(self.setAccquisitionIndex) + + def setAccquisitionIndex(self): + self.det.findex = self.view.spinBoxAcquisitionIndex.value() + self.getAccquisitionIndex() + + def getFrames(self): + self.view.spinBoxFrames.editingFinished.disconnect() + self.view.spinBoxFrames.setValue(self.det.frames) + self.view.spinBoxFrames.editingFinished.connect(self.setFrames) + + def setFrames(self): + self.det.frames = self.view.spinBoxFrames.value() + self.getFrames() + + def getPeriod(self): + self.view.spinBoxPeriod.editingFinished.disconnect() + self.view.comboBoxPeriod.currentIndexChanged.disconnect() + + # Converting to right time unit for period + tPeriod = self.det.period + if tPeriod < 100e-9: + self.view.comboBoxPeriod.setCurrentIndex(3) + self.view.spinBoxPeriod.setValue(tPeriod / 1e-9) + elif tPeriod < 100e-6: + self.view.comboBoxPeriod.setCurrentIndex(2) + self.view.spinBoxPeriod.setValue(tPeriod / 1e-6) + elif tPeriod < 100e-3: + self.view.comboBoxPeriod.setCurrentIndex(1) + self.view.spinBoxPeriod.setValue(tPeriod / 1e-3) + else: + self.view.comboBoxPeriod.setCurrentIndex(0) + self.view.spinBoxPeriod.setValue(tPeriod) + + self.view.spinBoxPeriod.editingFinished.connect(self.setPeriod) + self.view.comboBoxPeriod.currentIndexChanged.connect(self.setPeriod) + + def setPeriod(self): + if self.view.comboBoxPeriod.currentIndex() == 0: + self.det.period = self.view.spinBoxPeriod.value() + elif self.view.comboBoxPeriod.currentIndex() == 1: + self.det.period = self.view.spinBoxPeriod.value() * (1e-3) + elif self.view.comboBoxPeriod.currentIndex() == 2: + self.det.period = self.view.spinBoxPeriod.value() * (1e-6) + else: + self.det.period = self.view.spinBoxPeriod.value() * (1e-9) + + self.getPeriod() + + def getTriggers(self): + self.view.spinBoxTriggers.editingFinished.disconnect() + self.view.spinBoxTriggers.setValue(self.det.triggers) + self.view.spinBoxTriggers.editingFinished.connect(self.setTriggers) + + def setTriggers(self): + self.det.triggers = self.view.spinBoxTriggers.value() + self.getTriggers() + + def updateDetectorStatus(self, status): + self.mainWindow.labelDetectorStatus.setText(status.name) + + def updateCurrentMeasurement(self): + self.mainWindow.labelCurrentMeasurement.setText(str(self.currentMeasurement)) + # print(f"Meausrement {self.currentMeasurement}") + + def updateCurrentFrame(self, val): + self.mainWindow.labelFrameNumber.setText(str(val)) + + def updateAcquiredFrames(self, val): + self.mainWindow.labelAcquiredFrames.setText(str(val)) + + def toggleAcquire(self): + if self.mainWindow.pushButtonStart.isChecked(): + self.plotTab.showPatternViewer(False) + self.acquire() + else: + self.stopAcquisition() + + def toggleStartButton(self, started): + if started: + self.mainWindow.pushButtonStart.setChecked(True) + self.mainWindow.pushButtonStart.setText('Stop') + else: + self.mainWindow.pushButtonStart.setChecked(False) + self.mainWindow.pushButtonStart.setText('Start') + + def stopAcquisition(self): + self.det.stop() + self.stoppedFlag = True + + def checkBeforeAcquire(self): + if self.plotTab.view.radioButtonImage.isChecked(): + # matterhorn image + if self.plotTab.view.comboBoxPlot.currentText() == "Matterhorn": + if self.mainWindow.romode not in [readoutMode.TRANSCEIVER_ONLY, readoutMode.DIGITAL_AND_TRANSCEIVER]: + QtWidgets.QMessageBox.warning(self.mainWindow, "Plot type", + "To read Matterhorn image, please enable transceiver readout mode", + QtWidgets.QMessageBox.Ok) + return False + if self.transceiverTab.getTransceiverEnableReg() != Defines.Matterhorn.tranceiverEnable: + QtWidgets.QMessageBox.warning( + self.mainWindow, "Plot type", "To read Matterhorn image, please set transceiver enable to " + + str(Defines.Matterhorn.tranceiverEnable), QtWidgets.QMessageBox.Ok) + return False + # moench04 image + elif self.plotTab.view.comboBoxPlot.currentText() == "Moench04": + if self.mainWindow.romode not in [readoutMode.ANALOG_ONLY, readoutMode.ANALOG_AND_DIGITAL]: + QtWidgets.QMessageBox.warning(self.mainWindow, "Plot type", + "To read Moench 04 image, please enable analog readout mode", + QtWidgets.QMessageBox.Ok) + return False + if self.mainWindow.nADCEnabled != 32: + QtWidgets.QMessageBox.warning(self.mainWindow, "Plot type", + "To read Moench 04 image, please enable all 32 adcs", + QtWidgets.QMessageBox.Ok) + return False + return True + + def acquire(self): + if not self.checkBeforeAcquire(): + self.toggleStartButton(False) + return + + self.stoppedFlag = False + self.toggleStartButton(True) + self.currentMeasurement = 0 + + # ensure zmq streaming is enabled + if self.det.rx_zmqstream == 0: + self.det.rx_zmqstream = 1 + + # some functions that must be updated for local values + self.getTransceiver() + self.getAnalog() + self.getDigital() + self.getReadout() + self.signalsTab.getDBitOffset() + self.adcTab.getADCEnableReg() + self.signalsTab.updateDigitalBitEnable() + self.transceiverTab.getTransceiverEnableReg() + + self.startMeasurement() + + def startMeasurement(self): + try: + self.updateCurrentMeasurement() + self.updateCurrentFrame(0) + self.updateAcquiredFrames(0) + self.mainWindow.progressBar.setValue(0) + + self.det.rx_start() + self.det.start() + time.sleep(Defines.Time_Wait_For_Packets_ms) + self.checkEndofAcquisition() + except Exception as e: + QtWidgets.QMessageBox.warning(self.mainWindow, "Acquire Fail", str(e), QtWidgets.QMessageBox.Ok) + self.checkEndofAcquisition() + + def checkEndofAcquisition(self): + caught = self.det.rx_framescaught[0] + self.updateAcquiredFrames(caught) + status = self.det.getDetectorStatus()[0] + self.updateDetectorStatus(status) + measurementDone = False + # print(f'status:{status}') + match status: + case runStatus.RUNNING: + pass + case runStatus.WAITING: + pass + case runStatus.TRANSMITTING: + pass + case _: + measurementDone = True + + # check for 500ms for no packets + # needs more time for 1g streaming out done + if measurementDone: + time.sleep(Defines.Time_Wait_For_Packets_ms) + if self.det.rx_framescaught[0] != caught: + measurementDone = False + + numMeasurments = self.view.spinBoxMeasurements.value() + if measurementDone: + + if self.det.rx_status == runStatus.RUNNING: + self.det.rx_stop() + if self.view.checkBoxFileWriteRaw.isChecked() or self.view.checkBoxFileWriteNumpy.isChecked(): + self.view.spinBoxAcquisitionIndex.stepUp() + self.setAccquisitionIndex() + # next measurement + self.currentMeasurement += 1 + if self.currentMeasurement < numMeasurments and not self.stoppedFlag: + self.startMeasurement() + else: + self.mainWindow.statusTimer.stop() + self.toggleStartButton(False) + else: + self.mainWindow.statusTimer.start(Defines.Time_Status_Refresh_ms) + + # For other functios + # Reading data from zmq and decoding it + def read_zmq(self): + # print("in readzmq") + try: + msg = self.socket.recv_multipart(flags=zmq.NOBLOCK) + if len(msg) != 2: + if len(msg) != 1: + print(f'len(msg) = {len(msg)}') + return + header, data = msg + jsonHeader = json.loads(header) + self.mainWindow.progressBar.setValue(int(jsonHeader['progress'])) + self.updateCurrentFrame(jsonHeader['frameIndex']) + + # waveform + waveforms = {} + if self.plotTab.view.radioButtonWaveform.isChecked(): + # analog + if self.mainWindow.romode.value in [0, 2]: + waveforms |= self.adcTab.processWaveformData(data, self.asamples) + # digital + if self.mainWindow.romode.value in [1, 2, 4]: + waveforms |= self.signalsTab.processWaveformData(data, self.asamples, self.dsamples) + # transceiver + if self.mainWindow.romode.value in [3, 4]: + waveforms |= self.transceiverTab.processWaveformData(data, self.dsamples) + # image + else: + # analog + if self.mainWindow.romode.value in [0, 2]: + waveforms['analog_image'] = self.adcTab.processImageData(data, self.asamples) + # transceiver + if self.mainWindow.romode.value in [3, 4]: + waveforms['tx_image'] = self.transceiverTab.processImageData(data, self.dsamples) + + self.saveNumpyFile(waveforms, jsonHeader) + except zmq.ZMQError: + pass + except Exception: + self.logger.exception("Exception caught") + + def setup_zmq(self): + self.det.rx_zmqstream = 1 + self.zmqIp = self.det.zmqip + self.zmqport = self.det.zmqport + self.zmq_stream = self.det.rx_zmqstream + + self.context = zmq.Context() + self.socket = self.context.socket(zmq.SUB) + self.socket.connect(f"tcp://{self.zmqIp}:{self.zmqport}") + self.socket.subscribe("") + + def saveParameters(self) -> list[str]: + return [ + f'romode {self.view.comboBoxROMode.currentText().lower()}', + f'runclk {self.view.spinBoxRunF.value()}', + f'adcclk {self.view.spinBoxADCF.value()}', + f'adcphase {self.view.spinBoxADCPhase.value()}', + f'adcpipeline {self.view.spinBoxADCPipeline.value()}', + f'dbitclk {self.view.spinBoxDBITF.value()}', + f'dbitphase {self.view.spinBoxDBITPhase.value()}', + f'dbitpipeline {self.view.spinBoxDBITPipeline.value()}', + f'fwrite {int(self.view.checkBoxFileWriteRaw.isChecked())}', + f'fname {self.view.lineEditFileName.text()}', + f'fpath {self.view.lineEditFilePath.text()}', + f'findex {self.view.spinBoxAcquisitionIndex.value()}', + f'frames {self.view.spinBoxFrames.value()}', + f'triggers {self.view.spinBoxTriggers.value()}', + f'period {self.view.spinBoxPeriod.value()} {self.view.comboBoxPeriod.currentText().lower()}', + f'asamples {self.view.spinBoxAnalog.value()}', + f'dsamples {self.view.spinBoxDigital.value()}', + f'tsamples {self.view.spinBoxTransceiver.value()}', + ] diff --git a/pyctbgui/pyctbgui/services/DACs.py b/pyctbgui/pyctbgui/services/DACs.py new file mode 100644 index 000000000..1bd7ab721 --- /dev/null +++ b/pyctbgui/pyctbgui/services/DACs.py @@ -0,0 +1,170 @@ +from functools import partial +from pathlib import Path + +from PyQt5 import QtWidgets, uic +from pyctbgui.utils.defines import Defines + +from slsdet import dacIndex + + +class DacTab(QtWidgets.QWidget): + + def __init__(self, parent): + super().__init__(parent) + uic.loadUi(Path(__file__).parent.parent / 'ui' / "Dacs.ui", parent) + self.view = parent + + def setup_ui(self): + for i in range(Defines.dac.count): + dac = getattr(dacIndex, f"DAC_{i}") + getattr(self.view, f"spinBoxDAC{i}").setValue(self.det.getDAC(dac)[0]) + + if self.det.highvoltage == 0: + self.view.spinBoxHighVoltage.setDisabled(True) + self.view.checkBoxHighVoltage.setChecked(False) + + def connect_ui(self): + n_dacs = len(self.det.daclist) + for i in range(n_dacs): + getattr(self.view, f"spinBoxDAC{i}").editingFinished.connect(partial(self.setDAC, i)) + getattr(self.view, f"checkBoxDAC{i}").stateChanged.connect(partial(self.setDACTristate, i)) + getattr(self.view, f"checkBoxDAC{i}mV").stateChanged.connect(partial(self.getDAC, i)) + + self.view.comboBoxADCVpp.currentIndexChanged.connect(self.setADCVpp) + self.view.spinBoxHighVoltage.editingFinished.connect(self.setHighVoltage) + self.view.checkBoxHighVoltage.stateChanged.connect(self.setHighVoltage) + + def refresh(self): + self.updateDACNames() + for i in range(Defines.dac.count): + self.getDACTristate(i) + self.getDAC(i) + + self.getADCVpp() + self.getHighVoltage() + + def updateDACNames(self): + for i, name in enumerate(self.det.getDacNames()): + getattr(self.view, f"checkBoxDAC{i}").setText(name) + + def getDACTristate(self, i): + checkBox = getattr(self.view, f"checkBoxDAC{i}") + dac = getattr(dacIndex, f"DAC_{i}") + checkBox.stateChanged.disconnect() + if (self.det.getDAC(dac)[0]) == -100: + checkBox.setChecked(False) + else: + checkBox.setChecked(True) + checkBox.stateChanged.connect(partial(self.setDACTristate, i)) + + def setDACTristate(self, i): + checkBox = getattr(self.view, f"checkBoxDAC{i}") + if not checkBox.isChecked(): + self.setDAC(i) + self.getDAC(i) + + def getDAC(self, i): + checkBox = getattr(self.view, f"checkBoxDAC{i}") + checkBoxmV = getattr(self.view, f"checkBoxDAC{i}mV") + spinBox = getattr(self.view, f"spinBoxDAC{i}") + label = getattr(self.view, f"labelDAC{i}") + dac = getattr(dacIndex, f"DAC_{i}") + + checkBox.stateChanged.disconnect() + checkBoxmV.stateChanged.disconnect() + spinBox.editingFinished.disconnect() + + # do not uncheck automatically + if self.det.getDAC(dac)[0] != -100: + checkBox.setChecked(True) + + if checkBox.isChecked(): + spinBox.setEnabled(True) + checkBoxmV.setEnabled(True) + else: + spinBox.setDisabled(True) + checkBoxmV.setDisabled(True) + + in_mv = checkBoxmV.isChecked() and checkBox.isChecked() + dacValue = self.det.getDAC(dac, in_mv)[0] + unit = "mV" if in_mv else "" + label.setText(f"{dacValue} {unit}") + spinBox.setValue(dacValue) + + checkBox.stateChanged.connect(partial(self.setDACTristate, i)) + checkBoxmV.stateChanged.connect(partial(self.getDAC, i)) + spinBox.editingFinished.connect(partial(self.setDAC, i)) + + def setDAC(self, i): + checkBoxDac = getattr(self.view, f"checkBoxDAC{i}") + checkBoxmV = getattr(self.view, f"checkBoxDAC{i}mV") + spinBox = getattr(self.view, f"spinBoxDAC{i}") + dac = getattr(dacIndex, f"DAC_{i}") + + value = -100 + if checkBoxDac.isChecked(): + value = spinBox.value() + in_mV = checkBoxDac.isChecked() and checkBoxmV.isChecked() + self.det.setDAC(dac, value, in_mV) + self.getDAC(i) + + def getADCVpp(self): + retval = self.det.adcvpp + self.view.labelADCVpp.setText(f'Mode: {str(retval)}') + + self.view.comboBoxADCVpp.currentIndexChanged.disconnect() + self.view.comboBoxADCVpp.setCurrentIndex(retval) + self.view.comboBoxADCVpp.currentIndexChanged.connect(self.setADCVpp) + + def setADCVpp(self): + self.det.adcvpp = self.view.comboBoxADCVpp.currentIndex() + self.getADCVpp() + + def getHighVoltage(self): + retval = self.det.highvoltage + self.view.labelHighVoltage.setText(str(retval)) + + self.view.spinBoxHighVoltage.editingFinished.disconnect() + self.view.checkBoxHighVoltage.stateChanged.disconnect() + + self.view.spinBoxHighVoltage.setValue(retval) + if retval: + self.view.checkBoxHighVoltage.setChecked(True) + if self.view.checkBoxHighVoltage.isChecked(): + self.view.spinBoxHighVoltage.setEnabled(True) + + self.view.spinBoxHighVoltage.editingFinished.connect(self.setHighVoltage) + self.view.checkBoxHighVoltage.stateChanged.connect(self.setHighVoltage) + + def setHighVoltage(self): + value = 0 + if self.view.checkBoxHighVoltage.isChecked(): + value = self.view.spinBoxHighVoltage.value() + try: + self.det.highvoltage = value + except Exception as e: + QtWidgets.QMessageBox.warning(self.mainWindow, "High Voltage Fail", str(e), QtWidgets.QMessageBox.Ok) + pass + self.getHighVoltage() + + def saveParameters(self) -> list: + """ + save parameters for the current tab + @return: list of commands + """ + commands = [] + for i in range(Defines.dac.count): + # if checkbox disabled put -100 in dac units + enabled = getattr(self.view, f"checkBoxDAC{i}").isChecked() + if not enabled: + commands.append(f"dac {i} -100") + # else put the value in dac or mV units + else: + value = getattr(self.view, f"spinBoxDAC{i}").value() + inMV = getattr(self.view, f"checkBoxDAC{i}mV").isChecked() + unit = " mV" if inMV else "" + commands.append(f"dac {i} {value}{unit}") + + commands.append(f"adcvpp {self.view.comboBoxADCVpp.currentText()} mV") + commands.append(f"highvoltage {self.view.spinBoxHighVoltage.value()}") + return commands diff --git a/pyctbgui/pyctbgui/services/Pattern.py b/pyctbgui/pyctbgui/services/Pattern.py new file mode 100644 index 000000000..e7e274ff9 --- /dev/null +++ b/pyctbgui/pyctbgui/services/Pattern.py @@ -0,0 +1,456 @@ +import os +from functools import partial +from pathlib import Path + +from PyQt5 import QtWidgets, uic +import matplotlib.pyplot as plt +from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas +from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT as NavigationToolbar + +from pyctbgui.utils.defines import Defines +from pyctbgui.utils.plotPattern import PlotPattern + + +class PatternTab(QtWidgets.QWidget): + + def __init__(self, parent): + super().__init__(parent) + uic.loadUi(Path(__file__).parent.parent / 'ui' / "pattern.ui", parent) + self.view = parent + self.mainWindow = None + self.det = None + self.plotTab = None + + def setup_ui(self): + # Pattern Tab + self.plotTab = self.mainWindow.plotTab + + for i in range(len(Defines.Colors)): + self.view.comboBoxPatColor.addItem(Defines.Colors[i]) + self.view.comboBoxPatWaitColor.addItem(Defines.Colors[i]) + self.view.comboBoxPatLoopColor.addItem(Defines.Colors[i]) + for i in range(len(Defines.LineStyles)): + self.view.comboBoxPatWaitLineStyle.addItem(Defines.LineStyles[i]) + self.view.comboBoxPatLoopLineStyle.addItem(Defines.LineStyles[i]) + self.updateDefaultPatViewerParameters() + self.view.comboBoxPatColorSelect.setCurrentIndex(0) + self.view.comboBoxPatWait.setCurrentIndex(0) + self.view.comboBoxPatLoop.setCurrentIndex(0) + self.view.spinBoxPatClockSpacing.setValue(self.clock_vertical_lines_spacing) + self.view.checkBoxPatShowClockNumber.setChecked(self.show_clocks_number) + self.view.doubleSpinBoxLineWidth.setValue(self.line_width) + self.view.lineEditPatternFile.setText(self.det.patfname[0]) + # rest gets updated after connecting to slots + # pattern viewer plot area + self.figure, self.ax = plt.subplots() + self.canvas = FigureCanvas(self.figure) + self.toolbar = NavigationToolbar(self.canvas, self.view) + self.mainWindow.gridLayoutPatternViewer.addWidget(self.toolbar) + self.mainWindow.gridLayoutPatternViewer.addWidget(self.canvas) + self.figure.clear() + + def connect_ui(self): + # For Pattern Tab + self.view.lineEditStartAddress.editingFinished.connect(self.setPatLimitAddress) + self.view.lineEditStopAddress.editingFinished.connect(self.setPatLimitAddress) + for i in range(Defines.pattern.loops_count): + getattr(self.view, + f"lineEditLoop{i}Start").editingFinished.connect(partial(self.setPatLoopStartStopAddress, i)) + getattr(self.view, + f"lineEditLoop{i}Stop").editingFinished.connect(partial(self.setPatLoopStartStopAddress, i)) + getattr(self.view, f"lineEditLoop{i}Wait").editingFinished.connect(partial(self.setPatLoopWaitAddress, i)) + getattr(self.view, + f"spinBoxLoop{i}Repetition").editingFinished.connect(partial(self.setPatLoopRepetition, i)) + getattr(self.view, f"spinBoxLoop{i}WaitTime").editingFinished.connect(partial(self.setPatLoopWaitTime, i)) + self.view.pushButtonCompiler.clicked.connect(self.setCompiler) + self.view.pushButtonUncompiled.clicked.connect(self.setUncompiledPatternFile) + self.view.pushButtonPatternFile.clicked.connect(self.setPatternFile) + self.view.pushButtonLoadPattern.clicked.connect(self.loadPattern) + + self.view.comboBoxPatColorSelect.currentIndexChanged.connect(self.getPatViewerColors) + self.view.comboBoxPatWait.currentIndexChanged.connect(self.getPatViewerWaitParameters) + self.view.comboBoxPatLoop.currentIndexChanged.connect(self.getPatViewerLoopParameters) + + self.view.comboBoxPatColor.currentIndexChanged.connect(self.updatePatViewerParameters) + self.view.comboBoxPatWaitColor.currentIndexChanged.connect(self.updatePatViewerParameters) + self.view.comboBoxPatLoopColor.currentIndexChanged.connect(self.updatePatViewerParameters) + self.view.comboBoxPatWaitLineStyle.currentIndexChanged.connect(self.updatePatViewerParameters) + self.view.comboBoxPatLoopLineStyle.currentIndexChanged.connect(self.updatePatViewerParameters) + self.view.doubleSpinBoxWaitAlpha.editingFinished.connect(self.updatePatViewerParameters) + self.view.doubleSpinBoxLoopAlpha.editingFinished.connect(self.updatePatViewerParameters) + self.view.doubleSpinBoxWaitAlphaRect.editingFinished.connect(self.updatePatViewerParameters) + self.view.doubleSpinBoxLoopAlphaRect.editingFinished.connect(self.updatePatViewerParameters) + self.view.spinBoxPatClockSpacing.editingFinished.connect(self.updatePatViewerParameters) + self.view.checkBoxPatShowClockNumber.stateChanged.connect(self.updatePatViewerParameters) + self.view.doubleSpinBoxLineWidth.editingFinished.connect(self.updatePatViewerParameters) + self.view.pushButtonViewPattern.clicked.connect(self.viewPattern) + + def refresh(self): + self.getPatLimitAddress() + for i in range(Defines.pattern.loops_count): + self.getPatLoopStartStopAddress(i) + self.getPatLoopWaitAddress(i) + self.getPatLoopRepetition(i) + self.getPatLoopWaitTime(i) + + # Pattern Tab functions + + def getPatLimitAddress(self): + retval = self.det.patlimits + self.view.lineEditStartAddress.editingFinished.disconnect() + self.view.lineEditStopAddress.editingFinished.disconnect() + self.view.lineEditStartAddress.setText("0x{:04x}".format(retval[0])) + self.view.lineEditStopAddress.setText("0x{:04x}".format(retval[1])) + self.view.lineEditStartAddress.editingFinished.connect(self.setPatLimitAddress) + self.view.lineEditStopAddress.editingFinished.connect(self.setPatLimitAddress) + + def setPatLimitAddress(self): + self.view.lineEditStartAddress.editingFinished.disconnect() + self.view.lineEditStopAddress.editingFinished.disconnect() + try: + start = int(self.view.lineEditStartAddress.text(), 16) + stop = int(self.view.lineEditStopAddress.text(), 16) + self.det.patlimits = [start, stop] + except Exception as e: + QtWidgets.QMessageBox.warning(self.mainWindow, "Pattern Limit Address Fail", str(e), + QtWidgets.QMessageBox.Ok) + pass + # TODO: handling double event exceptions + self.view.lineEditStartAddress.editingFinished.connect(self.setPatLimitAddress) + self.view.lineEditStopAddress.editingFinished.connect(self.setPatLimitAddress) + self.getPatLimitAddress() + + def getPatLoopStartStopAddress(self, level): + retval = self.det.patloop[level] + lineEditStart = getattr(self.view, f"lineEditLoop{level}Start") + lineEditStop = getattr(self.view, f"lineEditLoop{level}Stop") + lineEditStart.editingFinished.disconnect() + lineEditStop.editingFinished.disconnect() + lineEditStart.setText("0x{:04x}".format(retval[0])) + lineEditStop.setText("0x{:04x}".format(retval[1])) + lineEditStart.editingFinished.connect(partial(self.setPatLoopStartStopAddress, level)) + lineEditStop.editingFinished.connect(partial(self.setPatLoopStartStopAddress, level)) + + def setPatLoopStartStopAddress(self, level): + lineEditStart = getattr(self.view, f"lineEditLoop{level}Start") + lineEditStop = getattr(self.view, f"lineEditLoop{level}Stop") + lineEditStart.editingFinished.disconnect() + lineEditStop.editingFinished.disconnect() + try: + start = int(lineEditStart.text(), 16) + stop = int(lineEditStop.text(), 16) + self.det.patloop[level] = [start, stop] + except Exception as e: + QtWidgets.QMessageBox.warning(self.mainWindow, "Pattern Loop Start Stop Address Fail", str(e), + QtWidgets.QMessageBox.Ok) + pass + # TODO: handling double event exceptions + lineEditStart.editingFinished.connect(partial(self.setPatLoopStartStopAddress, level)) + lineEditStop.editingFinished.connect(partial(self.setPatLoopStartStopAddress, level)) + self.getPatLoopStartStopAddress(level) + + def getPatLoopWaitAddress(self, level): + retval = self.det.patwait[level] + lineEdit = getattr(self.view, f"lineEditLoop{level}Wait") + lineEdit.editingFinished.disconnect() + lineEdit.setText("0x{:04x}".format(retval)) + lineEdit.editingFinished.connect(partial(self.setPatLoopWaitAddress, level)) + + def setPatLoopWaitAddress(self, level): + lineEdit = getattr(self.view, f"lineEditLoop{level}Wait") + lineEdit.editingFinished.disconnect() + try: + addr = int(lineEdit.text(), 16) + self.det.patwait[level] = addr + except Exception as e: + QtWidgets.QMessageBox.warning(self.mainWindow, "Pattern Wait Address Fail", str(e), + QtWidgets.QMessageBox.Ok) + pass + # TODO: handling double event exceptions + lineEdit.editingFinished.connect(partial(self.setPatLoopWaitAddress, level)) + self.getPatLoopWaitAddress(level) + + def getPatLoopRepetition(self, level): + retval = self.det.patnloop[level] + spinBox = getattr(self.view, f"spinBoxLoop{level}Repetition") + spinBox.editingFinished.disconnect() + spinBox.setValue(retval) + spinBox.editingFinished.connect(partial(self.setPatLoopRepetition, level)) + + def setPatLoopRepetition(self, level): + spinBox = getattr(self.view, f"spinBoxLoop{level}Repetition") + self.det.patnloop[level] = spinBox.value() + self.getPatLoopRepetition(level) + + def getPatLoopWaitTime(self, level): + retval = self.det.patwaittime[level] + spinBox = getattr(self.view, f"spinBoxLoop{level}WaitTime") + spinBox.editingFinished.disconnect() + spinBox.setValue(retval) + spinBox.editingFinished.connect(partial(self.setPatLoopWaitTime, level)) + + def setPatLoopWaitTime(self, level): + spinBox = getattr(self.view, f"spinBoxLoop{level}WaitTime") + self.det.patwaittime[level] = spinBox.value() + self.getPatLoopWaitTime(level) + + def setCompiler(self): + response = QtWidgets.QFileDialog.getOpenFileName( + parent=self.mainWindow, + caption="Select a compiler file", + directory=str(Path.cwd()), + # filter='README (*.md *.ui)' + ) + if response[0]: + self.view.lineEditCompiler.setText(response[0]) + + def setUncompiledPatternFile(self): + filt = 'Pattern code(*.py *.c)' + folder = Path(self.det.patfname[0]).parent + if not folder: + folder = Path.cwd() + response = QtWidgets.QFileDialog.getOpenFileName(parent=self.mainWindow, + caption="Select an uncompiled pattern file", + directory=str(folder), + filter=filt) + if response[0]: + self.view.lineEditUncompiled.setText(response[0]) + + def setPatternFile(self): + filt = 'Pattern file(*.pyat *.pat)' + folder = Path(self.det.patfname[0]).parent + if not folder: + folder = Path.cwd() + response = QtWidgets.QFileDialog.getOpenFileName(parent=self.mainWindow, + caption="Select a compiled pattern file", + directory=str(folder), + filter=filt) + if response[0]: + self.view.lineEditPatternFile.setText(response[0]) + + def compilePattern(self): + compilerFile = self.view.lineEditCompiler.text() + if not compilerFile: + QtWidgets.QMessageBox.warning(self.mainWindow, "Compile Fail", "No compiler selected. Please select one.", + QtWidgets.QMessageBox.Ok) + return "" + + pattern_file = self.view.lineEditUncompiled.text() + + # if old compile file exists, backup and remove to ensure old copy not loaded + oldFile = Path(pattern_file + 'at') + if oldFile.is_file(): + print("Moving old compiled pattern file to _bck") + exit_status = os.system('mv ' + str(oldFile) + ' ' + str(oldFile) + '_bkup') + if exit_status != 0: + retval = QtWidgets.QMessageBox.question( + self.mainWindow, "Backup Fail", + "Could not make a backup of old compiled code. Proceed anyway to compile and overwrite?", + QtWidgets.QMessageBox.Yes, QtWidgets.QMessageBox.No) + if retval == QtWidgets.QMessageBox.No: + return "" + + compileCommand = compilerFile + ' ' + pattern_file + print(compileCommand) + print("Compiling pattern code to .pat file") + exit_status = os.system(compileCommand) + if exit_status != 0: + QtWidgets.QMessageBox.warning(self.mainWindow, "Compile Fail", "Could not compile pattern.", + QtWidgets.QMessageBox.Ok) + return "" + pattern_file += 'at' + + return pattern_file + + def getCompiledPatFname(self): + if self.view.checkBoxCompile.isChecked(): + pattern_file = self.compilePattern() + # pat name from pattern field + else: + pattern_file = self.view.lineEditPatternFile.text() + if not pattern_file: + QtWidgets.QMessageBox.warning(self.mainWindow, "Pattern Fail", + "No pattern file selected. Please select one.", QtWidgets.QMessageBox.Ok) + return "" + return pattern_file + + def loadPattern(self): + pattern_file = self.getCompiledPatFname() + if not pattern_file: + return + # load pattern + self.det.pattern = pattern_file + self.view.lineEditPatternFile.setText(self.det.patfname[0]) + + def getPatViewerColors(self): + colorLevel = self.view.comboBoxPatColorSelect.currentIndex() + color = self.colors_plot[colorLevel] + self.view.comboBoxPatColor.currentIndexChanged.disconnect() + self.view.comboBoxPatColor.setCurrentIndex(Defines.Colors.index(color)) + self.view.comboBoxPatColor.currentIndexChanged.connect(self.updatePatViewerParameters) + + def getPatViewerWaitParameters(self): + waitLevel = self.view.comboBoxPatWait.currentIndex() + color = self.colors_wait[waitLevel] + line_style = self.linestyles_wait[waitLevel] + alpha = self.alpha_wait[waitLevel] + alpha_rect = self.alpha_wait_rect[waitLevel] + + self.view.comboBoxPatWaitColor.currentIndexChanged.disconnect() + self.view.comboBoxPatWaitLineStyle.currentIndexChanged.disconnect() + self.view.doubleSpinBoxWaitAlpha.editingFinished.disconnect() + self.view.doubleSpinBoxWaitAlphaRect.editingFinished.disconnect() + + self.view.comboBoxPatWaitColor.setCurrentIndex(Defines.Colors.index(color)) + self.view.comboBoxPatWaitLineStyle.setCurrentIndex(Defines.LineStyles.index(line_style)) + self.view.doubleSpinBoxWaitAlpha.setValue(alpha) + self.view.doubleSpinBoxWaitAlphaRect.setValue(alpha_rect) + + self.view.comboBoxPatWaitColor.currentIndexChanged.connect(self.updatePatViewerParameters) + self.view.comboBoxPatWaitLineStyle.currentIndexChanged.connect(self.updatePatViewerParameters) + self.view.doubleSpinBoxWaitAlpha.editingFinished.connect(self.updatePatViewerParameters) + self.view.doubleSpinBoxWaitAlphaRect.editingFinished.connect(self.updatePatViewerParameters) + + def getPatViewerLoopParameters(self): + loopLevel = self.view.comboBoxPatLoop.currentIndex() + color = self.colors_loop[loopLevel] + line_style = self.linestyles_loop[loopLevel] + alpha = self.alpha_loop[loopLevel] + alpha_rect = self.alpha_loop_rect[loopLevel] + + self.view.comboBoxPatLoopColor.currentIndexChanged.disconnect() + self.view.comboBoxPatLoopLineStyle.currentIndexChanged.disconnect() + self.view.doubleSpinBoxLoopAlpha.editingFinished.disconnect() + self.view.doubleSpinBoxLoopAlphaRect.editingFinished.disconnect() + + self.view.comboBoxPatLoopColor.setCurrentIndex(Defines.Colors.index(color)) + self.view.comboBoxPatLoopLineStyle.setCurrentIndex(Defines.LineStyles.index(line_style)) + self.view.doubleSpinBoxLoopAlpha.setValue(alpha) + self.view.doubleSpinBoxLoopAlphaRect.setValue(alpha_rect) + + self.view.comboBoxPatLoopColor.currentIndexChanged.connect(self.updatePatViewerParameters) + self.view.comboBoxPatLoopLineStyle.currentIndexChanged.connect(self.updatePatViewerParameters) + self.view.doubleSpinBoxLoopAlpha.editingFinished.connect(self.updatePatViewerParameters) + self.view.doubleSpinBoxLoopAlphaRect.editingFinished.connect(self.updatePatViewerParameters) + + # only at start up + def updateDefaultPatViewerParameters(self): + self.colors_plot = Defines.Colors_plot.copy() + self.colors_wait = Defines.Colors_wait.copy() + self.linestyles_wait = Defines.Linestyles_wait.copy() + self.alpha_wait = Defines.Alpha_wait.copy() + self.alpha_wait_rect = Defines.Alpha_wait_rect.copy() + self.colors_loop = Defines.Colors_loop.copy() + self.linestyles_loop = Defines.Linestyles_loop.copy() + self.alpha_loop = Defines.Alpha_loop.copy() + self.alpha_loop_rect = Defines.Alpha_loop_rect.copy() + self.clock_vertical_lines_spacing = Defines.Clock_vertical_lines_spacing + self.show_clocks_number = Defines.Show_clocks_number + self.line_width = Defines.Line_width + + # print('default') + # self.printPatViewerParameters() + + def updatePatViewerParameters(self): + colorLevel = self.view.comboBoxPatColorSelect.currentIndex() + color = self.view.comboBoxPatColor.currentIndex() + # self.colors_plot[colorLevel] = f'tab:{Defines.Colors[color].lower()}' + self.colors_plot[colorLevel] = Defines.Colors[color] + + waitLevel = self.view.comboBoxPatWait.currentIndex() + color = self.view.comboBoxPatWaitColor.currentIndex() + line_style = self.view.comboBoxPatWaitLineStyle.currentIndex() + alpha = self.view.doubleSpinBoxWaitAlpha.value() + alpha_rect = self.view.doubleSpinBoxWaitAlphaRect.value() + + self.colors_wait[waitLevel] = Defines.Colors[color] + self.linestyles_wait[waitLevel] = Defines.LineStyles[line_style] + self.alpha_wait[waitLevel] = alpha + self.alpha_wait_rect[waitLevel] = alpha_rect + + loopLevel = self.view.comboBoxPatLoop.currentIndex() + color = self.view.comboBoxPatLoopColor.currentIndex() + line_style = self.view.comboBoxPatLoopLineStyle.currentIndex() + alpha = self.view.doubleSpinBoxLoopAlpha.value() + alpha_rect = self.view.doubleSpinBoxLoopAlphaRect.value() + + self.colors_loop[loopLevel] = Defines.Colors[color] + self.linestyles_loop[loopLevel] = Defines.LineStyles[line_style] + self.alpha_loop[loopLevel] = alpha + self.alpha_loop_rect[loopLevel] = alpha_rect + + self.clock_vertical_lines_spacing = self.view.spinBoxPatClockSpacing.value() + self.show_clocks_number = self.view.checkBoxPatShowClockNumber.isChecked() + self.line_width = self.view.doubleSpinBoxLineWidth.value() + + # for debugging + # self.printPatViewerParameters() + + def printPatViewerParameters(self): + print('Pattern Viewer Parameters:') + print(f'\tcolor1: {self.colors_plot[0]}, color2: {self.colors_plot[1]}') + print(f"\twait color: {self.colors_wait}") + print(f"\twait linestyles: {self.linestyles_wait}") + print(f"\twait alpha: {self.alpha_wait}") + print(f"\twait alpha rect: {self.alpha_wait_rect}") + print(f"\tloop color: {self.colors_loop}") + print(f"\tloop linestyles: {self.linestyles_loop}") + print(f"\tloop alpha: {self.alpha_loop}") + print(f"\tloop alpha rect: {self.alpha_loop_rect}") + print(f'\tclock vertical lines spacing: {self.clock_vertical_lines_spacing}') + print(f'\tshow clocks number: {self.show_clocks_number}') + print(f'\tline width: {self.line_width}') + print('\n') + + def viewPattern(self): + self.plotTab.showPatternViewer(True) + pattern_file = self.getCompiledPatFname() + if not pattern_file: + return + + signalNames = self.det.getSignalNames() + p = PlotPattern( + pattern_file, + signalNames, + self.colors_plot, + self.colors_wait, + self.linestyles_wait, + self.alpha_wait, + self.alpha_wait_rect, + self.colors_loop, + self.linestyles_loop, + self.alpha_loop, + self.alpha_loop_rect, + self.clock_vertical_lines_spacing, + self.show_clocks_number, + self.line_width, + ) + + plt.close(self.figure) + self.mainWindow.gridLayoutPatternViewer.removeWidget(self.canvas) + self.canvas.close() + self.mainWindow.gridLayoutPatternViewer.removeWidget(self.toolbar) + self.toolbar.close() + + try: + self.figure = p.patternPlot() + self.canvas = FigureCanvas(self.figure) + self.toolbar = NavigationToolbar(self.canvas, self.view) + self.mainWindow.gridLayoutPatternViewer.addWidget(self.toolbar) + self.mainWindow.gridLayoutPatternViewer.addWidget(self.canvas) + except Exception as e: + QtWidgets.QMessageBox.warning(self.mainWindow, "Pattern Viewer Fail", str(e), QtWidgets.QMessageBox.Ok) + pass + + def saveParameters(self) -> list[str]: + commands = [] + for i in range(Defines.pattern.loops_count): + commands.append(f"patnloop {i} {getattr(self.view, f'spinBoxLoop{i}Repetition').text()}") + commands.append(f"patloop {i} {getattr(self.view, f'lineEditLoop{i}Start').text()}, " + f"{getattr(self.view, f'lineEditLoop{i}Stop').text()}") + + commands.append(f"patwait {i} {getattr(self.view, f'lineEditLoop{i}Wait').text()}") + commands.append(f"patwaittime {i} {getattr(self.view, f'spinBoxLoop{i}WaitTime').text()}") + commands.append(f"patlimits {self.view.lineEditStartAddress.text()}, {self.view.lineEditStopAddress.text()}") + # commands.append(f"patfname {self.view.lineEditPatternFile.text()}") + return commands diff --git a/pyctbgui/pyctbgui/services/Plot.py b/pyctbgui/pyctbgui/services/Plot.py new file mode 100644 index 000000000..0dfedd205 --- /dev/null +++ b/pyctbgui/pyctbgui/services/Plot.py @@ -0,0 +1,519 @@ +import logging +from functools import partial +import random +from pathlib import Path + +import numpy as np +from PyQt5 import QtWidgets, QtGui, uic + +import pyqtgraph as pg +from pyctbgui.utils import recordOrApplyPedestal +from pyqtgraph import PlotWidget + +from pyctbgui.utils.defines import Defines + + +class PlotTab(QtWidgets.QWidget): + + def __init__(self, parent): + super().__init__(parent) + self.frame_min: float = 0.0 + self.frame_max: float = 0.0 + uic.loadUi(Path(__file__).parent.parent / 'ui' / "plot.ui", parent) + self.view = parent + self.mainWindow = None + self.det = None + self.signalsTab = None + self.transceiverTab = None + self.acquisitionTab = None + self.adcTab = None + self.cmin: float = 0.0 + self.cmax: float = 0.0 + self.colorRangeMode: Defines.colorRange = Defines.colorRange.all + self.ignoreHistogramSignal: bool = False + self.imagePlots: list[PlotWidget] = [] + # list of callback functions to notify tabs when we should hide their legend + # follows the observer design pattern + self.hideLegendObservers = [] + self.pedestalRecord: bool = False + self.pedestalApply: bool = True + self.__acqFrames = None + self.logger = logging.getLogger('PlotTab') + + def setup_ui(self): + self.signalsTab = self.mainWindow.signalsTab + self.transceiverTab = self.mainWindow.transceiverTab + self.acquisitionTab = self.mainWindow.acquisitionTab + self.adcTab = self.mainWindow.adcTab + self.initializeColorMaps() + + self.imagePlots = ( + self.mainWindow.plotAnalogImage, + self.mainWindow.plotDigitalImage, + self.mainWindow.plotTransceiverImage, + ) + + def connect_ui(self): + self.view.radioButtonNoPlot.clicked.connect(self.plotOptions) + self.view.radioButtonWaveform.clicked.connect(self.plotOptions) + self.view.radioButtonDistribution.clicked.connect(self.plotOptions) + self.view.radioButtonImage.clicked.connect(self.plotOptions) + self.view.comboBoxPlot.currentIndexChanged.connect(self.setPixelMap) + self.view.comboBoxColorMap.currentIndexChanged.connect(self.setColorMap) + self.view.comboBoxZMQHWM.currentIndexChanged.connect(self.setZMQHWM) + self.view.spinBoxSerialOffset.editingFinished.connect(self.setSerialOffset) + self.view.spinBoxNCount.editingFinished.connect(self.setNCounter) + self.view.spinBoxDynamicRange.editingFinished.connect(self.setDynamicRange) + self.view.spinBoxImageX.editingFinished.connect(self.setImageX) + self.view.spinBoxImageY.editingFinished.connect(self.setImageY) + + self.view.radioButtonPedestalRecord.toggled.connect(self.togglePedestalRecord) + self.view.radioButtonPedestalApply.toggled.connect(self.togglePedestalApply) + self.view.pushButtonPedestalReset.clicked.connect(self.resetPedestal) + self.view.pushButtonSavePedestal.clicked.connect(self.savePedestal) + self.view.pushButtonLoadPedestal.clicked.connect(self.loadPedestal) + + self.view.checkBoxRaw.stateChanged.connect(self.setRawData) + self.view.spinBoxRawMin.editingFinished.connect(self.setRawData) + self.view.spinBoxRawMax.editingFinished.connect(self.setRawData) + self.view.checkBoxPedestal.stateChanged.connect(self.setPedestalSubtract) + self.view.spinBoxPedestalMin.editingFinished.connect(self.setPedestalSubtract) + self.view.spinBoxPedestalMax.editingFinished.connect(self.setPedestalSubtract) + self.view.spinBoxFit.editingFinished.connect(self.setFitADC) + self.view.spinBoxPlot.editingFinished.connect(self.setPlotBit) + self.view.pushButtonReferesh.clicked.connect(self.acquisitionTab.refresh) + # color range widgets + self.view.cminSpinBox.editingFinished.connect(self.setCmin) + self.view.cmaxSpinBox.editingFinished.connect(self.setCmax) + self.view.radioButtonAutomatic.clicked.connect(partial(self.setColorRangeMode, Defines.colorRange.all)) + self.view.radioButtonFixed.clicked.connect(partial(self.setColorRangeMode, Defines.colorRange.fixed)) + self.view.radioButtonCenter.clicked.connect(partial(self.setColorRangeMode, Defines.colorRange.center)) + + for plot in self.imagePlots: + plot.scene.sigMouseMoved.connect(partial(self.showPlotValues, plot)) + plot.getHistogramWidget().item.sigLevelChangeFinished.connect(partial(self.handleHistogramChange, plot)) + + self.view.checkBoxShowLegend.stateChanged.connect(self.toggleLegend) + + def refresh(self): + self.getZMQHWM() + + def initializeColorMaps(self): + self.view.comboBoxColorMap.addItems(Defines.Color_map) + self.view.comboBoxColorMap.setCurrentIndex(Defines.Color_map.index(Defines.Default_Color_Map)) + self.setColorMap() + + def savePedestal(self): + """ + slot function to save pedestal values + """ + response = QtWidgets.QFileDialog.getSaveFileName(self.view, "Save Pedestal", str(self.det.fpath)) + recordOrApplyPedestal.savePedestal(Path(response[0])) + self.logger.info(f'saved Pedestal in {response[0]}') + + def loadPedestal(self): + """ + slot function to load pedestal values + """ + response = QtWidgets.QFileDialog.getOpenFileName(self.view, "Load Pedestal", str(self.det.fpath)) + if response[0] == '': + return + recordOrApplyPedestal.reset(self) + try: + recordOrApplyPedestal.loadPedestal(Path(response[0])) + except (IsADirectoryError, ValueError, EOFError): + QtWidgets.QMessageBox.warning( + self.view, + "Loading Pedestal Failed", + "Loading Pedestal failed make sure the file is in the valid .npy format", + QtWidgets.QMessageBox.Ok, + ) + self.logger.exception("Exception when loading pedestal") + else: + self.logger.info(f'loaded Pedestal from {response[0]}') + self.updateLabelPedestalFrames(True) + + def togglePedestalRecord(self): + """ + slot function for pedestal record radio button + toggle pedestal record variable and disables the frames spinboxes in acquisition tab or plot tab depenging on + the mode + """ + self.pedestalRecord = not self.pedestalRecord + + def togglePedestalApply(self): + """ + slot function for pedestal apply radio button + """ + self.pedestalApply = not self.pedestalApply + + def resetPedestal(self): + """ + slot function for resetting the pedestal + """ + recordOrApplyPedestal.reset(self) + + def updateLabelPedestalFrames(self, loadedPedestal=False): + """ + updates labelPedestalFrames to the length of savedFrames + """ + if loadedPedestal: + self.view.labelPedestalFrames.setText('using loaded pedestal file') + else: + self.view.labelPedestalFrames.setText(f'recorded frames: {recordOrApplyPedestal.getFramesCount()}') + + def subscribeToggleLegend(self, fn_cbk): + """ + subscribe to the event of toggling the hide legend checkbox by subscribing + with a callback function + """ + self.hideLegendObservers.append(fn_cbk) + + def toggleLegend(self): + """ + notify subscribers for the showLegend checkbox event by executing their callbacks + """ + self.mainWindow.showLegend = not self.mainWindow.showLegend + for notify_function in self.hideLegendObservers: + notify_function() + + def setCmin(self, value=None): + """ + slot for setting cmin from cminSpinBox + also used as a normal function + """ + if value is None: + self.cmin = self.view.cminSpinBox.value() + else: + self.cmin = value + self.updateColorRangeUI() + + def setCmax(self, value=None): + """ + slot for setting cmax from cmaxSpinBox + also used as a normal function + """ + if value is None: + self.cmax = self.view.cmaxSpinBox.value() + else: + self.cmax = value + self.updateColorRangeUI() + + def setColorRangeMode(self, mode): + """ + slot for setting the color range mode (all,fixed,3-97%) + """ + self.colorRangeMode = mode + + # disable or enable cmin/cmax spinboxes + enableSpinBoxes = mode == Defines.colorRange.fixed + self.view.cminSpinBox.setEnabled(enableSpinBoxes) + self.view.cmaxSpinBox.setEnabled(enableSpinBoxes) + self.updateColorRange() + self.updateColorRangeUI() + + def handleHistogramChange(self, plot): + """ + slot called after changing the color bar + This is called even when pyqtgraph sets the image without any user intervention + the class attribute ignore_histogram_signal is set to False before setting the image + so that we can distinguish between the signal originates from pyqt or from the user + """ + if not self.ignoreHistogramSignal: + self.cmin, self.cmax = plot.getHistogramWidget().item.getLevels() + self.setCmin(self.cmin) + self.setCmax(self.cmax) + + self.ignoreHistogramSignal = False + # self.setColorRangeMode(Defines.colorRange.fixed) + + def setFrameLimits(self, frame): + """ + function called from AcquisitionTab::read_zmq to get the maximum and minimum + values of the decoded frame and save them in frame_min/frame_max + """ + self.frame_min = np.min(frame) + self.frame_max = np.max(frame) + self.updateColorRange() + + def updateColorRange(self): + """ + for mode: + - all: sets cmin and cmax to the maximums/minimum values of the frame + - 3-97%: limits cmax and cmin so that we ignore 3% from each end of the whole range + - fixed: this function does not change cmin and cmax + """ + + if self.colorRangeMode == Defines.colorRange.all: + self.cmin = self.frame_min + self.cmax = self.frame_max + elif self.colorRangeMode == Defines.colorRange.center: + self.cmin = self.frame_min + 0.03 * (self.frame_max - self.frame_min) + self.cmax = self.frame_max - 0.03 * (self.frame_max - self.frame_min) + + self.updateColorRangeUI() + + def updateColorRangeUI(self): + """ + updates UI views should be called after every change to cmin or cmax + """ + for plot in self.imagePlots: + plot.getHistogramWidget().item.setLevels(min=self.cmin, max=self.cmax) + self.view.cminSpinBox.setValue(self.cmin) + self.view.cmaxSpinBox.setValue(self.cmax) + + def setColorMap(self): + cm = pg.colormap.getFromMatplotlib(self.view.comboBoxColorMap.currentText()) + # print(f'color map:{self.comboBoxColorMap.currentText()}') + self.mainWindow.plotAnalogImage.setColorMap(cm) + self.mainWindow.plotDigitalImage.setColorMap(cm) + self.mainWindow.plotTransceiverImage.setColorMap(cm) + + def getZMQHWM(self): + + self.view.comboBoxZMQHWM.currentIndexChanged.disconnect() + + rx_zmq_hwm = self.det.getRxZmqHwm()[0] + # ensure same value in client zmq + self.det.setClientZmqHwm(rx_zmq_hwm) + + # high readout, low HWM + if -1 < rx_zmq_hwm < 25: + self.view.comboBoxZMQHWM.setCurrentIndex(1) + # low readout, high HWM + else: + self.view.comboBoxZMQHWM.setCurrentIndex(0) + self.view.comboBoxZMQHWM.currentIndexChanged.connect(self.setZMQHWM) + + def setZMQHWM(self): + val = self.view.comboBoxZMQHWM.currentIndex() + # low readout, high HWM + if val == 0: + self.det.setRxZmqHwm(Defines.Zmq_hwm_low_speed) + self.det.setClientZmqHwm(Defines.Zmq_hwm_low_speed) + # high readout, low HWM + else: + self.det.setRxZmqHwm(Defines.Zmq_hwm_high_speed) + self.det.setClientZmqHwm(Defines.Zmq_hwm_high_speed) + + self.getZMQHWM() + + def addSelectedAnalogPlots(self, i): + enable = getattr(self.adcTab.view, f"checkBoxADC{i}Plot").isChecked() + if enable: + self.mainWindow.analogPlots[i].show() + if not enable: + self.mainWindow.analogPlots[i].hide() + + def addAllSelectedAnalogPlots(self): + for i in range(Defines.adc.count): + self.addSelectedAnalogPlots(i) + + def removeAllAnalogPlots(self): + for i in range(Defines.adc.count): + self.mainWindow.analogPlots[i].hide() + + cm = pg.colormap.get('CET-L9') # prepare a linear color map + self.mainWindow.plotDigitalImage.setColorMap(cm) + + def addSelectedDigitalPlots(self, i): + enable = getattr(self.signalsTab.view, f"checkBoxBIT{i}Plot").isChecked() + if enable: + self.mainWindow.digitalPlots[i].show() + if not enable: + self.mainWindow.digitalPlots[i].hide() + + def addAllSelectedDigitalPlots(self): + for i in range(Defines.signals.count): + self.addSelectedDigitalPlots(i) + + def removeAllDigitalPlots(self): + for i in range(Defines.signals.count): + self.mainWindow.digitalPlots[i].hide() + + def addSelectedTransceiverPlots(self, i): + enable = getattr(self.transceiverTab.view, f"checkBoxTransceiver{i}Plot").isChecked() + if enable: + self.mainWindow.transceiverPlots[i].show() + if not enable: + self.mainWindow.transceiverPlots[i].hide() + + def addAllSelectedTransceiverPlots(self): + for i in range(Defines.transceiver.count): + self.addSelectedTransceiverPlots(i) + + def removeAllTransceiverPlots(self): + for i in range(Defines.transceiver.count): + self.mainWindow.transceiverPlots[i].hide() + + def showPlot(self): + self.mainWindow.plotAnalogWaveform.hide() + self.mainWindow.plotDigitalWaveform.hide() + self.mainWindow.plotTransceiverWaveform.hide() + self.mainWindow.plotAnalogImage.hide() + self.mainWindow.plotDigitalImage.hide() + self.mainWindow.plotTransceiverImage.hide() + self.view.labelDigitalWaveformOption.setDisabled(True) + self.view.radioButtonOverlay.setDisabled(True) + self.view.radioButtonStripe.setDisabled(True) + + if self.mainWindow.romode.value in [0, 2]: + if self.view.radioButtonWaveform.isChecked(): + self.mainWindow.plotAnalogWaveform.show() + elif self.view.radioButtonImage.isChecked(): + self.mainWindow.plotAnalogImage.show() + if self.mainWindow.romode.value in [1, 2, 4]: + if self.view.radioButtonWaveform.isChecked(): + self.mainWindow.plotDigitalWaveform.show() + elif self.view.radioButtonImage.isChecked(): + self.mainWindow.plotDigitalImage.show() + self.view.labelDigitalWaveformOption.setEnabled(True) + self.view.radioButtonOverlay.setEnabled(True) + self.view.radioButtonStripe.setEnabled(True) + + if self.mainWindow.romode.value in [3, 4]: + if self.view.radioButtonWaveform.isChecked(): + self.mainWindow.plotTransceiverWaveform.show() + elif self.view.radioButtonImage.isChecked(): + self.mainWindow.plotTransceiverImage.show() + + def plotOptions(self): + + self.mainWindow.framePatternViewer.hide() + self.showPlot() + + # disable plotting + self.mainWindow.read_timer.stop() + + if self.view.radioButtonWaveform.isChecked(): + self.mainWindow.plotAnalogWaveform.setLabel( + 'left', "Output [ADC]") + self.mainWindow.plotAnalogWaveform.setLabel( + 'bottom', "Analog Sample [#]") + self.mainWindow.plotDigitalWaveform.setLabel( + 'left', "Digital Bit") + self.mainWindow.plotDigitalWaveform.setLabel( + 'bottom', "Digital Sample [#]") + self.mainWindow.plotTransceiverWaveform.setLabel( + 'left', "Transceiver Bit") + self.mainWindow.plotTransceiverWaveform.setLabel( + 'bottom', "Transceiver Sample [#]") + + self.view.stackedWidgetPlotType.setCurrentIndex(0) + + elif self.view.radioButtonImage.isChecked(): + self.view.stackedWidgetPlotType.setCurrentIndex(2) + self.setPixelMap() + + if self.view.radioButtonNoPlot.isChecked(): + self.view.labelPlotOptions.hide() + self.view.stackedWidgetPlotType.hide() + # enable plotting + else: + self.view.labelPlotOptions.show() + self.view.stackedWidgetPlotType.show() + self.mainWindow.read_timer.start(Defines.Time_Plot_Refresh_ms) + + def setPixelMap(self): + if self.view.comboBoxPlot.currentText() == "Matterhorn": + self.mainWindow.nTransceiverRows = Defines.Matterhorn.nRows + self.mainWindow.nTransceiverCols = Defines.Matterhorn.nCols + elif self.view.comboBoxPlot.currentText() == "Moench04": + self.mainWindow.nAnalogRows = Defines.Moench04.nRows + self.mainWindow.nAnalogCols = Defines.Moench04.nCols + + def showPatternViewer(self, enable): + if enable: + self.mainWindow.framePatternViewer.show() + self.mainWindow.framePlot.hide() + elif self.mainWindow.framePatternViewer.isVisible(): + self.mainWindow.framePatternViewer.hide() + self.mainWindow.framePlot.show() + self.showPlot() + + def setSerialOffset(self): + print("plot options - Not implemented yet") + # TODO: + + def setNCounter(self): + print("plot options - Not implemented yet") + # TODO: + + def setDynamicRange(self): + print("plot options - Not implemented yet") + # TODO: + + def setImageX(self): + print("plot options - Not implemented yet") + # TODO: + + def setImageY(self): + print("plot options - Not implemented yet") + # TODO: + + def setRawData(self): + print("plot options - Not implemented yet") + # TODO: raw data, min, max + + def setPedestalSubtract(self): + print("plot options - Not implemented yet") + # TODO: pedestal, min, max + + def setFitADC(self): + print("plot options - Not implemented yet") + # TODO: + + def setPlotBit(self): + print("plot options - Not implemented yet") + # TODO: + + def getRandomColor(self): + ''' + Returns a random color range (except white) in format string eg. "#aabbcc" + ''' + randomColor = random.randrange(0, 0xffffaa, 0xaa) + return "#{:06x}".format(randomColor) + + def getActiveColor(self, button): + return button.palette().color(QtGui.QPalette.Window) + + def setActiveColor(self, button, str_color): + button.setStyleSheet(":enabled {background-color: %s" % str_color + "} :disabled {background-color: grey}") + + def showPalette(self, button): + color = QtWidgets.QColorDialog.getColor() + if color.isValid(): + self.setActiveColor(button, color.name()) + # get the RGB Values + # print(color.getRgb()) + + def showPlotValues(self, sender, pos): + x = sender.getImageItem().mapFromScene(pos).x() + y = sender.getImageItem().mapFromScene(pos).y() + val = 0 + nMaxY = self.mainWindow.nAnalogRows + nMaxX = self.mainWindow.nAnalogCols + frame = self.mainWindow.analog_frame + if sender == self.mainWindow.plotDigitalImage: + nMaxY = self.mainWindow.nDigitalRows + nMaxX = self.mainWindow.nDigitalCols + frame = self.mainWindow.digital_frame + elif sender == self.mainWindow.plotTransceiverImage: + nMaxY = self.mainWindow.nTransceiverRows + nMaxX = self.mainWindow.nTransceiverCols + frame = self.mainWindow.transceiver_frame + if 0 <= x < nMaxX and 0 <= y < nMaxY and not np.array_equal(frame, []): + val = frame[int(x), int(y)] + message = f'[{x:.2f}, {y:.2f}] = {val:.2f}' + sender.setToolTip(message) + # print(message) + else: + sender.setToolTip('') + + def saveParameters(self): + commands = [] + if self.view.comboBoxZMQHWM.currentIndex() == 0: + commands.append(f"zmqhwm {Defines.Zmq_hwm_low_speed}") + else: + commands.append(f"zmqhwm {Defines.Zmq_hwm_high_speed}") + return commands diff --git a/pyctbgui/pyctbgui/services/PowerSupplies.py b/pyctbgui/pyctbgui/services/PowerSupplies.py new file mode 100644 index 000000000..ec8d2f5dd --- /dev/null +++ b/pyctbgui/pyctbgui/services/PowerSupplies.py @@ -0,0 +1,123 @@ +from functools import partial +from pathlib import Path + +from PyQt5 import QtWidgets, uic +from pyctbgui.utils.defines import Defines + +from slsdet import dacIndex + + +class PowerSuppliesTab(QtWidgets.QWidget): + + def __init__(self, parent): + super().__init__(parent) + uic.loadUi(Path(__file__).parent.parent / 'ui' / "powerSupplies.ui", parent) + self.view = parent + + def refresh(self): + self.updateVoltageNames() + for i in Defines.powerSupplies: + self.getVoltage(i) + self.getCurrent(i) + + def connect_ui(self): + for i in Defines.powerSupplies: + spinBox = getattr(self.view, f"spinBoxV{i}") + checkBox = getattr(self.view, f"checkBoxV{i}") + spinBox.editingFinished.connect(partial(self.setVoltage, i)) + checkBox.stateChanged.connect(partial(self.setVoltage, i)) + self.view.pushButtonPowerOff.clicked.connect(self.powerOff) + + def setup_ui(self): + for i in Defines.powerSupplies: + dac = getattr(dacIndex, f"V_POWER_{i}") + spinBox = getattr(self.view, f"spinBoxV{i}") + checkBox = getattr(self.view, f"checkBoxV{i}") + retval = self.det.getPower(dac)[0] + spinBox.setValue(retval) + if retval == 0: + checkBox.setChecked(False) + spinBox.setDisabled(True) + + def updateVoltageNames(self): + retval = self.det.getPowerNames() + getattr(self.view, "checkBoxVA").setText(retval[0]) + getattr(self.view, "checkBoxVB").setText(retval[1]) + getattr(self.view, "checkBoxVC").setText(retval[2]) + getattr(self.view, "checkBoxVD").setText(retval[3]) + getattr(self.view, "checkBoxVIO").setText(retval[4]) + + def getVoltage(self, i): + spinBox = getattr(self.view, f"spinBoxV{i}") + checkBox = getattr(self.view, f"checkBoxV{i}") + voltageIndex = getattr(dacIndex, f"V_POWER_{i}") + label = getattr(self.view, f"labelV{i}") + + spinBox.editingFinished.disconnect() + checkBox.stateChanged.disconnect() + + retval = self.det.getMeasuredPower(voltageIndex)[0] + # spinBox.setValue(retval) + if retval > 1: + checkBox.setChecked(True) + if checkBox.isChecked(): + spinBox.setEnabled(True) + else: + spinBox.setDisabled(True) + label.setText(f'{str(retval)} mV') + + spinBox.editingFinished.connect(partial(self.setVoltage, i)) + checkBox.stateChanged.connect(partial(self.setVoltage, i)) + + self.getVChip() + + # TODO: handle multiple events when pressing enter (twice) + + def setVoltage(self, i): + checkBox = getattr(self.view, f"checkBoxV{i}") + spinBox = getattr(self.view, f"spinBoxV{i}") + voltageIndex = getattr(dacIndex, f"V_POWER_{i}") + spinBox.editingFinished.disconnect() + + value = 0 + if checkBox.isChecked(): + value = spinBox.value() + try: + self.det.setPower(voltageIndex, value) + except Exception as e: + QtWidgets.QMessageBox.warning(self.mainWindow, "Voltage Fail", str(e), QtWidgets.QMessageBox.Ok) + pass + + # TODO: (properly) disconnecting and connecting to handle multiple events (out of focus and pressing enter). + spinBox.editingFinished.connect(partial(self.setVoltage, i)) + self.getVoltage(i) + self.getCurrent(i) + + def getCurrent(self, i): + label = getattr(self.view, f"labelI{i}") + currentIndex = getattr(dacIndex, f"I_POWER_{i}") + retval = self.det.getMeasuredCurrent(currentIndex)[0] + label.setText(f'{str(retval)} mA') + + def getVChip(self): + self.view.spinBoxVChip.setValue(self.det.getPower(dacIndex.V_POWER_CHIP)[0]) + + def powerOff(self): + for i in Defines.powerSupplies: + # set all voltages to 0 + checkBox = getattr(self.view, f"checkBoxV{i}") + checkBox.stateChanged.disconnect() + checkBox.setChecked(False) + checkBox.stateChanged.connect(partial(self.setVoltage, i)) + self.setVoltage(i) + + def saveParameters(self) -> list: + commands = [] + for i in Defines.powerSupplies: + enabled = getattr(self.view, f"checkBoxV{i}").isChecked() + if enabled: + value = getattr(self.view, f"spinBoxV{i}").value() + commands.append(f"v_{i.lower()} {value}") + else: + commands.append(f"v_{i.lower()} 0") + return commands diff --git a/pyctbgui/pyctbgui/services/Signals.py b/pyctbgui/pyctbgui/services/Signals.py new file mode 100644 index 000000000..a06b9a412 --- /dev/null +++ b/pyctbgui/pyctbgui/services/Signals.py @@ -0,0 +1,373 @@ +from functools import partial +from pathlib import Path + +import numpy as np +from PyQt5 import QtWidgets, uic +import pyqtgraph as pg +from pyqtgraph import LegendItem + +from pyctbgui.utils.bit_utils import bit_is_set, manipulate_bit +from pyctbgui.utils.defines import Defines +from pyctbgui.utils.recordOrApplyPedestal import recordOrApplyPedestal + + +class SignalsTab(QtWidgets.QWidget): + + def __init__(self, parent): + super().__init__(parent) + uic.loadUi(Path(__file__).parent.parent / 'ui' / "signals.ui", parent) + self.view = parent + self.mainWindow = None + self.det = None + self.plotTab = None + self.legend: LegendItem | None = None + self.rx_dbitoffset = None + self.rx_dbitlist = None + + def refresh(self): + self.updateSignalNames() + self.updateDigitalBitEnable() + self.updateIOOut() + self.getDBitOffset() + + def connect_ui(self): + for i in range(Defines.signals.count): + getattr(self.view, f"checkBoxBIT{i}DB").stateChanged.connect(partial(self.setDigitalBitEnable, i)) + getattr(self.view, f"checkBoxBIT{i}Out").stateChanged.connect(partial(self.setIOOut, i)) + getattr(self.view, f"checkBoxBIT{i}Plot").stateChanged.connect(partial(self.setEnableBitPlot, i)) + getattr(self.view, f"pushButtonBIT{i}").clicked.connect(partial(self.selectBitColor, i)) + self.view.checkBoxBIT0_31DB.stateChanged.connect( + partial(self.setDigitalBitEnableRange, 0, Defines.signals.half)) + self.view.checkBoxBIT32_63DB.stateChanged.connect( + partial(self.setDigitalBitEnableRange, Defines.signals.half, Defines.signals.count)) + self.view.checkBoxBIT0_31Plot.stateChanged.connect(partial(self.setEnableBitPlotRange, 0, + Defines.signals.half)) + self.view.checkBoxBIT32_63Plot.stateChanged.connect( + partial(self.setEnableBitPlotRange, Defines.signals.half, Defines.signals.count)) + self.view.checkBoxBIT0_31Out.stateChanged.connect(partial(self.setIOOutRange, 0, Defines.signals.half)) + self.view.checkBoxBIT32_63Out.stateChanged.connect( + partial(self.setIOOutRange, Defines.signals.half, Defines.signals.count)) + self.view.lineEditPatIOCtrl.editingFinished.connect(self.setIOOutReg) + self.view.spinBoxDBitOffset.editingFinished.connect(self.setDbitOffset) + + def setup_ui(self): + self.plotTab = self.mainWindow.plotTab + + for i in range(Defines.signals.count): + self.setDBitButtonColor(i, self.plotTab.getRandomColor()) + + self.initializeAllDigitalPlots() + + self.legend = self.mainWindow.plotDigitalWaveform.getPlotItem().legend + self.legend.clear() + # subscribe to toggle legend + self.plotTab.subscribeToggleLegend(self.updateLegend) + + def getEnabledPlots(self): + """ + return plots that are shown (checkBoxTransceiver{i}Plot is checked) + """ + enabledPlots = [] + self.legend.clear() + for i in range(Defines.signals.count): + if getattr(self.view, f'checkBoxBIT{i}Plot').isChecked(): + plotName = getattr(self.view, f"labelBIT{i}").text() + enabledPlots.append((self.mainWindow.digitalPlots[i], plotName)) + return enabledPlots + + def updateLegend(self): + """ + update the legend for the signals waveform plot + should be called after checking or unchecking plot checkbox + """ + if not self.mainWindow.showLegend: + self.legend.clear() + else: + for plot, name in self.getEnabledPlots(): + self.legend.addItem(plot, name) + + @recordOrApplyPedestal + def _processWaveformData(self, data, aSamples, dSamples, rx_dbitlist, isPlottedArray, rx_dbitoffset, romode, + nADCEnabled): + """ + transform raw waveform data into a processed numpy array + @param data: raw waveform data + """ + dbitoffset = rx_dbitoffset + if romode == 2: + dbitoffset += nADCEnabled * 2 * aSamples + digital_array = np.array(np.frombuffer(data, offset=dbitoffset, dtype=np.uint8)) + nbitsPerDBit = dSamples + if nbitsPerDBit % 8 != 0: + nbitsPerDBit += (8 - (dSamples % 8)) + offset = 0 + arr = [] + for i in rx_dbitlist: + # where numbits * numsamples is not a multiple of 8 + if offset % 8 != 0: + offset += (8 - (offset % 8)) + if not isPlottedArray[i]: + offset += nbitsPerDBit + return None + waveform = np.zeros(dSamples) + for iSample in range(dSamples): + # all samples for digital bit together from slsReceiver + index = int(offset / 8) + iBit = offset % 8 + bit = (digital_array[index] >> iBit) & 1 + waveform[iSample] = bit + offset += 1 + arr.append(waveform) + + return np.array(arr) + + def processWaveformData(self, data, aSamples, dSamples): + """ + view function + plots processed waveform data + data: raw waveform data + dsamples: digital samples + asamples: analog samples + """ + waveforms = {} + isPlottedArray = {i: getattr(self.view, f"checkBoxBIT{i}Plot").isChecked() for i in self.rx_dbitlist} + + digital_array = self._processWaveformData(data, aSamples, dSamples, self.rx_dbitlist, isPlottedArray, + self.rx_dbitoffset, self.mainWindow.romode.value, + self.mainWindow.nADCEnabled) + + irow = 0 + for idx, i in enumerate(self.rx_dbitlist): + # bits enabled but not plotting + waveform = digital_array[idx] + if waveform is None: + continue + self.mainWindow.digitalPlots[i].setData(waveform) + plotName = getattr(self.view, f"labelBIT{i}").text() + waveforms[plotName] = waveform + # TODO: left axis does not show 0 to 1, but keeps increasing + if self.plotTab.view.radioButtonStripe.isChecked(): + self.mainWindow.digitalPlots[i].setY(irow * 2) + irow += 1 + else: + self.mainWindow.digitalPlots[i].setY(0) + return waveforms + + def initializeAllDigitalPlots(self): + self.mainWindow.plotDigitalWaveform = pg.plot() + self.mainWindow.plotDigitalWaveform.addLegend(colCount=Defines.colCount) + self.mainWindow.verticalLayoutPlot.addWidget(self.mainWindow.plotDigitalWaveform, 3) + self.mainWindow.digitalPlots = {} + waveform = np.zeros(1000) + for i in range(Defines.signals.count): + pen = pg.mkPen(color=self.getDBitButtonColor(i), width=1) + legendName = getattr(self.view, f"labelBIT{i}").text() + self.mainWindow.digitalPlots[i] = self.mainWindow.plotDigitalWaveform.plot(waveform, + pen=pen, + name=legendName, + stepMode="left") + self.mainWindow.digitalPlots[i].hide() + + self.mainWindow.plotDigitalImage = pg.ImageView() + self.mainWindow.nDigitalRows = 0 + self.mainWindow.nDigitalCols = 0 + self.mainWindow.digital_frame = np.zeros((self.mainWindow.nDigitalRows, self.mainWindow.nDigitalCols)) + self.mainWindow.plotDigitalImage.setImage(self.mainWindow.digital_frame) + self.mainWindow.verticalLayoutPlot.addWidget(self.mainWindow.plotDigitalImage, 4) + + def updateSignalNames(self): + for i, name in enumerate(self.det.getSignalNames()): + getattr(self.view, f"labelBIT{i}").setText(name) + + def getDigitalBitEnable(self, i, dbitList): + checkBox = getattr(self.view, f"checkBoxBIT{i}DB") + checkBox.stateChanged.disconnect() + checkBox.setChecked(i in list(dbitList)) + checkBox.stateChanged.connect(partial(self.setDigitalBitEnable, i)) + + def updateDigitalBitEnable(self): + retval = self.det.rx_dbitlist + self.rx_dbitlist = list(retval) + self.mainWindow.nDBitEnabled = len(list(retval)) + for i in range(Defines.signals.count): + self.getDigitalBitEnable(i, retval) + self.getEnableBitPlot(i) + self.getEnableBitColor(i) + self.plotTab.addSelectedDigitalPlots(i) + self.getDigitalBitEnableRange(retval) + self.getEnableBitPlotRange() + + def setDigitalBitEnable(self, i): + bitList = self.det.rx_dbitlist + checkBox = getattr(self.view, f"checkBoxBIT{i}DB") + if checkBox.isChecked(): + bitList.append(i) + else: + bitList.remove(i) + self.det.rx_dbitlist = bitList + + self.updateDigitalBitEnable() + + def getDigitalBitEnableRange(self, dbitList): + self.view.checkBoxBIT0_31DB.stateChanged.disconnect() + self.view.checkBoxBIT32_63DB.stateChanged.disconnect() + self.view.checkBoxBIT0_31DB.setChecked(all(x in list(dbitList) for x in range(Defines.signals.half))) + self.view.checkBoxBIT32_63DB.setChecked( + all(x in list(dbitList) for x in range(Defines.signals.half, Defines.signals.count))) + self.view.checkBoxBIT0_31DB.stateChanged.connect( + partial(self.setDigitalBitEnableRange, 0, Defines.signals.half)) + self.view.checkBoxBIT32_63DB.stateChanged.connect( + partial(self.setDigitalBitEnableRange, Defines.signals.half, Defines.signals.count)) + + def setDigitalBitEnableRange(self, start_nr, end_nr): + bitList = self.det.rx_dbitlist + checkBox = getattr(self.view, f"checkBoxBIT{start_nr}_{end_nr - 1}DB") + for i in range(start_nr, end_nr): + if checkBox.isChecked(): + if i not in list(bitList): + bitList.append(i) + else: + if i in list(bitList): + bitList.remove(i) + self.det.rx_dbitlist = bitList + + self.updateDigitalBitEnable() + + def getEnableBitPlot(self, i): + checkBox = getattr(self.view, f"checkBoxBIT{i}DB") + checkBoxPlot = getattr(self.view, f"checkBoxBIT{i}Plot") + checkBoxPlot.setEnabled(checkBox.isChecked()) + + def setEnableBitPlot(self, i): + pushButton = getattr(self.view, f"pushButtonBIT{i}") + checkBox = getattr(self.view, f"checkBoxBIT{i}Plot") + pushButton.setEnabled(checkBox.isChecked()) + + self.getEnableBitPlotRange() + self.plotTab.addSelectedDigitalPlots(i) + self.updateLegend() + + def getEnableBitPlotRange(self): + self.view.checkBoxBIT0_31Plot.stateChanged.disconnect() + self.view.checkBoxBIT32_63Plot.stateChanged.disconnect() + self.view.checkBoxBIT0_31Plot.setEnabled( + all(getattr(self.view, f"checkBoxBIT{i}Plot").isEnabled() for i in range(Defines.signals.half))) + self.view.checkBoxBIT32_63Plot.setEnabled( + all( + getattr(self.view, f"checkBoxBIT{i}Plot").isEnabled() + for i in range(Defines.signals.half, Defines.signals.count))) + self.view.checkBoxBIT0_31Plot.setChecked( + all(getattr(self.view, f"checkBoxBIT{i}Plot").isChecked() for i in range(Defines.signals.half))) + self.view.checkBoxBIT32_63Plot.setChecked( + all( + getattr(self.view, f"checkBoxBIT{i}Plot").isChecked() + for i in range(Defines.signals.half, Defines.signals.count))) + self.view.checkBoxBIT0_31Plot.stateChanged.connect(partial(self.setEnableBitPlotRange, 0, + Defines.signals.half)) + self.view.checkBoxBIT32_63Plot.stateChanged.connect( + partial(self.setEnableBitPlotRange, Defines.signals.half, Defines.signals.count)) + + def setEnableBitPlotRange(self, start_nr, end_nr): + checkBox = getattr(self.view, f"checkBoxBIT{start_nr}_{end_nr - 1}Plot") + enable = checkBox.isChecked() + for i in range(start_nr, end_nr): + checkBox = getattr(self.view, f"checkBoxBIT{i}Plot") + checkBox.setChecked(enable) + self.plotTab.addAllSelectedDigitalPlots() + + def getEnableBitColor(self, i): + checkBox = getattr(self.view, f"checkBoxBIT{i}Plot") + pushButton = getattr(self.view, f"pushButtonBIT{i}") + pushButton.setEnabled(checkBox.isEnabled() and checkBox.isChecked()) + + def selectBitColor(self, i): + pushButton = getattr(self.view, f"pushButtonBIT{i}") + self.plotTab.showPalette(pushButton) + pen = pg.mkPen(color=self.getDBitButtonColor(i), width=1) + self.mainWindow.digitalPlots[i].setPen(pen) + + def getDBitButtonColor(self, i): + pushButton = getattr(self.view, f"pushButtonBIT{i}") + return self.plotTab.getActiveColor(pushButton) + + def setDBitButtonColor(self, i, color): + pushButton = getattr(self.view, f"pushButtonBIT{i}") + return self.plotTab.setActiveColor(pushButton, color) + + def getIOOutReg(self): + retval = self.det.patioctrl + self.view.lineEditPatIOCtrl.editingFinished.disconnect() + self.view.lineEditPatIOCtrl.setText("0x{:016x}".format(retval)) + self.view.lineEditPatIOCtrl.editingFinished.connect(self.setIOOutReg) + return retval + + def setIOOutReg(self): + self.view.lineEditPatIOCtrl.editingFinished.disconnect() + try: + self.det.patioctrl = int(self.view.lineEditPatIOCtrl.text(), 16) + except Exception as e: + QtWidgets.QMessageBox.warning(self.mainWindow, "IO Out Fail", str(e), QtWidgets.QMessageBox.Ok) + pass + # TODO: handling double event exceptions + self.view.lineEditPatIOCtrl.editingFinished.connect(self.setIOOutReg) + self.updateIOOut() + + def updateCheckBoxIOOut(self, i, out): + checkBox = getattr(self.view, f"checkBoxBIT{i}Out") + checkBox.stateChanged.disconnect() + checkBox.setChecked(bit_is_set(out, i)) + checkBox.stateChanged.connect(partial(self.setIOOut, i)) + + def updateIOOut(self): + retval = self.getIOOutReg() + for i in range(Defines.signals.count): + self.updateCheckBoxIOOut(i, retval) + self.getIOoutRange(retval) + + def setIOOut(self, i): + out = self.det.patioctrl + checkBox = getattr(self.view, f"checkBoxBIT{i}Out") + mask = manipulate_bit(checkBox.isChecked(), out, i) + self.det.patioctrl = mask + + retval = self.getIOOutReg() + self.updateCheckBoxIOOut(i, retval) + self.getIOoutRange(retval) + + def getIOoutRange(self, out): + self.view.checkBoxBIT0_31Out.stateChanged.disconnect() + self.view.checkBoxBIT32_63Out.stateChanged.disconnect() + self.view.checkBoxBIT0_31Out.setChecked((out & Defines.signals.BIT0_31_MASK) == Defines.signals.BIT0_31_MASK) + self.view.checkBoxBIT32_63Out.setChecked((out + & Defines.signals.BIT32_63_MASK) == Defines.signals.BIT32_63_MASK) + self.view.checkBoxBIT0_31Out.stateChanged.connect(partial(self.setIOOutRange, 0, Defines.signals.half)) + self.view.checkBoxBIT32_63Out.stateChanged.connect( + partial(self.setIOOutRange, Defines.signals.half, Defines.signals.count)) + + def setIOOutRange(self, start_nr, end_nr): + out = self.det.patioctrl + checkBox = getattr(self.view, f"checkBoxBIT{start_nr}_{end_nr - 1}Out") + mask = getattr(Defines.signals, f"BIT{start_nr}_{end_nr - 1}_MASK") + if checkBox.isChecked(): + self.det.patioctrl = out | mask + else: + self.det.patioctrl = out & ~mask + self.updateIOOut() + + def getDBitOffset(self): + self.view.spinBoxDBitOffset.editingFinished.disconnect() + self.rx_dbitoffset = self.det.rx_dbitoffset + self.view.spinBoxDBitOffset.setValue(self.rx_dbitoffset) + self.view.spinBoxDBitOffset.editingFinished.connect(self.setDbitOffset) + + def setDbitOffset(self): + self.det.rx_dbitoffset = self.view.spinBoxDBitOffset.value() + + def saveParameters(self) -> list: + commands = [] + dblist = [str(i) for i in range(Defines.signals.count) if getattr(self.view, f"checkBoxBIT{i}DB").isChecked()] + if len(dblist) > 0: + commands.append(f"rx_dbitlist {', '.join(dblist)}") + commands.append(f"rx_dbitoffset {self.view.spinBoxDBitOffset.value()}") + commands.append(f"patioctrl {self.view.lineEditPatIOCtrl.text()}") + return commands diff --git a/pyctbgui/pyctbgui/services/SlowADCs.py b/pyctbgui/pyctbgui/services/SlowADCs.py new file mode 100644 index 000000000..4b73b18f0 --- /dev/null +++ b/pyctbgui/pyctbgui/services/SlowADCs.py @@ -0,0 +1,45 @@ +from functools import partial +from pathlib import Path + +from PyQt5 import uic, QtWidgets + +from pyctbgui.utils.defines import Defines +from slsdet import dacIndex + + +class SlowAdcTab(QtWidgets.QWidget): + + def __init__(self, parent): + super().__init__(parent) + uic.loadUi(Path(__file__).parent.parent / 'ui' / "slowAdcs.ui", parent) + self.view = parent + self.mainWindow = None + self.det = None + + def setup_ui(self): + pass + + def connect_ui(self): + for i in range(Defines.slowAdc.count): + getattr(self.view, f"pushButtonSlowAdc{i}").clicked.connect(partial(self.updateSlowAdc, i)) + self.view.pushButtonTemp.clicked.connect(self.updateTemperature) + + def refresh(self): + self.updateSlowAdcNames() + for i in range(Defines.slowAdc.count): + self.updateSlowAdc(i) + self.updateTemperature() + + def updateSlowAdcNames(self): + for i, name in enumerate(self.mainWindow.det.getSlowADCNames()): + getattr(self.view, f"labelSlowAdc{i}").setText(name) + + def updateSlowAdc(self, i): + slowADCIndex = getattr(dacIndex, f"SLOW_ADC{i}") + label = getattr(self.view, f"labelSlowAdcValue{i}") + slowadc = (self.det.getSlowADC(slowADCIndex))[0] / 1000 + label.setText(f'{slowadc:.2f} mV') + + def updateTemperature(self): + slowadc = self.det.getTemperature(dacIndex.SLOW_ADC_TEMP) + self.view.labelTempValue.setText(f'{str(slowadc[0])} °C') diff --git a/pyctbgui/pyctbgui/services/Transceiver.py b/pyctbgui/pyctbgui/services/Transceiver.py new file mode 100644 index 000000000..98c8fc541 --- /dev/null +++ b/pyctbgui/pyctbgui/services/Transceiver.py @@ -0,0 +1,273 @@ +from functools import partial +from pathlib import Path + +import numpy as np +from PyQt5 import QtWidgets, uic +import pyqtgraph as pg +from pyqtgraph import LegendItem + +from pyctbgui.utils import decoder +from pyctbgui.utils.defines import Defines + +from pyctbgui.utils.bit_utils import bit_is_set, manipulate_bit +import pyctbgui.utils.pixelmap as pm +from pyctbgui.utils.recordOrApplyPedestal import recordOrApplyPedestal + + +class TransceiverTab(QtWidgets.QWidget): + + def __init__(self, parent): + super().__init__(parent) + uic.loadUi(Path(__file__).parent.parent / 'ui' / "transceiver.ui", parent) + self.view = parent + self.mainWindow = None + self.det = None + self.plotTab = None + self.legend: LegendItem | None = None + self.acquisitionTab = None + + def setup_ui(self): + self.plotTab = self.mainWindow.plotTab + self.acquisitionTab = self.mainWindow.acquisitionTab + for i in range(Defines.transceiver.count): + self.setTransceiverButtonColor(i, self.plotTab.getRandomColor()) + self.initializeAllTransceiverPlots() + + self.legend = self.mainWindow.plotTransceiverWaveform.getPlotItem().legend + self.legend.clear() + + # subscribe to toggle legend + self.plotTab.subscribeToggleLegend(self.updateLegend) + + def connect_ui(self): + for i in range(Defines.transceiver.count): + getattr(self.view, f"checkBoxTransceiver{i}").stateChanged.connect(partial(self.setTransceiverEnable, i)) + getattr(self.view, + f"checkBoxTransceiver{i}Plot").stateChanged.connect(partial(self.setTransceiverEnablePlot, i)) + getattr(self.view, f"pushButtonTransceiver{i}").clicked.connect(partial(self.selectTransceiverColor, i)) + self.view.lineEditTransceiverMask.editingFinished.connect(self.setTransceiverEnableReg) + + def refresh(self): + self.updateTransceiverEnable() + + def getEnabledPlots(self): + """ + return plots that are shown (checkBoxTransceiver{i}Plot is checked) + """ + enabledPlots = [] + self.legend.clear() + for i in range(Defines.transceiver.count): + if getattr(self.view, f'checkBoxTransceiver{i}Plot').isChecked(): + plotName = getattr(self.view, f"labelTransceiver{i}").text() + enabledPlots.append((self.mainWindow.transceiverPlots[i], plotName)) + return enabledPlots + + def updateLegend(self): + """ + update the legend for the transceiver waveform plot + should be called after checking or unchecking plot checkbox + """ + if not self.mainWindow.showLegend: + self.legend.clear() + else: + for plot, name in self.getEnabledPlots(): + self.legend.addItem(plot, name) + + @recordOrApplyPedestal + def _processWaveformData(self, data, dSamples, romode, nDBitEnabled, nTransceiverEnabled): + """ + model function + processes raw receiver waveform data + @param data: raw receiver waveform data + @param dSamples: digital samples + @param romode: readout mode value + @param nDBitEnabled: number of digital bits enabled + @param nTransceiverEnabled: number of transceivers enabled + @return: processed transceiver data + """ + transceiverOffset = 0 + if romode == 4: + nbitsPerDBit = dSamples + if dSamples % 8 != 0: + nbitsPerDBit += (8 - (dSamples % 8)) + transceiverOffset += nDBitEnabled * (nbitsPerDBit // 8) + trans_array = np.array(np.frombuffer(data, offset=transceiverOffset, dtype=np.uint16)) + return trans_array.reshape(-1, nTransceiverEnabled) + + def processWaveformData(self, data, dSamples): + """ + plots raw waveform data + data: raw waveform data + dsamples: digital samples + tsamples: transceiver samples + """ + waveforms = {} + trans_array = self._processWaveformData(data, dSamples, self.mainWindow.romode.value, + self.mainWindow.nDBitEnabled, self.nTransceiverEnabled) + idx = 0 + for i in range(Defines.transceiver.count): + checkBoxPlot = getattr(self.view, f"checkBoxTransceiver{i}Plot") + checkBoxEn = getattr(self.view, f"checkBoxTransceiver{i}") + if checkBoxEn.isChecked() and checkBoxPlot.isChecked(): + waveform = trans_array[:, idx] + idx += 1 + self.mainWindow.transceiverPlots[i].setData(waveform) + plotName = getattr(self.view, f"labelTransceiver{i}").text() + waveforms[plotName] = waveform + return waveforms + + @recordOrApplyPedestal + def _processImageData(self, data, dSamples, romode, nDBitEnabled): + """ + processes raw image data + @param data: + @param dSamples: + @param romode: + @param nDBitEnabled: + @return: + """ + transceiverOffset = 0 + if romode == 4: + nbitsPerDBit = dSamples + if dSamples % 8 != 0: + nbitsPerDBit += (8 - (dSamples % 8)) + transceiverOffset += nDBitEnabled * (nbitsPerDBit // 8) + trans_array = np.array(np.frombuffer(data, offset=transceiverOffset, dtype=np.uint16)) + return decoder.decode(trans_array, pm.matterhorn_transceiver()) + + def processImageData(self, data, dSamples): + """ + view function + plots transceiver image + dSamples: digital samples + data: raw image data + """ + # get zoom state + viewBox = self.mainWindow.plotTransceiverImage.getView() + state = viewBox.getState() + try: + self.mainWindow.transceiver_frame = self._processImageData(data, dSamples, self.mainWindow.romode.value, + self.mainWindow.nDBitEnabled) + self.plotTab.ignoreHistogramSignal = True + self.mainWindow.plotTransceiverImage.setImage(self.mainWindow.transceiver_frame) + except Exception: + self.mainWindow.statusbar.setStyleSheet("color:red") + message = f'Warning: Invalid size for Transceiver Image. Expected' \ + f' {self.mainWindow.nTransceiverRows * self.mainWindow.nTransceiverCols} size,' \ + f' got {self.mainWindow.transceiver_frame.size} instead.' + self.acquisitionTab.updateCurrentFrame('Invalid Image') + self.mainWindow.statusbar.showMessage(message) + print(message) + + self.plotTab.setFrameLimits(self.mainWindow.transceiver_frame) + + # keep the zoomed in state (not 1st image) + if self.mainWindow.firstTransceiverImage: + self.mainWindow.firstTransceiverImage = False + else: + viewBox.setState(state) + return self.mainWindow.transceiver_frame + + def initializeAllTransceiverPlots(self): + self.mainWindow.plotTransceiverWaveform = pg.plot() + self.mainWindow.plotTransceiverWaveform.addLegend(colCount=Defines.colCount) + self.mainWindow.verticalLayoutPlot.addWidget(self.mainWindow.plotTransceiverWaveform, 5) + self.mainWindow.transceiverPlots = {} + waveform = np.zeros(1000) + for i in range(Defines.transceiver.count): + pen = pg.mkPen(color=self.getTransceiverButtonColor(i), width=1) + legendName = getattr(self.view, f"labelTransceiver{i}").text() + self.mainWindow.transceiverPlots[i] = self.mainWindow.plotTransceiverWaveform.plot(waveform, + pen=pen, + name=legendName) + self.mainWindow.transceiverPlots[i].hide() + + self.mainWindow.plotTransceiverImage = pg.ImageView() + self.mainWindow.nTransceiverRows = 0 + self.mainWindow.nTransceiverCols = 0 + self.mainWindow.transceiver_frame = np.zeros( + (self.mainWindow.nTransceiverRows, self.mainWindow.nTransceiverCols)) + self.mainWindow.plotTransceiverImage.setImage(self.mainWindow.transceiver_frame) + self.mainWindow.verticalLayoutPlot.addWidget(self.mainWindow.plotTransceiverImage, 6) + + cm = pg.colormap.get('CET-L9') # prepare a linear color map + self.mainWindow.plotTransceiverImage.setColorMap(cm) + + def getTransceiverEnableReg(self): + retval = self.det.transceiverenable + self.view.lineEditTransceiverMask.editingFinished.disconnect() + self.view.lineEditTransceiverMask.setText("0x{:08x}".format(retval)) + self.view.lineEditTransceiverMask.editingFinished.connect(self.setTransceiverEnableReg) + return retval + + def setTransceiverEnableReg(self): + self.view.lineEditTransceiverMask.editingFinished.disconnect() + try: + mask = int(self.view.lineEditTransceiverMask.text(), 16) + self.det.transceiverenable = mask + except Exception as e: + QtWidgets.QMessageBox.warning(self.mainWindow, "Transceiver Enable Fail", str(e), QtWidgets.QMessageBox.Ok) + pass + # TODO: handling double event exceptions + self.view.lineEditTransceiverMask.editingFinished.connect(self.setTransceiverEnableReg) + self.updateTransceiverEnable() + + def getTransceiverEnable(self, i, mask): + checkBox = getattr(self.view, f"checkBoxTransceiver{i}") + checkBox.stateChanged.disconnect() + checkBox.setChecked(bit_is_set(mask, i)) + checkBox.stateChanged.connect(partial(self.setTransceiverEnable, i)) + + def updateTransceiverEnable(self): + retval = self.getTransceiverEnableReg() + self.nTransceiverEnabled = bin(retval).count('1') + for i in range(4): + self.getTransceiverEnable(i, retval) + self.getTransceiverEnablePlot(i) + self.getTransceiverEnableColor(i) + self.plotTab.addSelectedTransceiverPlots(i) + + def setTransceiverEnable(self, i): + checkBox = getattr(self.view, f"checkBoxTransceiver{i}") + try: + enableMask = manipulate_bit(checkBox.isChecked(), self.det.transceiverenable, i) + self.det.transceiverenable = enableMask + except Exception as e: + QtWidgets.QMessageBox.warning(self.mainWindow, "Transceiver Enable Fail", str(e), QtWidgets.QMessageBox.Ok) + pass + + self.updateTransceiverEnable() + + def getTransceiverEnablePlot(self, i): + checkBox = getattr(self.view, f"checkBoxTransceiver{i}") + checkBoxPlot = getattr(self.view, f"checkBoxTransceiver{i}Plot") + checkBoxPlot.setEnabled(checkBox.isChecked()) + + def setTransceiverEnablePlot(self, i): + pushButton = getattr(self.view, f"pushButtonTransceiver{i}") + checkBox = getattr(self.view, f"checkBoxTransceiver{i}Plot") + pushButton.setEnabled(checkBox.isChecked()) + self.plotTab.addSelectedTransceiverPlots(i) + self.updateLegend() + + def getTransceiverEnableColor(self, i): + checkBox = getattr(self.view, f"checkBoxTransceiver{i}Plot") + pushButton = getattr(self.view, f"pushButtonTransceiver{i}") + pushButton.setEnabled(checkBox.isEnabled() and checkBox.isChecked()) + + def selectTransceiverColor(self, i): + pushButton = getattr(self.view, f"pushButtonTransceiver{i}") + self.plotTab.showPalette(pushButton) + pen = pg.mkPen(color=self.getTransceiverButtonColor(i), width=1) + self.mainWindow.transceiverPlots[i].setPen(pen) + + def getTransceiverButtonColor(self, i): + pushButton = getattr(self.view, f"pushButtonTransceiver{i}") + return self.plotTab.getActiveColor(pushButton) + + def setTransceiverButtonColor(self, i, color): + pushButton = getattr(self.view, f"pushButtonTransceiver{i}") + return self.plotTab.setActiveColor(pushButton, color) + + def saveParameters(self): + return ["transceiverenable {}".format(self.view.lineEditTransceiverMask.text())] diff --git a/pyctbgui/pyctbgui/services/__init__.py b/pyctbgui/pyctbgui/services/__init__.py new file mode 100644 index 000000000..9f3e43434 --- /dev/null +++ b/pyctbgui/pyctbgui/services/__init__.py @@ -0,0 +1,9 @@ +from .ADC import AdcTab +from .Acquisition import AcquisitionTab +from .DACs import DacTab +from .Pattern import PatternTab +from .Plot import PlotTab +from .PowerSupplies import PowerSuppliesTab +from .Signals import SignalsTab +from .SlowADCs import SlowAdcTab +from .Transceiver import TransceiverTab diff --git a/pyctbgui/pyctbgui/ui/CtbGui.ui b/pyctbgui/pyctbgui/ui/CtbGui.ui new file mode 100644 index 000000000..3d96407aa --- /dev/null +++ b/pyctbgui/pyctbgui/ui/CtbGui.ui @@ -0,0 +1,779 @@ + + + MainWindow + + + + 0 + 0 + 1444 + 943 + + + + Chip Test Board + + + false + + + + + 870 + 890 + + + + + 870 + 890 + + + + + 9 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 50 + 0 + + + + QFrame::Plain + + + true + + + + + 0 + 0 + 870 + 879 + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + QFrame::NoFrame + + + QFrame::Plain + + + 0 + + + + 0 + + + 9 + + + 0 + + + 0 + + + + + + 870 + 870 + + + + + 870 + 870 + + + + 0 + + + + DACs + + + + + 0 + 0 + 851 + 841 + + + + + 711 + 791 + + + + + + + Power Supplies + + + + + -1 + -1 + 841 + 821 + + + + + + + Slow ADCs + + + + + 0 + 0 + 871 + 821 + + + + + 871 + 571 + + + + + + + Signals + + + + + 0 + 0 + 831 + 821 + + + + + 831 + 821 + + + + + + + Transceivers + + + + + 9 + 19 + 841 + 341 + + + + + 841 + 181 + + + + + + + ADCs + + + + + -1 + -1 + 841 + 821 + + + + + + + Pattern + + + + + 0 + 0 + 851 + 831 + + + + + + + Acquisition + + + + + -10 + 0 + 860 + 800 + + + + + 860 + 800 + + + + + + + Plot + + + + + 0 + 0 + 860 + 800 + + + + + 860 + 800 + + + + + + + + + + + + + + + + + + + 0 + 0 + 1444 + 25 + + + + + File + + + + + + + + Help + + + + + + + + + + + + 0 + 0 + + + + + 568 + 214 + + + + + 524287 + 524287 + + + + QDockWidget::DockWidgetFloatable|QDockWidget::DockWidgetMovable + + + Qt::RightDockWidgetArea + + + 2 + + + + + + + + 16777215 + 100 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + + + 70 + 0 + + + + + 70 + 16777215 + + + + 0 + + + + + + + + 100 + 0 + + + + 24 + + + + + + + + 0 + 36 + + + + + 100 + 16777215 + + + + + + + + + 85 + 170 + 127 + + + + + + + 85 + 170 + 127 + + + + + + + 85 + 170 + 127 + + + + + + + + + 85 + 170 + 127 + + + + + + + 85 + 170 + 127 + + + + + + + 85 + 170 + 127 + + + + + + + + + 85 + 170 + 127 + + + + + + + 85 + 170 + 127 + + + + + + + 85 + 170 + 127 + + + + + + + + Shift + Enter is the keyboard shortcut to start/stop acquisition from any tab + + + QPushButton {background-color: rgb(85, 170, 127);} +QPushButton:checked{background-color: red;} + + + Start + + + true + + + + + + + + 110 + 0 + + + + IDLE + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + + + + 70 + 16777215 + + + + Acquired: + + + + + + + + 70 + 0 + + + + + 70 + 16777215 + + + + 0 + + + + + + + + 0 + 0 + + + + + 100 + 16777215 + + + + Measurement: + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + + # + + + + + + + + + + + + + + Load Parameters + + + + + Save + + + + + Exit + + + + + Info + + + + + Keyboard Shortcuts + + + + + Save Parameters + + + + + + PowerSuppliesTab + QWidget +
pyctbgui.services.PowerSupplies
+ 1 +
+ + DacTab + QWidget +
pyctbgui.services.DACs
+ 1 +
+ + SlowAdcTab + QWidget +
pyctbgui.services.SlowADCs
+ 1 +
+ + SignalsTab + QWidget +
pyctbgui.services.Signals
+ 1 +
+ + TransceiverTab + QWidget +
pyctbgui.services.Transceiver
+ 1 +
+ + AdcTab + QWidget +
pyctbgui.services.ADC
+ 1 +
+ + PatternTab + QWidget +
pyctbgui.services.Pattern
+ 1 +
+ + AcquisitionTab + QWidget +
pyctbgui.services.Acquisition
+ 1 +
+ + PlotTab + QWidget +
pyctbgui.services.Plot
+ 1 +
+
+ + + + actionExit + triggered() + MainWindow + close() + + + -1 + -1 + + + 753 + 496 + + + + +
diff --git a/pyctbgui/pyctbgui/ui/Dacs.ui b/pyctbgui/pyctbgui/ui/Dacs.ui new file mode 100644 index 000000000..940f93c7d --- /dev/null +++ b/pyctbgui/pyctbgui/ui/Dacs.ui @@ -0,0 +1,1198 @@ + + + Form + + + + 0 + 0 + 870 + 791 + + + + + 870 + 791 + + + + + 2000 + 2000 + + + + + 711 + 791 + + + + Form + + + + + 20 + 10 + 711 + 791 + + + + + 711 + 791 + + + + + 1000 + 1000 + + + + QFrame::StyledPanel + + + QFrame::Sunken + + + + 11 + + + + + false + + + Unchecking will set DAC in tristate (sends -100).<br> +Checking sends nothing to DAC + + + DAC 1 + + + + + + + Checking or unchecking this will only get DAC values on the right (with this condition).<br> +Only pressing enter on spinbox will set DAC (with this condition). + + + mV + + + + + + + false + + + Unchecking will set DAC in tristate (sends -100).<br> +Checking sends nothing to DAC + + + DAC 7 + + + + + + + false + + + Unchecking will set DAC in tristate (sends -100).<br> +Checking sends nothing to DAC + + + DAC 8 + + + + + + + Checking or unchecking this will only get DAC values on the right (with this condition).<br> +Only pressing enter on spinbox will set DAC (with this condition). + + + mV + + + + + + + Checking or unchecking this will only get DAC values on the right (with this condition).<br> +Only pressing enter on spinbox will set DAC (with this condition). + + + mV + + + + + + + false + + + Unchecking will set DAC in tristate (sends -100).<br> +Checking sends nothing to DAC + + + DAC 15 + + + + + + + false + + + Unchecking will set DAC in tristate (sends -100).<br> +Checking sends nothing to DAC + + + DAC 2 + + + + + + + Checking or unchecking this will only get DAC values on the right (with this condition).<br> +Only pressing enter on spinbox will set DAC (with this condition). + + + mV + + + + + + + 0 + + + + + + + Checking or unchecking this will only get DAC values on the right (with this condition).<br> +Only pressing enter on spinbox will set DAC (with this condition). + + + mV + + + + + + + + 0 + 32 + + + + + 16777215 + 32 + + + + Only accepts value range (0 - 4096). Only modifying this or pressing enter will set DAC. + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 4096 + + + + + + + 0 + + + + + + + + 0 + 32 + + + + + 16777215 + 32 + + + + Only accepts value range (0 - 4096). Only modifying this or pressing enter will set DAC. + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 4096 + + + + + + + false + + + Unchecking will set DAC in tristate (sends -100).<br> +Checking sends nothing to DAC + + + DAC 14 + + + + + + + 0 + + + + + + + 0 + + + + + + + 0 + + + + + + + 0 + + + + + + + false + + + Unchecking will set DAC in tristate (sends -100).<br> +Checking sends nothing to DAC + + + DAC 16 + + + + + + + false + + + Unchecking will set DAC in tristate (sends -100).<br> +Checking sends nothing to DAC + + + DAC 0 + + + + + + + Checking or unchecking this will only get DAC values on the right (with this condition).<br> +Only pressing enter on spinbox will set DAC (with this condition). + + + mV + + + + + + + Checking or unchecking this will only get DAC values on the right (with this condition).<br> +Only pressing enter on spinbox will set DAC (with this condition). + + + mV + + + + + + + 0 + + + + + + + false + + + Unchecking will set DAC in tristate (sends -100).<br> +Checking sends nothing to DAC + + + DAC 6 + + + + + + + + 0 + 32 + + + + + 16777215 + 32 + + + + Only accepts value range (0 - 4096). Only modifying this or pressing enter will set DAC. + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 0 + + + 4096 + + + + + + + false + + + Unchecking will set DAC in tristate (sends -100).<br> +Checking sends nothing to DAC + + + DAC 9 + + + + + + + 0 + + + + + + + mV + + + + + + + Checking or unchecking this will only get DAC values on the right (with this condition).<br> +Only pressing enter on spinbox will set DAC (with this condition). + + + mV + + + + + + + 0 + + + + + + + Checking or unchecking this will only get DAC values on the right (with this condition).<br> +Only pressing enter on spinbox will set DAC (with this condition). + + + mV + + + + + + + + 0 + 32 + + + + + 16777215 + 32 + + + + Only accepts value range (0 - 4096). Only modifying this or pressing enter will set DAC. + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 4096 + + + + + + + V + + + + + + + 0 + + + + + + + Checking or unchecking this will only get DAC values on the right (with this condition).<br> +Only pressing enter on spinbox will set DAC (with this condition). + + + mV + + + + + + + false + + + Unchecking will set DAC in tristate (sends -100).<br> +Checking sends nothing to DAC + + + DAC 5 + + + + + + + + 0 + 32 + + + + + 16777215 + 32 + + + + Only accepts value range (0 - 4096). Only modifying this or pressing enter will set DAC. + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 4096 + + + + + + + false + + + Unchecking will set DAC in tristate (sends -100).<br> +Checking sends nothing to DAC + + + DAC 13 + + + + + + + 0 + + + + + + + 0 + + + + + + + + 0 + 32 + + + + + 16777215 + 32 + + + + Only accepts value range (0 - 4096). Only modifying this or pressing enter will set DAC. + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 4096 + + + + + + + false + + + Unchecking will set DAC in tristate (sends -100).<br> +Checking sends nothing to DAC + + + DAC 17 + + + + + + + 0 + + + + + + + High Voltage + + + + + + + Qt::LeftToRight + + + + 1000 + + + + + 1140 + + + + + 1330 + + + + + 1600 + + + + + 2000 + + + + + + + + 0 + + + + + + + + 0 + 32 + + + + + 16777215 + 32 + + + + Only accepts value range (0 - 4096). Only modifying this or pressing enter will set DAC. + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 4096 + + + + + + + + 0 + 32 + + + + + 16777215 + 32 + + + + Only accepts value range (0 - 4096). Only modifying this or pressing enter will set DAC. + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 4096 + + + + + + + Checking or unchecking this will only get DAC values on the right (with this condition).<br> +Only pressing enter on spinbox will set DAC (with this condition). + + + mV + + + + + + + Checking or unchecking this will only get DAC values on the right (with this condition).<br> +Only pressing enter on spinbox will set DAC (with this condition). + + + mV + + + + + + + Checking or unchecking this will only get DAC values on the right (with this condition).<br> +Only pressing enter on spinbox will set DAC (with this condition). + + + mV + + + + + + + + 0 + 32 + + + + + 16777215 + 32 + + + + Only accepts value range (0 - 4096). Only modifying this or pressing enter will set DAC. + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 4096 + + + + + + + + 0 + 32 + + + + + 16777215 + 32 + + + + Only accepts value range (0 - 4096). Only modifying this or pressing enter will set DAC. + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 4096 + + + + + + + + 0 + 32 + + + + + 16777215 + 32 + + + + Only accepts value range (0 - 4096). Only modifying this or pressing enter will set DAC. + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 4096 + + + + + + + ADC_VPP + + + + + + + false + + + Unchecking will set DAC in tristate (sends -100).<br> +Checking sends nothing to DAC + + + DAC 11 + + + + + + + Checking or unchecking this will only get DAC values on the right (with this condition).<br> +Only pressing enter on spinbox will set DAC (with this condition). + + + mV + + + + + + + Checking or unchecking this will only get DAC values on the right (with this condition).<br> +Only pressing enter on spinbox will set DAC (with this condition). + + + mV + + + + + + + + 0 + 32 + + + + + 16777215 + 32 + + + + Only accepts value range (0 - 4096). Only modifying this or pressing enter will set DAC. + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 4096 + + + + + + + + 0 + 32 + + + + + 16777215 + 32 + + + + Only accepts value range (0 - 4096). Only modifying this or pressing enter will set DAC. + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 4096 + + + + + + + + 0 + 32 + + + + + 16777215 + 32 + + + + Only accepts value range (0 - 4096). Only modifying this or pressing enter will set DAC. + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 4096 + + + + + + + 0 + + + + + + + 0 + + + + + + + + 0 + 32 + + + + + 16777215 + 32 + + + + Only accepts value range (0 - 4096). Only modifying this or pressing enter will set DAC. + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 4096 + + + + + + + Checking or unchecking this will only get DAC values on the right (with this condition).<br> +Only pressing enter on spinbox will set DAC (with this condition). + + + mV + + + + + + + 0 + + + + + + + + 0 + 32 + + + + + 16777215 + 32 + + + + Only enter values between 60-200 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 200 + + + + + + + false + + + Unchecking will set DAC in tristate (sends -100).<br> +Checking sends nothing to DAC + + + DAC 3 + + + + + + + 0 + + + + + + + + 0 + 32 + + + + + 16777215 + 32 + + + + Only accepts value range (0 - 4096). Only modifying this or pressing enter will set DAC. + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 4096 + + + + + + + Checking or unchecking this will only get DAC values on the right (with this condition).<br> +Only pressing enter on spinbox will set DAC (with this condition). + + + mV + + + + + + + false + + + Unchecking will set DAC in tristate (sends -100).<br> +Checking sends nothing to DAC + + + DAC 10 + + + + + + + 0 + + + + + + + + 0 + 32 + + + + + 16777215 + 32 + + + + Only accepts value range (0 - 4096). Only modifying this or pressing enter will set DAC. + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 4096 + + + + + + + false + + + Unchecking will set DAC in tristate (sends -100).<br> +Checking sends nothing to DAC + + + DAC 4 + + + + + + + + 0 + 32 + + + + + 16777215 + 32 + + + + Only accepts value range (0 - 4096). Only modifying this or pressing enter will set DAC. + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 4096 + + + + + + + Checking or unchecking this will only get DAC values on the right (with this condition).<br> +Only pressing enter on spinbox will set DAC (with this condition). + + + mV + + + + + + + false + + + Unchecking will set DAC in tristate (sends -100).<br> +Checking sends nothing to DAC + + + DAC 12 + + + + + + + 0 + + + + + + + + + diff --git a/pyctbgui/pyctbgui/ui/MainWindow.py b/pyctbgui/pyctbgui/ui/MainWindow.py new file mode 100644 index 000000000..acd07c6f7 --- /dev/null +++ b/pyctbgui/pyctbgui/ui/MainWindow.py @@ -0,0 +1,369 @@ +import logging + +from PyQt5 import QtWidgets, QtCore, uic +import argparse +import signal +import pyqtgraph as pg +from pathlib import Path +from functools import partial + +from slsdet import Detector, dacIndex + +from pyctbgui.services import TransceiverTab, DacTab, AdcTab, AcquisitionTab, SignalsTab, PatternTab, \ + SlowAdcTab, PlotTab, PowerSuppliesTab +from pyctbgui.utils import alias_utility +from pyctbgui.utils.defines import Defines + + +class MainWindow(QtWidgets.QMainWindow): + signalShortcutAcquire = QtCore.pyqtSignal() + signalShortcutTabUp = QtCore.pyqtSignal() + signalShortcutTabDown = QtCore.pyqtSignal() + + def __init__(self, *args, **kwargs): + parser = argparse.ArgumentParser() + parser.add_argument('-a', '--alias', help="Alias file complete path") + arglist, __ = parser.parse_known_args() + self.alias_file = arglist.alias + + pg.setConfigOption("background", (247, 247, 247)) + pg.setConfigOption("foreground", "k") + pg.setConfigOption('leftButtonPan', False) + + super().__init__(*args, **kwargs) + + uic.loadUi(Path(__file__).parent / "CtbGui.ui", self) + logging.basicConfig(encoding='utf-8', level=logging.INFO) + + self.logger = logging.getLogger(__name__) + self.det = None + self.showLegend = True + self.settings = None + try: + self.det = Detector() + # ensure detector is up + self.det.detectorserverversion[0] + except Exception as e: + QtWidgets.QMessageBox.critical(self, "Connect Fail", str(e) + "Exiting Gui...", QtWidgets.QMessageBox.Ok) + raise + + # get Tab Classes + self.plotTab: PlotTab = self.widgetPlot + self.slowAdcTab: SlowAdcTab = self.widgetSlowAdcs + self.dacTab: DacTab = self.widgetDacs + self.powerSuppliesTab: PowerSuppliesTab = self.widgetPowerSupplies + self.signalsTab: SignalsTab = self.widgetSignals + self.transceiverTab: TransceiverTab = self.widgetTransceiver + self.adcTab: AdcTab = self.widgetAdc + self.patternTab: PatternTab = self.widgetPattern + self.acquisitionTab: AcquisitionTab = self.widgetAcquisition + + self.tabs_list = [ + self.dacTab, self.powerSuppliesTab, self.slowAdcTab, self.signalsTab, self.transceiverTab, self.adcTab, + self.patternTab, self.acquisitionTab, self.plotTab + ] + + self.setup_ui() + self.acquisitionTab.setup_zmq() + self.tabWidget.setCurrentIndex(Defines.Acquisition_Tab_Index) + self.tabWidget.currentChanged.connect(self.refresh_tab) + self.connect_ui() + + for tab in self.tabs_list: + tab.refresh() + + # also refreshes timer to start plotting + self.plotTab.plotOptions() + self.plotTab.showPlot() + + self.patternTab.getPatViewerColors() + self.patternTab.getPatViewerWaitParameters() + self.patternTab.getPatViewerLoopParameters() + self.patternTab.updatePatViewerParameters() + self.plotTab.showPatternViewer(False) + + if self.alias_file is not None: + self.loadAliasFile() + + self.signalShortcutAcquire.connect(self.pushButtonStart.click) + self.signalShortcutTabUp.connect(partial(self.changeTabIndex, True)) + self.signalShortcutTabDown.connect(partial(self.changeTabIndex, False)) + # to catch the ctrl + c to abort + signal.signal(signal.SIGINT, signal.SIG_DFL) + self.firstAnalogImage = True + self.firstDigitalImage = True + self.firstTransceiverImage = True + + self.updateSettingValues() + + def updateSettingMainWindow(self): + self.settings.beginGroup("mainwindow") + # window size + width = self.settings.value('window_width') + height = self.settings.value('window_height') + if width is not None and height is not None: + self.resize(int(width), int(height)) + # print(f'Main window resized to {width}x{height}') + + # window position + pos = self.settings.value('window_pos') + if type(pos) is QtCore.QPoint: + # print(f'Moved main window to {pos}') + self.move(pos) + self.settings.endGroup() + + def saveSettingMainWindow(self): + self.settings.beginGroup("mainwindow") + self.settings.setValue('window_width', self.rect().width()) + self.settings.setValue('window_height', self.rect().height()) + self.settings.setValue('window_pos', self.pos()) + self.settings.endGroup() + + def updateSettingDockWidget(self): + self.settings.beginGroup("dockwidget") + + # is docked + if self.settings.contains('window_width') and self.settings.contains('window_height'): + # window size + width = self.settings.value('window_width') + height = self.settings.value('window_height') + if width is not None and height is not None: + # print(f'Plot window - Floating ({width}x{height})') + self.dockWidget.setFloating(True) + self.dockWidget.resize(int(width), int(height)) + # window position + pos = self.settings.value('window_pos') + if type(pos) is QtCore.QPoint: + # print(f'Moved plot window to {pos}') + self.dockWidget.move(pos) + self.settings.endGroup() + + def saveSettingDockWidget(self): + self.settings.beginGroup("dockwidget") + if self.dockWidget.isFloating(): + self.settings.setValue('window_width', self.dockWidget.rect().width()) + self.settings.setValue('window_height', self.dockWidget.rect().height()) + self.settings.setValue('window_pos', self.dockWidget.pos()) + else: + self.settings.remove('window_width') + self.settings.remove('window_height') + self.settings.remove('window_pos') + self.settings.endGroup() + + def savePlotTypeAndDetector(self): + self.settings.setValue('isImage', self.plotTab.view.radioButtonImage.isChecked()) + self.settings.setValue('detector', self.plotTab.view.comboBoxPlot.currentText()) + + def updatePlotTypeAndDetector(self): + # load plot type from qsettings + isImage = self.settings.value('isImage', True, type=bool) + self.plotTab.view.radioButtonImage.setChecked(isImage) + self.plotTab.plotOptions() + # load detector from qsettings + if isImage: + self.plotTab.view.comboBoxPlot.setCurrentText(self.settings.value('detector', 'Matterhorn')) + + def updateSettingValues(self): + self.settings = QtCore.QSettings('slsdetectorgroup', 'pyctbgui') + self.updateSettingMainWindow() + self.updateSettingDockWidget() + self.updatePlotTypeAndDetector() + + def saveSettings(self): + # store in ~/.config/slsdetectorgroup/pyctbgui.conf + self.saveSettingMainWindow() + self.saveSettingDockWidget() + self.savePlotTypeAndDetector() + + def closeEvent(self, event): + self.saveSettings() + + def loadAliasFile(self): + print(f'Loading Alias file: {self.alias_file}') + try: + bit_names, bit_plots, bit_colors, adc_names, adc_plots, adc_colors, dac_names, slowadc_names, \ + voltage_names, pat_file_name = alias_utility.read_alias_file(self.alias_file) + except Exception as e: + QtWidgets.QMessageBox.warning(self, "Alias File Fail", + str(e) + "
" + self.alias_file, QtWidgets.QMessageBox.Ok) + return + + for i in range(Defines.signals.count): + if bit_names[i]: + self.det.setSignalName(i, bit_names[i]) + if bit_plots[i]: + getattr(self.signalsTab.view, f"checkBoxBIT{i}DB").setChecked(bit_plots[i]) + getattr(self.signalsTab.view, f"checkBoxBIT{i}Plot").setChecked(bit_plots[i]) + if bit_colors[i]: + self.signalsTab.setDBitButtonColor(i, bit_colors[i]) + + for i in range(Defines.adc.count): + if adc_names[i]: + self.det.setAdcName(i, adc_names[i]) + if adc_plots[i]: + getattr(self.adcTab.view, f"checkBoxADC{i}En").setChecked(adc_plots[i]) + getattr(self.adcTab.view, f"checkBoxADC{i}Plot").setChecked(adc_plots[i]) + if adc_colors[i]: + self.adcTab.setADCButtonColor(i, adc_colors[i]) + + for i in range(Defines.dac.count): + if dac_names[i]: + iDac = getattr(dacIndex, f"DAC_{i}") + self.det.setDacName(iDac, dac_names[i]) + + for i in range(Defines.slowAdc.count): + slowadc_index = self.det.getSlowADCList() + if slowadc_names[i]: + self.det.setSlowADCName(slowadc_index[i], slowadc_names[i]) + + for i in range(len(Defines.powerSupplies)): + voltage_index = self.det.getVoltageList() + if voltage_names[i]: + self.det.setVoltageName(voltage_index[i], voltage_names[i]) + + if pat_file_name: + self.lineEditPatternFile.setText(pat_file_name) + + self.signalsTab.updateSignalNames() + self.adcTab.updateADCNames() + self.slowAdcTab.updateSlowAdcNames() + self.dacTab.updateDACNames() + self.powerSuppliesTab.updateVoltageNames() + + # For Action options function + # TODO Only add the components of action option+ functions + # Function to show info + def showInfo(self): + msg = QtWidgets.QMessageBox() + msg.setWindowTitle("About") + msg.setText("This Gui is for Chip Test Boards.\n Current Phase: Development") + msg.exec_() + + def showKeyBoardShortcuts(self): + msg = QtWidgets.QMessageBox() + msg.setWindowTitle("Keyboard Shortcuts") + msg.setText( + "Start Acquisition (from any tab): Shift + Return
Move Tab Right : Ctrl + '+'
Move Tab Left :" + " Ctrl + '-'
") + msg.exec_() + + def loadParameters(self): + response = QtWidgets.QFileDialog.getOpenFileName( + parent=self, + caption="Select a parameter file to open", + directory=str(Path.cwd()), + # filter='README (*.md *.ui)' + ) + if response[0] == '': + return + try: + self.det.parameters = (response[0]) + for tab in self.tabs_list: + tab.refresh() + QtWidgets.QMessageBox.information(self, "Load Parameter Success", "Parameters loaded successfully", + QtWidgets.QMessageBox.Ok) + except (RuntimeError, FileNotFoundError) as e: + self.logger.exception(e) + QtWidgets.QMessageBox.warning(self, "Load Parameter Fail", str(e), QtWidgets.QMessageBox.Ok) + + def refresh_tab(self, tab_index): + match tab_index: + case 0: + self.dacTab.refresh() + case 1: + self.powerSuppliesTab.refresh() + case 2: + self.slowAdcTab.refresh() + case 3: + self.transceiverTab.refresh() + case 4: + self.signalsTab.refresh() + case 5: + self.adcTab.refresh() + case 6: + self.patternTab.refresh() + case 7: + self.acquisitionTab.refresh() + case 8: + self.plotTab.refresh() + + def setup_ui(self): + # To check detector status + self.statusTimer = QtCore.QTimer() + self.statusTimer.timeout.connect(self.acquisitionTab.checkEndofAcquisition) + + # To auto trigger the read + self.read_timer = QtCore.QTimer() + self.read_timer.timeout.connect(self.acquisitionTab.read_zmq) + + for tab in self.tabs_list: + tab.mainWindow = self + tab.det = self.det + + for tab in self.tabs_list: + tab.setup_ui() + + def keyPressEvent(self, event): + if event.modifiers() & QtCore.Qt.ShiftModifier: + if event.key() == QtCore.Qt.Key_Return: + self.signalShortcutAcquire.emit() + if event.modifiers() & QtCore.Qt.ControlModifier: + if event.key() == QtCore.Qt.Key_Plus: + self.signalShortcutTabUp.emit() + if event.key() == QtCore.Qt.Key_Minus: + self.signalShortcutTabDown.emit() + + def changeTabIndex(self, up): + ind = self.tabWidget.currentIndex() + if up: + ind += 1 + if ind == Defines.Max_Tabs: + ind = 0 + else: + ind -= 1 + if ind == -1: + ind = Defines.Max_Tabs - 1 + self.tabWidget.setCurrentIndex(ind) + + def connect_ui(self): + # Show info + self.actionInfo.triggered.connect(self.showInfo) + self.actionKeyboardShortcuts.triggered.connect(self.showKeyBoardShortcuts) + self.actionLoadParameters.triggered.connect(self.loadParameters) + self.pushButtonStart.clicked.connect(self.acquisitionTab.toggleAcquire) + self.actionSaveParameters.triggered.connect(self.saveParameters) + + for tab in self.tabs_list: + tab.connect_ui() + + def saveParameters(self): + response = QtWidgets.QFileDialog.getSaveFileName(self, "Save Parameters", str(self.det.fpath)) + if response[0] == '': + return + + # save DACs + commands = self.dacTab.saveParameters() + # save signals + commands.extend(self.signalsTab.saveParameters()) + # save transceiver + commands.extend(self.transceiverTab.saveParameters()) + # save ADCs + commands.extend(self.adcTab.saveParameters()) + # save pattern + commands.extend(self.patternTab.saveParameters()) + # save acquisition + commands.extend(self.acquisitionTab.saveParameters()) + # save power supplies + commands.extend(self.powerSuppliesTab.saveParameters()) + # save plot + commands.extend(self.plotTab.saveParameters()) + + try: + with open(response[0], 'w') as fp: + fp.write('\n'.join(commands)) + except Exception as e: + self.logger.exception(e) + QtWidgets.QMessageBox.warning(self, "Save Parameter Fail", str(e), QtWidgets.QMessageBox.Ok) + + QtWidgets.QMessageBox.information(self, "Save Parameter Success", "Parameters saved successfully", + QtWidgets.QMessageBox.Ok) diff --git a/pyctbgui/pyctbgui/ui/__init__.py b/pyctbgui/pyctbgui/ui/__init__.py new file mode 100644 index 000000000..0a3f5ca61 --- /dev/null +++ b/pyctbgui/pyctbgui/ui/__init__.py @@ -0,0 +1 @@ +from .MainWindow import MainWindow \ No newline at end of file diff --git a/pyctbgui/pyctbgui/ui/acquisition.ui b/pyctbgui/pyctbgui/ui/acquisition.ui new file mode 100644 index 000000000..5b9fa58fd --- /dev/null +++ b/pyctbgui/pyctbgui/ui/acquisition.ui @@ -0,0 +1,927 @@ + + + Form + + + + 0 + 0 + 870 + 823 + + + + + 870 + 800 + + + + Form + + + + + 10 + 10 + 841 + 71 + + + + QFrame::StyledPanel + + + QFrame::Sunken + + + + + + + 0 + 0 + + + + + 125 + 31 + + + + + 125 + 31 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + QAbstractSpinBox::UpDownArrows + + + 1000 + + + 0 + + + + + + + Read Out Mode: + + + + + + + + 0 + 32 + + + + + 16777215 + 32 + + + + + Analog + + + + + Digital + + + + + Analog and Digital + + + + + Transceiver + + + + + Digital and Transceiver + + + + + + + + Run Clock Frequency (MHz): + + + + + + + + + 10 + 90 + 841 + 51 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + + + 0 + 0 + + + + + 125 + 32 + + + + + 125 + 32 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 1 + + + 100000 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 200 + 0 + + + + Transceiver Samples: + + + + + + + + + 10 + 150 + 841 + 201 + + + + QFrame::StyledPanel + + + QFrame::Sunken + + + + + + + 200 + 0 + + + + DBIT Clock Frequency (MHz): + + + + + + + + 0 + 0 + + + + + 200 + 0 + + + + ADC Clock Frequency (MHz): + + + + + + + + 0 + 0 + + + + + 125 + 31 + + + + + 125 + 31 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 9999 + + + + + + + DBIT Pipeline: + + + + + + + + 0 + 0 + + + + + 125 + 31 + + + + + 125 + 31 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 1000 + + + + + + + + 0 + 0 + + + + + 125 + 31 + + + + + 125 + 31 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + ADC Pipeline: + + + + + + + ADC Clock Phase (a.u.): + + + + + + + DBIT Clock Phase (a.u.): + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 10 + 20 + + + + + + + + + 0 + 0 + + + + + 125 + 31 + + + + + 125 + 31 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 1000 + + + + + + + + 0 + 0 + + + + + 125 + 31 + + + + + 125 + 31 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + 125 + 31 + + + + + 125 + 31 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 9999 + + + + + + + Analog Samples: + + + + + + + + 0 + 0 + + + + + 125 + 32 + + + + + 125 + 32 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 1 + + + 100000 + + + + + + + Digital Samples: + + + + + + + + 0 + 0 + + + + + 125 + 32 + + + + + 125 + 32 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 1 + + + 100000 + + + 1 + + + + + + + + + 10 + 370 + 841 + 181 + + + + QFrame::StyledPanel + + + QFrame::Sunken + + + + + + + 11 + + + + QFrame::Sunken + + + 1 + + + Output Settings + + + + + + + File name: + + + + + + + + 0 + 31 + + + + + 16777215 + 31 + + + + background-color: rgb(200, 219, 230); + + + File Name + + + + + + + Index: + + + + + + + + 0 + 31 + + + + + 200 + 31 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 999999999 + + + + + + + Raw + + + + + + + + 0 + 36 + + + + background-color: rgb(199, 213, 207); + + + Browse + + + + + + + + 0 + 31 + + + + + 16777215 + 31 + + + + background-color: rgb(200, 219, 230); + + + File Path + + + + + + + File path: + + + + + + + Numpy + + + + + + + Save format: + + + + + + + + + 10 + 570 + 841 + 141 + + + + + 0 + 0 + + + + QFrame::StyledPanel + + + QFrame::Sunken + + + + + + Number of frames: + + + + + + + + 0 + 0 + + + + + 120 + 32 + + + + + 16777215 + 32 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 1 + + + 999999999 + + + 999999999 + + + + + + + + 0 + 0 + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Period (s): + + + + + + + + 0 + 0 + + + + + 120 + 32 + + + + + 150 + 32 + + + + 4 + + + 99999.990000000005239 + + + + + + + + 0 + 31 + + + + + s + + + + + ms + + + + + μs + + + + + ns + + + + + + + + + 0 + 0 + + + + Number of triggers: + + + + + + + + 0 + 0 + + + + + 120 + 32 + + + + + 16777215 + 32 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 1 + + + 999999999 + + + + + + + Number of measurements: + + + + + + + + 120 + 32 + + + + + 16777215 + 32 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 1 + + + 999999999 + + + + + + + + + diff --git a/pyctbgui/pyctbgui/ui/adc.ui b/pyctbgui/pyctbgui/ui/adc.ui new file mode 100644 index 000000000..c1fabe266 --- /dev/null +++ b/pyctbgui/pyctbgui/ui/adc.ui @@ -0,0 +1,4212 @@ + + + Form + + + + 0 + 0 + 841 + 470 + + + + + 841 + 461 + + + + Form + + + + + 0 + 10 + 841 + 461 + + + + QFrame::StyledPanel + + + QFrame::Sunken + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + + + + false + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Inv + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + ADC17 + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + ADC29 + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + ADC22 + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Inv + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Inv + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Inv + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Inv + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Inv + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + + + + false + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Inv + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + ADC31 + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + + + + false + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + + + + false + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + ADC30 + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Inv + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + ADC2 + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + ADC5 + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Inv + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Inv + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + ADC26 + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Inv + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + ADC28 + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + ADC18 + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + + + + false + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + + + + false + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + + 80 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + ADC 16-31 + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + + + + false + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Inv + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + + + + false + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Inv + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + ADC4 + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 80 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + ADC 0-15 + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Inv + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Inv + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Inv + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + ADC11 + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + ADC21 + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + ADC12 + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + + + + false + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + + + + false + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + ADC16 + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Inv + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + + + + false + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + ADC9 + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + ADC19 + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + ADC3 + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Inv + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Inv + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + ADC13 + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + ADC20 + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Inv + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + ADC10 + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Inv + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + + + + false + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + + + + false + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + ADC6 + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Inv + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + ADC23 + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + + + + false + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Inv + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Inv + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + ADC24 + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + ADC25 + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + ADC1 + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Inv + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Inv + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + + + + false + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + ADC7 + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + + + + false + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + + + + false + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + ADC8 + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + + + + false + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Inv + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + + + 10 + + + + Inversion mask: + + + + + + + + 150 + 32 + + + + + 150 + 32 + + + + + Monospace + 10 + + + + background-color: rgb(255, 255, 255); + + + 0xFFFFFFFF + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + + + + + + 10 + + + + Enable mask: + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 150 + 32 + + + + + 150 + 32 + + + + + Monospace + 10 + + + + background-color: rgb(255, 255, 255); + + + 0xFFFFFFFF + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Inv + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + + + + false + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + ADC0 + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + + + + false + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Inv + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + + + + false + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + + + + false + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Inv + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + ADC14 + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + + + + false + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + + + + false + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + + + + false + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Inv + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + + + + false + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Inv + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + ADC27 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Inv + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Inv + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + ADC15 + + + + + + + + + diff --git a/pyctbgui/pyctbgui/ui/pattern.ui b/pyctbgui/pyctbgui/ui/pattern.ui new file mode 100644 index 000000000..0c642a83a --- /dev/null +++ b/pyctbgui/pyctbgui/ui/pattern.ui @@ -0,0 +1,2733 @@ + + + Form + + + + 0 + 0 + 870 + 800 + + + + + 870 + 800 + + + + Form + + + + + 0 + 10 + 471 + 311 + + + + QFrame::StyledPanel + + + QFrame::Sunken + + + + + + + 0 + 0 + + + + + 50 + 16777215 + + + + Loop 3 + + + + + + + + 110 + 31 + + + + + 110 + 31 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 999999999 + + + 0 + + + + + + + + 80 + 31 + + + + + 80 + 31 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 146 + 149 + 149 + + + + + + + + + Monospace + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + + + + + + 110 + 31 + + + + + 110 + 31 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 999999999 + + + + + + + + 80 + 31 + + + + + 80 + 31 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 146 + 149 + 149 + + + + + + + + + Monospace + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + + + + + + 80 + 31 + + + + + 80 + 31 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 146 + 149 + 149 + + + + + + + + + Monospace + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + + + + + + 80 + 31 + + + + + 80 + 31 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 146 + 149 + 149 + + + + + + + + + Monospace + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + + + + + + 80 + 31 + + + + + 80 + 31 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 146 + 149 + 149 + + + + + + + + + Monospace + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + + + + + + 110 + 31 + + + + + 110 + 31 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 999999999 + + + + + + + + 0 + 0 + + + + + 50 + 16777215 + + + + Loop 4 + + + + + + + + 110 + 31 + + + + + 110 + 31 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 999999999 + + + + + + + Stop Address + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + + + + 50 + 16777215 + + + + Loop 5 + + + + + + + + 80 + 31 + + + + + 80 + 31 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 146 + 149 + 149 + + + + + + + + + Monospace + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + + + + + + 80 + 31 + + + + + 80 + 31 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 146 + 149 + 149 + + + + + + + + + Monospace + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + + + + + + 0 + 0 + + + + + 50 + 16777215 + + + + Loop 2 + + + + + + + Repetitions + + + Qt::AlignCenter + + + + + + + + 80 + 31 + + + + + 80 + 31 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 146 + 149 + 149 + + + + + + + + + Monospace + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + + + + + Start Address + + + Qt::AlignCenter + + + + + + + + 80 + 31 + + + + + 80 + 31 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 146 + 149 + 149 + + + + + + + + + Monospace + + + + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + + + + + + 0 + 0 + + + + + 50 + 16777215 + + + + Loop 1 + + + + + + + + 80 + 31 + + + + + 80 + 31 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 146 + 149 + 149 + + + + + + + + + Monospace + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + + + + + + 110 + 31 + + + + + 110 + 31 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 999999999 + + + + + + + + 80 + 31 + + + + + 80 + 31 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 146 + 149 + 149 + + + + + + + + + Monospace + + + + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + + + + + + 0 + 0 + + + + + 50 + 16777215 + + + + Loop 0 + + + + + + + + 110 + 31 + + + + + 110 + 31 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 999999999 + + + + + + + + 80 + 31 + + + + + 80 + 31 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 146 + 149 + 149 + + + + + + + + + Monospace + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + + + + + + 0 + 0 + + + + + 50 + 16777215 + + + + Limits: + + + + + + + + 80 + 31 + + + + + 80 + 31 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 146 + 149 + 149 + + + + + + + + + Monospace + + + + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + + + + + + 80 + 31 + + + + + 80 + 31 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 146 + 149 + 149 + + + + + + + + + Monospace + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + + + + + + + 490 + 10 + 361 + 271 + + + + QFrame::StyledPanel + + + QFrame::Sunken + + + + + + + 125 + 31 + + + + + 125 + 31 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 999999999 + + + + + + + + 125 + 31 + + + + + 125 + 31 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 999999999 + + + + + + + + 0 + 0 + + + + + 50 + 16777215 + + + + Wait 0 + + + + + + + + 0 + 0 + + + + + 50 + 16777215 + + + + Wait 5 + + + + + + + + 125 + 31 + + + + + 125 + 31 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 999999999 + + + + + + + + 80 + 31 + + + + + 80 + 31 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 146 + 149 + 149 + + + + + + + + + Monospace + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + + + + + + 80 + 31 + + + + + 80 + 31 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 146 + 149 + 149 + + + + + + + + + Monospace + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + + + + + + 0 + 0 + + + + + 50 + 16777215 + + + + Wait 3 + + + + + + + Time + + + Qt::AlignCenter + + + + + + + + 80 + 31 + + + + + 80 + 31 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 146 + 149 + 149 + + + + + + + + + Monospace + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + + + + + + 125 + 31 + + + + + 125 + 31 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 999999999 + + + + + + + + 0 + 0 + + + + + 50 + 16777215 + + + + Wait 4 + + + + + + + + 80 + 31 + + + + + 80 + 31 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 146 + 149 + 149 + + + + + + + + + Monospace + + + + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + + + + + + 0 + 0 + + + + + 50 + 16777215 + + + + Wait 1 + + + + + + + + 80 + 31 + + + + + 80 + 31 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 146 + 149 + 149 + + + + + + + + + Monospace + + + + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + + + + + Address + + + Qt::AlignCenter + + + + + + + + 125 + 31 + + + + + 125 + 31 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 999999999 + + + + + + + + 80 + 31 + + + + + 80 + 31 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 36 + 31 + 49 + + + + + + + + + 146 + 149 + 149 + + + + + + + + + Monospace + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + + + + + + 125 + 31 + + + + + 125 + 31 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 999999999 + + + + + + + + 0 + 0 + + + + + 50 + 16777215 + + + + Wait 2 + + + + + + + + + 10 + 330 + 841 + 141 + + + + QFrame::StyledPanel + + + QFrame::Sunken + + + + + + + 0 + 36 + + + + + 16777215 + 31 + + + + background-color: rgb(199, 213, 207); + + + Browse + + + + + + + background-color: rgb(200, 219, 230); + + + python + + + Compiler + + + + + + + + 0 + 36 + + + + + 16777215 + 31 + + + + background-color: rgb(199, 213, 207); + + + Browse + + + + + + + Pattern: + + + + + + + background-color: rgb(200, 219, 230); + + + Pattern File + + + + + + + background-color: rgb(200, 219, 230); + + + Uncompiled Pattern File + + + + + + + + 0 + 36 + + + + + 16777215 + 31 + + + + background-color: rgb(199, 213, 207); + + + Browse + + + + + + + Uncompiled Pattern: + + + + + + + Compiler: + + + + + + + + + 10 + 480 + 841 + 211 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + + + 0 + 0 + + + + + 30 + 16777215 + + + + : + + + + + + + + 100 + 20 + + + + + 9 + + + + Alpha + + + Qt::AlignCenter + + + + + + + + 100 + 20 + + + + + 9 + + + + Alpha rect + + + Qt::AlignCenter + + + + + + + + 80 + 20 + + + + + 9 + + + + Color + + + Qt::AlignCenter + + + + + + + + 100 + 20 + + + + Viewer + + + + + + + + 0 + 31 + + + + + 120 + 32 + + + + Alpha + + + 1.000000000000000 + + + 0.010000000000000 + + + + + + + + 100 + 32 + + + + + 120 + 32 + + + + + Loop 0 + + + + + Loop 1 + + + + + Loop 2 + + + + + Loop 3 + + + + + Loop 4 + + + + + Loop 5 + + + + + + + + + 0 + 0 + + + + + 30 + 16777215 + + + + : + + + + + + + + 0 + 31 + + + + + 120 + 32 + + + + Alpha + + + 1.000000000000000 + + + 0.010000000000000 + + + + + + + + 100 + 32 + + + + + 120 + 32 + + + + + Wait 0 + + + + + Wait 1 + + + + + Wait 2 + + + + + Wait 3 + + + + + Wait 4 + + + + + Wait 5 + + + + + + + + + 70 + 32 + + + + + 120 + 32 + + + + Line Style + + + + + + + + 120 + 32 + + + + Alpha Rect + + + 1.000000000000000 + + + 0.010000000000000 + + + + + + + + 80 + 32 + + + + + 120 + 32 + + + + + + + + + 70 + 32 + + + + + 120 + 32 + + + + Line Style + + + + + + + + 120 + 32 + + + + Alpha Rect + + + 1.000000000000000 + + + 0.010000000000000 + + + + + + + + 70 + 20 + + + + + 9 + + + + Line style + + + Qt::AlignCenter + + + + + + + + 80 + 32 + + + + + 120 + 32 + + + + + + + + + 100 + 32 + + + + + 120 + 32 + + + + + Plot color 1 + + + + + Plot color 2 + + + + + + + + + 80 + 32 + + + + + 120 + 32 + + + + + + + + + + + 100 + 0 + + + + + 100 + 16777215 + + + + Clock spacing: + + + + + + + + 70 + 32 + + + + + 16777215 + 32 + + + + 999 + + + 999 + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 0 + + + + + + + + Clocks Number + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 70 + 0 + + + + + 70 + 16777215 + + + + Line width + + + + + + + + 0 + 32 + + + + + 120 + 32 + + + + Alpha Rect + + + + + + + + + + + 10 + 720 + 841 + 51 + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 200 + 0 + + + + + + + + Compile + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 15 + 20 + + + + + + + + + 150 + 36 + + + + + 16777215 + 36 + + + + background-color: rgb(199, 213, 207); + + + Load Pattern + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 15 + 20 + + + + + + + + + 150 + 36 + + + + + 16777215 + 36 + + + + background-color: rgb(199, 213, 207); + + + View Pattern + + + + + + + + + diff --git a/pyctbgui/pyctbgui/ui/plot.ui b/pyctbgui/pyctbgui/ui/plot.ui new file mode 100644 index 000000000..b01bc3e71 --- /dev/null +++ b/pyctbgui/pyctbgui/ui/plot.ui @@ -0,0 +1,1055 @@ + + + Form + + + + 0 + 0 + 860 + 800 + + + + + 860 + 800 + + + + Form + + + + + 10 + 50 + 841 + 141 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + + true + + + Type: + + + + + + + false + + + Distribution + + + buttonGroup + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + 2 + + + + + + + Digital plot: + + + + + + + Overlay + + + buttonGroup_2 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + show legend + + + true + + + + + + + Stripe + + + true + + + buttonGroup_2 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + true + + + + 0 + 31 + + + + Image decoder + + + + Matterhorn + + + + + Moench04 + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + true + + + + 120 + 31 + + + + Color map of the image + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 20 + + + + + + + + Decoder: + + + + + + + Color Map: + + + + + + + + + + + Options: + + + + + + + true + + + No Plot + + + false + + + buttonGroup + + + + + + + true + + + + 0 + 31 + + + + <html><head/><body><p>If set to high readout, zmq HWM is set to 2 and buffer size to 1MB to drop zmq packets to catch up.</p><p>If set to low readout (default), zmq HWM is set to zmq default (1000) and buffer size to os default to not drop any zmq packets.</p></body></html> + + + + Low - drop no zmq packet + + + + + High - drop zmq packets to catch up + + + + + + + + <html><head/><body><p>If set to high readout, zmq HWM is set to 2 and buffer size to 1MB to drop zmq packets to catch up.</p><p>If set to low readout (default), zmq HWM is set to zmq default (1000) and buffer size to os default to not drop any zmq packets.</p></body></html> + + + Readout speed: + + + + + + + true + + + Image + + + buttonGroup + + + + + + + true + + + Waveform + + + true + + + buttonGroup + + + + + + + + + 0 + 480 + 841 + 311 + + + + QFrame::StyledPanel + + + QFrame::Sunken + + + + + + false + + + Fit Panel ADC: + + + + + + + false + + + Max: + + + + + + + false + + + Values + + + + + + + false + + + Dynamic Range: + + + + + + + false + + + Y: + + + + + + + false + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + false + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + false + + + Min: + + + + + + + false + + + X: + + + + + + + false + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + false + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + false + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + false + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + false + + + Image Pixels: + + + + + + + false + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + false + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + false + + + Y + + + + + + + false + + + Min: + + + + + + + false + + + X + + + + + + + false + + + Max: + + + + + + + false + + + Serial offset: + + + + + + + false + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + false + + + Plot Bit: + + + + + + + false + + + Raw Data + + + + + + + + 0 + 31 + + + + background-color: rgb(199, 213, 207); + + + Referesh + + + + + + + false + + + Pedestal Subtract + + + + + + + false + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + false + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + false + + + N Counters: + + + + + + + + + 10 + 219 + 841 + 81 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + 0 + -7 + 841 + 111 + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 20 + + + + + + + + Color Range: + + + + + + + + + 0 + 0 + 121 + 91 + + + + + + + + 16777215 + 15 + + + + All + + + true + + + buttonGroup_4 + + + + + + + true + + + + 16777215 + 15 + + + + 3-97% + + + buttonGroup_4 + + + + + + + + 16777215 + 15 + + + + Fixed + + + buttonGroup_4 + + + + + + + + + + + + 50 + 16777215 + + + + min: + + + + + + + false + + + -1000.000000000000000 + + + 100000.000000000000000 + + + + + + + + 50 + 16777215 + + + + max: + + + + + + + false + + + 100000.000000000000000 + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 20 + + + + + + + + + + + 10 + 330 + 841 + 101 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + 0 + 0 + 841 + 51 + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 20 + + + + + + + + true + + + Pedestal: + + + + + + + + 250 + 0 + + + + recorded frames: 0 + + + + + + + true + + + Record + + + true + + + false + + + buttonGroup_3 + + + + + + + true + + + Apply + + + true + + + buttonGroup_3 + + + + + + + true + + + + 0 + 31 + + + + background-color: rgb(199, 213, 207); + + + Reset + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 20 + + + + + + + + + + -1 + 49 + 841 + 51 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 120 + 31 + + + + background-color: rgb(199, 213, 207); + + + Load Pedestal + + + + + + + + 120 + 31 + + + + background-color: rgb(199, 213, 207); + + + Save Pedestal + + + + + + + Qt::Horizontal + + + QSizePolicy::Preferred + + + + 40 + 20 + + + + + + + + + + + + + + + + + diff --git a/pyctbgui/pyctbgui/ui/powerSupplies.ui b/pyctbgui/pyctbgui/ui/powerSupplies.ui new file mode 100644 index 000000000..d8739957c --- /dev/null +++ b/pyctbgui/pyctbgui/ui/powerSupplies.ui @@ -0,0 +1,483 @@ + + + Form + + + + 0 + 0 + 827 + 375 + + + + Form + + + + + 0 + 0 + 841 + 381 + + + + QFrame::StyledPanel + + + QFrame::Sunken + + + + + + + 0 + 32 + + + + + 150 + 32 + + + + Only accepts value range (636 - 2468) + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + mV + + + 2468 + + + + + + + + 100 + 16777215 + + + + 0 + + + + + + + + 0 + 32 + + + + + 150 + 32 + + + + Only accepts value range (636 - 2468) + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + mV + + + 0 + + + 2468 + + + 0 + + + + + + + + 100 + 16777215 + + + + 0 + + + + + + + true + + + + 0 + 36 + + + + + 150 + 16777215 + + + + QPushButton{background-color: red;} +QPushButton:disabled{background-color: grey;} + + + Power off + + + false + + + + + + + + 100 + 16777215 + + + + 0 + + + + + + + + 100 + 16777215 + + + + 0 + + + + + + + + 100 + 16777215 + + + + VC + + + + + + + + 0 + 32 + + + + + 150 + 32 + + + + Only accepts value range (1200 - 2468) + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + mV + + + 2468 + + + + + + + + 0 + 32 + + + + + 150 + 32 + + + + Only accepts value range (1200 - 2468) + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + mV + + + 2468 + + + + + + + + 100 + 16777215 + + + + VB + + + + + + + + 100 + 16777215 + + + + 0 + + + + + + + + 100 + 16777215 + + + + 0 + + + + + + + + 100 + 16777215 + + + + VA + + + + + + + + 100 + 16777215 + + + + 0 + + + + + + + + 100 + 16777215 + + + + VD + + + + + + + + 100 + 16777215 + + + + VCHIP + + + + + + + + 100 + 16777215 + + + + 0 + + + + + + + + 0 + 32 + + + + + 150 + 32 + + + + Only accepts value range (636 - 2468) + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + mV + + + 2468 + + + + + + + + 100 + 16777215 + + + + VIO + + + + + + + + 100 + 16777215 + + + + 0 + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 80 + 20 + + + + + + + + + 100 + 16777215 + + + + 0 + + + + + + + + 0 + 32 + + + + + 150 + 32 + + + + Only accepts value range (636 - 2468) + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + mV + + + 2468 + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 80 + 20 + + + + + + + + + + diff --git a/pyctbgui/pyctbgui/ui/signals.ui b/pyctbgui/pyctbgui/ui/signals.ui new file mode 100644 index 000000000..231c0b92f --- /dev/null +++ b/pyctbgui/pyctbgui/ui/signals.ui @@ -0,0 +1,6189 @@ + + + Form + + + + 0 + 0 + 831 + 821 + + + + + 831 + 821 + + + + Form + + + + + 0 + 0 + 831 + 821 + + + + + 831 + 821 + + + + QFrame::StyledPanel + + + QFrame::Sunken + + + + + + + 50 + 0 + + + + + 16777215 + 16 + + + + + 10 + + + + BIT 28 + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Out + + + + + + + true + + + + 16777215 + 16 + + + + + + + + + + false + + + + + + + + 50 + 0 + + + + + 16777215 + 16 + + + + + 10 + + + + BIT 26 + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Out + + + + + + + + 50 + 0 + + + + + 16777215 + 16 + + + + + 10 + + + + BIT 2 + + + + + + + + 50 + 0 + + + + + 16777215 + 16 + + + + + 10 + + + + BIT 20 + + + + + + + + 0 + 0 + + + + + 16777215 + 16 + + + + + 10 + + + + BIT 23 + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Out + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Out + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 50 + 0 + + + + + 16777215 + 16 + + + + + 10 + + + + BIT 8 + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + BIT 43 + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 50 + 0 + + + + + 16777215 + 16 + + + + + 10 + + + + BIT 22 + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + BIT 44 + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Out + + + + + + + + 50 + 0 + + + + + 16777215 + 16 + + + + + 10 + + + + BIT 19 + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 9 + + + + BIT 60 + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 50 + 0 + + + + + 16777215 + 16 + + + + + 10 + + + + BIT 7 + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Out + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 50 + 0 + + + + + 16777215 + 16 + + + + + 10 + + + + BIT 18 + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 50 + 0 + + + + + 16777215 + 16 + + + + + 10 + + + + BIT 16 + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + BIT 59 + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 50 + 0 + + + + + 16777215 + 16 + + + + + 10 + + + + BIT 29 + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Out + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Out + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 9 + + + + BIT 41 + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 50 + 0 + + + + + 16777215 + 16 + + + + + 10 + + + + BIT 4 + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + BIT 58 + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Out + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Out + + + + + + + + 50 + 0 + + + + + 16777215 + 16 + + + + + 10 + + + + BIT 9 + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 50 + 0 + + + + + 16777215 + 16 + + + + + 10 + + + + BIT 17 + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 50 + 0 + + + + + 16777215 + 16 + + + + + 10 + + + + BIT 6 + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 50 + 0 + + + + + 16777215 + 16 + + + + + 10 + + + + BIT 1 + + + + + + + + 16777215 + 16 + + + + + 9 + + + + BIT 35 + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + BIT 51 + + + + + + + + 50 + 0 + + + + + 16777215 + 16 + + + + + 10 + + + + BIT 21 + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Out + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Out + + + + + + + + 50 + 0 + + + + + 16777215 + 16 + + + + + 10 + + + + BIT 13 + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Out + + + + + + + + 50 + 0 + + + + + 16777215 + 16 + + + + + 10 + + + + BIT 0 + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 9 + + + + BIT 47 + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 50 + 0 + + + + + 16777215 + 16 + + + + + 10 + + + + BIT 24 + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 9 + + + + BIT 57 + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 9 + + + + BIT 63 + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Out + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 80 + 0 + + + + + 16777215 + 16 + + + + + 9 + + + + BIT 32-63 + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + true + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 9 + + + + BIT 36 + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + BIT 48 + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Out + + + + + + + + 50 + 0 + + + + + 16777215 + 16 + + + + + 10 + + + + BIT 3 + + + + + + + + 16777215 + 16 + + + + + 9 + + + + BIT 37 + + + + + + + + 50 + 0 + + + + + 16777215 + 16 + + + + + 10 + + + + BIT 5 + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + BIT 34 + + + + + + + + 16777215 + 16 + + + + + 9 + + + + BIT 46 + + + + + + + + 50 + 0 + + + + + 16777215 + 16 + + + + + 10 + + + + BIT3 1 + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Out + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + BIT 32 + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 9 + + + + BIT 50 + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 50 + 0 + + + + + 16777215 + 16 + + + + + 10 + + + + BIT 14 + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 9 + + + + BIT 40 + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + true + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Out + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 9 + + + + BIT 42 + + + + + + + + 50 + 0 + + + + + 16777215 + 16 + + + + + 10 + + + + BIT 25 + + + + + + + + 16777215 + 16 + + + + + 9 + + + + BIT 39 + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Out + + + + + + + + 0 + 0 + + + + + 16777215 + 16 + + + + + 9 + + + + BIT 55 + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Out + + + + + + + + 50 + 0 + + + + + 16777215 + 16 + + + + + 10 + + + + BIT 10 + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Out + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 9 + + + + BIT 53 + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + BIT 49 + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Out + + + + + + + + 50 + 0 + + + + + 16777215 + 16 + + + + + 10 + + + + BIT 30 + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 9 + + + + BIT 52 + + + + + + + + 16777215 + 16 + + + + + 9 + + + + BIT 62 + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 50 + 0 + + + + + 16777215 + 16 + + + + + 10 + + + + BIT 27 + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Out + + + + + + + + 80 + 0 + + + + + 16777215 + 16 + + + + + 10 + + + + BIT 0-31 + + + + + + + + 16777215 + 16 + + + + + 9 + + + + BIT 56 + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 50 + 0 + + + + + 16777215 + 16 + + + + + 10 + + + + BIT 11 + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 9 + + + + BIT 61 + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Out + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 10 + + + + Out + + + + + + + + 50 + 0 + + + + + 16777215 + 16 + + + + + 10 + + + + BIT 15 + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 50 + 0 + + + + + 16777215 + 16 + + + + + 10 + + + + BIT 12 + + + + + + + + 16777215 + 16 + + + + + 9 + + + + BIT 38 + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Plot + + + + + + + + 16777215 + 16 + + + + + 9 + + + + BIT 54 + + + + + + + + 16777215 + 16 + + + + + 9 + + + + BIT 45 + + + + + + + + 16777215 + 16 + + + + + + + false + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + Out + + + + + + + + 16777215 + 16 + + + + + 9 + + + + DB List + + + + + + + + 16777215 + 16 + + + + + 9 + + + + BIT 33 + + + + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + + + 10 + + + + DBit Offset: + + + + + + + + 0 + 0 + + + + + 200 + 32 + + + + + 200 + 32 + + + + + Monospace + 10 + + + + 0xFFFFFFFFFFFFFFFF + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 150 + 32 + + + + + 150 + 32 + + + + + 10 + + + + background-color: rgb(255, 255, 255); + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 50 + 0 + + + + + 10 + + + + IO Control Register: + + + + + + + + + + + + diff --git a/pyctbgui/pyctbgui/ui/slowAdcs.ui b/pyctbgui/pyctbgui/ui/slowAdcs.ui new file mode 100644 index 000000000..546a30e53 --- /dev/null +++ b/pyctbgui/pyctbgui/ui/slowAdcs.ui @@ -0,0 +1,472 @@ + + + Form + + + + 0 + 0 + 841 + 571 + + + + + 841 + 571 + + + + Form + + + + + 0 + 0 + 841 + 571 + + + + QFrame::StyledPanel + + + QFrame::Sunken + + + + + + SENSE 0: + + + + + + + *** + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 150 + 36 + + + + + 16777215 + 36 + + + + + Cantarell + + + + background-color: rgb(199, 213, 207); + + + Update + + + + ../../../../.designer../../../../.designer + + + false + + + + + + + *** + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + *** + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 150 + 36 + + + + + 16777215 + 36 + + + + background-color: rgb(199, 213, 207); + + + Update + + + false + + + + + + + SENSE 4: + + + + + + + *** + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 150 + 36 + + + + + 16777215 + 36 + + + + background-color: rgb(199, 213, 207); + + + Update + + + false + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + SENSE 5: + + + + + + + *** + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 150 + 36 + + + + + 16777215 + 36 + + + + background-color: rgb(199, 213, 207); + + + Update + + + false + + + + + + + SENSE 6: + + + + + + + *** + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + SENSE 1: + + + + + + + + 150 + 36 + + + + + 16777215 + 36 + + + + background-color: rgb(199, 213, 207); + + + Update + + + false + + + + + + + SENSE 2: + + + + + + + *** + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + *** + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 150 + 36 + + + + + 16777215 + 36 + + + + background-color: rgb(199, 213, 207); + + + Update + + + false + + + + + + + SENSE 3: + + + + + + + + 150 + 36 + + + + + 16777215 + 36 + + + + background-color: rgb(199, 213, 207); + + + Update + + + false + + + + + + + SENSE 7: + + + + + + + *** + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 150 + 36 + + + + + 16777215 + 36 + + + + background-color: rgb(199, 213, 207); + + + Update + + + false + + + + + + + Temperature + + + + + + + + 150 + 36 + + + + + 16777215 + 36 + + + + background-color: rgb(199, 213, 207); + + + Update + + + false + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 20 + + + + + + + + + + diff --git a/pyctbgui/pyctbgui/ui/transceiver.ui b/pyctbgui/pyctbgui/ui/transceiver.ui new file mode 100644 index 000000000..7d1548028 --- /dev/null +++ b/pyctbgui/pyctbgui/ui/transceiver.ui @@ -0,0 +1,542 @@ + + + Form + + + + 0 + 0 + 841 + 239 + + + + + 841 + 181 + + + + Form + + + + + 10 + 20 + 841 + 181 + + + + + 841 + 181 + + + + QFrame::StyledPanel + + + QFrame::Sunken + + + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + + + 150 + 32 + + + + + 150 + 32 + + + + + Monospace + 10 + + + + background-color: rgb(255, 255, 255); + + + 0xFFFF + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + + + + + + 10 + + + + Enable mask: + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 80 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Transceiver 0 + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Transceiver 2 + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + + + + false + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Transceiver 1 + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Transceiver 3 + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + Plot + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + + + + false + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + En + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + + + + false + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 10 + + + + + + + false + + + + + + + + + diff --git a/pyctbgui/pyctbgui/utils/__init__.py b/pyctbgui/pyctbgui/utils/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/pyctbgui/pyctbgui/utils/alias_utility.py b/pyctbgui/pyctbgui/utils/alias_utility.py new file mode 100644 index 000000000..af5cbbe36 --- /dev/null +++ b/pyctbgui/pyctbgui/utils/alias_utility.py @@ -0,0 +1,101 @@ +from pathlib import Path + + +def read_alias_file(alias_file): + with open(alias_file) as fp: + lines_alias = fp.readlines() + return parse_alias_lines(lines_alias) + + +def parse_alias_lines(lines_alias): + bit_names = [None] * 64 + bit_plots = [None] * 64 + bit_colors = [None] * 64 + adc_names = [None] * 32 + adc_plots = [None] * 32 + adc_colors = [None] * 32 + dac_names = [None] * 18 + sense_names = [None] * 8 + power_names = [None] * 5 + pat_file_name = None + + for line_nr, line in enumerate(lines_alias): + ignore_list = ['PATCOMPILER'] + + # skip empty lines + if line == '\n' or len(line) == 0: + continue + # skip comments + if line.startswith('#'): + continue + + cmd, *args = line.split() + + if not args: + raise Exception( + f"Alias file parsing failed: Require atleast one argument in addition to command. ({line_nr}:{line})") + + if cmd.startswith("BIT"): + process_alias_bit_or_adc(cmd, args, bit_names, bit_plots, bit_colors) + + elif cmd.startswith("ADC"): + process_alias_bit_or_adc(cmd, args, adc_names, adc_plots, adc_colors) + + elif cmd.startswith("DAC"): + if len(args) > 1: + raise Exception(f"Too many arguments {len(args)} (expected max: 1) for this type. ({line_nr}:{line})") + i = int(cmd[3:]) + dac_names[i] = args[0] + + elif cmd.startswith("SENSE"): + if len(args) > 1: + raise Exception(f"Too many arguments {len(args)} (expected max: 1) for this type. ({line_nr}:{line})") + i = int(cmd[5:]) + sense_names[i] = args[0] + + elif cmd in ["VA", "VB", "VC", "VD", "VIO"]: + if len(args) > 1: + raise Exception(f"Too many arguments {len(args)} (expected max: 1) for this type. ({line_nr}:{line})") + + match cmd: + case "VA": + i = 0 + case "VB": + i = 1 + case "VC": + i = 2 + case "VD": + i = 3 + case "VIO": + i = 4 + power_names[i] = args[0] + + elif cmd == "PATFILE": + if len(args) > 1: + raise Exception(f"Too many arguments {len(args)} (expected max: 1) for this type. ({line_nr}:{line})") + + pat_file_name = args[0] + path = Path(pat_file_name) + if not path.is_file(): + raise Exception("Pattern file provided in alias file does not exist.

Pattern file:" + + pat_file_name) + elif cmd in ignore_list: + pass + + else: + raise Exception(f"Command: {cmd} not supported. Line {line_nr}:{line}") + + return bit_names, bit_plots, bit_colors, adc_names, adc_plots, adc_colors, dac_names, sense_names, power_names,\ + pat_file_name + + +def process_alias_bit_or_adc(cmd, args, names, plots, colors): + n_args = len(args) + i = int(cmd[3:]) + names[i] = args[0] + if n_args > 1: + plots[i] = bool(int(args[1])) + if n_args > 2: + colors[i] = args[2] + if n_args > 3: + raise Exception(f"Too many arguments {args} (expected max: 3) for this type in line.") diff --git a/pyctbgui/pyctbgui/utils/bit_utils.py b/pyctbgui/pyctbgui/utils/bit_utils.py new file mode 100644 index 000000000..335c9d3e9 --- /dev/null +++ b/pyctbgui/pyctbgui/utils/bit_utils.py @@ -0,0 +1,16 @@ +def set_bit(value, bit_nr): + return value | 1 << bit_nr + + +def remove_bit(value, bit_nr): + return value & ~(1 << bit_nr) + + +def bit_is_set(value, bit_nr): + return (value >> bit_nr) & 1 == 1 + + +def manipulate_bit(is_set, value, bit_nr): + if is_set: + return set_bit(value, bit_nr) + return remove_bit(value, bit_nr) diff --git a/pyctbgui/pyctbgui/utils/decoder.py b/pyctbgui/pyctbgui/utils/decoder.py new file mode 100644 index 000000000..6197f811c --- /dev/null +++ b/pyctbgui/pyctbgui/utils/decoder.py @@ -0,0 +1,51 @@ +from pyctbgui.utils.defines import Defines +from pyctbgui._decoder import * #bring in the function from the compiled extension +import numpy as np +""" +Python implementation, keep as a reference. Change name and replace +with C version to swap it out in the GUI +""" + + +def moench04(analog_buffer): + nAnalogCols = Defines.Moench04.nCols + nAnalogRows = Defines.Moench04.nRows + adcNumbers = Defines.Moench04.adcNumbers + nPixelsPerSC = Defines.Moench04.nPixelsPerSuperColumn + scWidth = Defines.Moench04.superColumnWidth + + analog_frame = np.zeros((nAnalogCols, nAnalogRows), dtype=analog_buffer.dtype) + + for iPixel in range(nPixelsPerSC): + for iSC, iAdc in enumerate(adcNumbers): + col = ((iAdc % 16) * scWidth) + (iPixel % scWidth) + if iSC < 16: + row = 199 - int(iPixel / scWidth) + else: + row = 200 + int(iPixel / scWidth) + index_min = iPixel * 32 + iSC + pixel_value = analog_buffer[index_min] + analog_frame[row, col] = pixel_value + + return analog_frame + + +def matterhorn(trans_buffer): + nTransceiverRows = Defines.Matterhorn.nRows + nTransceiverCols = Defines.Matterhorn.nCols + + transceiver_frame = np.zeros((nTransceiverCols, nTransceiverRows), dtype=trans_buffer.dtype) + + offset = 0 + nSamples = Defines.Matterhorn.nPixelsPerTransceiver + for row in range(Defines.Matterhorn.nRows): + for col in range(Defines.Matterhorn.nHalfCols): + #print(f'row:{row} col:{col} offset: {offset}') + for iTrans in range(Defines.Matterhorn.nTransceivers): + transceiver_frame[iTrans * Defines.Matterhorn.nHalfCols + col, + row] = trans_buffer[offset + nSamples * iTrans] + offset += 1 + if (col + 1) % nSamples == 0: + offset += nSamples + + return transceiver_frame diff --git a/pyctbgui/pyctbgui/utils/defines.py b/pyctbgui/pyctbgui/utils/defines.py new file mode 100644 index 000000000..51c6ac1cb --- /dev/null +++ b/pyctbgui/pyctbgui/utils/defines.py @@ -0,0 +1,111 @@ +from enum import Enum + + +class Defines: + Time_Wait_For_Packets_ms = 0.5 + Time_Status_Refresh_ms = 100 + Time_Plot_Refresh_ms = 20 + + Zmq_hwm_high_speed = 2 + Zmq_hwm_low_speed = -1 + + Acquisition_Tab_Index = 7 + Max_Tabs = 9 + + class adc: + tabIndex = 5 + count = 32 + half = 16 + BIT0_15_MASK = 0x0000FFFF + BIT16_31_MASK = 0xFFFF0000 + + class dac: + tabIndex = 0 + count = 18 + + class signals: + tabIndex = 3 + count = 64 + half = 32 + BIT0_31_MASK = 0x00000000FFFFFFFF + BIT32_63_MASK = 0xFFFFFFFF00000000 + + class pattern: + tabIndex = 6 + loops_count = 6 + + class transceiver: + count = 4 + tabIndex = 4 + + class slowAdc: + tabIndex = 2 + count = 8 + + colCount = 4 + + powerSupplies = ('A', 'B', 'C', 'D', 'IO') + + class ImageIndex(Enum): + Matterhorn = 0 + Moench04 = 1 + + class Matterhorn: + nRows = 48 + nHalfCols = 24 + nCols = 48 + nTransceivers = 2 + tranceiverEnable = 0x3 + nPixelsPerTransceiver = 4 + + class Moench04: + nRows = 400 + nCols = 400 + adcNumbers = [ + 9, 8, 11, 10, 13, 12, 15, 14, 1, 0, 3, 2, 5, 4, 7, 6, 23, 22, 21, 20, 19, 18, 17, 16, 31, 30, 29, 28, 27, + 26, 25, 24 + ] + nPixelsPerSuperColumn = 5000 + superColumnWidth = 25 + + Color_map = [ + 'viridis', 'plasma', 'inferno', 'magma', 'cividis', 'binary', 'gist_yarg', 'gist_gray', 'gray', 'bone', 'pink', + 'spring', 'summer', 'autumn', 'winter', 'cool', 'Wistia', 'hot', 'afmhot', 'gist_heat', 'copper', + 'gist_rainbow', 'rainbow', 'jet', 'turbo' + ] + Default_Color_Map = 'viridis' + + # pattern viewer defines + + # pattern plot + Colors_plot = ['Blue', 'Orange'] + + # Wait colors and line styles (6 needed from 0 to 5) + # Colors_wait = ['b', 'g', 'r', 'c', 'm', 'y'] + Colors_wait = ['Blue', 'Green', 'Red', 'Cyan', 'Magenta', 'Yellow'] + Linestyles_wait = ['--', '--', '--', '--', '--', '--'] + Alpha_wait = [0.5, 0.5, 0.5, 0.5, 0.5, 0.5] + Alpha_wait_rect = [0.2, 0.2, 0.2, 0.2, 0.2, 0.2] + + # Loop colors and line styles (6 needed from 0 to 5) + Colors_loop = ['Green', 'Red', 'Purple', 'Brown', 'Pink', 'Grey'] + Linestyles_loop = ['-.', '-.', '-.', '-.', '-.', '-.'] + Alpha_loop = [0.5, 0.5, 0.5, 0.5, 0.5, 0.5] + Alpha_loop_rect = [0.2, 0.2, 0.2, 0.2, 0.2, 0.2] + + # Display the count of clocks + Clock_vertical_lines_spacing = 50 + Show_clocks_number = True + Line_width = 2.0 + + Colors = [ + 'Blue', 'Orange', 'Green', 'Red', 'Purple', 'Brown', 'Pink', 'Gray', 'Olive', 'Cyan', 'Magenta', 'Yellow', + 'Black', 'White' + ] + + LineStyles = ['-', '--', '-.', ':'] + + class colorRange(Enum): + all = 0 + center = 1 + fixed = 2 diff --git a/pyctbgui/pyctbgui/utils/numpyWriter/__init__.py b/pyctbgui/pyctbgui/utils/numpyWriter/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/pyctbgui/pyctbgui/utils/numpyWriter/npy_writer.py b/pyctbgui/pyctbgui/utils/numpyWriter/npy_writer.py new file mode 100644 index 000000000..7eea8ec67 --- /dev/null +++ b/pyctbgui/pyctbgui/utils/numpyWriter/npy_writer.py @@ -0,0 +1,224 @@ +""" +Wrapper to be able to append frames to a numpy file + +numpy header v1 + +- 6bytes \x93NUMPY +- 1 byte major version number \x01 +- 1 byte minor version number \x00 +- 2 bytes (unsigned short) HEADER_LEN length of header to follow +- Header as an ASCII dict terminated by \n padded with space \x20 to make sure +we get len(magic string) + 2 + len(length) + HEADER_LEN divisible with 64 +Allocate enough space to allow for the data to grow +""" + +import ast +import os +import zipfile +from pathlib import Path + +import numpy as np + + +class NumpyFileManager: + """ + class used to read and write into .npy files that can't be loaded completely into memory + + for read mode implements numpy like interface and file-like object function + """ + magic_str = np.lib.format.magic(1, 0) + headerLength = np.uint16(128) + FSEEK_FILE_END = 2 + BUFFER_MAX = 500 + + def __init__( + self, + file: str | Path | zipfile.ZipExtFile, + mode: str = 'r', + frameShape: tuple = None, + dtype=None, + ): + """ + initiates a NumpyFileManager class for reading or writing bytes directly to/from a .npy file + @param file: path to the file to open or create + @param frameShape: shape of the frame ex: (5000,) for waveforms or (400,400) for image + @param dtype: type of the numpy array's header + @param mode: file open mode must be in 'rwx' + """ + if mode not in ['r', 'w', 'x', 'r+']: + raise ValueError('file mode should be either r,w,x,r+') + + if isinstance(file, zipfile.ZipExtFile): + if mode != 'r': + raise ValueError('NumpyFileManager only supports read mode for zipfiles') + else: + if mode == 'x' and Path.is_file(Path(file)): + raise FileExistsError(f'file {file} exists while given mode is x') + + self.dtype = np.dtype(dtype) # in case we pass a type like np.float32 + self.frameShape = frameShape + self.frameCount = 0 + self.cursorPosition = self.headerLength + self.mode = mode + + # if newFile frameShape and dtype should be present + if mode == 'w' or mode == 'x': + assert frameShape is not None + assert dtype is not None + # create/clear the file with mode wb+ + self.file = open(file, 'wb+') + self.updateHeader() + + else: + # opens file for read and check if the header of the file corresponds to the given function + # arguments + if isinstance(file, zipfile.ZipExtFile): + self.file = file + else: + mode = 'rb' if self.mode == 'r' else 'rb+' + self.file = open(file, mode) + self.file.seek(10) + headerStr = self.file.read(np.uint16(self.headerLength - 10)).decode("UTF-8") + header_dict = ast.literal_eval(headerStr) + self.frameShape = header_dict['shape'][1:] + if frameShape is not None: + assert frameShape == self.frameShape, \ + f"shape in arguments ({frameShape}) is not the same as the shape of the stored " \ + f"file ({self.frameShape})" + + self.dtype = np.lib.format.descr_to_dtype(header_dict['descr']) + if dtype is not None: + assert dtype == self.dtype, \ + f"dtype in argument ({dtype}) is not the same as the dtype of the stored file ({self.dtype})" + + self.frameCount = header_dict['shape'][0] + + assert not header_dict['fortran_order'], "fortran_order in the stored file is not False" + + self.__frameSize = np.dtype(self.dtype).itemsize * np.prod(self.frameShape) + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_val, exc_tb): + self.close() + + def restoreCursorPosition(func): + """ + decorator function used to restore the file descriptors + cursor position after using read or write functions + """ + + def wrapper(self, *args, **kwargs): + tmp = self.cursorPosition + result = func(self, *args, **kwargs) + self.cursorPosition = tmp + self.file.seek(tmp) + return result + + return wrapper + + @restoreCursorPosition + def updateHeader(self): + """ + updates the header of the .npy file with the class attributes + @note: fortran_order is always set to False + """ + if self.mode == 'r': + return + self.file.seek(0) + header_dict = { + 'descr': np.lib.format.dtype_to_descr(self.dtype), + 'fortran_order': False, + 'shape': (self.frameCount, *self.frameShape) + } + np.lib.format.write_array_header_1_0(self.file, header_dict) + self.flush() + + @restoreCursorPosition + def writeOneFrame(self, frame: np.ndarray): + """ + write one frame without buffering + @param frame: numpy array for a frame + """ + if frame.shape != self.frameShape: + raise ValueError(f"frame shape given {frame.shape} is not the same as the file's shape {self.frameShape}") + if frame.dtype != self.dtype: + raise ValueError(f"frame dtype given {frame.dtype} is not the same as the file's dtype {self.dtype}") + + self.file.seek(0, self.FSEEK_FILE_END) + self.frameCount += 1 + self.file.write(frame.tobytes()) + + def flush(self): + """ + persist data into disk + """ + self.file.flush() + os.fsync(self.file) + + @restoreCursorPosition + def readFrames(self, frameStart: int, frameEnd: int) -> np.ndarray: + """ + read frames from .npy file without loading the whole file to memory with np.load + @param frameStart: number of the frame to start reading from + @param frameEnd: index of the last frame (not inclusive) + @return: np.ndarray of frames of the shape [frameEnd-frameStart,*self.frameShape] + """ + frameCount = frameEnd - frameStart + + if frameStart < 0: + raise NotImplementedError("frameStart must be bigger than 0") + if frameCount < 0: + if frameStart <= 0: + raise NotImplementedError("frameEnd must be bigger than frameStart") + frameCount = 0 + self.file.seek(self.headerLength + frameStart * self.__frameSize) + data = self.file.read(frameCount * self.__frameSize) + return np.frombuffer(data, self.dtype).reshape([-1, *self.frameShape]) + + def read(self, frameCount): + """ + file like interface to read frameCount frames from the already stored position + @param frameCount: number of frames to read + @return: numpy array containing frameCount frames + """ + assert frameCount > 0 + data = self.file.read(frameCount * self.__frameSize) + self.cursorPosition += frameCount * self.__frameSize + return np.frombuffer(data, self.dtype).reshape([-1, *self.frameShape]) + + def seek(self, frameNumber): + """ + file-like interface to move the file's cursor position to the frameNumber + """ + assert frameNumber >= 0 + self.cursorPosition = self.headerLength + frameNumber * self.__frameSize + self.file.seek(self.cursorPosition) + + def close(self): + self.updateHeader() + self.file.close() + + def __getitem__(self, item): + isSlice = False + if isinstance(item, slice): + isSlice = True + if item.step is not None: + raise NotImplementedError("step parameter is not implemented yet") + if isSlice: + return self.readFrames(item.start, item.stop) + frame = self.readFrames(item, item + 1) + if frame.size != 0: + frame = frame.squeeze(0) + return frame + + def __del__(self): + """ + in case the user forgot to close the file + """ + if hasattr(self, 'file') and not self.file.closed: + try: + self.close() + except ImportError: + self.file.close() diff --git a/pyctbgui/pyctbgui/utils/numpyWriter/npz_writer.py b/pyctbgui/pyctbgui/utils/numpyWriter/npz_writer.py new file mode 100644 index 000000000..4f0cf881d --- /dev/null +++ b/pyctbgui/pyctbgui/utils/numpyWriter/npz_writer.py @@ -0,0 +1,91 @@ +from pathlib import Path +import shutil +import zipfile +import io + +import numpy as np +from pyctbgui.utils.numpyWriter.npy_writer import NumpyFileManager + + +class NpzFileWriter: + """ + Write data to npz file incrementally rather than compute all and write + once, as in ``np.save``. This class can be used with ``contextlib.closing`` + to ensure closed after usage. + """ + + def __init__(self, tofile: str, mode='w', compress_file=False): + """ + :param tofile: the ``npz`` file to write + :param mode: must be one of {'x', 'w', 'a'}. See + https://docs.python.org/3/library/zipfile.html for detail + """ + self.__openedFiles = {} + self.compression = zipfile.ZIP_DEFLATED if compress_file else zipfile.ZIP_STORED + self.tofile = tofile + self.mode = mode + self.file = zipfile.ZipFile(self.tofile, mode=self.mode, compression=self.compression) + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_val, exc_tb): + self.close() + + def writeArray(self, key: str, data: np.ndarray | bytes) -> None: + """ + overwrite existing data of name ``key``. + + :param key: the name of data to write + :param data: the data + """ + key += '.npy' + with io.BytesIO() as cbuf: + np.save(cbuf, data) + cbuf.seek(0) + with self.file.open(key, mode='w', force_zip64=True) as outfile: + shutil.copyfileobj(cbuf, outfile) + + def readFrames(self, file: str, frameStart: int, frameEnd: int): + file += '.npy' + with self.file.open(file, mode='r') as outfile: + npw = NumpyFileManager(outfile) + return npw.readFrames(frameStart, frameEnd) + + @staticmethod + def zipNpyFiles(filename: str, + files: list[str | Path], + fileKeys: list[str], + deleteOriginals=False, + compressed=False): + compression = zipfile.ZIP_DEFLATED if compressed else zipfile.ZIP_STORED + + with zipfile.ZipFile(filename, mode='w', compression=compression, allowZip64=True) as zipf: + for idx, file in enumerate(files): + zipf.write(file, arcname=fileKeys[idx] + '.npy') + if deleteOriginals: + for file in files: + Path.unlink(file) + + def __getitem__(self, item: str) -> NumpyFileManager: + """ + returns NumpyFileManager file handling the .npy file under the key item inside of the .npz file + @param item: + @return: + """ + if not isinstance(item, str): + raise TypeError('given item is not of type str') + if item not in self.__openedFiles: + outfile = self.file.open(item + '.npy', mode='r') + self.__openedFiles[item] = NumpyFileManager(outfile) + return self.__openedFiles[item] + + def namelist(self): + return sorted([key[:-4] for key in self.file.namelist()]) + + def close(self): + if hasattr(self, 'file') and self.file is not None: + self.file.close() + + def __del__(self): + self.close() diff --git a/pyctbgui/pyctbgui/utils/numpyWriter/usage.md b/pyctbgui/pyctbgui/utils/numpyWriter/usage.md new file mode 100644 index 000000000..b47bb742c --- /dev/null +++ b/pyctbgui/pyctbgui/utils/numpyWriter/usage.md @@ -0,0 +1,71 @@ +# Using numpyWriter module +## concept +numpyWriter is used to write and load huge numpy arrays that can't be fully loaded in RAM. +It is designed to write frames of a constant shape (defined by user) and incrementally add to .npy and .npz files without accessing all of its contents + +### NumpyFileManager +class to handle writing in .npy files frame by frame. +its positional parameter `file` can be of type: str,pathlib.Path, zipfile.ZipExtFile. This way we can use NumpyFileManager to open files by getting their path or +**in read mode** it can receiver file-like objects to read their data. + +the complexity of initializing from file-like objects is added to be able to read from .npz files which are simply a zip of .npy files. Furthermore now we can save our files .npz files and read from them (even when compressed (⊙_⊙) ) without loading the whole .npy or .npz in memory. + +### NpzFileWriter +class used to handle .npz file functionalities. it can zip existing .npy files, write a whole array in an .npz file without loading the whole .npz in memory, +and read frames from .npy files inside the .npz file + +## Usage + +```python +# create .npy file +npw = NumpyFileManager('file.npy', 'w', (400, 400), np.int32) +npw.addFrame(np.ones([400, 400], dtype=np.int32)) +npw.close() + +# read frames from existing .npy file +npw = NumpyFileManager('file.npy') +# if arr is stored in the .npy file this statement will return arr[50:100] +npw.readFrames(50, 100) + +# Numpy like interface +# NumpyFileManager is also subscriptable +npw[50:100] # returns the array arr[50:100] +npw[0] # returns the array arr[0] + +# File like interface +# the npw class's cursors is initialized on the first frame +npw.read(5) # reads five frames and updates the cursor +npw.seek(99) # updates the cursor to point it to the 99-th frame + +# to ensure that files are written to disk +npw.flush() + +# zip existing .npy files (stored on disk) +# filePaths: the paths to .npy files +# keys: name of the arrays inside of the .npz file +NpzFileWriter.zipNpyFiles('file.npz', filePaths, keys, compressed=True) + +# add numpy arrays incrementally to a .npz file +with NpzFileWriter('tmp.npz', 'w', compress_file=True) as npz: + npz.writeArray('adc', arr1) + npz.writeArray('tx', arr2) + +# read frames from adc.npy inside of tmp.npz +with NpzFileWriter('tmp.npz', 'r') as npz: + frames = npz.readFrames('adc', 5, 8) + +# NpzFileWriter is also subscriptable and returns a NumpyFileManager initialized +# to open the the file with the given key inside the .npz file +npz = NpzFileWriter('tmp.npz', 'r') +npz.writeArray('adc', arr1) + + +npz['adc'] # returns a NumpyFileManager +npz['adc'][50:100] # returns the array from 50 to 100 +# note once a NumpyFileManager instance is created internally NpzFileWriter stores it +# this is done to avoid opening and closing the same file +# also file-like interface can be used +npz['adc'].read(5) # returns arr[:5] +npz['adc'].seek(100) # updates the cursor +npz['adc'].read(2) # returns arr[100:2] +``` \ No newline at end of file diff --git a/pyctbgui/pyctbgui/utils/pixelmap.py b/pyctbgui/pyctbgui/utils/pixelmap.py new file mode 100644 index 000000000..6cfa28a14 --- /dev/null +++ b/pyctbgui/pyctbgui/utils/pixelmap.py @@ -0,0 +1,61 @@ +import numpy as np +# generate pixelmaps for various CTB detectors + + +def moench03(): + out = np.zeros((400, 400), dtype=np.uint32) + adc_numbers = np.array( + (12, 13, 14, 15, 12, 13, 14, 15, 8, 9, 10, 11, 8, 9, 10, 11, 4, 5, 6, 7, 4, 5, 6, 7, 0, 1, 2, 3, 0, 1, 2, 3), + dtype=np.int_) + for n_pixel in range(5000): + for i_sc in range(32): + adc_nr = adc_numbers[i_sc] + col = ((adc_nr * 25) + (n_pixel % 25)) + row = 0 + if (i_sc // 4 % 2 == 0): + row = 199 - (n_pixel // 25) + else: + row = 200 + (n_pixel // 25) + + i_analog = n_pixel * 32 + i_sc + out[row, col] = i_analog + + return out + + +def moench04_analog(): + out = np.zeros((400, 400), dtype=np.uint32) + adc_numbers = np.array((9, 8, 11, 10, 13, 12, 15, 14, 1, 0, 3, 2, 5, 4, 7, 6, 23, 22, 21, 20, 19, 18, 17, 16, 31, + 30, 29, 28, 27, 26, 25, 24), + dtype=np.int_) + + for n_pixel in range(5000): + for i_sc in range(32): + adc_nr = adc_numbers[i_sc] + col = ((adc_nr % 16) * 25) + (n_pixel % 25) + row = 0 + if i_sc < 16: + row = 199 - (n_pixel // 25) + else: + row = 200 + (n_pixel // 25) + + i_analog = n_pixel * 32 + i_sc + out[row, col] = i_analog + + return out + + +def matterhorn_transceiver(): + out = np.zeros((48, 48), dtype=np.uint32) + + offset = 0 + nSamples = 4 + for row in range(48): + for col in range(24): + for iTrans in range(2): + out[iTrans * 24 + col, row] = offset + nSamples * iTrans + offset += 1 + if (col + 1) % nSamples == 0: + offset += nSamples + + return out diff --git a/pyctbgui/pyctbgui/utils/plotPattern.py b/pyctbgui/pyctbgui/utils/plotPattern.py new file mode 100755 index 000000000..443b766e9 --- /dev/null +++ b/pyctbgui/pyctbgui/utils/plotPattern.py @@ -0,0 +1,726 @@ +#!/usr/bin/env python3 +""" +Created on Wed May 24 09:44:53 2017 + +Plot the pattern for New Chip Test Box (.pat) + +Changes: + - 2017-11-21 Adapt it to python-3 + - 2017-09-25 All can be plotted + - 2017-09-22 Can be plotted but the loop and wait not work yet + +@author: Jiaguo Zhang and Julian Heymes +""" + +import matplotlib.pyplot as plt +import numpy as np +from matplotlib.patches import Rectangle + + +class PlotPattern: + + def __init__(self, pattern, signalNames, colors_plot, colors_wait, linestyles_wait, alpha_wait, alpha_wait_rect, + colors_loop, linestyles_loop, alpha_loop, alpha_loop_rect, clock_vertical_lines_spacing, + show_clocks_number, line_width): + self.pattern = pattern + self.signalNames = signalNames + self.verbose = False + # TODO: send alias + + self.colors_plot = colors_plot.copy() + self.colors_wait = colors_wait.copy() + self.linestyles_wait = linestyles_wait.copy() + self.alpha_wait = alpha_wait.copy() + self.alpha_wait_rect = alpha_wait_rect.copy() + self.colors_loop = colors_loop.copy() + self.linestyles_loop = linestyles_loop.copy() + self.alpha_loop = alpha_loop.copy() + self.alpha_loop_rect = alpha_loop_rect.copy() + self.clock_vertical_lines_spacing = clock_vertical_lines_spacing + self.show_clocks_number = show_clocks_number + self.line_width = line_width + + self.colors_plot[0] = f'xkcd:{colors_plot[0].lower()}' + self.colors_plot[1] = f'xkcd:{colors_plot[1].lower()}' + + for i in range(6): + self.colors_wait[i] = f'xkcd:{colors_wait[i].lower()}' + self.colors_loop[i] = f'xkcd:{colors_loop[i].lower()}' + + if self.verbose: + self.printPatViewerParameters() + + def printPatViewerParameters(self): + print('Pattern Viewer Parameters:') + print(f'\tcolor1: {self.colors_plot[0]}, color2: {self.colors_plot[1]}') + print(f"\twait color: {self.colors_wait}") + print(f"\twait linestyles: {self.linestyles_wait}") + print(f"\twait alpha: {self.alpha_wait}") + print(f"\twait alpha rect: {self.alpha_wait_rect}") + print(f"\tloop color: {self.colors_loop}") + print(f"\tloop linestyles: {self.linestyles_loop}") + print(f"\tloop alpha: {self.alpha_loop}") + print(f"\tloop alpha rect: {self.alpha_loop_rect}") + print(f'\tclock vertical lines spacing: {self.clock_vertical_lines_spacing}') + print(f'\tshow clocks number: {self.show_clocks_number}') + print(f'\tline width: {self.line_width}') + print('\n') + + def dec2binary(self, dec_num, width=None): + return np.binary_repr(int(dec_num), width=width) + + def hex2dec(self, string_num): + return str(int(string_num.upper(), 16)) + + def hex2binary(self, string_num, width=None): + return self.dec2binary(self.hex2dec(string_num.upper()), width=width) + + def patternPlot(self): + # Define a hex to binary function + # global definition + # base = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F] + self.base = [str(x) for x in range(10)] + [chr(x) for x in range(ord('A'), ord('A') + 6)] + + # Load the pattern and get all lines + # Loop all lines + # with open(Folder + "/" + File_pat + ".pat") as f_pat: + with open(self.pattern) as f_pat: + lines_pat = f_pat.readlines() + + # number of lines for pattern file + nlines_pat = len(lines_pat) + # a counter + cnt = 0 + if self.verbose: + print("The total number of lines of pattern:", nlines_pat) + + # Loop all lines of pattern + waittime0 = None + waittime1 = None + waittime2 = None + waittime3 = None + waittime4 = None + waittime5 = None + + nloop0 = None + nloop1 = None + nloop2 = None + nloop3 = None + nloop4 = None + nloop5 = None + + for k in range(nlines_pat): + # content of line + words_line = lines_pat[k].split() + if len(words_line) < 2: + continue + if words_line[0] == "patword": + # print words_line from b0 to b63 + bits = self.hex2binary(words_line[-1], 64)[::-1] + if self.verbose: + print("The bits for line-", k + 1, "is:", bits) + # convert string bits to decimal array + num_bits = np.array(list(map(str, bits)), dtype="uint16") + if cnt == 0: + mat_pat = num_bits + else: + # add bits to matrix + mat_pat = np.concatenate((mat_pat, num_bits), axis=0) + cnt = cnt + 1 + # print("The matrix of pattern:", mat_pat.reshape(int(cnt), int(len(num_bits)))) + + # Look at the io: 0 for sending to ASIC, 1 for reading from ASIC + if words_line[0] == "patioctrl": + # print words_line + if self.verbose: + print(words_line[-1]) + bits = self.hex2binary(words_line[-1], 64)[::-1] + if self.verbose: + print(bits) + # convert string bits to decimal array + self.out_bits = np.array(list(map(str, bits)), dtype="uint16") + + if self.verbose: + print(words_line) + # Deal with waiting point + + # ====== WAIT ====== + if words_line[0] == "patwait" and words_line[1] == "0": + wait0 = int(self.hex2dec(words_line[2])) + if self.verbose: + print("wait 0 at:", wait0) + if words_line[0] == "patwaittime" and words_line[1] == "0": + waittime0 = int(words_line[2]) + if self.verbose: + print("wait 0 for:", waittime0) + + if words_line[0] == "patwait" and words_line[1] == "1": + wait1 = int(self.hex2dec(words_line[2])) + if self.verbose: + print("wait 1 at:", wait1) + if words_line[0] == "patwaittime" and words_line[1] == "1": + waittime1 = int(words_line[2]) + if self.verbose: + print("wait 1 for:", waittime1) + + if words_line[0] == "patwait" and words_line[1] == "2": + wait2 = int(self.hex2dec(words_line[2])) + if self.verbose: + print("wait 2 at:", wait2) + if words_line[0] == "patwaittime" and words_line[1] == "2": + waittime2 = int(words_line[2]) + if self.verbose: + print("wait 2 for:", waittime2) + + if words_line[0] == "patwait" and words_line[1] == "3": + wait3 = int(self.hex2dec(words_line[2])) + if self.verbose: + print("wait 0 at:", wait3) + if words_line[0] == "patwaittime" and words_line[1] == "3": + waittime3 = int(words_line[2]) + if self.verbose: + print("wait 0 for:", waittime3) + + if words_line[0] == "patwait" and words_line[1] == "4": + wait4 = int(self.hex2dec(words_line[2])) + if self.verbose: + print("wait 1 at:", wait4) + if words_line[0] == "patwaittime" and words_line[1] == "4": + waittime4 = int(words_line[2]) + if self.verbose: + print("wait 1 for:", waittime4) + + if words_line[0] == "patwait" and words_line[1] == "5": + wait5 = int(self.hex2dec(words_line[2])) + if self.verbose: + print("wait 2 at:", wait5) + if words_line[0] == "patwaittime" and words_line[1] == "5": + waittime5 = int(words_line[2]) + if self.verbose: + print("wait 2 for:", waittime5) + + # ====== LOOPS ====== + if words_line[0] == "patloop" and words_line[1] == "0": + loop0_start = int(self.hex2dec(words_line[2])) + loop0_end = int(self.hex2dec(words_line[3])) + if self.verbose: + print("loop 0 start:", loop0_start, ", end:", loop0_end) + if words_line[0] == "patnloop" and words_line[1] == "0": + nloop0 = int(words_line[2]) + if self.verbose: + print("loop 0 times:", nloop0) + + if words_line[0] == "patloop" and words_line[1] == "1": + loop1_start = int(self.hex2dec(words_line[2])) + loop1_end = int(self.hex2dec(words_line[3])) + if self.verbose: + print("loop 1 start:", loop1_start, ", end:", loop1_end) + if words_line[0] == "patnloop" and words_line[1] == "1": + nloop1 = int(words_line[2]) + if self.verbose: + print("loop 1 times:", nloop1) + + if words_line[0] == "patloop" and words_line[1] == "2": + loop2_start = int(self.hex2dec(words_line[2])) + loop2_end = int(self.hex2dec(words_line[3])) + if self.verbose: + print("loop 2 start:", loop2_start, ", end:", loop2_end) + if words_line[0] == "patnloop" and words_line[1] == "2": + nloop2 = int(words_line[2]) + if self.verbose: + print("loop 2 times:", nloop2) + + if words_line[0] == "patloop" and words_line[1] == "3": + loop3_start = int(self.hex2dec(words_line[2])) + loop3_end = int(self.hex2dec(words_line[3])) + if self.verbose: + print("loop 3 start:", loop3_start, ", end:", loop3_end) + if words_line[0] == "patnloop" and words_line[1] == "3": + nloop3 = int(words_line[2]) + if self.verbose: + print("loop 3 times:", nloop3) + + if words_line[0] == "patloop" and words_line[1] == "4": + loop4_start = int(self.hex2dec(words_line[2])) + loop4_end = int(self.hex2dec(words_line[3])) + if self.verbose: + print("loop 4 start:", loop4_start, ", end:", loop4_end) + if words_line[0] == "patnloop" and words_line[1] == "4": + nloop4 = int(words_line[2]) + if self.verbose: + print("loop 4 times:", nloop4) + + if words_line[0] == "patloop" and words_line[1] == "5": + loop5_start = int(self.hex2dec(words_line[2])) + loop5_end = int(self.hex2dec(words_line[3])) + if self.verbose: + print("loop 5 start:", loop5_start, ", end:", loop5_end) + if words_line[0] == "patnloop" and words_line[1] == "5": + nloop5 = int(words_line[2]) + if self.verbose: + print("loop 5 times:", nloop5) + + # no patioctrl commands read + if not hasattr(self, 'out_bits'): + raise Exception("No patioctrl command found in pattern file") + # print(self.out_bits) + + # internal counter + avail_index = [] + avail_name = [] + # Remove non-used bits + for i in range(64): + # if self.out_bits[0][i] == 1: + if self.out_bits[i] == 1: + avail_index.append(i) + avail_name.append(self.signalNames[i]) + if self.verbose: + print(avail_index) + print(avail_name) + + # number of effective used bits + nbiteff = len(avail_name) + + # subMat = mat_ext[:,index] + # print(mat_pat.shape) + subMat = mat_pat.reshape(int(cnt), int(len(num_bits)))[0:, avail_index] + # subMat = mat_pat[avail_index] + # timing = np.linspace(0, subMat.shape[0] - 1, subMat.shape[0]) + plt.rcParams['figure.figsize'] = 15, 5 + + # ============= PLOTTING ============= + + plt.rcParams["font.weight"] = "bold" + plt.rcParams["axes.labelweight"] = "bold" + fig, axs = plt.subplots(nbiteff, sharex='all') + plt.subplots_adjust(wspace=0, hspace=0) + # axs[nbiteff - 1].set(xlabel='Timing [clk]') + for idx, i in enumerate(range(nbiteff)): + axs[idx].tick_params(axis='x', labelsize=6) + + axs[idx].plot(subMat.T[i], + "-", + drawstyle="steps-post", + linewidth=self.line_width, + color=self.colors_plot[idx % 2]) + x_additional = range(len(subMat.T[i]) - 1, len(subMat.T[i]) + 2) + additional_stuff = [subMat.T[i][-1]] * 3 + + axs[idx].plot(x_additional, + additional_stuff, + "--", + drawstyle="steps-post", + linewidth=self.line_width, + color=self.colors_plot[idx % 2], + alpha=0.5) + axs[idx].yaxis.set_ticks([0.5], minor=False) + axs[idx].xaxis.set_ticks(np.arange(0, len(subMat.T[i]) + 10, self.clock_vertical_lines_spacing)) + + axs[idx].yaxis.set_ticklabels([avail_name[i]]) + axs[idx].get_yticklabels()[0].set_color(self.colors_plot[idx % 2]) + + axs[idx].grid(1, 'both', 'both', alpha=0.5) + axs[idx].yaxis.grid(which="both", color=self.colors_plot[idx % 2], alpha=0.2) + if idx != nbiteff - 1: + if not self.show_clocks_number: + axs[idx].xaxis.set_ticklabels([]) + axs[idx].set(xlabel=' ', ylim=(-0.2, 1.2)) + else: + axs[idx].set(xlabel='Timing [clk]', ylim=(-0.2, 1.2)) + # axs[idx].set_xlim(left=0) + axs[idx].set_xlim(left=0, right=len(subMat.T[i]) + 1) + axs[idx].spines['top'].set_visible(False) + axs[idx].spines['right'].set_alpha(0.2) + axs[idx].spines['right'].set_visible(True) + axs[idx].spines['bottom'].set_visible(False) + axs[idx].spines['left'].set_visible(False) + + # ===================================================================================================== + # Plot the wait lines + # Wait 0 + if waittime0 is not None: + if waittime0 == 0: + axs[idx].plot([wait0, wait0], [-10, 10], + linestyle=self.linestyles_wait[0], + color=self.colors_wait[0], + alpha=self.alpha_wait[0], + linewidth=self.line_width) + axs[idx].plot([wait0 + 1, wait0 + 1], [-10, 10], + linestyle=self.linestyles_wait[0], + color=self.colors_wait[0], + linewidth=self.line_width, + alpha=self.alpha_wait[0]) + axs[idx].add_patch( + Rectangle((wait0, -10), + 1, + 20, + label="wait 0: skipped" if idx == 0 else "", + facecolor=self.colors_wait[0], + alpha=self.alpha_wait_rect[0], + hatch='\\\\')) + else: + axs[idx].plot([wait0, wait0], [-10, 10], + linestyle=self.linestyles_wait[0], + color=self.colors_wait[0], + label="wait 0: " + str(waittime0) + " clk" if idx == 0 else "", + linewidth=self.line_width, + alpha=self.alpha_wait[0]) + + # Wait 1 + if waittime1 is not None: + if waittime1 == 0: + axs[idx].plot([wait1, wait1], [-10, 10], + linestyle=self.linestyles_wait[1], + color=self.colors_wait[1], + alpha=self.alpha_wait[1], + linewidth=self.line_width) + axs[idx].plot([wait1 + 1, wait1 + 1], [-10, 10], + linestyle=self.linestyles_wait[1], + color=self.colors_wait[1], + linewidth=self.line_width, + alpha=self.alpha_wait[1]) + axs[idx].add_patch( + Rectangle((wait1, -10), + 1, + 20, + label="wait 1: skipped" if idx == 0 else "", + facecolor=self.colors_wait[1], + alpha=self.alpha_wait_rect[1], + hatch='\\\\')) + else: + axs[idx].plot([wait1, wait1], [-10, 10], + linestyle=self.linestyles_wait[1], + color=self.colors_wait[1], + label="wait 1: " + str(waittime1) + " clk" if idx == 0 else "", + linewidth=self.line_width, + alpha=self.alpha_wait[1]) + + # Wait 2 + if waittime2 is not None: + if waittime2 == 0: + axs[idx].plot([wait2, wait2], [-10, 10], + linestyle=self.linestyles_wait[2], + color=self.colors_wait[2], + alpha=self.alpha_wait[2], + linewidth=self.line_width) + axs[idx].plot([wait2 + 1, wait2 + 1], [-10, 10], + linestyle=self.linestyles_wait[2], + color=self.colors_wait[2], + linewidth=self.line_width, + alpha=self.alpha_wait[2]) + axs[idx].add_patch( + Rectangle((wait2, -10), + 1, + 20, + label="wait 2: skipped" if idx == 0 else "", + facecolor=self.colors_wait[2], + alpha=self.alpha_wait_rect[2], + hatch='\\\\')) + else: + axs[idx].plot([wait2, wait2], [-10, 10], + linestyle=self.linestyles_wait[2], + color=self.colors_wait[2], + label="wait 2: " + str(waittime2) + " clk" if idx == 0 else "", + linewidth=self.line_width, + alpha=self.alpha_wait[2]) + + # Wait 3 + if waittime3 is not None: + if waittime3 == 0: + axs[idx].plot([wait3, wait3], [-10, 10], + linestyle=self.linestyles_wait[3], + color=self.colors_wait[3], + alpha=self.alpha_wait[3], + linewidth=self.line_width) + axs[idx].plot([wait3 + 1, wait3 + 1], [-10, 10], + linestyle=self.linestyles_wait[3], + color=self.colors_wait[3], + linewidth=self.line_width, + alpha=self.alpha_wait[3]) + axs[idx].add_patch( + Rectangle((wait3, -10), + 1, + 20, + label="wait 3: skipped" if idx == 0 else "", + facecolor=self.colors_wait[3], + alpha=self.alpha_wait_rect[3], + hatch='\\\\')) + else: + axs[idx].plot([wait3, wait3], [-10, 10], + linestyle=self.linestyles_wait[3], + color=self.colors_wait[3], + label="wait 3: " + str(waittime3) + " clk" if idx == 0 else "", + linewidth=self.line_width, + alpha=self.alpha_wait[3]) + + # Wait 4 + if waittime4 is not None: + if waittime4 == 0: + axs[idx].plot([wait4, wait4], [-10, 10], + linestyle=self.linestyles_wait[4], + color=self.colors_wait[4], + alpha=self.alpha_wait[4], + linewidth=self.line_width) + axs[idx].plot([wait4 + 1, wait4 + 1], [-10, 10], + linestyle=self.linestyles_wait[4], + color=self.colors_wait[4], + linewidth=self.line_width, + alpha=self.alpha_wait[4]) + axs[idx].add_patch( + Rectangle((wait4, -10), + 1, + 20, + label="wait 4: skipped" if idx == 0 else "", + facecolor=self.colors_wait[4], + alpha=self.alpha_wait_rect[4], + hatch='\\\\')) + else: + axs[idx].plot([wait4, wait4], [-10, 10], + linestyle=self.linestyles_wait[4], + color=self.colors_wait[4], + label="wait 4: " + str(waittime4) + " clk" if idx == 0 else "", + linewidth=self.line_width, + alpha=self.alpha_wait[4]) + + # Wait 5 + if waittime5 is not None: + if waittime5 == 0: + axs[idx].plot([wait5, wait5], [-10, 10], + linestyle=self.linestyles_wait[5], + color=self.colors_wait[5], + alpha=self.alpha_wait[5], + linewidth=self.line_width) + axs[idx].plot([wait5 + 1, wait5 + 1], [-10, 10], + linestyle=self.linestyles_wait[5], + color=self.colors_wait[5], + linewidth=self.line_width, + alpha=self.alpha_wait[5]) + axs[idx].add_patch( + Rectangle((wait5, -10), + 1, + 20, + label="wait 5: skipped" if idx == 0 else "", + facecolor=self.colors_wait[5], + alpha=self.alpha_wait_rect[5], + hatch='\\\\')) + else: + axs[idx].plot([wait5, wait5], [-10, 10], + linestyle=self.linestyles_wait[5], + color=self.colors_wait[5], + label="wait 5: " + str(waittime5) + " clk" if idx == 0 else "", + linewidth=self.line_width, + alpha=self.alpha_wait[5]) + + # ===================================================================================================== + # Plot the loop lines + # Loop 0 + if nloop0 is not None: + if nloop0 == 0: + axs[idx].plot([loop0_start, loop0_start], [-10, 10], + linestyle=self.linestyles_loop[0], + color=self.colors_loop[0], + alpha=self.alpha_loop[0], + linewidth=self.line_width) + axs[idx].plot([loop0_end + 1, loop0_end + 1], [-10, 10], + linestyle=self.linestyles_loop[0], + color=self.colors_loop[0], + alpha=self.alpha_loop[0], + linewidth=self.line_width) + axs[idx].add_patch( + Rectangle((loop0_start, -10), + loop0_end + 1 - loop0_start, + 20, + label="loop 0: skipped" if idx == 0 else "", + facecolor=self.colors_loop[0], + alpha=self.alpha_loop_rect[0], + hatch='//')) + else: + axs[idx].plot([loop0_start, loop0_start], [-10, 10], + linestyle=self.linestyles_loop[0], + color=self.colors_loop[0], + alpha=self.alpha_loop[0], + label="loop 0: " + str(nloop0) + " times" if idx == 0 else "", + linewidth=self.line_width) + axs[idx].plot([loop0_end, loop0_end], [-10, 10], + linestyle=self.linestyles_loop[0], + color=self.colors_loop[0], + alpha=self.alpha_loop[0], + linewidth=self.line_width) + + # Loop 1 + if nloop1 is not None: + if nloop1 == 0: + axs[idx].plot([loop1_start, loop1_start], [-10, 10], + linestyle=self.linestyles_loop[1], + color=self.colors_loop[1], + alpha=self.alpha_loop[1], + linewidth=self.line_width) + axs[idx].plot([loop1_end + 1, loop1_end + 1], [-10, 10], + linestyle=self.linestyles_loop[1], + color=self.colors_loop[1], + alpha=self.alpha_loop[1], + linewidth=self.line_width) + axs[idx].add_patch( + Rectangle((loop1_start, -10), + loop1_end + 1 - loop1_start, + 20, + label="loop 1: skipped" if idx == 0 else "", + facecolor=self.colors_loop[1], + alpha=self.alpha_loop_rect[1], + hatch='//')) + else: + axs[idx].plot([loop1_start, loop1_start], [-10, 10], + linestyle=self.linestyles_loop[1], + color=self.colors_loop[1], + alpha=self.alpha_loop[1], + label="loop 1: " + str(nloop1) + " times" if idx == 0 else "", + linewidth=self.line_width) + axs[idx].plot([loop1_end, loop1_end], [-10, 10], + linestyle=self.linestyles_loop[1], + color=self.colors_loop[1], + alpha=self.alpha_loop[1], + linewidth=self.line_width) + + # Loop 2 + if nloop2 is not None: + if nloop2 == 0: + axs[idx].plot([loop2_start, loop2_start], [-10, 10], + linestyle=self.linestyles_loop[2], + color=self.colors_loop[2], + alpha=self.alpha_loop[2], + linewidth=self.line_width) + axs[idx].plot([loop2_end + 1, loop2_end + 1], [-10, 10], + linestyle=self.linestyles_loop[2], + color=self.colors_loop[2], + alpha=self.alpha_loop[2], + linewidth=self.line_width) + axs[idx].add_patch( + Rectangle((loop2_start, -10), + loop2_end + 1 - loop2_start, + 20, + label="loop 2: skipped" if idx == 0 else "", + facecolor=self.colors_loop[2], + alpha=self.alpha_loop_rect[2], + hatch='//')) + else: + axs[idx].plot([loop2_start, loop2_start], [-10, 10], + linestyle=self.linestyles_loop[2], + color=self.colors_loop[2], + alpha=self.alpha_loop[2], + label="loop 2: " + str(nloop2) + " times" if idx == 0 else "", + linewidth=self.line_width) + axs[idx].plot([loop2_end, loop2_end], [-10, 10], + linestyle=self.linestyles_loop[2], + color=self.colors_loop[2], + alpha=self.alpha_loop[2], + linewidth=self.line_width) + + # Loop 3 + if nloop3 is not None: + if nloop3 == 0: + axs[idx].plot([loop3_start, loop3_start], [-10, 10], + linestyle=self.linestyles_loop[3], + color=self.colors_loop[3], + alpha=self.alpha_loop[3], + linewidth=self.line_width) + axs[idx].plot([loop3_end + 1, loop3_end + 1], [-10, 10], + linestyle=self.linestyles_loop[3], + color=self.colors_loop[3], + alpha=self.alpha_loop[3], + linewidth=self.line_width) + axs[idx].add_patch( + Rectangle((loop3_start, -10), + loop3_end + 1 - loop3_start, + 20, + label="loop 3: skipped" if idx == 0 else "", + facecolor=self.colors_loop[3], + alpha=self.alpha_loop_rect[3], + hatch='//')) + else: + axs[idx].plot([loop3_start, loop3_start], [-10, 10], + linestyle=self.linestyles_loop[3], + color=self.colors_loop[3], + alpha=self.alpha_loop[3], + label="loop 3: " + str(nloop3) + " times" if idx == 0 else "", + linewidth=self.line_width) + axs[idx].plot([loop3_end, loop3_end], [-10, 10], + linestyle=self.linestyles_loop[3], + color=self.colors_loop[3], + alpha=self.alpha_loop[3], + linewidth=self.line_width) + + # Loop 4 + if nloop4 is not None: + if nloop4 == 0: + axs[idx].plot([loop4_start, loop4_start], [-10, 10], + linestyle=self.linestyles_loop[4], + color=self.colors_loop[4], + alpha=self.alpha_loop[4], + linewidth=self.line_width) + axs[idx].plot([loop4_end + 1, loop4_end + 1], [-10, 10], + linestyle=self.linestyles_loop[4], + color=self.colors_loop[4], + alpha=self.alpha_loop[4], + linewidth=self.line_width) + axs[idx].add_patch( + Rectangle((loop4_start, -10), + loop4_end + 1 - loop4_start, + 20, + label="loop 4: skipped" if idx == 0 else "", + facecolor=self.colors_loop[4], + alpha=self.alpha_loop_rect[4], + hatch='//')) + else: + axs[idx].plot([loop4_start, loop4_start], [-10, 10], + linestyle=self.linestyles_loop[4], + color=self.colors_loop[4], + alpha=self.alpha_loop[4], + label="loop 4: " + str(nloop4) + " times" if idx == 0 else "", + linewidth=self.line_width) + axs[idx].plot([loop4_end, loop4_end], [-10, 10], + linestyle=self.linestyles_loop[4], + color=self.colors_loop[4], + alpha=self.alpha_loop[4], + linewidth=self.line_width) + + # Loop 5 + if nloop5 is not None: + if nloop5 == 0: + axs[idx].plot([loop5_start, loop5_start], [-10, 10], + linestyle=self.linestyles_loop[5], + color=self.colors_loop[5], + alpha=self.alpha_loop[5], + linewidth=self.line_width) + axs[idx].plot([loop5_end + 1, loop5_end + 1], [-10, 10], + linestyle=self.linestyles_loop[5], + color=self.colors_loop[5], + alpha=self.alpha_loop[5], + linewidth=self.line_width) + axs[idx].add_patch( + Rectangle((loop5_start, -10), + loop5_end + 1 - loop5_start, + 20, + label="loop 5: skipped" if idx == 0 else "", + facecolor=self.colors_loop[5], + alpha=self.alpha_loop_rect[5], + hatch='//')) + else: + axs[idx].plot([loop5_start, loop5_start], [-10, 10], + linestyle=self.linestyles_loop[5], + color=self.colors_loop[5], + alpha=self.alpha_loop[5], + label="loop 5: " + str(nloop5) + " times" if idx == 0 else "", + linewidth=self.line_width) + axs[idx].plot([loop5_end, loop5_end], [-10, 10], + linestyle=self.linestyles_loop[5], + color=self.colors_loop[5], + alpha=self.alpha_loop[5], + linewidth=self.line_width) + + n_cols = np.count_nonzero([ + waittime0 != 0, waittime1 != 0, waittime2 != 0, waittime3 != 0, waittime4 != 0, waittime5 != 0, nloop0 + != 0, nloop1 != 0, nloop2 != 0, nloop3 != 0, nloop4 != 0, nloop5 != 0 + ]) + if n_cols > 0: + fig.legend(loc="upper center", ncol=n_cols) + return fig diff --git a/pyctbgui/pyctbgui/utils/recordOrApplyPedestal.py b/pyctbgui/pyctbgui/utils/recordOrApplyPedestal.py new file mode 100644 index 000000000..235e76d22 --- /dev/null +++ b/pyctbgui/pyctbgui/utils/recordOrApplyPedestal.py @@ -0,0 +1,100 @@ +import logging +from pathlib import Path + +import numpy as np + +__frameCount = 0 +__pedestalSum = np.array(0, np.float64) +__pedestal = np.array(0, np.float32) +__loadedPedestal = False + + +def reset(plotTab): + global __frameCount, __pedestalSum, __pedestal, __loadedPedestal + __frameCount = 0 + __pedestalSum = np.array(0, np.float64) + __pedestal = np.array(0, np.float64) + __loadedPedestal = False + + plotTab.updateLabelPedestalFrames() + + +def getFramesCount(): + return __frameCount + + +def getPedestal(): + return __pedestal + + +def calculatePedestal(): + global __pedestalSum, __pedestal + if __loadedPedestal: + return __pedestal + if __frameCount == 0: + __pedestal = np.array(0, np.float64) + else: + __pedestal = __pedestalSum / __frameCount + return __pedestal + + +def savePedestal(path=Path('/tmp/pedestal')): + pedestal = calculatePedestal() + np.save(path, pedestal) + + +def loadPedestal(path: Path): + global __pedestal, __loadedPedestal + __loadedPedestal = True + __pedestal = np.load(path) + + +__logger = logging.getLogger('recordOrApplyPedestal') + + +def recordOrApplyPedestal(func): + """ + decorator function used to apply pedestal functionalities + @param func: processing function that needs to be wrapped + @return: wrapper function to be called + """ + + def wrapper(obj, *args, **kwargs): + """ + wrapeer that calls func (a raw data _processing function) and calculates or applies a pedestal to it + @param obj: reference to func's class instance (self of its class) + @return: if record mode: return frame untouched, if apply mode: return frame - pedestal + """ + global __frameCount, __pedestal, __pedestalSum + + frame = func(obj, *args, **kwargs) + if not np.array_equal(0, __pedestalSum) and __pedestalSum.shape != frame.shape: + # check if __pedestalSum has same different shape as the frame + __logger.info('pedestal shape mismatch. resetting pedestal...') + reset(obj.plotTab) + + if obj.plotTab.pedestalRecord: + if __loadedPedestal: + # reset loaded pedestal if we acquire in record mode + __logger.warning('resetting loaded pedestal...') + reset(obj.plotTab) + __frameCount += 1 + + __pedestalSum = np.add(__pedestalSum, frame, dtype=np.float64) + + obj.plotTab.updateLabelPedestalFrames() + return frame + if obj.plotTab.pedestalApply: + # apply pedestal + # check if pedestal is calculated + if __loadedPedestal and frame.shape != __pedestal.shape: + __logger.warning('pedestal shape mismatch. resetting pedestal...') + obj.plotTab.mainWindow.statusbar.setStyleSheet("color:red") + obj.plotTab.mainWindow.statusbar.showMessage('pedestal shape mismatch. resetting pedestal...') + reset(obj.plotTab) + + return frame - calculatePedestal() + + return frame + + return wrapper diff --git a/pyctbgui/pyproject.toml b/pyctbgui/pyproject.toml new file mode 100644 index 000000000..08de6be1c --- /dev/null +++ b/pyctbgui/pyproject.toml @@ -0,0 +1,55 @@ +[build-system] +requires = ["setuptools", "numpy"] +build-backend = "setuptools.build_meta" + +[tool.ruff] +line-length = 119 +select = ["E","F","UP","PT","RET","SLF","TID","PTH","NPY"] +# other usefule rules "N" "PL" +# rules to ignore +# PTH123 causes issues with gh actions +ignore = ["UP032","PTH123"] + +# Exclude a variety of commonly ignored directories. +exclude = [ + ".bzr", + ".direnv", + ".eggs", + ".git", + ".git-rewrite", + ".hg", + ".mypy_cache", + ".nox", + ".pants.d", + ".pytype", + ".ruff_cache", + ".svn", + ".tox", + ".venv", + "__pypackages__", + "_build", + "buck-out", + "build", + "dist", + "node_modules", + "venv", +] + +target-version = "py311" + +[tool.ruff.per-file-ignores] +"__init__.py" = ["F401"] +"pyctbgui/utils/decoder.py" = ["F403"] + + +[tool.yapf] +based_on_style = "pep8" +COLUMN_LIMIT = 119 + +[tool.coverage.run] +branch = false + +[tool.coverage.report] +include = [ + "pyctbgui/*" +] diff --git a/pyctbgui/setup.py b/pyctbgui/setup.py new file mode 100644 index 000000000..1bb1e3848 --- /dev/null +++ b/pyctbgui/setup.py @@ -0,0 +1,44 @@ +import setuptools +import numpy as np + +c_ext = setuptools.Extension("pyctbgui._decoder", + sources=["src/decoder.c", "src/pm_decode.c"], + include_dirs=[ + np.get_include(), + "src/", + ], + extra_compile_args=['-std=c99', '-Wall', '-Wextra']) + +c_ext.language = 'c' +setuptools.setup( + name='pyctbgui', + version='2023.8.17', + description='Experimental GUI for the chip test board', + packages=setuptools.find_packages(exclude=[ + 'tests', + ]), + include_package_data=True, + ext_modules=[c_ext], + scripts=[ + 'CtbGui', + ], + python_requires='>=3.10', # using match statement + install_requires=[ + 'numpy', + 'pyzmq', + 'pillow', + 'PyQt5', + 'pyqtgraph', + 'matplotlib', + # 'slsdet', not yet available on pypi, maybe v8 + ], + extras_require={ + 'dev': [ + 'pytest==7.4.0', + 'ruff==0.0.285', + 'yapf==0.40.1', + 'pytest-ruff==0.1.1', + 'pre-commit', + 'pytest-qt', + ], + }) diff --git a/pyctbgui/src/decoder.c b/pyctbgui/src/decoder.c new file mode 100644 index 000000000..2cbb6909b --- /dev/null +++ b/pyctbgui/src/decoder.c @@ -0,0 +1,177 @@ +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +#define PY_SSIZE_T_CLEAN +#include +#include + +#include +#include + +#include "pm_decode.h" +#include "thread_utils.h" + +/*Decode various types of CTB data using a pixel map. Works on single frames and +on stacks of frames*/ +static PyObject *decode(PyObject *Py_UNUSED(self), PyObject *args, + PyObject *kwds) { + // Function arguments to be parsed + PyObject *raw_data_obj = NULL; + PyObject *data_obj = NULL; + PyObject *pm_obj = NULL; + size_t n_threads = 1; + + static char *kwlist[] = {"raw_data", "pixel_map", "out", "n_threads", NULL}; + if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO|On", kwlist, &raw_data_obj, + &pm_obj, &data_obj, &n_threads)) { + return NULL; + } + + // Create a handle to the numpy array from the generic python object + PyObject *raw_data = PyArray_FROM_OTF( + raw_data_obj, NPY_UINT16, + NPY_ARRAY_C_CONTIGUOUS | NPY_ARRAY_ENSUREARRAY | NPY_ARRAY_ALIGNED); + if (!raw_data) { + return NULL; + } + + // Handle to the pixel map + PyObject *pixel_map = PyArray_FROM_OTF( + pm_obj, NPY_UINT32, NPY_ARRAY_C_CONTIGUOUS); // Make 64bit? + if (!pixel_map) { + return NULL; + } + if (PyArray_NDIM((PyArrayObject *)pixel_map) != 2) { + PyErr_SetString(PyExc_TypeError, "The pixel map needs to be 2D"); + return NULL; + } + npy_intp n_rows = PyArray_DIM((PyArrayObject *)pixel_map, 0); + npy_intp n_cols = PyArray_DIM((PyArrayObject *)pixel_map, 1); + + // If called with an output array get an handle to it, otherwise allocate + // the output array + PyObject *data_out = NULL; + if (data_obj) { + data_out = + PyArray_FROM_OTF(data_obj, NPY_UINT16, NPY_ARRAY_C_CONTIGUOUS); + } else { + int ndim = PyArray_NDIM((PyArrayObject *)raw_data) + 1; + npy_intp dims_arr[3] = {PyArray_DIM((PyArrayObject *)raw_data, 0), + n_rows, n_cols}; + npy_intp *dims = NULL; + if (ndim == 2) + dims = &dims_arr[1]; + else + dims = &dims_arr[0]; + // Allocate output array + data_out = PyArray_SimpleNew(ndim, dims, NPY_UINT16); + } + + // Check that raw_data has one less dimension than frame + // eg raw_data[n_frames, pixels] frame[nframes, nrows, ncols] + // raw data is an array of values and data_out is 2/3D + int rd_dim = PyArray_NDIM((PyArrayObject *)raw_data); + int f_dim = PyArray_NDIM((PyArrayObject *)data_out); + + if (rd_dim != (f_dim - 1)) { + PyErr_SetString( + PyExc_TypeError, + "Raw data and data needs to have the one less dim"); // eg -1 + return NULL; + } + + uint16_t *src = (uint16_t *)PyArray_DATA((PyArrayObject *)raw_data); + uint16_t *dst = (uint16_t *)PyArray_DATA((PyArrayObject *)data_out); + uint32_t *pm = (uint32_t *)PyArray_DATA((PyArrayObject *)pixel_map); + + // Check sizes + npy_intp rd_size = PyArray_SIZE((PyArrayObject *)raw_data); + npy_intp fr_size = PyArray_SIZE((PyArrayObject *)data_out); + npy_intp pm_size = PyArray_SIZE((PyArrayObject *)pixel_map); + + // TODO! Add exceptions + if (rd_size != fr_size) { + PyErr_SetString(PyExc_TypeError, + "Raw data size and data size needs to match"); + return NULL; + } + + int64_t n_frames = 1; + if (rd_dim == 2) + n_frames = PyArray_DIM((PyArrayObject *)raw_data, 0); + // printf("n_frames: %lu\n", n_frames); + + // do the correct size check + if (rd_size / n_frames != pm_size) { + PyErr_SetString(PyExc_TypeError, + "Pixel map size needs to match with frame size"); + return NULL; + } + + if (n_threads == 1) { + pm_decode(src, dst, pm, n_frames, n_rows * n_cols); + } else { + // Multithreaded processing + pthread_t *threads = malloc(sizeof(pthread_t *) * n_threads); + thread_args *arguments = malloc(sizeof(thread_args) * n_threads); + + size_t frames_per_thread = n_frames / n_threads; + size_t assigned_frames = 0; + for (size_t i = 0; i < n_threads; i++) { + arguments[i].src = src + (i * frames_per_thread * pm_size); + arguments[i].dst = dst + (i * frames_per_thread * pm_size); + arguments[i].pm = pm; + arguments[i].n_frames = + frames_per_thread; // TODO! not matching frames. + arguments[i].n_pixels = n_rows * n_cols; + assigned_frames += frames_per_thread; + } + arguments[n_threads - 1].n_frames += n_frames - assigned_frames; + + for (size_t i = 0; i < n_threads; i++) { + pthread_create(&threads[i], NULL, (void *)thread_pmdecode, + &arguments[i]); + } + for (size_t i = 0; i < n_threads; i++) { + pthread_join(threads[i], NULL); + } + free(threads); + free(arguments); + } + + Py_DECREF(raw_data); + Py_DECREF(pixel_map); + + return data_out; +} + +// Module docstring, shown as a part of help(creader) +static char module_docstring[] = "C functions decode CTB data"; + +// Module methods +static PyMethodDef creader_methods[] = { + {"decode", (PyCFunction)(void (*)(void))decode, + METH_VARARGS | METH_KEYWORDS, "Decode analog data using a pixel map"}, + {NULL, NULL, 0, NULL} /* Sentinel */ +}; + +// Module defenition +static struct PyModuleDef decoder_def = { + PyModuleDef_HEAD_INIT, + "_decoder", + module_docstring, + -1, + creader_methods, // m_methods + NULL, // m_slots + NULL, // m_traverse + NULL, // m_clear + NULL // m_free +}; + +// Initialize module and add classes +PyMODINIT_FUNC PyInit__decoder(void) { + + PyObject *m = PyModule_Create(&decoder_def); + if (m == NULL) + return NULL; + import_array(); // Needed for numpy + return m; +} diff --git a/pyctbgui/src/pm_decode.c b/pyctbgui/src/pm_decode.c new file mode 100644 index 000000000..fc702b22b --- /dev/null +++ b/pyctbgui/src/pm_decode.c @@ -0,0 +1,18 @@ +#include "pm_decode.h" +#include "thread_utils.h" + +void thread_pmdecode(void *args) { + thread_args *a; + a = (thread_args *)args; + pm_decode(a->src, a->dst, a->pm, a->n_frames, a->n_pixels); +} + +void pm_decode(uint16_t *src, uint16_t *dst, uint32_t *pm, size_t n_frames, + size_t n_pixels) { + for (size_t i = 0; i < n_frames; i++) { + for (size_t j = 0; j < n_pixels; j++) { + *dst++ = src[pm[j]]; + } + src += n_pixels; + } +} \ No newline at end of file diff --git a/pyctbgui/src/pm_decode.h b/pyctbgui/src/pm_decode.h new file mode 100644 index 000000000..325e4d46b --- /dev/null +++ b/pyctbgui/src/pm_decode.h @@ -0,0 +1,8 @@ +#pragma once +#include +#include +// Wrapper to be used with pthreads +void thread_pmdecode(void *args); + +void pm_decode(uint16_t *src, uint16_t *dst, uint32_t *pm, size_t n_frames, + size_t n_pixels); \ No newline at end of file diff --git a/pyctbgui/src/thread_utils.h b/pyctbgui/src/thread_utils.h new file mode 100644 index 000000000..6cc3c2381 --- /dev/null +++ b/pyctbgui/src/thread_utils.h @@ -0,0 +1,10 @@ +#pragma once +#include +#include +typedef struct { + uint16_t *src; + uint16_t *dst; + uint32_t *pm; + size_t n_frames; + size_t n_pixels; +} thread_args; \ No newline at end of file diff --git a/pyctbgui/tests/gui/__init__.py b/pyctbgui/tests/gui/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/pyctbgui/tests/gui/conftest.py b/pyctbgui/tests/gui/conftest.py new file mode 100644 index 000000000..e60342ab7 --- /dev/null +++ b/pyctbgui/tests/gui/conftest.py @@ -0,0 +1,11 @@ +import pytest + +from pyctbgui.ui import MainWindow + + +@pytest.fixture(scope='package') +def main(): + main = MainWindow() + main.show() + yield main + main.close() diff --git a/pyctbgui/tests/gui/data/matterhorm_image_transceiver.npy b/pyctbgui/tests/gui/data/matterhorm_image_transceiver.npy new file mode 100644 index 000000000..37ccc6c2d Binary files /dev/null and b/pyctbgui/tests/gui/data/matterhorm_image_transceiver.npy differ diff --git a/pyctbgui/tests/gui/data/matterhorn_waveform_transceiver1and2.npz b/pyctbgui/tests/gui/data/matterhorn_waveform_transceiver1and2.npz new file mode 100644 index 000000000..942fbf129 Binary files /dev/null and b/pyctbgui/tests/gui/data/matterhorn_waveform_transceiver1and2.npz differ diff --git a/pyctbgui/tests/gui/data/moench04_image_analog.npy b/pyctbgui/tests/gui/data/moench04_image_analog.npy new file mode 100644 index 000000000..791e6e3da Binary files /dev/null and b/pyctbgui/tests/gui/data/moench04_image_analog.npy differ diff --git a/pyctbgui/tests/gui/data/moench04_waveform_adc.npz b/pyctbgui/tests/gui/data/moench04_waveform_adc.npz new file mode 100644 index 000000000..8f94f2783 Binary files /dev/null and b/pyctbgui/tests/gui/data/moench04_waveform_adc.npz differ diff --git a/pyctbgui/tests/gui/data/pattern.pat b/pyctbgui/tests/gui/data/pattern.pat new file mode 100644 index 000000000..20ba27158 --- /dev/null +++ b/pyctbgui/tests/gui/data/pattern.pat @@ -0,0 +1,232 @@ +patword 0x0000 0x000000006b2e8001 +patword 0x0001 0x000000006b2e8001 +patword 0x0002 0x000000006b2e8001 +patword 0x0003 0x000000006b2e8001 +patword 0x0004 0x000000006b2e8001 +patword 0x0005 0x000000006b2e8001 +patword 0x0006 0x000000006b2e8001 +patword 0x0007 0x000000006b2e8001 +patword 0x0008 0x000000006b2e8001 +patword 0x0009 0x000000006b2e8001 +patword 0x000a 0x000000006b2e8001 +patword 0x000b 0x000000006b2e8001 +patword 0x000c 0x00000000692e8001 +patword 0x000d 0x00000000692e8001 +patword 0x000e 0x00000000692e8001 +patword 0x000f 0x00000000692e8001 +patword 0x0010 0x00000000692e8001 +patword 0x0011 0x00000000692e8001 +patword 0x0012 0x00000000692e8001 +patword 0x0013 0x00000000692e8001 +patword 0x0014 0x00000000692e8001 +patword 0x0015 0x00000000692e8001 +patword 0x0016 0x00000000682e8001 +patword 0x0017 0x00000000682e8001 +patword 0x0018 0x00000000682e8001 +patword 0x0019 0x00000000682e8001 +patword 0x001a 0x00000000482c8001 +patword 0x001b 0x00000000482c8001 +patword 0x001c 0x00000000482c8001 +patword 0x001d 0x00000000482c8001 +patword 0x001e 0x00000000482c8001 +patword 0x001f 0x00000000482c8001 +patword 0x0020 0x00000000482c8001 +patword 0x0021 0x00000000482c8001 +patword 0x0022 0x00000000482c8001 +patword 0x0023 0x00000000482c8001 +patword 0x0024 0x00000000482c8001 +patword 0x0025 0x00000000482c8001 +patword 0x0026 0x00000000482c8001 +patword 0x0027 0x00000000482c8001 +patword 0x0028 0x00000000482c8001 +patword 0x0029 0x00000000482c8001 +patword 0x002a 0x00000000482c8001 +patword 0x002b 0x00000000482c8001 +patword 0x002c 0x00000000482c8001 +patword 0x002d 0x00000000482c8001 +patword 0x002e 0x00000000582c8001 +patword 0x002f 0x00000000582c8001 +patword 0x0030 0x00000000582c8001 +patword 0x0031 0x00000000582c8001 +patword 0x0032 0x00000000582c8001 +patword 0x0033 0x00000000582c8001 +patword 0x0034 0x00000000582c8001 +patword 0x0035 0x00000000582c8001 +patword 0x0036 0x00000000582c8001 +patword 0x0037 0x00000000582c8001 +patword 0x0038 0x00000000582c8001 +patword 0x0039 0x00000000582c8001 +patword 0x003a 0x00000000582c8001 +patword 0x003b 0x00000000582c8001 +patword 0x003c 0x00000000582c8001 +patword 0x003d 0x00000000582c8001 +patword 0x003e 0x00000000582c8001 +patword 0x003f 0x00000000582c8001 +patword 0x0040 0x00000000582c8001 +patword 0x0041 0x00000000582c8001 +patword 0x0042 0x00000000582c9011 +patword 0x0043 0x00000000582c9011 +patword 0x0044 0x00000000582c8001 +patword 0x0045 0x00000000582c8001 +patword 0x0046 0x00000000582c8001 +patword 0x0047 0x00000000582c8001 +patword 0x0048 0x00000000582c8001 +patword 0x0049 0x00000000582c8001 +patword 0x004a 0x00000000582c8001 +patword 0x004b 0x00000000582c8001 +patword 0x004c 0x00000000582c8001 +patword 0x004d 0x00000000582c8001 +patword 0x004e 0x00000000582c8001 +patword 0x004f 0x00000000582c8001 +patword 0x0050 0x00000000582c8001 +patword 0x0051 0x00000000582c8001 +patword 0x0052 0x00000000582c8001 +patword 0x0053 0x00000000582c8001 +patword 0x0054 0x00000000582c8001 +patword 0x0055 0x00000000582c8001 +patword 0x0056 0x00000000582c8001 +patword 0x0057 0x00000000582c8001 +patword 0x0058 0x00000000582c8001 +patword 0x0059 0x00000000582c8001 +patword 0x005a 0x00000000582c8041 +patword 0x005b 0x00000000582c8041 +patword 0x005c 0x00000000582c8141 +patword 0x005d 0x00000000582c8041 +patword 0x005e 0x00000000582c8041 +patword 0x005f 0x00000000582c8041 +patword 0x0060 0x00000000582c8041 +patword 0x0061 0x00000000582c8041 +patword 0x0062 0x00000000582c8041 +patword 0x0063 0x00000000582c8041 +patword 0x0064 0x00000000582c8041 +patword 0x0065 0x00000000582c8041 +patword 0x0066 0x00000000582c8041 +patword 0x0067 0x00000000582c8041 +patword 0x0068 0x00000000582c8041 +patword 0x0069 0x00000000582c8041 +patword 0x006a 0x00000000582c8041 +patword 0x006b 0x00000000582c8041 +patword 0x006c 0x00000000582c8041 +patword 0x006d 0x00000000582c8041 +patword 0x006e 0x00000000582c8041 +patword 0x006f 0x00000000582c8041 +patword 0x0070 0x00000000582c8041 +patword 0x0071 0x00000000582c8041 +patword 0x0072 0x00000000582c8041 +patword 0x0073 0x00000000582c8041 +patword 0x0074 0x00000000d82c8941 +patword 0x0075 0x00000000d82c8041 +patword 0x0076 0x00000000582c8001 +patword 0x0077 0x00000000582c8001 +patword 0x0078 0xc0000000582c8001 +patword 0x0079 0xc0000000582c8801 +patword 0x007a 0xc0000000582c8001 +patword 0x007b 0xc0000000582c8801 +patword 0x007c 0xc0000000582c8001 +patword 0x007d 0xc0000000582c8801 +patword 0x007e 0xc0000000582c8001 +patword 0x007f 0xc0000000582c8801 +patword 0x0080 0xc0000000582c8001 +patword 0x0081 0xc0000000582c8801 +patword 0x0082 0xc0000000582c8001 +patword 0x0083 0xc0000000582c8801 +patword 0x0084 0xc0000000582c8001 +patword 0x0085 0xc0000000582c8801 +patword 0x0086 0xc0000000582c8001 +patword 0x0087 0xc0000000582c8801 +patword 0x0088 0xc0000000582c8001 +patword 0x0089 0xc0000000582c8801 +patword 0x008a 0xc0000000582c8001 +patword 0x008b 0xc0000000582c8801 +patword 0x008c 0xc0000000582c8001 +patword 0x008d 0xc0000000582c8801 +patword 0x008e 0xc0000000582c8001 +patword 0x008f 0xc0000000582c8801 +patword 0x0090 0xc0000000582c8001 +patword 0x0091 0xc0000000582c8901 +patword 0x0092 0xc0000000582c8001 +patword 0x0093 0xc0000000582c8801 +patword 0x0094 0xc0000000582c8001 +patword 0x0095 0xc0000000582c8801 +patword 0x0096 0xc0000000582c8001 +patword 0x0097 0xc0000000582c8801 +patword 0x0098 0xc0000000582c8001 +patword 0x0099 0xc0000000582c8801 +patword 0x009a 0xc0000000582c8001 +patword 0x009b 0xc0000000582c8801 +patword 0x009c 0xc0000000582c8001 +patword 0x009d 0xc0000000582c8801 +patword 0x009e 0xc0000000582c8001 +patword 0x009f 0xc0000000582c8801 +patword 0x00a0 0xc0000000582c8001 +patword 0x00a1 0xc0000000582c8801 +patword 0x00a2 0xc0000000582c8001 +patword 0x00a3 0xc0000000582c8801 +patword 0x00a4 0xc0000000582c8001 +patword 0x00a5 0xc0000000582c8801 +patword 0x00a6 0xc0000000582c8001 +patword 0x00a7 0xc0000000582c8801 +patword 0x00a8 0xc0000000582c8001 +patword 0x00a9 0xc0000000d82c8901 +patword 0x00aa 0xc0000000d82c8001 +patword 0x00ab 0xc0000000582c8801 +patword 0x00ac 0xc0000000582c8001 +patword 0x00ad 0xc0000000582c8801 +patword 0x00ae 0xc0000000582c8001 +patword 0x00af 0xc0000000582c8801 +patword 0x00b0 0xc0000000582c8001 +patword 0x00b1 0xc0000000582c8801 +patword 0x00b2 0xc0000000582c8001 +patword 0x00b3 0xc0000000582c8801 +patword 0x00b4 0xc0000000582c8001 +patword 0x00b5 0xc0000000582c8801 +patword 0x00b6 0xc0000000582c8001 +patword 0x00b7 0xc0000000582c8801 +patword 0x00b8 0xc0000000582c8001 +patword 0x00b9 0xc0000000582c8801 +patword 0x00ba 0xc0000000582c8001 +patword 0x00bb 0xc0000000582c8801 +patword 0x00bc 0xc0000000582c8001 +patword 0x00bd 0xc0000000582c8801 +patword 0x00be 0xc0000000582c8001 +patword 0x00bf 0xc0000000582c8801 +patword 0x00c0 0xc0000000582c8001 +patword 0x00c1 0xc0000000582c8801 +patword 0x00c2 0xc0000000582c8001 +patword 0x00c3 0xc0000000582c8901 +patword 0x00c4 0xc0000000582c8001 +patword 0x00c5 0xc0000000582c8801 +patword 0x00c6 0xc0000000582c8001 +patword 0x00c7 0xc0000000582c8801 +patword 0x00c8 0xc0000000582c8001 +patword 0x00c9 0xc0000000582c8801 +patword 0x00ca 0xc0000000582c8001 +patword 0x00cb 0xc0000000582c8801 +patword 0x00cc 0xc0000000582c8001 +patword 0x00cd 0xc0000000582c8801 +patword 0x00ce 0xc0000000582c8001 +patword 0x00cf 0xc0000000582c8801 +patword 0x00d0 0xc0000000582c8001 +patword 0x00d1 0xc0000000582c8801 +patword 0x00d2 0xc0000000582c8001 +patword 0x00d3 0xc0000000582c8801 +patword 0x00d4 0xc0000000582c8001 +patword 0x00d5 0xc0000000582c8801 +patword 0x00d6 0xc0000000582c8001 +patword 0x00d7 0xc0000000582c8801 +patword 0x00d8 0xc0000000582c8001 +patword 0x00d9 0xc0000000582c8801 +patword 0x00da 0xc0000000582c8001 +patword 0x00db 0x00000000582c8001 +patword 0x00dc 0x00000000582c8001 +patword 0x00dd 0x00000000482c8901 +patword 0x00de 0x00000000482c8001 +patword 0x00df 0x00000000482c8901 +patword 0x00e0 0x00000000482c8001 +patword 0x00e1 0x000000006b2e8001 +patlimits 0x0000 0x00e1 +patioctrl 0x01000000fb7fdd55 +patloop 0 0x00a9 0x00da +patnloop 0 199 +patwait 0 0x0018 +patwaittime 0 800 diff --git a/pyctbgui/tests/gui/data/pattern.png b/pyctbgui/tests/gui/data/pattern.png new file mode 100644 index 000000000..1847bb5a4 Binary files /dev/null and b/pyctbgui/tests/gui/data/pattern.png differ diff --git a/pyctbgui/tests/gui/data/simulator.config b/pyctbgui/tests/gui/data/simulator.config new file mode 100644 index 000000000..bbc5d8475 --- /dev/null +++ b/pyctbgui/tests/gui/data/simulator.config @@ -0,0 +1,9 @@ +hostname localhost +rx_hostname localhost +udp_dstip auto +udp_srcip auto + +romode analog +asamples 5000 +tsamples 288 + diff --git a/pyctbgui/tests/gui/test_analog_moench.py b/pyctbgui/tests/gui/test_analog_moench.py new file mode 100644 index 000000000..faca2efe1 --- /dev/null +++ b/pyctbgui/tests/gui/test_analog_moench.py @@ -0,0 +1,57 @@ +from pathlib import Path + +import numpy as np +from pytestqt.qt_compat import qt_api + +from .utils import setup_gui, defaultParams + + +def test_image_acq(main, qtbot, tmp_path): + """ + tests Analog image acquisition and numpy saving + """ + params = defaultParams() + params.detector = "Moench04" + params.mode = "Analog" + params.enabled = list(range(32)) + + setup_gui(qtbot, main, params, tmp_path=tmp_path) + + qtbot.mouseClick(main.pushButtonStart, qt_api.QtCore.Qt.MouseButton.LeftButton) + + acqIndex = main.acquisitionTab.view.spinBoxAcquisitionIndex.value() - 1 + newPath = main.acquisitionTab.outputDir / f'{main.acquisitionTab.outputFileNamePrefix}_{acqIndex}.npy' + qtbot.wait_until(lambda: newPath.is_file()) + + testArray = np.load(newPath) + dataArray = np.load(Path(__file__).parent / 'data' / 'moench04_image_analog.npy') + + assert testArray.shape == (1, 400, 400) + assert np.array_equal(dataArray, testArray) + + +def test_waveform_acq(main, qtbot, tmp_path): + """ + tests Analog waveform acquisition and numpy saving + """ + params = defaultParams() + params.image = False + params.detector = "Moench04" + params.mode = "Analog" + params.enabled = list(range(32)) + params.plotted = params.enabled + + setup_gui(qtbot, main, params, tmp_path=tmp_path) + + qtbot.mouseClick(main.pushButtonStart, qt_api.QtCore.Qt.MouseButton.LeftButton) + + acqIndex = main.acquisitionTab.view.spinBoxAcquisitionIndex.value() - 1 + newPath = main.acquisitionTab.outputDir / f'{main.acquisitionTab.outputFileNamePrefix}_{acqIndex}.npz' + + qtbot.wait_until(lambda: newPath.is_file()) + testArray = np.load(newPath) + dataArray = np.load(Path(__file__).parent / 'data' / 'moench04_waveform_adc.npz') + files = [f"ADC{i}" for i in params.enabled] + assert testArray.files == files + for i in files: + assert np.array_equal(dataArray[i], testArray[i]) diff --git a/pyctbgui/tests/gui/test_pattern.py b/pyctbgui/tests/gui/test_pattern.py new file mode 100644 index 000000000..688a2fc61 --- /dev/null +++ b/pyctbgui/tests/gui/test_pattern.py @@ -0,0 +1,27 @@ +from pathlib import Path + +from pytestqt.qt_compat import qt_api + +from pyctbgui.utils.defines import Defines +from tests.gui.utils import defaultParams + + +def test_view_pattern(main, qtbot, tmp_path): + """ + Tests pattern file viewing + """ + params = defaultParams() + params.image = False + main.tabWidget.setCurrentIndex(Defines.pattern.tabIndex) + qtbot.keyClicks(main.patternTab.view.lineEditPatternFile, "tests/gui/data/pattern.pat") + qtbot.mouseClick(main.patternTab.view.pushButtonViewPattern, qt_api.QtCore.Qt.MouseButton.LeftButton) + qtbot.wait_until(lambda: main.patternTab.figure is not None) + assert main.patternTab.figure is not None + + # save pattern + main.patternTab.figure.savefig(tmp_path / "pattern.png") + assert Path(tmp_path / "pattern.png").exists() + + # pattern files generated from python3.10 libraries differ from python3.11. this would make this + # test flaky so we skip it for now + # assert filecmp.cmp("tests/gui/data/pattern.png", tmp_path / "pattern.png") diff --git a/pyctbgui/tests/gui/test_pedestal_matterhorn.py b/pyctbgui/tests/gui/test_pedestal_matterhorn.py new file mode 100644 index 000000000..0ed6d3ae1 --- /dev/null +++ b/pyctbgui/tests/gui/test_pedestal_matterhorn.py @@ -0,0 +1,34 @@ +import numpy as np +from pytestqt.qt_compat import qt_api + +from tests.gui.utils import defaultParams, setup_gui + + +def test_pedestal_substraction(main, qtbot, tmp_path): + """ + tests Transceiver image acquisition, numpy saving and pedestal substraction + """ + + # record 10 frames + params = defaultParams() + params.pedestalRecord = True + params.nFrames = 10 + params.numpy = False + setup_gui(qtbot, main, params, tmp_path=tmp_path) + qtbot.mouseClick(main.pushButtonStart, qt_api.QtCore.Qt.MouseButton.LeftButton) + qtbot.wait_until(lambda: main.plotTab.view.labelPedestalFrames.text() == 'recorded frames: 10') + + # apply pedestal and save + params.pedestalRecord = False + params.numpy = True + params.nFrames = 2 + setup_gui(qtbot, main, params, tmp_path=tmp_path) + qtbot.mouseClick(main.pushButtonStart, qt_api.QtCore.Qt.MouseButton.LeftButton) + acqIndex = main.acquisitionTab.view.spinBoxAcquisitionIndex.value() - 1 + newPath = main.acquisitionTab.outputDir / f'{main.acquisitionTab.outputFileNamePrefix}_{acqIndex}.npy' + qtbot.wait_until(lambda: newPath.is_file()) + + testArray = np.load(newPath) + + assert testArray.shape == (2, 48, 48) + assert np.array_equal(testArray, np.zeros((2, 48, 48))) diff --git a/pyctbgui/tests/gui/test_signal_matterhorn.py b/pyctbgui/tests/gui/test_signal_matterhorn.py new file mode 100644 index 000000000..b3daebb2c --- /dev/null +++ b/pyctbgui/tests/gui/test_signal_matterhorn.py @@ -0,0 +1,28 @@ +# from pathlib import Path +# +# import numpy as np +# from pytestqt.qt_compat import qt_api +# +# from .utils import setup_gui, defaultParams +# +# +# def test_waveform_signals(main, qtbot, tmp_path): +# """ +# tests signals waveform acquisition and numpy saving +# """ +# params = defaultParams() +# params.image = False +# params.mode = "Signal" +# params.enabled = list(range(128)) +# params.plotted = params.enabled +# +# setup_gui(qtbot, main, params, tmp_path=tmp_path) +# +# qtbot.mouseClick(main.pushButtonStart, qt_api.QtCore.Qt.MouseButton.LeftButton) +# +# acqIndex = main.acquisitionTab.view.spinBoxAcquisitionIndex.value() - 1 +# newPath = main.acquisitionTab.outputDir / f'{main.acquisitionTab.outputFileNamePrefix}_{acqIndex}.npz' +# +# qtbot.wait_until(lambda: newPath.is_file()) +# testArray = np.load(newPath) +# diff --git a/pyctbgui/tests/gui/test_transceiver_matterhorn.py b/pyctbgui/tests/gui/test_transceiver_matterhorn.py new file mode 100644 index 000000000..20f72be44 --- /dev/null +++ b/pyctbgui/tests/gui/test_transceiver_matterhorn.py @@ -0,0 +1,50 @@ +from pathlib import Path + +import numpy as np +from pytestqt.qt_compat import qt_api + +from .utils import setup_gui, defaultParams + + +def test_image_acq(main, qtbot, tmp_path): + """ + tests Transceiver image acquisition and numpy saving + """ + + setup_gui(qtbot, main, tmp_path=tmp_path) + + qtbot.mouseClick(main.pushButtonStart, qt_api.QtCore.Qt.MouseButton.LeftButton) + + acqIndex = main.acquisitionTab.view.spinBoxAcquisitionIndex.value() - 1 + newPath = main.acquisitionTab.outputDir / f'{main.acquisitionTab.outputFileNamePrefix}_{acqIndex}.npy' + qtbot.wait_until(lambda: newPath.is_file()) + + testArray = np.load(newPath) + dataArray = np.load(Path(__file__).parent / 'data' / 'matterhorm_image_transceiver.npy') + + assert testArray.shape == (1, 48, 48) + assert np.array_equal(dataArray, testArray) + + +def test_waveform_acq(main, qtbot, tmp_path): + """ + tests Transceiver waveform acquisition and numpy saving + """ + params = defaultParams() + params.image = False + params.enabled = [0, 1] + params.plotted = [0, 1] + + setup_gui(qtbot, main, params, tmp_path=tmp_path) + + qtbot.mouseClick(main.pushButtonStart, qt_api.QtCore.Qt.MouseButton.LeftButton) + + acqIndex = main.acquisitionTab.view.spinBoxAcquisitionIndex.value() - 1 + newPath = main.acquisitionTab.outputDir / f'{main.acquisitionTab.outputFileNamePrefix}_{acqIndex}.npz' + + qtbot.wait_until(lambda: newPath.is_file()) + testArray = np.load(newPath) + dataArray = np.load(Path(__file__).parent / 'data' / 'matterhorn_waveform_transceiver1and2.npz') + assert testArray.files == ['Transceiver 0', 'Transceiver 1'] + assert np.array_equal(dataArray['Transceiver 0'], testArray['Transceiver 0']) + assert np.array_equal(dataArray['Transceiver 1'], testArray['Transceiver 1']) diff --git a/pyctbgui/tests/gui/utils.py b/pyctbgui/tests/gui/utils.py new file mode 100644 index 000000000..25264e88a --- /dev/null +++ b/pyctbgui/tests/gui/utils.py @@ -0,0 +1,78 @@ +from pathlib import Path + +from pyctbgui.utils.defines import Defines + + +class defaultParams: + image = True + detector = "Matterhorn" + numpy = True + mode = "Transceiver" + outputDir = "/tmp" + filename = "run" + nFrames = 1 + enabled = [] + plotted = [] + pedestalRecord = True + pattern = False + + +def setup_gui(qtbot, widget, params=defaultParams(), tmp_path=Path('/tmp')): + if params.image: + widget.plotTab.view.radioButtonImage.setChecked(True) + widget.plotTab.view.radioButtonWaveform.setChecked(False) + if params.mode == "Transceiver": + params.enabled = [0, 1] + else: + params.enabled = range(128) + else: + widget.plotTab.view.radioButtonWaveform.setChecked(True) + widget.plotTab.view.radioButtonImage.setChecked(False) + + if params.mode == "Transceiver": + widget.tabWidget.setCurrentIndex(Defines.transceiver.tabIndex) + for i in range(Defines.transceiver.count): + # check or uncheck enable/plot checkboxes + enable = getattr(widget.transceiverTab.view, f"checkBoxTransceiver{i}") + enable.setChecked(i in params.enabled) + enable = getattr(widget.transceiverTab.view, f"checkBoxTransceiver{i}Plot") + enable.setChecked(i in params.plotted) + elif params.mode == "Analog": + widget.tabWidget.setCurrentIndex(Defines.adc.tabIndex) + for i in range(Defines.adc.count): + # check or uncheck enable/plot checkboxes + enable = getattr(widget.adcTab.view, f"checkBoxADC{i}En") + enable.setChecked(i in params.enabled) + enable = getattr(widget.adcTab.view, f"checkBoxADC{i}Plot") + enable.setChecked(i in params.plotted) + + qtbot.wait_until(lambda: widget.plotTab.view.radioButtonImage.isChecked() == params.image) + + qtbot.keyClicks(widget.plotTab.view.comboBoxPlot, params.detector) + qtbot.wait_until(lambda: widget.plotTab.view.comboBoxPlot.currentText() == params.detector) + + widget.acquisitionTab.view.checkBoxFileWriteNumpy.setChecked(params.numpy) + + widget.acquisitionTab.view.comboBoxROMode.setCurrentIndex(-1) + qtbot.keyClicks(widget.acquisitionTab.view.comboBoxROMode, params.mode) + qtbot.wait_until(lambda: widget.acquisitionTab.view.comboBoxROMode.currentText() == params.mode) + + widget.acquisitionTab.view.lineEditFilePath.setText(str(tmp_path)) + widget.acquisitionTab.setFilePath() + + widget.acquisitionTab.view.lineEditFileName.setText(params.filename) + widget.acquisitionTab.setFileName() + + widget.acquisitionTab.view.spinBoxFrames.setValue(params.nFrames) + widget.acquisitionTab.setFrames() + + widget.plotTab.view.radioButtonPedestalRecord.setChecked(params.pedestalRecord) + widget.plotTab.view.radioButtonPedestalApply.setChecked(not params.pedestalRecord) + + qtbot.wait_until(lambda: widget.acquisitionTab.view.spinBoxFrames.value() == params.nFrames) + + assert widget.acquisitionTab.view.comboBoxROMode.currentText() == params.mode + assert widget.plotTab.view.comboBoxPlot.currentText() == params.detector + assert widget.acquisitionTab.writeNumpy == params.numpy + assert widget.acquisitionTab.view.spinBoxFrames.value() == params.nFrames + assert widget.acquisitionTab.outputDir == Path(str(tmp_path)) diff --git a/pyctbgui/tests/unit/data/moench04_start_trigger.alias b/pyctbgui/tests/unit/data/moench04_start_trigger.alias new file mode 100755 index 000000000..ca85551f9 --- /dev/null +++ b/pyctbgui/tests/unit/data/moench04_start_trigger.alias @@ -0,0 +1,129 @@ +BIT0 gHG +BIT1 DGS6 1 +BIT2 pulse +BIT3 DGS7 1 +BIT4 clearSSR +BIT5 DGS8 1 +BIT6 inSSR +BIT7 DGS9 1 +BIT8 clkSSR +BIT9 clk_fb +BIT10 prechargeConnect +BIT11 clk +BIT12 clear +BIT13 shr_out_15 +BIT14 bypassCDS +BIT15 Sto2 +BIT16 ENprechPre +BIT17 Sto0_bot +BIT18 pulseOFF +BIT19 Sto1 +BIT20 BYPASS +BIT21 connCDS +BIT22 Dsg3 +BIT23 OutSSRbot +BIT24 resCDS +BIT25 res +BIT26 shr_out_31 +BIT27 Dsg1 +BIT28 READ +BIT29 Sto0_top +BIT30 resDGS +BIT31 shr_in +BIT48 DGS23 1 +BIT49 DGS31 1 +BIT50 DGS22 1 +BIT51 DGS30 1 +BIT52 DGS21 1 +BIT53 DGS29 1 +BIT54 DGS20 1 +BIT55 DGS28 1 +BIT56 DGS19 1 +BIT57 DGS27 1 +BIT58 DGS18 1 +BIT59 DGS26 1 +BIT60 DGS17 1 +BIT61 DGS25 1 +BIT62 DGS16 1 +BIT63 DGS24 1 + +#BIT62 dbit_ena +#BIT63 adc_ena + +SENSE3 T_boa.(C) +SENSE1 Va+ +SENSE6 Vdd_ps +SENSE4 Vsh +SENSE2 Vcc_int +SENSE0 Vcc_iochip +SENSE7 Vcc1.8A +SENSE5 Vcc1.8D + +DAC0 VprechPre +DAC1 prechargeV +DAC2 vb_sda +DAC3 vbp_colbuf +DAC4 vcasc_SFP +DAC5 ibias_SFP +DAC6 vIpreCDS +DAC7 vin_com_bot +DAC8 vIpre +DAC9 s2dVinTest +DAC10 VPH +DAC11 vIpreDGS +DAC12 vrefDGS +DAC13 empty13 +DAC14 vin_com_top +DAC15 VPL +DAC16 vout_com +DAC17 empty17 + +ADC0 SCOL9 1 +ADC1 SCOL8 1 +ADC2 SCOL11 1 +ADC3 SCOL10 1 +ADC4 SCOL13 1 +ADC5 SCOL12 1 +ADC6 SCOL15 1 +ADC7 SCOL14 1 + +ADC8 SCOL1 1 +ADC9 SCOL0 1 +ADC10 SCOL3 1 +ADC11 SCOL2 1 +ADC12 SCOL5 1 +ADC13 SCOL4 1 +ADC14 SCOL7 1 +ADC15 SCOL6 1 + +ADC16 SCOL23 1 +ADC17 SCOL22 1 +ADC18 SCOL21 1 +ADC19 SCOL20 1 +ADC20 SCOL19 1 +ADC21 SCOL18 1 +ADC22 SCOL17 1 +ADC23 SCOL16 1 + +ADC24 SCOL31 1 +ADC25 SCOL30 1 +ADC26 SCOL29 1 +ADC27 SCOL28 1 +ADC28 SCOL27 1 +ADC29 SCOL26 1 +ADC30 SCOL25 1 +ADC31 SCOL24 1 + +VA VddA +VB VddPre +VIO VddD + +#location of the pattern compiler +#PATCOMPILER /afs/psi.ch/project/sls_det_software/slsDetectorsPackage/slsDetectorSoftware/patternGenerator/generate.sh +PATCOMPILER /afs/psi.ch/project/sls_det_software/sabina/slsDetectorPackage/ctbGui/patternGenerator/generate.sh +#location of the pattern to run +#PATFILE /afs/psi.ch/user/d/dinapoli/jctb/moench02_rob/patterns_newctb/moench02_pulsing_marco.p +#PATFILE /afs/psi.ch/project/sls_det_software/sabina/moench04/patterns/moench04_readout_g4.p +#PATFILE /afs/psi.ch/user/m/maliakal_d/setupfiles/ctb_julian.pat +#PATFILE /tmp/bla.p +#PATFILE /afs/psi.ch/project/mythen/Moench04/moench04_pulsing_readout_g4.p diff --git a/pyctbgui/tests/unit/test_alias_file.py b/pyctbgui/tests/unit/test_alias_file.py new file mode 100644 index 000000000..a318d0885 --- /dev/null +++ b/pyctbgui/tests/unit/test_alias_file.py @@ -0,0 +1,63 @@ +import pytest +from pathlib import Path +from pyctbgui import alias_utility as at + + +def test_read_non_existing_file_throws(): + with pytest.raises(FileNotFoundError): + at.read_alias_file('saijvcaiewjrvijaerijvaeoirvjveiojroiajgv') + + +def test_parse_sample_file(): + fpath = Path(__file__).parent / 'data/moench04_start_trigger.alias' + bit_names, bit_plots, bit_colors, adc_names, adc_plots, adc_colors, dac_names, sense_names, power_names, \ + pat_file_name = at.read_alias_file(fpath) + + assert len(bit_names) == 64 + + true_names = [ + 'gHG', 'DGS6', 'pulse', 'DGS7', 'clearSSR', 'DGS8', 'inSSR', 'DGS9', 'clkSSR', 'clk_fb', 'prechargeConnect', + 'clk', 'clear', 'shr_out_15', 'bypassCDS', 'Sto2', 'ENprechPre', 'Sto0_bot', 'pulseOFF', 'Sto1', 'BYPASS', + 'connCDS', 'Dsg3', 'OutSSRbot', 'resCDS', 'res', 'shr_out_31', 'Dsg1', 'READ', 'Sto0_top', 'resDGS', 'shr_in', + None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, 'DGS23', + 'DGS31', 'DGS22', 'DGS30', 'DGS21', 'DGS29', 'DGS20', 'DGS28', 'DGS19', 'DGS27', 'DGS18', 'DGS26', 'DGS17', + 'DGS25', 'DGS16', 'DGS24' + ] + + true_plot = [ + None, True, None, True, None, True, None, True, None, None, None, None, None, None, None, None, None, None, + None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, + None, None, None, None, None, None, None, None, None, None, None, None, True, True, True, True, True, True, + True, True, True, True, True, True, True, True, True, True + ] + + # Make sure we didn't mess up anything in this file + assert len(true_names) == len(bit_names) + for value, reference in zip(bit_names, true_names): + assert value == reference + + assert len(true_plot) == 64 + for value, reference in zip(bit_plots, true_plot): + assert value == reference + + # sense names + true_sese = ['Vcc_iochip', 'Va+', 'Vcc_int', 'T_boa.(C)', 'Vsh', 'Vcc1.8D', 'Vdd_ps', 'Vcc1.8A'] + assert len(true_sese) == 8 + assert true_sese == sense_names + + # ADC + + true_adc = [ + 'SCOL9', 'SCOL8', 'SCOL11', 'SCOL10', 'SCOL13', 'SCOL12', 'SCOL15', 'SCOL14', 'SCOL1', 'SCOL0', 'SCOL3', + 'SCOL2', 'SCOL5', 'SCOL4', 'SCOL7', 'SCOL6', 'SCOL23', 'SCOL22', 'SCOL21', 'SCOL20', 'SCOL19', 'SCOL18', + 'SCOL17', 'SCOL16', 'SCOL31', 'SCOL30', 'SCOL29', 'SCOL28', 'SCOL27', 'SCOL26', 'SCOL25', 'SCOL24' + ] + + assert len(true_adc) == 32 + assert true_adc == adc_names + + +def test_single_value_parse_gives_exception(): + # Check that we get the correct exception + with pytest.raises(Exception, match=r'Alias file parsing failed'): + at.parse_alias_lines(['hej']) diff --git a/pyctbgui/tests/unit/test_bit_utils.py b/pyctbgui/tests/unit/test_bit_utils.py new file mode 100644 index 000000000..c04e7c642 --- /dev/null +++ b/pyctbgui/tests/unit/test_bit_utils.py @@ -0,0 +1,27 @@ +import numpy as np + +from pyctbgui import bit_utils as bt + + +def test_set_bit(): + num = np.int32(0) + num = bt.set_bit(num, 5) + assert num == 2**5 + + +def test_remove_bit(): + num = np.int32(2**5) + num = bt.remove_bit(num, 5) + assert num == 0 + + +def test_manipulate_bit(): + num = np.int32(0) + num = bt.manipulate_bit(True, num, 5) # True means setting bit + assert num == 2**5 + + +def test_manipulate_bit2(): + num = np.int32(2**8) + num = bt.manipulate_bit(False, num, 8) # False means clearing the bit + assert num == 0 diff --git a/pyctbgui/tests/unit/test_decoder.py b/pyctbgui/tests/unit/test_decoder.py new file mode 100644 index 000000000..21c8b69bf --- /dev/null +++ b/pyctbgui/tests/unit/test_decoder.py @@ -0,0 +1,42 @@ +import numpy as np +import sys + +from pyctbgui.utils import decoder +from pyctbgui.utils.pixelmap import moench04_analog, matterhorn_transceiver + + +def test_simple_decode(): + pixel_map = np.zeros((2, 2), dtype=np.uint32) + pixel_map.flat = [0, 1, 2, 3] + + raw_data = np.zeros(4, dtype=np.uint16) + raw_data.flat = [8, 9, 10, 11] + data = decoder.decode(raw_data, pixel_map) + + assert data[0, 0] == 8 + assert data[0, 1] == 9 + assert data[1, 0] == 10 + assert data[1, 1] == 11 + + # Make sure we didn't mess up the reference counts + assert sys.getrefcount(data) == 2 + assert sys.getrefcount(raw_data) == 2 + assert sys.getrefcount(pixel_map) == 2 + + +def test_compare_python_and_c_decoding(): + """ + Check that the python and C implementation give the same results + provides a regression test in case we change the C implementation + """ + pixel_map = moench04_analog() + raw_data = np.arange(400 * 400, dtype=np.uint16) + c_data = decoder.decode(raw_data, pixel_map) + py_data = decoder.moench04(raw_data) + assert (c_data == py_data).all() + + pixel_map = matterhorn_transceiver() + raw_data = np.arange(48 * 48, dtype=np.uint16) + c_data = decoder.decode(raw_data, pixel_map) + py_data = decoder.matterhorn(raw_data) + assert (c_data == py_data).all() diff --git a/pyctbgui/tests/unit/test_npy_writer.py b/pyctbgui/tests/unit/test_npy_writer.py new file mode 100644 index 000000000..5d7928fd3 --- /dev/null +++ b/pyctbgui/tests/unit/test_npy_writer.py @@ -0,0 +1,160 @@ +import filecmp +from pathlib import Path + +import pytest + +from pyctbgui.utils.numpyWriter.npy_writer import NumpyFileManager +import numpy as np + + +def test_create_new_file(tmp_path): + npw = NumpyFileManager(tmp_path / 'tmp.npy', 'w', (400, 400), np.int32) + npw.writeOneFrame(np.ones([400, 400], dtype=np.int32)) + npw.writeOneFrame(np.ones([400, 400], dtype=np.int32)) + npw.writeOneFrame(np.ones([400, 400], dtype=np.int32)) + npw.writeOneFrame(np.ones([400, 400], dtype=np.int32)) + npw.close() + + arr = np.load(tmp_path / 'tmp.npy') + + assert arr.dtype == np.int32 + assert arr.shape == (4, 400, 400) + assert np.array_equal(arr, np.ones([4, 400, 400], dtype=np.int32)) + + np.save(tmp_path / 'tmp2.npy', np.ones([4, 400, 400], dtype=np.int32)) + assert filecmp.cmp(tmp_path / 'tmp.npy', tmp_path / 'tmp2.npy') + + +def test_open_old_file(tmp_path): + npw = NumpyFileManager(tmp_path / 'tmp.npy', 'w', (4000, ), np.float32) + npw.writeOneFrame(np.ones(4000, dtype=np.float32)) + npw.writeOneFrame(np.ones(4000, dtype=np.float32)) + npw.close() + npw2 = NumpyFileManager(tmp_path / 'tmp.npy', 'r+') + assert npw2.frameCount == 2 + assert npw2.frameShape == (4000, ) + assert npw2.dtype == np.float32 + npw2.writeOneFrame(np.ones(4000, dtype=np.float32)) + del npw2 + np.save(tmp_path / 'tmp2.npy', np.ones([3, 4000], dtype=np.float32)) + assert filecmp.cmp(tmp_path / 'tmp.npy', tmp_path / 'tmp2.npy') + + +@pytest.mark.parametrize('mode', ['w', 'x']) +def test_init_parameters2(mode, tmp_path): + # test opening files with missing parameters for write + with pytest.raises(AssertionError): + NumpyFileManager(tmp_path / 'abaababababa.npyx', mode) + with pytest.raises(AssertionError): + NumpyFileManager(tmp_path / 'abaababababa.npyx2', mode, frameShape=(12, 34)) + with pytest.raises(AssertionError): + NumpyFileManager(tmp_path / 'abaababababa.npyx3', mode, dtype=np.int64) + + # opening new file with required parameters (this should work) + NumpyFileManager(tmp_path / 'abaababababa.npyx3', mode, dtype=np.int64, frameShape=(6, 6)) + assert Path.is_file(tmp_path / 'abaababababa.npyx3') + + +def test_init_parameters(tmp_path): + with pytest.raises(TypeError): + NumpyFileManager() + + # test opening file that does not exist + with pytest.raises(FileNotFoundError): + NumpyFileManager(tmp_path / 'abaababababa.npyx') + with pytest.raises(FileNotFoundError): + NumpyFileManager(tmp_path / 'abaababababa.npyx2', frameShape=(12, 34)) + with pytest.raises(FileNotFoundError): + NumpyFileManager(tmp_path / 'abaababababa.npyx3', dtype=np.int64) + with pytest.raises(FileNotFoundError): + NumpyFileManager(tmp_path / 'abaababababa.npyx3', dtype=np.int64, frameShape=(6, 6)) + + # re-opening the same file + NumpyFileManager(tmp_path / 'abaababababa.npyx3', 'w', dtype=np.int64, frameShape=(6, 6)) + NumpyFileManager(tmp_path / 'abaababababa.npyx3') + + # re-opening the file with wrong parameters + with pytest.raises(AssertionError): + NumpyFileManager(tmp_path / 'abaababababa.npyx3', frameShape=(6, 2)) + with pytest.raises(AssertionError): + NumpyFileManager(tmp_path / 'abaababababa.npyx3', dtype=np.int32) + with pytest.raises(AssertionError): + NumpyFileManager(tmp_path / 'abaababababa.npyx3', dtype=np.float32, frameShape=(5, 5)) + + # test resetting an existing file + npw = NumpyFileManager(tmp_path / 'tmp4.npy', 'w', dtype=np.float32, frameShape=(5, 5)) + npw.writeOneFrame(np.ones((5, 5), dtype=np.float32)) + npw.close() + assert np.load(tmp_path / 'tmp4.npy').shape == (1, 5, 5) + npw = NumpyFileManager(tmp_path / 'tmp4.npy', 'w', dtype=np.int64, frameShape=(7, 7)) + npw.flush() + assert np.load(tmp_path / 'tmp4.npy').shape == (0, 7, 7) + + # test adding frames with the wrong shape to an existing file + with pytest.raises(ValueError, match=r'frame shape given \(9, 4, 4\) '): + npw.writeOneFrame(np.ones((9, 4, 4))) + + +def test_get_item(tmp_path): + rng = np.random.default_rng(seed=42) + arr = rng.random((1000, 20, 20)) + npw = NumpyFileManager(tmp_path / 'tmp.npy', 'w', frameShape=(20, 20), dtype=arr.dtype) + for frame in arr: + npw.writeOneFrame(frame) + + assert np.array_equal(npw[50:100], arr[50:100]) + assert np.array_equal(npw[0:1], arr[0:1]) + assert np.array_equal(npw[0:10000], arr) + assert np.array_equal(npw[999:1000], arr[999:1000]) + assert np.array_equal(npw[999:1005], arr[999:1000]) + assert np.array_equal(npw[49:300], arr[49:300]) + assert np.array_equal(npw[88:88], arr[88:88]) + assert np.array_equal(npw[0:0], arr[0:0]) + assert np.array_equal(npw[0:77], arr[0:77]) + assert np.array_equal(npw[77:0], arr[77:0]) + + with pytest.raises(NotImplementedError): + npw[-1:-3] + with pytest.raises(NotImplementedError): + npw[10:20:2] + with pytest.raises(NotImplementedError): + npw[-5:-87:5] + with pytest.raises(NotImplementedError): + npw[-5:-87:-5] + + with pytest.raises(NotImplementedError): + npw.readFrames(-1, -4) + with pytest.raises(NotImplementedError): + npw.readFrames(0, -77) + with pytest.raises(NotImplementedError): + npw.readFrames(-5, -5) + + +def test_file_functions(tmp_path): + rng = np.random.default_rng(seed=42) + arr = rng.random((1000, 20, 20)) + npw = NumpyFileManager(tmp_path / 'tmp.npy', 'w', frameShape=(20, 20), dtype=arr.dtype) + for frame in arr: + npw.writeOneFrame(frame) + assert np.array_equal(npw.read(10), arr[:10]) + assert np.array_equal(npw.read(10), arr[10:20]) + assert np.array_equal(npw.read(10), arr[20:30]) + npw.readFrames(500, 600) + assert np.array_equal(npw.read(10), arr[30:40]) + npw.readFrames(0, 2) + assert np.array_equal(npw.read(100), arr[40:140]) + npw.writeOneFrame(arr[700]) + assert np.array_equal(npw.read(5), arr[140:145]) + npw.seek(900) + assert np.array_equal(npw.read(20), arr[900:920]) + npw.seek(5) + npw.readFrames(500, 600) + assert np.array_equal(npw.read(10), arr[5:15]) + + +def test_with_statement(tmp_path): + arr = np.ones((5, 5)) + with NumpyFileManager(tmp_path / 'tmp.npy', 'w', (5, 5), arr.dtype) as npw: + npw.writeOneFrame(arr) + np.save(tmp_path / 'tmp2.npy', np.expand_dims(arr, 0)) + assert filecmp.cmp(tmp_path / 'tmp2.npy', tmp_path / 'tmp.npy') diff --git a/pyctbgui/tests/unit/test_npz_writer.py b/pyctbgui/tests/unit/test_npz_writer.py new file mode 100644 index 000000000..e1d0fb48e --- /dev/null +++ b/pyctbgui/tests/unit/test_npz_writer.py @@ -0,0 +1,194 @@ +import filecmp +from pathlib import Path + +import pytest + +from pyctbgui.utils.numpyWriter.npy_writer import NumpyFileManager +import numpy as np + +from pyctbgui.utils.numpyWriter.npz_writer import NpzFileWriter + + +@pytest.mark.parametrize('compressed', [True, False]) +def test_incremental_npz(compressed, tmp_path): + arr1 = np.ones((10, 5, 5)) + arr2 = np.zeros((10, 5, 5), dtype=np.int32) + arr3 = np.ones((10, 5, 5), dtype=np.float32) + with NpzFileWriter(tmp_path / 'tmp.npz', 'w', compress_file=compressed) as npz: + npz.writeArray('adc', arr1) + npz.writeArray('tx', arr2) + npz.writeArray('signal', arr3) + + npzFile = np.load(tmp_path / 'tmp.npz') + assert sorted(npzFile.files) == sorted(('adc', 'tx', 'signal')) + assert np.array_equal(npzFile['adc'], np.ones((10, 5, 5))) + assert np.array_equal(npzFile['tx'], np.zeros((10, 5, 5), dtype=np.int32)) + assert np.array_equal(npzFile['signal'], np.ones((10, 5, 5), dtype=np.float32)) + if compressed: + np.savez_compressed(tmp_path / 'tmp2.npz', adc=arr1, tx=arr2, signal=arr3) + else: + np.savez(tmp_path / 'tmp2.npz', adc=arr1, tx=arr2, signal=arr3) + + assert filecmp.cmp(tmp_path / 'tmp2.npz', tmp_path / 'tmp.npz') + + +@pytest.mark.parametrize('compressed', [True, False]) +def test_zipping_npy_files(compressed, tmp_path): + data = { + 'arr1': np.ones((10, 5, 5)), + 'arr2': np.zeros((10, 5, 5), dtype=np.int32), + 'arr3': np.ones((10, 5, 5), dtype=np.float32) + } + filePaths = [tmp_path / (file + '.npy') for file in data.keys()] + for file in data: + np.save(tmp_path / (file + '.npy'), data[file]) + NpzFileWriter.zipNpyFiles(tmp_path / 'file.npz', filePaths, list(data.keys()), compressed=compressed) + npz = np.load(tmp_path / 'file.npz') + assert npz.files == list(data.keys()) + for file in data: + assert np.array_equal(npz[file], data[file]) + + if compressed: + np.savez_compressed(tmp_path / 'numpy.npz', **data) + else: + np.savez(tmp_path / 'numpy.npz', **data) + + numpyz = np.load(tmp_path / 'numpy.npz') + for file in data: + assert np.array_equal(numpyz[file], npz[file]) + assert npz.files == numpyz.files + + # different files :( + # for some reason numpy savez (most likely a trick with zipfile library) doesn't write the time + # of last modification + # assert filecmp.cmp(prefix / 'numpy.npz', prefix / 'file.npz') + + +@pytest.mark.parametrize('compressed', [True, False]) +def test_npy_writer_with_zipfile_in_init(compressed, tmp_path): + npz = NpzFileWriter(tmp_path / 'tmp.npz', 'w', compress_file=compressed) + + rng = np.random.default_rng(42) + arr = rng.random((8000, 5, 5)) + npz.writeArray('adc', arr) + with npz.file.open('adc.npy', mode='r') as outfile: + npw = NumpyFileManager(outfile) + assert np.array_equal(npw.readFrames(720, 7999), arr[720:7999]) + + +def test_compression(tmp_path): + arr = np.zeros((1000, 5, 5), dtype=np.int32) + with NpzFileWriter(tmp_path / 'tmp.npz', 'w', compress_file=True) as npz: + npz.writeArray('adc', arr) + + np.savez(tmp_path / 'tmp2.npz', adc=arr) + + assert Path(tmp_path / 'tmp2.npz').stat().st_size > Path(tmp_path / 'tmp.npz').stat().st_size + + +@pytest.mark.parametrize('compressed', [True, False]) +@pytest.mark.parametrize('isPath', [True, False]) +@pytest.mark.parametrize('deleteOriginals', [True, False]) +def test_delete_files(compressed, isPath, deleteOriginals, tmp_path): + data = { + 'arr1': np.ones((10, 5, 5)), + 'arr2': np.zeros((10, 5, 5), dtype=np.int32), + 'arr3': np.ones((10, 5, 5), dtype=np.float32) + } + filePaths = [tmp_path / (file + '.npy') for file in data.keys()] + for file in data: + np.save(tmp_path / (file + '.npy'), data[file]) + path = tmp_path / 'file.npz' + path = str(path) if isPath else path + NpzFileWriter.zipNpyFiles(path, + filePaths, + list(data.keys()), + deleteOriginals=deleteOriginals, + compressed=compressed) + if deleteOriginals: + for file in filePaths: + assert not Path.exists(file) + else: + for file in filePaths: + assert Path.exists(file) + + +def test_npz_read_frames(tmp_path): + rng = np.random.default_rng(seed=42) + arr1 = rng.random((10, 5, 5)) + + with NpzFileWriter(tmp_path / 'tmp.npz', 'w') as npz: + npz.writeArray('adc', arr1) + + with NpzFileWriter(tmp_path / 'tmp.npz', 'r') as npz: + frames = npz.readFrames('adc', 5, 8) + assert np.array_equal(frames, arr1[5:8]) + + +def test_file_modes(tmp_path): + rng = np.random.default_rng(seed=42) + arr1 = rng.random((10, 5, 5)) + + # check reopening with mode w + with NpzFileWriter(tmp_path / 'tmp.npz', 'w') as npz: + npz.writeArray('adc', arr1) + + with NpzFileWriter(tmp_path / 'tmp.npz', 'w') as npz: + assert npz.file.namelist() == [] + + # check reopening with mode x + with NpzFileWriter(tmp_path / 'tmp.npz', 'w') as npz: + npz.writeArray('adc', arr1) + + with pytest.raises(FileExistsError): + with NpzFileWriter(tmp_path / 'tmp.npz', 'x'): + pass + # check reopening with mode r + with NpzFileWriter(tmp_path / 'tmp.npz', 'r') as npz: + assert np.array_equal(npz.readFrames('adc', 4, 6), arr1[4:6]) + with pytest.raises(ValueError, match=r'write\(\) requires mode \'w\'\, \'x\'\, or \'a\''): + npz.writeArray('adc2', arr1) + + +@pytest.mark.filterwarnings('ignore::UserWarning') +def test_file_mode_a(tmp_path): + rng = np.random.default_rng(seed=42) + arr1 = rng.random((10, 5, 5)) + # check reopening with mode a + with NpzFileWriter(tmp_path / 'tmp.npz', 'w') as npz: + npz.writeArray('adc', arr1) + + with NpzFileWriter(tmp_path / 'tmp.npz', 'a') as npz: + npz.writeArray('adc2', arr1) + npz.writeArray('adc', arr1) + + +@pytest.mark.parametrize('compressed', [True, False]) +def test_get_item(compressed, tmp_path): + rng = np.random.default_rng(seed=42) + arr1 = rng.random((10, 5, 5)) + arr2 = rng.random((3, 2, 2)) + # check reopening with mode a + npz = NpzFileWriter(tmp_path / 'tmp.npz', 'w', compress_file=compressed) + npz.writeArray('adc1', arr1) + npz.writeArray('adc2', arr2) + npz.writeArray('adc3', arr1) + assert np.array_equal(npz['adc1'].read(3), arr1[:3]) + assert np.array_equal(npz['adc2'].read(1), arr2[:1]) + assert np.array_equal(npz['adc2'].read(1), arr2[1:2]) + assert np.array_equal(npz['adc2'].read(1), arr2[2:3]) + assert np.array_equal(npz['adc1'].read(3), arr1[3:6]) + assert np.array_equal(npz['adc1'].read(3), arr1[6:9]) + + +@pytest.mark.parametrize('compressed', [True, False]) +def test_namelist(compressed, tmp_path): + rng = np.random.default_rng(seed=42) + arr1 = rng.random((10, 5, 5)) + arr2 = rng.random((3, 2, 2)) + # check reopening with mode a + npz = NpzFileWriter(tmp_path / 'tmp.npz', 'w', compress_file=compressed) + npz.writeArray('adc1', arr1) + npz.writeArray('adc2', arr2) + npz.writeArray('adc3', arr1) + assert npz.namelist() == ['adc1', 'adc2', 'adc3'] diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index a5ba4134d..1bd44d267 100755 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -49,7 +49,6 @@ set( PYTHON_FILES slsdet/temperature.py slsdet/lookup.py slsdet/utils.py - ) foreach(FILE ${PYTHON_FILES}) @@ -58,7 +57,6 @@ foreach(FILE ${PYTHON_FILES}) endforeach(FILE ${PYTHON_FILES}) - configure_file( scripts/basic.py ${CMAKE_BINARY_DIR}/basic.py ) @@ -66,6 +64,9 @@ configure_file( scripts/test_virtual.py ${CMAKE_BINARY_DIR}/test_virtual.py ) +configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/../VERSION + ${CMAKE_BINARY_DIR}/bin/slsdet/VERSION +) if(SLS_INSTALL_PYTHONEXT) install(TARGETS _slsdet @@ -74,4 +75,5 @@ if(SLS_INSTALL_PYTHONEXT) ) install(FILES ${PYTHON_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/python/slsdet) + install(FILES ../VERSION DESTINATION ${CMAKE_INSTALL_PREFIX}/python/slsdet) endif() \ No newline at end of file diff --git a/python/setup.py b/python/setup.py index a467a4727..1be1ac809 100755 --- a/python/setup.py +++ b/python/setup.py @@ -10,7 +10,15 @@ import sys from setuptools import setup, find_packages from pybind11.setup_helpers import Pybind11Extension, build_ext -__version__ = os.environ.get('GIT_DESCRIBE_TAG', 'developer') +def read_version(): + try: + version_file = os.path.join(os.path.dirname(__file__), 'slsdet', 'VERSION') + with open(version_file, "r") as f: + return f.read().strip() + except: + raise RuntimeError("VERSION file not found in slsdet package from setup.py.") + +__version__ = read_version() def get_conda_path(): @@ -60,6 +68,9 @@ setup( description='Detector API for SLS Detector Group detectors', long_description='', packages=find_packages(exclude=['contrib', 'docs', 'tests']), + package_data={ + 'slsdet': ['VERSION'], + }, ext_modules=ext_modules, cmdclass={"build_ext": build_ext}, zip_safe=False, diff --git a/python/slsdet/__init__.py b/python/slsdet/__init__.py index 8915bc130..96a734ff9 100755 --- a/python/slsdet/__init__.py +++ b/python/slsdet/__init__.py @@ -22,9 +22,22 @@ defs = _slsdet.slsDetectorDefs from .enums import * from .defines import * + IpAddr = _slsdet.IpAddr MacAddr = _slsdet.MacAddr scanParameters = _slsdet.scanParameters currentSrcParameters = _slsdet.currentSrcParameters DurationWrapper = _slsdet.DurationWrapper -pedestalParameters = _slsdet.pedestalParameters \ No newline at end of file +pedestalParameters = _slsdet.pedestalParameters + +import os +def read_version(): + try: + version_file = os.path.join(os.path.dirname(__file__), 'VERSION') + with open(version_file, "r") as f: + return f.read().strip() + except: + raise RuntimeError("VERSION file not found in slsdet package from init.py") + +__version__ = read_version() + diff --git a/python/slsdet/detector.py b/python/slsdet/detector.py index e53ab4295..ce8a60999 100755 --- a/python/slsdet/detector.py +++ b/python/slsdet/detector.py @@ -232,7 +232,7 @@ class Detector(CppDetectorApi): @element def hardwareversion(self): """ - [Jungfrau][Moench][Gotthard2][Myhten3][Gotthard][Ctb] Hardware version of detector. \n + Hardware version of detector. \n [Eiger] Hardware version of front FPGA on detector. """ return self.getHardwareVersion() @@ -308,7 +308,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 [Mythen3] Options: 8, 16, 32 \n - [Jungfrau][Moench][Gotthard][Ctb][Mythen3][Gotthard2] 16 + [Jungfrau][Moench][Gotthard][Ctb][Mythen3][Gotthard2][Xilinx Ctb] 16 """ return self.getDynamicRange() @@ -400,7 +400,7 @@ class Detector(CppDetectorApi): @element def framesl(self): """ - [Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][CTB] Number of frames left in acquisition.\n + [Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][CTB][Xilinx CTB] Number of frames left in acquisition.\n Note ---- @@ -414,7 +414,7 @@ class Detector(CppDetectorApi): @element def framecounter(self): """ - [Jungfrau][Moench][Mythen3][Gotthard2][CTB] Number of frames from start run control. + [Jungfrau][Moench][Mythen3][Gotthard2][CTB][Xilinx Ctb] Number of frames from start run control. Note ----- @@ -443,12 +443,13 @@ class Detector(CppDetectorApi): @element def powerchip(self): """ - [Jungfrau][Moench][Mythen3][Gotthard2] Power the chip. + [Jungfrau][Moench][Mythen3][Gotthard2][Xilinx Ctb] Power the chip. Note ---- [Jungfrau][Moench] Default is disabled. Get will return power status. Can be off if temperature event occured (temperature over temp_threshold with temp_control enabled. Will configure chip (only chip v1.1).\n [Mythen3][Gotthard2] Default is 1. If module not connected or wrong module, powerchip will fail. + [Xilinx Ctb] Default is 0. Also configures the chip if powered on. """ return self.getPowerChip() @@ -456,6 +457,16 @@ class Detector(CppDetectorApi): def powerchip(self, value): ut.set_using_dict(self.setPowerChip, value) + def configtransceiver(self): + """ + [Xilinx Ctb] Waits for transceiver to be aligned. + + Note + ---- + Chip had to be configured (powered on) before this. + """ + self.configureTransceiver() + @property @element def triggers(self): @@ -620,7 +631,7 @@ class Detector(CppDetectorApi): @element def periodl(self): """ - [Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2] Period left for current frame. + [Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2][Xilinx Ctb] Period left for current frame. Note ----- @@ -642,7 +653,7 @@ class Detector(CppDetectorApi): @element def delay(self): """ - [Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2] Delay after trigger, accepts either a value in seconds, DurationWrapper or datetime.timedelta + [Gotthard][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 @@ -684,7 +695,7 @@ class Detector(CppDetectorApi): @element def delayl(self): """ - [Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2] Delay left after trigger during acquisition, accepts either a value in seconds, datetime.timedelta or DurationWrapper + [Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2][Xilinx Ctb] Delay left after trigger during acquisition, accepts either a value in seconds, datetime.timedelta or DurationWrapper Note ----- @@ -732,7 +743,7 @@ class Detector(CppDetectorApi): @property @element def nextframenumber(self): - """[Eiger][Jungfrau][Moench][CTB] Next frame number. Stopping acquisition might result in different frame numbers for different modules. """ + """[Eiger][Jungfrau][Moench][CTB][Xilinx CTB][Gotthard2] Next frame number. Stopping acquisition might result in different frame numbers for different modules. So, after stopping, next frame number (max + 1) is set for all the modules afterwards.""" return self.getNextFrameNumber() @nextframenumber.setter @@ -1032,7 +1043,7 @@ class Detector(CppDetectorApi): Note ---- - If path does not exist, it will try to create it. + If path does not exist and fwrite enabled, it will try to create it at start of acquisition. Example -------- @@ -1048,7 +1059,7 @@ class Detector(CppDetectorApi): @property @element def fwrite(self): - """Enable or disable receiver file write. Default is enabled. """ + """Enable or disable receiver file write. Default is disabled. """ return self.getFileWrite() @fwrite.setter @@ -1199,31 +1210,6 @@ class Detector(CppDetectorApi): else: raise ValueError("Unknown argument type") - @property - @element - def rx_zmqip(self): - """ - Zmq Ip Address from which data is to be streamed out of the receiver. - - Note - ----- - Also restarts receiver zmq streaming if enabled. \n - Default is from rx_hostname. \n - Modified only when using an intermediate process after receiver. - - Example - ------- - >>> d.rx_zmqip - 192.168.0.101 - >>> d.rx_zmqip = '192.168.0.101' - """ - return self.getRxZmqIP() - - @rx_zmqip.setter - def rx_zmqip(self, ip): - ip = ut.make_ip(ip) #Convert from int or string to IpAddr - ut.set_using_dict(self.setRxZmqIP, ip) - @property @element def zmqip(self): @@ -1951,7 +1937,7 @@ class Detector(CppDetectorApi): @element def triggersl(self): """ - [Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][CTB] Number of triggers left in acquisition.\n + [Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][CTB][Xilinx CTB] Number of triggers left in acquisition.\n Note ---- @@ -1964,7 +1950,7 @@ class Detector(CppDetectorApi): @property @element def frametime(self): - """[Jungfrau][Moench][Mythen3][Gotthard2][CTB] Timestamp at a frame start. + """[Jungfrau][Moench][Mythen3][Gotthard2][CTB][Xilinx Ctb] Timestamp at a frame start. Note ---- @@ -2003,23 +1989,59 @@ class Detector(CppDetectorApi): @property def versions(self): - version_list = {'type': self.type, - 'package': self.packageversion, - 'client': self.clientversion} - - if self.type == detectorType.EIGER: - version_list ['firmware (Beb)'] = self.firmwareversion - version_list ['firmware(Febl)'] = self.getFrontEndFirmwareVersion(slsDetectorDefs.fpgaPosition.FRONT_LEFT) - version_list ['firmware (Febr)'] = self.getFrontEndFirmwareVersion(slsDetectorDefs.fpgaPosition.FRONT_RIGHT) + type = "Unknown" + firmware = "Unknown" + detectorserver = "Unknown" + kernel = "Unknown" + hardware = "Unknown" + receiverversion = "Unknown" + eiger = False + firmware_febl = "Unknown" + firmware_febr = "Unknown" + firmware_beb = "Unknown" + receiver_in_shm = False + + release = self.packageversion + client = self.clientversion + + if self.nmod != 0: + # shared memory has detectors + type = self.type + eiger = (self.type == detectorType.EIGER) + receiver_in_shm = self.use_receiver + if receiver_in_shm: + # cannot connect to receiver + try: + receiverversion = self.rx_version + except Exception as e: + pass + # cannot connect to Detector + try: + firmware = self.firmwareversion + detectorserver = self.detectorserverversion + kernel = self.kernelversion + hardware = self.hardwareversion + if eiger: + firmware_beb = self.firmwareversion + firmware_febl = self.getFrontEndFirmwareVersion(slsDetectorDefs.fpgaPosition.FRONT_LEFT) + firmware_febr = self.getFrontEndFirmwareVersion(slsDetectorDefs.fpgaPosition.FRONT_RIGHT) + except Exception as e: + pass + + version_list = {'type': {type}, + 'package': {release}, + 'client': {client}} + if eiger: + version_list ['firmware (Beb)'] = {firmware_beb} + version_list ['firmware(Febl)'] = {firmware_febl} + version_list ['firmware (Febr)'] = {firmware_febr} else: - version_list ['firmware'] = self.firmwareversion - - version_list ['detectorserver'] = self.detectorserverversion - version_list ['kernel'] = self.kernelversion - version_list ['hardware'] = self.hardwareversion - - if self.use_receiver: - version_list ['receiver'] = self.rx_version + version_list ['firmware'] = {firmware} + version_list ['detectorserver'] = {detectorserver} + version_list ['kernel'] = kernel + version_list ['hardware'] = hardware + if receiver_in_shm: + version_list ['receiver'] = {receiverversion} return version_list @@ -2089,7 +2111,7 @@ class Detector(CppDetectorApi): Note ----- - [Jungfrau][Moench] FULL_SPEED, HALF_SPEED (Default), QUARTER_SPEED + [Jungfrau][Moench][Mythen3] FULL_SPEED, HALF_SPEED (Default), QUARTER_SPEED [Eiger] FULL_SPEED (Default), HALF_SPEED, QUARTER_SPEED [Moench] FULL_SPEED (Default), HALF_SPEED, QUARTER_SPEED [Gottthard2] G2_108MHZ (Default), G2_144MHZ @@ -2180,7 +2202,7 @@ class Detector(CppDetectorApi): Note ----- Default: AUTO_TIMING \n - [Jungfrau][Moench][Gotthard][Ctb][Gotthard2] AUTO_TIMING, TRIGGER_EXPOSURE \n + [Jungfrau][Moench][Gotthard][Ctb][Gotthard2][Xilinx Ctb] AUTO_TIMING, TRIGGER_EXPOSURE \n [Mythen3] AUTO_TIMING, TRIGGER_EXPOSURE, GATED, TRIGGER_GATED \n [Eiger] AUTO_TIMING, TRIGGER_EXPOSURE, GATED, BURST_TRIGGER """ @@ -2602,7 +2624,7 @@ class Detector(CppDetectorApi): @property @element def runtime(self): - """[Jungfrau][Moench][Mythen3][Gotthard2][CTB] Time from detector start up. + """[Jungfrau][Moench][Mythen3][Gotthard2][CTB][Xilinx Ctb] Time from detector start up. Note ----- @@ -2888,10 +2910,36 @@ class Detector(CppDetectorApi): def pedestalmode(self, value): ut.set_using_dict(self.setPedestalMode, value) + @property + @element + def timing_info_decoder(self): + """[Jungfrau] [Jungfrau] Advanced Command and only for SWISSFEL and SHINE. Sets the bunch id or timing info decoder. Default is SWISSFEL. + Enum: timingInfoDecoder + """ + return self.getTimingInfoDecoder() + + @timing_info_decoder.setter + def timing_info_decoder(self, value): + ut.set_using_dict(self.setTimingInfoDecoder, value) + + @property + @element + def collectionmode(self): + """[Jungfrau] Sets collection mode to HOLE or ELECTRON. Default is HOLE. + Enum: collectionMode + """ + return self.getCollectionMode() + + @collectionmode.setter + def collectionmode(self, value): + ut.set_using_dict(self.setCollectionMode, value) + @property def maxclkphaseshift(self): """ - [Gotthard2][Mythen3] Absolute maximum Phase shift of clocks. + [Gotthard2][Mythen3] Absolute maximum Phase shift of clocks.\n + [Gotthard2] Clock index range: 0-5\n + [Mythen3] Clock index range: 0 :setter: Not Implemented @@ -3237,7 +3285,7 @@ class Detector(CppDetectorApi): @property @element def transceiverenable(self): - """[Ctb] Transceiver Enable Mask. Enable for each 4 transceiver channel.""" + """[CTB][Xilinx CTB] Transceiver Enable Mask. Enable for each 4 transceiver channel.""" return self.getTransceiverEnableMask() @transceiverenable.setter @@ -3276,8 +3324,10 @@ class Detector(CppDetectorApi): Note ------ - Options: ANALOG_ONLY, DIGITAL_ONLY, ANALOG_AND_DIGITAL, TRANSCEIVER_ONLY, DIGITAL_AND_TRANSCEIVER - Default: ANALOG_ONLY + [CTB] Options: ANALOG_ONLY, DIGITAL_ONLY, ANALOG_AND_DIGITAL, TRANSCEIVER_ONLY, DIGITAL_AND_TRANSCEIVER + [CTB] Default: ANALOG_ONLY + [Xilinx CTB] Options: TRANSCEIVER_ONLY + [Xilinx CTB] Default: TRANSCEIVER_ONLY Example -------- @@ -3314,7 +3364,7 @@ class Detector(CppDetectorApi): @property @element def tsamples(self): - """[CTB] Number of transceiver samples expected. """ + """[CTB][Xilinx CTB] Number of transceiver samples expected. """ return self.getNumberOfTransceiverSamples() @tsamples.setter @@ -3477,7 +3527,7 @@ class Detector(CppDetectorApi): @property def pattern(self): - """[Mythen3][Ctb] Loads ASCII pattern file directly to server (instead of executing line by line). + """[Mythen3][Ctb][Xilinx Ctb] Loads ASCII pattern file directly to server (instead of executing line by line). :getter: Not Implemented @@ -3495,7 +3545,7 @@ class Detector(CppDetectorApi): @property def patfname(self): """ - [Ctb][Mythen3] Gets the pattern file name including path of the last pattern uploaded. Returns an empty if nothing was uploaded or via a server default + [Ctb][Mythen3][Xilinx Ctb] Gets the pattern file name including path of the last pattern uploaded. Returns an empty if nothing was uploaded or via a server default file """ return self.getPatterFileName() @@ -3520,7 +3570,7 @@ class Detector(CppDetectorApi): @property @element def patlimits(self): - """[Ctb][Mythen3] Limits (start and stop address) of complete pattern. + """[Ctb][Mythen3][Xilinx Ctb] Limits (start and stop address) of complete pattern. Example --------- @@ -3540,7 +3590,7 @@ class Detector(CppDetectorApi): @property @element def patsetbit(self): - """[Ctb][Mythen3] Sets the mask applied to every pattern to the selected bits. + """[Ctb][Mythen3][Xilinx Ctb] Sets the mask applied to every pattern to the selected bits. Example -------- @@ -3557,7 +3607,7 @@ class Detector(CppDetectorApi): @property @element def patmask(self): - """[Ctb][Mythen3] Selects the bits that will have a pattern mask applied to the selected patmask for every pattern. + """[Ctb][Mythen3][Xilinx Ctb] Selects the bits that will have a pattern mask applied to the selected patmask for every pattern. Example -------- @@ -3575,7 +3625,7 @@ class Detector(CppDetectorApi): # @element def patwait(self): """ - [Ctb][Mythen3] Wait address of loop level provided. + [Ctb][Mythen3][Xilinx Ctb] Wait address of loop level provided. Example ------- @@ -3592,7 +3642,7 @@ class Detector(CppDetectorApi): @property @element def patwait0(self): - """[Ctb][Mythen3] Wait 0 address. + """[Ctb][Mythen3][Xilinx Ctb] Wait 0 address. Example -------- @@ -3612,7 +3662,7 @@ class Detector(CppDetectorApi): @property @element def patwait1(self): - """[Ctb][Mythen3] Wait 1 address. + """[Ctb][Mythen3][Xilinx Ctb] Wait 1 address. Example -------- @@ -3632,7 +3682,7 @@ class Detector(CppDetectorApi): @property @element def patwait2(self): - """[Ctb][Mythen3] Wait 2 address. + """[Ctb][Mythen3][Xilinx Ctb] Wait 2 address. Example -------- @@ -3652,7 +3702,7 @@ class Detector(CppDetectorApi): @property def patwaittime(self): """ - [Ctb][Mythen3] Wait time in clock cycles of loop level provided. + [Ctb][Mythen3][Xilinx Ctb] Wait time in clock cycles of loop level provided. Example ------- @@ -3669,7 +3719,7 @@ class Detector(CppDetectorApi): @property @element def patwaittime0(self): - """[Ctb][Mythen3] Wait 0 time in clock cycles.""" + """[Ctb][Mythen3][Xilinx Ctb] Wait 0 time in clock cycles.""" return self.getPatternWaitTime(0) @patwaittime0.setter @@ -3680,7 +3730,7 @@ class Detector(CppDetectorApi): @property @element def patwaittime1(self): - """[Ctb][Mythen3] Wait 1 time in clock cycles.""" + """[Ctb][Mythen3][Xilinx Ctb] Wait 1 time in clock cycles.""" return self.getPatternWaitTime(1) @patwaittime1.setter @@ -3691,7 +3741,7 @@ class Detector(CppDetectorApi): @property @element def patwaittime2(self): - """[Ctb][Mythen3] Wait 2 time in clock cycles.""" + """[Ctb][Mythen3][Xilinx Ctb] Wait 2 time in clock cycles.""" return self.getPatternWaitTime(2) @patwaittime2.setter @@ -3703,7 +3753,7 @@ class Detector(CppDetectorApi): @property def patloop(self): """ - [Ctb][Mythen3] Limits (start and stop address) of the loop provided. + [Ctb][Mythen3][Xilinx Ctb] Limits (start and stop address) of the loop provided. Example ------- @@ -3720,7 +3770,7 @@ class Detector(CppDetectorApi): @property @element def patloop0(self): - """[Ctb][Mythen3] Limits (start and stop address) of loop 0. + """[Ctb][Mythen3][Xilinx Ctb] Limits (start and stop address) of loop 0. Example --------- @@ -3740,7 +3790,7 @@ class Detector(CppDetectorApi): @property @element def patloop1(self): - """[Ctb][Mythen3] Limits (start and stop address) of loop 1. + """[Ctb][Mythen3][Xilinx Ctb] Limits (start and stop address) of loop 1. Example --------- @@ -3761,7 +3811,7 @@ class Detector(CppDetectorApi): @property @element def patloop2(self): - """[Ctb][Mythen3] Limits (start and stop address) of loop 2. + """[Ctb][Mythen3][Xilinx Ctb] Limits (start and stop address) of loop 2. Example --------- @@ -3783,7 +3833,7 @@ class Detector(CppDetectorApi): @property def patnloop(self): """ - [Ctb][Mythen3] Number of cycles of the loop provided. + [Ctb][Mythen3][Xilinx Ctb] Number of cycles of the loop provided. Example ------- @@ -3800,7 +3850,7 @@ class Detector(CppDetectorApi): @property @element def patnloop0(self): - """[Ctb][Mythen3] Number of cycles of loop 0.""" + """[Ctb][Mythen3][Xilinx Ctb] Number of cycles of loop 0.""" return self.getPatternLoopCycles(0) @patnloop0.setter @@ -3811,7 +3861,7 @@ class Detector(CppDetectorApi): @property @element def patnloop1(self): - """[Ctb][Mythen3] Number of cycles of loop 1.""" + """[Ctb][Mythen3][Xilinx Ctb] Number of cycles of loop 1.""" return self.getPatternLoopCycles(1) @patnloop1.setter @@ -3822,7 +3872,7 @@ class Detector(CppDetectorApi): @property @element def patnloop2(self): - """[Ctb][Mythen3] Number of cycles of loop 2.""" + """[Ctb][Mythen3][Xilinx Ctb] Number of cycles of loop 2.""" return self.getPatternLoopCycles(2) @patnloop2.setter @@ -3833,7 +3883,7 @@ class Detector(CppDetectorApi): @property @element def v_a(self): - """[Ctb] Power supply a in mV.""" + """[Ctb][Xilinx Ctb] Power supply a in mV.""" return self.getPower(dacIndex.V_POWER_A) @v_a.setter @@ -3844,7 +3894,7 @@ class Detector(CppDetectorApi): @property @element def v_b(self): - """[Ctb] Power supply b in mV.""" + """[Ctb][Xilinx Ctb] Power supply b in mV.""" return self.getPower(dacIndex.V_POWER_B) @v_b.setter @@ -3855,7 +3905,7 @@ class Detector(CppDetectorApi): @property @element def v_c(self): - """[Ctb] Power supply c in mV.""" + """[Ctb][Xilinx Ctb] Power supply c in mV.""" return self.getPower(dacIndex.V_POWER_C) @v_c.setter @@ -3866,7 +3916,7 @@ class Detector(CppDetectorApi): @property @element def v_d(self): - """[Ctb] Power supply d in mV.""" + """[Ctb][Xilinx Ctb] Power supply d in mV.""" return self.getPower(dacIndex.V_POWER_D) @v_d.setter @@ -3877,7 +3927,7 @@ class Detector(CppDetectorApi): @property @element def v_io(self): - """[Ctb] Power supply io in mV. Minimum 1200 mV. + """[Ctb][Xilinx Ctb] Power supply io in mV. Minimum 1200 mV. Note ---- @@ -3893,7 +3943,7 @@ class Detector(CppDetectorApi): @property @element def v_limit(self): - """[Ctb] Soft limit for power supplies (ctb only) and DACS in mV.""" + """[Ctb][Xilinx Ctb] Soft limit for power supplies (ctb only) and DACS in mV.""" return self.getPower(dacIndex.V_LIMIT) @v_limit.setter @@ -3950,7 +4000,9 @@ class Detector(CppDetectorApi): @property def clkphase(self): """ - [Gotthard2][Mythen3] Phase shift of all clocks. + [Gotthard2][Mythen3] Phase shift of all clocks.\n + [Gotthard2] Clock index range: 0-5\n + [Mythen3] Clock index range: 0 Example ------- @@ -3968,7 +4020,9 @@ class Detector(CppDetectorApi): @property def clkdiv(self): """ - [Gotthard2][Mythen3] Clock Divider of all clocks. Must be greater than 1. + [Gotthard2][Mythen3] Clock Divider of all clocks. Must be greater than 1.\n + [Gotthard2] Clock index range: 0-5\n + [Mythen3] Clock index range: 0 Example ------- @@ -4024,7 +4078,10 @@ class Detector(CppDetectorApi): @property def clkfreq(self): """ - [Gotthard2][Mythen3] Frequency of clock in Hz. + [Gotthard2][Mythen3] Frequency of clock in Hz.\n + [Gotthard2] Clock index range: 0-5\n + [Mythen3] Clock index range: 0 + :setter: Not implemented. Use clkdiv to set frequency diff --git a/python/slsdet/jungfrau.py b/python/slsdet/jungfrau.py index 9da5b7771..c8e3f43f9 100644 --- a/python/slsdet/jungfrau.py +++ b/python/slsdet/jungfrau.py @@ -24,7 +24,7 @@ class JungfrauDacs(DetectorDacs): ('vdd_prot', dacIndex.VDD_PROT, 0, 4000, 3000), ('vin_com', dacIndex.VIN_COM, 0, 4000, 1053), ('vref_prech', dacIndex.VREF_PRECH, 0, 4000, 1450), - ('vb_pixbuff', dacIndex.VB_PIXBUF, 0, 4000, 750), + ('vb_pixbuf', dacIndex.VB_PIXBUF, 0, 4000, 750), ('vb_ds', dacIndex.VB_DS, 0, 4000, 1000), ('vref_ds', dacIndex.VREF_DS, 0, 4000, 480), ('vref_comp', dacIndex.VREF_COMP, 0, 4000, 420), diff --git a/python/slsdet/registers.py b/python/slsdet/registers.py index 79da39fff..4c80585e9 100755 --- a/python/slsdet/registers.py +++ b/python/slsdet/registers.py @@ -8,7 +8,7 @@ class Register: return self._detector.readRegister(key) def __setitem__(self, key, value): - self._detector.writeRegister(key, value) + self._detector.writeRegister(key, value, False) class Adc_register: def __init__(self, detector): diff --git a/python/src/detector.cpp b/python/src/detector.cpp index a1e211ae4..5ca05412b 100644 --- a/python/src/detector.cpp +++ b/python/src/detector.cpp @@ -21,11 +21,13 @@ void init_det(py::module &m) { using sls::Positions; using sls::Result; + m.def("freeSharedMemory", + (void (*)(const int, const int)) & sls::freeSharedMemory, + py::arg() = 0, py::arg() = -1); + py::class_ CppDetectorApi(m, "CppDetectorApi"); CppDetectorApi.def(py::init()); - CppDetectorApi.def("freeSharedMemory", - (void (Detector::*)()) & Detector::freeSharedMemory); CppDetectorApi.def("loadConfig", (void (Detector::*)(const std::string &)) & Detector::loadConfig, @@ -1039,15 +1041,6 @@ void init_det(py::module &m) { (void (Detector::*)(uint16_t, int)) & Detector::setRxZmqPort, py::arg(), py::arg() = -1); - CppDetectorApi.def( - "getRxZmqIP", - (Result(Detector::*)(sls::Positions) const) & - Detector::getRxZmqIP, - py::arg() = Positions{}); - CppDetectorApi.def("setRxZmqIP", - (void (Detector::*)(const sls::IpAddr, sls::Positions)) & - Detector::setRxZmqIP, - py::arg(), py::arg() = Positions{}); CppDetectorApi.def("getClientZmqPort", (Result(Detector::*)(sls::Positions) const) & Detector::getClientZmqPort, @@ -1280,6 +1273,26 @@ void init_det(py::module &m) { (void (Detector::*)(const defs::pedestalParameters, sls::Positions)) & Detector::setPedestalMode, py::arg(), py::arg() = Positions{}); + CppDetectorApi.def( + "getTimingInfoDecoder", + (Result(Detector::*)(sls::Positions) const) & + Detector::getTimingInfoDecoder, + py::arg() = Positions{}); + CppDetectorApi.def( + "setTimingInfoDecoder", + (void (Detector::*)(defs::timingInfoDecoder, sls::Positions)) & + Detector::setTimingInfoDecoder, + py::arg(), py::arg() = Positions{}); + CppDetectorApi.def( + "getCollectionMode", + (Result(Detector::*)(sls::Positions) const) & + Detector::getCollectionMode, + py::arg() = Positions{}); + CppDetectorApi.def( + "setCollectionMode", + (void (Detector::*)(defs::collectionMode, sls::Positions)) & + Detector::setCollectionMode, + py::arg(), py::arg() = Positions{}); CppDetectorApi.def("getROI", (Result(Detector::*)(sls::Positions) const) & Detector::getROI, @@ -1778,6 +1791,10 @@ void init_det(py::module &m) { (std::string(Detector::*)(const defs::dacIndex) const) & Detector::getSlowADCName, py::arg()); + CppDetectorApi.def("configureTransceiver", + (void (Detector::*)(sls::Positions)) & + Detector::configureTransceiver, + py::arg() = Positions{}); CppDetectorApi.def( "getPatterFileName", (Result(Detector::*)(sls::Positions) const) & @@ -1945,17 +1962,19 @@ void init_det(py::module &m) { py::arg(), py::arg() = Positions{}); CppDetectorApi.def( "writeRegister", - (void (Detector::*)(uint32_t, uint32_t, sls::Positions)) & + (void (Detector::*)(uint32_t, uint32_t, bool, sls::Positions)) & Detector::writeRegister, - py::arg(), py::arg(), py::arg() = Positions{}); - CppDetectorApi.def("setBit", - (void (Detector::*)(uint32_t, int, sls::Positions)) & - Detector::setBit, - py::arg(), py::arg(), py::arg() = Positions{}); - CppDetectorApi.def("clearBit", - (void (Detector::*)(uint32_t, int, sls::Positions)) & - Detector::clearBit, - py::arg(), py::arg(), py::arg() = Positions{}); + py::arg(), py::arg(), py::arg() = false, py::arg() = Positions{}); + CppDetectorApi.def( + "setBit", + (void (Detector::*)(uint32_t, int, bool, sls::Positions)) & + Detector::setBit, + py::arg(), py::arg(), py::arg() = false, py::arg() = Positions{}); + CppDetectorApi.def( + "clearBit", + (void (Detector::*)(uint32_t, int, bool, sls::Positions)) & + Detector::clearBit, + py::arg(), py::arg(), py::arg() = false, py::arg() = Positions{}); CppDetectorApi.def( "getBit", (Result(Detector::*)(uint32_t, int, sls::Positions)) & diff --git a/python/src/detector_in.cpp b/python/src/detector_in.cpp index ce784ee0e..e19f3c103 100644 --- a/python/src/detector_in.cpp +++ b/python/src/detector_in.cpp @@ -18,8 +18,10 @@ void init_det(py::module &m) { using sls::Positions; using sls::Result; + m.def("freeSharedMemory", (void (*)(const int, const int)) &sls::freeSharedMemory, py::arg() = 0, py::arg() = -1); + py::class_ CppDetectorApi(m, "CppDetectorApi"); CppDetectorApi.def(py::init()); - + [[FUNCTIONS]] } diff --git a/python/src/enums.cpp b/python/src/enums.cpp index 6651b9fc4..69633825f 100644 --- a/python/src/enums.cpp +++ b/python/src/enums.cpp @@ -25,6 +25,8 @@ void init_enums(py::module &m) { .value("MOENCH", slsDetectorDefs::detectorType::MOENCH) .value("MYTHEN3", slsDetectorDefs::detectorType::MYTHEN3) .value("GOTTHARD2", slsDetectorDefs::detectorType::GOTTHARD2) + .value("XILINX_CHIPTESTBOARD", + slsDetectorDefs::detectorType::XILINX_CHIPTESTBOARD) .export_values(); py::enum_(Defs, "runStatus") @@ -37,6 +39,11 @@ void init_enums(py::module &m) { .value("STOPPED", slsDetectorDefs::runStatus::STOPPED) .export_values(); + py::enum_(Defs, "dimension") + .value("X", slsDetectorDefs::dimension::X) + .value("Y", slsDetectorDefs::dimension::Y) + .export_values(); + py::enum_(Defs, "frameDiscardPolicy") .value("NO_DISCARD", slsDetectorDefs::frameDiscardPolicy::NO_DISCARD) .value("DISCARD_EMPTY_FRAMES", @@ -54,11 +61,6 @@ void init_enums(py::module &m) { slsDetectorDefs::fileFormat::NUM_FILE_FORMATS) .export_values(); - py::enum_(Defs, "dimension") - .value("X", slsDetectorDefs::dimension::X) - .value("Y", slsDetectorDefs::dimension::Y) - .export_values(); - py::enum_(Defs, "externalSignalFlag") .value("TRIGGER_IN_RISING_EDGE", slsDetectorDefs::externalSignalFlag::TRIGGER_IN_RISING_EDGE) @@ -325,4 +327,14 @@ void init_enums(py::module &m) { .value("POSITIVE", slsDetectorDefs::polarity::POSITIVE) .value("NEGATIVE", slsDetectorDefs::polarity::NEGATIVE) .export_values(); + + py::enum_(Defs, "timingInfoDecoder") + .value("SWISSFEL", slsDetectorDefs::timingInfoDecoder::SWISSFEL) + .value("SHINE", slsDetectorDefs::timingInfoDecoder::SHINE) + .export_values(); + + py::enum_(Defs, "collectionMode") + .value("HOLE", slsDetectorDefs::collectionMode::HOLE) + .value("ELECTRON", slsDetectorDefs::collectionMode::ELECTRON) + .export_values(); } diff --git a/serverBin/ctbDetectorServerv8.0.0 b/serverBin/ctbDetectorServerv8.0.0 deleted file mode 120000 index 6ffb26664..000000000 --- a/serverBin/ctbDetectorServerv8.0.0 +++ /dev/null @@ -1 +0,0 @@ -../slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv8.0.0 \ No newline at end of file diff --git a/serverBin/ctbDetectorServerv9.0.0 b/serverBin/ctbDetectorServerv9.0.0 new file mode 120000 index 000000000..9659d98a4 --- /dev/null +++ b/serverBin/ctbDetectorServerv9.0.0 @@ -0,0 +1 @@ +../slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv9.0.0 \ No newline at end of file diff --git a/serverBin/eigerDetectorServerv8.0.0 b/serverBin/eigerDetectorServerv8.0.0 deleted file mode 120000 index adce6b835..000000000 --- a/serverBin/eigerDetectorServerv8.0.0 +++ /dev/null @@ -1 +0,0 @@ -../slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv8.0.0 \ No newline at end of file diff --git a/serverBin/eigerDetectorServerv9.0.0 b/serverBin/eigerDetectorServerv9.0.0 new file mode 120000 index 000000000..4304e388f --- /dev/null +++ b/serverBin/eigerDetectorServerv9.0.0 @@ -0,0 +1 @@ +../slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv9.0.0 \ No newline at end of file diff --git a/serverBin/gotthard2DetectorServerv8.0.0 b/serverBin/gotthard2DetectorServerv8.0.0 deleted file mode 120000 index 67113eef6..000000000 --- a/serverBin/gotthard2DetectorServerv8.0.0 +++ /dev/null @@ -1 +0,0 @@ -../slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv8.0.0 \ No newline at end of file diff --git a/serverBin/gotthard2DetectorServerv9.0.0 b/serverBin/gotthard2DetectorServerv9.0.0 new file mode 120000 index 000000000..9ed8c6365 --- /dev/null +++ b/serverBin/gotthard2DetectorServerv9.0.0 @@ -0,0 +1 @@ +../slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv9.0.0 \ No newline at end of file diff --git a/serverBin/gotthardDetectorServerv8.0.0 b/serverBin/gotthardDetectorServerv8.0.0 deleted file mode 120000 index 777bd8a83..000000000 --- a/serverBin/gotthardDetectorServerv8.0.0 +++ /dev/null @@ -1 +0,0 @@ -../slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv8.0.0 \ No newline at end of file diff --git a/serverBin/gotthardDetectorServerv9.0.0 b/serverBin/gotthardDetectorServerv9.0.0 new file mode 120000 index 000000000..e2758e2b8 --- /dev/null +++ b/serverBin/gotthardDetectorServerv9.0.0 @@ -0,0 +1 @@ +../slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv9.0.0 \ No newline at end of file diff --git a/serverBin/jungfrauDetectorServerv8.0.2 b/serverBin/jungfrauDetectorServerv8.0.2 deleted file mode 120000 index ae1efdca0..000000000 --- a/serverBin/jungfrauDetectorServerv8.0.2 +++ /dev/null @@ -1 +0,0 @@ -../slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv8.0.2 \ No newline at end of file diff --git a/serverBin/jungfrauDetectorServerv9.0.0 b/serverBin/jungfrauDetectorServerv9.0.0 new file mode 120000 index 000000000..e1024484e --- /dev/null +++ b/serverBin/jungfrauDetectorServerv9.0.0 @@ -0,0 +1 @@ +../slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv9.0.0 \ No newline at end of file diff --git a/serverBin/moenchDetectorServerv8.0.2 b/serverBin/moenchDetectorServerv8.0.2 deleted file mode 120000 index 7d3e84e8a..000000000 --- a/serverBin/moenchDetectorServerv8.0.2 +++ /dev/null @@ -1 +0,0 @@ -../slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv8.0.2 \ No newline at end of file diff --git a/serverBin/moenchDetectorServerv9.0.0 b/serverBin/moenchDetectorServerv9.0.0 new file mode 120000 index 000000000..aafcf2249 --- /dev/null +++ b/serverBin/moenchDetectorServerv9.0.0 @@ -0,0 +1 @@ +../slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv9.0.0 \ No newline at end of file diff --git a/serverBin/mythen3DetectorServerv8.0.2 b/serverBin/mythen3DetectorServerv8.0.2 deleted file mode 120000 index 187339896..000000000 --- a/serverBin/mythen3DetectorServerv8.0.2 +++ /dev/null @@ -1 +0,0 @@ -../slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv8.0.2 \ No newline at end of file diff --git a/serverBin/mythen3DetectorServerv9.0.0 b/serverBin/mythen3DetectorServerv9.0.0 new file mode 120000 index 000000000..4d03230fe --- /dev/null +++ b/serverBin/mythen3DetectorServerv9.0.0 @@ -0,0 +1 @@ +../slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv9.0.0 \ No newline at end of file diff --git a/serverBin/xilinx_ctbDetectorServerv9.0.0 b/serverBin/xilinx_ctbDetectorServerv9.0.0 new file mode 120000 index 000000000..5dd1968b2 --- /dev/null +++ b/serverBin/xilinx_ctbDetectorServerv9.0.0 @@ -0,0 +1 @@ +../slsDetectorServers/xilinx_ctbDetectorServer/bin/xilinx_ctbDetectorServerv9.0.0 \ No newline at end of file diff --git a/slsDetectorCalibration/moenchExecutables/moenchRawDataProcess.cpp b/slsDetectorCalibration/moenchExecutables/moenchRawDataProcess.cpp index 69620e7f4..40af40c09 100644 --- a/slsDetectorCalibration/moenchExecutables/moenchRawDataProcess.cpp +++ b/slsDetectorCalibration/moenchExecutables/moenchRawDataProcess.cpp @@ -175,13 +175,12 @@ int main(int argc, char *argv[]) { int cf = 0; int numberOfPackets=nrows/8; - #ifdef RECT cout << "Should be rectangular but now it will crash! No data structure defined!" << endl; #endif #ifndef MOENCH04 - moench03v2Data *decoder = new moench03v2Data(100); + moench03v2Data *decoder = new moench03v2Data(nrows/2); cout << "MOENCH03!" << endl; #endif @@ -299,6 +298,7 @@ int main(int argc, char *argv[]) { double *ped=new double[nx * ny];//, *ped1; int pos,pos1; //return 0; + if (pedfile.find(".raw") != std::string::npos) { pos1=pedfile.rfind("/"); strcpy(froot,pedfile.substr(pos1).c_str()); @@ -336,9 +336,8 @@ int main(int argc, char *argv[]) { } filebin.close(); while (mt->isBusy()) { - ; - - } + ; + } sprintf(imgfname, "%s/%s_ped.tiff", outdir.c_str(),froot); mt->writePedestal(imgfname); @@ -463,7 +462,6 @@ int main(int argc, char *argv[]) { } } else { cout << "bp " << ifr << " " << ff << " " << np << endl; - //break; } ff = -1; } diff --git a/slsDetectorCalibration/moenchExecutables/moenchZmqProcess.cpp b/slsDetectorCalibration/moenchExecutables/moenchZmqProcess.cpp index 4582cd103..8d20767cd 100644 --- a/slsDetectorCalibration/moenchExecutables/moenchZmqProcess.cpp +++ b/slsDetectorCalibration/moenchExecutables/moenchZmqProcess.cpp @@ -283,13 +283,12 @@ int main(int argc, char *argv[]) { return EXIT_FAILURE; } if (zmqsocket->Connect()) { - cprintf(RED, "Error: Could not connect to zmq receiving socket %s\n", + cprintf(RED, "Error: Could not connect to Zmq receiving socket %s\n", (zmqsocket->GetZmqServerAddress()).c_str()); delete zmqsocket; return EXIT_FAILURE; } else - - printf("Zmq receiving at %s\n", zmqsocket->GetZmqServerAddress().c_str()); + printf("Zmq receiving socket at %s\n", zmqsocket->GetZmqServerAddress().c_str()); // send socket sls::ZmqSocket *zmqsocket2 = 0; @@ -297,19 +296,18 @@ int main(int argc, char *argv[]) { if (send) { // receive socket try { - zmqsocket2 = new sls::ZmqSocket(portnum2, socketip2.c_str()); + zmqsocket2 = new sls::ZmqSocket(portnum2); } catch (...) { cprintf(RED, - "Error: Could not create Zmq sending socket on port %d and " - "ip %s\n", - portnum2, socketip2.c_str()); + "Error: Could not create Zmq sending socket on port %d\n", + portnum2); // delete zmqsocket2; // zmqsocket2=NULL; // delete zmqsocket; // return EXIT_FAILURE; send = false; } - printf("Zmq sending socket at %s\n", + printf("Zmq sending socket at %s\n", zmqsocket2->GetZmqServerAddress().c_str()); } diff --git a/slsDetectorGui/forms/form_plot.ui b/slsDetectorGui/forms/form_plot.ui index cfc799d54..66d6e64a8 100644 --- a/slsDetectorGui/forms/form_plot.ui +++ b/slsDetectorGui/forms/form_plot.ui @@ -457,7 +457,7 @@ <html><head/><body><p>If sub images have missing packets</p></body></html> - Complete Image + Qt::AlignCenter @@ -523,6 +523,7 @@ + Cantarell 10 diff --git a/slsDetectorGui/forms/form_tab_advanced.ui b/slsDetectorGui/forms/form_tab_advanced.ui index 17fceaf8e..6659c9770 100755 --- a/slsDetectorGui/forms/form_tab_advanced.ui +++ b/slsDetectorGui/forms/form_tab_advanced.ui @@ -852,7 +852,7 @@ - <html><head/><body><p>Sets Listening ZMQ IP of client interface (packets streamed from receiver for gui)</p><p>#zmqip#</p><p><br/></p><p>Has to be same as rx_zmqip for gui</p></body></html> + <html><head/><body><p>Sets Listening ZMQ IP of client interface (packets streamed from receiver for gui)</p><p>#zmqip#</p><p><br/></p></body></html> Client ZMQ IP: @@ -886,7 +886,7 @@ - <html><head/><body><p>Sets Listening ZMQ IP of client interface (packets streamed from receiver for gui)</p><p>#zmqip#</p><p><br/></p><p>Has to be same as rx_zmqip for gui</p></body></html> + <html><head/><body><p>Sets Listening ZMQ IP of client interface (packets streamed from receiver for gui)</p><p>#zmqip#</p><p><br/></p></body></html> 0 @@ -948,28 +948,6 @@ - - - - - 0 - 0 - - - - - Cantarell - 10 - - - - <html><head/><body><p>Sets Publishing ZMQ IP of reciever (packets streamed from receiver for gui)</p><p>#rx_zmqip#</p><p>Has to be same as zmqip for gui</p></body></html> - - - Receiver ZMQ IP: - - - @@ -1121,40 +1099,6 @@ - - - - - 0 - 0 - - - - - 180 - 20 - - - - - 16777215 - 25 - - - - - Cantarell - 10 - - - - <html><head/><body><p>Sets Publishing ZMQ IP of reciever (packets streamed from receiver for gui)</p><p>#rx_zmqip#</p><p>Has to be same as zmqip for gui</p></body></html> - - - 0 - - - @@ -2312,7 +2256,6 @@ Exposure Time of a sub frame. Only for Eiger in 32 bit mode dispRxrUDPIP dispRxrUDPMAC spinRxrZMQPort - dispRxrZMQIP spinNumStoragecells spinSubExpTime comboSubExpTimeUnit diff --git a/slsDetectorGui/include/qDrawPlot.h b/slsDetectorGui/include/qDrawPlot.h index 3dd42244e..92f660b50 100644 --- a/slsDetectorGui/include/qDrawPlot.h +++ b/slsDetectorGui/include/qDrawPlot.h @@ -123,7 +123,7 @@ class qDrawPlot : public QWidget, private Ui::PlotObject { QString zTitle2d{"Intensity"}; QString plotTitle{""}; QString indexTitle{""}; - bool completeImage{false}; + bool completeImage{true}; bool xyRangeChanged{false}; double xyRange[4]{0, 0, 0, 0}; bool isXYRange[4]{false, false, false, false}; diff --git a/slsDetectorGui/include/qTabAdvanced.h b/slsDetectorGui/include/qTabAdvanced.h index 50379d605..13d3100f0 100644 --- a/slsDetectorGui/include/qTabAdvanced.h +++ b/slsDetectorGui/include/qTabAdvanced.h @@ -38,8 +38,6 @@ class qTabAdvanced : public QWidget, private Ui::TabAdvancedObject { void SetRxrUDPMAC(bool force = false); void ForceSetRxrUDPMAC(); void SetRxrZMQPort(int port); - void SetRxrZMQIP(bool force = false); - void ForceSetRxrZMQIP(); void GetROI(); void ClearROI(); void SetROI(); @@ -68,7 +66,6 @@ class qTabAdvanced : public QWidget, private Ui::TabAdvancedObject { void GetRxrUDPIP(); void GetRxrUDPMAC(); void GetRxrZMQPort(); - void GetRxrZMQIP(); void GetAllTrimbits(); void GetNumStoragecells(); void GetSubExposureTime(); diff --git a/slsDetectorGui/src/qDrawPlot.cpp b/slsDetectorGui/src/qDrawPlot.cpp index 8617c8206..804a26f49 100644 --- a/slsDetectorGui/src/qDrawPlot.cpp +++ b/slsDetectorGui/src/qDrawPlot.cpp @@ -107,7 +107,7 @@ void qDrawPlot::SetupPlots() { LOG(logINFO) << "nPixelsY:" << nPixelsY; widgetStatistics->hide(); - lblCompleteImage->hide(); + lblCompleteImage->show(); lblInCompleteImage->hide(); lblRxRoiEnabled->hide(); diff --git a/slsDetectorGui/src/qTabAdvanced.cpp b/slsDetectorGui/src/qTabAdvanced.cpp index ae3c2b39f..a00d518cc 100644 --- a/slsDetectorGui/src/qTabAdvanced.cpp +++ b/slsDetectorGui/src/qTabAdvanced.cpp @@ -113,9 +113,6 @@ void qTabAdvanced::Initialization() { SLOT(ForceSetRxrUDPMAC())); connect(spinRxrZMQPort, SIGNAL(valueChanged(int)), this, SLOT(SetRxrZMQPort(int))); - connect(dispRxrZMQIP, SIGNAL(editingFinished()), this, SLOT(SetRxrZMQIP())); - connect(dispRxrZMQIP, SIGNAL(returnPressed()), this, - SLOT(ForceSetRxrZMQIP())); // roi if (tab_roi->isEnabled()) { @@ -388,20 +385,6 @@ void qTabAdvanced::GetRxrZMQPort() { SLOT(SetRxrZMQPort(int))); } -void qTabAdvanced::GetRxrZMQIP() { - LOG(logDEBUG) << "Getting Receiver ZMQ IP"; - disconnect(dispRxrZMQIP, SIGNAL(editingFinished()), this, - SLOT(SetRxrZMQIP())); - - try { - auto retval = det->getRxZmqIP({comboDetector->currentIndex()})[0].str(); - dispRxrZMQIP->setText(QString(retval.c_str())); - } - CATCH_DISPLAY("Could not get receiver zmq ip.", "qTabAdvanced::GetRxrZMQIP") - - connect(dispRxrZMQIP, SIGNAL(editingFinished()), this, SLOT(SetRxrZMQIP())); -} - void qTabAdvanced::SetDetector() { LOG(logDEBUG) << "Set Detector: " << comboDetector->currentText().toLatin1().data(); @@ -418,7 +401,6 @@ void qTabAdvanced::SetDetector() { GetRxrUDPIP(); GetRxrUDPMAC(); GetRxrZMQPort(); - GetRxrZMQIP(); LOG(logDEBUG) << det->printRxConfiguration(); } @@ -588,23 +570,6 @@ void qTabAdvanced::SetRxrZMQPort(int port) { &qTabAdvanced::GetRxrZMQPort) } -void qTabAdvanced::SetRxrZMQIP(bool force) { - // return forces modification (inconsistency from command line) - if (dispRxrZMQIP->isModified() || force) { - dispRxrZMQIP->setModified(false); - std::string s = dispRxrZMQIP->text().toLatin1().constData(); - LOG(logINFO) << "Setting Receiver ZMQ IP:" << s; - try { - det->setRxZmqIP(IpAddr{s}, {comboDetector->currentIndex()}); - } - CATCH_HANDLE("Could not set Receiver ZMQ IP.", - "qTabAdvanced::SetRxrZMQIP", this, - &qTabAdvanced::GetRxrZMQIP) - } -} - -void qTabAdvanced::ForceSetRxrZMQIP() { SetRxrZMQIP(true); } - void qTabAdvanced::GetROI() { LOG(logDEBUG) << "Getting ROI"; try { diff --git a/slsDetectorServers/CMakeLists.txt b/slsDetectorServers/CMakeLists.txt index 2bb9386b0..703cd77f0 100644 --- a/slsDetectorServers/CMakeLists.txt +++ b/slsDetectorServers/CMakeLists.txt @@ -11,6 +11,7 @@ install(TARGETS slsProjectCSettings PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ) add_subdirectory(ctbDetectorServer) +add_subdirectory(xilinx_ctbDetectorServer) add_subdirectory(eigerDetectorServer) add_subdirectory(gotthardDetectorServer) add_subdirectory(jungfrauDetectorServer) diff --git a/slsDetectorServers/compileAllServers.sh b/slsDetectorServers/compileAllServers.sh index fe48f61fd..eec8907bf 100644 --- a/slsDetectorServers/compileAllServers.sh +++ b/slsDetectorServers/compileAllServers.sh @@ -8,7 +8,8 @@ det_list=("ctbDetectorServer gotthard2DetectorServer jungfrauDetectorServer mythen3DetectorServer - moenchDetectorServer" + moenchDetectorServer + xilinx_ctbDetectorServer" ) usage="\nUsage: compileAllServers.sh [server|all(opt)] [branch(opt)]. \n\tNo arguments mean all servers with 'developer' branch. \n\tNo 'branch' input means 'developer branch'" diff --git a/slsDetectorServers/compileAllServers_noAPIUpdate.sh b/slsDetectorServers/compileAllServers_noAPIUpdate.sh index 2d16347b1..ecfbdf6fb 100644 --- a/slsDetectorServers/compileAllServers_noAPIUpdate.sh +++ b/slsDetectorServers/compileAllServers_noAPIUpdate.sh @@ -9,6 +9,7 @@ det_list=("ctbDetectorServer" "jungfrauDetectorServer" "mythen3DetectorServer" "moenchDetectorServer" + "xilinx_ctbDetectorServer" ) usage="\nUsage: compileAllServers.sh [server|all(opt)] [branch(opt)]. \n\tNo arguments mean all servers with 'developer' branch. \n\tNo 'branch' input means 'developer branch'" diff --git a/slsDetectorServers/ctbDetectorServer/CMakeLists.txt b/slsDetectorServers/ctbDetectorServer/CMakeLists.txt index bacf25136..fd2cf796e 100644 --- a/slsDetectorServers/ctbDetectorServer/CMakeLists.txt +++ b/slsDetectorServers/ctbDetectorServer/CMakeLists.txt @@ -37,8 +37,7 @@ target_compile_definitions(ctbDetectorServer_virtual ) target_link_libraries(ctbDetectorServer_virtual - PUBLIC pthread rt slsProjectCSettings - m + PUBLIC pthread rt m slsProjectCSettings ) set_target_properties(ctbDetectorServer_virtual PROPERTIES diff --git a/slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv8.0.0 b/slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv8.0.0 deleted file mode 100755 index 87c08d8c7..000000000 Binary files a/slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv8.0.0 and /dev/null differ diff --git a/slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv9.0.0 b/slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv9.0.0 new file mode 100755 index 000000000..9bf6df495 Binary files /dev/null and b/slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv9.0.0 differ diff --git a/slsDetectorServers/ctbDetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/ctbDetectorServer/slsDetectorFunctionList.c index ca094263d..4cd42436e 100644 --- a/slsDetectorServers/ctbDetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/ctbDetectorServer/slsDetectorFunctionList.c @@ -51,12 +51,12 @@ int dataBytes = 0; int analogDataBytes = 0; int digitalDataBytes = 0; int transceiverDataBytes = 0; -char *analogData = 0; -char *digitalData = 0; -char *transceiverData = 0; -char volatile *analogDataPtr = 0; -char volatile *digitalDataPtr = 0; -char volatile *transceiverDataPtr = 0; +char *analogData = NULL; +char *digitalData = NULL; +char *transceiverData = NULL; +char volatile *analogDataPtr = NULL; +char volatile *digitalDataPtr = NULL; +char volatile *transceiverDataPtr = NULL; char udpPacketData[UDP_PACKET_DATA_BYTES + sizeof(sls_detector_header)]; uint32_t adcEnableMask_1g = BIT32_MSK; // 10g readout @@ -449,6 +449,7 @@ void initControlServer() { void initStopServer() { if (!updateFlag && initError == OK) { usleep(CTRL_SRVR_INIT_TIME_US); + LOG(logINFOBLUE, ("Configuring Stop server\n")); if (mapCSP0() == FAIL) { initError = FAIL; strcpy(initErrorMessage, @@ -458,7 +459,7 @@ void initStopServer() { return; } #ifdef VIRTUAL - sharedMemory_setStop(0); + setupDetector(); #endif } initCheckDone = 1; @@ -474,21 +475,15 @@ void setupDetector() { analogDataBytes = 0; digitalDataBytes = 0; transceiverDataBytes = 0; - if (analogData) { - free(analogData); - analogData = 0; - } - if (digitalData) { - free(digitalData); - digitalData = 0; - } - if (transceiverData) { - free(transceiverData); - transceiverData = 0; - } - analogDataPtr = 0; - digitalDataPtr = 0; - transceiverData = 0; + free(analogData); + analogData = NULL; + free(digitalData); + digitalData = NULL; + free(transceiverData); + transceiverData = NULL; + analogDataPtr = NULL; + digitalDataPtr = NULL; + transceiverData = NULL; { for (int i = 0; i < NUM_CLOCKS; ++i) { clkPhase[i] = 0; @@ -512,10 +507,16 @@ void setupDetector() { ndSamples = 1; ntSamples = 1; #ifdef VIRTUAL - sharedMemory_setStatus(IDLE); - initializePatternWord(); + if (isControlServer) { + sharedMemory_setStatus(IDLE); + initializePatternWord(); + } else { + sharedMemory_setStop(0); + } #endif - setupUDPCommParameters(); + if (isControlServer) { + setupUDPCommParameters(); + } // altera pll ALTERA_PLL_SetDefines(PLL_CNTRL_REG, PLL_PARAM_REG, @@ -633,22 +634,15 @@ int updateDatabytesandAllocateRAM() { return FAIL; } // clear RAM - if (analogData) { - free(analogData); - analogData = 0; - } - if (digitalData) { - free(digitalData); - digitalData = 0; - } - if (transceiverData) { - free(transceiverData); - transceiverData = 0; - } + free(analogData); + analogData = NULL; + free(digitalData); + digitalData = NULL; + free(transceiverData); + transceiverData = NULL; // allocate RAM if (analogDataBytes) { analogData = malloc(analogDataBytes); - // cannot malloc if (analogData == NULL) { LOG(logERROR, ("Can not allocate analog data RAM for even 1 frame. " "Probable cause: Memory Leak.\n")); @@ -658,7 +652,6 @@ int updateDatabytesandAllocateRAM() { } if (digitalDataBytes) { digitalData = malloc(digitalDataBytes); - // cannot malloc if (digitalData == NULL) { LOG(logERROR, ("Can not allocate digital data RAM for even 1 frame. " @@ -670,7 +663,6 @@ int updateDatabytesandAllocateRAM() { } if (transceiverDataBytes) { transceiverData = malloc(transceiverDataBytes); - // cannot malloc if (transceiverData == NULL) { LOG(logERROR, ("Can not allocate transceiver data RAM for even 1 frame. " @@ -2202,7 +2194,8 @@ int startStateMachine() { LOG(logERROR, ("Could not start Virtual acquisition thread\n")); sharedMemory_setStatus(IDLE); return FAIL; - } + } else + pthread_detach(pthread_virtual_tid); LOG(logINFOGREEN, ("Virtual Acquisition started\n")); return OK; #endif diff --git a/slsDetectorServers/ctbDetectorServer/slsDetectorServer_defs.h b/slsDetectorServers/ctbDetectorServer/slsDetectorServer_defs.h index d1b89c91f..683338861 100644 --- a/slsDetectorServers/ctbDetectorServer/slsDetectorServer_defs.h +++ b/slsDetectorServers/ctbDetectorServer/slsDetectorServer_defs.h @@ -55,7 +55,9 @@ #define DEFAULT_SYNC_CLK (40) // 20 #define DEFAULT_DBIT_CLK (200) #define DEFAULT_TRANSCEIVER_MASK (0x3) -#define MAX_TRANSCEIVER_MASK (0xF) + +#define MAX_TRANSCEIVER_MASK (0xF) +#define MAX_TRANSCEIVER_SAMPLES (0xFFFF) #define UDP_HEADER_MAX_FRAME_VALUE (0xFFFFFFFFFFFF) diff --git a/slsDetectorServers/eigerDetectorServer/Beb.c b/slsDetectorServers/eigerDetectorServer/Beb.c index 82d82f697..9299340b9 100644 --- a/slsDetectorServers/eigerDetectorServer/Beb.c +++ b/slsDetectorServers/eigerDetectorServer/Beb.c @@ -46,17 +46,27 @@ int Beb_deactivated_left_datastream = 1; int Beb_deactivated_right_datastream = 1; int Beb_deactivated_num_destinations = 1; -void Beb_Beb() { +int Beb_Beb() { Beb_send_ndata = 0; Beb_send_buffer_size = 1026; + Beb_send_data_raw = malloc((Beb_send_buffer_size + 1) * sizeof(unsigned int)); + if (Beb_send_data_raw == NULL) { + LOG(logERROR, ("Could not allocate memory for beb (send_data_raw)\n")); + return 0; + } Beb_send_data = &Beb_send_data_raw[1]; Beb_recv_ndata = 0; Beb_recv_buffer_size = 1026; + Beb_recv_data_raw = malloc((Beb_recv_buffer_size + 1) * sizeof(unsigned int)); + if (Beb_recv_data_raw == NULL) { + LOG(logERROR, ("Could not allocate memory for beb (recv_data_raw)\n")); + return 0; + } Beb_recv_data = &Beb_recv_data_raw[1]; udp_header = (struct udp_header_type){ @@ -83,6 +93,7 @@ void Beb_Beb() { Beb_ClearHeaderData(1); Beb_bit_mode = 4; + return 1; } void Beb_ClearHeaderData(int ten_gig) { diff --git a/slsDetectorServers/eigerDetectorServer/Beb.h b/slsDetectorServers/eigerDetectorServer/Beb.h index ab84584ea..6d046a093 100644 --- a/slsDetectorServers/eigerDetectorServer/Beb.h +++ b/slsDetectorServers/eigerDetectorServer/Beb.h @@ -6,7 +6,7 @@ #include "slsDetectorServer_defs.h" #include -void Beb_Beb(); +int Beb_Beb(); void Beb_ClearHeaderData(int ten_gig); int Beb_SetUpUDPHeader(unsigned int header_number, int ten_gig, uint64_t src_mac, uint32_t src_ip, uint16_t src_port, diff --git a/slsDetectorServers/eigerDetectorServer/FebControl.c b/slsDetectorServers/eigerDetectorServer/FebControl.c index 27acb91a0..f0b96d487 100644 --- a/slsDetectorServers/eigerDetectorServer/FebControl.c +++ b/slsDetectorServers/eigerDetectorServer/FebControl.c @@ -57,11 +57,19 @@ int Feb_Control_FebControl(int normal) { Feb_Control_externalEnableMode = 0; Feb_Control_subFrameMode = 0; Feb_Control_trimbit_size = 263680; + Feb_Control_last_downloaded_trimbits = malloc(Feb_Control_trimbit_size * sizeof(int)); + if (Feb_Control_last_downloaded_trimbits == NULL) { + LOG(logERROR, + ("Could not allocate memory for last downloaded trimbits\n")); + return 0; + } Feb_Control_normal = normal; - Feb_Interface_SetAddress(Feb_Control_rightAddress, Feb_Control_leftAddress); + if (!Feb_Interface_SetAddress(Feb_Control_rightAddress, + Feb_Control_leftAddress)) + return 0; if (Feb_Control_activated) { return Feb_Interface_SetByteOrder(); } @@ -395,11 +403,13 @@ int Feb_Control_ReceiveHighVoltage(unsigned int *value) { // normal if (Feb_Control_normal) { - - if (readADCFromFile(NORMAL_HIGHVOLTAGE_INPUTPORT, value) == FAIL) { + if (readParameterFromFile(NORMAL_HIGHVOLTAGE_INPUTPORT, "high voltage", + value) == FAIL) { LOG(logERROR, ("Could not get high voltage\n")); return 0; } + *value /= 10; + LOG(logINFO, ("High Voltage: %d\n", (*value))); } // 9m @@ -1249,7 +1259,8 @@ int Feb_Control_Disable16bitConversion(int disable) { regval &= ~bitmask; } - if (!Feb_Control_WriteRegister_BitMask(DAQ_REG_HRDWRE, regval, bitmask)) { + if (!Feb_Control_WriteRegister_BitMask(DAQ_REG_HRDWRE, regval, bitmask, + 1)) { LOG(logERROR, ("Could not %s 16 bit expansion (bit mode)\n", (disable ? "disable" : "enable"))); return 0; @@ -1635,7 +1646,7 @@ int Feb_Control_SetChipSignalsToTrimQuad(int enable) { regval &= ~(DAQ_REG_HRDWRE_PROGRAM_MSK | DAQ_REG_HRDWRE_M8_MSK); } - if (!Feb_Control_WriteRegister(righOffset, regval)) { + if (!Feb_Control_WriteRegister(righOffset, regval, 1)) { LOG(logERROR, ("Could not set chip signals to trim quad\n")); return 0; } @@ -1664,8 +1675,10 @@ int Feb_Control_GetReadNRows() { return regVal; } -int Feb_Control_WriteRegister(uint32_t offset, uint32_t data) { - return Feb_Control_WriteRegister_BitMask(offset, data, BIT32_MSK); +int Feb_Control_WriteRegister(uint32_t offset, uint32_t data, int validate) { + if (!Feb_Control_WriteRegister_BitMask(offset, data, BIT32_MSK, validate)) + return 0; + return 1; } int Feb_Control_ReadRegister(uint32_t offset, uint32_t *retval) { @@ -1673,7 +1686,7 @@ int Feb_Control_ReadRegister(uint32_t offset, uint32_t *retval) { } int Feb_Control_WriteRegister_BitMask(uint32_t offset, uint32_t data, - uint32_t bitmask) { + uint32_t bitmask, int validate) { uint32_t actualOffset = offset; char side[2][10] = {"right", "left"}; unsigned int addr[2] = {Feb_Control_rightAddress, Feb_Control_leftAddress}; @@ -1718,21 +1731,24 @@ int Feb_Control_WriteRegister_BitMask(uint32_t offset, uint32_t data, writeVal, side[iloop], actualOffset)); return 0; } - writeVal &= bitmask; - uint32_t readVal = 0; - if (!Feb_Interface_ReadRegister(addr[iloop], actualOffset, - &readVal)) { - return 0; - } - readVal &= bitmask; + if (validate) { - if (writeVal != readVal) { - LOG(logERROR, - ("Could not write %s addr 0x%x register. Wrote " - "0x%x, read 0x%x (mask:0x%x)\n", - side[iloop], actualOffset, writeVal, readVal, bitmask)); - return 0; + uint32_t readVal = 0; + if (!Feb_Interface_ReadRegister(addr[iloop], actualOffset, + &readVal)) { + return 0; + } + readVal &= bitmask; + writeVal &= bitmask; + if (writeVal != readVal) { + LOG(logERROR, + ("Could not write %s addr 0x%x register. Wrote " + "0x%x, read 0x%x (mask:0x%x)\n", + side[iloop], actualOffset, writeVal, readVal, + bitmask)); + return 0; + } } } } diff --git a/slsDetectorServers/eigerDetectorServer/FebControl.h b/slsDetectorServers/eigerDetectorServer/FebControl.h index e5ca463b1..63025554f 100644 --- a/slsDetectorServers/eigerDetectorServer/FebControl.h +++ b/slsDetectorServers/eigerDetectorServer/FebControl.h @@ -93,10 +93,10 @@ int Feb_Control_SetQuad(int val); int Feb_Control_SetChipSignalsToTrimQuad(int enable); int Feb_Control_SetReadNRows(int value); int Feb_Control_GetReadNRows(); -int Feb_Control_WriteRegister(uint32_t offset, uint32_t data); +int Feb_Control_WriteRegister(uint32_t offset, uint32_t data, int validate); int Feb_Control_ReadRegister(uint32_t offset, uint32_t *retval); int Feb_Control_WriteRegister_BitMask(uint32_t offset, uint32_t data, - uint32_t bitmask); + uint32_t bitmask, int validate); int Feb_Control_ReadRegister_BitMask(uint32_t offset, uint32_t *retval, uint32_t bitmask); // pulsing diff --git a/slsDetectorServers/eigerDetectorServer/FebInterface.c b/slsDetectorServers/eigerDetectorServer/FebInterface.c index c93aa6a44..6bd69afb1 100644 --- a/slsDetectorServers/eigerDetectorServer/FebInterface.c +++ b/slsDetectorServers/eigerDetectorServer/FebInterface.c @@ -22,34 +22,57 @@ unsigned int Feb_Interface_recv_buffer_size; unsigned int *Feb_Interface_recv_data_raw; unsigned int *Feb_Interface_recv_data; -void Feb_Interface_FebInterface() { +int Feb_Interface_FebInterface() { ll = &ll_local; Feb_Interface_nfebs = 0; Feb_Interface_feb_numb = 0; Feb_Interface_send_ndata = 0; Feb_Interface_send_buffer_size = 1026; + Feb_Interface_send_data_raw = malloc((Feb_Interface_send_buffer_size + 1) * sizeof(unsigned int)); + if (Feb_Interface_send_data_raw == NULL) { + LOG(logERROR, + ("Could not allocate memory for feb interface (send_data_raw)\n")); + return 0; + } Feb_Interface_send_data = &Feb_Interface_send_data_raw[1]; Feb_Interface_recv_ndata = 0; Feb_Interface_recv_buffer_size = 1026; + Feb_Interface_recv_data_raw = malloc((Feb_Interface_recv_buffer_size + 1) * sizeof(unsigned int)); + if (Feb_Interface_recv_data_raw == NULL) { + LOG(logERROR, + ("Could not allocate memory for feb interface (recv_data_raw)\n")); + + return 0; + } Feb_Interface_recv_data = &Feb_Interface_recv_data_raw[1]; Local_LocalLinkInterface( ll, XPAR_PLB_LL_FIFO_AURORA_DUAL_CTRL_FEB_RIGHT_BASEADDR); + + return 1; } -void Feb_Interface_SetAddress(unsigned int leftAddr, unsigned int rightAddr) { - if (Feb_Interface_feb_numb) - free(Feb_Interface_feb_numb); +int Feb_Interface_SetAddress(unsigned int leftAddr, unsigned int rightAddr) { + free(Feb_Interface_feb_numb); Feb_Interface_nfebs = 2; + Feb_Interface_feb_numb = malloc(2 * sizeof(unsigned int)); + if (Feb_Interface_feb_numb == NULL) { + LOG(logERROR, + ("Could not allocate memory for feb interface (feb_numb)\n")); + Feb_Interface_nfebs = 0; + return 0; + } + Feb_Interface_feb_numb[0] = leftAddr; Feb_Interface_feb_numb[1] = rightAddr; + return 1; } int Feb_Interface_WriteTo(unsigned int ch) { diff --git a/slsDetectorServers/eigerDetectorServer/FebInterface.h b/slsDetectorServers/eigerDetectorServer/FebInterface.h index afff53a87..d8220237a 100644 --- a/slsDetectorServers/eigerDetectorServer/FebInterface.h +++ b/slsDetectorServers/eigerDetectorServer/FebInterface.h @@ -4,8 +4,8 @@ int Feb_Interface_WriteTo(unsigned int ch); int Feb_Interface_ReadFrom(unsigned int ch, unsigned int ntrys); -void Feb_Interface_FebInterface(); -void Feb_Interface_SetAddress(unsigned int leftAddr, unsigned int rightAddr); +int Feb_Interface_FebInterface(); +int Feb_Interface_SetAddress(unsigned int leftAddr, unsigned int rightAddr); int Feb_Interface_SetByteOrder(); int Feb_Interface_ReadRegister(unsigned int sub_num, unsigned int reg_num, unsigned int *value_read); diff --git a/slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv8.0.0 b/slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv8.0.0 deleted file mode 100755 index ae65b3b0a..000000000 Binary files a/slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv8.0.0 and /dev/null differ diff --git a/slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv9.0.0 b/slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv9.0.0 new file mode 100755 index 000000000..e56580dbc Binary files /dev/null and b/slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv9.0.0 differ diff --git a/slsDetectorServers/eigerDetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/eigerDetectorServer/slsDetectorFunctionList.c index ad9b875f7..f2290afbe 100644 --- a/slsDetectorServers/eigerDetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/eigerDetectorServer/slsDetectorFunctionList.c @@ -379,63 +379,7 @@ void initControlServer() { return; } #ifndef VIRTUAL - sharedMemory_lockLocalLink(); - Feb_Interface_FebInterface(); - if (!Feb_Control_FebControl(normal)) { - initError = FAIL; - sprintf(initErrorMessage, - "Could not intitalize eiger detector sever: feb control\n"); - LOG(logERROR, (initErrorMessage)); - initCheckDone = 1; - sharedMemory_unlockLocalLink(); - return; - } - if (Feb_Control_SetMasterEffects(master, isControlServer) == FAIL) { - initError = FAIL; - sprintf(initErrorMessage, "Could not intitalize HV for eiger " - "detector server: feb control serial " - "communication\n"); - LOG(logERROR, (initErrorMessage)); - initCheckDone = 1; - sharedMemory_unlockLocalLink(); - return; - } - sharedMemory_unlockLocalLink(); - LOG(logDEBUG1, ("Control server: FEB Initialization done\n")); - Beb_SetTopVariable(top); - Beb_Beb(); - LOG(logDEBUG1, ("Control server: BEB Initialization done\n")); - - // Getting the feb versions after initialization - char hversion[MAX_STR_LENGTH] = {0}; - memset(hversion, 0, MAX_STR_LENGTH); - getHardwareVersion(hversion); - int64_t fwversion = getFirmwareVersion(); - int64_t feblfwversion = getFrontEndFirmwareVersion(FRONT_LEFT); - int64_t febrfwversion = getFrontEndFirmwareVersion(FRONT_RIGHT); - LOG(logINFOBLUE, - ("\n********************************************************\n" - "Feb Versions\n" - "Hardware Version : %s\n" - "Firmware (Febl) Version : %lld\n" - "Firmware (Febr) Version : %lld\n" - "********************************************************\n", - hversion, (long long int)feblfwversion, - (long long int)febrfwversion)); - - // ensure febl, febr and beb fw versions are the same - if (fwversion != feblfwversion || fwversion != febrfwversion) { - sprintf( - initErrorMessage, - "Inconsistent firmware versions in feb and beb. [Beb: %lld, " - "Febl: %lld Febr: %lld]\n", - (long long int)fwversion, (long long int)feblfwversion, - (long long int)febrfwversion); - LOG(logERROR, (initErrorMessage)); - initError = FAIL; - return; - } - + setupFebBeb(); #endif // also reads config file and deactivates setupDetector(); @@ -449,56 +393,22 @@ void initStopServer() { // command line) usleep(WAIT_STOP_SERVER_START); LOG(logINFOBLUE, ("Configuring Stop server\n")); + // ismaster from variable in stop server if (updateModuleConfiguration() == FAIL) { initCheckDone = 1; return; } #ifdef VIRTUAL - sharedMemory_setStop(0); - // force top or master if in config file - if (readConfigFile() == FAIL) { - initCheckDone = 1; - return; - } - // force top or master if in command line - if (checkCommandLineConfiguration() == FAIL) { - initCheckDone = 1; - return; - } + setupDetector(); #else - // control server read config file and already set up master/top - sharedMemory_lockLocalLink(); - Feb_Interface_FebInterface(); - if (!Feb_Control_FebControl(normal)) { - initError = FAIL; - sprintf(initErrorMessage, "Could not intitalize feb control\n"); - LOG(logERROR, (initErrorMessage)); - initCheckDone = 1; - sharedMemory_unlockLocalLink(); - return; - } - if (Feb_Control_SetMasterEffects(master, isControlServer) == FAIL) { - initError = FAIL; - sprintf(initErrorMessage, "Could not intitalize HV for eiger " - "detector server: feb control serial " - "communication\n"); - LOG(logERROR, (initErrorMessage)); - initCheckDone = 1; - sharedMemory_unlockLocalLink(); - return; - } - sharedMemory_unlockLocalLink(); - LOG(logDEBUG1, ("Stop server: FEB Initialization done\n")); - Beb_SetTopVariable(top); - Beb_Beb(); - LOG(logDEBUG1, ("Control server: BEB Initialization done\n")); -#endif + setupFebBeb(); // client first connect (from shm) will activate if (setActivate(0) == FAIL) { initError = FAIL; strcpy(initErrorMessage, "Could not deactivate\n"); LOG(logERROR, (initErrorMessage)); } +#endif } initCheckDone = 1; } @@ -749,17 +659,103 @@ int checkCommandLineConfiguration() { /* set up detector */ -void allocateDetectorStructureMemory() { - LOG(logINFO, ("This Server is for 1 Eiger half module (250k)\n\n")); +#ifndef VIRTUAL +void setupFebBeb() { + sharedMemory_lockLocalLink(); + if (!Feb_Interface_FebInterface()) { + initError = FAIL; + sprintf(initErrorMessage, + "Could not intitalize eiger detector sever: feb interface\n"); + LOG(logERROR, (initErrorMessage)); + initCheckDone = 1; + sharedMemory_unlockLocalLink(); + return; + } + if (!Feb_Control_FebControl(normal)) { + initError = FAIL; + sprintf(initErrorMessage, + "Could not intitalize eiger detector sever: feb control\n"); + LOG(logERROR, (initErrorMessage)); + initCheckDone = 1; + sharedMemory_unlockLocalLink(); + return; + } + if (Feb_Control_SetMasterEffects(master, isControlServer) == FAIL) { + initError = FAIL; + sprintf(initErrorMessage, "Could not intitalize HV for eiger " + "detector server: feb control serial " + "communication\n"); + LOG(logERROR, (initErrorMessage)); + initCheckDone = 1; + sharedMemory_unlockLocalLink(); + return; + } + sharedMemory_unlockLocalLink(); + LOG(logDEBUG1, ("%s server: FEB Initialization done\n", + isControlServer ? "Control" : "Stop")); + Beb_SetTopVariable(top); + if (!Beb_Beb()) { + initError = FAIL; + sprintf(initErrorMessage, + "Could not intitalize eiger detector sever: beb\n"); + LOG(logERROR, (initErrorMessage)); + initCheckDone = 1; + return; + } + LOG(logDEBUG1, ("%s server: BEB Initialization done\n", + isControlServer ? "Control" : "Stop")); - // Allocation of memory + if (isControlServer) { + // Getting the feb versions after initialization + char hversion[MAX_STR_LENGTH] = {0}; + memset(hversion, 0, MAX_STR_LENGTH); + getHardwareVersion(hversion); + int64_t fwversion = getFirmwareVersion(); + int64_t feblfwversion = getFrontEndFirmwareVersion(FRONT_LEFT); + int64_t febrfwversion = getFrontEndFirmwareVersion(FRONT_RIGHT); + LOG(logINFOBLUE, + ("\n********************************************************\n" + "Feb Versions\n" + "Hardware Version : %s\n" + "Firmware (Febl) Version : %lld\n" + "Firmware (Febr) Version : %lld\n" + "********************************************************\n", + hversion, (long long int)feblfwversion, + (long long int)febrfwversion)); + + // ensure febl, febr and beb fw versions are the same + if (fwversion != feblfwversion || fwversion != febrfwversion) { + sprintf( + initErrorMessage, + "Inconsistent firmware versions in feb and beb. [Beb: %lld, " + "Febl: %lld Febr: %lld]\n", + (long long int)fwversion, (long long int)feblfwversion, + (long long int)febrfwversion); + LOG(logERROR, (initErrorMessage)); + initError = FAIL; + return; + } + } +} +#endif + +int allocateDetectorStructureMemory() { detectorModules = malloc(sizeof(sls_detector_module)); detectorChans = malloc(NCHIP * NCHAN * sizeof(int)); detectorDacs = malloc(NDAC * sizeof(int)); + if (detectorModules == NULL || detectorChans == NULL || + detectorDacs == NULL) { + initError = FAIL; + strcpy(initErrorMessage, + "Could not allocate memory for dacs or channels in detector\n"); + LOG(logERROR, (initErrorMessage)); + return FAIL; + } LOG(logDEBUG1, ("modules from 0x%x to 0x%x\n", detectorModules, detectorModules)); LOG(logDEBUG1, ("chans from 0x%x to 0x%x\n", detectorChans, detectorChans)); LOG(logDEBUG1, ("dacs from 0x%x to 0x%x\n", detectorDacs, detectorDacs)); + detectorModules->dacs = detectorDacs; detectorModules->chanregs = detectorChans; detectorModules->ndac = NDAC; @@ -773,14 +769,21 @@ void allocateDetectorStructureMemory() { detectorModules->eV[2] = -1; thisSettings = UNINITIALIZED; - // if trimval requested, should return -1 to acknowledge unknown + // initialize (trimbits at -1 for unknown) + for (int idac = 0; idac < (detectorModules)->ndac; ++idac) { + detectorDacs[idac] = 0; + } for (int ichan = 0; ichan < (detectorModules->nchan); ichan++) { *((detectorModules->chanregs) + ichan) = -1; } + return OK; } void setupDetector() { - allocateDetectorStructureMemory(); + LOG(logINFO, ("This Server is for 1 Eiger half module (250k)\n\n")); + + if (allocateDetectorStructureMemory() == FAIL) + return; // force top or master if in config file if (readConfigFile() == FAIL) @@ -799,8 +802,12 @@ void setupDetector() { LOG(logINFOBLUE, ("Setting Default Parameters\n")); resetToDefaultDacs(0); #ifdef VIRTUAL - sharedMemory_setStatus(IDLE); - setupUDPCommParameters(); + if (isControlServer) { + sharedMemory_setStatus(IDLE); + setupUDPCommParameters(); + } else { + sharedMemory_setStop(0); + } #endif // setting default measurement parameters @@ -904,12 +911,12 @@ int setDefaultDac(enum DACINDEX index, enum detectorSettings sett, int value) { } /* advanced read/write reg */ -int writeRegister(uint32_t offset, uint32_t data) { +int writeRegister(uint32_t offset, uint32_t data, int validate) { #ifdef VIRTUAL return OK; #else sharedMemory_lockLocalLink(); - if (!Feb_Control_WriteRegister(offset, data)) { + if (!Feb_Control_WriteRegister(offset, data, validate)) { sharedMemory_unlockLocalLink(); return FAIL; } @@ -932,7 +939,7 @@ int readRegister(uint32_t offset, uint32_t *retval) { #endif } -int setBit(const uint32_t addr, const int nBit) { +int setBit(const uint32_t addr, const int nBit, int validate) { #ifndef VIRTUAL uint32_t regval = 0; if (readRegister(addr, ®val) == FAIL) { @@ -942,7 +949,7 @@ int setBit(const uint32_t addr, const int nBit) { uint32_t val = regval | bitmask; sharedMemory_lockLocalLink(); - if (!Feb_Control_WriteRegister_BitMask(addr, val, bitmask)) { + if (!Feb_Control_WriteRegister_BitMask(addr, val, bitmask, validate)) { sharedMemory_unlockLocalLink(); return FAIL; } @@ -951,7 +958,7 @@ int setBit(const uint32_t addr, const int nBit) { return OK; } -int clearBit(const uint32_t addr, const int nBit) { +int clearBit(const uint32_t addr, const int nBit, int validate) { #ifndef VIRTUAL uint32_t regval = 0; if (readRegister(addr, ®val) == FAIL) { @@ -961,7 +968,7 @@ int clearBit(const uint32_t addr, const int nBit) { uint32_t val = regval & ~bitmask; sharedMemory_lockLocalLink(); - if (!Feb_Control_WriteRegister_BitMask(addr, val, bitmask)) { + if (!Feb_Control_WriteRegister_BitMask(addr, val, bitmask, validate)) { sharedMemory_unlockLocalLink(); return FAIL; } @@ -2593,7 +2600,8 @@ int startStateMachine() { sharedMemory_setStatus(IDLE); sharedMemory_unlockAcqFlag(); return FAIL; - } + } else + pthread_detach(virtual_tid); LOG(logINFO, ("Virtual Acquisition started\n")); sharedMemory_unlockAcqFlag(); return OK; diff --git a/slsDetectorServers/gotthard2DetectorServer/RegisterDefs.h b/slsDetectorServers/gotthard2DetectorServer/RegisterDefs.h index 097238426..362822fd8 100644 --- a/slsDetectorServers/gotthard2DetectorServer/RegisterDefs.h +++ b/slsDetectorServers/gotthard2DetectorServer/RegisterDefs.h @@ -135,11 +135,20 @@ #define DTA_OFFSET_REG (0x0A * REG_OFFSET + BASE_CONTROL) +/** Module ID Register */ #define MOD_ID_REG (0x0B * REG_OFFSET + BASE_CONTROL) #define MOD_ID_OFST (0) #define MOD_ID_MSK (0x0000FFFF << MOD_ID_OFST) +/** Set Next Frame Number Register */ +#define FRAME_NUMBER_LSB_REG (0x0C * REG_OFFSET + BASE_CONTROL) +#define FRAME_NUMBER_MSB_REG (0x0D * REG_OFFSET + BASE_CONTROL) + +/** Get Next Frame Number Register */ +#define GET_FRAME_NUMBER_LSB_REG (0x0E * REG_OFFSET + BASE_CONTROL) +#define GET_FRAME_NUMBER_MSB_REG (0x0F * REG_OFFSET + BASE_CONTROL) + /* ASIC registers --------------------------------------------------*/ /* ASIC Config register */ diff --git a/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv8.0.0 b/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv8.0.0 deleted file mode 100755 index c1c4c1166..000000000 Binary files a/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv8.0.0 and /dev/null differ diff --git a/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv9.0.0 b/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv9.0.0 new file mode 100755 index 000000000..463346925 Binary files /dev/null and b/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv9.0.0 differ diff --git a/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c index e7401f474..199e26fab 100644 --- a/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c @@ -45,7 +45,6 @@ char initErrorMessage[MAX_STR_LENGTH]; #ifdef VIRTUAL pthread_t pthread_virtual_tid; -int64_t virtual_currentFrameNumber = 2; int virtual_moduleid = 0; #endif @@ -53,8 +52,8 @@ enum detectorSettings thisSettings = UNINITIALIZED; int32_t clkPhase[NUM_CLOCKS] = {}; uint32_t clkDivider[NUM_CLOCKS] = {}; double systemFrequency = 0; -int highvoltage = 0; int dacValues[NDAC] = {}; +int startupPowerChipConfigDone = 0; int onChipdacValues[ONCHIP_NDAC][NCHIP] = {}; int defaultDacValues[NDAC] = {}; int hardCodedDefaultDacValues[NDAC] = {}; @@ -74,6 +73,7 @@ int64_t burstPeriodReg = 0; int filterResistor = 0; int cdsGain = 0; int detPos[2] = {}; +int chipConfigured = 0; int isInitCheckDone() { return initCheckDone; } @@ -402,13 +402,7 @@ void initStopServer() { return; } #ifdef VIRTUAL - sharedMemory_setStop(0); - setMaster(OW_MASTER); - if (readConfigFile() == FAIL || - checkCommandLineConfiguration() == FAIL) { - initCheckDone = 1; - return; - } + setupDetector(); #endif } initCheckDone = 1; @@ -428,9 +422,9 @@ void setupDetector() { systemFrequency = INT_SYSTEM_C0_FREQUENCY; detPos[0] = 0; detPos[1] = 0; + chipConfigured = 0; thisSettings = UNINITIALIZED; - highvoltage = 0; injectedChannelsOffset = 0; injectedChannelsIncrement = 0; burstMode = BURST_INTERNAL; @@ -442,6 +436,7 @@ void setupDetector() { burstPeriodReg = 0; filterResistor = 0; cdsGain = 0; + startupPowerChipConfigDone = 0; memset(clkPhase, 0, sizeof(clkPhase)); memset(dacValues, 0, sizeof(dacValues)); for (int i = 0; i < NDAC; ++i) { @@ -458,8 +453,14 @@ void setupDetector() { memset(vetoGainIndices, 0, sizeof(vetoGainIndices)); memset(adcConfiguration, 0, sizeof(adcConfiguration)); #ifdef VIRTUAL - sharedMemory_setStatus(IDLE); - setupUDPCommParameters(); + if (isControlServer) { + sharedMemory_setStatus(IDLE); + setupUDPCommParameters(); + } else { + sharedMemory_setStop(0); + } + // ismaster from reg in stop server, so set it in virtual mode + setMaster(OW_MASTER); #endif // pll defines ALTERA_PLL_C10_SetDefines(REG_OFFSET, BASE_READOUT_PLL, BASE_SYSTEM_PLL, @@ -471,13 +472,19 @@ void setupDetector() { // hv DAC6571_SetDefines(HV_HARD_MAX_VOLTAGE, HV_DRIVER_FILE_NAME); // dacs - LTC2620_D_SetDefines(DAC_MAX_MV, DAC_DRIVER_FILE_NAME, NDAC); + LTC2620_D_SetDefines(DAC_MIN_MV, DAC_MAX_MV, DAC_DRIVER_FILE_NAME, NDAC, 0, + ""); // on chip dacs ASIC_Driver_SetDefines(ONCHIP_DAC_DRIVER_FILE_NAME); setTimingSource(DEFAULT_TIMING_SOURCE); // Default values - setHighVoltage(DEFAULT_HIGH_VOLTAGE); + initError = setHighVoltage(DEFAULT_HIGH_VOLTAGE); + if (initError == FAIL) { + sprintf(initErrorMessage, "Could not set high voltage to %d\n", + DEFAULT_HIGH_VOLTAGE); + return; + } // check module type attached if not in debug mode if (initError == FAIL) @@ -492,7 +499,9 @@ void setupDetector() { } // power on chip - powerChip(1); + initError = powerChip(1, initErrorMessage); + if (initError == FAIL) + return; setASICDefaults(); @@ -518,6 +527,7 @@ void setupDetector() { setSettings(DEFAULT_SETTINGS); // Initialization of acquistion parameters + setNextFrameNumber(DEFAULT_FRAME_NUMBER); setNumFrames(DEFAULT_NUM_FRAMES); setNumTriggers(DEFAULT_NUM_CYCLES); setNumBursts(DEFAULT_NUM_BURSTS); @@ -974,6 +984,11 @@ int readConfigFile() { // inform FPGA that onchip dacs will be configured soon LOG(logINFO, ("Setting configuration done bit\n")); bus_w(ASIC_CONFIG_REG, bus_r(ASIC_CONFIG_REG) | ASIC_CONFIG_DONE_MSK); + + // to inform powerchip config parameters are set + startupPowerChipConfigDone = 1; + chipConfigured = 1; + LOG(logINFOBLUE, ("Chip configured\n")); } return initError; } @@ -1055,6 +1070,29 @@ int getDynamicRange(int *retval) { } /* parameters - timer */ + +int setNextFrameNumber(uint64_t value) { + LOG(logINFO, ("Setting next frame number: %lu\n", value)); +#ifdef VIRTUAL + setU64BitReg(value, FRAME_NUMBER_LSB_REG, FRAME_NUMBER_MSB_REG); +#else + // decrement by 1 for firmware + setU64BitReg(value - 1, FRAME_NUMBER_LSB_REG, FRAME_NUMBER_MSB_REG); +#endif + return OK; +} + +int getNextFrameNumber(uint64_t *value) { +#ifdef VIRTUAL + *value = getU64BitReg(FRAME_NUMBER_LSB_REG, FRAME_NUMBER_MSB_REG); +#else + // increment is for firmware + *value = + (getU64BitReg(GET_FRAME_NUMBER_LSB_REG, GET_FRAME_NUMBER_MSB_REG) + 1); +#endif + return OK; +} + void setNumFrames(int64_t val) { if (val > 0) { numFramesReg = val; @@ -1316,7 +1354,7 @@ int64_t getNumFramesLeft() { if ((burstMode == CONTINUOUS_INTERNAL || burstMode == CONTINUOUS_EXTERNAL) && getTiming() == AUTO_TIMING) { - return get64BitReg(GET_FRAMES_LSB_REG, GET_FRAMES_MSB_REG); + return (get64BitReg(GET_FRAMES_LSB_REG, GET_FRAMES_MSB_REG) + 1); } return -1; } @@ -1324,7 +1362,7 @@ int64_t getNumFramesLeft() { int64_t getNumTriggersLeft() { // trigger if (getTiming() == TRIGGER_EXPOSURE) { - return get64BitReg(GET_CYCLES_LSB_REG, GET_CYCLES_MSB_REG); + return (get64BitReg(GET_CYCLES_LSB_REG, GET_CYCLES_MSB_REG) + 1); } return -1; } @@ -1343,7 +1381,7 @@ int64_t getNumBurstsLeft() { // burst and auto if ((burstMode == BURST_INTERNAL || burstMode == BURST_EXTERNAL) && getTiming() == AUTO_TIMING) { - return get64BitReg(GET_FRAMES_LSB_REG, GET_FRAMES_MSB_REG); + return (get64BitReg(GET_FRAMES_LSB_REG, GET_FRAMES_MSB_REG) + 1); } return -1; } @@ -1528,27 +1566,53 @@ int getMaxDacSteps() { return LTC2620_D_GetMaxNumSteps(); } int getADC(enum ADCINDEX ind, int *value) { LOG(logDEBUG1, ("Reading FPGA temperature...\n")); - if (readADCFromFile(TEMPERATURE_FILE_NAME, value) == FAIL) { + if (readParameterFromFile(TEMPERATURE_FILE_NAME, "temperature", value) == + FAIL) { LOG(logERROR, ("Could not get temperature\n")); return FAIL; } + LOG(logINFO, ("Temperature: %.2f °C\n", (double)(*value) / 1000.00)); return OK; } int setHighVoltage(int val) { if (val > HV_SOFT_MAX_VOLTAGE) { - val = HV_SOFT_MAX_VOLTAGE; + LOG(logERROR, ("Invalid high voltage: %d V\n", val)); + return FAIL; } - // setting hv - if (val >= 0) { - LOG(logINFO, ("Setting High voltage: %d V\n", val)); - if (DAC6571_Set(val) == OK) - highvoltage = val; + LOG(logINFO, ("Setting High voltage: %d V\n", val)); + int waitTime = WAIT_HIGH_VOLTAGE_SETTLE_TIME_S; + + // get current high voltage + int prevHighVoltage = 0; + // at startup (initCheck not done: to not wait 10s assuming hv = 0 + // otherwise as below, always check current hv to wait 10s if powering off + if (initCheckDone) { + if (getHighVoltage(&prevHighVoltage) == FAIL) { + LOG(logERROR, ("Could not get current high voltage to determine if " + "%d s wait is required\n", + waitTime)); + return FAIL; + } } - return highvoltage; + + int ret = DAC6571_Set(val); + + // only when powering off (from non zero value), wait 10s + if (ret == OK) { + if (prevHighVoltage > 0 && val == 0) { + LOG(logINFO, + ("\tSwitching off high voltage requires %d s...\n", waitTime)); + sleep(waitTime); + LOG(logINFO, ("\tAssuming high voltage switched off\n")); + } + } + return ret; } +int getHighVoltage(int *retval) { return DAC6571_Get(retval); } + /* parameters - timing */ int setMaster(enum MASTERINDEX m) { @@ -2120,7 +2184,6 @@ int *getDetectorPosition() { return detPos; } int checkDetectorType(char *mess) { #ifdef VIRTUAL - setMaster(OW_MASTER); return OK; #endif LOG(logINFO, ("Checking module type\n")); @@ -2213,20 +2276,106 @@ int checkDetectorType(char *mess) { return OK; } -int powerChip(int on) { - if (on != -1) { - if (on) { - LOG(logINFO, ("Powering chip: on\n")); - bus_w(CONTROL_REG, bus_r(CONTROL_REG) | CONTROL_PWR_CHIP_MSK); - } else { - LOG(logINFO, ("Powering chip: off\n")); - bus_w(CONTROL_REG, bus_r(CONTROL_REG) & ~CONTROL_PWR_CHIP_MSK); +int powerChip(int on, char *mess) { + if (on) { + LOG(logINFO, ("Powering chip: on\n")); + bus_w(CONTROL_REG, bus_r(CONTROL_REG) | CONTROL_PWR_CHIP_MSK); + if (configureChip(mess) == FAIL) + return FAIL; + } else { + // throw if high voltage on + int highVoltage = 0; + if (getHighVoltage(&highVoltage) == FAIL) { + sprintf(mess, "Could not get high voltage status to do a safety " + "check first\n"); + LOG(logERROR, (mess)); + return FAIL; } + if (highVoltage > 0) { + sprintf(mess, "High voltage is on. Turn off high voltage first\n"); + LOG(logERROR, (mess)); + return FAIL; + } + LOG(logINFO, ("Powering chip: off\n")); + bus_w(CONTROL_REG, bus_r(CONTROL_REG) & ~CONTROL_PWR_CHIP_MSK); + chipConfigured = 0; } + return OK; +} + +int getPowerChip() { return ((bus_r(CONTROL_REG) & CONTROL_PWR_CHIP_MSK) >> CONTROL_PWR_CHIP_OFST); } +int isChipConfigured() { return chipConfigured; } + +int configureChip(char *mess) { + + if (!startupPowerChipConfigDone) { + LOG(logINFOBLUE, + ("Startup: Chip to be configured when reading config file\n")); + return OK; + } + LOG(logINFOBLUE, ("\tConfiguring chip\n")); + + // on chip dacs + for (int idac = 0; idac != ONCHIP_NDAC; ++idac) { + // ignore unused dacs + if (idac == (int)G2_VCHIP_UNUSED) + continue; + for (int ichip = 0; ichip != NCHIP; ++ichip) { + if (onChipdacValues[idac][ichip] == -1) { + sprintf(mess, "On chip DAC [%d] value not set for chip %d\n", + idac, ichip); + LOG(logERROR, (mess)); + return FAIL; + } + if (setOnChipDAC(idac, ichip, onChipdacValues[idac][ichip]) == + FAIL) { + sprintf(mess, "Could not set on chip DAC for chip %d\n", ichip); + LOG(logERROR, (mess)); + return FAIL; + } + } + } + + // adc configuration + for (int ichip = 0; ichip != NCHIP; ++ichip) { + for (int iadc = 0; iadc != NADC; ++iadc) { + if (setADCConfiguration(ichip, iadc, + adcConfiguration[ichip][iadc]) == FAIL) { + sprintf(mess, "Could not set ADC configuration for chip %d\n", + ichip); + LOG(logERROR, (mess)); + return FAIL; + } + } + } + + // veto reference + for (int ichip = 0; ichip != NCHIP; ++ichip) { + if (configureASICVetoReference(ichip, vetoGainIndices[ichip], + vetoReference[ichip]) == FAIL) { + sprintf(mess, "Could not configure veto reference for chip %d\n", + ichip); + LOG(logERROR, (mess)); + return FAIL; + } + } + + // asic global settings (burst mode, cds gain, filter resistor) + if (configureASICGlobalSettings() == FAIL) { + sprintf(mess, "Could not configure asic global settings\n"); + LOG(logERROR, (mess)); + return FAIL; + } + + LOG(logINFOBLUE, ("\tChip configured\n")); + chipConfigured = 1; + return OK; +} + void setDBITPipeline(int val) { if (val < 0) { return; @@ -3177,11 +3326,12 @@ int *getBadChannels(int *numChannels) { if (*numChannels > 0) { // get list of bad channels retvals = malloc(*numChannels * sizeof(int)); - memset(retvals, 0, *numChannels * sizeof(int)); if (retvals == NULL) { + LOG(logERROR, ("Could not allocate memory to get bad channels\n")); *numChannels = -1; return NULL; } + memset(retvals, 0, *numChannels * sizeof(int)); int chIndex = 0; int numAddr = MASK_STRIP_NUM_REGS; // loop through registers @@ -3231,7 +3381,8 @@ int startStateMachine() { LOG(logERROR, ("Could not start Virtual acquisition thread\n")); sharedMemory_setStatus(IDLE); return FAIL; - } + } else + pthread_detach(pthread_virtual_tid); LOG(logINFOGREEN, ("Virtual Acquisition started\n")); return OK; #endif @@ -3300,7 +3451,7 @@ void *start_timer(void *arg) { *((uint16_t *)(imageData + i * sizeof(uint16_t))) = (uint16_t)channelVal; - // LOG(logINFORED, ("[%d]:0x%08x\n", i, channelVal)); + LOG(logDEBUG, ("[%d]:0x%08x\n", i, channelVal)); } char vetoData[vetodatasize]; memset(vetoData, 0, sizeof(vetodatasize)); @@ -3308,109 +3459,121 @@ void *start_timer(void *arg) { *((uint16_t *)(vetoData + i)) = i; } - int iRxEntry = firstDest; - // loop over number of repeats - for (int repeatNr = 0; repeatNr != numRepeats; ++repeatNr) { + { + uint64_t frameNr = 0; + getNextFrameNumber(&frameNr); - struct timespec rbegin, rend; - clock_gettime(CLOCK_REALTIME, &rbegin); + int iRxEntry = firstDest; + // loop over number of repeats + for (int repeatNr = 0; repeatNr != numRepeats; ++repeatNr) { - // loop over number of frames - for (int frameNr = 0; frameNr != numFrames; ++frameNr) { + struct timespec rbegin, rend; + clock_gettime(CLOCK_REALTIME, &rbegin); - // check if manual stop - if (sharedMemory_getStop() == 1) { - break; - } + // loop over number of frames + for (int iframes = 0; iframes != numFrames; ++iframes) { - // change gain and data for every frame - { - const int nchannels = NCHIP * NCHAN; - int gainVal = 0; - for (int i = 0; i < nchannels; ++i) { - if ((i % nchannels) < 400) { - gainVal = 1 + frameNr; - } else if ((i % nchannels) < 800) { - gainVal = 2 + frameNr; - } else { - gainVal = 3 + frameNr; + // check if manual stop + if (sharedMemory_getStop() == 1) { + setNextFrameNumber(frameNr + (repeatNr * numFrames) + + iframes); + break; + } + + // change gain and data for every frame + { + const int nchannels = NCHIP * NCHAN; + int gainVal = 0; + for (int i = 0; i < nchannels; ++i) { + if ((i % nchannels) < 400) { + gainVal = 1 + iframes; + } else if ((i % nchannels) < 800) { + gainVal = 2 + iframes; + } else { + gainVal = 3 + iframes; + } + int dataVal = + *((uint16_t *)(imageData + i * sizeof(uint16_t))); + dataVal += iframes; + int channelVal = (dataVal & ~GAIN_VAL_MSK) | + (gainVal << GAIN_VAL_OFST); + *((uint16_t *)(imageData + i * sizeof(uint16_t))) = + (uint16_t)channelVal; } - int dataVal = - *((uint16_t *)(imageData + i * sizeof(uint16_t))); - dataVal += frameNr; - int channelVal = - (dataVal & ~GAIN_VAL_MSK) | (gainVal << GAIN_VAL_OFST); - *((uint16_t *)(imageData + i * sizeof(uint16_t))) = - (uint16_t)channelVal; } - } - // sleep for exposure time - struct timespec begin, end; - clock_gettime(CLOCK_REALTIME, &begin); - usleep(expUs); + // sleep for exposure time + struct timespec begin, end; + clock_gettime(CLOCK_REALTIME, &begin); + usleep(expUs); - // first interface - char packetData[packetsize]; - memset(packetData, 0, packetsize); - // set header - sls_detector_header *header = (sls_detector_header *)(packetData); - header->detType = (uint16_t)myDetectorType; - header->version = SLS_DETECTOR_HEADER_VERSION; - header->frameNumber = virtual_currentFrameNumber; - header->packetNumber = 0; - header->modId = virtual_moduleid; - header->row = detPos[Y]; - header->column = detPos[X]; - // fill data - memcpy(packetData + sizeof(sls_detector_header), imageData, - datasize); - // send 1 packet = 1 frame - sendUDPPacket(iRxEntry, 0, packetData, packetsize); - - // second interface (veto) - char packetData2[vetopacketsize]; - memset(packetData2, 0, vetopacketsize); - if (i10gbe) { + // first interface + char packetData[packetsize]; + memset(packetData, 0, packetsize); // set header - veto_header *header = (veto_header *)(packetData2); - header->frameNumber = virtual_currentFrameNumber; - header->bunchId = 0; + sls_detector_header *header = + (sls_detector_header *)(packetData); + header->detType = (uint16_t)myDetectorType; + header->version = SLS_DETECTOR_HEADER_VERSION; + header->frameNumber = + frameNr + (repeatNr * numFrames) + iframes; + header->packetNumber = 0; + header->modId = virtual_moduleid; + header->row = detPos[Y]; + header->column = detPos[X]; // fill data - memcpy(packetData2 + sizeof(veto_header), vetoData, - vetodatasize); + memcpy(packetData + sizeof(sls_detector_header), imageData, + datasize); // send 1 packet = 1 frame - sendUDPPacket(iRxEntry, 1, packetData2, vetopacketsize); - } - LOG(logINFO, - ("Sent frame %s: %d (bursts/ triggers: %d) [%lld] to E%d\n", - (i10gbe ? "(+veto)" : ""), frameNr, repeatNr, - (long long unsigned int)virtual_currentFrameNumber, iRxEntry)); - clock_gettime(CLOCK_REALTIME, &end); - int64_t timeNs = ((end.tv_sec - begin.tv_sec) * 1E9 + - (end.tv_nsec - begin.tv_nsec)); + sendUDPPacket(iRxEntry, 0, packetData, packetsize); - // sleep for (period - exptime) - if (frameNr < numFrames) { // if there is a next frame - if (periodNs > timeNs) { - usleep((periodNs - timeNs) / 1000); + // second interface (veto) + char packetData2[vetopacketsize]; + memset(packetData2, 0, vetopacketsize); + if (i10gbe) { + // set header + veto_header *header = (veto_header *)(packetData2); + header->frameNumber = + frameNr + (repeatNr * numFrames) + iframes; + header->bunchId = 0; + // fill data + memcpy(packetData2 + sizeof(veto_header), vetoData, + vetodatasize); + // send 1 packet = 1 frame + sendUDPPacket(iRxEntry, 1, packetData2, vetopacketsize); + } + LOG(logINFO, + ("Sent frame %s: %d (bursts/ triggers: %d) [%lld] to E%d\n", + (i10gbe ? "(+veto)" : ""), frameNr, repeatNr, + (frameNr + (repeatNr * numFrames) + iframes), iRxEntry)); + clock_gettime(CLOCK_REALTIME, &end); + int64_t timeNs = ((end.tv_sec - begin.tv_sec) * 1E9 + + (end.tv_nsec - begin.tv_nsec)); + + // sleep for (period - exptime) + if (iframes < numFrames) { // if there is a next frame + if (periodNs > timeNs) { + usleep((periodNs - timeNs) / 1000); + } + } + ++iRxEntry; + if (iRxEntry == numUdpDestinations) { + iRxEntry = 0; } } - ++virtual_currentFrameNumber; - ++iRxEntry; - if (iRxEntry == numUdpDestinations) { - iRxEntry = 0; - } - } - clock_gettime(CLOCK_REALTIME, &rend); - int64_t timeNs = ((rend.tv_sec - rbegin.tv_sec) * 1E9 + - (rend.tv_nsec - rbegin.tv_nsec)); - // sleep for (repeatPeriodNs - time remaining) - if (repeatNr < numRepeats) { // if there is a next repeat - if (repeatPeriodNs > timeNs) { - usleep((repeatPeriodNs - timeNs) / 1000); + clock_gettime(CLOCK_REALTIME, &rend); + int64_t timeNs = ((rend.tv_sec - rbegin.tv_sec) * 1E9 + + (rend.tv_nsec - rbegin.tv_nsec)); + + // sleep for (repeatPeriodNs - time remaining) + if (repeatNr < numRepeats) { // if there is a next repeat + if (repeatPeriodNs > timeNs) { + usleep((repeatPeriodNs - timeNs) / 1000); + } } } + // already being set in the start acquisition (also for real detectors) + setNextFrameNumber(frameNr + (numRepeats * numFrames)); } closeUDPSocket(0); diff --git a/slsDetectorServers/gotthard2DetectorServer/slsDetectorServer_defs.h b/slsDetectorServers/gotthard2DetectorServer/slsDetectorServer_defs.h index 6c3dd1f0b..d275cb400 100644 --- a/slsDetectorServers/gotthard2DetectorServer/slsDetectorServer_defs.h +++ b/slsDetectorServers/gotthard2DetectorServer/slsDetectorServer_defs.h @@ -3,7 +3,7 @@ #pragma once #include "sls/sls_detector_defs.h" -#define REQRD_FRMWRE_VRSN (0x221123) +#define REQRD_FRMWRE_VRSN (0x241003) #define KERNEL_DATE_VRSN "Mon May 10 18:00:21 CEST 2021" #define ID_FILE "detid_gotthard2.txt" @@ -14,7 +14,11 @@ #define LINKED_SERVER_NAME "gotthard2DetectorServer" +#ifdef VIRTUAL +#define CTRL_SRVR_INIT_TIME_US (3 * 1000 * 1000) +#else #define CTRL_SRVR_INIT_TIME_US (300 * 1000) +#endif /* Hardware Definitions */ #define NCHAN (128) @@ -35,6 +39,7 @@ #define TEMPERATURE_FILE_NAME ("/sys/class/hwmon/hwmon0/temp1_input") #endif #define CONFIG_FILE ("config_gotthard2.txt") +#define DAC_MIN_MV (0) #define DAC_MAX_MV (2048) #define ONCHIP_DAC_MAX_VAL (0x3FF) #define ADU_MAX_VAL (0xFFF) @@ -50,10 +55,13 @@ #define TYPE_NO_MODULE_STARTING_VAL (800) #define INITIAL_STARTUP_WAIT (1 * 1000 * 1000) +#define WAIT_HIGH_VOLTAGE_SETTLE_TIME_S (10) // 10s + /** Default Parameters */ #define DEFAULT_BURST_MODE (BURST_INTERNAL) #define DEFAULT_FILTER_RESISTOR (0) #define DEFAILT_CDS_GAIN (0) +#define DEFAULT_FRAME_NUMBER (1) #define DEFAULT_NUM_FRAMES (1) #define DEFAULT_NUM_CYCLES (1) #define DEFAULT_NUM_BURSTS (1) diff --git a/slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv8.0.0 b/slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv8.0.0 deleted file mode 100755 index c660b2ef2..000000000 Binary files a/slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv8.0.0 and /dev/null differ diff --git a/slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv9.0.0 b/slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv9.0.0 new file mode 100755 index 000000000..a2b63fc56 Binary files /dev/null and b/slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv9.0.0 differ diff --git a/slsDetectorServers/gotthardDetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/gotthardDetectorServer/slsDetectorFunctionList.c index f95c613f1..3f72f42c9 100644 --- a/slsDetectorServers/gotthardDetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/gotthardDetectorServer/slsDetectorFunctionList.c @@ -90,6 +90,7 @@ void basictests() { "Could not map to memory. Cannot proceed. Check Firmware.\n"); LOG(logERROR, (initErrorMessage)); initError = FAIL; + return; } #ifndef VIRTUAL // does check only if flag is 0 (by default), set by command line @@ -387,14 +388,15 @@ void initStopServer() { return; } #ifdef VIRTUAL - sharedMemory_setStop(0); -#endif - // to get master from file + setupDetector(); +#else + // ismaster from variable in stop server if (readConfigFile() == FAIL || checkCommandLineConfiguration() == FAIL) { initCheckDone = 1; return; } +#endif } initCheckDone = 1; } @@ -405,8 +407,12 @@ void setupDetector() { LOG(logINFO, ("This Server is for 1 Gotthard module (1280 channels)\n")); #ifdef VIRTUAL - sharedMemory_setStatus(IDLE); - setupUDPCommParameters(); + if (isControlServer) { + sharedMemory_setStatus(IDLE); + setupUDPCommParameters(); + } else { + sharedMemory_setStop(0); + } #endif // Initialization @@ -521,12 +527,12 @@ int setDefaultDac(enum DACINDEX index, enum detectorSettings sett, int value) { return OK; } -uint32_t writeRegister16And32(uint32_t offset, uint32_t data) { +void writeRegister16And32(uint32_t offset, uint32_t data) { if (((offset << MEM_MAP_SHIFT) == CONTROL_REG) || ((offset << MEM_MAP_SHIFT) == FIFO_DATA_REG)) { - return writeRegister16(offset, data); + writeRegister16(offset, data); } else - return writeRegister(offset, data); + writeRegister(offset, data); } uint32_t readRegister16And32(uint32_t offset) { @@ -1661,7 +1667,8 @@ int startStateMachine() { LOG(logERROR, ("Could not start Virtual acquisition thread\n")); sharedMemory_setStatus(IDLE); return FAIL; - } + } else + pthread_detach(pthread_virtual_tid); LOG(logINFOGREEN, ("Virtual Acquisition started\n")); return OK; #endif diff --git a/slsDetectorServers/gotthardDetectorServer/slsDetectorServer_defs.h b/slsDetectorServers/gotthardDetectorServer/slsDetectorServer_defs.h index c81c2325c..ad46b59ac 100644 --- a/slsDetectorServers/gotthardDetectorServer/slsDetectorServer_defs.h +++ b/slsDetectorServers/gotthardDetectorServer/slsDetectorServer_defs.h @@ -12,7 +12,11 @@ #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 }; diff --git a/slsDetectorServers/jungfrauDetectorServer/RegisterDefs.h b/slsDetectorServers/jungfrauDetectorServer/RegisterDefs.h index 5aea7924d..f1f81d863 100644 --- a/slsDetectorServers/jungfrauDetectorServer/RegisterDefs.h +++ b/slsDetectorServers/jungfrauDetectorServer/RegisterDefs.h @@ -213,6 +213,9 @@ #define EXT_SIGNAL_MSK (0x00000001 << EXT_SIGNAL_OFST) #define EXT_SYNC_OFST (4) #define EXT_SYNC_MSK (0x00000001 << EXT_SYNC_OFST) +#define EXT_TIMING_INFO_DECODER_OFST (12) +#define EXT_TIMING_INFO_DECODER_MSK (0x0000000F << EXT_TIMING_INFO_DECODER_OFST) + /* Control Register */ #define CONTROL_REG (0x4F << MEM_MAP_SHIFT) diff --git a/slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv8.0.2 b/slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv8.0.2 deleted file mode 100755 index b01abd4dc..000000000 Binary files a/slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv8.0.2 and /dev/null differ diff --git a/slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv9.0.0 b/slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv9.0.0 new file mode 100755 index 000000000..8fcdadc93 Binary files /dev/null and b/slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv9.0.0 differ diff --git a/slsDetectorServers/jungfrauDetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/jungfrauDetectorServer/slsDetectorFunctionList.c index 73d7ec3f2..ce706d0e5 100644 --- a/slsDetectorServers/jungfrauDetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/jungfrauDetectorServer/slsDetectorFunctionList.c @@ -88,6 +88,7 @@ void basictests() { "Could not map to memory. Cannot proceed. Check Firmware.\n"); LOG(logERROR, (initErrorMessage)); initError = FAIL; + return; } #ifndef VIRTUAL // does check only if flag is 0 (by default), set by command line @@ -438,15 +439,14 @@ void initStopServer() { initCheckDone = 1; return; } +#ifdef VIRTUAL + setupDetector(); +#else + // chip version is a variable if (readConfigFile() == FAIL) { initCheckDone = 1; return; } -#ifdef VIRTUAL - sharedMemory_setStop(0); - // temp threshold and reset event (read by stop server) - setThresholdTemperature(DEFAULT_TMP_THRSHLD); - setTemperatureEvent(0); #endif } initCheckDone = 1; @@ -462,8 +462,14 @@ void setupDetector() { } chipConfigured = 0; #ifdef VIRTUAL - sharedMemory_setStatus(IDLE); - setupUDPCommParameters(); + if (isControlServer) { + sharedMemory_setStatus(IDLE); + setupUDPCommParameters(); + } else { + sharedMemory_setStop(0); + } + // ismaster from reg in stop server, so set it in virtual mode + setMaster(OW_MASTER); #endif // altera pll @@ -549,6 +555,7 @@ void setupDetector() { setNextFrameNumber(DEFAULT_STARTING_FRAME_NUMBER); // temp threshold and reset event + setTemperatureControl(DEFAULT_TMP_CNTRL); setThresholdTemperature(DEFAULT_TMP_THRSHLD); setTemperatureEvent(0); if (getChipVersion() == 11) { @@ -566,6 +573,8 @@ void setupDetector() { #endif setPedestalMode(DEFAULT_PEDESTAL_MODE, DEFAULT_PEDESTAL_FRAMES, DEFAULT_PEDESTAL_LOOPS); + setTimingInfoDecoder(DEFAULT_TIMING_INFO_DECODER); + setElectronCollectionMode(DEFAULT_ELECTRON_COLLECTION_MODE); } int resetToDefaultDacs(int hardReset) { @@ -2246,7 +2255,6 @@ int setThresholdTemperature(int val) { double ftemp = (double)temp / 1000.00; LOG(logDEBUG1, ("Threshold Temperature read %f °C\n", ftemp)); - return temp; } @@ -2547,6 +2555,7 @@ void getPedestalParameters(uint8_t *frames, uint16_t *loops) { } void setPedestalMode(int enable, uint8_t frames, uint16_t loops) { + // Note: loops is 8 bit in firmware as a bug.To be fixed in next version int prevPedestalEnable = getPedestalMode(); uint32_t addr = PEDESTAL_MODE_REG; @@ -2609,6 +2618,57 @@ void setPedestalMode(int enable, uint8_t frames, uint16_t loops) { } } +int setTimingInfoDecoder(enum timingInfoDecoder val) { + switch (val) { + case SWISSFEL: + LOG(logINFO, ("Setting Timing Info Decoder to SWISSFEL\n")); + break; + case SHINE: + LOG(logINFO, ("Setting Timing Info Decoder to SHINE\n")); + break; + default: + LOG(logERROR, ("Unknown Timing Info Decoder %d\n", val)); + return FAIL; + } + + int decodeValue = (int)val; + uint32_t addr = EXT_SIGNAL_REG; + bus_w(addr, bus_r(addr) & ~EXT_TIMING_INFO_DECODER_MSK); + bus_w(addr, bus_r(addr) | ((decodeValue << EXT_TIMING_INFO_DECODER_OFST) & + EXT_TIMING_INFO_DECODER_MSK)); + + return OK; +} + +int getTimingInfoDecoder(enum timingInfoDecoder *retval) { + int decodeValue = ((bus_r(EXT_SIGNAL_REG) & EXT_TIMING_INFO_DECODER_MSK) >> + EXT_TIMING_INFO_DECODER_OFST); + if (decodeValue == (int)SWISSFEL) { + *retval = SWISSFEL; + } else if (decodeValue == (int)SHINE) { + *retval = SHINE; + } else { + return FAIL; + } + return OK; +} + +int getElectronCollectionMode() { + return ((bus_r(DAQ_REG) & DAQ_ELCTRN_CLLCTN_MDE_MSK) >> + DAQ_ELCTRN_CLLCTN_MDE_OFST); +} + +void setElectronCollectionMode(int enable) { + LOG(logINFO, + ("Setting Collection Mode to %s\n", enable == 0 ? "Hole" : "Electron")); + if (enable) { + bus_w(DAQ_REG, bus_r(DAQ_REG) | DAQ_ELCTRN_CLLCTN_MDE_MSK); + } else { + bus_w(DAQ_REG, bus_r(DAQ_REG) & ~DAQ_ELCTRN_CLLCTN_MDE_MSK); + } + configureChip(); +} + int getTenGigaFlowControl() { return ((bus_r(CONFIG_REG) & CONFIG_ETHRNT_FLW_CNTRL_MSK) >> CONFIG_ETHRNT_FLW_CNTRL_OFST); @@ -2674,7 +2734,8 @@ int startStateMachine() { LOG(logERROR, ("Could not start Virtual acquisition thread\n")); sharedMemory_setStatus(IDLE); return FAIL; - } + } else + pthread_detach(pthread_virtual_tid); LOG(logINFOGREEN, ("Virtual Acquisition started\n")); return OK; #endif @@ -2730,9 +2791,9 @@ void *start_timer(void *arg) { } if ((i % 1024) < 300) { - gainVal = 1; + gainVal = 0; } else if ((i % 1024) < 600) { - gainVal = 2; + gainVal = 1; } else { gainVal = 3; } @@ -2769,17 +2830,29 @@ void *start_timer(void *arg) { clock_gettime(CLOCK_REALTIME, &begin); usleep(expUs); +#ifdef TEST_CHANGE_GAIN_EVERY_FRAME // change gain and data for every frame { const int npixels = (NCHAN * NCHIP); + + // random gain values, 2 becomes 3 as 2 is invalid + int randomGainValues[3] = {0}; + srand(time(0)); + for (int i = 0; i != 3; ++i) { + int r = rand() % 3; + if (r == 2) + r = 3; + randomGainValues[i] = r; + } + for (int i = 0; i < npixels; ++i) { int gainVal = 0; if ((i % 1024) < 300) { - gainVal = 1 + iframes; + gainVal = randomGainValues[0]; } else if ((i % 1024) < 600) { - gainVal = 2 + iframes; + gainVal = randomGainValues[1]; } else { - gainVal = 3 + iframes; + gainVal = randomGainValues[2]; } int dataVal = *((uint16_t *)(imageData + i * sizeof(uint16_t))); @@ -2790,7 +2863,7 @@ void *start_timer(void *arg) { (uint16_t)pixelVal; } } - +#endif int srcOffset = 0; int srcOffset2 = DATA_BYTES / 2; int row0 = (numInterfaces == 1 ? detPos[1] : detPos[3]); diff --git a/slsDetectorServers/jungfrauDetectorServer/slsDetectorServer_defs.h b/slsDetectorServers/jungfrauDetectorServer/slsDetectorServer_defs.h index 2d0033822..8ffaf5eaa 100644 --- a/slsDetectorServers/jungfrauDetectorServer/slsDetectorServer_defs.h +++ b/slsDetectorServers/jungfrauDetectorServer/slsDetectorServer_defs.h @@ -17,7 +17,11 @@ #define ID_FILE "detid_jungfrau.txt" #define LINKED_SERVER_NAME "jungfrauDetectorServer" +#ifdef VIRTUAL +#define CTRL_SRVR_INIT_TIME_US (4 * 1000 * 1000) +#else #define CTRL_SRVR_INIT_TIME_US (300 * 1000) +#endif /* Hardware Definitions */ #define NCHAN (256 * 256) @@ -33,29 +37,33 @@ #define CONFIG_FILE ("config_jungfrau.txt") /** Default Parameters */ -#define DEFAULT_NUM_FRAMES (100 * 1000 * 1000) -#define DEFAULT_STARTING_FRAME_NUMBER (1) -#define DEFAULT_NUM_CYCLES (1) -#define DEFAULT_EXPTIME (10 * 1000) // ns -#define DEFAULT_PERIOD (2 * 1000 * 1000) // ns -#define DEFAULT_DELAY (0) -#define DEFAULT_HIGH_VOLTAGE (0) -#define DEFAULT_TIMING_MODE (AUTO_TIMING) -#define DEFAULT_SETTINGS (GAIN0) -#define DEFAULT_GAINMODE (DYNAMIC) -#define DEFAULT_TX_UDP_PORT (0x7e9a) -#define DEFAULT_TMP_THRSHLD (65 * 1000) // milli degree Celsius -#define DEFAULT_NUM_STRG_CLLS (0) -#define DEFAULT_STRG_CLL_STRT (0xf) -#define DEFAULT_STRG_CLL_STRT_CHIP11 (0x3) -#define DEFAULT_STRG_CLL_DLY (0) -#define DEFAULT_FLIP_ROWS (0) -#define DEFAULT_FILTER_RESISTOR (1) // higher resistor -#define DEFAULT_FILTER_CELL (0) -#define DEFAULT_PEDESTAL_MODE (0) -#define DEFAULT_PEDESTAL_FRAMES (1) -#define DEFAULT_PEDESTAL_LOOPS (1) +#define DEFAULT_NUM_FRAMES (100 * 1000 * 1000) +#define DEFAULT_STARTING_FRAME_NUMBER (1) +#define DEFAULT_NUM_CYCLES (1) +#define DEFAULT_EXPTIME (10 * 1000) // ns +#define DEFAULT_PERIOD (2 * 1000 * 1000) // ns +#define DEFAULT_DELAY (0) +#define DEFAULT_HIGH_VOLTAGE (0) +#define DEFAULT_TIMING_MODE (AUTO_TIMING) +#define DEFAULT_SETTINGS (GAIN0) +#define DEFAULT_GAINMODE (DYNAMIC) +#define DEFAULT_TX_UDP_PORT (0x7e9a) +#define DEFAULT_TMP_CNTRL (1) +#define DEFAULT_TMP_THRSHLD (65 * 1000) // milli degree Celsius +#define DEFAULT_NUM_STRG_CLLS (0) +#define DEFAULT_STRG_CLL_STRT (0xf) +#define DEFAULT_STRG_CLL_STRT_CHIP11 (0x3) +#define DEFAULT_STRG_CLL_DLY (0) +#define DEFAULT_FLIP_ROWS (0) +#define DEFAULT_FILTER_RESISTOR (1) // higher resistor +#define DEFAULT_FILTER_CELL (0) +#define DEFAULT_PEDESTAL_MODE (0) +#define DEFAULT_PEDESTAL_FRAMES (1) +#define DEFAULT_PEDESTAL_LOOPS (1) +#define DEFAULT_TIMING_INFO_DECODER (SWISSFEL) +#define DEFAULT_ELECTRON_COLLECTION_MODE (0) +#define MAX_PEDESTAL_LOOPS (0xFF) // until fixed in firmware #define HIGHVOLTAGE_MIN (60) #define HIGHVOLTAGE_MAX (200) #define DAC_MIN_MV (0) diff --git a/slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv8.0.2 b/slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv8.0.2 deleted file mode 100755 index 75b35dd13..000000000 Binary files a/slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv8.0.2 and /dev/null differ diff --git a/slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv9.0.0 b/slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv9.0.0 new file mode 100755 index 000000000..9dff6a26e Binary files /dev/null and b/slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv9.0.0 differ diff --git a/slsDetectorServers/moenchDetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/moenchDetectorServer/slsDetectorFunctionList.c index be5abb790..7f7342e79 100644 --- a/slsDetectorServers/moenchDetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/moenchDetectorServer/slsDetectorFunctionList.c @@ -82,6 +82,7 @@ void basictests() { "Could not map to memory. Cannot proceed. Check Firmware.\n"); LOG(logERROR, ("%s\n\n", initErrorMessage)); initError = FAIL; + return; } #ifndef VIRTUAL // does check only if flag is 0 (by default), set by command line @@ -419,10 +420,7 @@ void initStopServer() { return; } #ifdef VIRTUAL - sharedMemory_setStop(0); - // temp threshold and reset event (read by stop server) - setThresholdTemperature(DEFAULT_TMP_THRSHLD); - setTemperatureEvent(0); + setupDetector(); #endif } initCheckDone = 1; @@ -437,8 +435,14 @@ void setupDetector() { clkPhase[i] = 0; } #ifdef VIRTUAL - sharedMemory_setStatus(IDLE); - setupUDPCommParameters(); + if (isControlServer) { + sharedMemory_setStatus(IDLE); + setupUDPCommParameters(); + } else { + sharedMemory_setStop(0); + } + // ismaster from reg in stop server, so set it in virtual mode + setMaster(OW_MASTER); #endif // altera pll @@ -1854,7 +1858,8 @@ int startStateMachine() { LOG(logERROR, ("Could not start Virtual acquisition thread\n")); sharedMemory_setStatus(IDLE); return FAIL; - } + } else + pthread_detach(pthread_virtual_tid); LOG(logINFOGREEN, ("Virtual Acquisition started\n")); return OK; #endif diff --git a/slsDetectorServers/moenchDetectorServer/slsDetectorServer_defs.h b/slsDetectorServers/moenchDetectorServer/slsDetectorServer_defs.h index b564f21af..aa4133d7a 100644 --- a/slsDetectorServers/moenchDetectorServer/slsDetectorServer_defs.h +++ b/slsDetectorServers/moenchDetectorServer/slsDetectorServer_defs.h @@ -16,7 +16,11 @@ #define ID_FILE ("detid_moench.txt") #define LINKED_SERVER_NAME "moenchDetectorServer" +#ifdef VIRTUAL +#define CTRL_SRVR_INIT_TIME_US (2 * 1000 * 1000) +#else #define CTRL_SRVR_INIT_TIME_US (300 * 1000) +#endif /* Hardware Definitions */ #define NCHAN (400 * 400) diff --git a/slsDetectorServers/mythen3DetectorServer/RegisterDefs.h b/slsDetectorServers/mythen3DetectorServer/RegisterDefs.h index edc58f4fa..6c7e641c9 100644 --- a/slsDetectorServers/mythen3DetectorServer/RegisterDefs.h +++ b/slsDetectorServers/mythen3DetectorServer/RegisterDefs.h @@ -7,9 +7,6 @@ /* Base addresses 0x1804 0000 ---------------------------------------------*/ -/* Reconfiguration core for readout pll */ -#define BASE_READOUT_PLL (0x0000) // 0x1804_0000 - 0x1804_07FF - /* Reconfiguration core for system pll */ #define BASE_SYSTEM_PLL (0x0800) // 0x1804_0800 - 0x1804_0FFF diff --git a/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv8.0.2 b/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv8.0.2 deleted file mode 100755 index c01cb64fb..000000000 Binary files a/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv8.0.2 and /dev/null differ diff --git a/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv9.0.0 b/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv9.0.0 new file mode 100755 index 000000000..740ce3f06 Binary files /dev/null and b/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv9.0.0 differ diff --git a/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c index ba49a339e..0d0b6570c 100644 --- a/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c @@ -63,7 +63,6 @@ int32_t clkPhase[NUM_CLOCKS] = {}; uint32_t clkDivider[NUM_CLOCKS] = {}; enum TLogLevel trimmingPrint = logINFO; -int highvoltage = 0; int detPos[2] = {}; int64_t exptimeReg[NCOUNTERS] = {0, 0, 0}; int64_t gateDelayReg[NCOUNTERS] = {0, 0, 0}; @@ -92,6 +91,7 @@ void basictests() { "Could not map to memory. Cannot proceed. Check Firmware.\n"); LOG(logERROR, (initErrorMessage)); initError = FAIL; + return; } #ifndef VIRTUAL // does check only if flag is 0 (by default), set by command line @@ -396,11 +396,7 @@ void initStopServer() { return; } #ifdef VIRTUAL - sharedMemory_setStop(0); - if (checkCommandLineConfiguration() == FAIL) { - initCheckDone = 1; - return; - } + setupDetector(); #endif } initCheckDone = 1; @@ -408,18 +404,24 @@ void initStopServer() { /* set up detector */ -void allocateDetectorStructureMemory() { - // Allocation of memory +int allocateDetectorStructureMemory() { detectorModules = malloc(sizeof(sls_detector_module)); detectorChans = malloc(NCHAN_PER_MODULE * sizeof(int)); - badChannelMask = malloc(NCHAN_PER_MODULE * sizeof(char)); - memset(badChannelMask, 0, NCHAN_PER_MODULE * sizeof(char)); detectorDacs = malloc(NDAC * sizeof(int)); - + badChannelMask = malloc(NCHAN_PER_MODULE * sizeof(char)); + if (detectorModules == NULL || detectorChans == NULL || + detectorDacs == NULL || badChannelMask == NULL) { + initError = FAIL; + strcpy(initErrorMessage, "Could not allocate memory for dacs, channels " + "or bad channel mask in detector\n"); + LOG(logERROR, (initErrorMessage)); + return FAIL; + } LOG(logDEBUG1, ("modules from 0x%x to 0x%x\n", detectorModules, detectorModules)); LOG(logDEBUG1, ("chans from 0x%x to 0x%x\n", detectorChans, detectorChans)); LOG(logDEBUG1, ("dacs from 0x%x to 0x%x\n", detectorDacs, detectorDacs)); + (detectorModules)->dacs = detectorDacs; (detectorModules)->chanregs = detectorChans; (detectorModules)->ndac = NDAC; @@ -433,21 +435,22 @@ void allocateDetectorStructureMemory() { (detectorModules)->eV[2] = 0; thisSettings = UNINITIALIZED; - // initialize dacs + // initialize for (int idac = 0; idac < (detectorModules)->ndac; ++idac) { detectorDacs[idac] = 0; } - - // trimbits start at 0 for (int ichan = 0; ichan < (detectorModules->nchan); ichan++) { *((detectorModules->chanregs) + ichan) = 0; } + memset(badChannelMask, 0, NCHAN_PER_MODULE * sizeof(char)); + return OK; } void setupDetector() { LOG(logINFO, ("This Server is for 1 Mythen3 module \n")); - allocateDetectorStructureMemory(); + if (allocateDetectorStructureMemory() == FAIL) + return; if (checkCommandLineConfiguration() == FAIL) return; @@ -455,46 +458,48 @@ void setupDetector() { if (updateModuleId() == FAIL) return; - clkDivider[READOUT_C0] = DEFAULT_READOUT_C0; - clkDivider[READOUT_C1] = DEFAULT_READOUT_C1; clkDivider[SYSTEM_C0] = DEFAULT_SYSTEM_C0; clkDivider[SYSTEM_C1] = DEFAULT_SYSTEM_C1; clkDivider[SYSTEM_C2] = DEFAULT_SYSTEM_C2; - highvoltage = 0; trimmingPrint = logINFO; for (int i = 0; i < NUM_CLOCKS; ++i) { clkPhase[i] = 0; } #ifdef VIRTUAL - sharedMemory_setStatus(IDLE); - setupUDPCommParameters(); + if (isControlServer) { + sharedMemory_setStatus(IDLE); + setupUDPCommParameters(); + } else { + sharedMemory_setStop(0); + } #endif // pll defines ALTERA_PLL_C10_SetDefines( - REG_OFFSET, BASE_READOUT_PLL, BASE_SYSTEM_PLL, PLL_RESET_REG, - PLL_RESET_READOUT_MSK, PLL_RESET_SYSTEM_MSK, SYSTEM_STATUS_REG, - SYSTEM_STATUS_RDO_PLL_LCKD_MSK, SYSTEM_STATUS_R_PLL_LCKD_MSK, - READOUT_PLL_VCO_FREQ_HZ, SYSTEM_PLL_VCO_FREQ_HZ); - ALTERA_PLL_C10_ResetPLL(READOUT_PLL); + REG_OFFSET, 0, BASE_SYSTEM_PLL, PLL_RESET_REG, 0, PLL_RESET_SYSTEM_MSK, + SYSTEM_STATUS_REG, SYSTEM_STATUS_RDO_PLL_LCKD_MSK, + SYSTEM_STATUS_R_PLL_LCKD_MSK, 0, SYSTEM_PLL_VCO_FREQ_HZ); ALTERA_PLL_C10_ResetPLL(SYSTEM_PLL); - // change startup clock divider in software - // because firmware only sets max clock divider - setClockDividerWithTimeUpdateOption(READOUT_C0, DEFAULT_READOUT_C0_STARTUP, - 0); // hv DAC6571_SetDefines(HV_HARD_MAX_VOLTAGE, HV_DRIVER_FILE_NAME); // dac - LTC2620_D_SetDefines(DAC_MAX_MV, DAC_DRIVER_FILE_NAME, NDAC); + LTC2620_D_SetDefines(DAC_MIN_MV, DAC_MAX_MV, DAC_DRIVER_FILE_NAME, NDAC, 0, + ""); resetCore(); resetPeripheral(); cleanFifos(); // defaults - setHighVoltage(DEFAULT_HIGH_VOLTAGE); + initError = setHighVoltage(DEFAULT_HIGH_VOLTAGE); + if (initError == FAIL) { + sprintf(initErrorMessage, "Could not set high voltage to %d\n", + DEFAULT_HIGH_VOLTAGE); + return; + } + setASICDefaults(); setADIFDefaults(); @@ -546,6 +551,7 @@ void setupDetector() { } setAllTrimbits(DEFAULT_TRIMBIT_VALUE); + setReadoutSpeed(DEFAULT_READOUT_SPEED); } int resetToDefaultDacs(int hardReset) { @@ -1413,6 +1419,10 @@ int setTrimbits(int *trimbits) { int setAllTrimbits(int val) { LOG(logINFO, ("Setting all trimbits to %d\n", val)); int *trimbits = malloc(sizeof(int) * ((detectorModules)->nchan)); + if (trimbits == NULL) { + LOG(logERROR, ("Could not allocate memory to set all trimbits\n")); + return FAIL; + } for (int ichan = 0; ichan < ((detectorModules)->nchan); ++ichan) { trimbits[ichan] = val; } @@ -1673,10 +1683,12 @@ int getMaxDacSteps() { return LTC2620_D_GetMaxNumSteps(); } int getADC(enum ADCINDEX ind, int *value) { LOG(logDEBUG1, ("Reading FPGA temperature...\n")); - if (readADCFromFile(TEMPERATURE_FILE_NAME, value) == FAIL) { + if (readParameterFromFile(TEMPERATURE_FILE_NAME, "temperature", value) == + FAIL) { LOG(logERROR, ("Could not get temperature\n")); return FAIL; } + LOG(logINFO, ("Temperature: %.2f °C\n", (double)(*value) / 1000.00)); return OK; } @@ -1686,15 +1698,12 @@ int setHighVoltage(int val) { val = HV_SOFT_MAX_VOLTAGE; } - // setting hv - if (val >= 0) { - LOG(logINFO, ("Setting High voltage: %d V\n", val)); - if (DAC6571_Set(val) == OK) - highvoltage = val; - } - return highvoltage; + LOG(logINFO, ("Setting High voltage: %d V\n", val)); + return DAC6571_Set(val); } +int getHighVoltage(int *retval) { return DAC6571_Get(retval); } + /* parameters - timing */ int isMaster(int *retval) { @@ -2241,9 +2250,7 @@ int setPhase(enum CLKINDEX ind, int val, int degrees) { relativePhase *= -1; direction = 0; } - int pllIndex = (int)(ind >= SYSTEM_C0 ? SYSTEM_PLL : READOUT_PLL); - int clkIndex = (int)(ind >= SYSTEM_C0 ? ind - SYSTEM_C0 : ind); - ALTERA_PLL_C10_SetPhaseShift(pllIndex, clkIndex, relativePhase, direction); + ALTERA_PLL_C10_SetPhaseShift(SYSTEM_PLL, ind, relativePhase, direction); clkPhase[ind] = valShift; return OK; @@ -2313,8 +2320,7 @@ int getVCOFrequency(enum CLKINDEX ind) { LOG(logERROR, ("Unknown clock index %d to get vco frequency\n", ind)); return -1; } - int pllIndex = (int)(ind >= SYSTEM_C0 ? SYSTEM_PLL : READOUT_PLL); - return ALTERA_PLL_C10_GetVCOFrequency(pllIndex); + return ALTERA_PLL_C10_GetVCOFrequency(SYSTEM_PLL); } int getMaxClockDivider() { return ALTERA_PLL_C10_GetMaxClockDivider(); } @@ -2353,9 +2359,7 @@ int setClockDividerWithTimeUpdateOption(enum CLKINDEX ind, int val, } // Calculate and set output frequency - int pllIndex = (int)(ind >= SYSTEM_C0 ? SYSTEM_PLL : READOUT_PLL); - int clkIndex = (int)(ind >= SYSTEM_C0 ? ind - SYSTEM_C0 : ind); - ALTERA_PLL_C10_SetOuputClockDivider(pllIndex, clkIndex, val); + ALTERA_PLL_C10_SetOuputClockDivider(SYSTEM_PLL, ind, val); // Update time settings that depend on system frequency // timeUpdate = 0 for setChipRegister/setTrimbits etc @@ -2387,14 +2391,9 @@ int setClockDividerWithTimeUpdateOption(enum CLKINDEX ind, int val, clkDivider[ind])); // phase is reset by pll (when setting output frequency) - if (ind < SYSTEM_C0) { - clkPhase[READOUT_C0] = 0; - clkPhase[READOUT_C1] = 0; - } else { - clkPhase[SYSTEM_C0] = 0; - clkPhase[SYSTEM_C1] = 0; - clkPhase[SYSTEM_C2] = 0; - } + clkPhase[SYSTEM_C0] = 0; + clkPhase[SYSTEM_C1] = 0; + clkPhase[SYSTEM_C2] = 0; // set the phase in degrees (reset by pll) for (int i = 0; i < NUM_CLOCKS; ++i) { @@ -2417,6 +2416,42 @@ int getClockDivider(enum CLKINDEX ind) { return clkDivider[ind]; } +int setReadoutSpeed(int val) { + enum speedLevel speed = FULL_SPEED; + switch (val) { + case FULL_SPEED: + LOG(logINFO, ("Setting Full Speed (100 MHz):\n")); + speed = FULL_SPEED_CLKDIV; + break; + case HALF_SPEED: + LOG(logINFO, ("Setting Half Speed (50 MHz):\n")); + speed = HALF_SPEED_CLKDIV; + break; + case QUARTER_SPEED: + LOG(logINFO, ("Setting Quarter Speed (25 MHz):\n")); + speed = QUARTER_SPEED_CLKDIV; + break; + default: + LOG(logERROR, ("Unknown readout speed %d\n", val)); + return FAIL; + } + return setClockDivider(SYSTEM_C0, speed); +} + +int getReadoutSpeed(int *retval) { + int clkdiv = getClockDivider(SYSTEM_C0); + if (clkdiv == FULL_SPEED_CLKDIV) { + *retval = FULL_SPEED; + } else if (clkdiv == HALF_SPEED_CLKDIV) { + *retval = HALF_SPEED; + } else if (clkdiv == QUARTER_SPEED_CLKDIV) { + *retval = QUARTER_SPEED; + } else { + return FAIL; + } + return OK; +} + int setBadChannels(int numChannels, int *channelList) { LOG(logINFO, ("Setting %d bad channels\n", numChannels)); memset(badChannelMask, 0, NCHAN_PER_MODULE * sizeof(char)); @@ -2445,11 +2480,12 @@ int *getBadChannels(int *numChannels) { } if (*numChannels > 0) { retvals = malloc(*numChannels * sizeof(int)); - memset(retvals, 0, *numChannels * sizeof(int)); if (retvals == NULL) { + LOG(logERROR, ("Could not allocate memory to get bad channels\n")); *numChannels = -1; return NULL; } + memset(retvals, 0, *numChannels * sizeof(int)); // return only 1 channel for all counters int ich = 0; for (int i = 0; i != NCHAN_PER_MODULE; i = i + NCOUNTERS) { @@ -2508,7 +2544,8 @@ int startStateMachine() { LOG(logERROR, ("Could not start Virtual acquisition thread\n")); sharedMemory_setStatus(IDLE); return FAIL; - } + } else + pthread_detach(pthread_virtual_tid); LOG(logINFOGREEN, ("Virtual Acquisition started\n")); return OK; #endif diff --git a/slsDetectorServers/mythen3DetectorServer/slsDetectorServer_defs.h b/slsDetectorServers/mythen3DetectorServer/slsDetectorServer_defs.h index aa57b0f78..d9287e862 100644 --- a/slsDetectorServers/mythen3DetectorServer/slsDetectorServer_defs.h +++ b/slsDetectorServers/mythen3DetectorServer/slsDetectorServer_defs.h @@ -3,7 +3,7 @@ #pragma once #include "sls/sls_detector_defs.h" -#define REQRD_FRMWRE_VRSN (0x230124) +#define REQRD_FRMWRE_VRSN (0x241113) #define KERNEL_DATE_VRSN "Mon May 10 18:00:21 CEST 2021" #define ID_FILE "detid_mythen3.txt" @@ -34,6 +34,7 @@ #else #define TEMPERATURE_FILE_NAME ("/sys/class/hwmon/hwmon0/temp1_input") #endif +#define DAC_MIN_MV (0) #define DAC_MAX_MV (2048) #define TYPE_MYTHEN3_MODULE_VAL (93) #define TYPE_TOLERANCE (5) @@ -56,15 +57,16 @@ #define DEFAULT_SETTINGS (STANDARD) #define DEFAULT_TRIMBIT_VALUE (0) #define DEFAULT_COUNTER_DISABLED_VTH_VAL (2800) +#define DEFAULT_READOUT_SPEED (HALF_SPEED) -#define DEFAULT_READOUT_C0 (10) //(100000000) // rdo_clk, 100 MHz -#define DEFAULT_READOUT_C1 (10) //(100000000) // rdo_smp_clk, 100 MHz #define DEFAULT_SYSTEM_C0 (10) //(100000000) // run_clk, 100 MHz #define DEFAULT_SYSTEM_C1 (6) //(166666666) // str_clk, 166 MHz const #define DEFAULT_SYSTEM_C2 (5) //(200000000) // smp_clk, 200 MHz const #define DEFAULT_TRIMMING_RUN_CLKDIV (40) // (25000000) // 25 MHz -#define DEFAULT_READOUT_C0_STARTUP (20) //(50000000) // rdo_clk, 50 MHz +#define FULL_SPEED_CLKDIV (10) //(100000000) 100 MHz +#define HALF_SPEED_CLKDIV (20) //( 50000000) 50 MHz +#define QUARTER_SPEED_CLKDIV (40) //( 25000000) 25 MHz #define DEFAULT_ASIC_LATCHING_NUM_PULSES (10) #define DEFAULT_MSTR_OTPT_P1_NUM_PULSES (20) @@ -72,12 +74,11 @@ #define DEFAULT_ADIF_ADD_OFST_VAL (0) /* Firmware Definitions */ -#define MAX_TIMESLOT_VAL (0xFFFFFF) -#define IP_HEADER_SIZE (20) -#define FIXED_PLL_FREQUENCY (020000000) // 20MHz -#define READOUT_PLL_VCO_FREQ_HZ (1000000000) // 1GHz -#define SYSTEM_PLL_VCO_FREQ_HZ (1000000000) // 1GHz -#define MAX_NUM_DESERIALIZERS (40) +#define MAX_TIMESLOT_VAL (0xFFFFFF) +#define IP_HEADER_SIZE (20) +#define FIXED_PLL_FREQUENCY (020000000) // 20MHz +#define SYSTEM_PLL_VCO_FREQ_HZ (1000000000) // 1GHz +#define MAX_NUM_DESERIALIZERS (40) /** Other Definitions */ #define BIT16_MASK (0xFFFF) @@ -139,19 +140,12 @@ enum ADCINDEX { TEMP_FPGA }; #define SPECIAL_DEFAULT_HIGHGAIN_DAC_VALS \ { 1300, 1100 } -enum CLKINDEX { - READOUT_C0, - READOUT_C1, - SYSTEM_C0, - SYSTEM_C1, - SYSTEM_C2, - NUM_CLOCKS -}; -#define NUM_CLOCKS_TO_SET (3) +enum CLKINDEX { SYSTEM_C0, SYSTEM_C1, SYSTEM_C2, NUM_CLOCKS }; +#define NUM_CLOCKS_TO_SET (1) -#define CLK_NAMES \ - "READOUT_C0", "READOUT_C1", "SYSTEM_C0", "SYSTEM_C1", "SYSTEM_C2" -enum PLLINDEX { READOUT_PLL, SYSTEM_PLL }; +#define CLK_NAMES "SYSTEM_C0", "SYSTEM_C1", "SYSTEM_C2" + +#define SYSTEM_PLL (1) /* Struct Definitions */ typedef struct udp_header_struct { diff --git a/slsDetectorServers/slsDetectorServer/include/DAC6571.h b/slsDetectorServers/slsDetectorServer/include/DAC6571.h index 1a13d3c14..3a86ea900 100644 --- a/slsDetectorServers/slsDetectorServer/include/DAC6571.h +++ b/slsDetectorServers/slsDetectorServer/include/DAC6571.h @@ -4,16 +4,6 @@ #include -/** - * Set Defines - * @param hardMaxV maximum hardware limit - * @param driverfname driver file name - */ void DAC6571_SetDefines(int hardMaxV, char *driverfname); - -/** - * Set value - * @param val value to set - * @return OK or FAIL - */ int DAC6571_Set(int val); +int DAC6571_Get(int *retval); diff --git a/slsDetectorServers/slsDetectorServer/include/LTC2620_Driver.h b/slsDetectorServers/slsDetectorServer/include/LTC2620_Driver.h index 6a05cde62..f11139ac2 100644 --- a/slsDetectorServers/slsDetectorServer/include/LTC2620_Driver.h +++ b/slsDetectorServers/slsDetectorServer/include/LTC2620_Driver.h @@ -4,18 +4,13 @@ #include -/** - * Set Defines - * @param hardMaxV maximum hardware limit - * @param driverfname driver file name - * @param numdacs number of dacs - */ -void LTC2620_D_SetDefines(int hardMaxV, char *driverfname, int numdacs); - -/** - * Get max number of steps - */ +void LTC2620_D_SetDefines(int hardMinV, int hardMaxV, char *driverfname, + int numdacs, int numpowers, + char *powerdownDriverfname); int LTC2620_D_GetMaxNumSteps(); +int LTC2620_D_GetPowerDownValue(); +int LTC2620_D_GetMinInput(); +int LTC2620_D_GetMaxInput(); /** * Convert voltage to dac units diff --git a/slsDetectorServers/slsDetectorServer/include/arm64.h b/slsDetectorServers/slsDetectorServer/include/arm64.h new file mode 100644 index 000000000..6614bfe65 --- /dev/null +++ b/slsDetectorServers/slsDetectorServer/include/arm64.h @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: LGPL-3.0-or-other +// Copyright (C) 2021 Contributors to the SLS Detector Package +#pragma once + +#include +#include + +void bus_w(u_int32_t offset, u_int32_t data); +u_int32_t bus_r(u_int32_t offset); +uint64_t getU64BitReg(int aLSB, int aMSB); +void setU64BitReg(uint64_t value, int aLSB, int aMSB); +u_int32_t readRegister(u_int32_t offset); +u_int32_t writeRegister(u_int32_t offset, u_int32_t data); +int mapCSP0(void); +u_int32_t *Arm_getUDPBaseAddress(); diff --git a/slsDetectorServers/slsDetectorServer/include/blackfin.h b/slsDetectorServers/slsDetectorServer/include/blackfin.h index e3a2d50f7..fef76ad48 100644 --- a/slsDetectorServers/slsDetectorServer/include/blackfin.h +++ b/slsDetectorServers/slsDetectorServer/include/blackfin.h @@ -81,7 +81,7 @@ u_int32_t readRegister(u_int32_t offset); * @param offset address offset * @param data 32 bit data */ -u_int32_t writeRegister(u_int32_t offset, u_int32_t data); +void writeRegister(u_int32_t offset, u_int32_t data); /** * Read from a 16 bit register (literal register value provided by client) @@ -95,7 +95,7 @@ u_int32_t readRegister16(u_int32_t offset); * @param offset address offset * @param data 16 bit data */ -u_int32_t writeRegister16(u_int32_t offset, u_int32_t data); +void writeRegister16(u_int32_t offset, u_int32_t data); /** * Get base address for memory copy diff --git a/slsDetectorServers/slsDetectorServer/include/clogger.h b/slsDetectorServers/slsDetectorServer/include/clogger.h index 9f392535c..7b0b4b3cb 100644 --- a/slsDetectorServers/slsDetectorServer/include/clogger.h +++ b/slsDetectorServers/slsDetectorServer/include/clogger.h @@ -91,7 +91,7 @@ static inline void FILELOG_PrintLog(enum TLogLevel level, char *m) { } static inline char *FILELOG_BuildLog(const char *fmt, ...) { - char *p; + char *p = NULL; va_list ap; p = malloc(ERROR_MSG_LENGTH); va_start(ap, fmt); diff --git a/slsDetectorServers/slsDetectorServer/include/common.h b/slsDetectorServers/slsDetectorServer/include/common.h index 1bc089e82..7c6139f16 100644 --- a/slsDetectorServers/slsDetectorServer/include/common.h +++ b/slsDetectorServers/slsDetectorServer/include/common.h @@ -69,4 +69,9 @@ int deleteFile(char *mess, char *fname, char *errorPrefix); int deleteOldServers(char *mess, char *newServerPath, char *errorPrefix); -int readADCFromFile(char *fname, int *value); \ No newline at end of file +int readParameterFromFile(char *fname, char *parameterName, int *value); + +int createAbsoluteDirectory(char *mess, const char *absPath, char *errorPrefix); +int deleteAbsoluteDirectory(char *mess, const char *absPath, char *errorPrefix); + +int deleteItem(char *mess, int isFile, const char *absPath, char *errorPrefix); \ No newline at end of file diff --git a/slsDetectorServers/slsDetectorServer/include/loadPattern.h b/slsDetectorServers/slsDetectorServer/include/loadPattern.h index 1d87956b9..7cc9b5a88 100644 --- a/slsDetectorServers/slsDetectorServer/include/loadPattern.h +++ b/slsDetectorServers/slsDetectorServer/include/loadPattern.h @@ -6,10 +6,12 @@ #include "clogger.h" void initializePatternAddresses(); -#ifdef CHIPTESTBOARDD +#if defined(CHIPTESTBOARDD) || defined(XILINX_CHIPTESTBOARDD) #ifdef VIRTUAL void initializePatternWord(); #endif +#endif +#if defined(CHIPTESTBOARDD) || defined(XILINX_CHIPTESTBOARDD) uint64_t validate_readPatternIOControl(); int validate_writePatternIOControl(char *message, uint64_t arg); void writePatternIOControl(uint64_t word); diff --git a/slsDetectorServers/slsDetectorServer/include/nios.h b/slsDetectorServers/slsDetectorServer/include/nios.h index 71e66072c..dc1ca24f4 100644 --- a/slsDetectorServers/slsDetectorServer/include/nios.h +++ b/slsDetectorServers/slsDetectorServer/include/nios.h @@ -78,7 +78,7 @@ u_int32_t readRegister(u_int32_t offset); * @param offset address offset * @param data 32 bit data */ -u_int32_t writeRegister(u_int32_t offset, u_int32_t data); +void writeRegister(u_int32_t offset, u_int32_t data); /** * Map FPGA diff --git a/slsDetectorServers/slsDetectorServer/include/programViaArm.h b/slsDetectorServers/slsDetectorServer/include/programViaArm.h new file mode 100644 index 000000000..0a943f7b6 --- /dev/null +++ b/slsDetectorServers/slsDetectorServer/include/programViaArm.h @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: LGPL-3.0-or-other +// Copyright (C) 2021 Contributors to the SLS Detector Package +#pragma once + +#include + +int resetFPGA(char *mess); +int loadDeviceTree(char *mess); + +int checksBeforeCreatingDeviceTree(char *mess); +int createDeviceTree(char *mess); +int verifyDeviceTree(char *mess); +#ifndef VIRTUAL +int createSymbolicLinksForDevices(int adcDeviceIndex, int dacDeviceIndex, + char *mess); +#endif \ No newline at end of file diff --git a/slsDetectorServers/slsDetectorServer/include/slsDetectorFunctionList.h b/slsDetectorServers/slsDetectorServer/include/slsDetectorFunctionList.h index d7858498f..ee7182f16 100644 --- a/slsDetectorServers/slsDetectorServer/include/slsDetectorFunctionList.h +++ b/slsDetectorServers/slsDetectorServer/include/slsDetectorFunctionList.h @@ -25,6 +25,11 @@ #include "blackfin.h" #endif +#ifdef ARMPROCESSOR +#include "arm64.h" +#include "programViaArm.h" +#endif + #ifdef MYTHEN3D #include "mythen3.h" #endif @@ -61,12 +66,15 @@ typedef struct udpStruct_s { int isInitCheckDone(); int getInitResult(char **mess); void basictests(); -#if defined(GOTTHARDD) || defined(JUNGFRAUD) || defined(MOENCHD) || \ - defined(CHIPTESTBOARDD) || defined(MYTHEN3D) || defined(GOTTHARD2D) +#if !defined(EIGERD) int checkType(); int testFpga(); +#ifdef XILINX_CHIPTESTBOARDD +int testFixedFPGAPattern(); +#else int testBus(); #endif +#endif #if defined(GOTTHARDD) || \ ((defined(EIGERD) || defined(JUNGFRAUD) || defined(MOENCHD)) && \ @@ -86,8 +94,10 @@ void getHardwareVersion(char *version); #ifdef EIGERD int getHardwareVersionNumber(); #else +#ifndef XILINX_CHIPTESTBOARDD u_int16_t getHardwareVersionNumber(); #endif +#endif #if defined(JUNGFRAUD) || defined(MOENCHD) || defined(CHIPTESTBOARDD) u_int16_t getHardwareSerialNumber(); #endif @@ -111,7 +121,6 @@ int updateModuleId(); void setModuleId(int modid); #endif #endif - u_int64_t getDetectorMAC(); u_int32_t getDetectorIP(); @@ -127,8 +136,11 @@ void checkVirtual9MFlag(); #endif // set up detector +#if defined(EIGERD) && !defined(VIRTUAL) +void setupFebBeb(); +#endif #if defined(EIGERD) || defined(MYTHEN3D) -void allocateDetectorStructureMemory(); +int allocateDetectorStructureMemory(); #endif void setupDetector(); #if defined(CHIPTESTBOARDD) @@ -136,7 +148,7 @@ int updateDatabytesandAllocateRAM(); void updateDataBytes(); #endif -#ifndef CHIPTESTBOARDD +#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) int resetToDefaultDacs(int hardReset); int getDefaultDac(enum DACINDEX index, enum detectorSettings sett, int *retval); int setDefaultDac(enum DACINDEX index, enum detectorSettings sett, int value); @@ -160,18 +172,32 @@ void resetToHardwareSettings(); // advanced read/write reg #ifdef EIGERD -int writeRegister(uint32_t offset, uint32_t data); +int writeRegister(uint32_t offset, uint32_t data, int validate); int readRegister(uint32_t offset, uint32_t *retval); -int setBit(const uint32_t addr, int nBit); -int clearBit(const uint32_t addr, int nBit); +int setBit(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); #elif GOTTHARDD -uint32_t writeRegister16And32(uint32_t offset, - uint32_t data); // FIXME its not there in ctb +void writeRegister16And32(uint32_t offset, uint32_t data); uint32_t readRegister16And32(uint32_t offset); #endif // firmware functions (resets) +#if defined(XILINX_CHIPTESTBOARDD) +void cleanFifos(); +void resetFlow(); +int waitTransceiverReset(char *mess); +#ifdef VIRTUAL +void setTransceiverAlignment(int align); +#endif +int isTransceiverAligned(); +int waitTransceiverAligned(char *mess); +int configureTransceiver(char *mess); +int isChipConfigured(); +int powerChip(int on, char *mess); +int getPowerChip(); +int configureChip(char *mess); +#endif #if defined(JUNGFRAUD) || defined(MOENCHD) || defined(CHIPTESTBOARDD) || \ defined(MYTHEN3D) || defined(GOTTHARD2D) void cleanFifos(); @@ -211,6 +237,12 @@ uint32_t getTransceiverEnableMask(); void setADCInvertRegister(uint32_t val); uint32_t getADCInvertRegister(); #endif +#ifdef XILINX_CHIPTESTBOARDD +void setADCEnableMask_10G(uint32_t mask); +uint32_t getADCEnableMask_10G(); +int setTransceiverEnableMask(uint32_t mask); +uint32_t getTransceiverEnableMask(); +#endif #if defined(CHIPTESTBOARDD) int setExternalSamplingSource(int val); int setExternalSampling(int val); @@ -226,7 +258,7 @@ int getParallelMode(); int setOverFlowMode(int mode); int getOverFlowMode(); #endif -#ifdef CHIPTESTBOARDD +#if defined(CHIPTESTBOARDD) || defined(XILINX_CHIPTESTBOARDD) int setReadoutMode(enum readoutMode mode); int getReadoutMode(); #endif @@ -237,7 +269,8 @@ int selectStoragecellStart(int pos); int getMaxStoragecellStart(); #endif #if defined(JUNGFRAUD) || defined(MOENCHD) || defined(EIGERD) || \ - defined(CHIPTESTBOARDD) + defined(CHIPTESTBOARDD) || defined(XILINX_CHIPTESTBOARDD) || \ + defined(GOTTHARD2D) int setNextFrameNumber(uint64_t value); int getNextFrameNumber(uint64_t *value); #endif @@ -282,11 +315,9 @@ int getNumAdditionalStorageCells(); int setStorageCellDelay(int64_t val); int64_t getStorageCellDelay(); #endif -#if defined(CHIPTESTBOARDD) +#if defined(CHIPTESTBOARDD) || defined(XILINX_CHIPTESTBOARDD) int setNumAnalogSamples(int val); int getNumAnalogSamples(); -#endif -#ifdef CHIPTESTBOARDD int setNumDigitalSamples(int val); int getNumDigitalSamples(); int setNumTransceiverSamples(int val); @@ -299,12 +330,15 @@ uint32_t getCounterMask(); void updatePacketizing(); #endif -#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(GOTTHARDD) || \ - defined(CHIPTESTBOARDD) || defined(MYTHEN3D) || defined(GOTTHARD2D) -int setDelayAfterTrigger(int64_t val); -int64_t getDelayAfterTrigger(); +#ifndef EIGERD int64_t getNumFramesLeft(); int64_t getNumTriggersLeft(); +#endif +#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(GOTTHARDD) || \ + defined(CHIPTESTBOARDD) || defined(MYTHEN3D) || defined(GOTTHARD2D) || \ + defined(XILINX_CHIPTESTBOARDD) +int setDelayAfterTrigger(int64_t val); +int64_t getDelayAfterTrigger(); int64_t getDelayAfterTriggerLeft(); int64_t getPeriodLeft(); #endif @@ -315,7 +349,7 @@ int64_t getNumBurstsLeft(); int64_t getExpTimeLeft(); #endif #if defined(JUNGFRAUD) || defined(MOENCHD) || defined(CHIPTESTBOARDD) || \ - defined(MYTHEN3D) || defined(GOTTHARD2D) + defined(MYTHEN3D) || defined(GOTTHARD2D) || defined(XILINX_CHIPTESTBOARDD) int64_t getFramesFromStart(); int64_t getActualTime(); int64_t getMeasurementTime(); @@ -337,10 +371,12 @@ int setTrimbits(int *trimbits); int setAllTrimbits(int val); int getAllTrimbits(); #endif +#ifndef XILINX_CHIPTESTBOARDD #ifndef CHIPTESTBOARDD enum detectorSettings setSettings(enum detectorSettings sett); #endif enum detectorSettings getSettings(); +#endif #if defined(JUNGFRAUD) enum gainMode getGainMode(); void setGainMode(enum gainMode mode); @@ -370,7 +406,7 @@ void setDAC(enum DACINDEX ind, int val, int mV); #endif int getDAC(enum DACINDEX ind, int mV); int getMaxDacSteps(); -#if defined(CHIPTESTBOARDD) +#if defined(CHIPTESTBOARDD) || defined(XILINX_CHIPTESTBOARDD) int dacToVoltage(int dac); int checkVLimitCompliant(int mV); int checkVLimitDacCompliant(int dac); @@ -389,9 +425,14 @@ int isPowerValid(enum DACINDEX ind, int val); int getPower(); void setPower(enum DACINDEX ind, int val); void powerOff(); +#elif XILINX_CHIPTESTBOARDD +int isPowerValid(enum DACINDEX ind, int val); + +int getPower(); +void setPower(enum DACINDEX ind, int val); #endif -#if defined(MYTHEN3D) || defined(GOTTHARD2D) +#if defined(MYTHEN3D) || defined(GOTTHARD2D) || defined(XILINX_CHIPTESTBOARDD) int getADC(enum ADCINDEX ind, int *value); #else int getADC(enum ADCINDEX ind); @@ -400,8 +441,15 @@ int getADC(enum ADCINDEX ind); int getSlowADC(int ichan); int getSlowADCTemperature(); #endif - +#ifdef XILINX_CHIPTESTBOARDD +int getSlowADC(int ichan, int *retval); +int getTemperature(int *retval); +#else int setHighVoltage(int val); +#if defined(MYTHEN3D) || defined(GOTTHARD2D) +int getHighVoltage(int *retval); +#endif +#endif // parameters - timing, extsig #if defined(EIGERD) || defined(GOTTHARD2D) || defined(JUNGFRAUD) || \ @@ -471,7 +519,8 @@ void setupHeader(int iRxEntry, enum interfaceType type, uint32_t destip, uint32_t sourceip, uint16_t sourceport); #endif #if defined(JUNGFRAUD) || defined(MOENCHD) || defined(GOTTHARD2D) || \ - defined(MYTHEN3D) || defined(CHIPTESTBOARDD) + defined(MYTHEN3D) || defined(CHIPTESTBOARDD) || \ + defined(XILINX_CHIPTESTBOARDD) void calcChecksum(udp_header *udp); #endif #ifdef GOTTHARDD @@ -559,6 +608,10 @@ uint64_t getSelectCurrentSource(); int getPedestalMode(); void getPedestalParameters(uint8_t *frames, uint16_t *loops); void setPedestalMode(int enable, uint8_t frames, uint16_t loops); +int setTimingInfoDecoder(enum timingInfoDecoder val); +int getTimingInfoDecoder(enum timingInfoDecoder *retval); +int getElectronCollectionMode(); +void setElectronCollectionMode(int enable); #endif // eiger specific - iodelay, pulse, rate, temp, activate, delay nw parameter @@ -605,10 +658,14 @@ int setClockDivider(enum CLKINDEX ind, int val); int setClockDividerWithTimeUpdateOption(enum CLKINDEX ind, int val, int timeUpdate); int getClockDivider(enum CLKINDEX ind); - +int setReadoutSpeed(int val); +int getReadoutSpeed(int *retval); #elif GOTTHARD2D int checkDetectorType(char *mess); -int powerChip(int on); +int powerChip(int on, char *mess); +int getPowerChip(); +int isChipConfigured(); +int configureChip(char *mess); void setDBITPipeline(int val); int getDBITPipeline(); int setPhase(enum CLKINDEX ind, int val, int degrees); @@ -679,13 +736,14 @@ int startStateMachine(); void *start_timer(void *arg); #endif int stopStateMachine(); -#ifdef MYTHEN3D +#if defined(MYTHEN3D) || defined(XILINX_CHIPTESTBOARDD) int softwareTrigger(); #endif #if defined(EIGERD) || defined(JUNGFRAUD) || defined(MOENCHD) int softwareTrigger(int block); #endif -#if defined(EIGERD) || defined(MYTHEN3D) || defined(CHIPTESTBOARDD) +#if defined(EIGERD) || defined(MYTHEN3D) || defined(CHIPTESTBOARDD) || \ + defined(XILINX_CHIPTESTBOARDD) int startReadOut(); #endif enum runStatus getRunStatus(); @@ -705,7 +763,8 @@ int readFrameFromFifo(); #endif #if defined(GOTTHARDD) || defined(JUNGFRAUD) || defined(MOENCHD) || \ - defined(CHIPTESTBOARDD) || defined(MYTHEN3D) || defined(GOTTHARD2D) + defined(CHIPTESTBOARDD) || defined(MYTHEN3D) || defined(GOTTHARD2D) || \ + defined(XILINX_CHIPTESTBOARDD) u_int32_t runBusy(); #endif @@ -716,9 +775,9 @@ u_int32_t runState(enum TLogLevel lev); // common int calculateDataBytes(); int getTotalNumberOfChannels(); -#if defined(CHIPTESTBOARDD) +#if defined(CHIPTESTBOARDD) || defined(XILINX_CHIPTESTBOARDD) void getNumberOfChannels(int *nchanx, int *nchany); #endif int getNumberOfChips(); int getNumberOfDACs(); -int getNumberOfChannelsPerChip(); +int getNumberOfChannelsPerChip(); \ No newline at end of file diff --git a/slsDetectorServers/slsDetectorServer/include/slsDetectorServer_funcs.h b/slsDetectorServers/slsDetectorServer/include/slsDetectorServer_funcs.h index 4bf70907f..33f37becc 100644 --- a/slsDetectorServers/slsDetectorServer/include/slsDetectorServer_funcs.h +++ b/slsDetectorServers/slsDetectorServer/include/slsDetectorServer_funcs.h @@ -11,6 +11,8 @@ // initialization functions int updateModeAllowedFunction(int file_des); int printSocketReadError(); +int sendError(int file_des); +void setMemoryAllocationErrorMessage(); void init_detector(); int decode_function(int); const char *getRetName(); @@ -329,3 +331,8 @@ int getColumn(); int setColumn(int); int get_pedestal_mode(int); int set_pedestal_mode(int); +int config_transceiver(int); +int get_timing_info_decoder(int); +int set_timing_info_decoder(int); +int get_collection_mode(int); +int set_collection_mode(int); diff --git a/slsDetectorServers/slsDetectorServer/src/DAC6571.c b/slsDetectorServers/slsDetectorServer/src/DAC6571.c index 3ed121aae..d9770043a 100644 --- a/slsDetectorServers/slsDetectorServer/src/DAC6571.c +++ b/slsDetectorServers/slsDetectorServer/src/DAC6571.c @@ -15,12 +15,19 @@ int DAC6571_HardMaxVoltage = 0; char DAC6571_DriverFileName[MAX_STR_LENGTH]; +#ifdef VIRTUAL +int highvoltage = 0; +#endif + void DAC6571_SetDefines(int hardMaxV, char *driverfname) { LOG(logINFOBLUE, ("Configuring High Voltage to %s (hard max: %dV)\n", driverfname, hardMaxV)); DAC6571_HardMaxVoltage = hardMaxV; memset(DAC6571_DriverFileName, 0, MAX_STR_LENGTH); strcpy(DAC6571_DriverFileName, driverfname); +#ifdef VIRTUAL + highvoltage = 0; +#endif } int DAC6571_Set(int val) { @@ -31,11 +38,58 @@ int DAC6571_Set(int val) { int dacvalue = 0; // convert value - ConvertToDifferentRange(0, DAC6571_HardMaxVoltage, DAC6571_MIN_DAC_VAL, - DAC6571_MAX_DAC_VAL, val, &dacvalue); - + if (ConvertToDifferentRange(0, DAC6571_HardMaxVoltage, DAC6571_MIN_DAC_VAL, + DAC6571_MAX_DAC_VAL, val, &dacvalue) == FAIL) { + LOG(logERROR, + ("Could not convert %d high voltage to a valid dac value\n", val)); + return FAIL; + } LOG(logINFO, ("\t%dV (dacval %d)\n", val, dacvalue)); +#ifdef VIRTUAL + highvoltage = dacvalue; +#else + // open file + FILE *fd = fopen(DAC6571_DriverFileName, "w"); + if (fd == NULL) { + LOG(logERROR, + ("Could not open file %s for writing to set high voltage\n", + DAC6571_DriverFileName)); + return FAIL; + } + // convert to string, add 0 and write to file + fprintf(fd, "%d\n", dacvalue); + fclose(fd); +#endif + + return OK; +} + +int DAC6571_Get(int *retval) { + LOG(logDEBUG1, ("Getting high voltage\n")); + int dacvalue = 0; + +#ifdef VIRTUAL + dacvalue = highvoltage; +#else + if (readParameterFromFile(DAC6571_DriverFileName, "high voltage", + &dacvalue) == FAIL) { + LOG(logERROR, ("Could not get high voltage\n")); + return FAIL; + } +#endif + + // convert value + if (ConvertToDifferentRange(DAC6571_MIN_DAC_VAL, DAC6571_MAX_DAC_VAL, 0, + DAC6571_HardMaxVoltage, dacvalue, + retval) == FAIL) { + LOG(logERROR, + ("Could not convert %d dac value to a valid high voltage\n", + dacvalue)); + return FAIL; + } + LOG(logINFO, ("\t%dV (dacval %d)\n", (*retval), dacvalue)); + #ifndef VIRTUAL // open file FILE *fd = fopen(DAC6571_DriverFileName, "w"); diff --git a/slsDetectorServers/slsDetectorServer/src/LTC2620_Driver.c b/slsDetectorServers/slsDetectorServer/src/LTC2620_Driver.c index 5add339b1..c92c111f4 100644 --- a/slsDetectorServers/slsDetectorServer/src/LTC2620_Driver.c +++ b/slsDetectorServers/slsDetectorServer/src/LTC2620_Driver.c @@ -9,39 +9,59 @@ /* LTC2620 DAC DEFINES */ #define LTC2620_D_PWR_DOWN_VAL (-100) +#define LTC2620_D_MIN_DAC_VAL (0) #define LTC2620_D_MAX_DAC_VAL (4095) // 12 bits #define LTC2620_D_MAX_STEPS (LTC2620_D_MAX_DAC_VAL + 1) // defines from the fpga +int LTC2620_D_HardMinVoltage = 0; int LTC2620_D_HardMaxVoltage = 0; char LTC2620_D_DriverFileName[MAX_STR_LENGTH]; +char LTC2620_D_PowerDownDriverFileName[MAX_STR_LENGTH]; int LTC2620_D_NumDacs = 0; +int LTC2620_D_NumDacsOnly = 0; -void LTC2620_D_SetDefines(int hardMaxV, char *driverfname, int numdacs) { +void LTC2620_D_SetDefines(int hardMinV, int hardMaxV, char *driverfname, + int numdacs, int numpowers, + char *powerdownDriverfname) { LOG(logINFOBLUE, - ("Configuring DACs (LTC2620) to %s (numdacs:%d, hard max: %dmV)\n", - driverfname, numdacs, hardMaxV)); + ("Configuring DACs (LTC2620) to %s\n\t (numdacs:%d, hard min:%d, hard " + "max: %dmV)\n", + driverfname, numdacs, hardMinV, hardMaxV)); + LTC2620_D_HardMinVoltage = hardMinV; LTC2620_D_HardMaxVoltage = hardMaxV; memset(LTC2620_D_DriverFileName, 0, MAX_STR_LENGTH); strcpy(LTC2620_D_DriverFileName, driverfname); + memset(LTC2620_D_PowerDownDriverFileName, 0, MAX_STR_LENGTH); + strcpy(LTC2620_D_PowerDownDriverFileName, powerdownDriverfname); LTC2620_D_NumDacs = numdacs; + LTC2620_D_NumDacsOnly = numdacs - numpowers; } int LTC2620_D_GetMaxNumSteps() { return LTC2620_D_MAX_STEPS; } +int LTC2620_D_GetPowerDownValue() { return LTC2620_D_PWR_DOWN_VAL; } + +int LTC2620_D_GetMinInput() { return LTC2620_D_MIN_DAC_VAL; } + +int LTC2620_D_GetMaxInput() { return LTC2620_D_MAX_DAC_VAL; } + int LTC2620_D_VoltageToDac(int voltage, int *dacval) { - return ConvertToDifferentRange(0, LTC2620_D_HardMaxVoltage, 0, + return ConvertToDifferentRange(LTC2620_D_HardMinVoltage, + LTC2620_D_HardMaxVoltage, 0, LTC2620_D_MAX_DAC_VAL, voltage, dacval); } int LTC2620_D_DacToVoltage(int dacval, int *voltage) { - return ConvertToDifferentRange(0, LTC2620_D_MAX_DAC_VAL, 0, + return ConvertToDifferentRange(0, LTC2620_D_MAX_DAC_VAL, + LTC2620_D_HardMinVoltage, LTC2620_D_HardMaxVoltage, dacval, voltage); } int LTC2620_D_SetDACValue(int dacnum, int val, int mV, char *dacname, int *dacval) { LOG(logDEBUG1, ("dacnum:%d, val:%d, ismV:%d\n", dacnum, val, mV)); + // validate index if (dacnum < 0 || dacnum >= LTC2620_D_NumDacs) { LOG(logERROR, ("Dac index %d is out of bounds (0 to %d)\n", dacnum, @@ -49,53 +69,98 @@ int LTC2620_D_SetDACValue(int dacnum, int val, int mV, char *dacname, return FAIL; } - // get + // validate set if (val < 0 && val != LTC2620_D_PWR_DOWN_VAL) return FAIL; - // convert to dac or get mV value - *dacval = val; - int dacmV = val; int ret = OK; - if (mV) { - ret = LTC2620_D_VoltageToDac(val, dacval); - } else if (val >= 0) { - // do not convert power down dac val - ret = LTC2620_D_DacToVoltage(val, &dacmV); - } - - // conversion out of bounds - if (ret == FAIL) { - LOG(logERROR, ("Setting Dac %d %s is out of bounds\n", dacnum, - (mV ? "mV" : "dac units"))); - return FAIL; - } - - // set - if ((*dacval >= 0) || (*dacval == LTC2620_D_PWR_DOWN_VAL)) { - LOG(logINFO, ("Setting DAC %2d [%-12s] : %d dac (%d mV)\n", dacnum, - dacname, *dacval, dacmV)); - + *dacval = val; #ifndef VIRTUAL - char fname[MAX_STR_LENGTH]; - strcpy(fname, LTC2620_D_DriverFileName); - char temp[20]; - memset(temp, 0, sizeof(temp)); - sprintf(temp, "%d", dacnum); - strcat(fname, temp); - LOG(logDEBUG1, ("fname %s\n", fname)); + char fnameFormat[MAX_STR_LENGTH]; + memset(fnameFormat, 0, MAX_STR_LENGTH); + strcpy(fnameFormat, LTC2620_D_DriverFileName); +#endif - // open file - FILE *fd = fopen(fname, "w"); - if (fd == NULL) { - LOG(logERROR, ("Could not open file %s for writing to set dac %d\n", - fname, dacnum)); - return FAIL; - } - // convert to string, add 0 and write to file - fprintf(fd, "%d\n", *dacval); - fclose(fd); + // power down dac (different file name) + if (val == LTC2620_D_PWR_DOWN_VAL) { +#if defined(XILINX_CHIPTESTBOARDD) && !defined(VIRTUAL) + LOG(logINFO, ("Powering down DAC %2d [%-6s] \n", dacnum, dacname)); + strcpy(fnameFormat, LTC2620_D_PowerDownDriverFileName); #endif } + + // proper value to set + else { + // convert to dac or get mV value + int dacmV = val; + if (mV) { + ret = LTC2620_D_VoltageToDac(val, dacval); + } + + // mV only for print out (dont convert to mV for power regulators) + else if (val >= 0 && dacnum < LTC2620_D_NumDacsOnly) { + // do not convert power down dac val + ret = LTC2620_D_DacToVoltage(val, &dacmV); + } + + // conversion out of bounds + if (ret == FAIL) { + LOG(logERROR, ("Setting Dac %d %s is out of bounds\n", dacnum, + (mV ? "mV" : "dac units"))); + return FAIL; + } + + // print and set +#ifdef XILINX_CHIPTESTBOARDD + if (*dacval >= 0) { + // also print mV + if (dacnum < LTC2620_D_NumDacsOnly) { + LOG(logINFO, ("Setting DAC %2d [%-6s] : %d dac (%d mV)\n", + dacnum, dacname, *dacval, dacmV)); + } + // do not print mV for power regulators + else { + LOG(logINFO, ("Setting Power DAC%2d [%-6s] : %d dac \n", dacnum, + dacname, *dacval)); + } + } +#else + if ((*dacval >= 0) || (*dacval == LTC2620_D_PWR_DOWN_VAL)) { + LOG(logINFO, ("Setting DAC %2d [%-12s] : %d dac (%d mV)\n", dacnum, + dacname, *dacval, dacmV)); + } +#endif + } + + // set in file +#ifndef VIRTUAL + char fname[MAX_STR_LENGTH]; + memset(fname, 0, MAX_STR_LENGTH); +#ifdef XILINX_CHIPTESTBOARDD + sprintf(fname, fnameFormat, dacnum); +#else + sprintf(fname, "%s%d", fnameFormat, dacnum); +#endif + LOG(logDEBUG1, ("fname %s\n", fname)); + + // open file + FILE *fd = fopen(fname, "w"); + if (fd == NULL) { + LOG(logERROR, ("Could not open file %s for writing to set dac %d\n", + fname, dacnum)); + return FAIL; + } + // convert to string, add 0 and write to file +#ifdef XILINX_CHIPTESTBOARDD + // not changing *dacval from -100 (cant write -100 to file: invalid arg) + int writeValue = *dacval; + if (writeValue == LTC2620_D_PWR_DOWN_VAL) + writeValue = 1; + fprintf(fd, "%d\n", writeValue); +#else + fprintf(fd, "%d\n", *dacval); +#endif + fclose(fd); +#endif return OK; } diff --git a/slsDetectorServers/slsDetectorServer/src/arm64.c b/slsDetectorServers/slsDetectorServer/src/arm64.c new file mode 100644 index 000000000..0c1cbc67f --- /dev/null +++ b/slsDetectorServers/slsDetectorServer/src/arm64.c @@ -0,0 +1,98 @@ +// SPDX-License-Identifier: LGPL-3.0-or-other +// Copyright (C) 2021 Contributors to the SLS Detector Package +#include "arm64.h" +#include "RegisterDefs.h" +#include "clogger.h" +#include "common.h" +#include "sls/ansi.h" +#include "sls/sls_detector_defs.h" + +#include // open +#include // mmap + +/* global variables */ +#define CSP0 (0xB0080000) +#define CSP1 (0xB0050000) // udp +#define MEM_SIZE_CSP0 (0x10000) +#define MEM_SIZE_CSP1 (0x2000) // smaller size for udp + +u_int32_t *csp0base = 0; +u_int32_t *csp1base = 0; + +void bus_w(u_int32_t offset, u_int32_t data) { + volatile u_int32_t *ptr1; + ptr1 = (u_int32_t *)(csp0base + offset / (sizeof(u_int32_t))); + *ptr1 = data; +} + +u_int32_t bus_r(u_int32_t offset) { + volatile u_int32_t *ptr1; + ptr1 = (u_int32_t *)(csp0base + offset / (sizeof(u_int32_t))); + return *ptr1; +} + +uint64_t getU64BitReg(int aLSB, int aMSB) { + uint64_t retval = bus_r(aMSB); + retval = (retval << 32) | bus_r(aLSB); + return retval; +} + +void setU64BitReg(uint64_t value, int aLSB, int aMSB) { + bus_w(aLSB, value & (0xffffffff)); + bus_w(aMSB, (value >> 32) & (0xffffffff)); +} + +u_int32_t readRegister(u_int32_t offset) { return bus_r(offset); } + +u_int32_t writeRegister(u_int32_t offset, u_int32_t data) { + bus_w(offset, data); + return readRegister(offset); +} + +int mapCSP0(void) { + LOG(logINFO, ("Mapping memory\n")); + u_int32_t csps[2] = {CSP0, CSP1}; + u_int32_t **cspbases[2] = {&csp0base, &csp1base}; + u_int32_t memsize[2] = {MEM_SIZE_CSP0, MEM_SIZE_CSP1}; + char names[2][10] = {"csp0base", "csp1base"}; + + for (int i = 0; i < 2; ++i) { + // if not mapped + if (*cspbases[i] == 0) { + LOG(logINFO, ("\tMapping memory for %s\n", names[i])); +#ifdef VIRTUAL + *cspbases[i] = malloc(memsize[i]); + if (*cspbases[i] == NULL) { + LOG(logERROR, + ("Could not allocate virtual memory of size %d for %s.\n", + memsize[i], names[i])); + return FAIL; + } + LOG(logINFO, ("\tmemory allocated for %s\n", names[i])); +#else + int fd = open("/dev/mem", O_RDWR | O_SYNC, 0); + if (fd == -1) { + LOG(logERROR, ("Can't find /dev/mem for %s\n", names[i])); + return FAIL; + } + LOG(logDEBUG1, + ("\t/dev/mem opened for %s, (CSP:0x%x)\n", names[i], csps[i])); + *cspbases[i] = + (u_int32_t *)mmap(0, memsize[i], PROT_READ | PROT_WRITE, + MAP_FILE | MAP_SHARED, fd, csps[i]); + if (*cspbases[i] == MAP_FAILED) { + LOG(logERROR, ("Can't map memmory area for %s\n", names[i])); + return FAIL; + } +#endif + LOG(logINFO, + ("\t%s mapped of size %d from %p to %p,(CSP:0x%x) \n", names[i], + memsize[i], *cspbases[i], *cspbases[i] + memsize[i], csps[i])); + // LOG(logINFO, ("Status Register: %08x\n", bus_r(STATUS_REG))); + } else + LOG(logINFO, ("\tMemory %s already mapped before\n", names[i])); + } + return OK; +} + +u_int32_t *Arm_getUDPBaseAddress() { return csp1base; } diff --git a/slsDetectorServers/slsDetectorServer/src/blackfin.c b/slsDetectorServers/slsDetectorServer/src/blackfin.c index dc9011b96..06322de6d 100644 --- a/slsDetectorServers/slsDetectorServer/src/blackfin.c +++ b/slsDetectorServers/slsDetectorServer/src/blackfin.c @@ -84,32 +84,16 @@ u_int32_t readRegister(u_int32_t offset) { return bus_r(offset << MEM_MAP_SHIFT); } -u_int32_t writeRegister(u_int32_t offset, u_int32_t data) { - // if electron mode bit touched -#ifdef JUNGFRAUD - int electronCollectionModeChange = 0; - if ((offset << MEM_MAP_SHIFT) == DAQ_REG) { - if ((readRegister(offset) ^ data) & DAQ_ELCTRN_CLLCTN_MDE_MSK) { - electronCollectionModeChange = 1; - } - } -#endif +void writeRegister(u_int32_t offset, u_int32_t data) { bus_w(offset << MEM_MAP_SHIFT, data); -#ifdef JUNGFRAUD - if (electronCollectionModeChange) { - configureChip(); - } -#endif - return readRegister(offset); } u_int32_t readRegister16(u_int32_t offset) { return (u_int32_t)bus_r16(offset << MEM_MAP_SHIFT); } -u_int32_t writeRegister16(u_int32_t offset, u_int32_t data) { +void writeRegister16(u_int32_t offset, u_int32_t data) { bus_w16(offset << MEM_MAP_SHIFT, (u_int16_t)data); - return readRegister16(offset); } int mapCSP0(void) { diff --git a/slsDetectorServers/slsDetectorServer/src/common.c b/slsDetectorServers/slsDetectorServer/src/common.c index 3a00038e3..a978050f1 100644 --- a/slsDetectorServers/slsDetectorServer/src/common.c +++ b/slsDetectorServers/slsDetectorServer/src/common.c @@ -8,6 +8,7 @@ #include // dirname #include +#include // stat #include // uname #include // readlink @@ -114,6 +115,11 @@ int getTimeFromString(char *buf, time_t *result) { t.tm_mday, t.tm_mon, t.tm_year + 1900, t.tm_hour, t.tm_min, t.tm_sec)); *result = mktime(&t); + /* Do not check as it fails with nios + if (*result == (time_t)-1) { + LOG(logERROR, ("Could not convert time structure to time_t\n")); + return FAIL; + }*/ return OK; } @@ -143,14 +149,25 @@ int validateKernelVersion(char *expectedVersion) { #ifdef VIRTUAL strcpy(currentVersion, expectedVersion); #else +#ifndef ARMPROCESSOR // remove first word (#version number) - const char *ptr = strchr(version, ' '); + const char *ptr = strstr(version, " "); if (ptr == NULL) { LOG(logERROR, ("Could not parse kernel version\n")); return FAIL; } - strcpy(currentVersion, version + (ptr - version + 1)); + strcpy(currentVersion, ptr + 1); +#else + // remove first two words (#version number and SMP) + const char *ptr = strstr(version, "SMP "); + if (ptr == NULL) { + LOG(logERROR, ("Could not parse kernel version\n")); + return FAIL; + } + strcpy(currentVersion, ptr + 4); #endif +#endif + currentVersion[sizeof(currentVersion) - 1] = '\0'; // convert kernel date string into time time_t kernelDate; @@ -159,6 +176,7 @@ int validateKernelVersion(char *expectedVersion) { ("Could not parse retrieved kernel date, %s\n", currentVersion)); return FAIL; } + LOG(logDEBUG, ("Kernel Date: [%s]\n", ctime(&kernelDate))); // convert expected date into time time_t expDate; @@ -167,11 +185,12 @@ int validateKernelVersion(char *expectedVersion) { ("Could not parse expected kernel date, %s\n", expectedVersion)); return FAIL; } + LOG(logDEBUG, ("Expected Date: [%s]\n", ctime(&expDate))); // compare if kernel time is older than expected time if (kernelDate < expDate) { - LOG(logERROR, ("Kernel Version Incompatible (too old)! Expected: [%s], " - "Got [%s]\n", + LOG(logERROR, ("Kernel Version Incompatible (too old)!\nExpected: '%s'" + "\nGot : '%s'\n", expectedVersion, currentVersion)); return FAIL; } @@ -659,31 +678,7 @@ int deleteFile(char *mess, char *fname, char *errorPrefix) { return FAIL; } - if (access(fullname, F_OK) == 0) { - char cmd[MAX_STR_LENGTH] = {0}; - char retvals[MAX_STR_LENGTH] = {0}; - - if (snprintf(cmd, MAX_STR_LENGTH, "rm %s", fullname) >= - MAX_STR_LENGTH) { - sprintf(mess, "Could not %s. Command to delete is too long\n", - errorPrefix); - LOG(logERROR, (mess)); - return FAIL; - } - - if (executeCommand(cmd, retvals, logDEBUG1) == FAIL) { - snprintf(mess, MAX_STR_LENGTH, - "Could not %s. (deleting file %s). %s\n", errorPrefix, - fullname, retvals); - LOG(logERROR, (mess)); - return FAIL; - } - LOG(logINFO, ("\tDeleted file: %s (%s)\n", fullname, errorPrefix)); - } else { - LOG(logINFO, - ("\tFile does not exist anyway: %s (%s)\n", fullname, errorPrefix)); - } - return OK; + return deleteItem(mess, 1, fullname, errorPrefix); } int deleteOldServers(char *mess, char *newServerPath, char *errorPrefix) { @@ -709,8 +704,8 @@ int deleteOldServers(char *mess, char *newServerPath, char *errorPrefix) { return OK; } -int readADCFromFile(char *fname, int *value) { - LOG(logDEBUG1, ("fname:%s\n", fname)); +int readParameterFromFile(char *fname, char *parameterName, int *value) { + LOG(logDEBUG1, ("fname:%s parameter:%s\n", fname, parameterName)); // open file FILE *fd = fopen(fname, "r"); if (fd == NULL) { @@ -734,16 +729,66 @@ int readADCFromFile(char *fname, int *value) { *value = -1; if (sscanf(line, "%d", value) != 1) { - LOG(logERROR, ("Could not scan temperature from %s\n", line)); + LOG(logERROR, ("Could not scan %s from %s\n", parameterName, line)); return FAIL; } -#ifdef EIGERD - *value /= 10; -#else - LOG(logINFO, ("Temperature: %.2f °C\n", (double)(*value) / 1000.00)); -#endif - fclose(fd); return OK; +} + +int createAbsoluteDirectory(char *mess, const char *absPath, + char *errorPrefix) { + // check if folder exists + if (access(absPath, F_OK) == 0) { + LOG(logINFO, ("Folder %s already exists\n", absPath)); + return OK; + } + + // folder does not exist, create it + if (mkdir(absPath, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) != 0) { + sprintf(mess, "Could not %s. Could not create folder %s\n", errorPrefix, + absPath); + LOG(logERROR, (mess)); + return FAIL; + } + LOG(logINFO, ("\tCreated folder: %s (%s)\n", absPath, errorPrefix)); + + return OK; +} + +int deleteAbsoluteDirectory(char *mess, const char *absPath, + char *errorPrefix) { + return deleteItem(mess, 0, absPath, errorPrefix); +} + +int deleteItem(char *mess, int isFile, const char *absPath, char *errorPrefix) { + // item does not exist + if (access(absPath, F_OK) != 0) { + LOG(logINFO, ("\t%s does not exist anyway: %s (%s)\n", + (isFile ? "File" : "Folder"), absPath, errorPrefix)); + return OK; + } + + // delete item + char cmd[MAX_STR_LENGTH] = {0}; + char retvals[MAX_STR_LENGTH] = {0}; + if (snprintf(cmd, MAX_STR_LENGTH, "rm %s %s", (isFile ? "-f" : "-rf"), + absPath) >= MAX_STR_LENGTH) { + sprintf(mess, "Could not %s. Command to delete is too long\n", + errorPrefix); + LOG(logERROR, (mess)); + return FAIL; + } + + if (executeCommand(cmd, retvals, logDEBUG1) == FAIL) { + snprintf(mess, MAX_STR_LENGTH, "Could not %s. (deleting %s %s). %s\n", + errorPrefix, (isFile ? "file" : "folder"), absPath, retvals); + LOG(logERROR, (mess)); + return FAIL; + } + LOG(logINFO, ("\tDeleted %s: %s (%s)\n", (isFile ? "file" : "folder"), + absPath, errorPrefix)); + + return OK; } \ No newline at end of file diff --git a/slsDetectorServers/slsDetectorServer/src/communication_funcs.c b/slsDetectorServers/slsDetectorServer/src/communication_funcs.c index 690eb0674..bcec87fdc 100644 --- a/slsDetectorServers/slsDetectorServer/src/communication_funcs.c +++ b/slsDetectorServers/slsDetectorServer/src/communication_funcs.c @@ -590,13 +590,16 @@ int Server_SendResult(int fileDes, intType itype, void *retval, sendData(fileDes, &ret1, sizeof(ret1), INT32); if (ret == FAIL) { // send error message - if (strlen(mess)) + if (strlen(mess)) { sendData(fileDes, mess, MAX_STR_LENGTH, OTHER); + usleep(0); // test + } // debugging feature. should not happen. - else + else { LOG(logERROR, ("No error message provided for this failure in %s " "server. Will mess up TCP.\n", (isControlServer ? "control" : "stop"))); + } } // send return value sendData(fileDes, retval, retvalSize, itype); diff --git a/slsDetectorServers/slsDetectorServer/src/loadPattern.c b/slsDetectorServers/slsDetectorServer/src/loadPattern.c index 1c2e49f04..02399321e 100644 --- a/slsDetectorServers/slsDetectorServer/src/loadPattern.c +++ b/slsDetectorServers/slsDetectorServer/src/loadPattern.c @@ -13,7 +13,7 @@ extern enum TLogLevel trimmingPrint; #endif -#ifdef CHIPTESTBOARDD +#if defined(CHIPTESTBOARDD) || defined(XILINX_CHIPTESTBOARDD) #ifdef VIRTUAL uint64_t virtual_pattern[MAX_PATTERN_LENGTH]; #endif @@ -21,8 +21,8 @@ uint64_t virtual_pattern[MAX_PATTERN_LENGTH]; extern void bus_w(u_int32_t offset, u_int32_t data); extern u_int32_t bus_r(u_int32_t offset); -extern int64_t get64BitReg(int aLSB, int aMSB); -extern int64_t set64BitReg(int64_t value, int aLSB, int aMSB); +// extern int64_t get64BitReg(int aLSB, int aMSB); TODO for all servers (only +// uint64_t) extern int64_t set64BitReg(int64_t value, int aLSB, int aMSB); extern uint64_t getU64BitReg(int aLSB, int aMSB); extern void setU64BitReg(uint64_t value, int aLSB, int aMSB); @@ -44,18 +44,34 @@ void initializePatternAddresses() { } } -#ifdef CHIPTESTBOARDD +#if defined(CHIPTESTBOARDD) || defined(XILINX_CHIPTESTBOARDD) #ifdef VIRTUAL void initializePatternWord() { memset(virtual_pattern, 0, sizeof(virtual_pattern)); } #endif +#endif +#if defined(CHIPTESTBOARDD) || defined(XILINX_CHIPTESTBOARDD) uint64_t validate_readPatternIOControl() { +#if defined(CHIPTESTBOARDD) return getU64BitReg(PATTERN_IO_CNTRL_LSB_REG, PATTERN_IO_CNTRL_MSB_REG); +#elif defined(XILINX_CHIPTESTBOARDD) + return (uint64_t)(bus_r(PINIOCTRLREG)); +#endif } int validate_writePatternIOControl(char *message, uint64_t arg) { + // validate input +#ifdef XILINX_CHIPTESTBOARDD + if (arg > BIT32_MSK) { + strcpy(message, "Could not set pattern IO Control. Must be 32 bit for " + "this detector\n"); + LOG(logERROR, (message)); + return FAIL; + } +#endif + writePatternIOControl(arg); // validate result @@ -75,9 +91,15 @@ int validate_writePatternIOControl(char *message, uint64_t arg) { } void writePatternIOControl(uint64_t word) { +#ifdef CHIPTESTBOARDD LOG(logINFO, ("Setting Pattern I/O Control: 0x%llx\n", (long long int)word)); setU64BitReg(word, PATTERN_IO_CNTRL_LSB_REG, PATTERN_IO_CNTRL_MSB_REG); +#elif defined(XILINX_CHIPTESTBOARDD) + uint32_t val = (uint32_t)word; + LOG(logINFO, ("Setting Pattern I/O Control: 0x%x\n", val)); + bus_w(PINIOCTRLREG, val); +#endif } #endif @@ -101,7 +123,7 @@ uint64_t readPatternWord(int addr) { // the first word in RAM as base plus the offset of the word to write (addr) uint32_t reg_lsb = PATTERN_STEP0_LSB_REG + addr * REG_OFFSET * 2; uint32_t reg_msb = PATTERN_STEP0_MSB_REG + addr * REG_OFFSET * 2; - return get64BitReg(reg_lsb, reg_msb); + return getU64BitReg(reg_lsb, reg_msb); #else LOG(logDEBUG1, (" Reading (Executing) Pattern Word (addr:0x%x)\n", addr)); uint32_t reg = PATTERN_CNTRL_REG; @@ -118,7 +140,7 @@ uint64_t readPatternWord(int addr) { // read value #ifndef VIRTUAL - return get64BitReg(PATTERN_OUT_LSB_REG, PATTERN_OUT_MSB_REG); + return getU64BitReg(PATTERN_OUT_LSB_REG, PATTERN_OUT_MSB_REG); #else return virtual_pattern[addr]; #endif @@ -160,7 +182,7 @@ void writePatternWord(int addr, uint64_t word) { uint32_t reg = PATTERN_CNTRL_REG; // write word - set64BitReg(word, PATTERN_IN_LSB_REG, PATTERN_IN_MSB_REG); + setU64BitReg(word, PATTERN_IN_LSB_REG, PATTERN_IN_MSB_REG); // overwrite with only addr bus_w(reg, ((addr << PATTERN_CNTRL_ADDR_OFST) & PATTERN_CNTRL_ADDR_MSK)); @@ -178,7 +200,7 @@ void writePatternWord(int addr, uint64_t word) { // the first word in RAM as base plus the offset of the word to write (addr) uint32_t reg_lsb = PATTERN_STEP0_LSB_REG + addr * REG_OFFSET * 2; uint32_t reg_msb = PATTERN_STEP0_MSB_REG + addr * REG_OFFSET * 2; - set64BitReg(word, reg_lsb, reg_msb); + setU64BitReg(word, reg_lsb, reg_msb); #endif } @@ -311,24 +333,24 @@ int validate_getPatternWaitTime(char *message, int level, uint64_t *waittime) { uint64_t getPatternWaitTime(int level) { switch (level) { case 0: - return get64BitReg(PATTERN_WAIT_TIMER_0_LSB_REG, - PATTERN_WAIT_TIMER_0_MSB_REG); + return getU64BitReg(PATTERN_WAIT_TIMER_0_LSB_REG, + PATTERN_WAIT_TIMER_0_MSB_REG); case 1: - return get64BitReg(PATTERN_WAIT_TIMER_1_LSB_REG, - PATTERN_WAIT_TIMER_1_MSB_REG); + return getU64BitReg(PATTERN_WAIT_TIMER_1_LSB_REG, + PATTERN_WAIT_TIMER_1_MSB_REG); case 2: - return get64BitReg(PATTERN_WAIT_TIMER_2_LSB_REG, - PATTERN_WAIT_TIMER_2_MSB_REG); + return getU64BitReg(PATTERN_WAIT_TIMER_2_LSB_REG, + PATTERN_WAIT_TIMER_2_MSB_REG); #ifndef MYTHEN3D case 3: - return get64BitReg(PATTERN_WAIT_TIMER_3_LSB_REG, - PATTERN_WAIT_TIMER_3_MSB_REG); + return getU64BitReg(PATTERN_WAIT_TIMER_3_LSB_REG, + PATTERN_WAIT_TIMER_3_MSB_REG); case 4: - return get64BitReg(PATTERN_WAIT_TIMER_4_LSB_REG, - PATTERN_WAIT_TIMER_4_MSB_REG); + return getU64BitReg(PATTERN_WAIT_TIMER_4_LSB_REG, + PATTERN_WAIT_TIMER_4_MSB_REG); case 5: - return get64BitReg(PATTERN_WAIT_TIMER_5_LSB_REG, - PATTERN_WAIT_TIMER_5_MSB_REG); + return getU64BitReg(PATTERN_WAIT_TIMER_5_LSB_REG, + PATTERN_WAIT_TIMER_5_MSB_REG); #endif default: return -1; @@ -369,29 +391,29 @@ void setPatternWaitTime(int level, uint64_t t) { (long long int)t)); switch (level) { case 0: - set64BitReg(t, PATTERN_WAIT_TIMER_0_LSB_REG, - PATTERN_WAIT_TIMER_0_MSB_REG); + setU64BitReg(t, PATTERN_WAIT_TIMER_0_LSB_REG, + PATTERN_WAIT_TIMER_0_MSB_REG); break; case 1: - set64BitReg(t, PATTERN_WAIT_TIMER_1_LSB_REG, - PATTERN_WAIT_TIMER_1_MSB_REG); + setU64BitReg(t, PATTERN_WAIT_TIMER_1_LSB_REG, + PATTERN_WAIT_TIMER_1_MSB_REG); break; case 2: - set64BitReg(t, PATTERN_WAIT_TIMER_2_LSB_REG, - PATTERN_WAIT_TIMER_2_MSB_REG); + setU64BitReg(t, PATTERN_WAIT_TIMER_2_LSB_REG, + PATTERN_WAIT_TIMER_2_MSB_REG); break; #ifndef MYTHEN3D case 3: - set64BitReg(t, PATTERN_WAIT_TIMER_3_LSB_REG, - PATTERN_WAIT_TIMER_3_MSB_REG); + setU64BitReg(t, PATTERN_WAIT_TIMER_3_LSB_REG, + PATTERN_WAIT_TIMER_3_MSB_REG); break; case 4: - set64BitReg(t, PATTERN_WAIT_TIMER_4_LSB_REG, - PATTERN_WAIT_TIMER_4_MSB_REG); + setU64BitReg(t, PATTERN_WAIT_TIMER_4_LSB_REG, + PATTERN_WAIT_TIMER_4_MSB_REG); break; case 5: - set64BitReg(t, PATTERN_WAIT_TIMER_5_LSB_REG, - PATTERN_WAIT_TIMER_5_MSB_REG); + setU64BitReg(t, PATTERN_WAIT_TIMER_5_LSB_REG, + PATTERN_WAIT_TIMER_5_MSB_REG); break; #endif default: @@ -775,7 +797,7 @@ int loadPattern(char *message, enum TLogLevel printLevel, } } // iocontrol -#ifndef MYTHEN3D +#if !defined(MYTHEN3D) && !defined(XILINX_CHIPTESTBOARDD) // TODO if (ret == OK) { ret = validate_writePatternIOControl(message, pat->ioctrl); } @@ -835,7 +857,7 @@ int getPattern(char *message, patternParameters *pat) { pat->word[i] = retval64; } // iocontrol -#ifndef MYTHEN3D +#if !defined(MYTHEN3D) && !defined(XILINX_CHIPTESTBOARDD) // TODO if (ret == OK) { validate_readPatternIOControl(); } @@ -956,7 +978,7 @@ int loadPatternFile(char *patFname, char *errMessage) { uint64_t word = 0; // cannot scan values -#ifdef VIRTUAL +#if defined(VIRTUAL) || defined(XILINX_CHIPTESTBOARDD) if (sscanf(line, "%s 0x%x 0x%lx", command, &addr, &word) != 3) { #else if (sscanf(line, "%s 0x%x 0x%llx", command, &addr, &word) != 3) { @@ -971,7 +993,7 @@ int loadPatternFile(char *patFname, char *errMessage) { } // patioctrl -#ifndef MYTHEN3D +#if !defined(MYTHEN3D) && !defined(XILINX_CHIPTESTBOARDD) // TODO if (!strncmp(line, "patioctrl", strlen("patioctrl"))) { uint64_t arg = 0; @@ -1063,7 +1085,7 @@ int loadPatternFile(char *patFname, char *errMessage) { uint64_t waittime = 0; // cannot scan values -#ifdef VIRTUAL +#if defined(VIRTUAL) || defined(XILINX_CHIPTESTBOARDD) if (sscanf(line, "%s %d %ld", command, &level, &waittime) != 3) { #else if (sscanf(line, "%s %d %lld", command, &level, &waittime) != 3) { diff --git a/slsDetectorServers/slsDetectorServer/src/nios.c b/slsDetectorServers/slsDetectorServer/src/nios.c index ddee51e55..7074db54a 100644 --- a/slsDetectorServers/slsDetectorServer/src/nios.c +++ b/slsDetectorServers/slsDetectorServer/src/nios.c @@ -82,10 +82,7 @@ void setU64BitReg(uint64_t value, int aLSB, int aMSB) { u_int32_t readRegister(u_int32_t offset) { return bus_r(offset); } -u_int32_t writeRegister(u_int32_t offset, u_int32_t data) { - bus_w(offset, data); - return readRegister(offset); -} +void writeRegister(u_int32_t offset, u_int32_t data) { bus_w(offset, data); } int mapCSP0(void) { u_int32_t csps[2] = {CSP0, CSP1}; diff --git a/slsDetectorServers/slsDetectorServer/src/programViaArm.c b/slsDetectorServers/slsDetectorServer/src/programViaArm.c new file mode 100644 index 000000000..64a7eafb2 --- /dev/null +++ b/slsDetectorServers/slsDetectorServer/src/programViaArm.c @@ -0,0 +1,252 @@ +// SPDX-License-Identifier: LGPL-3.0-or-other +// Copyright (C) 2021 Contributors to the SLS Detector Package +#include "programViaArm.h" +#include "clogger.h" +#include "common.h" +#include "sls/sls_detector_defs.h" +#include "slsDetectorServer_defs.h" + +#include //memset +#include // access + +#define CMD_ARM_LOAD_BIT_FILE "~/fpgautil/fpgautil -b " FIRMWARE_FILE " -f Full" +#define CMD_ARM_LOAD_DEVICE_TREE \ + "cat " DEVICE_TREE_OVERLAY_FILE " > " DEVICE_TREE_API_FOLDER "/dtbo" +#define CMD_ARM_SYM_LINK_FORMAT \ + "ln -sf " DEVICE_TREE_DST "%d " IIO_DEVICE_FOLDER "/%s" +#define TIME_LOAD_DEVICE_TREE_MS (500) + +extern int executeCommand(char *command, char *result, enum TLogLevel level); + +int resetFPGA(char *mess) { + LOG(logINFOBLUE, ("Reseting FPGA...\n")); +#ifndef VIRTUAL + char retvals[MAX_STR_LENGTH] = {0}; + if (executeCommand(CMD_ARM_LOAD_BIT_FILE, retvals, logDEBUG1) == FAIL) { + snprintf(mess, MAX_STR_LENGTH, + "Could not reset fpga. Command to load bit file failed (%s)\n", + retvals); + LOG(logERROR, (mess)); + return FAIL; + } +#endif + LOG(logINFOBLUE, ("FPGA reset successfully\n")) + return OK; +} + +int loadDeviceTree(char *mess) { + if (verifyDeviceTree(mess) == OK) + return OK; + + if (checksBeforeCreatingDeviceTree(mess) == FAIL) + return FAIL; + + if (createDeviceTree(mess) == FAIL) + return FAIL; + + if (verifyDeviceTree(mess) == FAIL) { + LOG(logERROR, ("Device tree loading failed at verification\n")); + return FAIL; + } + + LOG(logINFOBLUE, ("Device tree loaded successfully\n")) + return OK; +} + +int checksBeforeCreatingDeviceTree(char *mess) { + // check if device tree overlay file exists + if (access(DEVICE_TREE_OVERLAY_FILE, F_OK) != 0) { + snprintf(mess, MAX_STR_LENGTH, + "Device tree overlay file (%s) does not exist\n", + DEVICE_TREE_OVERLAY_FILE); + LOG(logERROR, (mess)); + return FAIL; + } + LOG(logINFO, + ("\tDevice tree overlay file exists (%s)\n", DEVICE_TREE_OVERLAY_FILE)); + + // check if device tree folder exists. If it does, remove it + if (access(DEVICE_TREE_API_FOLDER, F_OK) == 0) { + // remove it + char cmd[MAX_STR_LENGTH] = {0}; + memset(cmd, 0, MAX_STR_LENGTH); + sprintf(cmd, "rmdir %s", DEVICE_TREE_API_FOLDER); + char retvals[MAX_STR_LENGTH] = {0}; + memset(retvals, 0, MAX_STR_LENGTH); + if (executeCommand(cmd, retvals, logDEBUG1) == FAIL) { + snprintf(mess, MAX_STR_LENGTH, + "Could not unload device tree overlay api with %s (%s)\n", + cmd, retvals); + LOG(logERROR, (mess)); + return FAIL; + } + LOG(logINFO, ("\tUnloaded existing device tree overlay api (%s)\n", + DEVICE_TREE_API_FOLDER)); + } else { + LOG(logINFO, ("\tNo existing device tree overlay api found(%s)\n", + DEVICE_TREE_API_FOLDER)); + } + + // create device tree overlay folder + { + char cmd[MAX_STR_LENGTH] = {0}; + memset(cmd, 0, MAX_STR_LENGTH); + sprintf(cmd, "mkdir %s", DEVICE_TREE_API_FOLDER); + char retvals[MAX_STR_LENGTH] = {0}; + memset(retvals, 0, MAX_STR_LENGTH); + if (executeCommand(cmd, retvals, logDEBUG1) == FAIL) { + snprintf(mess, MAX_STR_LENGTH, + "Could not create device tree overlay api with %s (%s)\n", + cmd, retvals); + LOG(logERROR, (mess)); + return FAIL; + } + LOG(logINFO, ("\tDevice tree overlay api created (%s)\n", + DEVICE_TREE_API_FOLDER)); + } + + return OK; +} + +int createDeviceTree(char *mess) { + char cmd[MAX_STR_LENGTH] = {0}; + memset(cmd, 0, MAX_STR_LENGTH); + strcpy(cmd, CMD_ARM_LOAD_DEVICE_TREE); + char retvals[MAX_STR_LENGTH] = {0}; + memset(retvals, 0, MAX_STR_LENGTH); + if (executeCommand(cmd, retvals, logDEBUG1) == FAIL) { + snprintf(mess, MAX_STR_LENGTH, + "Could not load device tree overlay with %s (%s)\n", cmd, + retvals); + LOG(logERROR, (mess)); + return FAIL; + } + LOG(logINFO, ("\tDevice tree overlay created (cmd: %s)\n", cmd)); + + usleep(TIME_LOAD_DEVICE_TREE_MS * 1000); + return OK; +} + +int verifyDeviceTree(char *mess) { + LOG(logINFOBLUE, ("Verifying Device Tree...\n")); + +#ifdef VIRTUAL + LOG(logINFOBLUE, ("Device tree verified successfully\n")); + return OK; +#else + + // check if iio:device0-4 exists in device tree destination + int hardcodedDeviceIndex = 0; + int adcDeviceIndex = 1; + int dacDeviceIndex = 2; + + for (int i = 0; i != 5; ++i) { + char deviceName[MAX_STR_LENGTH] = {0}; + memset(deviceName, 0, MAX_STR_LENGTH); + sprintf(deviceName, "%s%d/name", DEVICE_TREE_DST, i); + // check if device exist + if (access(deviceName, F_OK) != 0) { + snprintf(mess, MAX_STR_LENGTH, + "Could not verify device tree. Device %s does not exist\n", + deviceName); + LOG(logERROR, (mess)); + return FAIL; + } + // find name + char cmd[MAX_STR_LENGTH] = {0}; + memset(cmd, 0, MAX_STR_LENGTH); + sprintf(cmd, "cat %s", deviceName); + char retvals[MAX_STR_LENGTH] = {0}; + memset(retvals, 0, MAX_STR_LENGTH); + if (executeCommand(cmd, retvals, logDEBUG1) == FAIL) { + snprintf(mess, MAX_STR_LENGTH, + "Could not retrieve device name from device %s (%s)\n", + deviceName, retvals); + LOG(logERROR, (mess)); + return FAIL; + } + // verify name + char *deviceNames[] = {DEVICE_NAME_LIST}; + if (strstr(retvals, deviceNames[hardcodedDeviceIndex]) == NULL) { + // dacs got loaded first + if (i == 1 && + strstr(retvals, deviceNames[hardcodedDeviceIndex + 1]) != + NULL) { + ++hardcodedDeviceIndex; + adcDeviceIndex = 4; + dacDeviceIndex = 1; + } else { + snprintf( + mess, MAX_STR_LENGTH, + "Could not verify device tree. Device %s expected %s but " + "got %s\n", + deviceName, deviceNames[i], retvals); + LOG(logERROR, (mess)); + return FAIL; + } + } + ++hardcodedDeviceIndex; + // in case dacs were loaded first + if (hardcodedDeviceIndex == 5) + hardcodedDeviceIndex = 1; + } + LOG(logINFOBLUE, ("Device tree verified successfully [temp: 0, adc:%d, " + "dac:%d, %d, %d]\n", + adcDeviceIndex, dacDeviceIndex, dacDeviceIndex + 1, + dacDeviceIndex + 2)); + + return createSymbolicLinksForDevices(adcDeviceIndex, dacDeviceIndex, mess); +#endif +} + +#ifndef VIRTUAL +int createSymbolicLinksForDevices(int adcDeviceIndex, int dacDeviceIndex, + char *mess) { + + // delete andcreate iio device links folder (deleting because cannot + // overwrite symbolic links with -sf) + if (deleteAbsoluteDirectory(mess, IIO_DEVICE_FOLDER, + "create sym links for device trees") == FAIL) { + return FAIL; + } + if (createAbsoluteDirectory(mess, IIO_DEVICE_FOLDER, + "create sym links for device trees") == FAIL) { + return FAIL; + } + + char *deviceNames[] = {DEVICE_NAME_LIST}; + // create symbolic links for adc + { + char cmd[MAX_STR_LENGTH] = {0}; + memset(cmd, 0, MAX_STR_LENGTH); + sprintf(cmd, CMD_ARM_SYM_LINK_FORMAT, adcDeviceIndex, deviceNames[1]); + char retvals[MAX_STR_LENGTH] = {0}; + memset(retvals, 0, MAX_STR_LENGTH); + if (executeCommand(cmd, retvals, logDEBUG1) == FAIL) { + snprintf(mess, MAX_STR_LENGTH, + "Could not create sym link [adc] (%s)\n", retvals); + LOG(logERROR, (mess)); + return FAIL; + } + LOG(logINFO, ("\tSym link [adc] created (%s)\n", cmd)); + } + + // create symbolic links for dacs + for (int idac = 0; idac != 3; ++idac) { + char cmd[MAX_STR_LENGTH] = {0}; + memset(cmd, 0, MAX_STR_LENGTH); + sprintf(cmd, CMD_ARM_SYM_LINK_FORMAT, dacDeviceIndex + idac, + deviceNames[idac + 2]); + char retvals[MAX_STR_LENGTH] = {0}; + memset(retvals, 0, MAX_STR_LENGTH); + if (executeCommand(cmd, retvals, logDEBUG1) == FAIL) { + snprintf(mess, MAX_STR_LENGTH, + "Could not create sym link [dac%d] (%s)\n", idac, retvals); + LOG(logERROR, (mess)); + return FAIL; + } + LOG(logINFO, ("\tSym link [dac%d] created (%s)\n", idac, cmd)); + } + return OK; +} +#endif \ No newline at end of file diff --git a/slsDetectorServers/slsDetectorServer/src/slsDetectorServer.c b/slsDetectorServers/slsDetectorServer/src/slsDetectorServer.c index 9f608bbd1..5064999b3 100644 --- a/slsDetectorServers/slsDetectorServer/src/slsDetectorServer.c +++ b/slsDetectorServers/slsDetectorServer/src/slsDetectorServer.c @@ -79,7 +79,7 @@ int main(int argc, char *argv[]) { "\t-v, --version : Software version\n" "\t-p, --port : TCP communication port with client. " "\n" - "\t-g, --nomodule : [Mythen3][Gotthard2] \n" + "\t-g, --nomodule : [Mythen3][Gotthard2][Xilinx Ctb] \n" "\t Generic or No Module mode. Skips " "detector type checks. \n" "\t-f, --phaseshift : [Gotthard] only. Sets phase shift. \n" diff --git a/slsDetectorServers/slsDetectorServer/src/slsDetectorServer_funcs.c b/slsDetectorServers/slsDetectorServer/src/slsDetectorServer_funcs.c index e08eb946e..5255a22fd 100644 --- a/slsDetectorServers/slsDetectorServer/src/slsDetectorServer_funcs.c +++ b/slsDetectorServers/slsDetectorServer/src/slsDetectorServer_funcs.c @@ -7,7 +7,8 @@ #include "sls/sls_detector_funcs.h" #include "slsDetectorFunctionList.h" -#if defined(CHIPTESTBOARDD) || defined(MYTHEN3D) +#if defined(CHIPTESTBOARDD) || defined(XILINX_CHIPTESTBOARDD) || \ + defined(MYTHEN3D) #include "Pattern.h" #include "loadPattern.h" #endif @@ -33,6 +34,8 @@ const enum detectorType myDetectorType = MOENCH; const enum detectorType myDetectorType = MYTHEN3; #elif GOTTHARD2D const enum detectorType myDetectorType = GOTTHARD2; +#elif XILINX_CHIPTESTBOARDD +const enum detectorType myDetectorType = XILINX_CHIPTESTBOARD; #else const enum detectorType myDetectorType = GENERIC; #endif @@ -112,6 +115,28 @@ int printSocketReadError() { return FAIL; } +int sendError(int file_des) { + ret = FAIL; + LOG(logERROR, (mess)); + Server_SendResult(file_des, INT32, NULL, 0); + return ret; +} + +void setMemoryAllocationErrorMessage() { + struct sysinfo info; + sysinfo(&info); + sprintf( + mess, + "Memory allocation error (%s). Available space: %d MB. Please reboot", + getFunctionNameFromEnum((enum detFuncs)fnum), + (int)(info.freeram / (1024 * 1024))); +#ifdef EIGERD + strcat(mess, ".\n"); +#else + strcat(mess, " using sls_detector_put rebootcontroller.\n"); +#endif +} + void init_detector() { memset(udpDetails, 0, sizeof(udpDetails)); #ifdef VIRTUAL @@ -488,6 +513,11 @@ void function_table() { flist[F_SET_COLUMN] = &set_column; flist[F_GET_PEDESTAL_MODE] = &get_pedestal_mode; flist[F_SET_PEDESTAL_MODE] = &set_pedestal_mode; + flist[F_CONFIG_TRANSCEIVER] = &config_transceiver; + flist[F_GET_TIMING_INFO_DECODER] = &get_timing_info_decoder; + flist[F_SET_TIMING_INFO_DECODER] = &set_timing_info_decoder; + flist[F_GET_COLLECTION_MODE] = &get_collection_mode; + flist[F_SET_COLLECTION_MODE] = &set_collection_mode; // check if (NUM_DET_FUNCTIONS >= RECEIVER_ENUM_START) { @@ -787,7 +817,7 @@ int get_serial_number(int file_des) { ret = OK; memset(mess, 0, sizeof(mess)); int64_t retval = -1; -#ifdef EIGERD +#if defined(EIGERD) || defined(XILINX_CHIPTESTBOARDD) functionNotImplemented(); #else retval = getDetectorNumber(); @@ -802,7 +832,8 @@ int set_firmware_test(int file_des) { LOG(logDEBUG1, ("Executing firmware test\n")); #if !defined(GOTTHARDD) && !defined(JUNGFRAUD) && !defined(MOENCHD) && \ - !defined(CHIPTESTBOARDD) && !defined(GOTTHARD2D) && !defined(MYTHEN3D) + !defined(CHIPTESTBOARDD) && !defined(GOTTHARD2D) && !defined(MYTHEN3D) && \ + !defined(XILINX_CHIPTESTBOARDD) functionNotImplemented(); #else ret = testFpga(); @@ -968,6 +999,22 @@ enum DACINDEX getDACIndex(enum dacIndex ind) { case V_POWER_CHIP: serverDacIndex = D_PWR_CHIP; break; +#elif XILINX_CHIPTESTBOARDD + case V_POWER_A: + serverDacIndex = D_PWR_A; + break; + case V_POWER_B: + serverDacIndex = D_PWR_B; + break; + case V_POWER_C: + serverDacIndex = D_PWR_C; + break; + case V_POWER_D: + serverDacIndex = D_PWR_D; + break; + case V_POWER_IO: + serverDacIndex = D_PWR_IO; + break; #elif MYTHEN3D case VCASSH: serverDacIndex = M_VCASSH; @@ -1122,7 +1169,7 @@ enum DACINDEX getDACIndex(enum dacIndex ind) { #endif default: -#ifdef CHIPTESTBOARDD +#if defined(CHIPTESTBOARDD) || defined(XILINX_CHIPTESTBOARDD) if (ind < NDAC_ONLY) { // For CTB use the index directly, no conversion serverDacIndex = (enum DACINDEX)ind; @@ -1137,16 +1184,20 @@ enum DACINDEX getDACIndex(enum dacIndex ind) { int validateAndSetDac(enum dacIndex ind, int val, int mV) { int retval = -1; - enum DACINDEX serverDacIndex = 0; + enum DACINDEX serverDacIndex = 0; // valid enums switch (ind) { +#ifndef XILINX_CHIPTESTBOARDD case HIGH_VOLTAGE: +#endif #ifdef EIGERD case IO_DELAY: #elif CHIPTESTBOARDD case ADC_VPP: case V_LIMIT: +#elif XILINX_CHIPTESTBOARDD + case V_LIMIT: #endif break; default: @@ -1186,14 +1237,42 @@ int validateAndSetDac(enum dacIndex ind, int val, int mV) { break; #endif - // high voltage + // high voltage +#ifndef XILINX_CHIPTESTBOARDD case HIGH_VOLTAGE: + +#if defined(MYTHEN3D) || defined(GOTTHARD2D) + if ((val != -1 && val < 0) || (val > HV_SOFT_MAX_VOLTAGE)) { + ret = FAIL; + sprintf(mess, "Invalid Voltage. Valid range (0 - %d)\n", + HV_SOFT_MAX_VOLTAGE); + LOG(logERROR, (mess)); + } else { + if (val >= 0) { + ret = setHighVoltage(val); + if (ret == FAIL) { + strcpy(mess, "Could not set high voltage.\n"); + LOG(logERROR, (mess)); + } + } + if (ret == OK) { + ret = getHighVoltage(&retval); + if (ret == FAIL) { + strcpy(mess, "Could not get high voltage.\n"); + LOG(logERROR, (mess)); + } + LOG(logDEBUG1, ("High Voltage: %d\n", retval)); + validate(&ret, mess, val, retval, "set high voltage", DEC); + } + } +#else retval = setHighVoltage(val); LOG(logDEBUG1, ("High Voltage: %d\n", retval)); -#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(CHIPTESTBOARDD) || \ - defined(GOTTHARD2D) || defined(MYTHEN3D) +#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(CHIPTESTBOARDD) validate(&ret, mess, val, retval, "set high voltage", DEC); #endif +#endif + #ifdef GOTTHARDD if (retval == -1) { ret = FAIL; @@ -1220,9 +1299,9 @@ int validateAndSetDac(enum dacIndex ind, int val, int mV) { } #endif break; - - // power, vlimit -#ifdef CHIPTESTBOARDD +#endif + // power +#if defined(CHIPTESTBOARDD) || defined(XILINX_CHIPTESTBOARDD) case V_POWER_A: case V_POWER_B: case V_POWER_C: @@ -1243,7 +1322,9 @@ int validateAndSetDac(enum dacIndex ind, int val, int mV) { "exceeds voltage limit %d.\n", ind, getVLimit()); LOG(logERROR, (mess)); - } else if (!isPowerValid(serverDacIndex, val)) { + } + + else if (!isPowerValid(serverDacIndex, val)) { ret = FAIL; sprintf( mess, @@ -1251,17 +1332,27 @@ int validateAndSetDac(enum dacIndex ind, int val, int mV) { "should be between %d and %d mV\n", ind, (serverDacIndex == D_PWR_IO ? VIO_MIN_MV : POWER_RGLTR_MIN), +#ifdef CHIPTESTBOARDD (VCHIP_MAX_MV - VCHIP_POWER_INCRMNT)); +#else + POWER_RGLTR_MAX); +#endif LOG(logERROR, (mess)); - } else { + } + + else { setPower(serverDacIndex, val); } } - retval = getPower(serverDacIndex); - LOG(logDEBUG1, ("Power regulator(%d): %d\n", ind, retval)); - validate(&ret, mess, val, retval, "set power regulator", DEC); + if (ret == OK) { + retval = getPower(serverDacIndex); + LOG(logDEBUG1, ("Power regulator(%d): %d\n", ind, retval)); + validate(&ret, mess, val, retval, "set power regulator", DEC); + } break; +#endif +#ifdef CHIPTESTBOARDD case V_POWER_CHIP: if (val >= 0) { ret = FAIL; @@ -1291,7 +1382,8 @@ int validateAndSetDac(enum dacIndex ind, int val, int mV) { break; #endif -#if defined(CHIPTESTBOARDD) + // vlimit +#if defined(CHIPTESTBOARDD) || defined(XILINX_CHIPTESTBOARDD) case V_LIMIT: if (val >= 0) { if (!mV) { @@ -1325,7 +1417,7 @@ int validateAndSetDac(enum dacIndex ind, int val, int mV) { ind, val, getMaxDacSteps()); LOG(logERROR, (mess)); } else { -#if defined(CHIPTESTBOARDD) +#if defined(CHIPTESTBOARDD) || defined(XILINX_CHIPTESTBOARDD) if ((val != GET_FLAG && mV && checkVLimitCompliant(val) == FAIL) || (val != GET_FLAG && !mV && checkVLimitDacCompliant(val) == FAIL)) { @@ -1522,6 +1614,34 @@ int get_adc(int file_des) { case SLOW_ADC_TEMP: serverAdcIndex = S_TMP; break; +#elif XILINX_CHIPTESTBOARDD + case TEMPERATURE_FPGA: + serverAdcIndex = TEMP_FPGA; + break; + case SLOW_ADC0: + serverAdcIndex = S_ADC0; + break; + case SLOW_ADC1: + serverAdcIndex = S_ADC1; + break; + case SLOW_ADC2: + serverAdcIndex = S_ADC2; + break; + case SLOW_ADC3: + serverAdcIndex = S_ADC3; + break; + case SLOW_ADC4: + serverAdcIndex = S_ADC4; + break; + case SLOW_ADC5: + serverAdcIndex = S_ADC5; + break; + case SLOW_ADC6: + serverAdcIndex = S_ADC6; + break; + case SLOW_ADC7: + serverAdcIndex = S_ADC7; + break; #endif default: modeNotImplemented("Adc Index", (int)ind); @@ -1531,10 +1651,14 @@ int get_adc(int file_des) { // valid index if (ret == OK) { LOG(logDEBUG1, ("Getting ADC %d\n", serverAdcIndex)); -#if defined(MYTHEN3D) || defined(GOTTHARD2D) +#if defined(MYTHEN3D) || defined(GOTTHARD2D) || defined(XILINX_CHIPTESTBOARDD) ret = getADC(serverAdcIndex, &retval); if (ret == FAIL) { - strcpy(mess, "Could not get temperature\n"); + if (ind == TEMPERATURE_FPGA) { + strcpy(mess, "Could not get temperature\n"); + } else { + strcpy(mess, "Could not get ADC\n"); + } LOG(logERROR, (mess)); } else { LOG(logDEBUG1, ("ADC(%d): %d\n", serverAdcIndex, retval)); @@ -1551,40 +1675,35 @@ int get_adc(int file_des) { int write_register(int file_des) { ret = OK; memset(mess, 0, sizeof(mess)); - uint32_t args[2] = {-1, -1}; - uint32_t retval = -1; + uint32_t args[3] = {-1, -1, -1}; if (receiveData(file_des, args, sizeof(args), INT32) < 0) return printSocketReadError(); uint32_t addr = args[0]; uint32_t val = args[1]; - LOG(logDEBUG1, ("Writing to register 0x%x, data 0x%x\n", addr, val)); + uint32_t validate = args[2]; + LOG(logDEBUG1, ("Writing to register 0x%x, data 0x%x, validate:%d\n", addr, + val, validate)); // only set if (Server_VerifyLock() == OK) { -#ifdef GOTTHARDD - retval = writeRegister16And32(addr, val); -#elif EIGERD - if (writeRegister(addr, val) == FAIL) { +#if EIGERD + if (writeRegister(addr, val, validate) == FAIL) { ret = FAIL; sprintf(mess, "Could not write to register 0x%x.\n", addr); LOG(logERROR, (mess)); - } else { - if (readRegister(addr, &retval) == FAIL) { - ret = FAIL; - sprintf( - mess, - "Could not read register 0x%x or inconsistent values. Try " - "to read +0x100 for only left and +0x200 for only right.\n", - addr); - LOG(logERROR, (mess)); - } } #else - retval = writeRegister(addr, val); +#ifdef GOTTHARDD + writeRegister16And32(addr, val); + uint32_t retval = readRegister16And32(addr); +#else + writeRegister(addr, val); + uint32_t retval = readRegister(addr); #endif + LOG(logDEBUG1, ("Write register retval (0x%x): 0x%x\n", addr, retval)); // validate - if (ret == OK && retval != val) { + if (validate && ret == OK && retval != val) { ret = FAIL; sprintf( mess, @@ -1592,9 +1711,9 @@ int write_register(int file_des) { addr, val, retval); LOG(logERROR, (mess)); } - LOG(logDEBUG1, ("Write register (0x%x): 0x%x\n", retval)); +#endif } - return Server_SendResult(file_des, INT32, &retval, sizeof(retval)); + return Server_SendResult(file_des, INT32, NULL, 0); } int read_register(int file_des) { @@ -1609,9 +1728,7 @@ int read_register(int file_des) { LOG(logDEBUG1, ("Reading from register 0x%x\n", addr)); // get -#ifdef GOTTHARDD - retval = readRegister16And32(addr); -#elif EIGERD +#if EIGERD if (readRegister(addr, &retval) == FAIL) { ret = FAIL; sprintf(mess, @@ -1620,11 +1737,12 @@ int read_register(int file_des) { addr); LOG(logERROR, (mess)); } +#elif GOTTHARDD + retval = readRegister16And32(addr); #else retval = readRegister(addr); #endif LOG(logINFO, ("Read register (0x%x): 0x%x\n", addr, retval)); - return Server_SendResult(file_des, INT32, &retval, sizeof(retval)); } @@ -1632,67 +1750,45 @@ int get_module(int file_des) { ret = OK; memset(mess, 0, sizeof(mess)); - sls_detector_module module; - int *myDac = NULL; - int *myChan = NULL; - module.dacs = NULL; - module.chanregs = NULL; - #if !defined(MYTHEN3D) && !defined(EIGERD) functionNotImplemented(); + return Server_SendResult(file_des, INT32, NULL, 0); #else - - // allocate to receive module structure - // allocate dacs - myDac = malloc(getNumberOfDACs() * sizeof(int)); - // error - if (getNumberOfDACs() > 0 && myDac == NULL) { - ret = FAIL; - sprintf(mess, "Could not allocate dacs\n"); - LOG(logERROR, (mess)); - } else - module.dacs = myDac; - - // allocate chans - if (ret == OK) { - myChan = malloc(getTotalNumberOfChannels() * sizeof(int)); - if (getTotalNumberOfChannels() > 0 && myChan == NULL) { - ret = FAIL; - strcpy(mess, "Could not allocate chans\n"); - LOG(logERROR, (mess)); - } else - module.chanregs = myChan; + int ndac = getNumberOfDACs(); + int nchan = getTotalNumberOfChannels(); + if (ndac <= 0 || nchan <= 0) { + strcpy(mess, "Invalid number of dacs/channels to set module\n"); + return sendError(file_des); } - // receive module structure - if (ret == OK) { - module.nchip = getNumberOfChips(); - module.nchan = getTotalNumberOfChannels(); - module.ndac = getNumberOfDACs(); - - // ensure nchan is not 0, else trimbits not copied - if (module.nchan == 0) { - strcpy(mess, "Could not get module as the number of channels to " - "copy is 0\n"); - LOG(logERROR, (mess)); - return FAIL; - } - getModule(&module); - } -#endif - Server_SendResult(file_des, INT32, NULL, 0); - if (ret != FAIL) { - if (sendModule(file_des, &module) < 0) { - ret = FAIL; - strcpy(mess, "Could not send module data\n"); - LOG(logERROR, (mess)); - } - } - if (myChan != NULL) - free(myChan); - if (myDac != NULL) + sls_detector_module module; + module.dacs = NULL; + module.chanregs = NULL; + int *myDac = malloc(ndac * sizeof(int)); + int *myChan = malloc(nchan * sizeof(int)); + if (myDac == NULL || myChan == NULL) { free(myDac); + free(myChan); + setMemoryAllocationErrorMessage(); + return sendError(file_des); + } + module.dacs = myDac; + module.ndac = ndac; + module.chanregs = myChan; + module.nchan = nchan; + module.nchip = getNumberOfChips(); + getModule(&module); + + Server_SendResult(file_des, INT32, NULL, 0); + if (ret == OK && sendModule(file_des, &module) < 0) { + strcpy(mess, "Could not send module data\n"); + ret = FAIL; + LOG(logERROR, (mess)); + } + free(myChan); + free(myDac); return ret; +#endif } int set_module(int file_des) { @@ -1702,63 +1798,53 @@ int set_module(int file_des) { #if !(defined(MYTHEN3D) || defined(EIGERD)) functionNotImplemented(); #else + int ndac = getNumberOfDACs(); + int nchan = getTotalNumberOfChannels(); + if (ndac <= 0 || nchan <= 0) { + strcpy(mess, "Invalid number of dacs/channels to set module\n"); + return sendError(file_des); + } sls_detector_module module; - int *myDac = NULL; - int *myChan = NULL; module.dacs = NULL; module.chanregs = NULL; - - // allocate to receive arguments - // allocate dacs - myDac = malloc(getNumberOfDACs() * sizeof(int)); - // error - if (getNumberOfDACs() > 0 && myDac == NULL) { - ret = FAIL; - strcpy(mess, "Could not allocate dacs\n"); - LOG(logERROR, (mess)); - } else - module.dacs = myDac; - - // allocate chans - if (ret == OK) { - myChan = malloc(getTotalNumberOfChannels() * sizeof(int)); - if (getTotalNumberOfChannels() > 0 && myChan == NULL) { - ret = FAIL; - strcpy(mess, "Could not allocate chans\n"); - LOG(logERROR, (mess)); - } else - module.chanregs = myChan; + int *myDac = malloc(ndac * sizeof(int)); + int *myChan = malloc(nchan * sizeof(int)); + if (myDac == NULL || myChan == NULL) { + free(myDac); + free(myChan); + setMemoryAllocationErrorMessage(); + return sendError(file_des); } - // receive arguments - if (ret == OK) { - module.nchip = getNumberOfChips(); - module.nchan = getTotalNumberOfChannels(); - module.ndac = getNumberOfDACs(); - int ts = receiveModule(file_des, &module); - if (ts < 0) { - free(myChan); - free(myDac); - return printSocketReadError(); - } - LOG(logDEBUG1, ("module register is %d, nchan %d, nchip %d, " - "ndac %d, iodelay %d, tau %d, eV %d\n", - module.reg, module.nchan, module.nchip, module.ndac, - module.iodelay, module.tau, module.eV[0])); - // should at least have a dac - if (ts <= (int)sizeof(sls_detector_module)) { - ret = FAIL; - strcpy(mess, "Cannot set module. Received incorrect number of " - "dacs or channels\n"); - LOG(logERROR, (mess)); - } + module.dacs = myDac; + module.ndac = ndac; + module.chanregs = myChan; + module.nchan = nchan; + module.nchip = getNumberOfChips(); + + int ts = receiveModule(file_des, &module); + if (ts < 0) { + free(myChan); + free(myDac); + return printSocketReadError(); + } + LOG(logDEBUG1, ("module register is %d, nchan %d, nchip %d, " + "ndac %d, iodelay %d, tau %d, eV %d\n", + module.reg, module.nchan, module.nchip, module.ndac, + module.iodelay, module.tau, module.eV[0])); + // should at least have a dac + if (ts <= (int)sizeof(sls_detector_module)) { + strcpy(mess, "Cannot set module. Received incorrect number of " + "dacs or channels\n"); + free(myChan); + free(myDac); + return sendError(file_des); } // only set - if (ret == OK && Server_VerifyLock() == OK) { + if (Server_VerifyLock() == OK) { // check index - -// setsettings + // setsettings #ifndef MYTHEN3D // m3 uses reg for chip (not settings) validate_settings((enum detectorSettings)(module.reg)); @@ -1771,10 +1857,8 @@ int set_module(int file_des) { #endif LOG(logDEBUG1, ("Settings: %d\n", retval)); } - if (myChan != NULL) - free(myChan); - if (myDac != NULL) - free(myDac); + free(myChan); + free(myDac); #endif return Server_SendResult(file_des, INT32, NULL, 0); @@ -1828,7 +1912,7 @@ int set_settings(int file_des) { if (receiveData(file_des, &isett, sizeof(isett), INT32) < 0) return printSocketReadError(); -#ifdef CHIPTESTBOARDD +#if defined(CHIPTESTBOARDD) || defined(XILINX_CHIPTESTBOARDD) functionNotImplemented(); #else LOG(logDEBUG1, ("Setting settings %d\n", isett)); @@ -1907,16 +1991,35 @@ int acquire(int blocking, int file_des) { } // only set if (Server_VerifyLock() == OK) { +#if defined(XILINX_CHIPTESTBOARDD) || defined(GOTTHARD2D) + if (!isChipConfigured()) { + ret = FAIL; + strcpy(mess, "Could not start acquisition. Chip is not configured. " + "Power it on to configure it.\n"); + LOG(logERROR, (mess)); + } +#if defined(XILINX_CHIPTESTBOARDD) + else if ((getReadoutMode() == TRANSCEIVER_ONLY || + getReadoutMode() == DIGITAL_AND_TRANSCEIVER) && + (isTransceiverAligned() == 0)) { + ret = FAIL; + strcpy(mess, "Could not start acquisition. Transceiver not " + "aligned. Use configtransceiver command.\n"); + LOG(logERROR, (mess)); + } +#endif + else +#endif #if defined(JUNGFRAUD) - // chipv1.1 has to be configured before acquisition - if (getChipVersion() == 11 && !isChipConfigured()) { + // chipv1.1 has to be configured before acquisition + if (getChipVersion() == 11 && !isChipConfigured()) { ret = FAIL; strcpy(mess, "Could not start acquisition. Chip is not configured. " "Power it on to configure it.\n"); LOG(logERROR, (mess)); } else #endif -#ifdef CHIPTESTBOARDD +#if defined(CHIPTESTBOARDD) || defined(XILINX_CHIPTESTBOARDD) if ((getReadoutMode() == ANALOG_AND_DIGITAL || getReadoutMode() == ANALOG_ONLY) && (getNumAnalogSamples() <= 0)) { @@ -1940,11 +2043,11 @@ int acquire(int blocking, int file_des) { getReadoutMode() == DIGITAL_AND_TRANSCEIVER) && (getNumTransceiverSamples() <= 0)) { ret = FAIL; - sprintf( - mess, - "Could not start acquisition. Invalid number of transceiver " - "samples: %d.\n", - getNumTransceiverSamples()); + sprintf(mess, + "Could not start acquisition. Invalid number of " + "transceiver " + "samples: %d.\n", + getNumTransceiverSamples()); LOG(logERROR, (mess)); } else #endif @@ -1956,7 +2059,8 @@ int acquire(int blocking, int file_des) { char src_mac[MAC_ADDRESS_SIZE]; getMacAddressinString(src_mac, MAC_ADDRESS_SIZE, sourcemac); sprintf(mess, - "Invalid udp source mac address for this detector. Must be " + "Invalid udp source mac address for this detector. " + "Must be " "same as hardware detector mac address %s\n", src_mac); LOG(logERROR, (mess)); @@ -1967,7 +2071,8 @@ int acquire(int blocking, int file_des) { char src_ip[INET_ADDRSTRLEN]; getIpAddressinString(src_ip, sourceip); sprintf(mess, - "Invalid udp source ip address for this detector. Must be " + "Invalid udp source ip address for this detector. Must " + "be " "same as hardware detector ip address %s in 1G readout " "mode \n", src_ip); @@ -1996,10 +2101,12 @@ int acquire(int blocking, int file_des) { } else { // wait for blocking always (scan or not) // non blocking-no scan also wait (for error message) - // non blcoking-scan dont wait (there is scanErrorMessage) + // non blcoking-scan dont wait (there is + // scanErrorMessage) if (blocking || !scan) { pthread_join(pthread_tid, NULL); - } + } else + pthread_detach(pthread_tid); } } } @@ -2019,6 +2126,7 @@ void *start_state_machine(void *arg) { if (scan == 0) { LOG(logINFOBLUE, ("Normal Acquisition (not scan)\n")); } +#ifndef XILINX_CHIPTESTBOARDD // scan else { // check scan stop @@ -2061,6 +2169,7 @@ void *start_state_machine(void *arg) { } usleep(scanSettleTime_ns / 1000); } +#endif ret = startStateMachine(); LOG(logDEBUG2, ("Starting Acquisition ret: %d\n", ret)); if (ret == FAIL) { @@ -2093,6 +2202,13 @@ void *start_state_machine(void *arg) { ret = FAIL; strcpy(mess, "Could not start read frames thread!\n"); LOG(logERROR, (mess)); + } else { + // blocking or scan + // wait to finish reading from fifo (1g real ctb) + if (*blocking || times > 1) + pthread_join(pthread_tid_ctb_1g, NULL); + else + pthread_detach(pthread_tid_ctb_1g); } } // add scan error message @@ -2109,12 +2225,6 @@ void *start_state_machine(void *arg) { #endif // blocking or scan if (*blocking || times > 1) { - // wait to finish reading from fifo (1g real ctb) -#if defined(CHIPTESTBOARDD) && !defined(VIRTUAL) - if (!enableTenGigabitEthernet(-1)) { - pthread_join(pthread_tid_ctb_1g, NULL); - } -#endif #ifdef EIGERD waitForAcquisitionEnd(&ret, mess); if (ret == FAIL && scan) { @@ -2347,7 +2457,7 @@ int get_num_analog_samples(int file_des) { memset(mess, 0, sizeof(mess)); int retval = -1; -#if !defined(CHIPTESTBOARDD) +#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) functionNotImplemented(); #else // get only @@ -2366,7 +2476,7 @@ int set_num_analog_samples(int file_des) { return printSocketReadError(); LOG(logDEBUG1, ("Setting number of analog samples %d\n", arg)); -#if !defined(CHIPTESTBOARDD) +#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) functionNotImplemented(); #else // only set @@ -2396,7 +2506,7 @@ int get_num_digital_samples(int file_des) { memset(mess, 0, sizeof(mess)); int retval = -1; -#if !defined(CHIPTESTBOARDD) +#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) functionNotImplemented(); #else // get only @@ -2415,7 +2525,7 @@ int set_num_digital_samples(int file_des) { return printSocketReadError(); LOG(logDEBUG1, ("Setting number of digital samples %d\n", arg)); -#if !defined(CHIPTESTBOARDD) +#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) functionNotImplemented(); #else // only set @@ -2593,7 +2703,8 @@ int get_delay_after_trigger(int file_des) { int64_t retval = -1; #if !defined(JUNGFRAUD) && !defined(MOENCHD) && !defined(GOTTHARDD) && \ - !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) && !defined(GOTTHARD2D) + !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) && !defined(GOTTHARD2D) && \ + !defined(XILINX_CHIPTESTBOARDD) functionNotImplemented(); #else // get only @@ -2615,7 +2726,8 @@ int set_delay_after_trigger(int file_des) { ("Setting delay after trigger %lld ns\n", (long long int)arg)); #if !defined(JUNGFRAUD) && !defined(MOENCHD) && !defined(GOTTHARDD) && \ - !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) && !defined(GOTTHARD2D) + !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) && !defined(GOTTHARD2D) && \ + !defined(XILINX_CHIPTESTBOARDD) functionNotImplemented(); #else // only set @@ -2825,13 +2937,15 @@ int get_frames_left(int file_des) { int64_t retval = -1; #if !defined(JUNGFRAUD) && !defined(MOENCHD) && !defined(GOTTHARDD) && \ - !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) && !defined(GOTTHARD2D) + !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) && !defined(GOTTHARD2D) && \ + !defined(XILINX_CHIPTESTBOARDD) functionNotImplemented(); #else // get only retval = getNumFramesLeft(); LOG(logDEBUG1, ("retval num frames left %lld\n", (long long int)retval)); #endif + return Server_SendResult(file_des, INT64, &retval, sizeof(retval)); } @@ -2841,7 +2955,8 @@ int get_triggers_left(int file_des) { int64_t retval = -1; #if !defined(JUNGFRAUD) && !defined(MOENCHD) && !defined(GOTTHARDD) && \ - !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) && !defined(GOTTHARD2D) + !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) && !defined(GOTTHARD2D) && \ + !defined(XILINX_CHIPTESTBOARDD) functionNotImplemented(); #else // get only @@ -2871,9 +2986,9 @@ int get_period_left(int file_des) { memset(mess, 0, sizeof(mess)); int64_t retval = -1; -#if !defined(JUNGFRAUD) && !defined(MOENCHD) && \ - !defined(GOTTHARDD) /* && !defined(CHIPTESTBOARDD) \ -&& !defined(MYTHEN3D) && !defined(GOTTHARD2D)*/ +#if !defined(JUNGFRAUD) && !defined(MOENCHD) && !defined(GOTTHARDD) && \ + !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) && !defined(GOTTHARD2D) && \ + !defined(XILINX_CHIPTESTBOARDD) functionNotImplemented(); #else // get only @@ -2888,9 +3003,9 @@ int get_delay_after_trigger_left(int file_des) { memset(mess, 0, sizeof(mess)); int64_t retval = -1; -#if !defined(JUNGFRAUD) && !defined(MOENCHD) && \ - !defined(GOTTHARDD) /* && !defined(CHIPTESTBOARDD) \ -&& !defined(MYTHEN3D) && !defined(GOTTHARD2D)*/ +#if !defined(JUNGFRAUD) && !defined(MOENCHD) && !defined(GOTTHARDD) && \ + !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) && !defined(GOTTHARD2D) && \ + !defined(XILINX_CHIPTESTBOARDD) functionNotImplemented(); #else // get only @@ -2938,7 +3053,8 @@ int get_frames_from_start(int file_des) { int64_t retval = -1; #if !defined(JUNGFRAUD) && !defined(MOENCHD) && !defined(CHIPTESTBOARDD) && \ - !defined(MYTHEN3D) && !defined(GOTTHARD2D) + !defined(MYTHEN3D) && !defined(GOTTHARD2D) && \ + !defined(XILINX_CHIPTESTBOARDD) functionNotImplemented(); #else // get only @@ -2954,7 +3070,8 @@ int get_actual_time(int file_des) { int64_t retval = -1; #if !defined(JUNGFRAUD) && !defined(MOENCHD) && !defined(CHIPTESTBOARDD) && \ - !defined(MYTHEN3D) && !defined(GOTTHARD2D) + !defined(MYTHEN3D) && !defined(GOTTHARD2D) && \ + !defined(XILINX_CHIPTESTBOARDD) functionNotImplemented(); #else // get only @@ -2970,7 +3087,8 @@ int get_measurement_time(int file_des) { int64_t retval = -1; #if !defined(JUNGFRAUD) && !defined(MOENCHD) && !defined(CHIPTESTBOARDD) && \ - !defined(MYTHEN3D) && !defined(GOTTHARD2D) + !defined(MYTHEN3D) && !defined(GOTTHARD2D) && \ + !defined(XILINX_CHIPTESTBOARDD) functionNotImplemented(); #else // get only @@ -3011,7 +3129,8 @@ int set_dynamic_range(int file_des) { case 32: #endif #if defined(GOTTHARDD) || defined(JUNGFRAUD) || defined(MOENCHD) || \ - defined(CHIPTESTBOARDD) || defined(GOTTHARD2D) + defined(CHIPTESTBOARDD) || defined(GOTTHARD2D) || \ + defined(XILINX_CHIPTESTBOARDD) case 16: #endif if (dr >= 0) { @@ -3153,7 +3272,7 @@ int enable_ten_giga(int file_des) { LOG(logDEBUG, ("Setting 10GbE: %d\n", arg)); #if defined(JUNGFRAUD) || defined(MOENCHD) || defined(GOTTHARDD) || \ - defined(GOTTHARD2D) + defined(GOTTHARD2D) || defined(XILINX_CHIPTESTBOARDD) functionNotImplemented(); #else // set & get @@ -3250,7 +3369,7 @@ int set_pattern_io_control(int file_des) { if (receiveData(file_des, &arg, sizeof(arg), INT64) < 0) return printSocketReadError(); -#if !defined(CHIPTESTBOARDD) +#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) functionNotImplemented(); #else LOG(logDEBUG1, @@ -3267,7 +3386,7 @@ int get_pattern_io_control(int file_des) { memset(mess, 0, sizeof(mess)); uint64_t retval64 = -1; -#if !defined(CHIPTESTBOARDD) +#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) functionNotImplemented(); #else LOG(logDEBUG1, ("Getting Pattern IO Control\n")); @@ -3284,7 +3403,8 @@ int set_pattern_word(int file_des) { if (receiveData(file_des, args, sizeof(args), INT64) < 0) return printSocketReadError(); -#if !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) +#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && \ + !defined(MYTHEN3D) functionNotImplemented(); #else int addr = (int)args[0]; @@ -3312,7 +3432,8 @@ int set_pattern_loop_addresses(int file_des) { if (receiveData(file_des, args, sizeof(args), INT32) < 0) return printSocketReadError(); -#if !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) +#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && \ + !defined(MYTHEN3D) functionNotImplemented(); #else int loopLevel = args[0]; @@ -3358,7 +3479,8 @@ int set_pattern_loop_cycles(int file_des) { if (receiveData(file_des, args, sizeof(args), INT32) < 0) return printSocketReadError(); -#if !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) +#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && \ + !defined(MYTHEN3D) functionNotImplemented(); #else int loopLevel = args[0]; @@ -3387,7 +3509,8 @@ int set_pattern_wait_addr(int file_des) { if (receiveData(file_des, args, sizeof(args), INT32) < 0) return printSocketReadError(); -#if !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) +#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && \ + !defined(MYTHEN3D) functionNotImplemented(); #else int loopLevel = args[0]; @@ -3416,7 +3539,8 @@ int set_pattern_wait_time(int file_des) { if (receiveData(file_des, args, sizeof(args), INT32) < 0) return printSocketReadError(); -#if !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) +#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && \ + !defined(MYTHEN3D) functionNotImplemented(); #else int loopLevel = (int)args[0]; @@ -3446,7 +3570,8 @@ int set_pattern_mask(int file_des) { return printSocketReadError(); LOG(logDEBUG1, ("Set Pattern Mask to %d\n", arg)); -#if !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) +#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && \ + !defined(MYTHEN3D) functionNotImplemented(); #else // only set @@ -3474,7 +3599,8 @@ int get_pattern_mask(int file_des) { LOG(logDEBUG1, ("Get Pattern Mask\n")); -#if !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) +#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && \ + !defined(MYTHEN3D) functionNotImplemented(); #else // only get @@ -3495,7 +3621,8 @@ int set_pattern_bit_mask(int file_des) { return printSocketReadError(); LOG(logDEBUG1, ("Set Pattern Bit Mask to %d\n", arg)); -#if !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) +#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && \ + !defined(MYTHEN3D) functionNotImplemented(); #else // only set @@ -3524,7 +3651,8 @@ int get_pattern_bit_mask(int file_des) { LOG(logDEBUG1, ("Get Pattern Bit Mask\n")); -#if !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) +#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && \ + !defined(MYTHEN3D) functionNotImplemented(); #else // only get @@ -3547,7 +3675,8 @@ int write_adc_register(int file_des) { uint32_t val = args[1]; LOG(logDEBUG1, ("Writing 0x%x to ADC Register 0x%x\n", val, addr)); -#if defined(EIGERD) || defined(GOTTHARD2D) || defined(MYTHEN3D) +#if defined(EIGERD) || defined(GOTTHARD2D) || defined(MYTHEN3D) || \ + defined(XILINX_CHIPTESTBOARDD) functionNotImplemented(); #else #ifndef VIRTUAL @@ -3984,7 +4113,7 @@ int power_chip(int file_des) { LOG(logDEBUG1, ("Powering chip to %d\n", arg)); #if !defined(JUNGFRAUD) && !defined(MOENCHD) && !defined(MYTHEN3D) && \ - !defined(GOTTHARD2D) + !defined(GOTTHARD2D) && !defined(XILINX_CHIPTESTBOARDD) functionNotImplemented(); #else // set & get @@ -4003,11 +4132,30 @@ int power_chip(int file_des) { } } #endif +#if defined(XILINX_CHIPTESTBOARDD) || defined(GOTTHARD2D) + if (ret == OK) { + if (arg != -1) { + if (arg != 0 && arg != 1) { + ret = FAIL; + sprintf(mess, "Power chip %d should be 0 or 1\n", arg); + LOG(logERROR, (mess)); + } else { + ret = powerChip(arg, mess); + } + } + if (ret == OK) { + retval = getPowerChip(); + LOG(logDEBUG1, ("Power chip: %d\n", retval)); + validate(&ret, mess, arg, retval, "power on/off chip", DEC); + } + } +#else if (ret == OK) { retval = powerChip(arg); LOG(logDEBUG1, ("Power chip: %d\n", retval)); } validate(&ret, mess, arg, retval, "power on/off chip", DEC); +#endif #if defined(JUNGFRAUD) || defined(MOENCHD) // narrow down error when powering on if (ret == FAIL && arg > 0) { @@ -4322,7 +4470,7 @@ int reboot_controller(int file_des) { ret = OK; memset(mess, 0, sizeof(mess)); -#ifdef EIGERD +#if defined(EIGERD) functionNotImplemented(); #elif VIRTUAL ret = GOODBYE; @@ -4403,7 +4551,7 @@ int set_adc_enable_mask_10g(int file_des) { return printSocketReadError(); LOG(logDEBUG1, ("Seting 10Gb ADC Enable Mask to %u\n", arg)); -#if (!defined(CHIPTESTBOARDD)) +#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) functionNotImplemented(); #else // only set @@ -4430,7 +4578,7 @@ int get_adc_enable_mask_10g(int file_des) { LOG(logDEBUG1, ("Getting 10Gb ADC Enable Mask\n")); -#if (!defined(CHIPTESTBOARDD)) +#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) functionNotImplemented(); #else // get @@ -4553,7 +4701,8 @@ int set_next_frame_number(int file_des) { LOG(logDEBUG1, ("Setting next frame number to %llu\n", arg)); #if !defined(EIGERD) && !defined(JUNGFRAUD) && !defined(MOENCHD) && \ - !defined(CHIPTESTBOARDD) + !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && \ + !defined(GOTTHARD2D) functionNotImplemented(); #else // only set @@ -4603,7 +4752,7 @@ int set_next_frame_number(int file_des) { } else { if (arg != retval) { ret = FAIL; -#ifdef VIRTUAL +#if defined(VIRTUAL) || defined(XILINX_CHIPTESTBOARDD) sprintf(mess, "Could not set next frame number. Set " "0x%lx, but read 0x%lx\n", @@ -4632,7 +4781,8 @@ int get_next_frame_number(int file_des) { LOG(logDEBUG1, ("Getting next frame number \n")); #if !defined(EIGERD) && !defined(JUNGFRAUD) && !defined(MOENCHD) && \ - !defined(CHIPTESTBOARDD) + !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && \ + !defined(GOTTHARD2D) functionNotImplemented(); #else // get @@ -5105,7 +5255,6 @@ int get_source_udp_ip(int file_des) { retval = udpDetails[0].srcip; retval = __builtin_bswap32(retval); LOG(logDEBUG1, ("udp soure ip retval: 0x%x\n", retval)); - return Server_SendResult(file_des, INT32, &retval, sizeof(retval)); } @@ -5187,7 +5336,6 @@ int get_dest_udp_ip(int file_des) { retval = udpDetails[0].dstip; retval = __builtin_bswap32(retval); LOG(logDEBUG1, ("udp destination ip retval: 0x%x\n", retval)); - return Server_SendResult(file_des, INT32, &retval, sizeof(retval)); } @@ -5272,11 +5420,9 @@ int get_source_udp_mac(int file_des) { memset(mess, 0, sizeof(mess)); uint64_t retval = -1; LOG(logDEBUG1, ("Getting udp source mac\n")); - // get only retval = udpDetails[0].srcmac; LOG(logDEBUG1, ("udp soure mac retval: 0x%lx\n", retval)); - return Server_SendResult(file_des, INT64, &retval, sizeof(retval)); } @@ -5350,11 +5496,9 @@ int get_dest_udp_mac(int file_des) { memset(mess, 0, sizeof(mess)); uint64_t retval = -1; LOG(logDEBUG1, ("Getting udp destination mac\n")); - // get only retval = udpDetails[0].dstmac; LOG(logDEBUG1, ("udp destination mac retval: 0x%lx\n", retval)); - return Server_SendResult(file_des, INT64, &retval, sizeof(retval)); } @@ -5425,11 +5569,9 @@ int get_dest_udp_port(int file_des) { memset(mess, 0, sizeof(mess)); uint16_t retval = -1; LOG(logDEBUG1, ("Getting destination port")); - // get only retval = udpDetails[0].dstport; LOG(logDEBUG, ("udp destination port retval: %hu\n", retval)); - return Server_SendResult(file_des, INT16, &retval, sizeof(retval)); } @@ -5557,7 +5699,6 @@ int get_num_interfaces(int file_des) { // get only retval = getNumberofUDPInterfaces(); - LOG(logDEBUG1, ("Number of udp interfaces retval: %u\n", retval)); return Server_SendResult(file_des, INT32, &retval, sizeof(retval)); } @@ -5719,7 +5860,7 @@ int set_readout_mode(int file_des) { return printSocketReadError(); LOG(logINFO, ("Setting readout mode: %u\n", arg)); -#ifndef CHIPTESTBOARDD +#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) functionNotImplemented(); #else // only set @@ -5765,7 +5906,7 @@ int get_readout_mode(int file_des) { LOG(logDEBUG1, ("Getting readout mode\n")); -#ifndef CHIPTESTBOARDD +#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) functionNotImplemented(); #else // get only @@ -5863,11 +6004,9 @@ int get_clock_frequency(int file_des) { case ADC_CLOCK: c = ADC_CLK; break; -#ifdef CHIPTESTBOARDD case DBIT_CLOCK: c = DBIT_CLK; break; -#endif case RUN_CLOCK: c = RUN_CLK; break; @@ -5932,7 +6071,11 @@ int set_clock_phase(int file_des) { #endif default: #if defined(GOTTHARD2D) || defined(MYTHEN3D) - if (ind < NUM_CLOCKS) { +#ifdef MYTHEN3D + if (args[0] < NUM_CLOCKS_TO_SET) { +#else + if (args[0] < NUM_CLOCKS) { +#endif c = (enum CLKINDEX)ind; break; } @@ -6395,6 +6538,10 @@ int set_veto_photon(int file_des) { ret = OK; memset(mess, 0, sizeof(mess)); +#ifndef GOTTHARD2D + functionNotImplemented(); +#else + int args[2] = {-1, -1}; if (receiveData(file_des, args, sizeof(args), INT32) < 0) return printSocketReadError(); @@ -6402,14 +6549,17 @@ int set_veto_photon(int file_des) { const int numChannels = args[1]; int *gainIndices = malloc(sizeof(int) * numChannels); - if (receiveData(file_des, gainIndices, sizeof(int) * numChannels, INT32) < - 0) { + int *values = malloc(sizeof(int) * numChannels); + if (gainIndices == NULL || values == NULL) { free(gainIndices); - return printSocketReadError(); + free(values); + setMemoryAllocationErrorMessage(); + return sendError(file_des); } - int *values = malloc(sizeof(int) * numChannels); - if (receiveData(file_des, values, sizeof(int) * numChannels, INT32) < 0) { + if ((receiveData(file_des, gainIndices, sizeof(int) * numChannels, INT32) < + 0) || + (receiveData(file_des, values, sizeof(int) * numChannels, INT32)) < 0) { free(gainIndices); free(values); return printSocketReadError(); @@ -6418,9 +6568,6 @@ int set_veto_photon(int file_des) { LOG(logINFO, ("Setting Veto Photon: [chipIndex:%d, nch:%d]\n", chipIndex, numChannels)); -#ifndef GOTTHARD2D - functionNotImplemented(); -#else // only set if (Server_VerifyLock() == OK) { if (numChannels != NCHAN) { @@ -6467,66 +6614,60 @@ int set_veto_photon(int file_des) { } } } + + free(gainIndices); + free(values); #endif - if (gainIndices != NULL) { - free(gainIndices); - } - if (values != NULL) { - free(values); - } return Server_SendResult(file_des, INT32, NULL, 0); } int get_veto_photon(int file_des) { ret = OK; memset(mess, 0, sizeof(mess)); - int arg = -1; - int *retvals = NULL; - int *gainRetvals = NULL; +#ifndef GOTTHARD2D + functionNotImplemented(); + return Server_SendResult(file_des, INT32, NULL, 0); +#else + + int arg = -1; if (receiveData(file_des, &arg, sizeof(arg), INT32) < 0) return printSocketReadError(); LOG(logDEBUG1, ("Getting veto photon [chip Index:%d]\n", arg)); -#ifndef GOTTHARD2D - functionNotImplemented(); -#else - retvals = malloc(sizeof(int) * NCHAN); - gainRetvals = malloc(sizeof(int) * NCHAN); + int *retvals = malloc(sizeof(int) * NCHAN); + int *gainRetvals = malloc(sizeof(int) * NCHAN); + if (gainRetvals == NULL || retvals == NULL) { + free(gainRetvals); + free(retvals); + setMemoryAllocationErrorMessage(); + return sendError(file_des); + } memset(retvals, 0, sizeof(int) * NCHAN); memset(gainRetvals, 0, sizeof(int) * NCHAN); - if (retvals == NULL || gainRetvals == NULL) { + // get only + int chipIndex = arg; + if (chipIndex < -1 || chipIndex >= NCHIP) { ret = FAIL; - strcpy( - mess, - "Could not get veto photon. Could not allocate memory in server\n"); + sprintf(mess, "Could not get veto photon. Invalid chip index %d\n", + chipIndex); LOG(logERROR, (mess)); } else { - // get only - int chipIndex = arg; - if (chipIndex < -1 || chipIndex >= NCHIP) { - ret = FAIL; - sprintf(mess, "Could not get veto photon. Invalid chip index %d\n", - chipIndex); + ret = getVetoPhoton(chipIndex, retvals, gainRetvals); + if (ret == FAIL) { + strcpy(mess, "Could not get veto photon for chipIndex -1. Not the " + "same for all chips. Select specific chip index " + "instead.\n"); LOG(logERROR, (mess)); } else { - ret = getVetoPhoton(chipIndex, retvals, gainRetvals); - if (ret == FAIL) { - strcpy(mess, - "Could not get veto photon for chipIndex -1. Not the " - "same for all chips. Select specific chip index " - "instead.\n"); - LOG(logERROR, (mess)); - } else { - for (int i = 0; i < NCHAN; ++i) { - LOG(logDEBUG1, - ("%d:[%d, %d]\n", i, retvals[i], gainRetvals[i])); - } + for (int i = 0; i < NCHAN; ++i) { + LOG(logDEBUG1, + ("%d:[%d, %d]\n", i, retvals[i], gainRetvals[i])); } } } -#endif + Server_SendResult(file_des, INT32, NULL, 0); if (ret != FAIL) { int nch = NCHAN; @@ -6534,13 +6675,10 @@ int get_veto_photon(int file_des) { sendData(file_des, gainRetvals, sizeof(int) * NCHAN, INT32); sendData(file_des, retvals, sizeof(int) * NCHAN, INT32); } - if (retvals != NULL) { - free(retvals); - } - if (gainRetvals != NULL) { - free(gainRetvals); - } + free(retvals); + free(gainRetvals); return ret; +#endif } int set_veto_reference(int file_des) { @@ -6601,8 +6739,8 @@ int set_burst_mode(int file_des) { if (Server_VerifyLock() == OK) { switch (arg) { case BURST_INTERNAL: - case BURST_EXTERNAL: - case CONTINUOUS_INTERNAL: + // case BURST_EXTERNAL: + // case CONTINUOUS_INTERNAL: case CONTINUOUS_EXTERNAL: break; default: @@ -6988,7 +7126,7 @@ int get_num_channels(int file_des) { LOG(logDEBUG1, ("Getting number of channels\n")); -#if !defined(CHIPTESTBOARDD) +#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) functionNotImplemented(); #else // get only @@ -7143,7 +7281,7 @@ int get_receiver_parameters(int file_des) { return printSocketReadError(); // analog samples -#if defined(CHIPTESTBOARDD) +#if defined(CHIPTESTBOARDD) || defined(XILINX_CHIPTESTBOARDD) i32 = getNumAnalogSamples(); #else i32 = 0; @@ -7153,7 +7291,7 @@ int get_receiver_parameters(int file_des) { return printSocketReadError(); // digital samples -#ifdef CHIPTESTBOARDD +#if defined(CHIPTESTBOARDD) || defined(XILINX_CHIPTESTBOARDD) i32 = getNumDigitalSamples(); #else i32 = 0; @@ -7292,7 +7430,7 @@ int get_receiver_parameters(int file_des) { return printSocketReadError(); // readout mode -#ifdef CHIPTESTBOARDD +#if defined(CHIPTESTBOARDD) || defined(XILINX_CHIPTESTBOARDD) i32 = getReadoutMode(); #else i32 = 0; @@ -7312,7 +7450,7 @@ int get_receiver_parameters(int file_des) { return printSocketReadError(); // 10g adc mask -#if defined(CHIPTESTBOARDD) +#if defined(CHIPTESTBOARDD) || defined(XILINX_CHIPTESTBOARDD) u32 = getADCEnableMask_10G(); #else u32 = 0; @@ -7457,7 +7595,7 @@ int get_receiver_parameters(int file_des) { return printSocketReadError(); // transceiver samples -#ifdef CHIPTESTBOARDD +#if defined(CHIPTESTBOARDD) || defined(XILINX_CHIPTESTBOARDD) i32 = getNumTransceiverSamples(); #else i32 = 0; @@ -7467,7 +7605,7 @@ int get_receiver_parameters(int file_des) { return printSocketReadError(); // transceiver mask -#if defined(CHIPTESTBOARDD) +#if defined(CHIPTESTBOARDD) || defined(XILINX_CHIPTESTBOARDD) u32 = getTransceiverEnableMask(); #else u32 = 0; @@ -7477,7 +7615,6 @@ int get_receiver_parameters(int file_des) { return printSocketReadError(); LOG(logINFO, ("Sent %d bytes for receiver parameters\n", n)); - return OK; } @@ -7706,21 +7843,24 @@ int set_pattern(int file_des) { char args[MAX_STR_LENGTH]; memset(args, 0, MAX_STR_LENGTH); -#if !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) +#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && \ + !defined(MYTHEN3D) functionNotImplemented(); #else - patternParameters *pat = malloc(sizeof(patternParameters)); + if (pat == NULL) { + setMemoryAllocationErrorMessage(); + return sendError(file_des); + } memset(pat, 0, sizeof(patternParameters)); + // ignoring endianness for eiger if (receiveData(file_des, pat, sizeof(patternParameters), INT32) < 0) { - if (pat != NULL) - free(pat); + free(pat); return printSocketReadError(); } if (receiveData(file_des, args, MAX_STR_LENGTH, OTHER) < 0) { - if (pat != NULL) - free(pat); + free(pat); return printSocketReadError(); } @@ -7728,8 +7868,7 @@ int set_pattern(int file_des) { LOG(logDEBUG1, ("Setting Pattern from structure\n")); ret = loadPattern(mess, logINFO, pat, args); } - if (pat != NULL) - free(pat); + free(pat); #endif return Server_SendResult(file_des, INT32, NULL, 0); @@ -7743,7 +7882,8 @@ int get_pattern_file(int file_des) { LOG(logDEBUG1, ("Getting pattern file name\n")); -#if !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) +#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && \ + !defined(MYTHEN3D) functionNotImplemented(); #else // get only @@ -7757,12 +7897,17 @@ int get_pattern(int file_des) { ret = OK; memset(mess, 0, sizeof(mess)); -#if !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) +#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && \ + !defined(MYTHEN3D) functionNotImplemented(); return Server_SendResult(file_des, INT32, NULL, 0); #else patternParameters *pat = malloc(sizeof(patternParameters)); + if (pat == NULL) { + setMemoryAllocationErrorMessage(); + return sendError(file_des); + } memset(pat, 0, sizeof(patternParameters)); if (Server_VerifyLock() == OK) { @@ -7772,8 +7917,7 @@ int get_pattern(int file_des) { // ignoring endianness for eiger int ret = Server_SendResult(file_des, INT32, pat, sizeof(patternParameters)); - if (pat != NULL) - free(pat); + free(pat); return ret; #endif } @@ -7881,10 +8025,13 @@ int set_scan(int file_des) { if (ret == OK) { scan = 1; numScanSteps = (abs(stop - start) / abs(step)) + 1; - if (scanSteps != NULL) { - free(scanSteps); - } + // freed only at startup of the next scan + free(scanSteps); scanSteps = malloc(numScanSteps * sizeof(int)); + if (scanSteps == NULL) { + setMemoryAllocationErrorMessage(); + return sendError(file_des); + } for (int i = 0; i != numScanSteps; ++i) { scanSteps[i] = start + i * step; LOG(logDEBUG1, ("scansteps[%d]:%d\n", i, scanSteps[i])); @@ -8158,55 +8305,54 @@ int set_adc_config(int file_des) { int get_bad_channels(int file_des) { ret = OK; memset(mess, 0, sizeof(mess)); - int nretvals = 0; - int *retvals = NULL; - LOG(logDEBUG1, ("Getting bad channels\n")); #if !defined(GOTTHARD2D) && !defined(MYTHEN3D) functionNotImplemented(); + return Server_SendResult(file_des, INT32, NULL, 0); #else // get only - retvals = getBadChannels(&nretvals); + int nretvals = 0; + int *retvals = getBadChannels(&nretvals); if (nretvals == -1) { - ret = FAIL; - strcpy(mess, "Could not get bad channels. Memory allcoation error\n"); - LOG(logERROR, (mess)); + setMemoryAllocationErrorMessage(); + return sendError(file_des); } -#endif + Server_SendResult(file_des, INT32, NULL, 0); - if (ret != FAIL) { - sendData(file_des, &nretvals, sizeof(nretvals), INT32); - if (nretvals > 0) { - sendData(file_des, retvals, sizeof(int) * nretvals, INT32); - } - } - if (retvals != NULL) { - free(retvals); + sendData(file_des, &nretvals, sizeof(nretvals), INT32); + if (nretvals > 0) { + sendData(file_des, retvals, sizeof(int) * nretvals, INT32); } + free(retvals); return ret; +#endif } int set_bad_channels(int file_des) { ret = OK; memset(mess, 0, sizeof(mess)); - int nargs = 0; - int *args = NULL; - - if (receiveData(file_des, &nargs, sizeof(nargs), INT32) < 0) - return printSocketReadError(); - - if (nargs > 0) { - args = malloc(nargs * sizeof(int)); - if (receiveData(file_des, args, nargs * sizeof(int), INT32) < 0) - return printSocketReadError(); - } - - LOG(logDEBUG1, ("Setting %d bad channels\n", nargs)); #if !defined(GOTTHARD2D) && !defined(MYTHEN3D) functionNotImplemented(); #else + int nargs = 0; + if (receiveData(file_des, &nargs, sizeof(nargs), INT32) < 0) + return printSocketReadError(); + int *args = NULL; + if (nargs > 0) { + args = malloc(nargs * sizeof(int)); + if (args == NULL) { + setMemoryAllocationErrorMessage(); + return sendError(file_des); + } + if (receiveData(file_des, args, nargs * sizeof(int), INT32) < 0) { + free(args); + return printSocketReadError(); + } + } + LOG(logDEBUG1, ("Setting %d bad channels\n", nargs)); + // only set if (Server_VerifyLock() == OK) { // validate bad channel number @@ -8235,11 +8381,11 @@ int set_bad_channels(int file_des) { int nretvals = 0; int *retvals = getBadChannels(&nretvals); if (nretvals == -1) { - ret = FAIL; - strcpy(mess, "Could not get bad channels. Memory " - "allcoation error\n"); - LOG(logERROR, (mess)); - } else if (nretvals != nargs) { + free(args); + setMemoryAllocationErrorMessage(); + return sendError(file_des); + } + if (nretvals != nargs) { ret = FAIL; sprintf(mess, "Could not set bad channels. Set %d channels, but " @@ -8248,15 +8394,11 @@ int set_bad_channels(int file_des) { nargs, nretvals); LOG(logERROR, (mess)); } - if (retvals != NULL) { - free(retvals); - } + free(retvals); } } } - if (args != NULL) { - free(args); - } + free(args); #endif return Server_SendResult(file_des, INT32, NULL, 0); } @@ -8313,12 +8455,14 @@ int get_bursts_left(int file_des) { int start_readout(int file_des) { ret = OK; memset(mess, 0, sizeof(mess)); -#if !defined(MYTHEN3D) && !defined(CHIPTESTBOARDD) +#if !defined(MYTHEN3D) && !defined(CHIPTESTBOARDD) && \ + !defined(XILINX_CHIPTESTBOARDD) functionNotImplemented(); #else if (Server_VerifyLock() == OK) { enum runStatus s = getRunStatus(); - if (s == RUNNING || s == WAITING) { + if ((s == RUNNING || s == WAITING) && + (myDetectorType != XILINX_CHIPTESTBOARD)) { ret = FAIL; strcpy(mess, "Could not start readout because the detector is " "already running!\n"); @@ -8359,7 +8503,8 @@ int start_readout(int file_des) { ret = FAIL; strcpy(mess, "Could not start read frames thread!\n"); LOG(logERROR, (mess)); - } + } else + pthread_detach(pthread_tid_ctb_1g); } } #endif @@ -8377,7 +8522,7 @@ int reset_to_default_dacs(int file_des) { return printSocketReadError(); LOG(logDEBUG1, ("Resetting dacs to defaults (hard reset: %d)\n", arg)); -#ifdef CHIPTESTBOARDD +#if defined(CHIPTESTBOARDD) || defined(XILINX_CHIPTESTBOARDD) functionNotImplemented(); #else if (Server_VerifyLock() == OK) { @@ -8792,7 +8937,7 @@ int get_default_dac(int file_des) { LOG(logDEBUG1, ("Getting default dac [dacindex:%d, settings: %d]\n", dacindex, sett)); -#ifdef CHIPTESTBOARDD +#if defined(CHIPTESTBOARDD) || defined(XILINX_CHIPTESTBOARDD) functionNotImplemented(); #else // get only @@ -8832,7 +8977,7 @@ int set_default_dac(int file_des) { LOG(logDEBUG1, ("Setting default dac [dacindex: %d, settings: %d] to %d\n", (int)dacindex, (int)sett, value)); -#ifdef CHIPTESTBOARDD +#if defined(CHIPTESTBOARDD) || defined(XILINX_CHIPTESTBOARDD) functionNotImplemented(); #else // only set @@ -9452,6 +9597,7 @@ int clear_all_udp_dst(int file_des) { memset(mess, 0, sizeof(mess)); LOG(logINFO, ("Clearing all udp destinations\n")); + if (Server_VerifyLock() == OK) { if (check_detector_idle("clear all udp destinations") == OK) { memset(udpDetails, 0, sizeof(udpDetails)); @@ -9536,7 +9682,7 @@ int get_readout_speed(int file_des) { LOG(logDEBUG1, ("Getting readout speed\n")); #if !defined(JUNGFRAUD) && !defined(MOENCHD) && !defined(EIGERD) && \ - !defined(GOTTHARD2D) + !defined(GOTTHARD2D) && !defined(MYTHEN3D) functionNotImplemented(); #else // get only @@ -9560,7 +9706,7 @@ int set_readout_speed(int file_des) { LOG(logDEBUG1, ("Setting readout speed : %u\n", arg)); #if !defined(JUNGFRAUD) && !defined(MOENCHD) && !defined(EIGERD) && \ - !defined(GOTTHARD2D) + !defined(GOTTHARD2D) && !defined(MYTHEN3D) functionNotImplemented(); #else // only set @@ -9576,7 +9722,8 @@ int set_readout_speed(int file_des) { #endif if (ret == OK) { switch (arg) { -#if defined(EIGERD) || defined(JUNGFRAUD) || defined(MOENCHD) +#if defined(EIGERD) || defined(JUNGFRAUD) || defined(MOENCHD) || \ + defined(MYTHEN3D) case FULL_SPEED: case HALF_SPEED: case QUARTER_SPEED: @@ -9637,7 +9784,7 @@ int get_kernel_version(int file_des) { int update_kernel(int file_des) { ret = OK; memset(mess, 0, sizeof(mess)); -#ifdef EIGERD +#if defined(EIGERD) || defined(XILINX_CHIPTESTBOARDD) functionNotImplemented(); return Server_SendResult(file_des, INT32, NULL, 0); #else @@ -9689,7 +9836,8 @@ int receive_program(int file_des, enum PROGRAM_INDEX index) { LOG(logINFO, ("\tServer Name: %s\n", serverName)); } -#if !defined(GOTTHARD2D) && !defined(MYTHEN3D) && !defined(EIGERD) +#if !defined(GOTTHARD2D) && !defined(MYTHEN3D) && !defined(EIGERD) && \ + !defined(XILINX_CHIPTESTBOARDD) int forceDeleteNormalFile = 0; if (receiveData(file_des, &forceDeleteNormalFile, sizeof(forceDeleteNormalFile), INT32) < 0) @@ -9704,11 +9852,12 @@ int receive_program(int file_des, enum PROGRAM_INDEX index) { strcpy(mess, "Server name is the same as the symbolic link. Please " "use a different server name\n"); LOG(logERROR, (mess)); + Server_SendResult(file_des, INT32, NULL, 0); } // in same folder as current process (will also work for virtual then // with write permissions) - { + if (ret == OK) { const int fileNameSize = 128; char fname[fileNameSize]; if (getAbsPath(fname, fileNameSize, serverName) == FAIL) { @@ -9725,7 +9874,8 @@ int receive_program(int file_des, enum PROGRAM_INDEX index) { } if (ret == OK) { -#if defined(GOTTHARD2D) || defined(MYTHEN3D) || defined(EIGERD) +#if defined(GOTTHARD2D) || defined(MYTHEN3D) || defined(EIGERD) || \ + defined(XILINX_CHIPTESTBOARDD) receive_program_default(file_des, index, functionType, filesize, checksum, serverName); #else @@ -9777,14 +9927,9 @@ void receive_program_via_blackfin(int file_des, enum PROGRAM_INDEX index, src = malloc(MAX_BLACKFIN_PROGRAM_SIZE); if (src == NULL) { fclose(fd); - struct sysinfo info; - sysinfo(&info); - sprintf(mess, - "Could not %s. Memory allocation failure. Free " - "space: %d MB\n", - functionType, (int)(info.freeram / (1024 * 1024))); - LOG(logERROR, (mess)); + setMemoryAllocationErrorMessage(); ret = FAIL; + LOG(logERROR, (mess)); } } Server_SendResult(file_des, INT32, NULL, 0); @@ -9871,7 +10016,8 @@ void receive_program_via_blackfin(int file_des, enum PROGRAM_INDEX index, void receive_program_default(int file_des, enum PROGRAM_INDEX index, char *functionType, uint64_t filesize, char *checksum, char *serverName) { -#if !defined(GOTTHARD2D) && !defined(MYTHEN3D) && !defined(EIGERD) +#if !defined(GOTTHARD2D) && !defined(MYTHEN3D) && !defined(EIGERD) && \ + !defined(XILINX_CHIPTESTBOARDD) ret = FAIL; sprintf(mess, "Could not %s. program via blackfin not implmented for this " @@ -9926,6 +10072,7 @@ void receive_program_default(int file_des, enum PROGRAM_INDEX index, } Server_SendResult(file_des, INT32, NULL, 0); if (ret == FAIL) { + free(src); return; } @@ -10389,8 +10536,10 @@ int get_hardware_version(int file_des) { memset(mess, 0, sizeof(mess)); char retvals[MAX_STR_LENGTH]; memset(retvals, 0, MAX_STR_LENGTH); + getHardwareVersion(retvals); LOG(logDEBUG1, ("hardware version retval: %s\n", retvals)); + return Server_SendResult(file_des, OTHER, retvals, sizeof(retvals)); } @@ -10435,13 +10584,15 @@ int get_frontend_firmware_version(int file_des) { int set_bit(int file_des) { ret = OK; memset(mess, 0, sizeof(mess)); - uint32_t args[2] = {-1, -1}; + uint32_t args[3] = {-1, -1, -1}; if (receiveData(file_des, args, sizeof(args), INT32) < 0) return printSocketReadError(); uint32_t addr = args[0]; int nBit = (int)args[1]; - LOG(logDEBUG1, ("Setting bit %d of reg 0x%x\n", nBit, addr)); + uint32_t validate = args[2]; + LOG(logDEBUG1, + ("Setting bit %d of reg 0x%x, validate:%d\n", nBit, addr, validate)); // only set if (Server_VerifyLock() == OK) { @@ -10454,20 +10605,23 @@ int set_bit(int file_des) { LOG(logERROR, (mess)); } else { #ifdef EIGERD - ret = setBit(addr, nBit); - if (ret == FAIL) { + ret = setBit(addr, nBit, validate); #else uint32_t bitmask = (1 << nBit); #ifdef GOTTHARDD uint32_t val = readRegister16And32(addr) | bitmask; - uint32_t retval = writeRegister16And32(addr, val); + writeRegister16And32(addr, val); + uint32_t retval = readRegister16And32(addr) | bitmask; #else uint32_t val = readRegister(addr) | bitmask; - uint32_t retval = writeRegister(addr, val); + writeRegister(addr, val); + uint32_t retval = readRegister(addr) | bitmask; #endif - if (!(retval & bitmask)) { + if (validate && (!(retval & bitmask))) { ret = FAIL; + } #endif + if (ret == FAIL) { sprintf(mess, "Could not set bit %d.\n", nBit); LOG(logERROR, (mess)); } @@ -10479,13 +10633,15 @@ int set_bit(int file_des) { int clear_bit(int file_des) { ret = OK; memset(mess, 0, sizeof(mess)); - uint32_t args[2] = {-1, -1}; + uint32_t args[3] = {-1, -1, -1}; if (receiveData(file_des, args, sizeof(args), INT32) < 0) return printSocketReadError(); uint32_t addr = args[0]; int nBit = (int)args[1]; - LOG(logDEBUG1, ("Clearing bit %d of reg 0x%x\n", nBit, addr)); + uint32_t validate = args[2]; + LOG(logDEBUG1, + ("Clearing bit %d of reg 0x%x, validate:%d\n", nBit, addr, validate)); // only set if (Server_VerifyLock() == OK) { @@ -10498,20 +10654,23 @@ int clear_bit(int file_des) { LOG(logERROR, (mess)); } else { #ifdef EIGERD - ret = clearBit(addr, nBit); - if (ret == FAIL) { + ret = clearBit(addr, nBit, validate); #else uint32_t bitmask = (1 << nBit); #ifdef GOTTHARDD uint32_t val = readRegister16And32(addr) & ~bitmask; - uint32_t retval = writeRegister16And32(addr, val); + writeRegister16And32(addr, val); + uint32_t retval = readRegister16And32(addr) & ~bitmask; #else uint32_t val = readRegister(addr) & ~bitmask; - uint32_t retval = writeRegister(addr, val); + writeRegister(addr, val); + uint32_t retval = readRegister(addr) & ~bitmask; #endif - if (retval & bitmask) { + if (validate && (retval & bitmask)) { ret = FAIL; + } #endif + if (ret == FAIL) { sprintf(mess, "Could not clear bit %d.\n", nBit); LOG(logERROR, (mess)); } @@ -10564,7 +10723,7 @@ int get_num_transceiver_samples(int file_des) { memset(mess, 0, sizeof(mess)); int retval = -1; -#if !defined(CHIPTESTBOARDD) +#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) functionNotImplemented(); #else // get only @@ -10583,24 +10742,33 @@ int set_num_transceiver_samples(int file_des) { return printSocketReadError(); LOG(logDEBUG1, ("Setting number of transceiver samples %d\n", arg)); -#if !defined(CHIPTESTBOARDD) +#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) functionNotImplemented(); #else // only set if (Server_VerifyLock() == OK) { - ret = setNumTransceiverSamples(arg); - if (ret == FAIL) { - sprintf( - mess, - "Could not set number of transceiver samples to %d. Could not " - "allocate RAM\n", - arg); + if (arg < 0 || arg > MAX_TRANSCEIVER_SAMPLES) { + ret = FAIL; + sprintf(mess, + "Could not set number of transceiver samples. Invalid " + "value %d. Must be 0-%d\n", + arg, MAX_TRANSCEIVER_SAMPLES); LOG(logERROR, (mess)); } else { - int retval = getNumTransceiverSamples(); - LOG(logDEBUG1, ("retval num transceiver samples %d\n", retval)); - validate(&ret, mess, arg, retval, - "set number of transceiver samples", DEC); + ret = setNumTransceiverSamples(arg); + if (ret == FAIL) { + sprintf(mess, + "Could not set number of transceiver samples to %d. " + "Could not " + "allocate RAM\n", + arg); + LOG(logERROR, (mess)); + } else { + int retval = getNumTransceiverSamples(); + LOG(logDEBUG1, ("retval num transceiver samples %d\n", retval)); + validate(&ret, mess, arg, retval, + "set number of transceiver samples", DEC); + } } } #endif @@ -10616,14 +10784,14 @@ int set_transceiver_enable(int file_des) { return printSocketReadError(); LOG(logDEBUG1, ("Setting Transceiver Enable Mask to %u\n", arg)); -#if (!defined(CHIPTESTBOARDD)) +#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) functionNotImplemented(); #else // only set if (Server_VerifyLock() == OK) { if (arg > MAX_TRANSCEIVER_MASK) { ret = FAIL; - sprintf(mess, "Invalid Transceiver Mask. Max: 0x%x\n", + sprintf(mess, "Invalid Transceiver Mask. Option: 0 - 0x%x\n", MAX_TRANSCEIVER_MASK); LOG(logERROR, (mess)); } else { @@ -10658,7 +10826,7 @@ int get_transceiver_enable(int file_des) { LOG(logDEBUG1, ("Getting Transceiver Enable Mask \n")); -#if (!defined(CHIPTESTBOARDD)) +#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) functionNotImplemented(); #else // get @@ -10856,6 +11024,13 @@ int set_pedestal_mode(int file_des) { "be 0. [%hhu, %hu].\n", frames, loops); LOG(logERROR, (mess)); + } else if (loops > MAX_PEDESTAL_LOOPS) { + ret = FAIL; + sprintf(mess, + "Could not set pedestal mode. Loops [%hu] cannot be " + "greater than %d.\n", + loops, MAX_PEDESTAL_LOOPS); + LOG(logERROR, (mess)); } else { setPedestalMode(enable, frames, loops); int retvalEnable = getPedestalMode(); @@ -10895,3 +11070,139 @@ int set_pedestal_mode(int file_des) { #endif return Server_SendResult(file_des, INT32, NULL, 0); } + +int config_transceiver(int file_des) { + ret = OK; + memset(mess, 0, sizeof(mess)); + +#if !defined(XILINX_CHIPTESTBOARDD) + functionNotImplemented(); +#else + if (Server_VerifyLock() == OK) { + LOG(logINFO, ("Configuring Transceiver\n")); + ret = configureTransceiver(mess); + if (ret == FAIL) { + LOG(logERROR, (mess)); + } + } +#endif + return Server_SendResult(file_des, INT32, NULL, 0); +} + +int get_timing_info_decoder(int file_des) { + ret = OK; + memset(mess, 0, sizeof(mess)); + enum timingInfoDecoder retval = SWISSFEL; + + LOG(logDEBUG1, ("Getting timing info decoder\n")); + +#ifndef JUNGFRAUD + functionNotImplemented(); +#else + // get only + ret = getTimingInfoDecoder(&retval); + LOG(logDEBUG1, ("retval timing info decoder: %d\n", retval)); + if (ret == FAIL) { + strcpy(mess, "Could not get timing info decoder\n"); + LOG(logERROR, (mess)); + } +#endif + return Server_SendResult(file_des, INT32, &retval, sizeof(retval)); +} + +int set_timing_info_decoder(int file_des) { + ret = OK; + memset(mess, 0, sizeof(mess)); + enum timingInfoDecoder arg = SWISSFEL; + + if (receiveData(file_des, &arg, sizeof(arg), INT32) < 0) + return printSocketReadError(); + LOG(logDEBUG1, ("Setting timing info decoder: %u\n", (int)arg)); + +#ifndef JUNGFRAUD + functionNotImplemented(); +#else + // only set + if (Server_VerifyLock() == OK) { + switch (arg) { + case SWISSFEL: + case SHINE: + break; + default: + modeNotImplemented("Timing info decoder index", (int)arg); + break; + } + if (ret == OK) { + ret = setTimingInfoDecoder(arg); + if (ret == FAIL) { + sprintf(mess, "Could not set timing info decoder\n"); + LOG(logERROR, (mess)); + } else { + enum timingInfoDecoder retval = SWISSFEL; + ret = getTimingInfoDecoder(&retval); + if (ret == FAIL) { + strcpy(mess, "Could not get timing info decoder\n"); + LOG(logERROR, (mess)); + } else { + LOG(logDEBUG1, + ("timing info decoder retval: %u\n", retval)); + validate(&ret, mess, (int)arg, (int)retval, + "set timing info decoder", DEC); + } + } + } + } +#endif + return Server_SendResult(file_des, INT32, NULL, 0); +} + +int get_collection_mode(int file_des) { + ret = OK; + memset(mess, 0, sizeof(mess)); + enum collectionMode retval = HOLE; + + LOG(logDEBUG1, ("Getting collection mode\n")); + +#ifndef JUNGFRAUD + functionNotImplemented(); +#else + // get only + retval = getElectronCollectionMode() ? ELECTRON : HOLE; + LOG(logDEBUG1, ("collection mode retval: %u\n", retval)); +#endif + return Server_SendResult(file_des, INT32, &retval, sizeof(retval)); +} + +int set_collection_mode(int file_des) { + ret = OK; + memset(mess, 0, sizeof(mess)); + enum collectionMode arg = HOLE; + + if (receiveData(file_des, &arg, sizeof(arg), INT32) < 0) + return printSocketReadError(); + LOG(logDEBUG1, ("Setting collection mode: %u\n", (int)arg)); + +#ifndef JUNGFRAUD + functionNotImplemented(); +#else + // only set + if (Server_VerifyLock() == OK) { + switch (arg) { + case HOLE: + setElectronCollectionMode(0); + break; + case ELECTRON: + setElectronCollectionMode(1); + break; + default: + modeNotImplemented("Collection mode index", (int)arg); + break; + } + enum collectionMode retval = + getElectronCollectionMode() ? ELECTRON : HOLE; + validate(&ret, mess, (int)arg, (int)retval, "set collection mode", DEC); + LOG(logDEBUG1, ("collection mode retval: %u\n", retval)); + } +#endif + return Server_SendResult(file_des, INT32, NULL, 0); +} diff --git a/slsDetectorServers/xilinx_ctbDetectorServer/CMakeLists.txt b/slsDetectorServers/xilinx_ctbDetectorServer/CMakeLists.txt new file mode 100644 index 000000000..78a5fbfb7 --- /dev/null +++ b/slsDetectorServers/xilinx_ctbDetectorServer/CMakeLists.txt @@ -0,0 +1,42 @@ +# SPDX-License-Identifier: LGPL-3.0-or-other +# Copyright (C) 2021 Contributors to the SLS Detector Package +add_executable(xilinx_ctbDetectorServer_virtual + slsDetectorFunctionList.c + ../slsDetectorServer/src/slsDetectorServer.c + ../slsDetectorServer/src/slsDetectorServer_funcs.c + ../slsDetectorServer/src/communication_funcs.c + ../slsDetectorServer/src/arm64.c + ../slsDetectorServer/src/common.c + ../slsDetectorServer/src/sharedMemory.c + ../slsDetectorServer/src/loadPattern.c + ../slsDetectorServer/src/programViaArm.c + ../slsDetectorServer/src/communication_funcs_UDP.c + ../../slsSupportLib/src/md5.c + ../slsDetectorServer/src/LTC2620_Driver.c +) + +include_directories( + ../slsDetectorServer/include + ../../slsSupportLib/include + ../../slsDetectorSoftware/include/sls/ +) + +target_include_directories(xilinx_ctbDetectorServer_virtual + PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} +) + +target_compile_definitions(xilinx_ctbDetectorServer_virtual + PUBLIC XILINX_CHIPTESTBOARDD ARMPROCESSOR VIRTUAL STOP_SERVER +) + +target_link_libraries(xilinx_ctbDetectorServer_virtual + PUBLIC pthread rt m slsProjectCSettings +) + +set_target_properties(xilinx_ctbDetectorServer_virtual PROPERTIES + RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin +) + +install(TARGETS xilinx_ctbDetectorServer_virtual + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +) diff --git a/slsDetectorServers/xilinx_ctbDetectorServer/Makefile b/slsDetectorServers/xilinx_ctbDetectorServer/Makefile new file mode 100755 index 000000000..06a4d986d --- /dev/null +++ b/slsDetectorServers/xilinx_ctbDetectorServer/Makefile @@ -0,0 +1,51 @@ +# 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/ +det_lib = ../../slsDetectorSoftware/include/sls/ +md5_dir = ../../slsSupportLib/src/ + +CROSS = aarch64-none-linux-gnu- +CC = $(CROSS)gcc +#TODO: allow these warnings and fix code +CFLAGS += -Wall -std=gnu99 -Wno-format-overflow -Wno-format-truncation -DXILINX_CHIPTESTBOARDD -DARMPROCESSOR -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(det_lib) -I$(current_dir) #-DDEBUG1 #-DVERBOSEI #-DVERBOSE +#CFLAGS += -Wall -std=gnu99 -DXILINX_CHIPTESTBOARDD -DARMPROCESSOR -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(det_lib) -I$(current_dir) #-DDEBUG1 #-DVERBOSEI #-DVERBOSE +LDLIBS += -lm -lrt -pthread +PROGS = xilinx_ctbDetectorServer +DESTDIR ?= bin +INSTMODE = 0777 + +SRCS = slsDetectorFunctionList.c +SRCS += $(main_src)slsDetectorServer.c $(main_src)slsDetectorServer_funcs.c $(main_src)communication_funcs.c $(main_src)arm64.c $(main_src)common.c $(main_src)/sharedMemory.c $(main_src)/loadPattern.c $(md5_dir)md5.c $(main_src)programViaArm.c $(main_src)LTC2620_Driver.c + +OBJS = $(SRCS:.c=.o) + +all: clean $(PROGS) + +local: CC := gcc +local: clean $(PROGS) + +version: clean versioning $(PROGS) + +boot: $(OBJS) + +version_branch=$(API_BRANCH) +version_name=APIXILINXCTB +version_path=slsDetectorServers/xilinx_ctbDetectorServer +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) + rm $(main_src)*.o $(md5_dir)*.o +clean: + rm -rf $(DESTDIR)/$(PROGS) *.o *.gdb $(main_src)*.o $(md5_dir)*.o + + + diff --git a/slsDetectorServers/xilinx_ctbDetectorServer/RegisterDefs.h b/slsDetectorServers/xilinx_ctbDetectorServer/RegisterDefs.h new file mode 100644 index 000000000..3563a8b82 --- /dev/null +++ b/slsDetectorServers/xilinx_ctbDetectorServer/RegisterDefs.h @@ -0,0 +1,1020 @@ +// SPDX-License-Identifier: LGPL-3.0-or-other +// Copyright (C) 2021 Contributors to the SLS Detector Package +#pragma once + +#define CTRL_REG (0x0) + +#define POWER_VIO_OFST (0) +#define POWER_VIO_MSK (0x00000001 << POWER_VIO_OFST) +#define POWER_VCC_A_OFST (1) +#define POWER_VCC_A_MSK (0x00000001 << POWER_VCC_A_OFST) +#define POWER_VCC_B_OFST (2) +#define POWER_VCC_B_MSK (0x00000001 << POWER_VCC_B_OFST) +#define POWER_VCC_C_OFST (3) +#define POWER_VCC_C_MSK (0x00000001 << POWER_VCC_C_OFST) +#define POWER_VCC_D_OFST (4) +#define POWER_VCC_D_MSK (0x00000001 << POWER_VCC_D_OFST) + +#define EMPTY4REG (0x4) + +#define STATUSREG1 (0x8) + +#define TRANSMISSIONBUSY_OFST (0) +#define TRANSMISSIONBUSY_MSK (0x00000001 << TRANSMISSIONBUSY_OFST) + +#define STATUSREG2 (0xC) + +#define FPGAVERSIONREG (0x10) + +#define FPGACOMPDATE_OFST (0) +#define FPGACOMPDATE_MSK (0x00ffffff << FPGACOMPDATE_OFST) +#define FPGADETTYPE_OFST (24) +#define FPGADETTYPE_MSK (0x000000ff << FPGADETTYPE_OFST) + +#define EMPTY14REG (0x14) + +#define FIXEDPATTERNREG (0x18) +#define FIXEDPATTERNVAL (0xACDC2016) + +#define EMPTY1CREG (0x1C) + +#define APIVERSIONREG (0x20) + +#define APICOMPDATE_OFST (0) +#define APICOMPDATE_MSK (0x00ffffff << APICOMPDATE_OFST) +#define APIDETTYPE_OFST (24) +#define APIDETTYPE_MSK (0x000000ff << APIDETTYPE_OFST) + +#define EMPTY24REG (0x24) + +#define PKTPACKETLENGTHREG (0x28) + +#define PACKETLENGTH1G_OFST (0) +#define PACKETLENGTH1G_MSK (0x0000ffff << PACKETLENGTH1G_OFST) +#define PACKETLENGTH10G_OFST (16) +#define PACKETLENGTH10G_MSK (0x0000ffff << PACKETLENGTH10G_OFST) + +#define EMPTY2CREG (0x2C) + +#define PKTNOPACKETSREG (0x30) + +#define NOPACKETS1G_OFST (0) +#define NOPACKETS1G_MSK (0x0000003f << NOPACKETS1G_OFST) +#define NOPACKETS10G_OFST (16) +#define NOPACKETS10G_MSK (0x0000003f << NOPACKETS10G_OFST) + +#define EMPTY34REG (0x34) + +#define PKTCTRLREG (0x38) + +#define NOSERVERS_OFST (0) +#define NOSERVERS_MSK (0x0000003f << NOSERVERS_OFST) +#define SERVERSTART_OFST (8) +#define SERVERSTART_MSK (0x0000001f << SERVERSTART_OFST) +#define ETHINTERF_OFST (16) +#define ETHINTERF_MSK (0x00000001 << ETHINTERF_OFST) + +#define EMPTY3CREG (0x3C) + +#define PKTCOORDREG1 (0x40) + +#define COORDX_OFST (0) +#define COORDX_MSK (0x0000ffff << COORDX_OFST) +#define COORDY_OFST (16) +#define COORDY_MSK (0x0000ffff << COORDY_OFST) + +#define EMPTY44REG (0x44) + +#define PKTCOORDREG2 (0x48) + +#define COORDZ_OFST (0) +#define COORDZ_MSK (0x0000ffff << COORDZ_OFST) + +#define EMPTY4CREG (0x4C) + +#define EMPTY50REG (0x50) + +#define EMPTY54REG (0x54) + +#define EMPTY58REG (0x58) + +#define EMPTY5CREG (0x5C) + +#define EMPTY60REG (0x60) + +#define EMPTY64REG (0x64) + +#define EMPTY68REG (0x68) + +#define EMPTY6CREG (0x6C) + +#define EMPTY70REG (0x70) + +#define EMPTY74REG (0x74) + +#define EMPTY78REG (0x78) + +#define EMPTY7CREG (0x7C) + +#define EMPTY80REG (0x80) + +#define EMPTY84REG (0x84) + +#define EMPTY88REG (0x88) + +#define EMPTY8CREG (0x8C) + +#define EMPTY90REG (0x90) + +#define EMPTY94REG (0x94) + +#define EMPTY98REG (0x98) + +#define EMPTY9CREG (0x9C) + +#define FLOW_STATUS_REG (0x100) + +#define RSM_BUSY_OFST (0) +#define RSM_BUSY_MSK (0x00000001 << RSM_BUSY_OFST) +#define RSM_TRG_WAIT_OFST (3) +#define RSM_TRG_WAIT_MSK (0x00000001 << RSM_TRG_WAIT_OFST) +#define CSM_BUSY_OFST (17) +#define CSM_BUSY_MSK (0x00000001 << CSM_BUSY_OFST) + +#define EMPTY104REG (0x104) + +#define FLOW_CONTROL_REG (0x108) + +#define START_F_OFST (0) +#define START_F_MSK (0x00000001 << START_F_OFST) +#define STOP_F_OFST (1) +#define STOP_F_MSK (0x00000001 << STOP_F_OFST) +#define RST_F_OFST (2) +#define RST_F_MSK (0x00000001 << RST_F_OFST) +#define SW_TRIGGER_F_OFST (3) +#define SW_TRIGGER_F_MSK (0x00000001 << SW_TRIGGER_F_OFST) +#define TRIGGER_ENABLE_OFST (4) +#define TRIGGER_ENABLE_MSK (0x00000001 << TRIGGER_ENABLE_OFST) + +#define EMPTY10CREG (0x10C) + +#define TIME_FROM_START_OUT_REG_1 (0x110) + +#define TIME_FROM_START_OUT_REG_2 (0x114) + +#define FRAMES_FROM_START_OUT_REG_1 (0x118) + +#define FRAMES_FROM_START_OUT_REG_2 (0x11C) + +#define FRAME_TIME_OUT_REG_1 (0x120) + +#define FRAME_TIME_OUT_REG_2 (0x124) + +#define DELAY_OUT_REG_1 (0x128) + +#define DELAY_OUT_REG_2 (0x12C) + +#define CYCLES_OUT_REG_1 (0x130) + +#define CYCLES_OUT_REG_2 (0x134) + +#define FRAMES_OUT_REG_1 (0x138) + +#define FRAMES_OUT_REG_2 (0x13C) + +#define PERIOD_OUT_REG_1 (0x140) + +#define PERIOD_OUT_REG_2 (0x144) + +#define DELAY_IN_REG_1 (0x148) + +#define DELAY_IN_REG_2 (0x14C) + +#define CYCLES_IN_REG_1 (0x150) + +#define CYCLES_IN_REG_2 (0x154) + +#define FRAMES_IN_REG_1 (0x158) + +#define FRAMES_IN_REG_2 (0x15C) + +#define PERIOD_IN_REG_1 (0x160) + +#define PERIOD_IN_REG_2 (0x164) + +#define EMPTY168REG (0x168) + +#define EMPTY16CREG (0x16C) + +#define EMPTY170REG (0x170) + +#define EMPTY174REG (0x174) + +#define EMPTY178REG (0x178) + +#define EMPTY17CREG (0x17C) + +#define EMPTY180REG (0x180) + +#define EMPTY184REG (0x184) + +#define EMPTY188REG (0x188) + +#define EMPTY18CREG (0x18C) + +#define EMPTY190REG (0x190) + +#define EMPTY194REG (0x194) + +#define EMPTY198REG (0x198) + +#define EMPTY19CREG (0x19C) + +#define PATTERN_OUT_LSB_REG (0x200) + +#define PATTERN_OUT_MSB_REG (0x204) + +#define PATTERN_IN_LSB_REG (0x208) + +#define PATTERN_IN_MSB_REG (0x20C) + +#define PATTERN_MASK_LSB_REG (0x210) + +#define PATTERN_MASK_MSB_REG (0x214) + +#define PATTERN_SET_LSB_REG (0x218) + +#define PATTERN_SET_MSB_REG (0x21C) + +#define PATTERN_CNTRL_REG (0x220) + +#define PATTERN_CNTRL_WR_OFST (0) +#define PATTERN_CNTRL_WR_MSK (0x00000001 << PATTERN_CNTRL_WR_OFST) +#define PATTERN_CNTRL_RD_OFST (1) +#define PATTERN_CNTRL_RD_MSK (0x00000001 << PATTERN_CNTRL_RD_OFST) +#define PATTERN_CNTRL_ADDR_OFST (16) +#define PATTERN_CNTRL_ADDR_MSK (0x00001fff << PATTERN_CNTRL_ADDR_OFST) + +#define EMPTY224REG (0x224) + +#define PATTERN_LIMIT_REG (0x228) + +#define PATTERN_LIMIT_STRT_OFST (0) +#define PATTERN_LIMIT_STRT_MSK (0x00001fff << PATTERN_LIMIT_STRT_OFST) +#define PATTERN_LIMIT_STP_OFST (16) +#define PATTERN_LIMIT_STP_MSK (0x00001fff << PATTERN_LIMIT_STP_OFST) + +#define EMPTY22CREG (0x22C) + +#define PATTERN_LOOP_0_ADDR_REG (0x230) + +#define PATTERN_LOOP_0_ADDR_STRT_OFST (0) +#define PATTERN_LOOP_0_ADDR_STRT_MSK \ + (0x00001fff << PATTERN_LOOP_0_ADDR_STRT_OFST) +#define PATTERN_LOOP_0_ADDR_STP_OFST (16) +#define PATTERN_LOOP_0_ADDR_STP_MSK (0x00001fff << PATTERN_LOOP_0_ADDR_STP_OFST) + +#define EMPTY234REG (0x234) + +#define PATTERN_LOOP_0_ITERATION_REG (0x238) + +#define EMPTY23CREG (0x23C) + +#define PATTERN_WAIT_0_ADDR_REG (0x240) + +#define PATTERN_WAIT_0_ADDR_OFST (0) +#define PATTERN_WAIT_0_ADDR_MSK (0x00001fff << PATTERN_WAIT_0_ADDR_OFST) + +#define EMPTY244REG (0x244) + +#define PATTERN_WAIT_TIMER_0_LSB_REG (0x248) + +#define PATTERN_WAIT_TIMER_0_MSB_REG (0x24C) + +#define PATTERN_LOOP_1_ADDR_REG (0x250) + +#define PATTERN_LOOP_1_ADDR_STRT_OFST (0) +#define PATTERN_LOOP_1_ADDR_STRT_MSK \ + (0x00001fff << PATTERN_LOOP_1_ADDR_STRT_OFST) +#define PATTERN_LOOP_1_ADDR_STP_OFST (16) +#define PATTERN_LOOP_1_ADDR_STP_MSK (0x00001fff << PATTERN_LOOP_1_ADDR_STP_OFST) + +#define EMPTY254REG (0x254) + +#define PATTERN_LOOP_1_ITERATION_REG (0x258) + +#define EMPTY25CREG (0x25C) + +#define PATTERN_WAIT_1_ADDR_REG (0x260) + +#define PATTERN_WAIT_1_ADDR_OFST (0) +#define PATTERN_WAIT_1_ADDR_MSK (0x00001fff << PATTERN_WAIT_1_ADDR_OFST) + +#define EMPTY264REG (0x264) + +#define PATTERN_WAIT_TIMER_1_LSB_REG (0x268) + +#define PATTERN_WAIT_TIMER_1_MSB_REG (0x26C) + +#define PATTERN_LOOP_2_ADDR_REG (0x270) + +#define PATTERN_LOOP_2_ADDR_STRT_OFST (0) +#define PATTERN_LOOP_2_ADDR_STRT_MSK \ + (0x00001fff << PATTERN_LOOP_2_ADDR_STRT_OFST) +#define PATTERN_LOOP_2_ADDR_STP_OFST (16) +#define PATTERN_LOOP_2_ADDR_STP_MSK (0x00001fff << PATTERN_LOOP_2_ADDR_STP_OFST) + +#define EMPTY274REG (0x274) + +#define PATTERN_LOOP_2_ITERATION_REG (0x278) + +#define EMPTY27CREG (0x27C) + +#define PATTERN_WAIT_2_ADDR_REG (0x280) + +#define PATTERN_WAIT_2_ADDR_OFST (0) +#define PATTERN_WAIT_2_ADDR_MSK (0x00001fff << PATTERN_WAIT_2_ADDR_OFST) + +#define EMPTY284REG (0x284) + +#define PATTERN_WAIT_TIMER_2_LSB_REG (0x288) + +#define PATTERN_WAIT_TIMER_2_MSB_REG (0x28C) + +#define PATTERN_LOOP_3_ADDR_REG (0x290) + +#define PATTERN_LOOP_3_ADDR_STRT_OFST (0) +#define PATTERN_LOOP_3_ADDR_STRT_MSK \ + (0x00001fff << PATTERN_LOOP_3_ADDR_STRT_OFST) +#define PATTERN_LOOP_3_ADDR_STP_OFST (16) +#define PATTERN_LOOP_3_ADDR_STP_MSK (0x00001fff << PATTERN_LOOP_3_ADDR_STP_OFST) + +#define EMPTY294REG (0x294) + +#define PATTERN_LOOP_3_ITERATION_REG (0x298) + +#define EMPTY29CREG (0x29C) + +#define PATTERN_WAIT_3_ADDR_REG (0x300) + +#define PATTERN_WAIT_3_ADDR_OFST (0) +#define PATTERN_WAIT_3_ADDR_MSK (0x00001fff << PATTERN_WAIT_3_ADDR_OFST) + +#define EMPTY304REG (0x304) + +#define PATTERN_WAIT_TIMER_3_LSB_REG (0x308) + +#define PATTERN_WAIT_TIMER_3_MSB_REG (0x30C) + +#define PATTERN_LOOP_4_ADDR_REG (0x310) + +#define PATTERN_LOOP_4_ADDR_STRT_OFST (0) +#define PATTERN_LOOP_4_ADDR_STRT_MSK \ + (0x00001fff << PATTERN_LOOP_4_ADDR_STRT_OFST) +#define PATTERN_LOOP_4_ADDR_STP_OFST (16) +#define PATTERN_LOOP_4_ADDR_STP_MSK (0x00001fff << PATTERN_LOOP_4_ADDR_STP_OFST) + +#define EMPTY314REG (0x314) + +#define PATTERN_LOOP_4_ITERATION_REG (0x318) + +#define EMPTY31CREG (0x31C) + +#define PATTERN_WAIT_4_ADDR_REG (0x320) + +#define PATTERN_WAIT_4_ADDR_OFST (0) +#define PATTERN_WAIT_4_ADDR_MSK (0x00001fff << PATTERN_WAIT_4_ADDR_OFST) + +#define EMPTY324REG (0x324) + +#define PATTERN_WAIT_TIMER_4_LSB_REG (0x328) + +#define PATTERN_WAIT_TIMER_4_MSB_REG (0x32C) + +#define PATTERN_LOOP_5_ADDR_REG (0x330) + +#define PATTERN_LOOP_5_ADDR_STRT_OFST (0) +#define PATTERN_LOOP_5_ADDR_STRT_MSK \ + (0x00001fff << PATTERN_LOOP_5_ADDR_STRT_OFST) +#define PATTERN_LOOP_5_ADDR_STP_OFST (16) +#define PATTERN_LOOP_5_ADDR_STP_MSK (0x00001fff << PATTERN_LOOP_5_ADDR_STP_OFST) + +#define EMPTY334REG (0x334) + +#define PATTERN_LOOP_5_ITERATION_REG (0x338) + +#define EMPTY33CREG (0x33C) + +#define PATTERN_WAIT_5_ADDR_REG (0x340) + +#define PATTERN_WAIT_5_ADDR_OFST (0) +#define PATTERN_WAIT_5_ADDR_MSK (0x00001fff << PATTERN_WAIT_5_ADDR_OFST) + +#define EMPTY344REG (0x344) + +#define PATTERN_WAIT_TIMER_5_LSB_REG (0x348) + +#define PATTERN_WAIT_TIMER_5_MSB_REG (0x34C) + +#define PINIOCTRLREG (0x350) + +#define EMPTY354REG (0x354) + +#define EMPTY358REG (0x358) + +#define EMPTY35CREG (0x35C) + +#define EMPTY360REG (0x360) + +#define EMPTY364REG (0x364) + +#define EMPTY368REG (0x368) + +#define EMPTY36CREG (0x36C) + +#define EMPTY370REG (0x370) + +#define EMPTY374REG (0x374) + +#define EMPTY378REG (0x378) + +#define EMPTY37CREG (0x37C) + +#define EMPTY380REG (0x380) + +#define EMPTY384REG (0x384) + +#define EMPTY388REG (0x388) + +#define EMPTY38CREG (0x38C) + +#define EMPTY390REG (0x390) + +#define EMPTY394REG (0x394) + +#define EMPTY398REG (0x398) + +#define EMPTY39CREG (0x39C) + +#define EMPTY3A0REG (0x3A0) + +#define EMPTY3A4REG (0x3A4) + +#define EMPTY3A8REG (0x3A8) + +#define EMPTY3ACREG (0x3AC) + +#define EMPTY3B0REG (0x3B0) + +#define EMPTY3B4REG (0x3B4) + +#define EMPTY3B8REG (0x3B8) + +#define EMPTY3BCREG (0x3BC) + +#define EMPTY3C0REG (0x3C0) + +#define EMPTY3C4REG (0x3C4) + +#define EMPTY3C8REG (0x3C8) + +#define EMPTY3CCREG (0x3CC) + +#define EMPTY3D0REG (0x3D0) + +#define EMPTY3D4REG (0x3D4) + +#define EMPTY3D8REG (0x3D8) + +#define EMPTY3DCREG (0x3DC) + +#define EMPTY3E0REG (0x3E0) + +#define EMPTY3E4REG (0x3E4) + +#define EMPTY3E8REG (0x3E8) + +#define EMPTY3ECREG (0x3EC) + +#define EMPTY3F0REG (0x3F0) + +#define EMPTY3F4REG (0x3F4) + +#define EMPTY3F8REG (0x3F8) + +#define EMPTY3FCREG (0x3FC) + +#define EMPTY400REG (0x400) + +#define EMPTY404REG (0x404) + +#define EMPTY408REG (0x408) + +#define EMPTY40CREG (0x40C) + +#define EMPTY410REG (0x410) + +#define EMPTY414REG (0x414) + +#define EMPTY418REG (0x418) + +#define EMPTY41CREG (0x41C) + +#define EMPTY420REG (0x420) + +#define EMPTY424REG (0x424) + +#define EMPTY428REG (0x428) + +#define EMPTY42CREG (0x42C) + +#define EMPTY430REG (0x430) + +#define EMPTY434REG (0x434) + +#define EMPTY438REG (0x438) + +#define EMPTY43CREG (0x43C) + +#define EMPTY440REG (0x440) + +#define EMPTY444REG (0x444) + +#define EMPTY448REG (0x448) + +#define EMPTY44CREG (0x44C) + +#define EMPTY450REG (0x450) + +#define EMPTY454REG (0x454) + +#define EMPTY458REG (0x458) + +#define EMPTY45CREG (0x45C) + +#define EMPTY460REG (0x460) + +#define EMPTY464REG (0x464) + +#define EMPTY468REG (0x468) + +#define EMPTY46CREG (0x46C) + +#define EMPTY470REG (0x470) + +#define EMPTY474REG (0x474) + +#define EMPTY478REG (0x478) + +#define EMPTY47CREG (0x47C) + +#define EMPTY480REG (0x480) + +#define EMPTY484REG (0x484) + +#define EMPTY488REG (0x488) + +#define EMPTY48CREG (0x48C) + +#define EMPTY490REG (0x490) + +#define EMPTY494REG (0x494) + +#define EMPTY498REG (0x498) + +#define EMPTY49CREG (0x49C) + +#define EMPTY4A0REG (0x4A0) + +#define EMPTY4A4REG (0x4A4) + +#define EMPTY4A8REG (0x4A8) + +#define EMPTY4ACREG (0x4AC) + +#define EMPTY4B0REG (0x4B0) + +#define EMPTY4B4REG (0x4B4) + +#define EMPTY4B8REG (0x4B8) + +#define EMPTY4BCREG (0x4BC) + +#define EMPTY4C0REG (0x4C0) + +#define EMPTY4C4REG (0x4C4) + +#define EMPTY4C8REG (0x4C8) + +#define EMPTY4CCREG (0x4CC) + +#define EMPTY4D0REG (0x4D0) + +#define EMPTY4D4REG (0x4D4) + +#define EMPTY4D8REG (0x4D8) + +#define EMPTY4DCREG (0x4DC) + +#define EMPTY4E0REG (0x4E0) + +#define EMPTY4E4REG (0x4E4) + +#define EMPTY4E8REG (0x4E8) + +#define EMPTY4ECREG (0x4EC) + +#define EMPTY4F0REG (0x4F0) + +#define EMPTY4F4REG (0x4F4) + +#define EMPTY4F8REG (0x4F8) + +#define EMPTY4FCREG (0x4FC) + +#define FIFO_TO_GB_CONTROL_REG (0x500) + +#define ENABLED_CHANNELS_ADC_OFST (0) +#define ENABLED_CHANNELS_ADC_MSK (0x000000ff << ENABLED_CHANNELS_ADC_OFST) +#define ENABLED_CHANNELS_D_OFST (8) +#define ENABLED_CHANNELS_D_MSK (0x00000001 << ENABLED_CHANNELS_D_OFST) +#define ENABLED_CHANNELS_X_OFST (9) +#define ENABLED_CHANNELS_X_MSK (0x0000000f << ENABLED_CHANNELS_X_OFST) +#define RO_MODE_ADC_OFST (13) +#define RO_MODE_ADC_MSK (0x00000001 << RO_MODE_ADC_OFST) +#define RO_MODE_D_OFST (14) +#define RO_MODE_D_MSK (0x00000001 << RO_MODE_D_OFST) +#define RO_MODE_X_OFST (15) +#define RO_MODE_X_MSK (0x00000001 << RO_MODE_X_OFST) +#define COUNT_FRAMES_FROM_UPDATE_OFST (16) +#define COUNT_FRAMES_FROM_UPDATE_MSK \ + (0x00000001 << COUNT_FRAMES_FROM_UPDATE_OFST) +#define START_STREAMING_P_OFST (17) +#define START_STREAMING_P_MSK (0x00000001 << START_STREAMING_P_OFST) + +#define EMPTY504REG (0x504) + +#define NO_SAMPLES_D_REG (0x508) + +#define NO_SAMPLES_D_OFST (0) +#define NO_SAMPLES_D_MSK (0x00003fff << NO_SAMPLES_D_OFST) + +#define EMPTY50CREG (0x50C) + +#define NO_SAMPLES_A_REG (0x510) + +#define NO_SAMPLES_A_OFST (0) +#define NO_SAMPLES_A_MSK (0x00003fff << NO_SAMPLES_A_OFST) + +#define EMPTY514REG (0x514) + +#define NO_SAMPLES_X_REG (0x518) + +#define NO_SAMPLES_X_OFST (0) +#define NO_SAMPLES_X_MSK (0x00001fff << NO_SAMPLES_X_OFST) + +#define EMPTY51CREG (0x51C) + +#define COUNT_FRAMES_FROM_REG_1 (0x520) + +#define COUNT_FRAMES_FROM_REG_2 (0x524) + +#define LOCAL_FRAME_NUMBER_REG_1 (0x528) + +#define LOCAL_FRAME_NUMBER_REG_2 (0x52C) + +#define EMPTY530REG (0x530) + +#define EMPTY534REG (0x534) + +#define EMPTY538REG (0x538) + +#define EMPTY53CREG (0x53C) + +#define EMPTY540REG (0x540) + +#define EMPTY544REG (0x544) + +#define EMPTY548REG (0x548) + +#define EMPTY54CREG (0x54C) + +#define EMPTY550REG (0x550) + +#define EMPTY554REG (0x554) + +#define EMPTY558REG (0x558) + +#define EMPTY55CREG (0x55C) + +#define EMPTY560REG (0x560) + +#define EMPTY564REG (0x564) + +#define EMPTY568REG (0x568) + +#define EMPTY56CREG (0x56C) + +#define EMPTY570REG (0x570) + +#define EMPTY574REG (0x574) + +#define EMPTY578REG (0x578) + +#define EMPTY57CREG (0x57C) + +#define A_FIFO_OVERFLOW_STATUS_REG (0x580) + +#define EMPTY584REG (0x584) + +#define A_FIFO_EMPTY_STATUS_REG (0x588) + +#define EMPTY58CREG (0x58C) + +#define A_FIFO_FULL_STATUS_REG (0x590) + +#define EMPTY594REG (0x594) + +#define D_FIFO_OVERFLOW_STATUS_REG (0x598) + +#define D_FIFO_OVERFLOW_STATUS_OFST (0) +#define D_FIFO_OVERFLOW_STATUS_MSK (0x00000001 << D_FIFO_OVERFLOW_STATUS_OFST) + +#define EMPTY59CREG (0x59C) + +#define D_FIFO_EMPTY_STATUS_REG (0x5A0) + +#define D_FIFO_EMPTY_STATUS_OFST (0) +#define D_FIFO_EMPTY_STATUS_MSK (0x00000001 << D_FIFO_EMPTY_STATUS_OFST) + +#define EMPTY5A4REG (0x5A4) + +#define D_FIFO_FULL_STATUS_REG (0x5A8) + +#define D_FIFO_FULL_STATUS_OFST (0) +#define D_FIFO_FULL_STATUS_MSK (0x00000001 << D_FIFO_FULL_STATUS_OFST) + +#define EMPTY5ACREG (0x5AC) + +#define X_FIFO_OVERFLOW_STATUS_REG (0x5B0) + +#define X_FIFO_OVERFLOW_STATUS_OFST (0) +#define X_FIFO_OVERFLOW_STATUS_MSK (0x0000000f << X_FIFO_OVERFLOW_STATUS_OFST) + +#define EMPTY5B4REG (0x5B4) + +#define X_FIFO_EMPTY_STATUS_REG (0x5B8) + +#define X_FIFO_EMPTY_STATUS_OFST (0) +#define X_FIFO_EMPTY_STATUS_MSK (0x0000000f << X_FIFO_EMPTY_STATUS_OFST) + +#define EMPTY5BCREG (0x5BC) + +#define X_FIFO_FULL_STATUS_REG (0x5C0) + +#define X_FIFO_FULL_STATUS_OFST (0) +#define X_FIFO_FULL_STATUS_MSK (0x0000000f << X_FIFO_FULL_STATUS_OFST) + +#define EMPTY5C4REG (0x5C4) + +#define A_FIFO_CLEAN_REG (0x5C8) + +#define EMPTY5CCREG (0x5CC) + +#define D_FIFO_CLEAN_REG (0x5D0) + +#define D_FIFO_CLEAN_OFST (0) +#define D_FIFO_CLEAN_MSK (0x00000001 << D_FIFO_CLEAN_OFST) + +#define EMPTY5D4REG (0x5D4) + +#define X_FIFO_CLEAN_REG (0x5D8) + +#define X_FIFO_CLEAN_OFST (0) +#define X_FIFO_CLEAN_MSK (0x0000000f << X_FIFO_CLEAN_OFST) + +#define EMPTY5DCREG (0x5DC) + +#define EMPTY5E0REG (0x5E0) + +#define EMPTY5E4REG (0x5E4) + +#define EMPTY5E8REG (0x5E8) + +#define EMPTY5ECREG (0x5EC) + +#define EMPTY5F0REG (0x5F0) + +#define EMPTY5F4REG (0x5F4) + +#define EMPTY5F8REG (0x5F8) + +#define EMPTY5FCREG (0x5FC) + +#define MATTERHORNSPIREG1 (0x600) + +#define MATTERHORNSPIREG2 (0x604) + +#define MATTERHORNSPICTRL (0x608) + +#define CONFIGSTART_P_OFST (0) +#define CONFIGSTART_P_MSK (0x00000001 << CONFIGSTART_P_OFST) +#define PERIPHERYRST_P_OFST (1) +#define PERIPHERYRST_P_MSK (0x00000001 << PERIPHERYRST_P_OFST) +#define STARTREAD_P_OFST (2) +#define STARTREAD_P_MSK (0x00000001 << STARTREAD_P_OFST) +#define BUSY_OFST (3) +#define BUSY_MSK (0x00000001 << BUSY_OFST) +#define READOUTFROMASIC_OFST (4) +#define READOUTFROMASIC_MSK (0x00000001 << READOUTFROMASIC_OFST) + +#define EMPTY60CREG (0x60C) + +#define EMPTY610REG (0x610) + +#define EMPTY614REG (0x614) + +#define EMPTY618REG (0x618) + +#define EMPTY61CREG (0x61C) + +#define EMPTY620REG (0x620) + +#define EMPTY624REG (0x624) + +#define EMPTY628REG (0x628) + +#define EMPTY62CREG (0x62C) + +#define TRANSCEIVERRXCTRL0REG1 (0x630) + +#define TRANSCEIVERRXCTRL0REG2 (0x634) + +#define TRANSCEIVERRXCTRL1REG1 (0x638) + +#define TRANSCEIVERRXCTRL1REG2 (0x63C) + +#define TRANSCEIVERRXCTRL2REG (0x640) + +#define EMPTY644REG (0x644) + +#define TRANSCEIVERRXCTRL3REG (0x648) + +#define EMPTY64CREG (0x64C) + +#define TRANSCEIVERSTATUS (0x650) + +#define LINKDOWNLATCHEDOUT_OFST (0) +#define LINKDOWNLATCHEDOUT_MSK (0x00000001 << LINKDOWNLATCHEDOUT_OFST) +#define TXUSERCLKACTIVE_OFST (1) +#define TXUSERCLKACTIVE_MSK (0x00000001 << TXUSERCLKACTIVE_OFST) +#define RXUSERCLKACTIVE_OFST (2) +#define RXUSERCLKACTIVE_MSK (0x00000001 << RXUSERCLKACTIVE_OFST) +#define RXCOMMADET_OFST (3) +#define RXCOMMADET_MSK (0x0000000f << RXCOMMADET_OFST) +#define RXBYTEREALIGN_OFST (7) +#define RXBYTEREALIGN_MSK (0x0000000f << RXBYTEREALIGN_OFST) +#define RXBYTEISALIGNED_OFST (11) +#define RXBYTEISALIGNED_MSK (0x0000000f << RXBYTEISALIGNED_OFST) +#define GTWIZRXCDRSTABLE_OFST (15) +#define GTWIZRXCDRSTABLE_MSK (0x00000001 << GTWIZRXCDRSTABLE_OFST) +#define RESETTXDONE_OFST (16) +#define RESETTXDONE_MSK (0x00000001 << RESETTXDONE_OFST) +#define RESETRXDONE_OFST (17) +#define RESETRXDONE_MSK (0x00000001 << RESETRXDONE_OFST) +#define RXPMARESETDONE_OFST (18) +#define RXPMARESETDONE_MSK (0x0000000f << RXPMARESETDONE_OFST) +#define TXPMARESETDONE_OFST (22) +#define TXPMARESETDONE_MSK (0x0000000f << TXPMARESETDONE_OFST) +#define GTTPOWERGOOD_OFST (26) +#define GTTPOWERGOOD_MSK (0x0000000f << GTTPOWERGOOD_OFST) + +#define EMPTY654REG (0x654) + +#define TRANSCEIVERCONTROL (0x658) + +#define GTWIZRESETALL_OFST (0) +#define GTWIZRESETALL_MSK (0x00000001 << GTWIZRESETALL_OFST) +#define RESETTXPLLANDDATAPATH_OFST (1) +#define RESETTXPLLANDDATAPATH_MSK (0x00000001 << RESETTXPLLANDDATAPATH_OFST) +#define RESETTXDATAPATHIN_OFST (2) +#define RESETTXDATAPATHIN_MSK (0x00000001 << RESETTXDATAPATHIN_OFST) +#define RESETRXPLLANDDATAPATH_OFST (3) +#define RESETRXPLLANDDATAPATH_MSK (0x00000001 << RESETRXPLLANDDATAPATH_OFST) +#define RESETRXDATAPATHIN_OFST (4) +#define RESETRXDATAPATHIN_MSK (0x00000001 << RESETRXDATAPATHIN_OFST) +#define RXPOLARITY_OFST (5) +#define RXPOLARITY_MSK (0x0000000f << RXPOLARITY_OFST) + +#define EMPTY65CREG (0x65C) + +#define EMPTY660REG (0x660) + +#define EMPTY664REG (0x664) + +#define EMPTY668REG (0x668) + +#define EMPTY66CREG (0x66C) + +#define EMPTY670REG (0x670) + +#define EMPTY674REG (0x674) + +#define EMPTY678REG (0x678) + +#define EMPTY67CREG (0x67C) + +#define EMPTY680REG (0x680) + +#define EMPTY684REG (0x684) + +#define EMPTY688REG (0x688) + +#define EMPTY68CREG (0x68C) + +#define EMPTY690REG (0x690) + +#define EMPTY694REG (0x694) + +#define EMPTY698REG (0x698) + +#define EMPTY69CREG (0x69C) + +#define EMPTY6A0REG (0x6A0) + +#define EMPTY6A4REG (0x6A4) + +#define EMPTY6A8REG (0x6A8) + +#define EMPTY6ACREG (0x6AC) + +#define EMPTY6B0REG (0x6B0) + +#define EMPTY6B4REG (0x6B4) + +#define EMPTY6B8REG (0x6B8) + +#define EMPTY6BCREG (0x6BC) + +#define EMPTY6C0REG (0x6C0) + +#define EMPTY6C4REG (0x6C4) + +#define EMPTY6C8REG (0x6C8) + +#define EMPTY6CCREG (0x6CC) + +#define EMPTY6D0REG (0x6D0) + +#define EMPTY6D4REG (0x6D4) + +#define EMPTY6D8REG (0x6D8) + +#define EMPTY6DCREG (0x6DC) + +#define EMPTY6E0REG (0x6E0) + +#define EMPTY6E4REG (0x6E4) + +#define EMPTY6E8REG (0x6E8) + +#define EMPTY6ECREG (0x6EC) + +#define EMPTY6F0REG (0x6F0) + +#define EMPTY6F4REG (0x6F4) + +#define EMPTY6F8REG (0x6F8) + +#define EMPTY6FCREG (0x6FC) + +#define DBITFIFOCTRLREG (0x700) + +#define DBITRD_OFST (0) +#define DBITRD_MSK (0x00000001 << DBITRD_OFST) +#define DBITRST_OFST (1) +#define DBITRST_MSK (0x00000001 << DBITRST_OFST) +#define DBITFULL_OFST (2) +#define DBITFULL_MSK (0x00000001 << DBITFULL_OFST) +#define DBITEMPTY_OFST (3) +#define DBITEMPTY_MSK (0x00000001 << DBITEMPTY_OFST) +#define DBITUNDERFLOW_OFST (4) +#define DBITUNDERFLOW_MSK (0x00000001 << DBITUNDERFLOW_OFST) +#define DBITOVERFLOW_OFST (5) +#define DBITOVERFLOW_MSK (0x00000001 << DBITOVERFLOW_OFST) + +#define EMPTYREG (0x704) + +#define DBITFIFODATAREG1 (0x708) + +#define DBITFIFODATAREG2 (0x70C) + +#define EMPTY710REG (0x710) + +#define EMPTY714REG (0x714) + +#define EMPTY718REG (0x718) + +#define EMPTY71CREG (0x71C) + +#define EMPTY720REG (0x720) diff --git a/slsDetectorServers/xilinx_ctbDetectorServer/bin/xilinx_ctbDetectorServerv9.0.0 b/slsDetectorServers/xilinx_ctbDetectorServer/bin/xilinx_ctbDetectorServerv9.0.0 new file mode 100755 index 000000000..0081869d2 Binary files /dev/null and b/slsDetectorServers/xilinx_ctbDetectorServer/bin/xilinx_ctbDetectorServerv9.0.0 differ diff --git a/slsDetectorServers/xilinx_ctbDetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/xilinx_ctbDetectorServer/slsDetectorFunctionList.c new file mode 100644 index 000000000..1b10b088e --- /dev/null +++ b/slsDetectorServers/xilinx_ctbDetectorServer/slsDetectorFunctionList.c @@ -0,0 +1,1674 @@ +// SPDX-License-Identifier: LGPL-3.0-or-other +// Copyright (C) 2021 Contributors to the SLS Detector Package +#include "slsDetectorFunctionList.h" +#include "arm64.h" +#include "clogger.h" +#include "common.h" +#include "programViaArm.h" +#include "sharedMemory.h" +#include "sls/versionAPI.h" + +#include "LTC2620_Driver.h" + +#include "loadPattern.h" +#ifdef VIRTUAL +#include "communication_funcs_UDP.h" +#include //ceil +#include +#endif + +#include // INET_ADDRSTRLEN +#include +#include // usleep + +// Global variable from slsDetectorServer_funcs +extern int debugflag; +extern int updateFlag; +extern int checkModuleFlag; +extern udpStruct udpDetails[MAX_UDP_DESTINATION]; +extern const enum detectorType myDetectorType; + +// Global variable from communication_funcs.c +extern int isControlServer; +extern void getMacAddressinString(char *cmac, int size, uint64_t mac); +extern void getIpAddressinString(char *cip, uint32_t ip); + +int initError = OK; +int initCheckDone = 0; +char initErrorMessage[MAX_STR_LENGTH]; + +int detPos[2] = {0, 0}; + +int chipConfigured = 0; +int analogEnable = 0; +int digitalEnable = 0; +int transceiverEnable = 0; +int dacValues[NDAC] = {}; +// software limit that depends on the current chip on the ctb +int vLimit = 0; + +#ifdef VIRTUAL +pthread_t pthread_virtual_tid; +#endif + +int isInitCheckDone() { return initCheckDone; } + +int getInitResult(char **mess) { + *mess = initErrorMessage; + return initError; +} + +void basictests() { + initError = OK; + initCheckDone = 0; + memset(initErrorMessage, 0, MAX_STR_LENGTH); +#ifdef VIRTUAL + LOG(logINFOBLUE, ("****** Xilinx Chip Test Board Virtual Server ******\n")); +#else + LOG(logINFOBLUE, ("********** Xilinx Chip Test Board Server **********\n")); +#endif + + initError = resetFPGA(initErrorMessage); + if (initError == FAIL) { + return; + } + + initError = loadDeviceTree(initErrorMessage); + if (initError == FAIL) { + return; + } + + if (mapCSP0() == FAIL) { + strcpy(initErrorMessage, + "Could not map to memory. Cannot proceed. Check Firmware.\n"); + LOG(logERROR, (initErrorMessage)); + initError = FAIL; + return; + } + +#ifndef VIRTUAL + if ((!debugflag) && (!updateFlag) && + ((validateKernelVersion(KERNEL_DATE_VRSN) == FAIL) || + (checkType() == FAIL) || (testFixedFPGAPattern() == FAIL))) { + sprintf(initErrorMessage, + "Could not pass basic tests of FPGA and bus. Cannot proceed. " + "Check Firmware. (Firmware version:0x%lx) \n", + getFirmwareVersion()); + LOG(logERROR, ("%s\n\n", initErrorMessage)); + initError = FAIL; + return; + } +#endif + char hversion[MAX_STR_LENGTH] = {0}; + memset(hversion, 0, MAX_STR_LENGTH); + getHardwareVersion(hversion); + uint32_t ipadd = getDetectorIP(); + uint64_t macadd = getDetectorMAC(); + int64_t fwversion = getFirmwareVersion(); + char swversion[MAX_STR_LENGTH] = {0}; + memset(swversion, 0, MAX_STR_LENGTH); + getServerVersion(swversion); + int64_t sw_fw_apiversion = getFirmwareAPIVersion(); + uint64_t requiredfwversion = REQRD_FRMWRE_VRSN; + + LOG(logINFOBLUE, + ("**************************************************\n" + "Hardware Version:\t\t %s\n" + + "Detector IP Addr:\t\t 0x%x\n" + "Detector MAC Addr:\t\t 0x%lx\n\n" + + "Firmware Version:\t\t 0x%lx\n" + "Software Version:\t\t %s\n" + "F/w-S/w API Version:\t\t 0x%lx\n" + "Required Firmware Version:\t 0x%lx\n" + "********************************************************\n", + hversion, ipadd, macadd, fwversion, swversion, sw_fw_apiversion, + requiredfwversion)); + +#ifndef VIRTUAL + // return if flag is not zero, debug mode + if (debugflag || updateFlag) { + return; + } + + // cant read versions + LOG(logINFO, ("Testing Firmware-software compatibility:\n")); + if (!fwversion || !sw_fw_apiversion) { + strcpy(initErrorMessage, + "Cant read versions from FPGA. Please update firmware.\n"); + LOG(logERROR, (initErrorMessage)); + initError = FAIL; + return; + } + + // check for API compatibility - old server + if (sw_fw_apiversion > requiredfwversion) { + sprintf(initErrorMessage, + "This firmware-software api version (0x%lx) is incompatible " + "with the software's minimum required firmware version " + "(0x%lx).\nPlease update detector software to be compatible " + "with this firmware.\n", + sw_fw_apiversion, requiredfwversion); + LOG(logERROR, (initErrorMessage)); + initError = FAIL; + return; + } + + // check for firmware compatibility - old firmware + if (requiredfwversion > fwversion) { + sprintf(initErrorMessage, + "This firmware version (0x%lx) is incompatible.\n" + "Please update firmware (min. 0x%lx) to be compatible with " + "this server.\n", + fwversion, requiredfwversion); + LOG(logERROR, (initErrorMessage)); + initError = FAIL; + return; + } + LOG(logINFO, ("\tCompatibility - success\n")); +#endif +} + +int checkType() { +#ifdef VIRTUAL + return OK; +#endif + u_int32_t type = + ((bus_r(FPGAVERSIONREG) & FPGADETTYPE_MSK) >> FPGADETTYPE_OFST); + if (type != XILINX_CHIPTESTBOARD) { + LOG(logERROR, + ("This is not a Xilinx CTB firmware (read %d, expected %d)\n", type, + XILINX_CHIPTESTBOARD)); + return FAIL; + } + return OK; +} + +int testFpga() { + LOG(logINFO, ("Testing FPGA:\n")); + + // fixed pattern + int ret = testFixedFPGAPattern(); + + if (ret == OK) { + // Delay LSB reg + LOG(logINFO, ("\tTesting Delay LSB Register:\n")); + uint32_t addr = DELAY_IN_REG_1; + + // store previous delay value + uint32_t previousValue = bus_r(addr); + + volatile uint32_t val = 0, readval = 0; + int times = 1000 * 1000; + for (int i = 0; i < times; ++i) { + val = 0x5A5A5A5A - i; + bus_w(addr, val); + readval = bus_r(addr); + if (readval != val) { + LOG(logERROR, ("1:Mismatch! Loop(%d): Wrote 0x%x, read 0x%x\n", + i, val, readval)); + ret = FAIL; + break; + } + val = (i + (i << 10) + (i << 20)); + bus_w(addr, val); + readval = bus_r(addr); + if (readval != val) { + LOG(logERROR, ("2:Mismatch! Loop(%d): Wrote 0x%x, read 0x%x\n", + i, val, readval)); + ret = FAIL; + break; + } + val = 0x0F0F0F0F; + bus_w(addr, val); + readval = bus_r(addr); + if (readval != val) { + LOG(logERROR, ("3:Mismatch! Loop(%d): Wrote 0x%x, read 0x%x\n", + i, val, readval)); + ret = FAIL; + break; + } + val = 0xF0F0F0F0; + bus_w(addr, val); + readval = bus_r(addr); + if (readval != val) { + LOG(logERROR, ("4:Mismatch! Loop(%d): Wrote 0x%x, read 0x%x\n", + i, val, readval)); + ret = FAIL; + break; + } + } + + // write back previous value + bus_w(addr, previousValue); + if (ret == OK) { + LOG(logINFO, + ("\tSuccessfully tested FPGA Delay LSB Register %d times\n", + times)); + } + } + return ret; +} + +int testFixedFPGAPattern() { + LOG(logINFO, ("Testing FPGA Fixed Pattern:\n")); +#ifndef VIRTUAL + uint32_t val = bus_r(FIXEDPATTERNREG); + if (val == FIXEDPATTERNVAL) { + LOG(logINFO, ("\tFixed pattern: successful match (0x%08x)\n", val)); + } else { + LOG(logERROR, + ("Fixed pattern does not match! Read 0x%08x, expected 0x%08x\n", + val, FIXEDPATTERNVAL)); + return FAIL; + } +#endif + LOG(logINFO, + ("\tSuccessfully read FPGA Fixed Pattern (0x%x)\n", FIXEDPATTERNVAL)); + return OK; +} + +/* Ids */ + +void getServerVersion(char *version) { strcpy(version, APIXILINXCTB); } + +uint64_t getFirmwareVersion() { +#ifdef VIRTUAL + return REQRD_FRMWRE_VRSN; +#endif + return ((bus_r(FPGAVERSIONREG) & FPGACOMPDATE_MSK) >> FPGACOMPDATE_OFST); +} + +uint64_t getFirmwareAPIVersion() { +#ifdef VIRTUAL + return 0; +#endif + return ((bus_r(APIVERSIONREG) & APICOMPDATE_MSK) >> APICOMPDATE_OFST); +} + +void getHardwareVersion(char *version) { strcpy(version, "Not applicable"); } + +u_int64_t getDetectorMAC() { +#ifdef VIRTUAL + return 0; +#else + char output[255], mac[255] = ""; + u_int64_t res = 0; + FILE *sysFile = + popen("ifconfig eth0 | grep ether | awk '{ print $2 }'", "r"); + fgets(output, sizeof(output), sysFile); + pclose(sysFile); + // getting rid of ":" + char *pch; + pch = strtok(output, ":"); + while (pch != NULL) { + strcat(mac, pch); + pch = strtok(NULL, ":"); + } + sscanf(mac, "%lx", &res); + return res; +#endif +} + +u_int32_t getDetectorIP() { +#ifdef VIRTUAL + return 0; +#endif + char temp[INET_ADDRSTRLEN] = ""; + u_int32_t res = 0; + // execute and get address + char output[255]; + FILE *sysFile = popen( + "ifconfig | grep 'inet '| grep -v '127.0.0.1' | awk '{ print $2 }'", + "r"); + fgets(output, sizeof(output), sysFile); + pclose(sysFile); + + // converting IPaddress to hex. + char *pcword = strtok(output, "."); + while (pcword != NULL) { + sprintf(output, "%02x", atoi(pcword)); + strcat(temp, output); + pcword = strtok(NULL, "."); + } + strcpy(output, temp); + sscanf(output, "%x", &res); + // LOG(logINFO, ("ip:%x\n",res); + + return res; +} + +/* initialization */ + +void initControlServer() { + if (!updateFlag && initError == OK) { + setupDetector(); + } + initCheckDone = 1; +} + +void initStopServer() { + if (!updateFlag && initError == OK) { + usleep(CTRL_SRVR_INIT_TIME_US); + LOG(logINFOBLUE, ("Configuring Stop server\n")); + if (mapCSP0() == FAIL) { + initError = FAIL; + strcpy(initErrorMessage, + "Stop Server: Map Fail. Cannot proceed. Check Firmware.\n"); + LOG(logERROR, (initErrorMessage)); + initCheckDone = 1; + return; + } +#ifdef VIRTUAL + sharedMemory_setStop(0); +#endif + } + initCheckDone = 1; +} + +/* set up detector */ + +void setupDetector() { + LOG(logINFO, ("Setting up Server for 1 Xilinx Chip Test Board\n")); + + // default variables + chipConfigured = 0; + analogEnable = 0; + digitalEnable = 0; + transceiverEnable = 0; + for (int i = 0; i < NDAC; ++i) + dacValues[i] = -1; + vLimit = DEFAULT_VLIMIT; + +#ifdef VIRTUAL + sharedMemory_setStatus(IDLE); + setupUDPCommParameters(); + initializePatternWord(); +#endif + // initialization only at start up (restart fpga) + initError = waitTransceiverReset(initErrorMessage); + if (initError == FAIL) { + return; + } + // power off chip + initError = powerChip(0, initErrorMessage); + if (initError == FAIL) { + return; + } + + LTC2620_D_SetDefines(DAC_MIN_MV, DAC_MAX_MV, DAC_DRIVER_FILE_NAME, NDAC, + NPWR, DAC_POWERDOWN_DRIVER_FILE_NAME); + LOG(logINFOBLUE, ("Powering down all dacs\n")); + for (int idac = 0; idac < NDAC; ++idac) { + setDAC(idac, LTC2620_D_GetPowerDownValue(), 0); + } + + resetFlow(); + cleanFifos(); + + initializePatternAddresses(); + + LOG(logINFOBLUE, ("Setting Default readout\n")); + setNumAnalogSamples(DEFAULT_NUM_ASAMPLES); + setNumDigitalSamples(DEFAULT_NUM_DSAMPLES); + setADCEnableMask_10G(BIT32_MSK); + setTransceiverEnableMask(DEFAULT_TRANSCEIVER_MASK); + setNumTransceiverSamples(DEFAULT_NUM_TSAMPLES); + setReadoutMode(DEFAULT_READOUT_MODE); + + LOG(logINFOBLUE, ("Setting Default parameters\n")); + setNumFrames(DEFAULT_NUM_FRAMES); + setNumTriggers(DEFAULT_NUM_CYCLES); + setTiming(DEFAULT_TIMING_MODE); + setExpTime(DEFAULT_EXPTIME); + setPeriod(DEFAULT_PERIOD); + setDelayAfterTrigger(DEFAULT_DELAY); + + setNextFrameNumber(DEFAULT_STARTING_FRAME_NUMBER); +} + +/* firmware functions (resets) */ + +void cleanFifos() { +#ifdef VIRTUAL + return; +#endif + LOG(logINFO, ("Clearing Acquisition Fifos\n")); + bus_w(A_FIFO_CLEAN_REG, bus_r(A_FIFO_CLEAN_REG) | BIT32_MSK); + bus_w(D_FIFO_CLEAN_REG, bus_r(D_FIFO_CLEAN_REG) | D_FIFO_CLEAN_MSK); + bus_w(X_FIFO_CLEAN_REG, bus_r(X_FIFO_CLEAN_REG) | X_FIFO_CLEAN_MSK); + + bus_w(A_FIFO_CLEAN_REG, 0); + bus_w(D_FIFO_CLEAN_REG, bus_r(D_FIFO_CLEAN_REG) & ~D_FIFO_CLEAN_MSK); + bus_w(X_FIFO_CLEAN_REG, bus_r(X_FIFO_CLEAN_REG) & ~X_FIFO_CLEAN_MSK); +} + +void resetFlow() { +#ifdef VIRTUAL + return; +#endif + LOG(logINFO, ("Resetting Core\n")); + bus_w(FLOW_CONTROL_REG, bus_r(FLOW_CONTROL_REG) | RST_F_MSK); + usleep(0); + bus_w(FLOW_CONTROL_REG, bus_r(FLOW_CONTROL_REG) & ~RST_F_MSK); +} + +int waitTransceiverReset(char *mess) { +#ifndef VIRTUAL + int resetTransceiverDone = (bus_r(TRANSCEIVERSTATUS) & RESETRXDONE_MSK); + int times = 0; + struct timespec begin, end; + clock_gettime(CLOCK_REALTIME, &begin); + while (resetTransceiverDone == 0) { + if (times++ > WAIT_TIME_OUT_0US_TIMES) { + clock_gettime(CLOCK_REALTIME, &end); + int64_t timeNs = ((end.tv_sec - begin.tv_sec) * 1E9 + + (end.tv_nsec - begin.tv_nsec)); + + sprintf(mess, "Resetting transceiver timed out, time:%.2fs\n", + (timeNs / (1E9))); + LOG(logERROR, (mess)); + return FAIL; + } + usleep(0); + resetTransceiverDone = (bus_r(TRANSCEIVERSTATUS) & RESETRXDONE_MSK); + } +#endif + LOG(logINFOBLUE, ("Transceiver reset done\n")); + return OK; +} + +#ifdef VIRTUAL +void setTransceiverAlignment(int align) { + if (align) { + bus_w(TRANSCEIVERSTATUS, + (bus_r(TRANSCEIVERSTATUS) | RXBYTEISALIGNED_MSK)); + } else { + bus_w(TRANSCEIVERSTATUS, + (bus_r(TRANSCEIVERSTATUS) & ~RXBYTEISALIGNED_MSK)); + } +} +#endif + +int isTransceiverAligned() { + return (bus_r(TRANSCEIVERSTATUS) & RXBYTEISALIGNED_MSK); +} + +int waitTransceiverAligned(char *mess) { +#ifdef VIRTUAL + setTransceiverAlignment(1); +#else + + // no module: transceiver will never get aligned + if (!checkModuleFlag) { + LOG(logWARNING, ("No module: Transceiver will never get aligned. " + "Ignoring alignment check.\n")); + return OK; + } + + int transceiverWordAligned = isTransceiverAligned(); + int times = 0; + while (transceiverWordAligned == 0) { + if (times++ > WAIT_TIME_OUT_0US_TIMES) { + sprintf(mess, "Transceiver alignment timed out\n"); + LOG(logERROR, (mess)); + return FAIL; + } + usleep(0); + transceiverWordAligned = isTransceiverAligned(); + } +#endif + LOG(logINFOBLUE, ("Transceiver alignment done\n")); + return OK; +} + +int configureTransceiver(char *mess) { + LOG(logINFOBLUE, ("\tConfiguring transceiver\n")); + + if (chipConfigured == 0) { + sprintf(mess, + "Chip not configured. Use powerchip to power on chip first.\n"); + LOG(logERROR, (mess)); + return FAIL; + } + return waitTransceiverAligned(mess); +} + +int isChipConfigured() { return chipConfigured; } + +// TODO powerchip and configurechip should be separate commands (not +// requirement) in the future +// TODO differentiate between power on board (va, vb, vc, vd, vio) and power +// chip (only chip with voltage vchip)? +int powerChip(int on, char *mess) { + uint32_t addr = CTRL_REG; + uint32_t mask = POWER_VIO_MSK | POWER_VCC_A_MSK | POWER_VCC_B_MSK | + POWER_VCC_C_MSK | POWER_VCC_D_MSK; + if (on) { + LOG(logINFOBLUE, ("Powering chip: on\n")); + bus_w(addr, bus_r(addr) | mask); + + if (configureChip(mess) == FAIL) + return FAIL; + + } else { + LOG(logINFOBLUE, ("Powering chip: off\n")); + bus_w(addr, bus_r(addr) & ~mask); + + chipConfigured = 0; + +#ifdef VIRTUAL + setTransceiverAlignment(0); +#endif + // transceiver alignment should be reset at power off + if (isTransceiverAligned()) { + sprintf(mess, "Transceiver alignment not reset\n"); + LOG(logERROR, (mess)); + + // to be removed when fixed later + LOG(logWARNING, + ("Bypassing this error for now. To be fixed later...\n")); + return OK; + + return FAIL; + } + LOG(logINFO, ("\tTransceiver alignment has been reset\n")); + } + return OK; +} + +int getPowerChip() { + uint32_t addr = CTRL_REG; + uint32_t mask = POWER_VIO_MSK | POWER_VCC_A_MSK | POWER_VCC_B_MSK | + POWER_VCC_C_MSK | POWER_VCC_D_MSK; + return (((bus_r(addr) & mask) == mask) ? 1 : 0); +} + +int configureChip(char *mess) { + LOG(logINFOBLUE, ("\tConfiguring chip\n")); + + // enable correct endianness (Only for MH_PR_2) + // uint32_t addr = MATTERHORNSPIREG1; + // bus_w(addr, bus_r(addr) &~MATTERHORNSPI1_MSK); + // bus_w(addr, bus_r(addr) | ((0x40000 << MATTERHORNSPI1_OFST) & + // MATTERHORNSPI1_MSK)); + + // start configuration + uint32_t addr = MATTERHORNSPICTRL; + bus_w(addr, bus_r(addr) | CONFIGSTART_P_MSK); + bus_w(addr, bus_r(addr) & ~CONFIGSTART_P_MSK); + + // wait until configuration is done +#ifndef VIRTUAL + int configDone = (bus_r(MATTERHORNSPICTRL) & BUSY_MSK); + int times = 0; + while (configDone == 0) { + if (times++ > WAIT_TIME_OUT_0US_TIMES) { + sprintf(mess, "Configuration of chip timed out\n"); + LOG(logERROR, (mess)); + return FAIL; + } + usleep(0); + configDone = (bus_r(MATTERHORNSPICTRL) & BUSY_MSK); + } +#endif + chipConfigured = 1; + LOG(logINFOBLUE, ("\tChip configured\n")); + return OK; +} + +/* set parameters - dr */ + +int setDynamicRange(int dr) { + if (dr == 16) + return OK; + return FAIL; +} + +int getDynamicRange(int *retval) { + *retval = DYNAMIC_RANGE; + return OK; +} + +void setADCEnableMask_10G(uint32_t mask) { + // convert 32 bit mask to 8 bit mask + uint8_t actualMask = 0; + int ival = 0; + for (int ich = 0; ich < NCHAN_ANALOG; ich = ich + 4) { + if ((1 << ich) & mask) { + actualMask |= (1 << ival); + } + ++ival; + } + + LOG(logINFO, ("Setting adcEnableMask 10G to 0x%x (from 0x%08x)\n", + actualMask, mask)); + uint32_t addr = FIFO_TO_GB_CONTROL_REG; + bus_w(addr, bus_r(addr) & (~ENABLED_CHANNELS_ADC_MSK)); + bus_w(addr, bus_r(addr) | ((actualMask << ENABLED_CHANNELS_ADC_OFST) & + ENABLED_CHANNELS_ADC_MSK)); +} + +uint32_t getADCEnableMask_10G() { + uint32_t mask = + ((bus_r(FIFO_TO_GB_CONTROL_REG) & ENABLED_CHANNELS_ADC_MSK) >> + ENABLED_CHANNELS_ADC_OFST); + + // convert 8 bit mask to 32 bit mask + uint32_t retval = 0; + if (mask) { + for (int ival = 0; ival < 8; ++ival) { + // if bit in 8 bit mask set + if ((1 << ival) & mask) { + // set it for 4 bits in 32 bit mask + for (int iloop = 0; iloop < 4; ++iloop) { + retval |= (1 << (ival * 4 + iloop)); + } + } + } + } + return retval; +} + +int setTransceiverEnableMask(uint32_t mask) { + if (mask > MAX_TRANSCEIVER_MASK) { + LOG(logERROR, ("Invalid transceiver mask: 0x%x\n", mask)); + return FAIL; + } + LOG(logINFO, ("Setting transceivermask to 0x%x\n", mask)); + + uint32_t addr = FIFO_TO_GB_CONTROL_REG; + bus_w(addr, bus_r(addr) & ~ENABLED_CHANNELS_X_MSK); + bus_w(addr, bus_r(addr) | ((mask << ENABLED_CHANNELS_X_OFST) & + ENABLED_CHANNELS_X_MSK)); + + return OK; +} + +uint32_t getTransceiverEnableMask() { + return ((bus_r(FIFO_TO_GB_CONTROL_REG) & ENABLED_CHANNELS_X_MSK) >> + ENABLED_CHANNELS_X_OFST); +} + +/* parameters - readout */ + +int setReadoutMode(enum readoutMode mode) { + analogEnable = 0, digitalEnable = 0, transceiverEnable = 0; + switch (mode) { + case ANALOG_ONLY: + LOG(logINFO, ("Setting Analog Only Readout\n")); + analogEnable = 1; + break; + case DIGITAL_ONLY: + LOG(logINFO, ("Setting Digital Only Readout\n")); + digitalEnable = 1; + break; + case ANALOG_AND_DIGITAL: + LOG(logINFO, ("Setting Analog & Digital Readout\n")); + analogEnable = 1; + digitalEnable = 1; + break; + case TRANSCEIVER_ONLY: + LOG(logINFO, ("Setting Transceiver Only Readout\n")); + transceiverEnable = 1; + break; + case DIGITAL_AND_TRANSCEIVER: + LOG(logINFO, ("Setting Digital & Transceiver Readout\n")); + digitalEnable = 1; + transceiverEnable = 1; + break; + default: + LOG(logERROR, ("Cannot set unknown readout flag. 0x%x\n", mode)); + return FAIL; + } + + uint32_t val = 0; + if (analogEnable == 1) { + val |= RO_MODE_ADC_MSK; + } + if (digitalEnable == 1) { + val |= RO_MODE_D_MSK; + } + if (transceiverEnable == 1) { + val |= RO_MODE_X_MSK; + } + + uint32_t addr = FIFO_TO_GB_CONTROL_REG; + bus_w(addr, + bus_r(addr) & ~(RO_MODE_ADC_MSK | RO_MODE_D_MSK | RO_MODE_X_MSK)); + bus_w(addr, bus_r(addr) | val); + + return OK; +} + +int getReadoutMode() { + uint32_t retval = bus_r(FIFO_TO_GB_CONTROL_REG); + if (retval & RO_MODE_ADC_MSK) { + analogEnable = 1; + } + if (retval & RO_MODE_D_MSK) { + digitalEnable = 1; + } + if (retval & RO_MODE_X_MSK) { + transceiverEnable = 1; + } + + if (analogEnable && digitalEnable && !transceiverEnable) { + LOG(logDEBUG1, ("Getting readout: Analog & Digita\n")); + return ANALOG_AND_DIGITAL; + } else if (analogEnable && !digitalEnable && !transceiverEnable) { + LOG(logDEBUG1, ("Getting readout: Analog Only\n")); + return ANALOG_ONLY; + } else if (!analogEnable && digitalEnable && !transceiverEnable) { + LOG(logDEBUG1, ("Getting readout: Digital Only\n")); + return DIGITAL_ONLY; + } else if (!analogEnable && !digitalEnable && transceiverEnable) { + LOG(logDEBUG1, ("Getting readout: Transceiver Only\n")); + return TRANSCEIVER_ONLY; + } else if (!analogEnable && digitalEnable && transceiverEnable) { + LOG(logDEBUG1, ("Getting readout: Digital & Transceiver\n")); + return DIGITAL_AND_TRANSCEIVER; + } else { + LOG(logERROR, ("Read unknown readout (analog enable:%d digital " + "enable:%d transceiver enable:%d)\n", + analogEnable, digitalEnable, transceiverEnable)); + return -1; + } +} + +/* parameters - timer */ +int setNextFrameNumber(uint64_t value) { + LOG(logINFO, ("Setting next frame number: %lu\n", value)); + setU64BitReg(value, LOCAL_FRAME_NUMBER_REG_1, LOCAL_FRAME_NUMBER_REG_2); + return OK; +} + +int getNextFrameNumber(uint64_t *retval) { + *retval = getU64BitReg(LOCAL_FRAME_NUMBER_REG_1, LOCAL_FRAME_NUMBER_REG_2); + return OK; +} + +void setNumFrames(int64_t val) { + if (val > 0) { + LOG(logINFO, ("Setting number of frames %ld\n", val)); + setU64BitReg(val, FRAMES_IN_REG_1, FRAMES_IN_REG_2); + } +} + +int64_t getNumFrames() { + return getU64BitReg(FRAMES_IN_REG_1, FRAMES_IN_REG_2); +} + +void setNumTriggers(int64_t val) { + if (val > 0) { + LOG(logINFO, ("Setting number of triggers %ld\n", val)); + setU64BitReg(val, CYCLES_IN_REG_1, CYCLES_IN_REG_2); + } +} + +int64_t getNumTriggers() { + return getU64BitReg(CYCLES_IN_REG_1, CYCLES_IN_REG_2); +} + +int setNumAnalogSamples(int val) { + if (val < 0 || val > MAX_ANALOG_SAMPLES) { + LOG(logERROR, ("Invalid analog samples: %d\n", val)); + return FAIL; + } + LOG(logINFO, ("Setting number of analog samples %d\n", val)); + + uint32_t addr = NO_SAMPLES_A_REG; + bus_w(addr, bus_r(addr) & ~NO_SAMPLES_A_MSK); + bus_w(addr, bus_r(addr) | ((val << NO_SAMPLES_A_OFST) & NO_SAMPLES_A_MSK)); + return OK; +} + +int getNumAnalogSamples() { + return ((bus_r(NO_SAMPLES_A_REG) & NO_SAMPLES_A_MSK) >> NO_SAMPLES_A_OFST); +} + +int setNumDigitalSamples(int val) { + if (val < 0 || val > MAX_DIGITAL_SAMPLES) { + LOG(logERROR, ("Invalid digital samples: %d\n", val)); + return FAIL; + } + LOG(logINFO, ("Setting number of digital samples %d\n", val)); + + uint32_t addr = NO_SAMPLES_D_REG; + bus_w(addr, bus_r(addr) & ~NO_SAMPLES_D_MSK); + bus_w(addr, bus_r(addr) | ((val << NO_SAMPLES_D_OFST) & NO_SAMPLES_D_MSK)); + return OK; +} + +int getNumDigitalSamples() { + return ((bus_r(NO_SAMPLES_D_REG) & NO_SAMPLES_D_MSK) >> NO_SAMPLES_D_OFST); +} + +int setNumTransceiverSamples(int val) { + if (val < 0 || val > MAX_TRANSCEIVER_SAMPLES) { + LOG(logERROR, ("Invalid transceiver samples: %d\n", val)); + return FAIL; + } + LOG(logINFO, ("Setting number of transceiver samples %d\n", val)); + + uint32_t addr = NO_SAMPLES_X_REG; + bus_w(addr, bus_r(addr) & ~NO_SAMPLES_X_MSK); + bus_w(addr, bus_r(addr) | ((val << NO_SAMPLES_X_OFST) & NO_SAMPLES_X_MSK)); + return OK; +} + +int getNumTransceiverSamples() { + return ((bus_r(NO_SAMPLES_X_REG) & NO_SAMPLES_X_MSK) >> NO_SAMPLES_X_OFST); +} + +int setExpTime(int64_t val) { + if (val < 0) { + LOG(logERROR, ("Invalid exptime: %lld ns\n", (long long int)val)); + return FAIL; + } + LOG(logINFO, ("Setting exptime %lld ns\n", (long long int)val)); + val *= (1E-3 * RUN_CLK); + setPatternWaitTime(0, val); + + // validate for tolerance + int64_t retval = getExpTime(); + val /= (1E-3 * RUN_CLK); + if (val != retval) { + return FAIL; + } + return OK; +} + +int64_t getExpTime() { return getPatternWaitTime(0) / (1E-3 * RUN_CLK); } + +int setPeriod(int64_t val) { + if (val < 0) { + LOG(logERROR, ("Invalid period: %lld ns\n", (long long int)val)); + return FAIL; + } + LOG(logINFO, ("Setting period %lld ns\n", (long long int)val)); + val *= (1E-3 * RUN_CLK); + setU64BitReg(val, PERIOD_IN_REG_1, PERIOD_IN_REG_2); + + // validate for tolerance + int64_t retval = getPeriod(); + val /= (1E-3 * RUN_CLK); + if (val != retval) { + return FAIL; + } + return OK; +} + +int64_t getPeriod() { + return getU64BitReg(PERIOD_IN_REG_1, PERIOD_IN_REG_2) / (1E-3 * RUN_CLK); +} + +int setDelayAfterTrigger(int64_t val) { + if (val < 0) { + LOG(logERROR, ("Invalid delay after trigger: %ld ns\n", val)); + return FAIL; + } + LOG(logINFO, ("Setting delay after trigger %ld ns\n", val)); + val *= (1E-3 * RUN_CLK); + setU64BitReg(val, DELAY_IN_REG_1, DELAY_IN_REG_2); + + // validate for tolerance + int64_t retval = getDelayAfterTrigger(); + val /= (1E-3 * RUN_CLK); + if (val != retval) { + return FAIL; + } + return OK; +} + +int64_t getDelayAfterTrigger() { + return getU64BitReg(DELAY_IN_REG_1, DELAY_IN_REG_2) / (1E-3 * RUN_CLK); +} + +int64_t getNumFramesLeft() { + return getU64BitReg(FRAMES_OUT_REG_1, FRAMES_OUT_REG_2); +} + +int64_t getNumTriggersLeft() { + return getU64BitReg(CYCLES_OUT_REG_1, CYCLES_OUT_REG_2); +} + +int64_t getDelayAfterTriggerLeft() { + return getU64BitReg(DELAY_OUT_REG_1, DELAY_OUT_REG_2) / (1E-3 * RUN_CLK); +} + +int64_t getPeriodLeft() { + return getU64BitReg(PERIOD_OUT_REG_1, PERIOD_OUT_REG_2) / (1E-3 * RUN_CLK); +} + +int64_t getFramesFromStart() { + return getU64BitReg(FRAMES_FROM_START_OUT_REG_1, + FRAMES_FROM_START_OUT_REG_2); +} + +int64_t getActualTime() { + return getU64BitReg(TIME_FROM_START_OUT_REG_1, TIME_FROM_START_OUT_REG_2) / + (1E-3 * TICK_CLK); +} + +int64_t getMeasurementTime() { + return getU64BitReg(FRAME_TIME_OUT_REG_1, FRAME_TIME_OUT_REG_2) / + (1E-3 * TICK_CLK); +} + +/* parameters - dac, adc, hv */ + +void setDAC(enum DACINDEX ind, int val, int mV) { + char dacName[MAX_STR_LENGTH] = {0}; + memset(dacName, 0, MAX_STR_LENGTH); + sprintf(dacName, "dac%d", (int)ind); + + if (val < 0 && val != LTC2620_D_GetPowerDownValue()) + return; + + LOG(logDEBUG1, ("Setting dac[%d - %s]: %d %s \n", (int)ind, dacName, val, + (mV ? "mV" : "dac units"))); + int dacval = val; + if (LTC2620_D_SetDACValue((int)ind, val, mV, dacName, &dacval) == OK) + dacValues[ind] = dacval; +} + +int getDAC(enum DACINDEX ind, int mV) { + if (!mV) { + LOG(logDEBUG1, ("Getting DAC %d : %d dac\n", ind, dacValues[ind])); + return dacValues[ind]; + } + int voltage = -1; + LTC2620_D_DacToVoltage(dacValues[ind], &voltage); + LOG(logDEBUG1, + ("Getting DAC %d : %d dac (%d mV)\n", ind, dacValues[ind], voltage)); + return voltage; +} + +int getMaxDacSteps() { return LTC2620_D_GetMaxNumSteps(); } + +int dacToVoltage(int dac) { + int val; + if (LTC2620_D_DacToVoltage(dac, &val) == FAIL) { + return -1; + } + return val; +} + +int checkVLimitCompliant(int mV) { + if (vLimit > 0 && mV > vLimit) + return FAIL; + return OK; +} + +int checkVLimitDacCompliant(int dac) { + if (vLimit > 0 && dac != -1 && dac != LTC2620_D_GetPowerDownValue()) { + int mv = 0; + // could not convert + if (LTC2620_D_DacToVoltage(dac, &mv) == FAIL) + return FAIL; + if (mv > vLimit) + return FAIL; + } + return OK; +} + +int getVLimit() { return vLimit; } + +void setVLimit(int l) { + if (l >= 0) + vLimit = l; +} + +int isPowerValid(enum DACINDEX ind, int val) { + char *powerNames[] = {PWR_NAMES}; + int pwrIndex = (int)(ind - D_PWR_D); + + int min = POWER_RGLTR_MIN; + if (!strcmp(powerNames[pwrIndex], "IO")) { + min = VIO_MIN_MV; + } + + // not power_rgltr_max because it is allowed only upto vchip max - 200 + if (val != 0 && (val != LTC2620_D_GetPowerDownValue()) && + (val < min || val > POWER_RGLTR_MAX)) { + LOG(logERROR, + ("Invalid value of %d mV for Power V%s. Is not between %d and " + "%d mV\n", + val, powerNames[pwrIndex], min, POWER_RGLTR_MAX)); + return 0; + } + return 1; +} + +int getPower(enum DACINDEX ind) { + char *powerNames[] = {PWR_NAMES}; + int pwrIndex = (int)(ind - D_PWR_D); + + // check dac value + // not set yet + if (dacValues[ind] == -1) { + LOG(logERROR, + ("Unknown dac value for Power V%s!\n", powerNames[pwrIndex])); + return -1; + } + + // dac powered off + if (dacValues[ind] == LTC2620_D_GetPowerDownValue()) { + LOG(logWARNING, ("Power V%s powered down\n", powerNames[pwrIndex])); + return LTC2620_D_GetPowerDownValue(); + } + + // get dac in mV + int retval = -1; + ConvertToDifferentRange(LTC2620_D_GetMaxInput(), LTC2620_D_GetMinInput(), + POWER_RGLTR_MIN, POWER_RGLTR_MAX, dacValues[ind], + &retval); + + return retval; +} + +void setPower(enum DACINDEX ind, int val) { + char *powerNames[] = {PWR_NAMES}; + int pwrIndex = (int)(ind - D_PWR_D); + + // power down dac + if (val == LTC2620_D_GetPowerDownValue()) { + LOG(logINFO, ("\tPowering down V%d\n", powerNames[pwrIndex])); + setDAC(ind, LTC2620_D_GetPowerDownValue(), 0); + } + + // set dac + else if (val >= 0) { + LOG(logINFO, + ("Setting Power V%s to %d mV\n", powerNames[pwrIndex], val)); + + // validate value (already checked at tcp (funcs.c)) + if (!isPowerValid(ind, val)) { + return; + } + + // convert voltage to dac + int dacval = -1; + if (ConvertToDifferentRange( + POWER_RGLTR_MIN, POWER_RGLTR_MAX, LTC2620_D_GetMaxInput(), + LTC2620_D_GetMinInput(), val, &dacval) == FAIL) { + LOG(logERROR, + ("\tCannot convert Power V%s to dac value. Invalid value of %d " + "mV. Is not between " + "%d and %d mV\n", + powerNames[pwrIndex], val, POWER_RGLTR_MIN, POWER_RGLTR_MAX)); + return; + } + + // set and power on/ update dac + LOG(logINFO, ("Setting Power V%s: %d mV (%d dac)\n", + powerNames[pwrIndex], val, dacval)); + setDAC(ind, dacval, 0); + } +} + +int getADC(enum ADCINDEX ind, int *value) { + *value = 0; +#ifdef VIRTUAL + return OK; +#endif + switch (ind) { + // slow adcs + case S_ADC0: + case S_ADC1: + case S_ADC2: + case S_ADC3: + case S_ADC4: + case S_ADC5: + case S_ADC6: + case S_ADC7: + LOG(logDEBUG1, ("Reading Slow ADC Channel %d\n", (int)ind - S_ADC0)); + return getSlowADC((int)ind - S_ADC0, value); + case TEMP_FPGA: + LOG(logDEBUG1, ("Reading FPGA Temperature\n")); + return getTemperature(value); + default: + LOG(logERROR, ("Adc Index %d not defined \n", (int)ind)); + return FAIL; + } +} + +int getSlowADC(int ichan, int *retval) { + *retval = 0; +#ifndef VIRTUAL + char fname[MAX_STR_LENGTH]; + memset(fname, 0, MAX_STR_LENGTH); + sprintf(fname, SLOWADC_DRIVER_FILE_NAME, ichan); + LOG(logDEBUG1, ("fname %s\n", fname)); + + if (readParameterFromFile(fname, "slow adc", retval) == FAIL) { + LOG(logERROR, ("Could not get slow adc\n")); + return FAIL; + } + // TODO assuming already converted to uV + // convert to uV + // double value = SLOWDAC_CONVERTION_FACTOR_TO_UV * (double)(*retval); + // LOG(logINFO, ("Slow ADC [%d]: %f uV\n", ichan, value)); + //*retval = (int)value; + + LOG(logINFO, ("Slow ADC [%d]: %d uV\n", ichan, (*retval))); +#endif + return OK; +} + +int getTemperature(int *retval) { + *retval = 0; +#ifndef VIRTUAL + if (readParameterFromFile(TEMP_DRIVER_FILE_NAME, "temperature", retval) == + FAIL) { + LOG(logERROR, ("Could not get temperature\n")); + return FAIL; + } + LOG(logINFO, ("Temperature: %.2f °C\n", (double)(*retval) / 1000.00)); +#endif + return OK; +} + +/* parameters - timing, extsig */ + +void setTiming(enum timingMode arg) { + switch (arg) { + case AUTO_TIMING: + LOG(logINFO, ("Set Timing: Auto\n")); + bus_w(FLOW_CONTROL_REG, bus_r(FLOW_CONTROL_REG) & ~TRIGGER_ENABLE_MSK); + break; + case TRIGGER_EXPOSURE: + LOG(logINFO, ("Set Timing: Trigger\n")); + bus_w(FLOW_CONTROL_REG, bus_r(FLOW_CONTROL_REG) | TRIGGER_ENABLE_MSK); + break; + default: + LOG(logERROR, ("Unknown timing mode %d\n", arg)); + } +} + +enum timingMode getTiming() { + if (bus_r(FLOW_CONTROL_REG) == TRIGGER_ENABLE_MSK) + return TRIGGER_EXPOSURE; + return AUTO_TIMING; +} + +int setDetectorPosition(int pos[]) { + memcpy(detPos, pos, sizeof(detPos)); + // TODO + return OK; +} + +int *getDetectorPosition() { return detPos; } + +int getNumberofUDPInterfaces() { return 1; } + +void calcChecksum(udp_header *udp) { + int count = IP_HEADER_SIZE; + long int sum = 0; + + // start at ip_tos as the memory is not continous for ip header + uint16_t *addr = (uint16_t *)(&(udp->ip_tos)); + + sum += *addr++; + count -= 2; + + // ignore ethertype (from udp header) + addr++; + // ignore udp_srcmac_lsb (from udp header) + addr++; + addr++; + + // from ip_protocol to ip_checksum + while (count > 2) { + sum += *addr++; + count -= 2; + } + + // ignore udp_checksum (from udp header) + addr++; + // ignore udp_destport (from udp header) + addr++; + // ignore udp_srcport (from udp header) + addr++; + + if (count > 0) + sum += *addr; // Add left-over byte, if any + while (sum >> 16) + sum = (sum & 0xffff) + (sum >> 16); // Fold 32-bit sum to 16 bits + long int checksum = sum & 0xffff; + checksum += UDP_IP_HEADER_LENGTH_BYTES; + udp->ip_checksum = checksum; + LOG(logINFO, ("\tIP checksum: 0x%x\n", checksum)); +} + +int configureMAC() { + uint32_t srcip = udpDetails[0].srcip; + uint32_t dstip = udpDetails[0].dstip; + uint64_t srcmac = udpDetails[0].srcmac; + uint64_t dstmac = udpDetails[0].dstmac; + uint16_t srcport = udpDetails[0].srcport; + uint16_t dstport = udpDetails[0].dstport; + + LOG(logINFOBLUE, ("Configuring MAC\n")); + char src_mac[MAC_ADDRESS_SIZE], src_ip[INET_ADDRSTRLEN], + dst_mac[MAC_ADDRESS_SIZE], dst_ip[INET_ADDRSTRLEN]; + getMacAddressinString(src_mac, MAC_ADDRESS_SIZE, srcmac); + getMacAddressinString(dst_mac, MAC_ADDRESS_SIZE, dstmac); + getIpAddressinString(src_ip, srcip); + getIpAddressinString(dst_ip, dstip); + + LOG(logINFO, ("\tSource IP : %s\n" + "\tSource MAC : %s\n" + "\tSource Port : %hu\n" + "\tDest IP : %s\n" + "\tDest MAC : %s\n" + "\tDest Port : %hu\n", + src_ip, src_mac, srcport, dst_ip, dst_mac, dstport)); + +#ifdef VIRTUAL + if (setUDPDestinationDetails(0, 0, dst_ip, dstport) == FAIL) { + LOG(logERROR, ("could not set udp destination IP and port\n")); + return FAIL; + } +#endif + + // get struct memory + udp_header *udp = (udp_header *)(Arm_getUDPBaseAddress()); + memset(udp, 0, sizeof(udp_header)); + + // mac addresses + // msb (32) + lsb (16) + udp->udp_destmac_msb = ((dstmac >> 16) & BIT32_MASK); + udp->udp_destmac_lsb = ((dstmac >> 0) & BIT16_MASK); + // msb (16) + lsb (32) + udp->udp_srcmac_msb = ((srcmac >> 32) & BIT16_MASK); + udp->udp_srcmac_lsb = ((srcmac >> 0) & BIT32_MASK); + + // ip addresses + udp->ip_srcip_msb = ((srcip >> 16) & BIT16_MASK); + udp->ip_srcip_lsb = ((srcip >> 0) & BIT16_MASK); + udp->ip_destip_msb = ((dstip >> 16) & BIT16_MASK); + udp->ip_destip_lsb = ((dstip >> 0) & BIT16_MASK); + + // source port + udp->udp_srcport = srcport; + udp->udp_destport = dstport; + + // other defines + udp->udp_ethertype = 0x800; + udp->ip_ver = 0x4; + udp->ip_ihl = 0x5; + udp->ip_flags = 0x2; // FIXME + udp->ip_ttl = 0x40; + udp->ip_protocol = 0x11; + // total length is redefined in firmware + + calcChecksum(udp); + + return OK; +} + +/* aquisition */ + +int startStateMachine() { +#ifdef VIRTUAL + // create udp socket + if (createUDPSocket(0) != OK) { + return FAIL; + } + LOG(logINFOBLUE, ("Starting State Machine\n")); + if (sharedMemory_getStop() != 0) { + LOG(logERROR, ("Cant start acquisition. " + "Stop server has not updated stop status to 0\n")); + return FAIL; + } + sharedMemory_setStatus(RUNNING); + if (pthread_create(&pthread_virtual_tid, NULL, &start_timer, NULL)) { + LOG(logERROR, ("Could not start Virtual acquisition thread\n")); + sharedMemory_setStatus(IDLE); + return FAIL; + } else + pthread_detach(pthread_virtual_tid); + LOG(logINFOGREEN, ("Virtual Acquisition started\n")); + return OK; +#endif + + LOG(logINFOBLUE, ("Starting State Machine\n")); + // cleanFifos(); removing this for now as its done before readout pattern + + // start state machine + bus_w(FLOW_CONTROL_REG, bus_r(FLOW_CONTROL_REG) | START_F_MSK); + + LOG(logINFORED, ("Waiting for exposing to be done\n")); + int exposingDone = (bus_r(FLOW_STATUS_REG) & RSM_BUSY_MSK); + while (exposingDone != 0) { + usleep(0); + exposingDone = (bus_r(FLOW_STATUS_REG) & RSM_BUSY_MSK); + } + + LOG(logINFORED, ("Starting readout of chip to fifo\n")); + bus_w(MATTERHORNSPICTRL, bus_r(MATTERHORNSPICTRL) | STARTREAD_P_MSK); + + LOG(logINFORED, ("Waiting until k-words or end of acquisition\n")); + usleep(0); + int commaDet = (bus_r(TRANSCEIVERSTATUS) & RXCOMMADET_MSK); + while (commaDet == 0) { + usleep(0); + commaDet = (bus_r(TRANSCEIVERSTATUS) & RXCOMMADET_MSK); + } + LOG(logINFORED, ("Kwords or end of acquisition detected\n")); + + return OK; +} + +#ifdef VIRTUAL +void *start_timer(void *arg) { + if (!isControlServer) { + return NULL; + } + + int64_t periodNs = getPeriod(); + int numFrames = (getNumFrames() * getNumTriggers()); + int64_t expUs = getExpTime() / 1000; + + int imageSize = calculateDataBytes(); + int maxDataSize = MAX_DATA_SIZE_IN_PACKET; + int packetSize = sizeof(sls_detector_header) + maxDataSize; + int packetsPerFrame = ceil((double)imageSize / (double)maxDataSize); + + LOG(logDEBUG1, ("period: %lld ns, exp: %lld us, numFrames: %d, " + "imageSize: %d, maxDataSize: %d, packetsize: %d, " + "packetsPerFrame: %d\n", + periodNs, expUs, numFrames, imageSize, maxDataSize, + packetSize, packetsPerFrame)); + + // Generate Data + char imageData[imageSize]; + memset(imageData, 0, imageSize); + for (int i = 0; i < imageSize; i += sizeof(uint16_t)) { + *((uint16_t *)(imageData + i)) = i; + } + + // Send data + uint64_t frameNr = 0; + getNextFrameNumber(&frameNr); + // loop over number of frames + for (int iframes = 0; iframes != numFrames; ++iframes) { + + // check if manual stop + if (sharedMemory_getStop() == 1) { + setNextFrameNumber(frameNr + iframes + 1); + break; + } + + // sleep for exposure time + struct timespec begin, end; + clock_gettime(CLOCK_REALTIME, &begin); + usleep(expUs); + + int srcOffset = 0; + // loop packet + for (int i = 0; i != packetsPerFrame; ++i) { + + char packetData[packetSize]; + memset(packetData, 0, packetSize); + // set header + sls_detector_header *header = (sls_detector_header *)(packetData); + header->detType = (uint16_t)myDetectorType; + header->version = SLS_DETECTOR_HEADER_VERSION; + header->frameNumber = frameNr + iframes; + header->packetNumber = i; + header->modId = 0; + header->row = detPos[Y]; + header->column = detPos[X]; + + // fill data + memcpy(packetData + sizeof(sls_detector_header), + imageData + srcOffset, + (imageSize < maxDataSize ? imageSize : maxDataSize)); + srcOffset += maxDataSize; + + sendUDPPacket(0, 0, packetData, packetSize); + } + LOG(logINFO, ("Sent frame: %d [%lld]\n", iframes, frameNr + iframes)); + clock_gettime(CLOCK_REALTIME, &end); + int64_t timeNs = + ((end.tv_sec - begin.tv_sec) * 1E9 + (end.tv_nsec - begin.tv_nsec)); + + // sleep for (period - exptime) + if (iframes < numFrames) { // if there is a next frame + if (periodNs > timeNs) { + usleep((periodNs - timeNs) / 1000); + } + } + } + setNextFrameNumber(frameNr + numFrames); + closeUDPSocket(0); + + sharedMemory_setStatus(IDLE); + LOG(logINFOBLUE, ("Transmitting frames done\n")); + return NULL; +} +#endif + +int stopStateMachine() { + LOG(logINFORED, ("Stopping State Machine\n")); + // if scan active, stop scan + if (sharedMemory_getScanStatus() == RUNNING) { + sharedMemory_setScanStop(1); + } +#ifdef VIRTUAL + sharedMemory_setStop(1); + // read till status is idle + while (sharedMemory_getStatus() == RUNNING) + usleep(500); + sharedMemory_setStop(0); + LOG(logINFO, ("Stopped State Machine\n")); + return OK; +#endif + // stop state machine + bus_w(FLOW_CONTROL_REG, bus_r(FLOW_CONTROL_REG) | STOP_F_MSK); + + return OK; +} + +int startReadOut() { + LOG(logINFOBLUE, ("Starting Readout\n")); +#ifdef VIRTUAL + // cannot set #frames and exptiem temporarily to 1 and 0, + // because have to set it back after readout (but this is non blocking) + return startStateMachine(); +#endif + // check if data in fifo + int ret = FAIL; + if (transceiverEnable) { + if ((bus_r(X_FIFO_EMPTY_STATUS_REG) & X_FIFO_EMPTY_STATUS_MSK) != + X_FIFO_EMPTY_STATUS_MSK) { + LOG(logINFO, ("Data in transceiver fifo\n")); + ret = OK; + } + } + if (analogEnable) { + if (bus_r(A_FIFO_EMPTY_STATUS_REG) != BIT32_MSK) { + LOG(logINFO, ("Data in analog fifo\n")); + ret = OK; + } + } + if (digitalEnable) { + if ((bus_r(D_FIFO_EMPTY_STATUS_REG) & D_FIFO_EMPTY_STATUS_MSK) != + D_FIFO_EMPTY_STATUS_MSK) { + LOG(logINFO, ("Data in digital fifo\n")); + ret = OK; + } + } + // if no module, dont check fifo empty + if (checkModuleFlag && ret == FAIL) { + LOG(logERROR, ("No data in fifo\n")); + return FAIL; + } + + LOG(logINFOBLUE, ("Streaming data from fifo\n")); + bus_w(FIFO_TO_GB_CONTROL_REG, + bus_r(FIFO_TO_GB_CONTROL_REG) | START_STREAMING_P_MSK); + + // wait until streaming is done (not same as fifo empty) + int streamingBusy = (bus_r(STATUSREG1) & TRANSMISSIONBUSY_MSK); + while (streamingBusy != 0) { + usleep(0); + streamingBusy = (bus_r(STATUSREG1) & TRANSMISSIONBUSY_MSK); + } + LOG(logINFORED, ("Streaming done\n")); + + return OK; +} + +int softwareTrigger() { +#ifndef VIRTUAL + // ready for trigger + if (getRunStatus() != WAITING) { + LOG(logWARNING, ("Not yet ready for trigger!\n")); + return FAIL; + } +#endif + LOG(logINFO, ("Sending Software Trigger\n")); + bus_w(FLOW_CONTROL_REG, bus_r(FLOW_CONTROL_REG) | SW_TRIGGER_F_MSK); + // wait to make sure its out of this state and even 'wait for start frame' + // TODO: usleep(100); + + return OK; +} + +enum runStatus getRunStatus() { + LOG(logDEBUG1, ("Getting status\n")); + // scan error or running + if (sharedMemory_getScanStatus() == ERROR) { + LOG(logINFOBLUE, ("Status: scan ERROR\n")); + return ERROR; + } + if (sharedMemory_getScanStatus() == RUNNING) { + LOG(logINFOBLUE, ("Status: scan RUNNING\n")); + return RUNNING; + } +#ifdef VIRTUAL + if (sharedMemory_getStatus() == RUNNING) { + LOG(logINFOBLUE, ("Status: RUNNING\n")); + return RUNNING; + } + LOG(logINFOBLUE, ("Status: IDLE\n")); + return IDLE; +#endif + uint32_t retval = bus_r(FLOW_STATUS_REG); + LOG(logINFO, ("Flow Status Register: %08x\n", retval)); + + if (retval & RSM_TRG_WAIT_MSK) { + LOG(logINFOBLUE, ("Status: WAITING\n")); + return WAITING; + } else if (retval & RSM_BUSY_MSK) { + LOG(logINFOBLUE, ("Status: RUNNING (exposing)\n")); + return RUNNING; + } else if (bus_r(MATTERHORNSPICTRL) & READOUTFROMASIC_MSK) { + LOG(logINFOBLUE, ("Status: RUNNING (data from chip to fifo)\n")); + return RUNNING; + } else if (bus_r(STATUSREG1) & TRANSMISSIONBUSY_MSK) { + LOG(logINFOBLUE, ("Status: TRANSMITTING\n")); + return TRANSMITTING; + } + + LOG(logINFOBLUE, ("Status: IDLE\n")); + return IDLE; + // TODO: STOPPED, ERROR? +} + +u_int32_t runBusy() { +#ifdef VIRTUAL + return ((sharedMemory_getStatus() == RUNNING) ? 1 : 0); +#endif + uint32_t exposingBusy = bus_r(FLOW_STATUS_REG) & RSM_BUSY_MSK; + uint32_t fillingFifoBusy = bus_r(MATTERHORNSPICTRL) & READOUTFROMASIC_MSK; + uint32_t streamingBusy = bus_r(STATUSREG1) & TRANSMISSIONBUSY_MSK; + return (exposingBusy || fillingFifoBusy || streamingBusy); +} + +void waitForAcquisitionEnd() { + while (runBusy()) { + usleep(500); + } +#ifndef VIRTUAL + int64_t retval = getNumFramesLeft() + 1; + if (retval > 0) { + LOG(logINFORED, ("%lld frames left\n", (long long int)retval)); + } +#endif + LOG(logINFOGREEN, ("Blocking Acquisition done\n")); +} + +int calculateDataBytes() { + int analogDataBytes = 0; + int digitalDataBytes = 0; + int transceiverDataBytes = 0; + int nachans = 0, ndchans = 0, ntchans = 0; + + if (analogEnable) { + nachans = __builtin_popcount(getADCEnableMask_10G()); + analogDataBytes = nachans * (DYNAMIC_RANGE / 8) * getNumAnalogSamples(); + LOG(logINFO, ("\t#Analog Channels:%d, Databytes:%d\n", nachans, + analogDataBytes)); + } + + if (digitalEnable) { + ndchans = 64; + digitalDataBytes = (sizeof(uint64_t) * getNumDigitalSamples()); + LOG(logINFO, ("\t#Digital Channels:%d, Databytes:%d\n", ndchans, + digitalDataBytes)); + } + + if (transceiverEnable) { + ntchans = __builtin_popcount(getTransceiverEnableMask()); + transceiverDataBytes = + ntchans * (NBITS_PER_TRANSCEIVER / 8) * getNumTransceiverSamples(); + LOG(logINFO, ("\t#Transceiver Channels:%d, Databytes:%d\n", ntchans, + transceiverDataBytes)); + } + + // total + int nchans = nachans + ndchans + ntchans; + int dataBytes = analogDataBytes + digitalDataBytes + transceiverDataBytes; + + LOG(logINFO, + ("\t#Total Channels:%d, Total Databytes:%d\n", nchans, dataBytes)); + return dataBytes; +} + +int getTotalNumberOfChannels() { + int nchanx = 0, nchany = 0; + getNumberOfChannels(&nchanx, &nchany); + return nchanx * nchany; +} + +void getNumberOfChannels(int *nchanx, int *nchany) { + int nachans = 0, ndchans = 0, ntchans = 0; + + if (analogEnable) { + nachans = __builtin_popcount(getADCEnableMask_10G()); + LOG(logDEBUG1, ("Analog Channels: %d\n", nachans)); + } + + if (digitalEnable) { + ndchans = 64; + LOG(logDEBUG, ("Digital Channels: %d\n", ndchans)); + } + + if (transceiverEnable) { + ntchans = __builtin_popcount(getTransceiverEnableMask()); + LOG(logDEBUG1, ("Transceiver Channels: %d\n", ntchans)); + } + *nchanx = nachans + ndchans + ntchans; + LOG(logDEBUG1, ("Total #Channels: %d\n", *nchanx)); + *nchany = 1; +} + +int getNumberOfChips() { return NCHIP; } +int getNumberOfDACs() { return NDAC; } +int getNumberOfChannelsPerChip() { return NCHAN; } diff --git a/slsDetectorServers/xilinx_ctbDetectorServer/slsDetectorServer_defs.h b/slsDetectorServers/xilinx_ctbDetectorServer/slsDetectorServer_defs.h new file mode 100644 index 000000000..54cb758de --- /dev/null +++ b/slsDetectorServers/xilinx_ctbDetectorServer/slsDetectorServer_defs.h @@ -0,0 +1,157 @@ +// SPDX-License-Identifier: LGPL-3.0-or-other +// Copyright (C) 2021 Contributors to the SLS Detector Package +#pragma once +#include "RegisterDefs.h" +#include "sls/sls_detector_defs.h" + +#define REQRD_FRMWRE_VRSN (0x230710) +#define KERNEL_DATE_VRSN "Wed Nov 29 17:32:14 CET 2023" + +#define LINKED_SERVER_NAME "xilinx_ctbDetectorServer" + +#define CTRL_SRVR_INIT_TIME_US (2 * 1000 * 1000) + +/* Hardware Definitions */ +#define NCHAN (40) +#define NCHAN_ANALOG (32) +#define NCHAN_DIGITAL (64) +#define NCHAN_TRANSCEIVER (4) +#define NBITS_PER_TRANSCEIVER (64) +#define NCHIP (1) +#define NDAC (24) +#define NPWR (6) +#define NDAC_ONLY (NDAC - NPWR) + +#define DYNAMIC_RANGE (16) +#define NUM_BYTES_PER_PIXEL (DYNAMIC_RANGE / 8) + +#define MAIN_APP_FOLDER "/root/apps/xilinx-ctb" +#define FIRMWARE_FILE MAIN_APP_FOLDER "/XilinxCTB.bit" +#define DEVICE_TREE_OVERLAY_FILE MAIN_APP_FOLDER "/pl.dtbo" +#define CURRENT_BOARD_LINKS_FOLDER MAIN_APP_FOLDER "/current_board_links" +#define IIO_DEVICE_FOLDER MAIN_APP_FOLDER "/iio_device_links" + +#define DEVICE_TREE_DST "/sys/bus/iio/devices/iio:device" +#define DEVICE_NAME_LIST "xilinx-ams", "ad7689", "dac@0", "dac@1", "dac@2" +#define DEVICE_TREE_API_FOLDER "/sys/kernel/config/device-tree/overlays/spidr" + +#define DAC_DRIVER_FILE_NAME CURRENT_BOARD_LINKS_FOLDER "/ao%d" +#define DAC_POWERDOWN_DRIVER_FILE_NAME CURRENT_BOARD_LINKS_FOLDER "/ao%d_pd" +#define SLOWADC_DRIVER_FILE_NAME CURRENT_BOARD_LINKS_FOLDER "/ai%d" +#define TEMP_DRIVER_FILE_NAME DEVICE_TREE_DST "0/in_temp7_input" + +/** Default Parameters */ +#define DEFAULT_NUM_FRAMES (1) +#define DEFAULT_NUM_CYCLES (1) +#define DEFAULT_TIMING_MODE (AUTO_TIMING) +#define DEFAULT_EXPTIME (0) +#define DEFAULT_PERIOD (300 * 1000) // 300us +#define DEFAULT_READOUT_MODE (TRANSCEIVER_ONLY) +#define DEFAULT_READOUT_MODE_STR "transceiver_only" +#define DEFAULT_TRANSCEIVER_MASK (0x3) // TODO: check +#define DEFAULT_NUM_ASAMPLES (1) +#define DEFAULT_NUM_DSAMPLES (1) +#define DEFAULT_NUM_TSAMPLES (200) +#define DEFAULT_STARTING_FRAME_NUMBER (1) +#define DEFAULT_VLIMIT (-100) +#define DEFAULT_DELAY (0) + +#define MAX_TRANSCEIVER_MASK (0xF) +#define MAX_TRANSCEIVER_SAMPLES (0x1FFF) + +#define MAX_ANALOG_SAMPLES (0x3FFF) +#define MAX_DIGITAL_SAMPLES (0x3FFF) + +#define DAC_MIN_MV (0) +#define DAC_MAX_MV (2048) +#define POWER_RGLTR_MIN (1041) +#define POWER_RGLTR_MAX (2661) +#define VIO_MIN_MV (1200) // for fpga to function + +#define TICK_CLK (20) // MHz (trig_timeFromStart, frametime, timeFromStart) +#define RUN_CLK \ + (100) // MHz (framesFromStart, c_swTrigger, run, waitForTrigger, starting, + // acquiring, waitForPeriod, internalStop, c_framesFromSTart_reset, + // s_start, c_stop, triggerEnable, period, frames, cycles, delay) + +/* Defines in the Firmware */ +#define WAIT_TIME_PATTERN_READ (10) +#define WAIT_TIME_OUT_0US_TIMES (35000) // 2s + +#define BIT32_MSK (0xFFFFFFFF) +#define BIT16_MASK (0xFFFF) + +#define MAX_DATA_SIZE_IN_PACKET (8144) + +/* Enum Definitions */ +enum ADCINDEX { + S_ADC0, + S_ADC1, + S_ADC2, + S_ADC3, + S_ADC4, + S_ADC5, + S_ADC6, + S_ADC7, + TEMP_FPGA +}; +enum DACINDEX { + D0, + D1, + D2, + D3, + D4, + D5, + D6, + D7, + D8, + D9, + D10, + D11, + D12, + D13, + D14, + D15, + D16, + D17, + D_PWR_D, + D_PWR_EMPTY, + D_PWR_IO, + D_PWR_A, + D_PWR_B, + D_PWR_C +}; + +#define PWR_NAMES "D", "_unknown", "IO", "A", "B", "C" + +/* Struct Definitions */ +// For arm has to be multiple of 16 +// We dont byteswap in the upd_gen so the order has to be different +typedef struct udp_header_struct { + uint16_t udp_srcmac_msb; + uint16_t udp_destmac_lsb; + uint32_t udp_destmac_msb; + uint8_t ip_tos; + uint8_t ip_ihl : 4, ip_ver : 4; + uint16_t udp_ethertype; + uint32_t udp_srcmac_lsb; + uint8_t ip_protocol; + uint8_t ip_ttl; + uint16_t ip_fragmentoffset : 13, ip_flags : 3; + uint16_t ip_identification; + uint16_t ip_totallength; + uint16_t ip_destip_msb; + uint16_t ip_srcip_lsb; + uint16_t ip_srcip_msb; + uint16_t ip_checksum; + uint16_t udp_checksum; + uint16_t udp_destport; + uint16_t udp_srcport; + uint16_t ip_destip_lsb; + // padding + uint32_t padding0; + uint32_t padding1; +} udp_header; + +#define IP_HEADER_SIZE (20) +#define UDP_IP_HEADER_LENGTH_BYTES (28) diff --git a/slsDetectorSoftware/CMakeLists.txt b/slsDetectorSoftware/CMakeLists.txt index 8130ed685..e61084330 100755 --- a/slsDetectorSoftware/CMakeLists.txt +++ b/slsDetectorSoftware/CMakeLists.txt @@ -4,10 +4,13 @@ set(SOURCES src/DetectorImpl.cpp src/Module.cpp src/Detector.cpp - src/CmdProxy.cpp + src/HelpDacs.cpp src/CmdParser.cpp src/Pattern.cpp src/CtbConfig.cpp + src/Caller.cpp + src/CallerSpecial.cpp + src/inferAction.cpp ) add_library(slsDetectorObject OBJECT @@ -76,27 +79,31 @@ endif() if(SLS_USE_TEXTCLIENT) - # Loop over list to generate command line binaries - set(bin_names "sls_detector_put" + set(det_bin_names "sls_detector_put" "sls_detector_get" - "sls_detector_acquire" - "sls_detector_acquire_zmq" - "sls_detector_help") - set(cmd_name "PUT" "GET" "READOUT" "READOUTZMQ" "HELP") - list(LENGTH bin_names len1) + "sls_detector_acquire" + "sls_detector_acquire_zmq" + "sls_detector_help" + "sls_detector" + ) + set(det_cmd_name "PUT" "GET" "READOUT" "READOUTZMQ" "HELP" "INFER") + list(LENGTH det_bin_names len1) math(EXPR len2 "${len1} - 1") foreach(val RANGE ${len2}) - list(GET bin_names ${val} val1) - list(GET cmd_name ${val} val2) + list(GET det_bin_names ${val} val1) + list(GET det_cmd_name ${val} val2) message(STATUS "${val1} ${val2}") - add_executable(${val1} src/CmdLineApp.cpp) + add_executable(${val1} src/CmdApp.cpp) + target_link_libraries(${val1} - slsDetectorStatic - pthread - rt + slsDetectorStatic + pthread + rt ) + SET_SOURCE_FILES_PROPERTIES( src/Caller.cpp PROPERTIES COMPILE_FLAGS "-Wno-unused-variable -Wno-unused-but-set-variable") + set_target_properties(${val1} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin COMPILE_DEFINITIONS ${val2}=1 @@ -105,7 +112,8 @@ if(SLS_USE_TEXTCLIENT) set_property(TARGET ${val1} PROPERTY INTERPROCEDURAL_OPTIMIZATION True) endif() endforeach() - install(TARGETS ${bin_names} DESTINATION bin) + install(TARGETS ${det_bin_names} DESTINATION bin) + endif(SLS_USE_TEXTCLIENT) diff --git a/slsDetectorSoftware/generator/Caller.in.cpp b/slsDetectorSoftware/generator/Caller.in.cpp new file mode 100644 index 000000000..4e7129cc7 --- /dev/null +++ b/slsDetectorSoftware/generator/Caller.in.cpp @@ -0,0 +1,10 @@ +#include "Caller.h" +#include "sls/logger.h" +#include "sls/string_utils.h" +#include + +namespace sls { + +// THIS COMMENT TO BE REPLACED BY THE ACTUAL CODE + +} \ No newline at end of file diff --git a/slsDetectorSoftware/generator/Caller.in.h b/slsDetectorSoftware/generator/Caller.in.h new file mode 100644 index 000000000..fafe99edd --- /dev/null +++ b/slsDetectorSoftware/generator/Caller.in.h @@ -0,0 +1,92 @@ +// This file is used as input to generate the caller class + +#include "CmdParser.h" +#include "HelpDacs.h" +#include "sls/Detector.h" + +#include +#include +#include +namespace sls { + +class Caller { + public: + Caller(Detector *ptr) : det(ptr) {} + void call(const std::string &command, + const std::vector &arguments, int detector_id, + int action, std::ostream &os = std::cout, int receiver_id = -1); + + IpAddr getDstIpFromAuto(); + IpAddr getSrcIpFromAuto(); + UdpDestination getUdpEntry(); + void GetLevelAndUpdateArgIndex(int action, + std::string levelSeparatedCommand, + int &level, int &iArg, size_t nGetArgs, + size_t nPutArgs); + void WrongNumberOfParameters(size_t expected); + + template std::string OutStringHex(const V &value) { + if (value.equal()) + return ToStringHex(value.front()); + return ToStringHex(value); + } + + template std::string OutStringHex(const V &value, int width) { + if (value.equal()) + return ToStringHex(value.front(), width); + return ToStringHex(value, width); + } + + template std::string OutString(const Result &value) { + if (value.equal()) + return ToString(value.front()); + return ToString(value); + } + + template std::string OutString(const V &value) { + return ToString(value); + } + + template + std::string OutString(const V &value, const std::string &unit) { + if (value.equal()) + return ToString(value.front(), unit); + return ToString(value, unit); + } + + std::vector getAllCommands(); + std::map GetDeprecatedCommands(); + std::string list(int action); + + // THIS COMMENT TO BE REPLACED BY THE ACTUAL CODE (1) + + std::vector args; + std::string cmd; + Detector *det; + int det_id{-1}; + int rx_id{-1}; + + private: + bool ReplaceIfDeprecated(std::string &command); + using FunctionMap = std::map; + using StringMap = std::map; + Detector *ptr; // pointer to the detector that executes the command + + static void EmptyDataCallBack(detectorData *data, uint64_t frameIndex, + uint32_t subFrameIndex, void *this_pointer); + + FunctionMap functions{ + {"list", &Caller::list}, + + // THIS COMMENT TO BE REPLACED BY THE ACTUAL CODE (2) + + }; + + StringMap deprecated_functions{ + + // THIS COMMENT TO BE REPLACED BY THE ACTUAL CODE (3) + + }; +}; + +} // namespace sls \ No newline at end of file diff --git a/slsDetectorSoftware/generator/autocomplete/autocomplete.py b/slsDetectorSoftware/generator/autocomplete/autocomplete.py new file mode 100644 index 000000000..513c2fa47 --- /dev/null +++ b/slsDetectorSoftware/generator/autocomplete/autocomplete.py @@ -0,0 +1,236 @@ +import argparse +import json +from pathlib import Path + +# command to generate the ast +# clang version: 14.0.0-1ubuntu1.1 +# clang++ -Xclang -ast-dump=json -Xclang -ast-dump-filter -Xclang StringTo -c ToString.cpp -I ../include/ -std=gnu++11 +# +import yaml + +AUTOCOMPLETE_PATH = Path(__file__).parent +DUMP_PATH = AUTOCOMPLETE_PATH / 'dump.json' +FIXED_PATH = AUTOCOMPLETE_PATH / 'fixed.json' + +type_values = { + 'special::mv': ["mv", "mV"], + "special::deg": ["deg"], + "special::time_unit": ["s", "ms", "us", "ns"], + "special::hard": ["hard"], + "special::force-delete-normal-file": ["--force-delete-normal-file"], + "special::currentSourceFix": ["fix", "nofix"], + "special::currentSourceLow": ["normal", "low"], + "special::path": [], + "special::pedestal_parameters" : ["", "0"], + "special::validate": ["--validate"] +} + + +def get_types(arg_types): + ret = set() + for arg_type in arg_types: + if type_info(arg_type) == 'base': + if arg_type == 'bool': + ret = ret.union(["0", "1"]) + else: + tmp = [not_list for not_list in type_values[arg_type] if not isinstance(not_list, list)] + ret = ret.union(tmp) + + #Intercept the options and in case detector specific options appear replace the + #list of options with a command line call that fetches them + #TODO! Rename sls_detector_get + if "defs::dacIndex" in arg_types: + return "`sls_detector_get daclist | sed -e 's/.*\[\(.*\)\].*/\\1/' | sed 's/,//g'`" + elif "defs::detectorSettings" in arg_types: + return "`sls_detector_get settingslist | sed -e 's/.*\[\(.*\)\].*/\\1/' | sed 's/,//g'`" + elif "defs::timingMode" in arg_types: + return "`sls_detector_get timinglist | sed -e 's/.*\[\(.*\)\].*/\\1/' | sed 's/,//g'`" + + + return ret + + +def type_info(type_name): + if type_name.startswith('defs::') or type_name.startswith('slsDetectorDefs::'): + return 'enum' + if type_name.startswith('special::'): + return 'special' + return 'base' + + +def get_enum(function): + return function['type']['qualType'].split(' ')[0] + + +def get_literal(ifstmt): + stringliteral = [] + expression = ifstmt['inner'][0] + if expression['kind'] == 'BinaryOperator': + if expression['opcode'] == '!=': + return None, None + for cxxOperatorCall in expression['inner']: + if cxxOperatorCall['kind'] == 'CXXOperatorCallExpr': + implicitCastExpr = cxxOperatorCall['inner'][2] + stringliteral.append(implicitCastExpr['inner'][0]['value'][1:-1]) + else: + cxxOperatorCall = expression + implicitCastExpr = cxxOperatorCall['inner'][2] + stringliteral = implicitCastExpr['inner'][0]['value'][1:-1] + + retstmt = get_object_by_kind(ifstmt['inner'], 'ReturnStmt') + declrefexpt = get_object_by_kind(retstmt['inner'], 'DeclRefExpr') + enum_val = declrefexpt["referencedDecl"]["name"] + + return enum_val, stringliteral + + +def get_object_by_kind(inner, kind, position=1): + for obj in inner: + if obj['kind'] == kind: + position -= 1 + if position == 0: + return obj + return None + + +def generate_type_values(): + functions = json.loads(FIXED_PATH.read_text()) + for function in functions: + if function['kind'] != 'FunctionDecl' or function['name'] != 'StringTo': + continue + enum = get_enum(function) + + if not enum.startswith('defs::'): + continue + # if enum != 'defs::dacIndex': + # continue + if not function['loc']['file'].endswith('ToString.cpp'): + continue + + compound_stmt = get_object_by_kind(function['inner'], 'CompoundStmt') + + for ifstmt in compound_stmt['inner']: + if ifstmt['kind'] != 'IfStmt': + continue + enum_val, stringliteral = get_literal(ifstmt) + if enum_val is None: + continue + + if enum not in type_values or type_values[enum] is None: + type_values[enum] = [] + type_values[enum].append(stringliteral) + items = list(type_values.items()) + for key, val in items: + if key.startswith('defs::'): + new_key = key.split('::')[1] + new_key = 'slsDetectorDefs::' + new_key + type_values[new_key] = val + elif key.startswith('slsDetectorDefs::'): + new_key = key.split('::')[1] + new_key = 'defs::' + new_key + type_values[new_key] = val + + return json.dumps(type_values, indent=2) + + +def fix_json(): + with DUMP_PATH.open('r') as f: + tmp = '[\n' + for line in f.read().split('\n'): + if line.startswith('}'): + tmp += line + ',\n' + else: + tmp += line + '\n' + tmp = tmp[:-3] + '\n]' + with FIXED_PATH.open('w') as f: + f.write(tmp) + + +def generate_bash_autocomplete(output_path=Path(__file__).parent / 'bash_autocomplete.sh', input_path=Path(__file__).parent / 'bash_autocomplete.in.sh'): + generate_type_values() + output_file = output_path.open('w') + template_file = input_path.open('r') + + def writeline(line): + output_file.write(line + '\n') + + class if_block: + def __init__(self, condition): + self.condition = condition + + def __enter__(self): + output_file.write('if [[ ' + self.condition + ' ]]; then\n') + + def __exit__(self, type, value, traceback): + output_file.write('fi\n') + + class function: + def __init__(self, name): + self.name = name + + def __enter__(self): + output_file.write(self.name + '() {\n') + + def __exit__(self, type, value, traceback): + output_file.write('}\n') + + command_path = Path(__file__).parent.parent / 'extended_commands.yaml' + commands = yaml.unsafe_load(command_path.open('r')) + + for line in template_file: + if '-- THIS LINE WILL BE REPLACED WITH GENERATED CODE --' not in line: + output_file.write(line) + continue + writeline(f'local SLS_COMMANDS=" {" ".join(commands.keys())} "') + # generate functions + for command_name, command in commands.items(): + # added for debugging + if command_name == 'xxxexptime': + continue + with function('__' + command_name): + writeline('FCN_RETURN=""') + + actions = ['GET', 'PUT'] + for action in actions: + if action in command['actions'] and 'args' in command['actions'][action]: + args = command['actions'][action]['args'] + possible_argc = {} + for arg in args: + if arg['argc'] == 0: + pass + for i in range(arg['argc']): + if i + 1 not in possible_argc: + possible_argc[i + 1] = [] + possible_argc[i + 1].append(arg['arg_types'][i]) + if possible_argc: + with if_block(f'${{IS_GET}} -eq {"1" if action == "GET" else "0"}'): + for argc in possible_argc: + with if_block(f'"${{cword}}" == "{argc + 1}"'): + if "defs::detectorSettings" in possible_argc[argc]: + print(argc, command_name, possible_argc[argc]) + choices = get_types(possible_argc[argc]) + + #check if we got choices back or a bash command + if isinstance(choices, (list,set)): + writeline(f'FCN_RETURN="{" ".join(sorted(choices))}"') + else: + writeline(f'FCN_RETURN="{choices}"') + if 'special::path' in possible_argc[argc]: + writeline('IS_PATH=1') + + writeline('return 0') + + + + output_file.close() + + +if __name__ == '__main__': + parser = argparse.ArgumentParser(description='use parsed c++ code to generate autocomplete snippets') + parser.add_argument('-f', '--fix', action='store_true', help='fix the parsed ast to make it loadable') + # parser.add_argument('-p', '--path', type=str, help='output path to the fixed ast', default='ast.json') + args = parser.parse_known_args() + if args[0].fix: + fix_json() + ret = generate_type_values() + print(ret) diff --git a/slsDetectorSoftware/generator/autocomplete/bash_autocomplete.in.sh b/slsDetectorSoftware/generator/autocomplete/bash_autocomplete.in.sh new file mode 100644 index 000000000..d55b10c07 --- /dev/null +++ b/slsDetectorSoftware/generator/autocomplete/bash_autocomplete.in.sh @@ -0,0 +1,167 @@ +# GENERATED FILE - DO NOT EDIT +# ANY CHANGES TO THIS FILE WILL BE OVERWRITTEN + +_sd() { + + # Taken from https://github.com/scop/bash-completion/blob/15b74b1050333f425877a7cbd99af2998b95c476/bash_completion#L770C12-L770C12 + # Reassemble command line words, excluding specified characters from the + # list of word completion separators (COMP_WORDBREAKS). + # @param $1 chars Characters out of $COMP_WORDBREAKS which should + # NOT be considered word breaks. This is useful for things like scp where + # we want to return host:path and not only path, so we would pass the + # colon (:) as $1 here. + # @param $2 words Name of variable to return words to + # @param $3 cword Name of variable to return cword to + # + _comp__reassemble_words() +{ + local exclude="" i j line ref + # Exclude word separator characters? + if [[ $1 ]]; then + # Yes, exclude word separator characters; + # Exclude only those characters, which were really included + exclude="[${1//[^$COMP_WORDBREAKS]/}]" + fi + + # Default to cword unchanged + printf -v "$3" %s "$COMP_CWORD" + # Are characters excluded which were former included? + if [[ $exclude ]]; then + # Yes, list of word completion separators has shrunk; + line=$COMP_LINE + # Re-assemble words to complete + for ((i = 0, j = 0; i < ${#COMP_WORDS[@]}; i++, j++)); do + # Is current word not word 0 (the command itself) and is word not + # empty and is word made up of just word separator characters to + # be excluded and is current word not preceded by whitespace in + # original line? + while [[ $i -gt 0 && ${COMP_WORDS[i]} == +($exclude) ]]; do + # Is word separator not preceded by whitespace in original line + # and are we not going to append to word 0 (the command + # itself), then append to current word. + [[ $line != [[:blank:]]* ]] && ((j >= 2)) && ((j--)) + # Append word separator to current or new word + ref="$2[$j]" + printf -v "$ref" %s "${!ref-}${COMP_WORDS[i]}" + # Indicate new cword + ((i == COMP_CWORD)) && printf -v "$3" %s "$j" + # Remove optional whitespace + word separator from line copy + line=${line#*"${COMP_WORDS[i]}"} + # Indicate next word if available, else end *both* while and + # for loop + if ((i < ${#COMP_WORDS[@]} - 1)); then + ((i++)) + else + break 2 + fi + # Start new word if word separator in original line is + # followed by whitespace. + [[ $line == [[:blank:]]* ]] && ((j++)) + done + # Append word to current word + ref="$2[$j]" + printf -v "$ref" %s "${!ref-}${COMP_WORDS[i]}" + # Remove optional whitespace + word from line copy + line=${line#*"${COMP_WORDS[i]}"} + # Indicate new cword + ((i == COMP_CWORD)) && printf -v "$3" %s "$j" + done + ((i == COMP_CWORD)) && printf -v "$3" %s "$j" + else + # No, list of word completions separators hasn't changed; + for i in "${!COMP_WORDS[@]}"; do + printf -v "$2[i]" %s "${COMP_WORDS[i]}" + done + fi +} + + + local FCN_RETURN="" + local IS_PATH=0 + + + # -- THIS LINE WILL BE REPLACED WITH GENERATED CODE -- + + + COMPREPLY=() + local OPTIONS_NEW="" + + # check if bash or zsh + # _get_comp_words_by_ref is a bash built-in function, we check if it exists + declare -Ff _get_comp_words_by_ref > /dev/null && IS_BASH=1 || IS_BASH=0 + + + # bash interprets the colon character : as a special character and splits the argument in two + # different than what zsh does + # https://stackoverflow.com/a/3224910 + # https://stackoverflow.com/a/12495727 + local cur + local cword words=() + _comp__reassemble_words ":" words cword + cur=${words[cword]} + + # check the action (get or put) + case "${words[0]}" in + "sls_detector_get" | "g" | "detg") + local IS_GET=1 + ;; + *) + local IS_GET=0 + ;; + esac + + # if no command is written, autocomplete with the commands + if [[ ${cword} -eq 1 ]]; then +# local SLS_COMMANDS="trimbits exptime" + local SLS_COMMANDS_NEW="" + + case "$cur" in + [0-9]*:*) + local suggestions=($(compgen -W "${SLS_COMMANDS}" -- "${cur#*:}")) + COMPREPLY=( ${suggestions[*]} ) + ;; + [0-9]*) + COMPREPLY=() + ;; + *) + COMPREPLY=( $( compgen -W "$SLS_COMMANDS -h" -- "$cur" ) );; + + esac + return 0 + fi + + if [[ ${cword} -eq 2 ]] && [[ ${words[1]} == "-h" ]]; then + COMPREPLY=( $( compgen -W "$SLS_COMMANDS" -- "$cur" ) ) + return 0 + fi + + # if a command is written, autocomplete with the options + # call the function for the command + + if [[ "$SLS_COMMANDS" == *"${words[1]##*:}"* ]]; then + __"${words[1]##*:}" + fi + + # if IS_PATH is activated, autocomplete with the path + if [[ ${IS_PATH} -eq 1 ]]; then + COMPREPLY=($(compgen -f -- "${cur}")) + return 0 + fi + + # autocomplete with the options + COMPREPLY=($(compgen -W "${FCN_RETURN}" -- "${cur}")) + + + +} + +complete -F _sd -o filenames sls_detector_get +complete -F _sd -o filenames g +complete -F _sd -o filenames detg + +complete -F _sd -o filenames sls_detector_put +complete -F _sd -o filenames p +complete -F _sd -o filenames detp + +complete -F _sd -o filenames sls_detector +complete -F _sd -o filenames det diff --git a/slsDetectorSoftware/generator/autocomplete/bash_autocomplete.sh b/slsDetectorSoftware/generator/autocomplete/bash_autocomplete.sh new file mode 100644 index 000000000..2da4347ed --- /dev/null +++ b/slsDetectorSoftware/generator/autocomplete/bash_autocomplete.sh @@ -0,0 +1,3313 @@ +# GENERATED FILE - DO NOT EDIT +# ANY CHANGES TO THIS FILE WILL BE OVERWRITTEN + +_sd() { + + # Taken from https://github.com/scop/bash-completion/blob/15b74b1050333f425877a7cbd99af2998b95c476/bash_completion#L770C12-L770C12 + # Reassemble command line words, excluding specified characters from the + # list of word completion separators (COMP_WORDBREAKS). + # @param $1 chars Characters out of $COMP_WORDBREAKS which should + # NOT be considered word breaks. This is useful for things like scp where + # we want to return host:path and not only path, so we would pass the + # colon (:) as $1 here. + # @param $2 words Name of variable to return words to + # @param $3 cword Name of variable to return cword to + # + _comp__reassemble_words() +{ + local exclude="" i j line ref + # Exclude word separator characters? + if [[ $1 ]]; then + # Yes, exclude word separator characters; + # Exclude only those characters, which were really included + exclude="[${1//[^$COMP_WORDBREAKS]/}]" + fi + + # Default to cword unchanged + printf -v "$3" %s "$COMP_CWORD" + # Are characters excluded which were former included? + if [[ $exclude ]]; then + # Yes, list of word completion separators has shrunk; + line=$COMP_LINE + # Re-assemble words to complete + for ((i = 0, j = 0; i < ${#COMP_WORDS[@]}; i++, j++)); do + # Is current word not word 0 (the command itself) and is word not + # empty and is word made up of just word separator characters to + # be excluded and is current word not preceded by whitespace in + # original line? + while [[ $i -gt 0 && ${COMP_WORDS[i]} == +($exclude) ]]; do + # Is word separator not preceded by whitespace in original line + # and are we not going to append to word 0 (the command + # itself), then append to current word. + [[ $line != [[:blank:]]* ]] && ((j >= 2)) && ((j--)) + # Append word separator to current or new word + ref="$2[$j]" + printf -v "$ref" %s "${!ref-}${COMP_WORDS[i]}" + # Indicate new cword + ((i == COMP_CWORD)) && printf -v "$3" %s "$j" + # Remove optional whitespace + word separator from line copy + line=${line#*"${COMP_WORDS[i]}"} + # Indicate next word if available, else end *both* while and + # for loop + if ((i < ${#COMP_WORDS[@]} - 1)); then + ((i++)) + else + break 2 + fi + # Start new word if word separator in original line is + # followed by whitespace. + [[ $line == [[:blank:]]* ]] && ((j++)) + done + # Append word to current word + ref="$2[$j]" + printf -v "$ref" %s "${!ref-}${COMP_WORDS[i]}" + # Remove optional whitespace + word from line copy + line=${line#*"${COMP_WORDS[i]}"} + # Indicate new cword + ((i == COMP_CWORD)) && printf -v "$3" %s "$j" + done + ((i == COMP_CWORD)) && printf -v "$3" %s "$j" + else + # No, list of word completions separators hasn't changed; + for i in "${!COMP_WORDS[@]}"; do + printf -v "$2[i]" %s "${COMP_WORDS[i]}" + done + fi +} + + + local FCN_RETURN="" + 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 patternX 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 " +__acquire() { +FCN_RETURN="" +return 0 +} +__activate() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__adcclk() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__adcenable() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__adcenable10g() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__adcindex() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__adcinvert() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__adclist() { +FCN_RETURN="" +return 0 +} +__adcname() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__adcphase() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="deg" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="deg" +fi +fi +return 0 +} +__adcpipeline() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__adcreg() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__adcvpp() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="mV mv" +fi +fi +return 0 +} +__apulse() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__asamples() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__autocompdisable() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__badchannels() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__blockingtrigger() { +FCN_RETURN="" +return 0 +} +__burstmode() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="burst_external burst_internal cw_external cw_internal" +fi +fi +return 0 +} +__burstperiod() { +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="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="ms ns s us" +fi +fi +return 0 +} +__bursts() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__burstsl() { +FCN_RETURN="" +return 0 +} +__bustest() { +FCN_RETURN="" +return 0 +} +__cdsgain() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__chipversion() { +FCN_RETURN="" +return 0 +} +__clearbit() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="--validate" +fi +fi +return 0 +} +__clearbusy() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="--validate" +fi +fi +return 0 +} +__clearroi() { +FCN_RETURN="" +return 0 +} +__clientversion() { +FCN_RETURN="" +return 0 +} +__clkdiv() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__clkfreq() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__clkphase() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="deg" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="deg" +fi +fi +return 0 +} +__collectionmode() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="electron hole" +fi +fi +return 0 +} +__column() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__compdisabletime() { +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="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="ms ns s us" +fi +fi +return 0 +} +__confadc() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__config() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +IS_PATH=1 +fi +fi +return 0 +} +__configtransceiver() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +IS_PATH=1 +fi +fi +return 0 +} +__counters() { +FCN_RETURN="" +return 0 +} +__currentsource() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="fix nofix" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "5" ]]; then +FCN_RETURN="low normal" +fi +fi +return 0 +} +__dac() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="`sls_detector_get daclist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="mV mv" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="`sls_detector_get daclist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="mV mv" +fi +fi +return 0 +} +__dacindex() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__daclist() { +FCN_RETURN="" +return 0 +} +__dacname() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="`sls_detector_get daclist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="`sls_detector_get daclist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__dacvalues() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="mV mv" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="mV mv" +fi +fi +return 0 +} +__datastream() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="bottom left right top" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="bottom left right top" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__dbitclk() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__dbitphase() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="deg" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="deg" +fi +fi +return 0 +} +__dbitpipeline() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__defaultdac() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="`sls_detector_get daclist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="`sls_detector_get settingslist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="`sls_detector_get daclist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="`sls_detector_get settingslist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +fi +return 0 +} +__defaultpattern() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="`sls_detector_get daclist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="`sls_detector_get settingslist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +fi +return 0 +} +__delay() { +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="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="ms ns s us" +fi +fi +return 0 +} +__delayl() { +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 +} +__detectorserverversion() { +FCN_RETURN="" +return 0 +} +__detsize() { +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 +} +__diodelay() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__dpulse() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__dr() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__drlist() { +FCN_RETURN="" +return 0 +} +__dsamples() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__execcommand() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__exptime() { +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="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="ms ns s us" +fi +fi +return 0 +} +__exptime1() { +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="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="ms ns s us" +fi +fi +return 0 +} +__exptime2() { +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="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="ms ns s us" +fi +fi +return 0 +} +__exptime3() { +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="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="ms ns s us" +fi +fi +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() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__extsampling() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__extsamplingsrc() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__extsig() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="inversion_off inversion_on trigger_in_falling_edge trigger_in_rising_edge" +fi +fi +return 0 +} +__fformat() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="binary hdf5" +fi +fi +return 0 +} +__filtercells() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__filterresistor() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__findex() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__firmwaretest() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__firmwareversion() { +FCN_RETURN="" +return 0 +} +__fliprows() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__flowcontrol10g() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__fmaster() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__fname() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__foverwrite() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__fpath() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +IS_PATH=1 +fi +fi +return 0 +} +__framecounter() { +FCN_RETURN="" +return 0 +} +__frames() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__framesl() { +FCN_RETURN="" +return 0 +} +__frametime() { +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 +} +__free() { +FCN_RETURN="" +return 0 +} +__fwrite() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__gaincaps() { +FCN_RETURN="" +return 0 +} +__gainmode() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="dynamic fixg0 fixg1 fixg2 forceswitchg1 forceswitchg2" +fi +fi +return 0 +} +__gappixels() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__gatedelay() { +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="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="ms ns s us" +fi +fi +return 0 +} +__gatedelay1() { +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="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="ms ns s us" +fi +fi +return 0 +} +__gatedelay2() { +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="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="ms ns s us" +fi +fi +return 0 +} +__gatedelay3() { +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="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="ms ns s us" +fi +fi +return 0 +} +__gates() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__getbit() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__hardwareversion() { +FCN_RETURN="" +return 0 +} +__highvoltage() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__hostname() { +FCN_RETURN="" +return 0 +} +__im_a() { +FCN_RETURN="" +return 0 +} +__im_b() { +FCN_RETURN="" +return 0 +} +__im_c() { +FCN_RETURN="" +return 0 +} +__im_d() { +FCN_RETURN="" +return 0 +} +__im_io() { +FCN_RETURN="" +return 0 +} +__imagetest() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__initialchecks() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__inj_ch() { +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 +} +__interpolation() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__interruptsubframe() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__kernelversion() { +FCN_RETURN="" +return 0 +} +__lastclient() { +FCN_RETURN="" +return 0 +} +__led() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__lock() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__master() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__maxadcphaseshift() { +FCN_RETURN="" +return 0 +} +__maxclkphaseshift() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__maxdbitphaseshift() { +FCN_RETURN="" +return 0 +} +__measuredperiod() { +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 +} +__measuredsubperiod() { +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 +} +__moduleid() { +FCN_RETURN="" +return 0 +} +__nextframenumber() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__nmod() { +FCN_RETURN="" +return 0 +} +__numinterfaces() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__overflow() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__packageversion() { +FCN_RETURN="" +return 0 +} +__parallel() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__parameters() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +IS_PATH=1 +fi +fi +return 0 +} +__partialreset() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__patfname() { +FCN_RETURN="" +return 0 +} +__patioctrl() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__patlimits() { +FCN_RETURN="" +return 0 +} +__patloop() { +FCN_RETURN="" +return 0 +} +__patloop0() { +FCN_RETURN="" +return 0 +} +__patloop1() { +FCN_RETURN="" +return 0 +} +__patloop2() { +FCN_RETURN="" +return 0 +} +__patmask() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__patnloop() { +FCN_RETURN="" +return 0 +} +__patnloop0() { +FCN_RETURN="" +return 0 +} +__patnloop1() { +FCN_RETURN="" +return 0 +} +__patnloop2() { +FCN_RETURN="" +return 0 +} +__patsetbit() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__patternX() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__patternstart() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__patwait() { +FCN_RETURN="" +return 0 +} +__patwait0() { +FCN_RETURN="" +return 0 +} +__patwait1() { +FCN_RETURN="" +return 0 +} +__patwait2() { +FCN_RETURN="" +return 0 +} +__patwaittime() { +FCN_RETURN="" +return 0 +} +__patwaittime0() { +FCN_RETURN="" +return 0 +} +__patwaittime1() { +FCN_RETURN="" +return 0 +} +__patwaittime2() { +FCN_RETURN="" +return 0 +} +__patword() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__pedestalmode() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN=" 0" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__period() { +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="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="ms ns s us" +fi +fi +return 0 +} +__periodl() { +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 +} +__polarity() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="neg pos" +fi +fi +return 0 +} +__port() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__powerchip() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__powerindex() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__powerlist() { +FCN_RETURN="" +return 0 +} +__powername() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="`sls_detector_get daclist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="`sls_detector_get daclist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__powervalues() { +FCN_RETURN="" +return 0 +} +__programfpga() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +IS_PATH=1 +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="--force-delete-normal-file" +fi +fi +return 0 +} +__pulse() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +IS_PATH=1 +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="--force-delete-normal-file" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__pulsechip() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__pulsenmove() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__pumpprobe() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__quad() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__ratecorr() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__readnrows() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__readout() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__readoutspeed() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1 108 144 2 full_speed half_speed quarter_speed" +fi +fi +return 0 +} +__readoutspeedlist() { +FCN_RETURN="" +return 0 +} +__rebootcontroller() { +FCN_RETURN="" +return 0 +} +__reg() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="--validate" +fi +fi +return 0 +} +__resetdacs() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="--validate" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="hard" +fi +fi +return 0 +} +__resetfpga() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="hard" +fi +fi +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() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="analog analog_digital digital digital_transceiver transceiver" +fi +fi +return 0 +} +__row() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__runclk() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__runtime() { +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 +} +__rx_arping() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__rx_clearroi() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__rx_dbitlist() { +FCN_RETURN="" +return 0 +} +__rx_dbitoffset() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__rx_discardpolicy() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="discardempty discardpartial nodiscard" +fi +fi +return 0 +} +__rx_fifodepth() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__rx_frameindex() { +FCN_RETURN="" +return 0 +} +__rx_framescaught() { +FCN_RETURN="" +return 0 +} +__rx_framesperfile() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__rx_hostname() { +FCN_RETURN="" +return 0 +} +__rx_jsonaddheader() { +FCN_RETURN="" +return 0 +} +__rx_jsonpara() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__rx_lastclient() { +FCN_RETURN="" +return 0 +} +__rx_lock() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__rx_missingpackets() { +FCN_RETURN="" +return 0 +} +__rx_padding() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__rx_printconfig() { +FCN_RETURN="" +return 0 +} +__rx_realudpsocksize() { +FCN_RETURN="" +return 0 +} +__rx_roi() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "5" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__rx_silent() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__rx_start() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__rx_status() { +FCN_RETURN="" +return 0 +} +__rx_stop() { +FCN_RETURN="" +return 0 +} +__rx_tcpport() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__rx_threads() { +FCN_RETURN="" +return 0 +} +__rx_udpsocksize() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__rx_version() { +FCN_RETURN="" +return 0 +} +__rx_zmqfreq() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__rx_zmqhwm() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__rx_zmqip() { +FCN_RETURN="" +return 0 +} +__rx_zmqport() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__rx_zmqstartfnum() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__rx_zmqstream() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__samples() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__savepattern() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +IS_PATH=1 +fi +fi +return 0 +} +__scan() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="`sls_detector_get daclist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "5" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "6" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__scanerrmsg() { +FCN_RETURN="" +return 0 +} +__selinterface() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__serialnumber() { +FCN_RETURN="" +return 0 +} +__setbit() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="--validate" +fi +fi +return 0 +} +__settings() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="`sls_detector_get settingslist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +fi +return 0 +} +__settingslist() { +FCN_RETURN="" +return 0 +} +__settingspath() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +IS_PATH=1 +fi +fi +return 0 +} +__signalindex() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__signallist() { +FCN_RETURN="" +return 0 +} +__signalname() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__sleep() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="ms ns s us" +fi +fi +return 0 +} +__slowadc() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__slowadcindex() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__slowadclist() { +FCN_RETURN="" +return 0 +} +__slowadcname() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="`sls_detector_get daclist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="`sls_detector_get daclist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__slowadcvalues() { +FCN_RETURN="" +return 0 +} +__start() { +FCN_RETURN="" +return 0 +} +__status() { +FCN_RETURN="" +return 0 +} +__stop() { +FCN_RETURN="" +return 0 +} +__stopport() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__storagecell_delay() { +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="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="ms ns s us" +fi +fi +return 0 +} +__storagecell_start() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__subdeadtime() { +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="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="ms ns s us" +fi +fi +return 0 +} +__subexptime() { +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="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="ms ns s us" +fi +fi +return 0 +} +__sync() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__syncclk() { +FCN_RETURN="" +return 0 +} +__temp_10ge() { +FCN_RETURN="" +return 0 +} +__temp_adc() { +FCN_RETURN="" +return 0 +} +__temp_control() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__temp_dcdc() { +FCN_RETURN="" +return 0 +} +__temp_event() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__temp_fpga() { +FCN_RETURN="" +return 0 +} +__temp_fpgaext() { +FCN_RETURN="" +return 0 +} +__temp_fpgafl() { +FCN_RETURN="" +return 0 +} +__temp_fpgafr() { +FCN_RETURN="" +return 0 +} +__temp_slowadc() { +FCN_RETURN="" +return 0 +} +__temp_sodl() { +FCN_RETURN="" +return 0 +} +__temp_sodr() { +FCN_RETURN="" +return 0 +} +__temp_threshold() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__templist() { +FCN_RETURN="" +return 0 +} +__tempvalues() { +FCN_RETURN="" +return 0 +} +__tengiga() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__threshold() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="`sls_detector_get settingslist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "5" ]]; then +FCN_RETURN="`sls_detector_get settingslist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +fi +return 0 +} +__thresholdnotb() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="`sls_detector_get settingslist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "5" ]]; then +FCN_RETURN="`sls_detector_get settingslist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +fi +return 0 +} +__timing() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="`sls_detector_get timinglist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +fi +return 0 +} +__timing_info_decoder() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="shine swissfel" +fi +fi +return 0 +} +__timinglist() { +FCN_RETURN="" +return 0 +} +__timingsource() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="external internal" +fi +fi +return 0 +} +__top() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__transceiverenable() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__trigger() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__triggers() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__triggersl() { +FCN_RETURN="" +return 0 +} +__trimbits() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +IS_PATH=1 +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +IS_PATH=1 +fi +fi +return 0 +} +__trimen() { +FCN_RETURN="" +return 0 +} +__trimval() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__tsamples() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__txdelay() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__txdelay_frame() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__txdelay_left() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__txdelay_right() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__type() { +FCN_RETURN="" +return 0 +} +__udp_cleardst() { +FCN_RETURN="" +return 0 +} +__udp_dstip() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__udp_dstip2() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__udp_dstlist() { +FCN_RETURN="" +return 0 +} +__udp_dstmac() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__udp_dstmac2() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__udp_dstport() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__udp_dstport2() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__udp_firstdst() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__udp_numdst() { +FCN_RETURN="" +return 0 +} +__udp_reconfigure() { +FCN_RETURN="" +return 0 +} +__udp_srcip() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__udp_srcip2() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__udp_srcmac() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__udp_srcmac2() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__udp_validate() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__update() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +IS_PATH=1 +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +IS_PATH=1 +fi +fi +return 0 +} +__updatedetectorserver() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +IS_PATH=1 +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +IS_PATH=1 +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +IS_PATH=1 +fi +fi +return 0 +} +__updatekernel() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +IS_PATH=1 +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +IS_PATH=1 +fi +fi +return 0 +} +__updatemode() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__user() { +FCN_RETURN="" +return 0 +} +__v_a() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__v_b() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__v_c() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__v_chip() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__v_d() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__v_io() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__v_limit() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__vchip_comp_adc() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__vchip_comp_fe() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__vchip_cs() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__vchip_opa_1st() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__vchip_opa_fd() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__vchip_ref_comp_fe() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__versions() { +FCN_RETURN="" +return 0 +} +__veto() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__vetoalg() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="10gbe lll none" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="hits raw" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="10gbe lll none" +fi +fi +return 0 +} +__vetofile() { +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 +} +__vetophoton() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "5" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__vetoref() { +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 +} +__vetostream() { +FCN_RETURN="" +return 0 +} +__virtual() { +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 +} +__vm_a() { +FCN_RETURN="" +return 0 +} +__vm_b() { +FCN_RETURN="" +return 0 +} +__vm_c() { +FCN_RETURN="" +return 0 +} +__vm_d() { +FCN_RETURN="" +return 0 +} +__vm_io() { +FCN_RETURN="" +return 0 +} +__zmqhwm() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__zmqip() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__zmqport() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} + + + COMPREPLY=() + local OPTIONS_NEW="" + + # check if bash or zsh + # _get_comp_words_by_ref is a bash built-in function, we check if it exists + declare -Ff _get_comp_words_by_ref > /dev/null && IS_BASH=1 || IS_BASH=0 + + + # bash interprets the colon character : as a special character and splits the argument in two + # different than what zsh does + # https://stackoverflow.com/a/3224910 + # https://stackoverflow.com/a/12495727 + local cur + local cword words=() + _comp__reassemble_words ":" words cword + cur=${words[cword]} + + # check the action (get or put) + case "${words[0]}" in + "sls_detector_get" | "g" | "detg") + local IS_GET=1 + ;; + *) + local IS_GET=0 + ;; + esac + + # if no command is written, autocomplete with the commands + if [[ ${cword} -eq 1 ]]; then +# local SLS_COMMANDS="trimbits exptime" + local SLS_COMMANDS_NEW="" + + case "$cur" in + [0-9]*:*) + local suggestions=($(compgen -W "${SLS_COMMANDS}" -- "${cur#*:}")) + COMPREPLY=( ${suggestions[*]} ) + ;; + [0-9]*) + COMPREPLY=() + ;; + *) + COMPREPLY=( $( compgen -W "$SLS_COMMANDS -h" -- "$cur" ) );; + + esac + return 0 + fi + + if [[ ${cword} -eq 2 ]] && [[ ${words[1]} == "-h" ]]; then + COMPREPLY=( $( compgen -W "$SLS_COMMANDS" -- "$cur" ) ) + return 0 + fi + + # if a command is written, autocomplete with the options + # call the function for the command + + if [[ "$SLS_COMMANDS" == *"${words[1]##*:}"* ]]; then + __"${words[1]##*:}" + fi + + # if IS_PATH is activated, autocomplete with the path + if [[ ${IS_PATH} -eq 1 ]]; then + COMPREPLY=($(compgen -f -- "${cur}")) + return 0 + fi + + # autocomplete with the options + COMPREPLY=($(compgen -W "${FCN_RETURN}" -- "${cur}")) + + + +} + +complete -F _sd -o filenames sls_detector_get +complete -F _sd -o filenames g +complete -F _sd -o filenames detg + +complete -F _sd -o filenames sls_detector_put +complete -F _sd -o filenames p +complete -F _sd -o filenames detp + +complete -F _sd -o filenames sls_detector +complete -F _sd -o filenames det diff --git a/slsDetectorSoftware/generator/autocomplete/dump.json b/slsDetectorSoftware/generator/autocomplete/dump.json new file mode 100644 index 000000000..278859f6a --- /dev/null +++ b/slsDetectorSoftware/generator/autocomplete/dump.json @@ -0,0 +1,68283 @@ +{ + "id": "0x2d33fd20", + "kind": "FunctionTemplateDecl", + "loc": { + "offset": 8829, + "file": "../include/sls/ToString.h", + "line": 276, + "col": 3, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 8805, + "line": 275, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9670, + "line": 298, + "col": 1, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "StringTo", + "inner": [ + { + "id": "0x2d33f9b8", + "kind": "TemplateTypeParmDecl", + "loc": { + "offset": 8824, + "line": 275, + "col": 20, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 8815, + "col": 11, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 8824, + "col": 20, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "isReferenced": true, + "name": "T", + "tagUsed": "typename", + "depth": 0, + "index": 0 + }, + { + "id": "0x2d33fc78", + "kind": "FunctionDecl", + "loc": { + "offset": 8829, + "line": 276, + "col": 3, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 8827, + "col": 1, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9670, + "line": 298, + "col": 1, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "StringTo", + "type": { + "qualType": "T (const std::string &, const std::string &)" + }, + "inner": [ + { + "id": "0x2d33faa8", + "kind": "ParmVarDecl", + "loc": { + "offset": 8857, + "line": 276, + "col": 31, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 8838, + "col": 12, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 8857, + "col": 31, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "isReferenced": true, + "name": "t", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x2d33fb68", + "kind": "ParmVarDecl", + "loc": { + "offset": 8879, + "col": 53, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 8860, + "col": 34, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 8879, + "col": 53, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "isReferenced": true, + "name": "unit", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x2d374e28", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 8885, + "col": 59, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9670, + "line": 298, + "col": 1, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d33ff58", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 8891, + "line": 277, + "col": 5, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 8905, + "col": 19, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d33fe18", + "kind": "VarDecl", + "loc": { + "offset": 8898, + "col": 12, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 8891, + "col": 5, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 8904, + "col": 18, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "isReferenced": true, + "name": "tval", + "type": { + "qualType": "double" + }, + "init": "list", + "inner": [ + { + "id": "0x2d33fef8", + "kind": "InitListExpr", + "range": { + "begin": { + "offset": 8902, + "col": 16, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 8904, + "col": 18, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "double" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d33ff38", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 8903, + "col": 17, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 8903, + "col": 17, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "double" + }, + "valueCategory": "prvalue", + "castKind": "IntegralToFloating", + "inner": [ + { + "id": "0x2d33fe80", + "kind": "IntegerLiteral", + "range": { + "begin": { + "offset": 8903, + "col": 17, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 8903, + "col": 17, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "value": "0" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x2d3404a8", + "kind": "CXXTryStmt", + "range": { + "begin": { + "offset": 8911, + "line": 278, + "col": 5, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9061, + "line": 282, + "col": 5, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d340130", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 8915, + "line": 278, + "col": 9, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 8950, + "line": 280, + "col": 5, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d340110", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 8925, + "line": 279, + "col": 9, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 8943, + "col": 27, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "double" + }, + "valueCategory": "lvalue", + "opcode": "=", + "inner": [ + { + "id": "0x2d33ff70", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 8925, + "col": 9, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 8925, + "col": 9, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "double" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d33fe18", + "kind": "VarDecl", + "name": "tval", + "type": { + "qualType": "double" + } + } + }, + { + "id": "0x2d3400c0", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 8932, + "col": 16, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 8943, + "col": 27, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "double" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d3400a8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 8932, + "col": 16, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 8937, + "col": 21, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "double (*)(const string &, size_t *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x2d340020", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 8932, + "col": 16, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 8937, + "col": 21, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "double (const string &, size_t *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2c8d75c0", + "kind": "FunctionDecl", + "name": "stod", + "type": { + "qualType": "double (const string &, size_t *)" + } + } + } + ] + }, + { + "id": "0x2d340000", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 8942, + "col": 26, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 8942, + "col": 26, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d33faa8", + "kind": "ParmVarDecl", + "name": "t", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x2d3400f0", + "kind": "CXXDefaultArgExpr", + "range": { + "begin": {}, + "end": {} + }, + "type": { + "qualType": "size_t *" + }, + "valueCategory": "prvalue" + } + ] + } + ] + } + ] + }, + { + "id": "0x2d340488", + "kind": "CXXCatchStmt", + "range": { + "begin": { + "offset": 8952, + "line": 280, + "col": 7, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9061, + "line": 282, + "col": 5, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d340200", + "kind": "VarDecl", + "loc": { + "offset": 8988, + "line": 280, + "col": 43, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 8959, + "col": 14, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 8988, + "col": 43, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "e", + "type": { + "qualType": "const std::invalid_argument &" + } + }, + { + "id": "0x2d340470", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 8991, + "col": 46, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9061, + "line": 282, + "col": 5, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d340458", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 9001, + "line": 281, + "col": 9, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9054, + "col": 62, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x2d340440", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 9001, + "col": 9, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9054, + "col": 62, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d340410", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 9007, + "col": 15, + "tokLen": 12, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9054, + "col": 62, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x2d3403f8", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 9007, + "col": 15, + "tokLen": 12, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9054, + "col": 62, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x2d3403d0", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 9007, + "col": 15, + "tokLen": 12, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9054, + "col": 62, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c968a58", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const char *)" + } + }, + "inner": [ + { + "id": "0x2d3403b0", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 9007, + "col": 15, + "tokLen": 12, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9054, + "col": 62, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x2d3403a8", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x2d340378", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 9007, + "col": 15, + "tokLen": 12, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9054, + "col": 62, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const char *)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x2d340330", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 9020, + "col": 28, + "tokLen": 34, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9020, + "col": 28, + "tokLen": 34, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x2d3402f8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 9020, + "col": 28, + "tokLen": 34, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9020, + "col": 28, + "tokLen": 34, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "const char[33]" + }, + "valueCategory": "lvalue", + "value": "\"Could not convert string to time\"" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x2d340580", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 9068, + "line": 284, + "col": 5, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9095, + "col": 32, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d3404d8", + "kind": "UsingDecl", + "loc": { + "offset": 9087, + "col": 24, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 9068, + "col": 5, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9087, + "col": 24, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "std::chrono::duration" + } + ] + }, + { + "id": "0x2d340650", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 9101, + "line": 285, + "col": 5, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9133, + "col": 37, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d3405a8", + "kind": "UsingDecl", + "loc": { + "offset": 9120, + "col": 24, + "tokLen": 13, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 9101, + "col": 5, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9120, + "col": 24, + "tokLen": 13, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "std::chrono::duration_cast" + } + ] + }, + { + "id": "0x2d374df8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 9139, + "line": 286, + "col": 5, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9668, + "line": 297, + "col": 5, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "hasElse": true, + "inner": [ + { + "id": "0x2d3418c8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 9143, + "line": 286, + "col": 9, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9151, + "col": 17, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x2d3418b0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 9148, + "col": 14, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9148, + "col": 14, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x2d341890", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 9148, + "col": 14, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9148, + "col": 14, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x2d340668", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 9143, + "col": 9, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9143, + "col": 9, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d33fb68", + "kind": "ParmVarDecl", + "name": "unit", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x2d341878", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 9151, + "col": 17, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9151, + "col": 17, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x2d340688", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 9151, + "col": 17, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9151, + "col": 17, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "const char[3]" + }, + "valueCategory": "lvalue", + "value": "\"ns\"" + } + ] + } + ] + }, + { + "id": "0x2d355c50", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 9157, + "col": 23, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9231, + "line": 288, + "col": 5, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d355c40", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 9167, + "line": 287, + "col": 9, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9224, + "col": 66, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d355c18", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 9174, + "col": 16, + "tokLen": 13, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9224, + "col": 66, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d341910", + "kind": "UnresolvedLookupExpr", + "range": { + "begin": { + "offset": 9174, + "col": 16, + "tokLen": 13, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9189, + "col": 31, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "lvalue", + "usesADL": true, + "name": "duration_cast", + "lookups": [ + { + "id": "0x2d340600", + "kind": "UsingShadowDecl", + "name": "duration_cast" + } + ] + }, + { + "id": "0x2d355bf0", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 9191, + "col": 33, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9223, + "col": 65, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "std::chrono::duration>", + "qualType": "duration" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2d355898", + "kind": "CXXConstructorDecl", + "name": "duration", + "type": { + "qualType": "void (const double &)" + } + }, + "inner": [ + { + "id": "0x2d355bc0", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 9191, + "col": 33, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9223, + "col": 65, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "std::chrono::duration>", + "qualType": "duration" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const double &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x2d3559f0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 9219, + "col": 61, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9219, + "col": 61, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const double", + "qualType": "const double" + }, + "valueCategory": "lvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x2d341be0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 9219, + "col": 61, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9219, + "col": 61, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "double" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d33fe18", + "kind": "VarDecl", + "name": "tval", + "type": { + "qualType": "double" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x2d374dc8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 9238, + "line": 288, + "col": 12, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9668, + "line": 297, + "col": 5, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "hasElse": true, + "inner": [ + { + "id": "0x2d356ec8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 9242, + "line": 288, + "col": 16, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9250, + "col": 24, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x2d356eb0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 9247, + "col": 21, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9247, + "col": 21, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x2d356e90", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 9247, + "col": 21, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9247, + "col": 21, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x2d355c68", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 9242, + "col": 16, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9242, + "col": 16, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d33fb68", + "kind": "ParmVarDecl", + "name": "unit", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x2d356e78", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 9250, + "col": 24, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9250, + "col": 24, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x2d355c88", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 9250, + "col": 24, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9250, + "col": 24, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "const char[3]" + }, + "valueCategory": "lvalue", + "value": "\"us\"" + } + ] + } + ] + }, + { + "id": "0x2d360050", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 9256, + "col": 30, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9331, + "line": 290, + "col": 5, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d360040", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 9266, + "line": 289, + "col": 9, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9324, + "col": 67, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d360018", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 9273, + "col": 16, + "tokLen": 13, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9324, + "col": 67, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d356f10", + "kind": "UnresolvedLookupExpr", + "range": { + "begin": { + "offset": 9273, + "col": 16, + "tokLen": 13, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9288, + "col": 31, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "lvalue", + "usesADL": true, + "name": "duration_cast", + "lookups": [ + { + "id": "0x2d340600", + "kind": "UsingShadowDecl", + "name": "duration_cast" + } + ] + }, + { + "id": "0x2d35fff0", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 9290, + "col": 33, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9323, + "col": 66, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "std::chrono::duration>", + "qualType": "duration" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2d35fc98", + "kind": "CXXConstructorDecl", + "name": "duration", + "type": { + "qualType": "void (const double &)" + } + }, + "inner": [ + { + "id": "0x2d35ffc0", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 9290, + "col": 33, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9323, + "col": 66, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "std::chrono::duration>", + "qualType": "duration" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const double &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x2d35fdf0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 9319, + "col": 62, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9319, + "col": 62, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const double", + "qualType": "const double" + }, + "valueCategory": "lvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x2d3571e0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 9319, + "col": 62, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9319, + "col": 62, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "double" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d33fe18", + "kind": "VarDecl", + "name": "tval", + "type": { + "qualType": "double" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x2d374d98", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 9338, + "line": 290, + "col": 12, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9668, + "line": 297, + "col": 5, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "hasElse": true, + "inner": [ + { + "id": "0x2d3612c8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 9342, + "line": 290, + "col": 16, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9350, + "col": 24, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x2d3612b0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 9347, + "col": 21, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9347, + "col": 21, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x2d361290", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 9347, + "col": 21, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9347, + "col": 21, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x2d360068", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 9342, + "col": 16, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9342, + "col": 16, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d33fb68", + "kind": "ParmVarDecl", + "name": "unit", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x2d361278", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 9350, + "col": 24, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9350, + "col": 24, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x2d360088", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 9350, + "col": 24, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9350, + "col": 24, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "const char[3]" + }, + "valueCategory": "lvalue", + "value": "\"ms\"" + } + ] + } + ] + }, + { + "id": "0x2d36a4b0", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 9356, + "col": 30, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9431, + "line": 292, + "col": 5, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d36a4a0", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 9366, + "line": 291, + "col": 9, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9424, + "col": 67, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d36a478", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 9373, + "col": 16, + "tokLen": 13, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9424, + "col": 67, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d361310", + "kind": "UnresolvedLookupExpr", + "range": { + "begin": { + "offset": 9373, + "col": 16, + "tokLen": 13, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9388, + "col": 31, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "lvalue", + "usesADL": true, + "name": "duration_cast", + "lookups": [ + { + "id": "0x2d340600", + "kind": "UsingShadowDecl", + "name": "duration_cast" + } + ] + }, + { + "id": "0x2d36a450", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 9390, + "col": 33, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9423, + "col": 66, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "std::chrono::duration>", + "qualType": "duration" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2d36a0f8", + "kind": "CXXConstructorDecl", + "name": "duration", + "type": { + "qualType": "void (const double &)" + } + }, + "inner": [ + { + "id": "0x2d36a420", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 9390, + "col": 33, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9423, + "col": 66, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "std::chrono::duration>", + "qualType": "duration" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const double &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x2d36a250", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 9419, + "col": 62, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9419, + "col": 62, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const double", + "qualType": "const double" + }, + "valueCategory": "lvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x2d3615e0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 9419, + "col": 62, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9419, + "col": 62, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "double" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d33fe18", + "kind": "VarDecl", + "name": "tval", + "type": { + "qualType": "double" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x2d374d68", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 9438, + "line": 292, + "col": 12, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9668, + "line": 297, + "col": 5, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "hasElse": true, + "inner": [ + { + "id": "0x2d36b7f8", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 9442, + "line": 292, + "col": 16, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9468, + "col": 42, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x2d36b728", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 9442, + "col": 16, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9450, + "col": 24, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x2d36b710", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 9447, + "col": 21, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9447, + "col": 21, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x2d36b6f0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 9447, + "col": 21, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9447, + "col": 21, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x2d36a4c8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 9442, + "col": 16, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9442, + "col": 16, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d33fb68", + "kind": "ParmVarDecl", + "name": "unit", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x2d36b6d8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 9450, + "col": 24, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9450, + "col": 24, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x2d36a4e8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 9450, + "col": 24, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9450, + "col": 24, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "const char[2]" + }, + "valueCategory": "lvalue", + "value": "\"s\"" + } + ] + } + ] + }, + { + "id": "0x2d36b7b0", + "kind": "CXXMemberCallExpr", + "range": { + "begin": { + "offset": 9457, + "col": 31, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9468, + "col": 42, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d36b780", + "kind": "MemberExpr", + "range": { + "begin": { + "offset": 9457, + "col": 31, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9462, + "col": 36, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "name": "empty", + "isArrow": false, + "referencedMemberDecl": "0x2c8bc688", + "inner": [ + { + "id": "0x2d36b760", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 9457, + "col": 31, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9457, + "col": 31, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d33fb68", + "kind": "ParmVarDecl", + "name": "unit", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + }, + { + "id": "0x2d374b80", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 9471, + "col": 45, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9547, + "line": 294, + "col": 5, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d374b70", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 9481, + "line": 293, + "col": 9, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9540, + "col": 68, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d374b48", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 9488, + "col": 16, + "tokLen": 13, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9540, + "col": 68, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d36b828", + "kind": "UnresolvedLookupExpr", + "range": { + "begin": { + "offset": 9488, + "col": 16, + "tokLen": 13, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9503, + "col": 31, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "lvalue", + "usesADL": true, + "name": "duration_cast", + "lookups": [ + { + "id": "0x2d340600", + "kind": "UsingShadowDecl", + "name": "duration_cast" + } + ] + }, + { + "id": "0x2d374b20", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 9505, + "col": 33, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9539, + "col": 67, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "std::chrono::duration", + "qualType": "std::chrono::duration" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2d3747c8", + "kind": "CXXConstructorDecl", + "name": "duration", + "type": { + "qualType": "void (const double &)" + } + }, + "inner": [ + { + "id": "0x2d374af0", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 9505, + "col": 33, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9539, + "col": 67, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "std::chrono::duration", + "qualType": "std::chrono::duration" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const double &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x2d374920", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 9535, + "col": 63, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9535, + "col": 63, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const double", + "qualType": "const double" + }, + "valueCategory": "lvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x2d36bad0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 9535, + "col": 63, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9535, + "col": 63, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "double" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d33fe18", + "kind": "VarDecl", + "name": "tval", + "type": { + "qualType": "double" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x2d374d50", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 9554, + "line": 294, + "col": 12, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9668, + "line": 297, + "col": 5, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d374d38", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 9564, + "line": 295, + "col": 9, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9661, + "line": 296, + "col": 78, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x2d374d20", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 9564, + "line": 295, + "col": 9, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9661, + "line": 296, + "col": 78, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d374cf0", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 9570, + "line": 295, + "col": 15, + "tokLen": 12, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9661, + "line": 296, + "col": 78, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x2d374cd8", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 9570, + "line": 295, + "col": 15, + "tokLen": 12, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9661, + "line": 296, + "col": 78, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x2d374cb0", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 9570, + "line": 295, + "col": 15, + "tokLen": 12, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9661, + "line": 296, + "col": 78, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c968a58", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const char *)" + } + }, + "inner": [ + { + "id": "0x2d374c90", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 9570, + "line": 295, + "col": 15, + "tokLen": 12, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9661, + "line": 296, + "col": 78, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x2d374c88", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x2d374c58", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 9570, + "line": 295, + "col": 15, + "tokLen": 12, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9661, + "line": 296, + "col": 78, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const char *)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x2d374c40", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 9596, + "col": 13, + "tokLen": 65, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9596, + "col": 13, + "tokLen": 65, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x2d374be8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 9596, + "col": 13, + "tokLen": 65, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9596, + "col": 13, + "tokLen": 65, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "const char[64]" + }, + "valueCategory": "lvalue", + "value": "\"Invalid unit in conversion from string to std::chrono::duration\"" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +} +{ + "id": "0x2d3750e0", + "kind": "FunctionTemplateDecl", + "loc": { + "offset": 9697, + "file": "../include/sls/ToString.h", + "line": 300, + "col": 25, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 9673, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9822, + "line": 304, + "col": 1, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "StringTo", + "inner": [ + { + "id": "0x2d374e60", + "kind": "TemplateTypeParmDecl", + "loc": { + "offset": 9692, + "line": 300, + "col": 20, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 9683, + "col": 11, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9692, + "col": 20, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "isReferenced": true, + "name": "T", + "tagUsed": "typename", + "depth": 0, + "index": 0 + }, + { + "id": "0x2d375038", + "kind": "FunctionDecl", + "loc": { + "offset": 9697, + "col": 25, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 9695, + "col": 23, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9822, + "line": 304, + "col": 1, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "StringTo", + "type": { + "qualType": "T (const std::string &)" + }, + "inner": [ + { + "id": "0x2d374f48", + "kind": "ParmVarDecl", + "loc": { + "offset": 9725, + "line": 300, + "col": 53, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 9706, + "col": 34, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9725, + "col": 53, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "isReferenced": true, + "name": "t", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x2d375810", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 9728, + "col": 56, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9822, + "line": 304, + "col": 1, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d375340", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 9734, + "line": 301, + "col": 5, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9752, + "col": 23, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d375210", + "kind": "VarDecl", + "loc": { + "offset": 9746, + "col": 17, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 9734, + "col": 5, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9751, + "col": 22, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "isReferenced": true, + "name": "tmp", + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "init": "list", + "inner": [ + { + "id": "0x2d375310", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 9746, + "col": 17, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9751, + "col": 22, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const basic_string &)" + }, + "list": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x2d375278", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 9750, + "col": 21, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9750, + "col": 21, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d374f48", + "kind": "ParmVarDecl", + "name": "t", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + }, + { + "id": "0x2d3756d0", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 9758, + "line": 302, + "col": 5, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9785, + "col": 32, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d375398", + "kind": "VarDecl", + "loc": { + "offset": 9763, + "col": 10, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 9758, + "col": 5, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9784, + "col": 31, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "isReferenced": true, + "name": "unit", + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "init": "c", + "inner": [ + { + "id": "0x2d3756b8", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 9770, + "col": 17, + "tokLen": 10, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9784, + "col": 31, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x2d375688", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 9770, + "col": 17, + "tokLen": 10, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9784, + "col": 31, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (basic_string &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x2d375640", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 9770, + "col": 17, + "tokLen": 10, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9784, + "col": 31, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x2d375530", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 9770, + "col": 17, + "tokLen": 10, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9784, + "col": 31, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "prvalue", + "temp": "0x2d375528", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x2d375500", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 9770, + "col": 17, + "tokLen": 10, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9784, + "col": 31, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d3754e8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 9770, + "col": 17, + "tokLen": 10, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9770, + "col": 17, + "tokLen": 10, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "std::string (*)(std::string &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x2d375468", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 9770, + "col": 17, + "tokLen": 10, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9770, + "col": 17, + "tokLen": 10, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "std::string (std::string &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce1e5b8", + "kind": "FunctionDecl", + "name": "RemoveUnit", + "type": { + "qualType": "std::string (std::string &)" + } + } + } + ] + }, + { + "id": "0x2d375448", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 9781, + "col": 28, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9781, + "col": 28, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d375210", + "kind": "VarDecl", + "name": "tmp", + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x2d375800", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 9791, + "line": 303, + "col": 5, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9819, + "col": 33, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d3757d0", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 9798, + "col": 12, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9819, + "col": 33, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d375710", + "kind": "UnresolvedLookupExpr", + "range": { + "begin": { + "offset": 9798, + "col": 12, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9808, + "col": 22, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "lvalue", + "usesADL": true, + "name": "StringTo", + "lookups": [ + { + "id": "0x2d3750e0", + "kind": "FunctionTemplateDecl", + "name": "StringTo" + }, + { + "id": "0x2d33fd20", + "kind": "FunctionTemplateDecl", + "name": "StringTo" + } + ] + }, + { + "id": "0x2d375790", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 9810, + "col": 24, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9810, + "col": 24, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d375210", + "kind": "VarDecl", + "name": "tmp", + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + } + } + }, + { + "id": "0x2d3757b0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 9815, + "col": 29, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9815, + "col": 29, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d375398", + "kind": "VarDecl", + "name": "unit", + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + } + } + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6e85d18", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::detectorType (const std::string &)" + } + }, + { + "id": "0x7f0da6e90148", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::detectorSettings (const std::string &)" + } + }, + { + "id": "0x7f0da6e67ba8", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::speedLevel (const std::string &)" + } + }, + { + "id": "0x7f0da6e71f68", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::timingMode (const std::string &)" + } + }, + { + "id": "0x7f0da6e37988", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::frameDiscardPolicy (const std::string &)" + } + }, + { + "id": "0x7f0da6e3bd78", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::fileFormat (const std::string &)" + } + }, + { + "id": "0x7f0da6e3ede8", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::externalSignalFlag (const std::string &)" + } + }, + { + "id": "0x7f0da6e444e8", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::readoutMode (const std::string &)" + } + }, + { + "id": "0x7f0da6e4af48", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::dacIndex (const std::string &)" + } + }, + { + "id": "0x7f0da6b961f8", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::burstMode (const std::string &)" + } + }, + { + "id": "0x7f0da6b9b8e8", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::timingSourceType (const std::string &)" + } + }, + { + "id": "0x7f0da6b5d9a8", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::M3_GainCaps (const std::string &)" + } + }, + { + "id": "0x7f0da6b656f8", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::portPosition (const std::string &)" + } + }, + { + "id": "0x7f0da6b6add8", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::streamingInterface (const std::string &)" + } + }, + { + "id": "0x7f0da6b6f8c8", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::vetoAlgorithm (const std::string &)" + } + }, + { + "id": "0x7f0da6b72938", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::gainMode (const std::string &)" + } + }, + { + "id": "0x7f0da6b7a688", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::polarity (const std::string &)" + } + }, + { + "id": "0x7f0da6b3c708", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::timingInfoDecoder (const std::string &)" + } + }, + { + "id": "0x7f0da6b3f7a8", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::collectionMode (const std::string &)" + } + }, + { + "id": "0x7f0da6b427f8", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "uint8_t (const std::string &)" + } + }, + { + "id": "0x7f0da6b44d88", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "uint16_t (const std::string &)" + } + }, + { + "id": "0x7f0da6b466b8", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "uint32_t (const std::string &)" + } + }, + { + "id": "0x7f0da6b46ed8", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "uint64_t (const std::string &)" + } + }, + { + "id": "0x7f0da6b47700", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "int (const std::string &)" + } + }, + { + "id": "0x7f0da6b47eb8", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "bool (const std::string &)" + } + }, + { + "id": "0x7f0da6b486c8", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "int64_t (const std::string &)" + } + } + ] +} +{ + "id": "0x2d3759e8", + "kind": "FunctionDecl", + "loc": { + "offset": 9856, + "file": "../include/sls/ToString.h", + "line": 306, + "col": 32, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 9825, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9885, + "col": 61, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d375c48", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs12detectorTypeEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::detectorType (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::detectorType" + }, + "inner": [ + { + "id": "0x2cd03d20", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::detectorType" + }, + "decl": { + "id": "0x2cd03c80", + "kind": "EnumDecl", + "name": "detectorType" + } + } + ] + }, + { + "id": "0x2d3758e0", + "kind": "ParmVarDecl", + "loc": { + "offset": 9884, + "col": 60, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 9865, + "col": 41, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9884, + "col": 60, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +} +{ + "id": "0x2d375f38", + "kind": "FunctionDecl", + "loc": { + "offset": 9923, + "file": "../include/sls/ToString.h", + "line": 307, + "col": 36, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 9888, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9952, + "col": 65, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d376198", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs16detectorSettingsEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::detectorSettings (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "inner": [ + { + "id": "0x2cdc0300", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "decl": { + "id": "0x2cdc0258", + "kind": "EnumDecl", + "name": "detectorSettings" + } + } + ] + }, + { + "id": "0x2d375e38", + "kind": "ParmVarDecl", + "loc": { + "offset": 9951, + "col": 64, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 9932, + "col": 45, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9951, + "col": 64, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +} +{ + "id": "0x2d376488", + "kind": "FunctionDecl", + "loc": { + "offset": 9984, + "file": "../include/sls/ToString.h", + "line": 308, + "col": 30, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 9955, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10013, + "col": 59, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d3766e8", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs10speedLevelEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::speedLevel (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::speedLevel" + }, + "inner": [ + { + "id": "0x2cdc0fb0", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::speedLevel" + }, + "decl": { + "id": "0x2cdc0f08", + "kind": "EnumDecl", + "name": "speedLevel" + } + } + ] + }, + { + "id": "0x2d376388", + "kind": "ParmVarDecl", + "loc": { + "offset": 10012, + "col": 58, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 9993, + "col": 39, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10012, + "col": 58, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +} +{ + "id": "0x2d3769d8", + "kind": "FunctionDecl", + "loc": { + "offset": 10045, + "file": "../include/sls/ToString.h", + "line": 309, + "col": 30, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10016, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10074, + "col": 59, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d376c38", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs10timingModeEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::timingMode (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::timingMode" + }, + "inner": [ + { + "id": "0x2cdbd770", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::timingMode" + }, + "decl": { + "id": "0x2cdbd6c8", + "kind": "EnumDecl", + "name": "timingMode" + } + } + ] + }, + { + "id": "0x2d3768d8", + "kind": "ParmVarDecl", + "loc": { + "offset": 10073, + "col": 58, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10054, + "col": 39, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10073, + "col": 58, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +} +{ + "id": "0x2d376f28", + "kind": "FunctionDecl", + "loc": { + "offset": 10114, + "file": "../include/sls/ToString.h", + "line": 310, + "col": 38, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10077, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10143, + "col": 67, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d377188", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs18frameDiscardPolicyEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::frameDiscardPolicy (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::frameDiscardPolicy" + }, + "inner": [ + { + "id": "0x2cdb87d0", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::frameDiscardPolicy" + }, + "decl": { + "id": "0x2cdb8730", + "kind": "EnumDecl", + "name": "frameDiscardPolicy" + } + } + ] + }, + { + "id": "0x2d376e28", + "kind": "ParmVarDecl", + "loc": { + "offset": 10142, + "col": 66, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10123, + "col": 47, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10142, + "col": 66, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +} +{ + "id": "0x2d377478", + "kind": "FunctionDecl", + "loc": { + "offset": 10175, + "file": "../include/sls/ToString.h", + "line": 311, + "col": 30, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10146, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10204, + "col": 59, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d3776d8", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs10fileFormatEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::fileFormat (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::fileFormat" + }, + "inner": [ + { + "id": "0x2cdbbda0", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::fileFormat" + }, + "decl": { + "id": "0x2cdbbd00", + "kind": "EnumDecl", + "name": "fileFormat" + } + } + ] + }, + { + "id": "0x2d377378", + "kind": "ParmVarDecl", + "loc": { + "offset": 10203, + "col": 58, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10184, + "col": 39, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10203, + "col": 58, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +} +{ + "id": "0x2d3779c8", + "kind": "FunctionDecl", + "loc": { + "offset": 10244, + "file": "../include/sls/ToString.h", + "line": 312, + "col": 38, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10207, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10273, + "col": 67, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d377c28", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs18externalSignalFlagEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::externalSignalFlag (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::externalSignalFlag" + }, + "inner": [ + { + "id": "0x2cdbd540", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::externalSignalFlag" + }, + "decl": { + "id": "0x2cdbd498", + "kind": "EnumDecl", + "name": "externalSignalFlag" + } + } + ] + }, + { + "id": "0x2d3778c8", + "kind": "ParmVarDecl", + "loc": { + "offset": 10272, + "col": 66, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10253, + "col": 47, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10272, + "col": 66, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +} +{ + "id": "0x2d377f18", + "kind": "FunctionDecl", + "loc": { + "offset": 10306, + "file": "../include/sls/ToString.h", + "line": 313, + "col": 31, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10276, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10335, + "col": 60, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d378178", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs11readoutModeEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::readoutMode (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::readoutMode" + }, + "inner": [ + { + "id": "0x2cdc0d30", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::readoutMode" + }, + "decl": { + "id": "0x2cdc0c88", + "kind": "EnumDecl", + "name": "readoutMode" + } + } + ] + }, + { + "id": "0x2d377e18", + "kind": "ParmVarDecl", + "loc": { + "offset": 10334, + "col": 59, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10315, + "col": 40, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10334, + "col": 59, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +} +{ + "id": "0x2d378468", + "kind": "FunctionDecl", + "loc": { + "offset": 10365, + "file": "../include/sls/ToString.h", + "line": 314, + "col": 28, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10338, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10394, + "col": 57, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d3786c8", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs8dacIndexEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::dacIndex (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "inner": [ + { + "id": "0x2cdbda40", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "decl": { + "id": "0x2cdbd998", + "kind": "EnumDecl", + "name": "dacIndex" + } + } + ] + }, + { + "id": "0x2d378368", + "kind": "ParmVarDecl", + "loc": { + "offset": 10393, + "col": 56, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10374, + "col": 37, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10393, + "col": 56, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +} +{ + "id": "0x2d3789b8", + "kind": "FunctionDecl", + "loc": { + "offset": 10425, + "file": "../include/sls/ToString.h", + "line": 315, + "col": 29, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10397, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10454, + "col": 58, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d378c18", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs9burstModeEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::burstMode (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::burstMode" + }, + "inner": [ + { + "id": "0x2cdc1230", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::burstMode" + }, + "decl": { + "id": "0x2cdc1188", + "kind": "EnumDecl", + "name": "burstMode" + } + } + ] + }, + { + "id": "0x2d3788b8", + "kind": "ParmVarDecl", + "loc": { + "offset": 10453, + "col": 57, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10434, + "col": 38, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10453, + "col": 57, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +} +{ + "id": "0x2d378f08", + "kind": "FunctionDecl", + "loc": { + "offset": 10492, + "file": "../include/sls/ToString.h", + "line": 316, + "col": 36, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10457, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10521, + "col": 65, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d379168", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs16timingSourceTypeEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::timingSourceType (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::timingSourceType" + }, + "inner": [ + { + "id": "0x2cdc14b0", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::timingSourceType" + }, + "decl": { + "id": "0x2cdc1408", + "kind": "EnumDecl", + "name": "timingSourceType" + } + } + ] + }, + { + "id": "0x2d378e08", + "kind": "ParmVarDecl", + "loc": { + "offset": 10520, + "col": 64, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10501, + "col": 45, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10520, + "col": 64, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +} +{ + "id": "0x2d379458", + "kind": "FunctionDecl", + "loc": { + "offset": 10554, + "file": "../include/sls/ToString.h", + "line": 317, + "col": 31, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10524, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10583, + "col": 60, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d3796b8", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs11M3_GainCapsEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::M3_GainCaps (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::M3_GainCaps" + }, + "inner": [ + { + "id": "0x2cdc1610", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::M3_GainCaps" + }, + "decl": { + "id": "0x2cdc1570", + "kind": "EnumDecl", + "name": "M3_GainCaps" + } + } + ] + }, + { + "id": "0x2d379358", + "kind": "ParmVarDecl", + "loc": { + "offset": 10582, + "col": 59, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10563, + "col": 40, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10582, + "col": 59, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +} +{ + "id": "0x2d3799a8", + "kind": "FunctionDecl", + "loc": { + "offset": 10617, + "file": "../include/sls/ToString.h", + "line": 318, + "col": 32, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10586, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10646, + "col": 61, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d379c08", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs12portPositionEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::portPosition (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::portPosition" + }, + "inner": [ + { + "id": "0x2cdc1c40", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::portPosition" + }, + "decl": { + "id": "0x2cdc1ba0", + "kind": "EnumDecl", + "name": "portPosition" + } + } + ] + }, + { + "id": "0x2d3798a8", + "kind": "ParmVarDecl", + "loc": { + "offset": 10645, + "col": 60, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10626, + "col": 41, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10645, + "col": 60, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +} +{ + "id": "0x2d379ef8", + "kind": "FunctionDecl", + "loc": { + "offset": 10686, + "file": "../include/sls/ToString.h", + "line": 319, + "col": 38, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10649, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10715, + "col": 67, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d37a158", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs18streamingInterfaceEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::streamingInterface (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::streamingInterface" + }, + "inner": [ + { + "id": "0x2cdc1fd0", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::streamingInterface" + }, + "decl": { + "id": "0x2cdc1f30", + "kind": "EnumDecl", + "name": "streamingInterface" + } + } + ] + }, + { + "id": "0x2d379df8", + "kind": "ParmVarDecl", + "loc": { + "offset": 10714, + "col": 66, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10695, + "col": 47, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10714, + "col": 66, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +} +{ + "id": "0x2d37a448", + "kind": "FunctionDecl", + "loc": { + "offset": 10750, + "file": "../include/sls/ToString.h", + "line": 320, + "col": 33, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10718, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10779, + "col": 62, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d37a6a8", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs13vetoAlgorithmEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::vetoAlgorithm (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::vetoAlgorithm" + }, + "inner": [ + { + "id": "0x2cdc2390", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::vetoAlgorithm" + }, + "decl": { + "id": "0x2cdc22f0", + "kind": "EnumDecl", + "name": "vetoAlgorithm" + } + } + ] + }, + { + "id": "0x2d37a348", + "kind": "ParmVarDecl", + "loc": { + "offset": 10778, + "col": 61, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10759, + "col": 42, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10778, + "col": 61, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +} +{ + "id": "0x2d37a998", + "kind": "FunctionDecl", + "loc": { + "offset": 10809, + "file": "../include/sls/ToString.h", + "line": 321, + "col": 28, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10782, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10838, + "col": 57, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d37abf8", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs8gainModeEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::gainMode (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::gainMode" + }, + "inner": [ + { + "id": "0x2cdc24f0", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::gainMode" + }, + "decl": { + "id": "0x2cdc2450", + "kind": "EnumDecl", + "name": "gainMode" + } + } + ] + }, + { + "id": "0x2d37a898", + "kind": "ParmVarDecl", + "loc": { + "offset": 10837, + "col": 56, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10818, + "col": 37, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10837, + "col": 56, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +} +{ + "id": "0x2d37aee8", + "kind": "FunctionDecl", + "loc": { + "offset": 10868, + "file": "../include/sls/ToString.h", + "line": 322, + "col": 28, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10841, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10897, + "col": 57, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d37b148", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs8polarityEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::polarity (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::polarity" + }, + "inner": [ + { + "id": "0x2cdc2790", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::polarity" + }, + "decl": { + "id": "0x2cdc26f0", + "kind": "EnumDecl", + "name": "polarity" + } + } + ] + }, + { + "id": "0x2d37ade8", + "kind": "ParmVarDecl", + "loc": { + "offset": 10896, + "col": 56, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10877, + "col": 37, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10896, + "col": 56, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +} +{ + "id": "0x2d37b438", + "kind": "FunctionDecl", + "loc": { + "offset": 10936, + "file": "../include/sls/ToString.h", + "line": 323, + "col": 37, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10900, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10965, + "col": 66, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d37b698", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs17timingInfoDecoderEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::timingInfoDecoder (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::timingInfoDecoder" + }, + "inner": [ + { + "id": "0x2cdc28f0", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::timingInfoDecoder" + }, + "decl": { + "id": "0x2cdc2850", + "kind": "EnumDecl", + "name": "timingInfoDecoder" + } + } + ] + }, + { + "id": "0x2d37b338", + "kind": "ParmVarDecl", + "loc": { + "offset": 10964, + "col": 65, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10945, + "col": 46, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10964, + "col": 65, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +} +{ + "id": "0x2d37b988", + "kind": "FunctionDecl", + "loc": { + "offset": 11001, + "file": "../include/sls/ToString.h", + "line": 324, + "col": 34, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10968, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11030, + "col": 63, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d37bbe8", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs14collectionModeEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::collectionMode (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::collectionMode" + }, + "inner": [ + { + "id": "0x2cdc2a50", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::collectionMode" + }, + "decl": { + "id": "0x2cdc29b0", + "kind": "EnumDecl", + "name": "collectionMode" + } + } + ] + }, + { + "id": "0x2d37b888", + "kind": "ParmVarDecl", + "loc": { + "offset": 11029, + "col": 62, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11010, + "col": 43, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11029, + "col": 62, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +} +{ + "id": "0x2d37be88", + "kind": "FunctionDecl", + "loc": { + "offset": 11054, + "file": "../include/sls/ToString.h", + "line": 326, + "col": 21, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11034, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11083, + "col": 50, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d37c0b8", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIhEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "uint8_t (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "unsigned char" + }, + "inner": [ + { + "id": "0x2bf08d50", + "kind": "BuiltinType", + "type": { + "qualType": "unsigned char" + } + } + ] + }, + { + "id": "0x2d37bd98", + "kind": "ParmVarDecl", + "loc": { + "offset": 11082, + "col": 49, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11063, + "col": 30, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11082, + "col": 49, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +} +{ + "id": "0x2d37c358", + "kind": "FunctionDecl", + "loc": { + "offset": 11107, + "file": "../include/sls/ToString.h", + "line": 327, + "col": 22, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11086, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11136, + "col": 51, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d37c588", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToItEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "uint16_t (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "unsigned short" + }, + "inner": [ + { + "id": "0x2bf08d70", + "kind": "BuiltinType", + "type": { + "qualType": "unsigned short" + } + } + ] + }, + { + "id": "0x2d37c268", + "kind": "ParmVarDecl", + "loc": { + "offset": 11135, + "col": 50, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11116, + "col": 31, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11135, + "col": 50, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +} +{ + "id": "0x2d37c828", + "kind": "FunctionDecl", + "loc": { + "offset": 11160, + "file": "../include/sls/ToString.h", + "line": 328, + "col": 22, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11139, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11189, + "col": 51, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d37ca58", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIjEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "uint32_t (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "unsigned int" + }, + "inner": [ + { + "id": "0x2bf08d90", + "kind": "BuiltinType", + "type": { + "qualType": "unsigned int" + } + } + ] + }, + { + "id": "0x2d37c738", + "kind": "ParmVarDecl", + "loc": { + "offset": 11188, + "col": 50, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11169, + "col": 31, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11188, + "col": 50, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +} +{ + "id": "0x2d37ccc8", + "kind": "FunctionDecl", + "loc": { + "offset": 11213, + "file": "../include/sls/ToString.h", + "line": 329, + "col": 22, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11192, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11242, + "col": 51, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d37cef8", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToImEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "uint64_t (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "unsigned long" + }, + "inner": [ + { + "id": "0x2bf08db0", + "kind": "BuiltinType", + "type": { + "qualType": "unsigned long" + } + } + ] + }, + { + "id": "0x2d37cc08", + "kind": "ParmVarDecl", + "loc": { + "offset": 11241, + "col": 50, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11222, + "col": 31, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11241, + "col": 50, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +} +{ + "id": "0x2d37d1a0", + "kind": "FunctionDecl", + "loc": { + "offset": 11261, + "file": "../include/sls/ToString.h", + "line": 330, + "col": 17, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11245, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11290, + "col": 46, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d37d3d8", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIiEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "int (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "int" + }, + "inner": [ + { + "id": "0x2bf08cf0", + "kind": "BuiltinType", + "type": { + "qualType": "int" + } + } + ] + }, + { + "id": "0x2d37d0a8", + "kind": "ParmVarDecl", + "loc": { + "offset": 11289, + "col": 45, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11270, + "col": 26, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11289, + "col": 45, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +} +{ + "id": "0x2d37d648", + "kind": "FunctionDecl", + "loc": { + "offset": 11310, + "file": "../include/sls/ToString.h", + "line": 331, + "col": 18, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11293, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11339, + "col": 47, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d37d878", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIbEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "bool (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "bool" + }, + "inner": [ + { + "id": "0x2bf08c70", + "kind": "BuiltinType", + "type": { + "qualType": "bool" + } + } + ] + }, + { + "id": "0x2d37d588", + "kind": "ParmVarDecl", + "loc": { + "offset": 11338, + "col": 46, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11319, + "col": 27, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11338, + "col": 46, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +} +{ + "id": "0x2d37db18", + "kind": "FunctionDecl", + "loc": { + "offset": 11362, + "file": "../include/sls/ToString.h", + "line": 332, + "col": 21, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11342, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11391, + "col": 50, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d37dd48", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIlEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "int64_t (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "long" + }, + "inner": [ + { + "id": "0x2bf08d10", + "kind": "BuiltinType", + "type": { + "qualType": "long" + } + } + ] + }, + { + "id": "0x2d37da28", + "kind": "ParmVarDecl", + "loc": { + "offset": 11390, + "col": 49, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11371, + "col": 30, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11390, + "col": 49, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +} +{ + "id": "0x2d37ec60", + "kind": "FunctionTemplateDecl", + "loc": { + "offset": 11628, + "file": "../include/sls/ToString.h", + "line": 342, + "col": 16, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11591, + "line": 341, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11838, + "line": 348, + "col": 1, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "StringTo", + "inner": [ + { + "id": "0x2d37e648", + "kind": "TemplateTypeParmDecl", + "loc": { + "offset": 11610, + "line": 341, + "col": 20, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11601, + "col": 11, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11610, + "col": 20, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "isReferenced": true, + "name": "T", + "tagUsed": "typename", + "depth": 0, + "index": 0 + }, + { + "id": "0x2d37ebb8", + "kind": "FunctionDecl", + "loc": { + "offset": 11628, + "line": 342, + "col": 16, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11613, + "col": 1, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11838, + "line": 348, + "col": 1, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "StringTo", + "type": { + "qualType": "std::vector (const std::vector &)" + }, + "inner": [ + { + "id": "0x2d37eaa0", + "kind": "ParmVarDecl", + "loc": { + "offset": 11669, + "line": 342, + "col": 57, + "tokLen": 7, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11637, + "col": 25, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11669, + "col": 57, + "tokLen": 7, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "isReferenced": true, + "name": "strings", + "type": { + "qualType": "const std::vector &" + } + }, + { + "id": "0x2d3b6478", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 11678, + "col": 66, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11838, + "line": 348, + "col": 1, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d37ef50", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 11684, + "line": 343, + "col": 5, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11705, + "col": 26, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d37eee8", + "kind": "VarDecl", + "loc": { + "offset": 11699, + "col": 20, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11684, + "col": 5, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11699, + "col": 20, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "isReferenced": true, + "name": "result", + "type": { + "desugaredQualType": "vector", + "qualType": "std::vector" + }, + "nrvo": true + } + ] + }, + { + "id": "0x2d3a9118", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 11711, + "line": 344, + "col": 5, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11740, + "col": 34, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d37ef88", + "kind": "CXXDependentScopeMemberExpr", + "range": { + "begin": { + "offset": 11711, + "col": 5, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11718, + "col": 12, + "tokLen": 7, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "lvalue", + "isArrow": false, + "member": "reserve", + "inner": [ + { + "id": "0x2d37ef68", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 11711, + "col": 5, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11711, + "col": 5, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "vector", + "qualType": "std::vector" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d37eee8", + "kind": "VarDecl", + "name": "result", + "type": { + "desugaredQualType": "vector", + "qualType": "std::vector" + } + } + } + ] + }, + { + "id": "0x2d3a8c00", + "kind": "CXXMemberCallExpr", + "range": { + "begin": { + "offset": 11726, + "col": 20, + "tokLen": 7, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11739, + "col": 33, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "size_type", + "typeAliasDeclId": "0x2c532128" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d3a8bd0", + "kind": "MemberExpr", + "range": { + "begin": { + "offset": 11726, + "col": 20, + "tokLen": 7, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11734, + "col": 28, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "name": "size", + "isArrow": false, + "referencedMemberDecl": "0x2d39e748", + "inner": [ + { + "id": "0x2d37efd0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 11726, + "col": 20, + "tokLen": 7, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11726, + "col": 20, + "tokLen": 7, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const std::vector>", + "qualType": "const std::vector" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d37eaa0", + "kind": "ParmVarDecl", + "name": "strings", + "type": { + "qualType": "const std::vector &" + } + } + } + ] + } + ] + } + ] + }, + { + "id": "0x2d3b6250", + "kind": "CXXForRangeStmt", + "range": { + "begin": { + "offset": 11747, + "line": 345, + "col": 5, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11816, + "line": 346, + "col": 40, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + {}, + { + "id": "0x2d3a94c0", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 11768, + "line": 345, + "col": 26, + "tokLen": 7, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11768, + "col": 26, + "tokLen": 7, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d3a92c0", + "kind": "VarDecl", + "loc": { + "offset": 11768, + "col": 26, + "tokLen": 7, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11768, + "col": 26, + "tokLen": 7, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11768, + "col": 26, + "tokLen": 7, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "isImplicit": true, + "isReferenced": true, + "name": "__range2", + "type": { + "qualType": "const std::vector &" + }, + "init": "c", + "inner": [ + { + "id": "0x2d3a9140", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 11768, + "col": 26, + "tokLen": 7, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11768, + "col": 26, + "tokLen": 7, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const std::vector>", + "qualType": "const std::vector" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d37eaa0", + "kind": "ParmVarDecl", + "name": "strings", + "type": { + "qualType": "const std::vector &" + } + } + } + ] + } + ] + }, + { + "id": "0x2d3b3a60", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d3a9558", + "kind": "VarDecl", + "loc": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "isImplicit": true, + "isReferenced": true, + "name": "__begin2", + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const_iterator", + "typeAliasDeclId": "0x2d393288" + }, + "init": "c", + "inner": [ + { + "id": "0x2d3b3320", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const_iterator", + "typeAliasDeclId": "0x2d393288" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d3b32f0", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const_iterator", + "typeAliasDeclId": "0x2d393288" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (__normal_iterator *, vector>> &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x2d3b30b8", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const_iterator", + "typeAliasDeclId": "0x2d393288" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x2d3a96f8", + "kind": "CXXMemberCallExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const_iterator", + "typeAliasDeclId": "0x2d393288" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d3a96c8", + "kind": "MemberExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "name": "begin", + "isArrow": false, + "referencedMemberDecl": "0x2d39da60", + "inner": [ + { + "id": "0x2d3a94d8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const std::vector>", + "qualType": "const std::vector" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d3a92c0", + "kind": "VarDecl", + "name": "__range2", + "type": { + "qualType": "const std::vector &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x2d3b3a78", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d3a9600", + "kind": "VarDecl", + "loc": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "isImplicit": true, + "isReferenced": true, + "name": "__end2", + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const_iterator", + "typeAliasDeclId": "0x2d393288" + }, + "init": "c", + "inner": [ + { + "id": "0x2d3b3a48", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const_iterator", + "typeAliasDeclId": "0x2d393288" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d3b3a18", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const_iterator", + "typeAliasDeclId": "0x2d393288" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (__normal_iterator *, vector>> &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x2d3b3a00", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const_iterator", + "typeAliasDeclId": "0x2d393288" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x2d3b33c8", + "kind": "CXXMemberCallExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const_iterator", + "typeAliasDeclId": "0x2d393288" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d3b3398", + "kind": "MemberExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "name": "end", + "isArrow": false, + "referencedMemberDecl": "0x2d39dc30", + "inner": [ + { + "id": "0x2d3a94f8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const std::vector>", + "qualType": "const std::vector" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d3a92c0", + "kind": "VarDecl", + "name": "__range2", + "type": { + "qualType": "const std::vector &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x2d3b5e70", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x2d3b5e58", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "bool (*)(const __normal_iterator *, vector, allocator>>> &, const __normal_iterator *, vector, allocator>>> &) noexcept" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x2d3b5dd8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "bool (const __normal_iterator *, vector, allocator>>> &, const __normal_iterator *, vector, allocator>>> &) noexcept" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d3b4560", + "kind": "FunctionDecl", + "name": "operator!=", + "type": { + "qualType": "bool (const __normal_iterator *, vector, allocator>>> &, const __normal_iterator *, vector, allocator>>> &) noexcept" + } + } + } + ] + }, + { + "id": "0x2d3b5da8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const __gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const __normal_iterator *, vector, allocator>>>" + }, + "valueCategory": "lvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x2d3b3a90", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const_iterator", + "typeAliasDeclId": "0x2d393288" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d3a9558", + "kind": "VarDecl", + "name": "__begin2", + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const_iterator", + "typeAliasDeclId": "0x2d393288" + } + } + } + ] + }, + { + "id": "0x2d3b5dc0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const __gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const __normal_iterator *, vector, allocator>>>" + }, + "valueCategory": "lvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x2d3b3ab0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const_iterator", + "typeAliasDeclId": "0x2d393288" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d3a9600", + "kind": "VarDecl", + "name": "__end2", + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const_iterator", + "typeAliasDeclId": "0x2d393288" + } + } + } + ] + } + ] + }, + { + "id": "0x2d3b5f60", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "__normal_iterator *, vector>>" + }, + "valueCategory": "lvalue", + "inner": [ + { + "id": "0x2d3b5f48", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "__normal_iterator *, vector>> &(*)() noexcept" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x2d3b5ec8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "__normal_iterator *, vector>> &() noexcept" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d3b0dc8", + "kind": "CXXMethodDecl", + "name": "operator++", + "type": { + "qualType": "__normal_iterator *, vector>> &() noexcept" + } + } + } + ] + }, + { + "id": "0x2d3b5ea8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const_iterator", + "typeAliasDeclId": "0x2d393288" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d3a9558", + "kind": "VarDecl", + "name": "__begin2", + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const_iterator", + "typeAliasDeclId": "0x2d393288" + } + } + } + ] + }, + { + "id": "0x2d3a9238", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 11752, + "col": 10, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11775, + "col": 33, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d3a91d0", + "kind": "VarDecl", + "loc": { + "offset": 11764, + "col": 22, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11752, + "col": 10, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "isReferenced": true, + "name": "s", + "type": { + "qualType": "std::basic_string const &" + }, + "init": "c", + "inner": [ + { + "id": "0x2d3b6080", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::basic_string" + }, + "valueCategory": "lvalue", + "inner": [ + { + "id": "0x2d3b6068", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "reference (*)() const noexcept" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x2d3b5ff0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "reference () const noexcept" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d3b0a80", + "kind": "CXXMethodDecl", + "name": "operator*", + "type": { + "qualType": "reference () const noexcept" + } + } + } + ] + }, + { + "id": "0x2d3b5fd8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "const __gnu_cxx::__normal_iterator *, std::vector>>" + }, + "valueCategory": "lvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x2d3b5f90", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const_iterator", + "typeAliasDeclId": "0x2d393288" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d3a9558", + "kind": "VarDecl", + "name": "__begin2", + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const_iterator", + "typeAliasDeclId": "0x2d393288" + } + } + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x2d3b6418", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 11785, + "line": 346, + "col": 9, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11816, + "col": 40, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d3b62d0", + "kind": "CXXDependentScopeMemberExpr", + "range": { + "begin": { + "offset": 11785, + "col": 9, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11792, + "col": 16, + "tokLen": 9, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "lvalue", + "isArrow": false, + "member": "push_back", + "inner": [ + { + "id": "0x2d3b62b0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 11785, + "col": 9, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11785, + "col": 9, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "vector", + "qualType": "std::vector" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d37eee8", + "kind": "VarDecl", + "name": "result", + "type": { + "desugaredQualType": "vector", + "qualType": "std::vector" + } + } + } + ] + }, + { + "id": "0x2d3b63f0", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 11802, + "col": 26, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11815, + "col": 39, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d3b6348", + "kind": "UnresolvedLookupExpr", + "range": { + "begin": { + "offset": 11802, + "col": 26, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11812, + "col": 36, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "lvalue", + "usesADL": true, + "name": "StringTo", + "lookups": [ + { + "id": "0x2d37ec60", + "kind": "FunctionTemplateDecl", + "name": "StringTo" + }, + { + "id": "0x2d3750e0", + "kind": "FunctionTemplateDecl", + "name": "StringTo" + }, + { + "id": "0x2d33fd20", + "kind": "FunctionTemplateDecl", + "name": "StringTo" + } + ] + }, + { + "id": "0x2d3b63d0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 11814, + "col": 38, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11814, + "col": 38, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "std::basic_string const" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d3a91d0", + "kind": "VarDecl", + "name": "s", + "type": { + "qualType": "std::basic_string const &" + } + } + } + ] + } + ] + } + ] + }, + { + "id": "0x2d3b6460", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 11823, + "line": 347, + "col": 5, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11830, + "col": 12, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d3b6440", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 11830, + "col": 12, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11830, + "col": 12, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "vector", + "qualType": "std::vector" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d37eee8", + "kind": "VarDecl", + "name": "result", + "type": { + "desugaredQualType": "vector", + "qualType": "std::vector" + } + } + } + ] + } + ] + } + ] + } + ] +} +{ + "id": "0x7f0da6e85d18", + "kind": "FunctionDecl", + "loc": { + "offset": 21816, + "file": "ToString.cpp", + "line": 706, + "col": 32, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 21785, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 22375, + "line": 724, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d3759e8", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs12detectorTypeEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::detectorType (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::detectorType" + }, + "inner": [ + { + "id": "0x2cd03d20", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::detectorType" + }, + "decl": { + "id": "0x2cd03c80", + "kind": "EnumDecl", + "name": "detectorType" + } + } + ] + }, + { + "id": "0x7f0da6e85c40", + "kind": "ParmVarDecl", + "loc": { + "offset": 21844, + "line": 706, + "col": 60, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 21825, + "col": 41, + "tokLen": 5 + }, + "end": { + "offset": 21844, + "col": 60, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6e8ff78", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 21847, + "col": 63, + "tokLen": 1 + }, + "end": { + "offset": 22375, + "line": 724, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6e87208", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 21853, + "line": 707, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 21892, + "line": 708, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6e87158", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 21857, + "line": 707, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 21862, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e87140", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 21859, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 21859, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e87120", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 21859, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 21859, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e85f00", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 21857, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 21857, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e85c40", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e87108", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 21862, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 21862, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e85f20", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 21862, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 21862, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"Eiger\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e871f8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 21879, + "line": 708, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 21892, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6e871c8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 21886, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 21892, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorType" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cd03d90", + "kind": "EnumConstantDecl", + "name": "EIGER", + "type": { + "qualType": "slsDetectorDefs::detectorType" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e88538", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 21903, + "line": 709, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 21945, + "line": 710, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6e88488", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 21907, + "line": 709, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 21912, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e88470", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 21909, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 21909, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e88450", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 21909, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 21909, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e87228", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 21907, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 21907, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e85c40", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e88438", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 21912, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 21912, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e87248", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 21912, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 21912, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"Gotthard\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e88528", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 21932, + "line": 710, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 21945, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6e884f8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 21939, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 21945, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorType" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cd03de0", + "kind": "EnumConstantDecl", + "name": "GOTTHARD", + "type": { + "qualType": "slsDetectorDefs::detectorType" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e89868", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 21959, + "line": 711, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 22001, + "line": 712, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6e897b8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 21963, + "line": 711, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 21968, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e897a0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 21965, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 21965, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e89780", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 21965, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 21965, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e88558", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 21963, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 21963, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e85c40", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e89768", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 21968, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 21968, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e88578", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 21968, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 21968, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"Jungfrau\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e89858", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 21988, + "line": 712, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 22001, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6e89828", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 21995, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 22001, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorType" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cd03e30", + "kind": "EnumConstantDecl", + "name": "JUNGFRAU", + "type": { + "qualType": "slsDetectorDefs::detectorType" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e8ab98", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 22015, + "line": 713, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 22062, + "line": 714, + "col": 22, + "tokLen": 13 + } + }, + "inner": [ + { + "id": "0x7f0da6e8aae8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 22019, + "line": 713, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22024, + "col": 14, + "tokLen": 15 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e8aad0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22021, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22021, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e8aab0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22021, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22021, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e89888", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22019, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22019, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e85c40", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e8aa98", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22024, + "col": 14, + "tokLen": 15 + }, + "end": { + "offset": 22024, + "col": 14, + "tokLen": 15 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e898a8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 22024, + "col": 14, + "tokLen": 15 + }, + "end": { + "offset": 22024, + "col": 14, + "tokLen": 15 + } + }, + "type": { + "qualType": "const char[14]" + }, + "valueCategory": "lvalue", + "value": "\"ChipTestBoard\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e8ab88", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 22049, + "line": 714, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 22062, + "col": 22, + "tokLen": 13 + } + }, + "inner": [ + { + "id": "0x7f0da6e8ab58", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22056, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 22062, + "col": 22, + "tokLen": 13 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorType" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cd03e80", + "kind": "EnumConstantDecl", + "name": "CHIPTESTBOARD", + "type": { + "qualType": "slsDetectorDefs::detectorType" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e8bec8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 22081, + "line": 715, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 22121, + "line": 716, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6e8be18", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 22085, + "line": 715, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22090, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e8be00", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22087, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22087, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e8bde0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22087, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22087, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e8abb8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22085, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22085, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e85c40", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e8bdc8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22090, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 22090, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e8abd8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 22090, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 22090, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"Moench\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e8beb8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 22108, + "line": 716, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 22121, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6e8be88", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22115, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 22121, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorType" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cd03ed0", + "kind": "EnumConstantDecl", + "name": "MOENCH", + "type": { + "qualType": "slsDetectorDefs::detectorType" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e8d1f8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 22133, + "line": 717, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 22174, + "line": 718, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6e8d148", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 22137, + "line": 717, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22142, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e8d130", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22139, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22139, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e8d110", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22139, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22139, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e8bee8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22137, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22137, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e85c40", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e8d0f8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22142, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 22142, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e8bf08", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 22142, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 22142, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char[8]" + }, + "valueCategory": "lvalue", + "value": "\"Mythen3\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e8d1e8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 22161, + "line": 718, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 22174, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6e8d1b8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22168, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 22174, + "col": 22, + "tokLen": 7 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorType" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cd03f20", + "kind": "EnumConstantDecl", + "name": "MYTHEN3", + "type": { + "qualType": "slsDetectorDefs::detectorType" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e8e528", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 22187, + "line": 719, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 22230, + "line": 720, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6e8e478", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 22191, + "line": 719, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22196, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e8e460", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22193, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22193, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e8e440", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22193, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22193, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e8d218", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22191, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22191, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e85c40", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e8e428", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22196, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 22196, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e8d238", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 22196, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 22196, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"Gotthard2\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e8e518", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 22217, + "line": 720, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 22230, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6e8e4e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22224, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 22230, + "col": 22, + "tokLen": 9 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorType" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cd03f70", + "kind": "EnumConstantDecl", + "name": "GOTTHARD2", + "type": { + "qualType": "slsDetectorDefs::detectorType" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e8f898", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 22245, + "line": 721, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 22299, + "line": 722, + "col": 22, + "tokLen": 20 + } + }, + "inner": [ + { + "id": "0x7f0da6e8f7e8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 22249, + "line": 721, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22254, + "col": 14, + "tokLen": 22 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e8f7d0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22251, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22251, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e8f7b0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22251, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22251, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e8e548", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22249, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22249, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e85c40", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e8f798", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22254, + "col": 14, + "tokLen": 22 + }, + "end": { + "offset": 22254, + "col": 14, + "tokLen": 22 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e8e568", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 22254, + "col": 14, + "tokLen": 22 + }, + "end": { + "offset": 22254, + "col": 14, + "tokLen": 22 + } + }, + "type": { + "qualType": "const char[21]" + }, + "valueCategory": "lvalue", + "value": "\"Xilinx_ChipTestBoard\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e8f888", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 22286, + "line": 722, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 22299, + "col": 22, + "tokLen": 20 + } + }, + "inner": [ + { + "id": "0x7f0da6e8f858", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22293, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 22299, + "col": 22, + "tokLen": 20 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorType" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cd03fc0", + "kind": "EnumConstantDecl", + "name": "XILINX_CHIPTESTBOARD", + "type": { + "qualType": "slsDetectorDefs::detectorType" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e8ff60", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 22325, + "line": 723, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 22372, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6e8ff48", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 22325, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 22372, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6e8ff18", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 22331, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 22372, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6e8ff00", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 22331, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 22372, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6e8fed8", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 22331, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 22372, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6e8feb8", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 22331, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 22372, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6e8feb0", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6e8fe80", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 22331, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 22372, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6e8fe68", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 22344, + "col": 24, + "tokLen": 24 + }, + "end": { + "offset": 22371, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6e8fe50", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22344, + "col": 24, + "tokLen": 24 + }, + "end": { + "offset": 22371, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6e8fe30", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 22344, + "col": 24, + "tokLen": 24 + }, + "end": { + "offset": 22371, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6e8fe28", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6e8fdf0", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 22344, + "col": 24, + "tokLen": 24 + }, + "end": { + "offset": 22371, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e8fdd8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22369, + "col": 49, + "tokLen": 1 + }, + "end": { + "offset": 22369, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e8fdb8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22369, + "col": 49, + "tokLen": 1 + }, + "end": { + "offset": 22369, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6e8fda0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22344, + "col": 24, + "tokLen": 24 + }, + "end": { + "offset": 22344, + "col": 24, + "tokLen": 24 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e8f8c8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 22344, + "col": 24, + "tokLen": 24 + }, + "end": { + "offset": 22344, + "col": 24, + "tokLen": 24 + } + }, + "type": { + "qualType": "const char[23]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown detector type \"" + } + ] + }, + { + "id": "0x7f0da6e8f8f8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22371, + "col": 51, + "tokLen": 1 + }, + "end": { + "offset": 22371, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e85c40", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +} +{ + "id": "0x7f0da6e90148", + "kind": "FunctionDecl", + "loc": { + "offset": 22413, + "file": "ToString.cpp", + "line": 726, + "col": 36, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 22378, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 23662, + "line": 768, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d375f38", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs16detectorSettingsEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::detectorSettings (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "inner": [ + { + "id": "0x2cdc0300", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "decl": { + "id": "0x2cdc0258", + "kind": "EnumDecl", + "name": "detectorSettings" + } + } + ] + }, + { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "loc": { + "offset": 22441, + "line": 726, + "col": 64, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 22422, + "col": 45, + "tokLen": 5 + }, + "end": { + "offset": 22441, + "col": 64, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6e67978", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 22444, + "col": 67, + "tokLen": 1 + }, + "end": { + "offset": 23662, + "line": 768, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6e91638", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 22450, + "line": 727, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 22492, + "line": 728, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6e91588", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 22454, + "line": 727, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22459, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e91570", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22456, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22456, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e91550", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22456, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22456, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e90330", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22454, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22454, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e91538", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22459, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 22459, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e90350", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 22459, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 22459, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"standard\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e91628", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 22479, + "line": 728, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 22492, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6e915f8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22486, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 22492, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0320", + "kind": "EnumConstantDecl", + "name": "STANDARD", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e92968", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 22506, + "line": 729, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 22544, + "line": 730, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6e928b8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 22510, + "line": 729, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22515, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e928a0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22512, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22512, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e92880", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22512, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22512, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e91658", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22510, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22510, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e92868", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22515, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 22515, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e91678", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 22515, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 22515, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char[5]" + }, + "valueCategory": "lvalue", + "value": "\"fast\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e92958", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 22531, + "line": 730, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 22544, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6e92928", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22538, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 22544, + "col": 22, + "tokLen": 4 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0370", + "kind": "EnumConstantDecl", + "name": "FAST", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e93c98", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 22554, + "line": 731, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 22596, + "line": 732, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6e93be8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 22558, + "line": 731, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22563, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e93bd0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22560, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22560, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e93bb0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22560, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22560, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e92988", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22558, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22558, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e93b98", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22563, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 22563, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e929a8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 22563, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 22563, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"highgain\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e93c88", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 22583, + "line": 732, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 22596, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6e93c58", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22590, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 22596, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc03c0", + "kind": "EnumConstantDecl", + "name": "HIGHGAIN", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e94fc8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 22610, + "line": 733, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 22655, + "line": 734, + "col": 22, + "tokLen": 11 + } + }, + "inner": [ + { + "id": "0x7f0da6e94f18", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 22614, + "line": 733, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22619, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e94f00", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22616, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22616, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e94ee0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22616, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22616, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e93cb8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22614, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22614, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e94ec8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22619, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 22619, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e93cd8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 22619, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 22619, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char[12]" + }, + "valueCategory": "lvalue", + "value": "\"dynamicgain\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e94fb8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 22642, + "line": 734, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 22655, + "col": 22, + "tokLen": 11 + } + }, + "inner": [ + { + "id": "0x7f0da6e94f88", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22649, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 22655, + "col": 22, + "tokLen": 11 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0410", + "kind": "EnumConstantDecl", + "name": "DYNAMICGAIN", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e962f8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 22672, + "line": 735, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 22713, + "line": 736, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6e96248", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 22676, + "line": 735, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22681, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e96230", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22678, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22678, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e96210", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22678, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22678, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e94fe8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22676, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22676, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e961f8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22681, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 22681, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e95008", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 22681, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 22681, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char[8]" + }, + "valueCategory": "lvalue", + "value": "\"lowgain\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e962e8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 22700, + "line": 736, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 22713, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6e962b8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22707, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 22713, + "col": 22, + "tokLen": 7 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0460", + "kind": "EnumConstantDecl", + "name": "LOWGAIN", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e56638", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 22726, + "line": 737, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 22770, + "line": 738, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6e56588", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 22730, + "line": 737, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22735, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e56570", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22732, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22732, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e56550", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22732, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22732, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e96318", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22730, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22730, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e56538", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22735, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 22735, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e96338", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 22735, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 22735, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char[11]" + }, + "valueCategory": "lvalue", + "value": "\"mediumgain\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e56628", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 22757, + "line": 738, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 22770, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6e565f8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22764, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 22770, + "col": 22, + "tokLen": 10 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc04b0", + "kind": "EnumConstantDecl", + "name": "MEDIUMGAIN", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e57968", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 22786, + "line": 739, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 22832, + "line": 740, + "col": 22, + "tokLen": 12 + } + }, + "inner": [ + { + "id": "0x7f0da6e578b8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 22790, + "line": 739, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22795, + "col": 14, + "tokLen": 14 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e578a0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22792, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22792, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e57880", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22792, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22792, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e56658", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22790, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22790, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e57868", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22795, + "col": 14, + "tokLen": 14 + }, + "end": { + "offset": 22795, + "col": 14, + "tokLen": 14 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e56678", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 22795, + "col": 14, + "tokLen": 14 + }, + "end": { + "offset": 22795, + "col": 14, + "tokLen": 14 + } + }, + "type": { + "qualType": "const char[13]" + }, + "valueCategory": "lvalue", + "value": "\"veryhighgain\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e57958", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 22819, + "line": 740, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 22832, + "col": 22, + "tokLen": 12 + } + }, + "inner": [ + { + "id": "0x7f0da6e57928", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22826, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 22832, + "col": 22, + "tokLen": 12 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0500", + "kind": "EnumConstantDecl", + "name": "VERYHIGHGAIN", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e58c98", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 22850, + "line": 741, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 22893, + "line": 742, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6e58be8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 22854, + "line": 741, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22859, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e58bd0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22856, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22856, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e58bb0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22856, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22856, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e57988", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22854, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22854, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e58b98", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22859, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 22859, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e579a8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 22859, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 22859, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"highgain0\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e58c88", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 22880, + "line": 742, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 22893, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6e58c58", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22887, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 22893, + "col": 22, + "tokLen": 9 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0550", + "kind": "EnumConstantDecl", + "name": "HIGHGAIN0", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e59fc8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 22908, + "line": 743, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 22950, + "line": 744, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6e59f18", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 22912, + "line": 743, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22917, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e59f00", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22914, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22914, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e59ee0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22914, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22914, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e58cb8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22912, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22912, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e59ec8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22917, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 22917, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e58cd8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 22917, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 22917, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"fixgain1\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e59fb8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 22937, + "line": 744, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 22950, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6e59f88", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22944, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 22950, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc05a0", + "kind": "EnumConstantDecl", + "name": "FIXGAIN1", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e5b2f8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 22964, + "line": 745, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 23006, + "line": 746, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6e5b248", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 22968, + "line": 745, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22973, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e5b230", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22970, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22970, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e5b210", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22970, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22970, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e59fe8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22968, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22968, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e5b1f8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22973, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 22973, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e5a008", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 22973, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 22973, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"fixgain2\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e5b2e8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 22993, + "line": 746, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 23006, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6e5b2b8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23000, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 23006, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc05f0", + "kind": "EnumConstantDecl", + "name": "FIXGAIN2", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e5c628", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 23020, + "line": 747, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 23065, + "line": 748, + "col": 22, + "tokLen": 11 + } + }, + "inner": [ + { + "id": "0x7f0da6e5c578", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 23024, + "line": 747, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23029, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e5c560", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23026, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23026, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e5c540", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23026, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23026, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e5b318", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23024, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23024, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e5c528", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23029, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 23029, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e5b338", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 23029, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 23029, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char[12]" + }, + "valueCategory": "lvalue", + "value": "\"verylowgain\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e5c618", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 23052, + "line": 748, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 23065, + "col": 22, + "tokLen": 11 + } + }, + "inner": [ + { + "id": "0x7f0da6e5c5e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23059, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 23065, + "col": 22, + "tokLen": 11 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0640", + "kind": "EnumConstantDecl", + "name": "VERYLOWGAIN", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e5d958", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 23082, + "line": 749, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 23121, + "line": 750, + "col": 22, + "tokLen": 11 + } + }, + "inner": [ + { + "id": "0x7f0da6e5d8a8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 23086, + "line": 749, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23091, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e5d890", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23088, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23088, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e5d870", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23088, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23088, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e5c648", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23086, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23086, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e5d858", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23091, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 23091, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e5c668", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 23091, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 23091, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"g1_hg\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e5d948", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 23108, + "line": 750, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 23121, + "col": 22, + "tokLen": 11 + } + }, + "inner": [ + { + "id": "0x7f0da6e5d918", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23115, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 23121, + "col": 22, + "tokLen": 11 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0690", + "kind": "EnumConstantDecl", + "name": "G1_HIGHGAIN", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e5ec88", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 23138, + "line": 751, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 23177, + "line": 752, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6e5ebd8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 23142, + "line": 751, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23147, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e5ebc0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23144, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23144, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e5eba0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23144, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23144, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e5d978", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23142, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23142, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e5eb88", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23147, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 23147, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e5d998", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 23147, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 23147, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"g1_lg\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e5ec78", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 23164, + "line": 752, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 23177, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6e5ec48", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23171, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 23177, + "col": 22, + "tokLen": 10 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc06e0", + "kind": "EnumConstantDecl", + "name": "G1_LOWGAIN", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e5ffb8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 23193, + "line": 753, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 23235, + "line": 754, + "col": 22, + "tokLen": 19 + } + }, + "inner": [ + { + "id": "0x7f0da6e5ff08", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 23197, + "line": 753, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23202, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e5fef0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23199, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23199, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e5fed0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23199, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23199, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e5eca8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23197, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23197, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e5feb8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23202, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 23202, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e5ecc8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 23202, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 23202, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"g2_hc_hg\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e5ffa8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 23222, + "line": 754, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 23235, + "col": 22, + "tokLen": 19 + } + }, + "inner": [ + { + "id": "0x7f0da6e5ff78", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23229, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 23235, + "col": 22, + "tokLen": 19 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0730", + "kind": "EnumConstantDecl", + "name": "G2_HIGHCAP_HIGHGAIN", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e612e8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 23260, + "line": 755, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 23302, + "line": 756, + "col": 22, + "tokLen": 18 + } + }, + "inner": [ + { + "id": "0x7f0da6e61238", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 23264, + "line": 755, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23269, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e61220", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23266, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23266, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e61200", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23266, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23266, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e5ffd8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23264, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23264, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e611e8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23269, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 23269, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e5fff8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 23269, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 23269, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"g2_hc_lg\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e612d8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 23289, + "line": 756, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 23302, + "col": 22, + "tokLen": 18 + } + }, + "inner": [ + { + "id": "0x7f0da6e612a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23296, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 23302, + "col": 22, + "tokLen": 18 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0780", + "kind": "EnumConstantDecl", + "name": "G2_HIGHCAP_LOWGAIN", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e62618", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 23326, + "line": 757, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 23368, + "line": 758, + "col": 22, + "tokLen": 18 + } + }, + "inner": [ + { + "id": "0x7f0da6e62568", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 23330, + "line": 757, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23335, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e62550", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23332, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23332, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e62530", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23332, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23332, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e61308", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23330, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23330, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e62518", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23335, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 23335, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e61328", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 23335, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 23335, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"g2_lc_hg\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e62608", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 23355, + "line": 758, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 23368, + "col": 22, + "tokLen": 18 + } + }, + "inner": [ + { + "id": "0x7f0da6e625d8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23362, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 23368, + "col": 22, + "tokLen": 18 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc07d0", + "kind": "EnumConstantDecl", + "name": "G2_LOWCAP_HIGHGAIN", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e63948", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 23392, + "line": 759, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 23434, + "line": 760, + "col": 22, + "tokLen": 17 + } + }, + "inner": [ + { + "id": "0x7f0da6e63898", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 23396, + "line": 759, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23401, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e63880", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23398, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23398, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e63860", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23398, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23398, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e62638", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23396, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23396, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e63848", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23401, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 23401, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e62658", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 23401, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 23401, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"g2_lc_lg\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e63938", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 23421, + "line": 760, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 23434, + "col": 22, + "tokLen": 17 + } + }, + "inner": [ + { + "id": "0x7f0da6e63908", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23428, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 23434, + "col": 22, + "tokLen": 17 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0820", + "kind": "EnumConstantDecl", + "name": "G2_LOWCAP_LOWGAIN", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e64c78", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 23457, + "line": 761, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 23496, + "line": 762, + "col": 22, + "tokLen": 11 + } + }, + "inner": [ + { + "id": "0x7f0da6e64bc8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 23461, + "line": 761, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23466, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e64bb0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23463, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23463, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e64b90", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23463, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23463, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e63968", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23461, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23461, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e64b78", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23466, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 23466, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e63988", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 23466, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 23466, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"g4_hg\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e64c68", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 23483, + "line": 762, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 23496, + "col": 22, + "tokLen": 11 + } + }, + "inner": [ + { + "id": "0x7f0da6e64c38", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23490, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 23496, + "col": 22, + "tokLen": 11 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0870", + "kind": "EnumConstantDecl", + "name": "G4_HIGHGAIN", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e65fa8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 23513, + "line": 763, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 23552, + "line": 764, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6e65ef8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 23517, + "line": 763, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23522, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e65ee0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23519, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23519, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e65ec0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23519, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23519, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e64c98", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23517, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23517, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e65ea8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23522, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 23522, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e64cb8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 23522, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 23522, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"gain0\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e65f98", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 23539, + "line": 764, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 23552, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6e65f68", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23546, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 23552, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0910", + "kind": "EnumConstantDecl", + "name": "GAIN0", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e672d8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 23563, + "line": 765, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 23602, + "line": 766, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6e67228", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 23567, + "line": 765, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23572, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e67210", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23569, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23569, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e671f0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23569, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23569, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e65fc8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23567, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23567, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e671d8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23572, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 23572, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e65fe8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 23572, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 23572, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"g4_lg\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e672c8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 23589, + "line": 766, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 23602, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6e67298", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23596, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 23602, + "col": 22, + "tokLen": 10 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc08c0", + "kind": "EnumConstantDecl", + "name": "G4_LOWGAIN", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e67960", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 23618, + "line": 767, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 23659, + "col": 46, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6e67948", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 23618, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 23659, + "col": 46, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6e67918", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 23624, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 23659, + "col": 46, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6e67900", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 23624, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 23659, + "col": 46, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6e678d8", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 23624, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 23659, + "col": 46, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6e678b8", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 23624, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 23659, + "col": 46, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6e678b0", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6e67880", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 23624, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 23659, + "col": 46, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6e67868", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 23637, + "col": 24, + "tokLen": 18 + }, + "end": { + "offset": 23658, + "col": 45, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6e67850", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23637, + "col": 24, + "tokLen": 18 + }, + "end": { + "offset": 23658, + "col": 45, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6e67830", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 23637, + "col": 24, + "tokLen": 18 + }, + "end": { + "offset": 23658, + "col": 45, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6e67828", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6e677f0", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 23637, + "col": 24, + "tokLen": 18 + }, + "end": { + "offset": 23658, + "col": 45, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e677d8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23656, + "col": 43, + "tokLen": 1 + }, + "end": { + "offset": 23656, + "col": 43, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e677b8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23656, + "col": 43, + "tokLen": 1 + }, + "end": { + "offset": 23656, + "col": 43, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6e677a0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23637, + "col": 24, + "tokLen": 18 + }, + "end": { + "offset": 23637, + "col": 24, + "tokLen": 18 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e67308", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 23637, + "col": 24, + "tokLen": 18 + }, + "end": { + "offset": 23637, + "col": 24, + "tokLen": 18 + } + }, + "type": { + "qualType": "const char[17]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown setting \"" + } + ] + }, + { + "id": "0x7f0da6e67330", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23658, + "col": 45, + "tokLen": 1 + }, + "end": { + "offset": 23658, + "col": 45, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +} +{ + "id": "0x7f0da6e67ba8", + "kind": "FunctionDecl", + "loc": { + "offset": 23694, + "file": "ToString.cpp", + "line": 770, + "col": 30, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 23665, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 24219, + "line": 788, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d376488", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs10speedLevelEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::speedLevel (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::speedLevel" + }, + "inner": [ + { + "id": "0x2cdc0fb0", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::speedLevel" + }, + "decl": { + "id": "0x2cdc0f08", + "kind": "EnumDecl", + "name": "speedLevel" + } + } + ] + }, + { + "id": "0x7f0da6e67ad8", + "kind": "ParmVarDecl", + "loc": { + "offset": 23722, + "line": 770, + "col": 58, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 23703, + "col": 39, + "tokLen": 5 + }, + "end": { + "offset": 23722, + "col": 58, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6e71d98", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 23725, + "col": 61, + "tokLen": 1 + }, + "end": { + "offset": 24219, + "line": 788, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6e690a8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 23731, + "line": 771, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 23775, + "line": 772, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6e68ff8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 23735, + "line": 771, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23740, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e68fe0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23737, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23737, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e68fc0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23737, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23737, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e67d90", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23735, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23735, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e67ad8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e68fa8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23740, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 23740, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e67db0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 23740, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 23740, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char[11]" + }, + "valueCategory": "lvalue", + "value": "\"full_speed\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e69098", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 23762, + "line": 772, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 23775, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6e69068", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23769, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 23775, + "col": 22, + "tokLen": 10 + } + }, + "type": { + "qualType": "slsDetectorDefs::speedLevel" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0fd0", + "kind": "EnumConstantDecl", + "name": "FULL_SPEED", + "type": { + "qualType": "slsDetectorDefs::speedLevel" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e6a3d8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 23791, + "line": 773, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 23826, + "line": 774, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6e6a328", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 23795, + "line": 773, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23800, + "col": 14, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e6a310", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23797, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23797, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e6a2f0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23797, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23797, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e690c8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23795, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23795, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e67ad8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e6a2d8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23800, + "col": 14, + "tokLen": 3 + }, + "end": { + "offset": 23800, + "col": 14, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e690e8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 23800, + "col": 14, + "tokLen": 3 + }, + "end": { + "offset": 23800, + "col": 14, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char[2]" + }, + "valueCategory": "lvalue", + "value": "\"0\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e6a3c8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 23813, + "line": 774, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 23826, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6e6a398", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23820, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 23826, + "col": 22, + "tokLen": 10 + } + }, + "type": { + "qualType": "slsDetectorDefs::speedLevel" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0fd0", + "kind": "EnumConstantDecl", + "name": "FULL_SPEED", + "type": { + "qualType": "slsDetectorDefs::speedLevel" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e6b708", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 23842, + "line": 775, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 23886, + "line": 776, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6e6b658", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 23846, + "line": 775, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23851, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e6b640", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23848, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23848, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e6b620", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23848, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23848, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e6a3f8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23846, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23846, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e67ad8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e6b608", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23851, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 23851, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e6a418", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 23851, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 23851, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char[11]" + }, + "valueCategory": "lvalue", + "value": "\"half_speed\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e6b6f8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 23873, + "line": 776, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 23886, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6e6b6c8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23880, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 23886, + "col": 22, + "tokLen": 10 + } + }, + "type": { + "qualType": "slsDetectorDefs::speedLevel" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc1020", + "kind": "EnumConstantDecl", + "name": "HALF_SPEED", + "type": { + "qualType": "slsDetectorDefs::speedLevel" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e6ca38", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 23902, + "line": 777, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 23937, + "line": 778, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6e6c988", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 23906, + "line": 777, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23911, + "col": 14, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e6c970", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23908, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23908, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e6c950", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23908, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23908, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e6b728", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23906, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23906, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e67ad8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e6c938", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23911, + "col": 14, + "tokLen": 3 + }, + "end": { + "offset": 23911, + "col": 14, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e6b748", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 23911, + "col": 14, + "tokLen": 3 + }, + "end": { + "offset": 23911, + "col": 14, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char[2]" + }, + "valueCategory": "lvalue", + "value": "\"1\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e6ca28", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 23924, + "line": 778, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 23937, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6e6c9f8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23931, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 23937, + "col": 22, + "tokLen": 10 + } + }, + "type": { + "qualType": "slsDetectorDefs::speedLevel" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc1020", + "kind": "EnumConstantDecl", + "name": "HALF_SPEED", + "type": { + "qualType": "slsDetectorDefs::speedLevel" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e6dd68", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 23953, + "line": 779, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 24000, + "line": 780, + "col": 22, + "tokLen": 13 + } + }, + "inner": [ + { + "id": "0x7f0da6e6dcb8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 23957, + "line": 779, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23962, + "col": 14, + "tokLen": 15 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e6dca0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23959, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23959, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e6dc80", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23959, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23959, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e6ca58", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23957, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23957, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e67ad8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e6dc68", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23962, + "col": 14, + "tokLen": 15 + }, + "end": { + "offset": 23962, + "col": 14, + "tokLen": 15 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e6ca78", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 23962, + "col": 14, + "tokLen": 15 + }, + "end": { + "offset": 23962, + "col": 14, + "tokLen": 15 + } + }, + "type": { + "qualType": "const char[14]" + }, + "valueCategory": "lvalue", + "value": "\"quarter_speed\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e6dd58", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 23987, + "line": 780, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 24000, + "col": 22, + "tokLen": 13 + } + }, + "inner": [ + { + "id": "0x7f0da6e6dd28", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23994, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 24000, + "col": 22, + "tokLen": 13 + } + }, + "type": { + "qualType": "slsDetectorDefs::speedLevel" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc1070", + "kind": "EnumConstantDecl", + "name": "QUARTER_SPEED", + "type": { + "qualType": "slsDetectorDefs::speedLevel" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e6f098", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 24019, + "line": 781, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 24054, + "line": 782, + "col": 22, + "tokLen": 13 + } + }, + "inner": [ + { + "id": "0x7f0da6e6efe8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 24023, + "line": 781, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24028, + "col": 14, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e6efd0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24025, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24025, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e6efb0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24025, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24025, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e6dd88", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24023, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24023, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e67ad8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e6ef98", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24028, + "col": 14, + "tokLen": 3 + }, + "end": { + "offset": 24028, + "col": 14, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e6dda8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 24028, + "col": 14, + "tokLen": 3 + }, + "end": { + "offset": 24028, + "col": 14, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char[2]" + }, + "valueCategory": "lvalue", + "value": "\"2\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e6f088", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 24041, + "line": 782, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 24054, + "col": 22, + "tokLen": 13 + } + }, + "inner": [ + { + "id": "0x7f0da6e6f058", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24048, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 24054, + "col": 22, + "tokLen": 13 + } + }, + "type": { + "qualType": "slsDetectorDefs::speedLevel" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc1070", + "kind": "EnumConstantDecl", + "name": "QUARTER_SPEED", + "type": { + "qualType": "slsDetectorDefs::speedLevel" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e703c8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 24073, + "line": 783, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 24110, + "line": 784, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6e70318", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 24077, + "line": 783, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24082, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e70300", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24079, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24079, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e702e0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24079, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24079, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e6f0b8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24077, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24077, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e67ad8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e702c8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24082, + "col": 14, + "tokLen": 5 + }, + "end": { + "offset": 24082, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e6f0d8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 24082, + "col": 14, + "tokLen": 5 + }, + "end": { + "offset": 24082, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "const char[4]" + }, + "valueCategory": "lvalue", + "value": "\"108\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e703b8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 24097, + "line": 784, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 24110, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6e70388", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24104, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 24110, + "col": 22, + "tokLen": 9 + } + }, + "type": { + "qualType": "slsDetectorDefs::speedLevel" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc10c0", + "kind": "EnumConstantDecl", + "name": "G2_108MHZ", + "type": { + "qualType": "slsDetectorDefs::speedLevel" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e716f8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 24125, + "line": 785, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 24162, + "line": 786, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6e71648", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 24129, + "line": 785, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24134, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e71630", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24131, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24131, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e71610", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24131, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24131, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e703e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24129, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24129, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e67ad8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e715f8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24134, + "col": 14, + "tokLen": 5 + }, + "end": { + "offset": 24134, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e70408", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 24134, + "col": 14, + "tokLen": 5 + }, + "end": { + "offset": 24134, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "const char[4]" + }, + "valueCategory": "lvalue", + "value": "\"144\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e716e8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 24149, + "line": 786, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 24162, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6e716b8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24156, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 24162, + "col": 22, + "tokLen": 9 + } + }, + "type": { + "qualType": "slsDetectorDefs::speedLevel" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc1110", + "kind": "EnumConstantDecl", + "name": "G2_144MHZ", + "type": { + "qualType": "slsDetectorDefs::speedLevel" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e71d80", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 24177, + "line": 787, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 24216, + "col": 44, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6e71d68", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 24177, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 24216, + "col": 44, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6e71d38", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 24183, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 24216, + "col": 44, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6e71d20", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 24183, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 24216, + "col": 44, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6e71cf8", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 24183, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 24216, + "col": 44, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6e71cd8", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 24183, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 24216, + "col": 44, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6e71cd0", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6e71ca0", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 24183, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 24216, + "col": 44, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6e71c88", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 24196, + "col": 24, + "tokLen": 16 + }, + "end": { + "offset": 24215, + "col": 43, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6e71c70", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24196, + "col": 24, + "tokLen": 16 + }, + "end": { + "offset": 24215, + "col": 43, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6e71c50", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 24196, + "col": 24, + "tokLen": 16 + }, + "end": { + "offset": 24215, + "col": 43, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6e71c48", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6e71c10", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 24196, + "col": 24, + "tokLen": 16 + }, + "end": { + "offset": 24215, + "col": 43, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e71bf8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24213, + "col": 41, + "tokLen": 1 + }, + "end": { + "offset": 24213, + "col": 41, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e71bd8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24213, + "col": 41, + "tokLen": 1 + }, + "end": { + "offset": 24213, + "col": 41, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6e71bc0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24196, + "col": 24, + "tokLen": 16 + }, + "end": { + "offset": 24196, + "col": 24, + "tokLen": 16 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e71728", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 24196, + "col": 24, + "tokLen": 16 + }, + "end": { + "offset": 24196, + "col": 24, + "tokLen": 16 + } + }, + "type": { + "qualType": "const char[15]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown speed \"" + } + ] + }, + { + "id": "0x7f0da6e71750", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24215, + "col": 43, + "tokLen": 1 + }, + "end": { + "offset": 24215, + "col": 43, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e67ad8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +} +{ + "id": "0x7f0da6e71f68", + "kind": "FunctionDecl", + "loc": { + "offset": 24251, + "file": "ToString.cpp", + "line": 790, + "col": 30, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 24222, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 24638, + "line": 802, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d3769d8", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs10timingModeEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::timingMode (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::timingMode" + }, + "inner": [ + { + "id": "0x2cdbd770", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::timingMode" + }, + "decl": { + "id": "0x2cdbd6c8", + "kind": "EnumDecl", + "name": "timingMode" + } + } + ] + }, + { + "id": "0x7f0da6e71e98", + "kind": "ParmVarDecl", + "loc": { + "offset": 24279, + "line": 790, + "col": 58, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 24260, + "col": 39, + "tokLen": 5 + }, + "end": { + "offset": 24279, + "col": 58, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6e377d0", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 24282, + "col": 61, + "tokLen": 1 + }, + "end": { + "offset": 24638, + "line": 802, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6e73458", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 24288, + "line": 791, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 24326, + "line": 792, + "col": 22, + "tokLen": 11 + } + }, + "inner": [ + { + "id": "0x7f0da6e733a8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 24292, + "line": 791, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24297, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e73390", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24294, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24294, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e73370", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24294, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24294, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e72150", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24292, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24292, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e71e98", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e73358", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24297, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 24297, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e72170", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 24297, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 24297, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char[5]" + }, + "valueCategory": "lvalue", + "value": "\"auto\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e73448", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 24313, + "line": 792, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 24326, + "col": 22, + "tokLen": 11 + } + }, + "inner": [ + { + "id": "0x7f0da6e73418", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24320, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 24326, + "col": 22, + "tokLen": 11 + } + }, + "type": { + "qualType": "slsDetectorDefs::timingMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbd790", + "kind": "EnumConstantDecl", + "name": "AUTO_TIMING", + "type": { + "qualType": "slsDetectorDefs::timingMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e74788", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 24343, + "line": 793, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 24384, + "line": 794, + "col": 22, + "tokLen": 16 + } + }, + "inner": [ + { + "id": "0x7f0da6e746d8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 24347, + "line": 793, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24352, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e746c0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24349, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24349, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e746a0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24349, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24349, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e73478", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24347, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24347, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e71e98", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e74688", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24352, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 24352, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e73498", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 24352, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 24352, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char[8]" + }, + "valueCategory": "lvalue", + "value": "\"trigger\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e74778", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 24371, + "line": 794, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 24384, + "col": 22, + "tokLen": 16 + } + }, + "inner": [ + { + "id": "0x7f0da6e74748", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24378, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 24384, + "col": 22, + "tokLen": 16 + } + }, + "type": { + "qualType": "slsDetectorDefs::timingMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbd7e0", + "kind": "EnumConstantDecl", + "name": "TRIGGER_EXPOSURE", + "type": { + "qualType": "slsDetectorDefs::timingMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e75ab8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 24406, + "line": 795, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 24446, + "line": 796, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6e75a08", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 24410, + "line": 795, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24415, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e759f0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24412, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24412, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e759d0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24412, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24412, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e747a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24410, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24410, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e71e98", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e759b8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24415, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 24415, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e747c8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 24415, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 24415, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"gating\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e75aa8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 24433, + "line": 796, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 24446, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6e75a78", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24440, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 24446, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::timingMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbd830", + "kind": "EnumConstantDecl", + "name": "GATED", + "type": { + "qualType": "slsDetectorDefs::timingMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e35df8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 24457, + "line": 797, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 24504, + "line": 798, + "col": 22, + "tokLen": 13 + } + }, + "inner": [ + { + "id": "0x7f0da6e35d48", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 24461, + "line": 797, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24466, + "col": 14, + "tokLen": 15 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e35d30", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24463, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24463, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e35d10", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24463, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24463, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e75ad8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24461, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24461, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e71e98", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e35cf8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24466, + "col": 14, + "tokLen": 15 + }, + "end": { + "offset": 24466, + "col": 14, + "tokLen": 15 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e75af8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 24466, + "col": 14, + "tokLen": 15 + }, + "end": { + "offset": 24466, + "col": 14, + "tokLen": 15 + } + }, + "type": { + "qualType": "const char[14]" + }, + "valueCategory": "lvalue", + "value": "\"burst_trigger\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e35de8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 24491, + "line": 798, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 24504, + "col": 22, + "tokLen": 13 + } + }, + "inner": [ + { + "id": "0x7f0da6e35db8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24498, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 24504, + "col": 22, + "tokLen": 13 + } + }, + "type": { + "qualType": "slsDetectorDefs::timingMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbd880", + "kind": "EnumConstantDecl", + "name": "BURST_TRIGGER", + "type": { + "qualType": "slsDetectorDefs::timingMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e37128", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 24523, + "line": 799, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 24571, + "line": 800, + "col": 22, + "tokLen": 13 + } + }, + "inner": [ + { + "id": "0x7f0da6e37078", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 24527, + "line": 799, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24532, + "col": 14, + "tokLen": 16 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e37060", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24529, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24529, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e37040", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24529, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24529, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e35e18", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24527, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24527, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e71e98", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e37028", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24532, + "col": 14, + "tokLen": 16 + }, + "end": { + "offset": 24532, + "col": 14, + "tokLen": 16 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e35e38", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 24532, + "col": 14, + "tokLen": 16 + }, + "end": { + "offset": 24532, + "col": 14, + "tokLen": 16 + } + }, + "type": { + "qualType": "const char[15]" + }, + "valueCategory": "lvalue", + "value": "\"trigger_gating\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e37118", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 24558, + "line": 800, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 24571, + "col": 22, + "tokLen": 13 + } + }, + "inner": [ + { + "id": "0x7f0da6e370e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24565, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 24571, + "col": 22, + "tokLen": 13 + } + }, + "type": { + "qualType": "slsDetectorDefs::timingMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbd8d0", + "kind": "EnumConstantDecl", + "name": "TRIGGER_GATED", + "type": { + "qualType": "slsDetectorDefs::timingMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e377b8", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 24590, + "line": 801, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 24635, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6e377a0", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 24590, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 24635, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6e37770", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 24596, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 24635, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6e37758", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 24596, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 24635, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6e37730", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 24596, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 24635, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6e37710", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 24596, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 24635, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6e37708", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6e376d8", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 24596, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 24635, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6e376c0", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 24609, + "col": 24, + "tokLen": 22 + }, + "end": { + "offset": 24634, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6e376a8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24609, + "col": 24, + "tokLen": 22 + }, + "end": { + "offset": 24634, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6e37688", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 24609, + "col": 24, + "tokLen": 22 + }, + "end": { + "offset": 24634, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6e37680", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6e37648", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 24609, + "col": 24, + "tokLen": 22 + }, + "end": { + "offset": 24634, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e37630", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24632, + "col": 47, + "tokLen": 1 + }, + "end": { + "offset": 24632, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e37610", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24632, + "col": 47, + "tokLen": 1 + }, + "end": { + "offset": 24632, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6e375f8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24609, + "col": 24, + "tokLen": 22 + }, + "end": { + "offset": 24609, + "col": 24, + "tokLen": 22 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e37158", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 24609, + "col": 24, + "tokLen": 22 + }, + "end": { + "offset": 24609, + "col": 24, + "tokLen": 22 + } + }, + "type": { + "qualType": "const char[21]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown timing mode \"" + } + ] + }, + { + "id": "0x7f0da6e37188", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24634, + "col": 49, + "tokLen": 1 + }, + "end": { + "offset": 24634, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e71e98", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +} +{ + "id": "0x7f0da6e37988", + "kind": "FunctionDecl", + "loc": { + "offset": 24678, + "file": "ToString.cpp", + "line": 804, + "col": 38, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 24641, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 24979, + "line": 812, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d376f28", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs18frameDiscardPolicyEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::frameDiscardPolicy (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::frameDiscardPolicy" + }, + "inner": [ + { + "id": "0x2cdb87d0", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::frameDiscardPolicy" + }, + "decl": { + "id": "0x2cdb8730", + "kind": "EnumDecl", + "name": "frameDiscardPolicy" + } + } + ] + }, + { + "id": "0x7f0da6e378b8", + "kind": "ParmVarDecl", + "loc": { + "offset": 24706, + "line": 804, + "col": 66, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 24687, + "col": 47, + "tokLen": 5 + }, + "end": { + "offset": 24706, + "col": 66, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6e3bbc8", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 24709, + "col": 69, + "tokLen": 1 + }, + "end": { + "offset": 24979, + "line": 812, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6e38e88", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 24715, + "line": 805, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 24758, + "line": 806, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6e38dd8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 24719, + "line": 805, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24724, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e38dc0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24721, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24721, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e38da0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24721, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24721, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e37b70", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24719, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24719, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e378b8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e38d88", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24724, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 24724, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e37b90", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 24724, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 24724, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"nodiscard\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e38e78", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 24745, + "line": 806, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 24758, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6e38e48", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24752, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 24758, + "col": 22, + "tokLen": 10 + } + }, + "type": { + "qualType": "slsDetectorDefs::frameDiscardPolicy" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdb87f0", + "kind": "EnumConstantDecl", + "name": "NO_DISCARD", + "type": { + "qualType": "slsDetectorDefs::frameDiscardPolicy" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e3a1b8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 24774, + "line": 807, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 24820, + "line": 808, + "col": 22, + "tokLen": 20 + } + }, + "inner": [ + { + "id": "0x7f0da6e3a108", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 24778, + "line": 807, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24783, + "col": 14, + "tokLen": 14 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e3a0f0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24780, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24780, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e3a0d0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24780, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24780, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e38ea8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24778, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24778, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e378b8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e3a0b8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24783, + "col": 14, + "tokLen": 14 + }, + "end": { + "offset": 24783, + "col": 14, + "tokLen": 14 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e38ec8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 24783, + "col": 14, + "tokLen": 14 + }, + "end": { + "offset": 24783, + "col": 14, + "tokLen": 14 + } + }, + "type": { + "qualType": "const char[13]" + }, + "valueCategory": "lvalue", + "value": "\"discardempty\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e3a1a8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 24807, + "line": 808, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 24820, + "col": 22, + "tokLen": 20 + } + }, + "inner": [ + { + "id": "0x7f0da6e3a178", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24814, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 24820, + "col": 22, + "tokLen": 20 + } + }, + "type": { + "qualType": "slsDetectorDefs::frameDiscardPolicy" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdb8840", + "kind": "EnumConstantDecl", + "name": "DISCARD_EMPTY_FRAMES", + "type": { + "qualType": "slsDetectorDefs::frameDiscardPolicy" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e3b4e8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 24846, + "line": 809, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 24894, + "line": 810, + "col": 22, + "tokLen": 22 + } + }, + "inner": [ + { + "id": "0x7f0da6e3b438", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 24850, + "line": 809, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24855, + "col": 14, + "tokLen": 16 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e3b420", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24852, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24852, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e3b400", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24852, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24852, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e3a1d8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24850, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24850, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e378b8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e3b3e8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24855, + "col": 14, + "tokLen": 16 + }, + "end": { + "offset": 24855, + "col": 14, + "tokLen": 16 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e3a1f8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 24855, + "col": 14, + "tokLen": 16 + }, + "end": { + "offset": 24855, + "col": 14, + "tokLen": 16 + } + }, + "type": { + "qualType": "const char[15]" + }, + "valueCategory": "lvalue", + "value": "\"discardpartial\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e3b4d8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 24881, + "line": 810, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 24894, + "col": 22, + "tokLen": 22 + } + }, + "inner": [ + { + "id": "0x7f0da6e3b4a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24888, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 24894, + "col": 22, + "tokLen": 22 + } + }, + "type": { + "qualType": "slsDetectorDefs::frameDiscardPolicy" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdb8890", + "kind": "EnumConstantDecl", + "name": "DISCARD_PARTIAL_FRAMES", + "type": { + "qualType": "slsDetectorDefs::frameDiscardPolicy" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e3bbb0", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 24922, + "line": 811, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 24976, + "col": 59, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6e3bb98", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 24922, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 24976, + "col": 59, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6e3bb68", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 24928, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 24976, + "col": 59, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6e3bb50", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 24928, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 24976, + "col": 59, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6e3bb28", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 24928, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 24976, + "col": 59, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6e3bb08", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 24928, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 24976, + "col": 59, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6e3bb00", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6e3bad0", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 24928, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 24976, + "col": 59, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6e3bab8", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 24941, + "col": 24, + "tokLen": 31 + }, + "end": { + "offset": 24975, + "col": 58, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6e3baa0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24941, + "col": 24, + "tokLen": 31 + }, + "end": { + "offset": 24975, + "col": 58, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6e3ba80", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 24941, + "col": 24, + "tokLen": 31 + }, + "end": { + "offset": 24975, + "col": 58, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6e3ba78", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6e3ba40", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 24941, + "col": 24, + "tokLen": 31 + }, + "end": { + "offset": 24975, + "col": 58, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e3ba28", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24973, + "col": 56, + "tokLen": 1 + }, + "end": { + "offset": 24973, + "col": 56, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e3ba08", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24973, + "col": 56, + "tokLen": 1 + }, + "end": { + "offset": 24973, + "col": 56, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6e3b9f0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24941, + "col": 24, + "tokLen": 31 + }, + "end": { + "offset": 24941, + "col": 24, + "tokLen": 31 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e3b518", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 24941, + "col": 24, + "tokLen": 31 + }, + "end": { + "offset": 24941, + "col": 24, + "tokLen": 31 + } + }, + "type": { + "qualType": "const char[30]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown frame discard policy \"" + } + ] + }, + { + "id": "0x7f0da6e3b550", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24975, + "col": 58, + "tokLen": 1 + }, + "end": { + "offset": 24975, + "col": 58, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e378b8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +} +{ + "id": "0x7f0da6e3bd78", + "kind": "FunctionDecl", + "loc": { + "offset": 25011, + "file": "ToString.cpp", + "line": 814, + "col": 30, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 24982, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 25196, + "line": 820, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d377478", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs10fileFormatEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::fileFormat (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::fileFormat" + }, + "inner": [ + { + "id": "0x2cdbbda0", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::fileFormat" + }, + "decl": { + "id": "0x2cdbbd00", + "kind": "EnumDecl", + "name": "fileFormat" + } + } + ] + }, + { + "id": "0x7f0da6e3bca0", + "kind": "ParmVarDecl", + "loc": { + "offset": 25039, + "line": 814, + "col": 58, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 25020, + "col": 39, + "tokLen": 5 + }, + "end": { + "offset": 25039, + "col": 58, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6e3ec40", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 25042, + "col": 61, + "tokLen": 1 + }, + "end": { + "offset": 25196, + "line": 820, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6e3d268", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 25048, + "line": 815, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 25086, + "line": 816, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6e3d1b8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 25052, + "line": 815, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25057, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e3d1a0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25054, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25054, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e3d180", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25054, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25054, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e3bf60", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25052, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25052, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e3bca0", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e3d168", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25057, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 25057, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e3bf80", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 25057, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 25057, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char[5]" + }, + "valueCategory": "lvalue", + "value": "\"hdf5\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e3d258", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 25073, + "line": 816, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 25086, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6e3d228", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25080, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 25086, + "col": 22, + "tokLen": 4 + } + }, + "type": { + "qualType": "slsDetectorDefs::fileFormat" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbbe10", + "kind": "EnumConstantDecl", + "name": "HDF5", + "type": { + "qualType": "slsDetectorDefs::fileFormat" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e3e598", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 25096, + "line": 817, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 25136, + "line": 818, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6e3e4e8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 25100, + "line": 817, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25105, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e3e4d0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25102, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25102, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e3e4b0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25102, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25102, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e3d288", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25100, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25100, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e3bca0", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e3e498", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25105, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 25105, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e3d2a8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 25105, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 25105, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"binary\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e3e588", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 25123, + "line": 818, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 25136, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6e3e558", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25130, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 25136, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::fileFormat" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbbdc0", + "kind": "EnumConstantDecl", + "name": "BINARY", + "type": { + "qualType": "slsDetectorDefs::fileFormat" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e3ec28", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 25148, + "line": 819, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 25193, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6e3ec10", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 25148, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 25193, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6e3ebe0", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 25154, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 25193, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6e3ebc8", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 25154, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 25193, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6e3eba0", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 25154, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 25193, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6e3eb80", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 25154, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 25193, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6e3eb78", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6e3eb48", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 25154, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 25193, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6e3eb30", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 25167, + "col": 24, + "tokLen": 22 + }, + "end": { + "offset": 25192, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6e3eb18", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25167, + "col": 24, + "tokLen": 22 + }, + "end": { + "offset": 25192, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6e3eaf8", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 25167, + "col": 24, + "tokLen": 22 + }, + "end": { + "offset": 25192, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6e3eaf0", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6e3eab8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 25167, + "col": 24, + "tokLen": 22 + }, + "end": { + "offset": 25192, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e3eaa0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25190, + "col": 47, + "tokLen": 1 + }, + "end": { + "offset": 25190, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e3ea80", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25190, + "col": 47, + "tokLen": 1 + }, + "end": { + "offset": 25190, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6e3ea68", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25167, + "col": 24, + "tokLen": 22 + }, + "end": { + "offset": 25167, + "col": 24, + "tokLen": 22 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e3e5c8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 25167, + "col": 24, + "tokLen": 22 + }, + "end": { + "offset": 25167, + "col": 24, + "tokLen": 22 + } + }, + "type": { + "qualType": "const char[21]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown file format \"" + } + ] + }, + { + "id": "0x7f0da6e3e5f8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25192, + "col": 49, + "tokLen": 1 + }, + "end": { + "offset": 25192, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e3bca0", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +} +{ + "id": "0x7f0da6e3ede8", + "kind": "FunctionDecl", + "loc": { + "offset": 25236, + "file": "ToString.cpp", + "line": 822, + "col": 38, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 25199, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 25630, + "line": 832, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d3779c8", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs18externalSignalFlagEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::externalSignalFlag (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::externalSignalFlag" + }, + "inner": [ + { + "id": "0x2cdbd540", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::externalSignalFlag" + }, + "decl": { + "id": "0x2cdbd498", + "kind": "EnumDecl", + "name": "externalSignalFlag" + } + } + ] + }, + { + "id": "0x7f0da6e3ed10", + "kind": "ParmVarDecl", + "loc": { + "offset": 25264, + "line": 822, + "col": 66, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 25245, + "col": 47, + "tokLen": 5 + }, + "end": { + "offset": 25264, + "col": 66, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6e44338", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 25267, + "col": 69, + "tokLen": 1 + }, + "end": { + "offset": 25630, + "line": 832, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6e402e8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 25273, + "line": 823, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 25329, + "line": 824, + "col": 22, + "tokLen": 22 + } + }, + "inner": [ + { + "id": "0x7f0da6e40238", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 25277, + "line": 823, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25282, + "col": 14, + "tokLen": 24 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e40220", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25279, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25279, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e40200", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25279, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25279, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e3efd0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25277, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25277, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e3ed10", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e401e8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25282, + "col": 14, + "tokLen": 24 + }, + "end": { + "offset": 25282, + "col": 14, + "tokLen": 24 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e3eff0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 25282, + "col": 14, + "tokLen": 24 + }, + "end": { + "offset": 25282, + "col": 14, + "tokLen": 24 + } + }, + "type": { + "qualType": "const char[23]" + }, + "valueCategory": "lvalue", + "value": "\"trigger_in_rising_edge\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e402d8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 25316, + "line": 824, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 25329, + "col": 22, + "tokLen": 22 + } + }, + "inner": [ + { + "id": "0x7f0da6e402a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25323, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 25329, + "col": 22, + "tokLen": 22 + } + }, + "type": { + "qualType": "slsDetectorDefs::externalSignalFlag" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbd560", + "kind": "EnumConstantDecl", + "name": "TRIGGER_IN_RISING_EDGE", + "type": { + "qualType": "slsDetectorDefs::externalSignalFlag" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e41628", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 25357, + "line": 825, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 25414, + "line": 826, + "col": 22, + "tokLen": 23 + } + }, + "inner": [ + { + "id": "0x7f0da6e41578", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 25361, + "line": 825, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25366, + "col": 14, + "tokLen": 25 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e41560", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25363, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25363, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e41540", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25363, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25363, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e40308", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25361, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25361, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e3ed10", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e41528", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25366, + "col": 14, + "tokLen": 25 + }, + "end": { + "offset": 25366, + "col": 14, + "tokLen": 25 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e40328", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 25366, + "col": 14, + "tokLen": 25 + }, + "end": { + "offset": 25366, + "col": 14, + "tokLen": 25 + } + }, + "type": { + "qualType": "const char[24]" + }, + "valueCategory": "lvalue", + "value": "\"trigger_in_falling_edge\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e41618", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 25401, + "line": 826, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 25414, + "col": 22, + "tokLen": 23 + } + }, + "inner": [ + { + "id": "0x7f0da6e415e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25408, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 25414, + "col": 22, + "tokLen": 23 + } + }, + "type": { + "qualType": "slsDetectorDefs::externalSignalFlag" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbd5b0", + "kind": "EnumConstantDecl", + "name": "TRIGGER_IN_FALLING_EDGE", + "type": { + "qualType": "slsDetectorDefs::externalSignalFlag" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e42958", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 25443, + "line": 827, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 25489, + "line": 828, + "col": 22, + "tokLen": 12 + } + }, + "inner": [ + { + "id": "0x7f0da6e428a8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 25447, + "line": 827, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25452, + "col": 14, + "tokLen": 14 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e42890", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25449, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25449, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e42870", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25449, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25449, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e41648", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25447, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25447, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e3ed10", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e42858", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25452, + "col": 14, + "tokLen": 14 + }, + "end": { + "offset": 25452, + "col": 14, + "tokLen": 14 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e41668", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 25452, + "col": 14, + "tokLen": 14 + }, + "end": { + "offset": 25452, + "col": 14, + "tokLen": 14 + } + }, + "type": { + "qualType": "const char[13]" + }, + "valueCategory": "lvalue", + "value": "\"inversion_on\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e42948", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 25476, + "line": 828, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 25489, + "col": 22, + "tokLen": 12 + } + }, + "inner": [ + { + "id": "0x7f0da6e42918", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25483, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 25489, + "col": 22, + "tokLen": 12 + } + }, + "type": { + "qualType": "slsDetectorDefs::externalSignalFlag" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbd600", + "kind": "EnumConstantDecl", + "name": "INVERSION_ON", + "type": { + "qualType": "slsDetectorDefs::externalSignalFlag" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e43c88", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 25507, + "line": 829, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 25554, + "line": 830, + "col": 22, + "tokLen": 13 + } + }, + "inner": [ + { + "id": "0x7f0da6e43bd8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 25511, + "line": 829, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25516, + "col": 14, + "tokLen": 15 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e43bc0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25513, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25513, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e43ba0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25513, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25513, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e42978", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25511, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25511, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e3ed10", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e43b88", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25516, + "col": 14, + "tokLen": 15 + }, + "end": { + "offset": 25516, + "col": 14, + "tokLen": 15 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e42998", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 25516, + "col": 14, + "tokLen": 15 + }, + "end": { + "offset": 25516, + "col": 14, + "tokLen": 15 + } + }, + "type": { + "qualType": "const char[14]" + }, + "valueCategory": "lvalue", + "value": "\"inversion_off\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e43c78", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 25541, + "line": 830, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 25554, + "col": 22, + "tokLen": 13 + } + }, + "inner": [ + { + "id": "0x7f0da6e43c48", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25548, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 25554, + "col": 22, + "tokLen": 13 + } + }, + "type": { + "qualType": "slsDetectorDefs::externalSignalFlag" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbd650", + "kind": "EnumConstantDecl", + "name": "INVERSION_OFF", + "type": { + "qualType": "slsDetectorDefs::externalSignalFlag" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e44320", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 25573, + "line": 831, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 25627, + "col": 59, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6e44308", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 25573, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 25627, + "col": 59, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6e442d8", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 25579, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 25627, + "col": 59, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6e442c0", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 25579, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 25627, + "col": 59, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6e44298", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 25579, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 25627, + "col": 59, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6e44278", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 25579, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 25627, + "col": 59, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6e44270", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6e44240", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 25579, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 25627, + "col": 59, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6e44228", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 25592, + "col": 24, + "tokLen": 31 + }, + "end": { + "offset": 25626, + "col": 58, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6e44210", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25592, + "col": 24, + "tokLen": 31 + }, + "end": { + "offset": 25626, + "col": 58, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6e441f0", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 25592, + "col": 24, + "tokLen": 31 + }, + "end": { + "offset": 25626, + "col": 58, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6e441e8", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6e441b0", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 25592, + "col": 24, + "tokLen": 31 + }, + "end": { + "offset": 25626, + "col": 58, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e44198", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25624, + "col": 56, + "tokLen": 1 + }, + "end": { + "offset": 25624, + "col": 56, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e44178", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25624, + "col": 56, + "tokLen": 1 + }, + "end": { + "offset": 25624, + "col": 56, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6e44160", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25592, + "col": 24, + "tokLen": 31 + }, + "end": { + "offset": 25592, + "col": 24, + "tokLen": 31 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e43cb8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 25592, + "col": 24, + "tokLen": 31 + }, + "end": { + "offset": 25592, + "col": 24, + "tokLen": 31 + } + }, + "type": { + "qualType": "const char[30]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown external signal flag \"" + } + ] + }, + { + "id": "0x7f0da6e43cf0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25626, + "col": 58, + "tokLen": 1 + }, + "end": { + "offset": 25626, + "col": 58, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e3ed10", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +} +{ + "id": "0x7f0da6e444e8", + "kind": "FunctionDecl", + "loc": { + "offset": 25663, + "file": "ToString.cpp", + "line": 834, + "col": 31, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 25633, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 26086, + "line": 846, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d377f18", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs11readoutModeEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::readoutMode (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::readoutMode" + }, + "inner": [ + { + "id": "0x2cdc0d30", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::readoutMode" + }, + "decl": { + "id": "0x2cdc0c88", + "kind": "EnumDecl", + "name": "readoutMode" + } + } + ] + }, + { + "id": "0x7f0da6e44418", + "kind": "ParmVarDecl", + "loc": { + "offset": 25691, + "line": 834, + "col": 59, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 25672, + "col": 40, + "tokLen": 5 + }, + "end": { + "offset": 25691, + "col": 59, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6e4ad88", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 25694, + "col": 62, + "tokLen": 1 + }, + "end": { + "offset": 26086, + "line": 846, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6e459d8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 25700, + "line": 835, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 25740, + "line": 836, + "col": 22, + "tokLen": 11 + } + }, + "inner": [ + { + "id": "0x7f0da6e45928", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 25704, + "line": 835, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25709, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e45910", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25706, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25706, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e458f0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25706, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25706, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e446d0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25704, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25704, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e44418", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e458d8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25709, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 25709, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e446f0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 25709, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 25709, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"analog\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e459c8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 25727, + "line": 836, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 25740, + "col": 22, + "tokLen": 11 + } + }, + "inner": [ + { + "id": "0x7f0da6e45998", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25734, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 25740, + "col": 22, + "tokLen": 11 + } + }, + "type": { + "qualType": "slsDetectorDefs::readoutMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0d50", + "kind": "EnumConstantDecl", + "name": "ANALOG_ONLY", + "type": { + "qualType": "slsDetectorDefs::readoutMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e46d08", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 25757, + "line": 837, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 25798, + "line": 838, + "col": 22, + "tokLen": 12 + } + }, + "inner": [ + { + "id": "0x7f0da6e46c58", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 25761, + "line": 837, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25766, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e46c40", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25763, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25763, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e46c20", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25763, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25763, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e459f8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25761, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25761, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e44418", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e46c08", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25766, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 25766, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e45a18", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 25766, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 25766, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char[8]" + }, + "valueCategory": "lvalue", + "value": "\"digital\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e46cf8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 25785, + "line": 838, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 25798, + "col": 22, + "tokLen": 12 + } + }, + "inner": [ + { + "id": "0x7f0da6e46cc8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25792, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 25798, + "col": 22, + "tokLen": 12 + } + }, + "type": { + "qualType": "slsDetectorDefs::readoutMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0da0", + "kind": "EnumConstantDecl", + "name": "DIGITAL_ONLY", + "type": { + "qualType": "slsDetectorDefs::readoutMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e48038", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 25816, + "line": 839, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 25864, + "line": 840, + "col": 22, + "tokLen": 18 + } + }, + "inner": [ + { + "id": "0x7f0da6e47f88", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 25820, + "line": 839, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25825, + "col": 14, + "tokLen": 16 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e47f70", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25822, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25822, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e47f50", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25822, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25822, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e46d28", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25820, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25820, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e44418", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e47f38", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25825, + "col": 14, + "tokLen": 16 + }, + "end": { + "offset": 25825, + "col": 14, + "tokLen": 16 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e46d48", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 25825, + "col": 14, + "tokLen": 16 + }, + "end": { + "offset": 25825, + "col": 14, + "tokLen": 16 + } + }, + "type": { + "qualType": "const char[15]" + }, + "valueCategory": "lvalue", + "value": "\"analog_digital\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e48028", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 25851, + "line": 840, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 25864, + "col": 22, + "tokLen": 18 + } + }, + "inner": [ + { + "id": "0x7f0da6e47ff8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25858, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 25864, + "col": 22, + "tokLen": 18 + } + }, + "type": { + "qualType": "slsDetectorDefs::readoutMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0df0", + "kind": "EnumConstantDecl", + "name": "ANALOG_AND_DIGITAL", + "type": { + "qualType": "slsDetectorDefs::readoutMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e49368", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 25888, + "line": 841, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 25933, + "line": 842, + "col": 22, + "tokLen": 16 + } + }, + "inner": [ + { + "id": "0x7f0da6e492b8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 25892, + "line": 841, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25897, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e492a0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25894, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25894, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e49280", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25894, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25894, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e48058", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25892, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25892, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e44418", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e49268", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25897, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 25897, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e48078", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 25897, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 25897, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char[12]" + }, + "valueCategory": "lvalue", + "value": "\"transceiver\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e49358", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 25920, + "line": 842, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 25933, + "col": 22, + "tokLen": 16 + } + }, + "inner": [ + { + "id": "0x7f0da6e49328", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25927, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 25933, + "col": 22, + "tokLen": 16 + } + }, + "type": { + "qualType": "slsDetectorDefs::readoutMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0e40", + "kind": "EnumConstantDecl", + "name": "TRANSCEIVER_ONLY", + "type": { + "qualType": "slsDetectorDefs::readoutMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e4a6a8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 25955, + "line": 843, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 26008, + "line": 844, + "col": 22, + "tokLen": 23 + } + }, + "inner": [ + { + "id": "0x7f0da6e4a5f8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 25959, + "line": 843, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25964, + "col": 14, + "tokLen": 21 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e4a5e0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25961, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25961, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e4a5c0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25961, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25961, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e49388", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25959, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25959, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e44418", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e4a5a8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25964, + "col": 14, + "tokLen": 21 + }, + "end": { + "offset": 25964, + "col": 14, + "tokLen": 21 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e493a8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 25964, + "col": 14, + "tokLen": 21 + }, + "end": { + "offset": 25964, + "col": 14, + "tokLen": 21 + } + }, + "type": { + "qualType": "const char[20]" + }, + "valueCategory": "lvalue", + "value": "\"digital_transceiver\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e4a698", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 25995, + "line": 844, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 26008, + "col": 22, + "tokLen": 23 + } + }, + "inner": [ + { + "id": "0x7f0da6e4a668", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26002, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 26008, + "col": 22, + "tokLen": 23 + } + }, + "type": { + "qualType": "slsDetectorDefs::readoutMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0e90", + "kind": "EnumConstantDecl", + "name": "DIGITAL_AND_TRANSCEIVER", + "type": { + "qualType": "slsDetectorDefs::readoutMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e4ad70", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 26037, + "line": 845, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 26083, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6e4ad58", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 26037, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 26083, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6e4ad28", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 26043, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 26083, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6e4ad10", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 26043, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 26083, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6e4ace8", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 26043, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 26083, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6e4acc8", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 26043, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 26083, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6e4acc0", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6e4ac90", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 26043, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 26083, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6e4ac78", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 26056, + "col": 24, + "tokLen": 23 + }, + "end": { + "offset": 26082, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6e4ac60", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26056, + "col": 24, + "tokLen": 23 + }, + "end": { + "offset": 26082, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6e4ac40", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 26056, + "col": 24, + "tokLen": 23 + }, + "end": { + "offset": 26082, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6e4ac38", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6e4ac00", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26056, + "col": 24, + "tokLen": 23 + }, + "end": { + "offset": 26082, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e4abe8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26080, + "col": 48, + "tokLen": 1 + }, + "end": { + "offset": 26080, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e4abc8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26080, + "col": 48, + "tokLen": 1 + }, + "end": { + "offset": 26080, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6e4abb0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26056, + "col": 24, + "tokLen": 23 + }, + "end": { + "offset": 26056, + "col": 24, + "tokLen": 23 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e4a6d8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26056, + "col": 24, + "tokLen": 23 + }, + "end": { + "offset": 26056, + "col": 24, + "tokLen": 23 + } + }, + "type": { + "qualType": "const char[22]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown readout mode \"" + } + ] + }, + { + "id": "0x7f0da6e4a708", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26082, + "col": 50, + "tokLen": 1 + }, + "end": { + "offset": 26082, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e44418", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +} +{ + "id": "0x7f0da6e4af48", + "kind": "FunctionDecl", + "loc": { + "offset": 26116, + "file": "ToString.cpp", + "line": 848, + "col": 28, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 26089, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 31510, + "line": 1034, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d378468", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs8dacIndexEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::dacIndex (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "inner": [ + { + "id": "0x2cdbda40", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "decl": { + "id": "0x2cdbd998", + "kind": "EnumDecl", + "name": "dacIndex" + } + } + ] + }, + { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "loc": { + "offset": 26144, + "line": 848, + "col": 56, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 26125, + "col": 37, + "tokLen": 5 + }, + "end": { + "offset": 26144, + "col": 56, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6b95d80", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 26147, + "col": 59, + "tokLen": 1 + }, + "end": { + "offset": 31510, + "line": 1034, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6e4d6e8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 26153, + "line": 849, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 26204, + "line": 850, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6e4d650", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 26157, + "line": 849, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26178, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6e4c388", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26157, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26162, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e4c370", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26159, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26159, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e4c350", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26159, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26159, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e4b130", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26157, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26157, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e4c338", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26162, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26162, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e4b150", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26162, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26162, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"dac 0\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e4d618", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26173, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26178, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e4d600", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26175, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26175, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e4d5e0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26175, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26175, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e4c3c0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26173, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26173, + "col": 25, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e4d5c8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26178, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26178, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e4c3e0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26178, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26178, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char[2]" + }, + "valueCategory": "lvalue", + "value": "\"0\"" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6e4d6d8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 26191, + "line": 850, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 26204, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6e4d6a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26198, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 26204, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbda60", + "kind": "EnumConstantDecl", + "name": "DAC_0", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e4fcc8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 26215, + "line": 851, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 26266, + "line": 852, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6e4fc30", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 26219, + "line": 851, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26240, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6e4e968", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26219, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26224, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e4e950", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26221, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26221, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e4e930", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26221, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26221, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e4d708", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26219, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26219, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e4e918", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26224, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26224, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e4d728", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26224, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26224, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"dac 1\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e4fbf8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26235, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26240, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e4fbe0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26237, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26237, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e4fbc0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26237, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26237, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e4e9a0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26235, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26235, + "col": 25, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e4fba8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26240, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26240, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e4e9c0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26240, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26240, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char[2]" + }, + "valueCategory": "lvalue", + "value": "\"1\"" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6e4fcb8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 26253, + "line": 852, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 26266, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6e4fc88", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26260, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 26266, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbdab0", + "kind": "EnumConstantDecl", + "name": "DAC_1", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e522a8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 26277, + "line": 853, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 26328, + "line": 854, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6e52210", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 26281, + "line": 853, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26302, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6e50f48", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26281, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26286, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e50f30", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26283, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26283, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e50f10", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26283, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26283, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e4fce8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26281, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26281, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e50ef8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26286, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26286, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e4fd08", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26286, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26286, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"dac 2\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e521d8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26297, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26302, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e521c0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26299, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26299, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e521a0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26299, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26299, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e50f80", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26297, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26297, + "col": 25, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e52188", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26302, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26302, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e50fa0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26302, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26302, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char[2]" + }, + "valueCategory": "lvalue", + "value": "\"2\"" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6e52298", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 26315, + "line": 854, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 26328, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6e52268", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26322, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 26328, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbdb00", + "kind": "EnumConstantDecl", + "name": "DAC_2", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e54888", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 26339, + "line": 855, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 26390, + "line": 856, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6e547f0", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 26343, + "line": 855, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26364, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6e53528", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26343, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26348, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e53510", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26345, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26345, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e534f0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26345, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26345, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e522c8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26343, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26343, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e534d8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26348, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26348, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e522e8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26348, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26348, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"dac 3\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e547b8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26359, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26364, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e547a0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26361, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26361, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e54780", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26361, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26361, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e53560", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26359, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26359, + "col": 25, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e54768", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26364, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26364, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e53580", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26364, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26364, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char[2]" + }, + "valueCategory": "lvalue", + "value": "\"3\"" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6e54878", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 26377, + "line": 856, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 26390, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6e54848", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26384, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 26390, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbdb50", + "kind": "EnumConstantDecl", + "name": "DAC_3", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6be0e68", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 26401, + "line": 857, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 26452, + "line": 858, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6be0dd0", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 26405, + "line": 857, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26426, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6bdfb08", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26405, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26410, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bdfaf0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26407, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26407, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bdfad0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26407, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26407, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e548a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26405, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26405, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bdfab8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26410, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26410, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e548c8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26410, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26410, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"dac 4\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6be0d98", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26421, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26426, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6be0d80", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26423, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26423, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6be0d60", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26423, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26423, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bdfb40", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26421, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26421, + "col": 25, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6be0d48", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26426, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26426, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bdfb60", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26426, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26426, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char[2]" + }, + "valueCategory": "lvalue", + "value": "\"4\"" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6be0e58", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 26439, + "line": 858, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 26452, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6be0e28", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26446, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 26452, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbdba0", + "kind": "EnumConstantDecl", + "name": "DAC_4", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6be3448", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 26463, + "line": 859, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 26514, + "line": 860, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6be33b0", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 26467, + "line": 859, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26488, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6be20e8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26467, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26472, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6be20d0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26469, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26469, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6be20b0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26469, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26469, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6be0e88", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26467, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26467, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6be2098", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26472, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26472, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6be0ea8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26472, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26472, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"dac 5\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6be3378", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26483, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26488, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6be3360", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26485, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26485, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6be3340", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26485, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26485, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6be2120", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26483, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26483, + "col": 25, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6be3328", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26488, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26488, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6be2140", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26488, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26488, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char[2]" + }, + "valueCategory": "lvalue", + "value": "\"5\"" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6be3438", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 26501, + "line": 860, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 26514, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6be3408", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26508, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 26514, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbdbf0", + "kind": "EnumConstantDecl", + "name": "DAC_5", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6be5a28", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 26525, + "line": 861, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 26576, + "line": 862, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6be5990", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 26529, + "line": 861, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26550, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6be46c8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26529, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26534, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6be46b0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26531, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26531, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6be4690", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26531, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26531, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6be3468", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26529, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26529, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6be4678", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26534, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26534, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6be3488", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26534, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26534, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"dac 6\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6be5958", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26545, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26550, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6be5940", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26547, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26547, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6be5920", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26547, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26547, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6be4700", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26545, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26545, + "col": 25, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6be5908", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26550, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26550, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6be4720", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26550, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26550, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char[2]" + }, + "valueCategory": "lvalue", + "value": "\"6\"" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6be5a18", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 26563, + "line": 862, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 26576, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6be59e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26570, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 26576, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbdc40", + "kind": "EnumConstantDecl", + "name": "DAC_6", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6be8008", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 26587, + "line": 863, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 26638, + "line": 864, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6be7f70", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 26591, + "line": 863, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26612, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6be6ca8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26591, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26596, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6be6c90", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26593, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26593, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6be6c70", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26593, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26593, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6be5a48", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26591, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26591, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6be6c58", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26596, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26596, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6be5a68", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26596, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26596, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"dac 7\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6be7f38", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26607, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26612, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6be7f20", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26609, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26609, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6be7f00", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26609, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26609, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6be6ce0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26607, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26607, + "col": 25, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6be7ee8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26612, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26612, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6be6d00", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26612, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26612, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char[2]" + }, + "valueCategory": "lvalue", + "value": "\"7\"" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6be7ff8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 26625, + "line": 864, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 26638, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6be7fc8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26632, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 26638, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbdc90", + "kind": "EnumConstantDecl", + "name": "DAC_7", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bea5e8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 26649, + "line": 865, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 26700, + "line": 866, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6bea550", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 26653, + "line": 865, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26674, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6be9288", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26653, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26658, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6be9270", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26655, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26655, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6be9250", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26655, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26655, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6be8028", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26653, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26653, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6be9238", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26658, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26658, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6be8048", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26658, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26658, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"dac 8\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bea518", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26669, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26674, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bea500", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26671, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26671, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bea4e0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26671, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26671, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6be92c0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26669, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26669, + "col": 25, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bea4c8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26674, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26674, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6be92e0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26674, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26674, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char[2]" + }, + "valueCategory": "lvalue", + "value": "\"8\"" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6bea5d8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 26687, + "line": 866, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 26700, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6bea5a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26694, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 26700, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbdce0", + "kind": "EnumConstantDecl", + "name": "DAC_8", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6becbc8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 26711, + "line": 867, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 26762, + "line": 868, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6becb30", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 26715, + "line": 867, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26736, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6beb868", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26715, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26720, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6beb850", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26717, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26717, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6beb830", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26717, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26717, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bea608", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26715, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26715, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6beb818", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26720, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26720, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bea628", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26720, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26720, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"dac 9\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6becaf8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26731, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26736, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6becae0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26733, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26733, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6becac0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26733, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26733, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6beb8a0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26731, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26731, + "col": 25, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6becaa8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26736, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26736, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6beb8c0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26736, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26736, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char[2]" + }, + "valueCategory": "lvalue", + "value": "\"9\"" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6becbb8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 26749, + "line": 868, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 26762, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6becb88", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26756, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 26762, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbdd30", + "kind": "EnumConstantDecl", + "name": "DAC_9", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bef1a8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 26773, + "line": 869, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 26826, + "line": 870, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bef110", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 26777, + "line": 869, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26799, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6bede48", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26777, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26782, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bede30", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26779, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26779, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bede10", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26779, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26779, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6becbe8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26777, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26777, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6beddf8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26782, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 26782, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6becc08", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26782, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 26782, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"dac 10\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bef0d8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26794, + "col": 26, + "tokLen": 1 + }, + "end": { + "offset": 26799, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bef0c0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26796, + "col": 28, + "tokLen": 2 + }, + "end": { + "offset": 26796, + "col": 28, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bef0a0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26796, + "col": 28, + "tokLen": 2 + }, + "end": { + "offset": 26796, + "col": 28, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bede80", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26794, + "col": 26, + "tokLen": 1 + }, + "end": { + "offset": 26794, + "col": 26, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bef088", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26799, + "col": 31, + "tokLen": 4 + }, + "end": { + "offset": 26799, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bedea0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26799, + "col": 31, + "tokLen": 4 + }, + "end": { + "offset": 26799, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char[3]" + }, + "valueCategory": "lvalue", + "value": "\"10\"" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6bef198", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 26813, + "line": 870, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 26826, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bef168", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26820, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 26826, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbdd80", + "kind": "EnumConstantDecl", + "name": "DAC_10", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bf1788", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 26838, + "line": 871, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 26891, + "line": 872, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bf16f0", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 26842, + "line": 871, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26864, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6bf0428", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26842, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26847, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bf0410", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26844, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26844, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bf03f0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26844, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26844, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bef1c8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26842, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26842, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bf03d8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26847, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 26847, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bef1e8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26847, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 26847, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"dac 11\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bf16b8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26859, + "col": 26, + "tokLen": 1 + }, + "end": { + "offset": 26864, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bf16a0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26861, + "col": 28, + "tokLen": 2 + }, + "end": { + "offset": 26861, + "col": 28, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bf1680", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26861, + "col": 28, + "tokLen": 2 + }, + "end": { + "offset": 26861, + "col": 28, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bf0460", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26859, + "col": 26, + "tokLen": 1 + }, + "end": { + "offset": 26859, + "col": 26, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bf1668", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26864, + "col": 31, + "tokLen": 4 + }, + "end": { + "offset": 26864, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bf0480", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26864, + "col": 31, + "tokLen": 4 + }, + "end": { + "offset": 26864, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char[3]" + }, + "valueCategory": "lvalue", + "value": "\"11\"" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6bf1778", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 26878, + "line": 872, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 26891, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bf1748", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26885, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 26891, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbddd0", + "kind": "EnumConstantDecl", + "name": "DAC_11", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bf3d68", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 26903, + "line": 873, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 26956, + "line": 874, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bf3cd0", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 26907, + "line": 873, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26929, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6bf2a08", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26907, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26912, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bf29f0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26909, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26909, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bf29d0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26909, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26909, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bf17a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26907, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26907, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bf29b8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26912, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 26912, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bf17c8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26912, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 26912, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"dac 12\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bf3c98", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26924, + "col": 26, + "tokLen": 1 + }, + "end": { + "offset": 26929, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bf3c80", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26926, + "col": 28, + "tokLen": 2 + }, + "end": { + "offset": 26926, + "col": 28, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bf3c60", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26926, + "col": 28, + "tokLen": 2 + }, + "end": { + "offset": 26926, + "col": 28, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bf2a40", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26924, + "col": 26, + "tokLen": 1 + }, + "end": { + "offset": 26924, + "col": 26, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bf3c48", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26929, + "col": 31, + "tokLen": 4 + }, + "end": { + "offset": 26929, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bf2a60", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26929, + "col": 31, + "tokLen": 4 + }, + "end": { + "offset": 26929, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char[3]" + }, + "valueCategory": "lvalue", + "value": "\"12\"" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6bf3d58", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 26943, + "line": 874, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 26956, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bf3d28", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26950, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 26956, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbde20", + "kind": "EnumConstantDecl", + "name": "DAC_12", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bf6348", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 26968, + "line": 875, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 27021, + "line": 876, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bf62b0", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 26972, + "line": 875, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26994, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6bf4fe8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26972, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26977, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bf4fd0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26974, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26974, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bf4fb0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26974, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26974, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bf3d88", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26972, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26972, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bf4f98", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26977, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 26977, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bf3da8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26977, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 26977, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"dac 13\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bf6278", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26989, + "col": 26, + "tokLen": 1 + }, + "end": { + "offset": 26994, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bf6260", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26991, + "col": 28, + "tokLen": 2 + }, + "end": { + "offset": 26991, + "col": 28, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bf6240", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26991, + "col": 28, + "tokLen": 2 + }, + "end": { + "offset": 26991, + "col": 28, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bf5020", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26989, + "col": 26, + "tokLen": 1 + }, + "end": { + "offset": 26989, + "col": 26, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bf6228", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26994, + "col": 31, + "tokLen": 4 + }, + "end": { + "offset": 26994, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bf5040", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26994, + "col": 31, + "tokLen": 4 + }, + "end": { + "offset": 26994, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char[3]" + }, + "valueCategory": "lvalue", + "value": "\"13\"" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6bf6338", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27008, + "line": 876, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 27021, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bf6308", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27015, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 27021, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbde70", + "kind": "EnumConstantDecl", + "name": "DAC_13", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bf8928", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 27033, + "line": 877, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 27086, + "line": 878, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bf8890", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 27037, + "line": 877, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27059, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6bf75c8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27037, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27042, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bf75b0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27039, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27039, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bf7590", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27039, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27039, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bf6368", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27037, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27037, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bf7578", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27042, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 27042, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bf6388", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27042, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 27042, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"dac 14\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bf8858", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27054, + "col": 26, + "tokLen": 1 + }, + "end": { + "offset": 27059, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bf8840", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27056, + "col": 28, + "tokLen": 2 + }, + "end": { + "offset": 27056, + "col": 28, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bf8820", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27056, + "col": 28, + "tokLen": 2 + }, + "end": { + "offset": 27056, + "col": 28, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bf7600", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27054, + "col": 26, + "tokLen": 1 + }, + "end": { + "offset": 27054, + "col": 26, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bf8808", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27059, + "col": 31, + "tokLen": 4 + }, + "end": { + "offset": 27059, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bf7620", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27059, + "col": 31, + "tokLen": 4 + }, + "end": { + "offset": 27059, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char[3]" + }, + "valueCategory": "lvalue", + "value": "\"14\"" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6bf8918", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27073, + "line": 878, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 27086, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bf88e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27080, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 27086, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbdec0", + "kind": "EnumConstantDecl", + "name": "DAC_14", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bfaf08", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 27098, + "line": 879, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 27151, + "line": 880, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bfae70", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 27102, + "line": 879, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27124, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6bf9ba8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27102, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27107, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bf9b90", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27104, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27104, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bf9b70", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27104, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27104, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bf8948", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27102, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27102, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bf9b58", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27107, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 27107, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bf8968", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27107, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 27107, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"dac 15\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bfae38", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27119, + "col": 26, + "tokLen": 1 + }, + "end": { + "offset": 27124, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bfae20", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27121, + "col": 28, + "tokLen": 2 + }, + "end": { + "offset": 27121, + "col": 28, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bfae00", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27121, + "col": 28, + "tokLen": 2 + }, + "end": { + "offset": 27121, + "col": 28, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bf9be0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27119, + "col": 26, + "tokLen": 1 + }, + "end": { + "offset": 27119, + "col": 26, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bfade8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27124, + "col": 31, + "tokLen": 4 + }, + "end": { + "offset": 27124, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bf9c00", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27124, + "col": 31, + "tokLen": 4 + }, + "end": { + "offset": 27124, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char[3]" + }, + "valueCategory": "lvalue", + "value": "\"15\"" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6bfaef8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27138, + "line": 880, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 27151, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bfaec8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27145, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 27151, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbdf10", + "kind": "EnumConstantDecl", + "name": "DAC_15", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bfd4e8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 27163, + "line": 881, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 27216, + "line": 882, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bfd450", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 27167, + "line": 881, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27189, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6bfc188", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27167, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27172, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bfc170", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27169, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27169, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bfc150", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27169, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27169, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bfaf28", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27167, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27167, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bfc138", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27172, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 27172, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bfaf48", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27172, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 27172, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"dac 16\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bfd418", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27184, + "col": 26, + "tokLen": 1 + }, + "end": { + "offset": 27189, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bfd400", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27186, + "col": 28, + "tokLen": 2 + }, + "end": { + "offset": 27186, + "col": 28, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bfd3e0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27186, + "col": 28, + "tokLen": 2 + }, + "end": { + "offset": 27186, + "col": 28, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bfc1c0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27184, + "col": 26, + "tokLen": 1 + }, + "end": { + "offset": 27184, + "col": 26, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bfd3c8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27189, + "col": 31, + "tokLen": 4 + }, + "end": { + "offset": 27189, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bfc1e0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27189, + "col": 31, + "tokLen": 4 + }, + "end": { + "offset": 27189, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char[3]" + }, + "valueCategory": "lvalue", + "value": "\"16\"" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6bfd4d8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27203, + "line": 882, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 27216, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bfd4a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27210, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 27216, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbdf60", + "kind": "EnumConstantDecl", + "name": "DAC_16", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bbeac8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 27228, + "line": 883, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 27281, + "line": 884, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bbea30", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 27232, + "line": 883, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27254, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6bfe768", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27232, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27237, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bfe750", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27234, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27234, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bfe730", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27234, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27234, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bfd508", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27232, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27232, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bfe718", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27237, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 27237, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bfd528", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27237, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 27237, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"dac 17\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bbe9f8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27249, + "col": 26, + "tokLen": 1 + }, + "end": { + "offset": 27254, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bbe9e0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27251, + "col": 28, + "tokLen": 2 + }, + "end": { + "offset": 27251, + "col": 28, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bbe9c0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27251, + "col": 28, + "tokLen": 2 + }, + "end": { + "offset": 27251, + "col": 28, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bfe7a0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27249, + "col": 26, + "tokLen": 1 + }, + "end": { + "offset": 27249, + "col": 26, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bbe9a8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27254, + "col": 31, + "tokLen": 4 + }, + "end": { + "offset": 27254, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bfe7c0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27254, + "col": 31, + "tokLen": 4 + }, + "end": { + "offset": 27254, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char[3]" + }, + "valueCategory": "lvalue", + "value": "\"17\"" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6bbeab8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27268, + "line": 884, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 27281, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bbea88", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27275, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 27281, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbdfb0", + "kind": "EnumConstantDecl", + "name": "DAC_17", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bbfdf8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 27293, + "line": 885, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 27331, + "line": 886, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6bbfd48", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27297, + "line": 885, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27302, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bbfd30", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27299, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27299, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bbfd10", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27299, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27299, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bbeae8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27297, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27297, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bbfcf8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27302, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 27302, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bbeb08", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27302, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 27302, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char[5]" + }, + "valueCategory": "lvalue", + "value": "\"vsvp\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bbfde8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27318, + "line": 886, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 27331, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6bbfdb8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27325, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 27331, + "col": 22, + "tokLen": 4 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe000", + "kind": "EnumConstantDecl", + "name": "VSVP", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bc1128", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 27341, + "line": 887, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 27380, + "line": 888, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6bc1078", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27345, + "line": 887, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27350, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bc1060", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27347, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27347, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bc1040", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27347, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27347, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bbfe18", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27345, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27345, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bc1028", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27350, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 27350, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bbfe38", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27350, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 27350, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"vtrim\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bc1118", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27367, + "line": 888, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 27380, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6bc10e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27374, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 27380, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe050", + "kind": "EnumConstantDecl", + "name": "VTRIM", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bc2458", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 27391, + "line": 889, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 27433, + "line": 890, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6bc23a8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27395, + "line": 889, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27400, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bc2390", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27397, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27397, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bc2370", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27397, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27397, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bc1148", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27395, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27395, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bc2358", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27400, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 27400, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bc1168", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27400, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 27400, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"vrpreamp\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bc2448", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27420, + "line": 890, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 27433, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6bc2418", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27427, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 27433, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe0a0", + "kind": "EnumConstantDecl", + "name": "VRPREAMP", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bc3788", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 27447, + "line": 891, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 27489, + "line": 892, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6bc36d8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27451, + "line": 891, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27456, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bc36c0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27453, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27453, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bc36a0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27453, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27453, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bc2478", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27451, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27451, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bc3688", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27456, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 27456, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bc2498", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27456, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 27456, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"vrshaper\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bc3778", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27476, + "line": 892, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 27489, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6bc3748", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27483, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 27489, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe0f0", + "kind": "EnumConstantDecl", + "name": "VRSHAPER", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bc4ab8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 27503, + "line": 893, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 27541, + "line": 894, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6bc4a08", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27507, + "line": 893, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27512, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bc49f0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27509, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27509, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bc49d0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27509, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27509, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bc37a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27507, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27507, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bc49b8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27512, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 27512, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bc37c8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27512, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 27512, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char[5]" + }, + "valueCategory": "lvalue", + "value": "\"vsvn\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bc4aa8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27528, + "line": 894, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 27541, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6bc4a78", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27535, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 27541, + "col": 22, + "tokLen": 4 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe140", + "kind": "EnumConstantDecl", + "name": "VSVN", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bc5de8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 27551, + "line": 895, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 27591, + "line": 896, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bc5d38", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27555, + "line": 895, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27560, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bc5d20", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27557, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27557, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bc5d00", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27557, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27557, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bc4ad8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27555, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27555, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bc5ce8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27560, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 27560, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bc4af8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27560, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 27560, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"vtgstv\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bc5dd8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27578, + "line": 896, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 27591, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bc5da8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27585, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 27591, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe190", + "kind": "EnumConstantDecl", + "name": "VTGSTV", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bc7118", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 27603, + "line": 897, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 27644, + "line": 898, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6bc7068", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27607, + "line": 897, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27612, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bc7050", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27609, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27609, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bc7030", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27609, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27609, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bc5e08", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27607, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27607, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bc7018", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27612, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 27612, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bc5e28", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27612, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 27612, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char[8]" + }, + "valueCategory": "lvalue", + "value": "\"vcmp_ll\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bc7108", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27631, + "line": 898, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 27644, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6bc70d8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27638, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 27644, + "col": 22, + "tokLen": 7 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe1e0", + "kind": "EnumConstantDecl", + "name": "VCMP_LL", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bc8448", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 27657, + "line": 899, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 27698, + "line": 900, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6bc8398", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27661, + "line": 899, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27666, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bc8380", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27663, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27663, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bc8360", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27663, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27663, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bc7138", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27661, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27661, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bc8348", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27666, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 27666, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bc7158", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27666, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 27666, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char[8]" + }, + "valueCategory": "lvalue", + "value": "\"vcmp_lr\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bc8438", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27685, + "line": 900, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 27698, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6bc8408", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27692, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 27698, + "col": 22, + "tokLen": 7 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe230", + "kind": "EnumConstantDecl", + "name": "VCMP_LR", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bc9778", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 27711, + "line": 901, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 27749, + "line": 902, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6bc96c8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27715, + "line": 901, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27720, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bc96b0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27717, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27717, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bc9690", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27717, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27717, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bc8468", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27715, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27715, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bc9678", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27720, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 27720, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bc8488", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27720, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 27720, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char[5]" + }, + "valueCategory": "lvalue", + "value": "\"vcal\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bc9768", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27736, + "line": 902, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 27749, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6bc9738", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27743, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 27749, + "col": 22, + "tokLen": 4 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe280", + "kind": "EnumConstantDecl", + "name": "VCAL", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bcaaa8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 27759, + "line": 903, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 27800, + "line": 904, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6bca9f8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27763, + "line": 903, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27768, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bca9e0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27765, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27765, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bca9c0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27765, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27765, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bc9798", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27763, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27763, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bca9a8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27768, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 27768, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bc97b8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27768, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 27768, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char[8]" + }, + "valueCategory": "lvalue", + "value": "\"vcmp_rl\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bcaa98", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27787, + "line": 904, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 27800, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6bcaa68", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27794, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 27800, + "col": 22, + "tokLen": 7 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe2d0", + "kind": "EnumConstantDecl", + "name": "VCMP_RL", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bcbdd8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 27813, + "line": 905, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 27853, + "line": 906, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bcbd28", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27817, + "line": 905, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27822, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bcbd10", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27819, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27819, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bcbcf0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27819, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27819, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bcaac8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27817, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27817, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bcbcd8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27822, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 27822, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bcaae8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27822, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 27822, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"rxb_rb\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bcbdc8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27840, + "line": 906, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 27853, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bcbd98", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27847, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 27853, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe320", + "kind": "EnumConstantDecl", + "name": "RXB_RB", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bcd108", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 27865, + "line": 907, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 27905, + "line": 908, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bcd058", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27869, + "line": 907, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27874, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bcd040", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27871, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27871, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bcd020", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27871, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27871, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bcbdf8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27869, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27869, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bcd008", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27874, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 27874, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bcbe18", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27874, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 27874, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"rxb_lb\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bcd0f8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27892, + "line": 908, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 27905, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bcd0c8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27899, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 27905, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe370", + "kind": "EnumConstantDecl", + "name": "RXB_LB", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bce438", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 27917, + "line": 909, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 27958, + "line": 910, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6bce388", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27921, + "line": 909, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27926, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bce370", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27923, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27923, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bce350", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27923, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27923, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bcd128", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27921, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27921, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bce338", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27926, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 27926, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bcd148", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27926, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 27926, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char[8]" + }, + "valueCategory": "lvalue", + "value": "\"vcmp_rr\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bce428", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27945, + "line": 910, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 27958, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6bce3f8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27952, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 27958, + "col": 22, + "tokLen": 7 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe3c0", + "kind": "EnumConstantDecl", + "name": "VCMP_RR", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bcf768", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 27971, + "line": 911, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 28008, + "line": 912, + "col": 22, + "tokLen": 3 + } + }, + "inner": [ + { + "id": "0x7f0da6bcf6b8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27975, + "line": 911, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27980, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bcf6a0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27977, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27977, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bcf680", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27977, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27977, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bce458", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27975, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27975, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bcf668", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27980, + "col": 14, + "tokLen": 5 + }, + "end": { + "offset": 27980, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bce478", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27980, + "col": 14, + "tokLen": 5 + }, + "end": { + "offset": 27980, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "const char[4]" + }, + "valueCategory": "lvalue", + "value": "\"vcp\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bcf758", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27995, + "line": 912, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 28008, + "col": 22, + "tokLen": 3 + } + }, + "inner": [ + { + "id": "0x7f0da6bcf728", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28002, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 28008, + "col": 22, + "tokLen": 3 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe410", + "kind": "EnumConstantDecl", + "name": "VCP", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bd0a98", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 28017, + "line": 913, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 28054, + "line": 914, + "col": 22, + "tokLen": 3 + } + }, + "inner": [ + { + "id": "0x7f0da6bd09e8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 28021, + "line": 913, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28026, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bd09d0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28023, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28023, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bd09b0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28023, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28023, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bcf788", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28021, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28021, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bd0998", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28026, + "col": 14, + "tokLen": 5 + }, + "end": { + "offset": 28026, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bcf7a8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 28026, + "col": 14, + "tokLen": 5 + }, + "end": { + "offset": 28026, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "const char[4]" + }, + "valueCategory": "lvalue", + "value": "\"vcn\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bd0a88", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 28041, + "line": 914, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 28054, + "col": 22, + "tokLen": 3 + } + }, + "inner": [ + { + "id": "0x7f0da6bd0a58", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28048, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 28054, + "col": 22, + "tokLen": 3 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe460", + "kind": "EnumConstantDecl", + "name": "VCN", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bd1dc8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 28063, + "line": 915, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 28105, + "line": 916, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6bd1d18", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 28067, + "line": 915, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28072, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bd1d00", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28069, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28069, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bd1ce0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28069, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28069, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bd0ab8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28067, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28067, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bd1cc8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28072, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 28072, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bd0ad8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 28072, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 28072, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"vishaper\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bd1db8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 28092, + "line": 916, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 28105, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6bd1d88", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28099, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 28105, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe4b0", + "kind": "EnumConstantDecl", + "name": "VISHAPER", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bd30f8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 28119, + "line": 917, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 28163, + "line": 918, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6bd3048", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 28123, + "line": 917, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28128, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bd3030", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28125, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28125, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bd3010", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28125, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28125, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bd1de8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28123, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28123, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bd2ff8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28128, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 28128, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bd1e08", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 28128, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 28128, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char[11]" + }, + "valueCategory": "lvalue", + "value": "\"vthreshold\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bd30e8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 28150, + "line": 918, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 28163, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6bd30b8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28157, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 28163, + "col": 22, + "tokLen": 10 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe500", + "kind": "EnumConstantDecl", + "name": "VTHRESHOLD", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bd4428", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 28179, + "line": 919, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 28220, + "line": 920, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6bd4378", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 28183, + "line": 919, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28188, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bd4360", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28185, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28185, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bd4340", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28185, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28185, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bd3118", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28183, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28183, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bd4328", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28188, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 28188, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bd3138", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 28188, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 28188, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char[8]" + }, + "valueCategory": "lvalue", + "value": "\"vref_ds\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bd4418", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 28207, + "line": 920, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 28220, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6bd43e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28214, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 28220, + "col": 22, + "tokLen": 7 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe5a0", + "kind": "EnumConstantDecl", + "name": "VREF_DS", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bd5758", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 28233, + "line": 921, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 28276, + "line": 922, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6bd56a8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 28237, + "line": 921, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28242, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bd5690", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28239, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28239, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bd5670", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28239, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28239, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bd4448", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28237, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28237, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bd5658", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28242, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 28242, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bd4468", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 28242, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 28242, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"vcascn_pb\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bd5748", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 28263, + "line": 922, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 28276, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6bd5718", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28270, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 28276, + "col": 22, + "tokLen": 9 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe5f0", + "kind": "EnumConstantDecl", + "name": "VCASCN_PB", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bd6a88", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 28291, + "line": 923, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 28334, + "line": 924, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6bd69d8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 28295, + "line": 923, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28300, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bd69c0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28297, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28297, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bd69a0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28297, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28297, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bd5778", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28295, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28295, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bd6988", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28300, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 28300, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bd5798", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 28300, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 28300, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"vcascp_pb\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bd6a78", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 28321, + "line": 924, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 28334, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6bd6a48", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28328, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 28334, + "col": 22, + "tokLen": 9 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe640", + "kind": "EnumConstantDecl", + "name": "VCASCP_PB", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bd7db8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 28349, + "line": 925, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 28390, + "line": 926, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6bd7d08", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 28353, + "line": 925, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28358, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bd7cf0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28355, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28355, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bd7cd0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28355, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28355, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bd6aa8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28353, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28353, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bd7cb8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28358, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 28358, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bd6ac8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 28358, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 28358, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char[8]" + }, + "valueCategory": "lvalue", + "value": "\"vout_cm\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bd7da8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 28377, + "line": 926, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 28390, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6bd7d78", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28384, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 28390, + "col": 22, + "tokLen": 7 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe690", + "kind": "EnumConstantDecl", + "name": "VOUT_CM", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bd90e8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 28403, + "line": 927, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 28446, + "line": 928, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6bd9038", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 28407, + "line": 927, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28412, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bd9020", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28409, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28409, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bd9000", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28409, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28409, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bd7dd8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28407, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28407, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bd8fe8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28412, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 28412, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bd7df8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 28412, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 28412, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"vcasc_out\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bd90d8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 28433, + "line": 928, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 28446, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6bd90a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28440, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 28446, + "col": 22, + "tokLen": 9 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe6e0", + "kind": "EnumConstantDecl", + "name": "VCASC_OUT", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bda418", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 28461, + "line": 929, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 28501, + "line": 930, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bda368", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 28465, + "line": 929, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28470, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bda350", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28467, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28467, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bda330", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28467, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28467, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bd9108", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28465, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28465, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bda318", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28470, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 28470, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bd9128", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 28470, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 28470, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"vin_cm\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bda408", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 28488, + "line": 930, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 28501, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bda3d8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28495, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 28501, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe730", + "kind": "EnumConstantDecl", + "name": "VIN_CM", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bdb748", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 28513, + "line": 931, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 28556, + "line": 932, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6bdb698", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 28517, + "line": 931, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28522, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bdb680", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28519, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28519, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bdb660", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28519, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28519, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bda438", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28517, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28517, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bdb648", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28522, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 28522, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bda458", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 28522, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 28522, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"vref_comp\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bdb738", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 28543, + "line": 932, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 28556, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6bdb708", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28550, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 28556, + "col": 22, + "tokLen": 9 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe780", + "kind": "EnumConstantDecl", + "name": "VREF_COMP", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bdca78", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 28571, + "line": 933, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 28614, + "line": 934, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6bdc9c8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 28575, + "line": 933, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28580, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bdc9b0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28577, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28577, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bdc990", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28577, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28577, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bdb768", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28575, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28575, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bdc978", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28580, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 28580, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bdb788", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 28580, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 28580, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"ib_test_c\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bdca68", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 28601, + "line": 934, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 28614, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6bdca38", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28608, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 28614, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe7d0", + "kind": "EnumConstantDecl", + "name": "IB_TESTC", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bddda8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 28628, + "line": 935, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 28669, + "line": 936, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6bddcf8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 28632, + "line": 935, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28637, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bddce0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28634, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28634, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bddcc0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28634, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28634, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bdca98", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28632, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28632, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bddca8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28637, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 28637, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bdcab8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 28637, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 28637, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char[8]" + }, + "valueCategory": "lvalue", + "value": "\"vb_comp\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bddd98", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 28656, + "line": 936, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 28669, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6bddd68", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28663, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 28669, + "col": 22, + "tokLen": 7 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe820", + "kind": "EnumConstantDecl", + "name": "VB_COMP", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b9e0f8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 28682, + "line": 937, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 28724, + "line": 938, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b9e048", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 28686, + "line": 937, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28691, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b9e030", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28688, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28688, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b9e010", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28688, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28688, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bdddc8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28686, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28686, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b9dff8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28691, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 28691, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bddde8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 28691, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 28691, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"vdd_prot\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b9e0e8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 28711, + "line": 938, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 28724, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b9e0b8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28718, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 28724, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe870", + "kind": "EnumConstantDecl", + "name": "VDD_PROT", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b9f428", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 28738, + "line": 939, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 28779, + "line": 940, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6b9f378", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 28742, + "line": 939, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28747, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b9f360", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28744, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28744, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b9f340", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28744, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28744, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b9e118", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28742, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28742, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b9f328", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28747, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 28747, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b9e138", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 28747, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 28747, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char[8]" + }, + "valueCategory": "lvalue", + "value": "\"vin_com\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b9f418", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 28766, + "line": 940, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 28779, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6b9f3e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28773, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 28779, + "col": 22, + "tokLen": 7 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe8c0", + "kind": "EnumConstantDecl", + "name": "VIN_COM", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6ba0758", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 28792, + "line": 941, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 28836, + "line": 942, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6ba06a8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 28796, + "line": 941, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28801, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6ba0690", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28798, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28798, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6ba0670", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28798, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28798, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b9f448", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28796, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28796, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6ba0658", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28801, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 28801, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b9f468", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 28801, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 28801, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char[11]" + }, + "valueCategory": "lvalue", + "value": "\"vref_prech\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6ba0748", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 28823, + "line": 942, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 28836, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6ba0718", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28830, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 28836, + "col": 22, + "tokLen": 10 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe910", + "kind": "EnumConstantDecl", + "name": "VREF_PRECH", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6ba1a88", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 28852, + "line": 943, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 28895, + "line": 944, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6ba19d8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 28856, + "line": 943, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28861, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6ba19c0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28858, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28858, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6ba19a0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28858, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28858, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6ba0778", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28856, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28856, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6ba1988", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28861, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 28861, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6ba0798", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 28861, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 28861, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"vb_pixbuf\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6ba1a78", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 28882, + "line": 944, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 28895, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6ba1a48", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28889, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 28895, + "col": 22, + "tokLen": 9 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe960", + "kind": "EnumConstantDecl", + "name": "VB_PIXBUF", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6ba2db8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 28910, + "line": 945, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 28949, + "line": 946, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6ba2d08", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 28914, + "line": 945, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28919, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6ba2cf0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28916, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28916, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6ba2cd0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28916, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28916, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6ba1aa8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28914, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28914, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6ba2cb8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28919, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 28919, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6ba1ac8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 28919, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 28919, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"vb_ds\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6ba2da8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 28936, + "line": 946, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 28949, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6ba2d78", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28943, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 28949, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe9b0", + "kind": "EnumConstantDecl", + "name": "VB_DS", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6ba40e8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 28960, + "line": 947, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 29004, + "line": 948, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6ba4038", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 28964, + "line": 947, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28969, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6ba4020", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28966, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28966, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6ba4000", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28966, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28966, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6ba2dd8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28964, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28964, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6ba3fe8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28969, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 28969, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6ba2df8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 28969, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 28969, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char[11]" + }, + "valueCategory": "lvalue", + "value": "\"vref_h_adc\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6ba40d8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 28991, + "line": 948, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 29004, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6ba40a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28998, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 29004, + "col": 22, + "tokLen": 10 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbea00", + "kind": "EnumConstantDecl", + "name": "VREF_H_ADC", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6ba5418", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 29020, + "line": 949, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 29064, + "line": 950, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6ba5368", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 29024, + "line": 949, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29029, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6ba5350", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29026, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29026, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6ba5330", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29026, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29026, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6ba4108", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29024, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29024, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6ba5318", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29029, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 29029, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6ba4128", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 29029, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 29029, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char[11]" + }, + "valueCategory": "lvalue", + "value": "\"vb_comp_fe\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6ba5408", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 29051, + "line": 950, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 29064, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6ba53d8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29058, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 29064, + "col": 22, + "tokLen": 10 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbea50", + "kind": "EnumConstantDecl", + "name": "VB_COMP_FE", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6ba6748", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 29080, + "line": 951, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 29125, + "line": 952, + "col": 22, + "tokLen": 11 + } + }, + "inner": [ + { + "id": "0x7f0da6ba6698", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 29084, + "line": 951, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29089, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6ba6680", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29086, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29086, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6ba6660", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29086, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29086, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6ba5438", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29084, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29084, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6ba6648", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29089, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 29089, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6ba5458", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 29089, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 29089, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char[12]" + }, + "valueCategory": "lvalue", + "value": "\"vb_comp_adc\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6ba6738", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 29112, + "line": 952, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 29125, + "col": 22, + "tokLen": 11 + } + }, + "inner": [ + { + "id": "0x7f0da6ba6708", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29119, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 29125, + "col": 22, + "tokLen": 11 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbeaa0", + "kind": "EnumConstantDecl", + "name": "VB_COMP_ADC", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6ba7a78", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 29142, + "line": 953, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 29184, + "line": 954, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6ba79c8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 29146, + "line": 953, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29151, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6ba79b0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29148, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29148, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6ba7990", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29148, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29148, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6ba6768", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29146, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29146, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6ba7978", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29151, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 29151, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6ba6788", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 29151, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 29151, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"vcom_cds\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6ba7a68", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 29171, + "line": 954, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 29184, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6ba7a38", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29178, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 29184, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbeaf0", + "kind": "EnumConstantDecl", + "name": "VCOM_CDS", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6ba8da8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 29198, + "line": 955, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 29243, + "line": 956, + "col": 22, + "tokLen": 11 + } + }, + "inner": [ + { + "id": "0x7f0da6ba8cf8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 29202, + "line": 955, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29207, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6ba8ce0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29204, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29204, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6ba8cc0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29204, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29204, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6ba7a98", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29202, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29202, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6ba8ca8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29207, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 29207, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6ba7ab8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 29207, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 29207, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char[12]" + }, + "valueCategory": "lvalue", + "value": "\"vref_rstore\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6ba8d98", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 29230, + "line": 956, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 29243, + "col": 22, + "tokLen": 11 + } + }, + "inner": [ + { + "id": "0x7f0da6ba8d68", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29237, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 29243, + "col": 22, + "tokLen": 11 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbeb40", + "kind": "EnumConstantDecl", + "name": "VREF_RSTORE", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6baa0d8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 29260, + "line": 957, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 29304, + "line": 958, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6baa028", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 29264, + "line": 957, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29269, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6baa010", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29266, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29266, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6ba9ff0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29266, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29266, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6ba8dc8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29264, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29264, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6ba9fd8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29269, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 29269, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6ba8de8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 29269, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 29269, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char[11]" + }, + "valueCategory": "lvalue", + "value": "\"vb_opa_1st\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6baa0c8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 29291, + "line": 958, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 29304, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6baa098", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29298, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 29304, + "col": 22, + "tokLen": 10 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbeb90", + "kind": "EnumConstantDecl", + "name": "VB_OPA_1ST", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bab408", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 29320, + "line": 959, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 29366, + "line": 960, + "col": 22, + "tokLen": 12 + } + }, + "inner": [ + { + "id": "0x7f0da6bab358", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 29324, + "line": 959, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29329, + "col": 14, + "tokLen": 14 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bab340", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29326, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29326, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bab320", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29326, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29326, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6baa0f8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29324, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29324, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bab308", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29329, + "col": 14, + "tokLen": 14 + }, + "end": { + "offset": 29329, + "col": 14, + "tokLen": 14 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6baa118", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 29329, + "col": 14, + "tokLen": 14 + }, + "end": { + "offset": 29329, + "col": 14, + "tokLen": 14 + } + }, + "type": { + "qualType": "const char[13]" + }, + "valueCategory": "lvalue", + "value": "\"vref_comp_fe\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bab3f8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 29353, + "line": 960, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 29366, + "col": 22, + "tokLen": 12 + } + }, + "inner": [ + { + "id": "0x7f0da6bab3c8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29360, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 29366, + "col": 22, + "tokLen": 12 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbebe0", + "kind": "EnumConstantDecl", + "name": "VREF_COMP_FE", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bac738", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 29384, + "line": 961, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 29427, + "line": 962, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6bac688", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 29388, + "line": 961, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29393, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bac670", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29390, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29390, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bac650", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29390, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29390, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bab428", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29388, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29388, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bac638", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29393, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 29393, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bab448", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 29393, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 29393, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"vcom_adc1\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bac728", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 29414, + "line": 962, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 29427, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6bac6f8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29421, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 29427, + "col": 22, + "tokLen": 9 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbec30", + "kind": "EnumConstantDecl", + "name": "VCOM_ADC1", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bada68", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 29442, + "line": 963, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 29486, + "line": 964, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6bad9b8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 29446, + "line": 963, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29451, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bad9a0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29448, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29448, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bad980", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29448, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29448, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bac758", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29446, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29446, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bad968", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29451, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 29451, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bac778", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 29451, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 29451, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char[11]" + }, + "valueCategory": "lvalue", + "value": "\"vref_l_adc\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bada58", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 29473, + "line": 964, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 29486, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6bada28", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29480, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 29486, + "col": 22, + "tokLen": 10 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbec80", + "kind": "EnumConstantDecl", + "name": "VREF_L_ADC", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6baed98", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 29502, + "line": 965, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 29544, + "line": 966, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6baece8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 29506, + "line": 965, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29511, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6baecd0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29508, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29508, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6baecb0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29508, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29508, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bada88", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29506, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29506, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6baec98", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29511, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 29511, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6badaa8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 29511, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 29511, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"vref_cds\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6baed88", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 29531, + "line": 966, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 29544, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6baed58", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29538, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 29544, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbecd0", + "kind": "EnumConstantDecl", + "name": "VREF_CDS", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bb00c8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 29558, + "line": 967, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 29597, + "line": 968, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6bb0018", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 29562, + "line": 967, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29567, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bb0000", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29564, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29564, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6baffe0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29564, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29564, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6baedb8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29562, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29562, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6baffc8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29567, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 29567, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6baedd8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 29567, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 29567, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"vb_cs\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bb00b8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 29584, + "line": 968, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 29597, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6bb0088", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29591, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 29597, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbed20", + "kind": "EnumConstantDecl", + "name": "VB_CS", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bb13f8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 29608, + "line": 969, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 29651, + "line": 970, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6bb1348", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 29612, + "line": 969, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29617, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bb1330", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29614, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29614, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bb1310", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29614, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29614, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bb00e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29612, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29612, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bb12f8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29617, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 29617, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bb0108", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 29617, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 29617, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"vb_opa_fd\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bb13e8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 29638, + "line": 970, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 29651, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6bb13b8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29645, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 29651, + "col": 22, + "tokLen": 9 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbed70", + "kind": "EnumConstantDecl", + "name": "VB_OPA_FD", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bb2728", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 29666, + "line": 971, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 29709, + "line": 972, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6bb2678", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 29670, + "line": 971, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29675, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bb2660", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29672, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29672, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bb2640", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29672, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29672, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bb1418", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29670, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29670, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bb2628", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29675, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 29675, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bb1438", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 29675, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 29675, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"vcom_adc2\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bb2718", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 29696, + "line": 972, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 29709, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6bb26e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29703, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 29709, + "col": 22, + "tokLen": 9 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbedc0", + "kind": "EnumConstantDecl", + "name": "VCOM_ADC2", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bb3a58", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 29724, + "line": 973, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 29764, + "line": 974, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bb39a8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 29728, + "line": 973, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29733, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bb3990", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29730, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29730, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bb3970", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29730, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29730, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bb2748", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29728, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29728, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bb3958", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29733, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 29733, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bb2768", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 29733, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 29733, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"vcassh\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bb3a48", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 29751, + "line": 974, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 29764, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bb3a18", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29758, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 29764, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbee10", + "kind": "EnumConstantDecl", + "name": "VCASSH", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bb4d88", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 29776, + "line": 975, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 29814, + "line": 976, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6bb4cd8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 29780, + "line": 975, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29785, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bb4cc0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29782, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29782, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bb4ca0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29782, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29782, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bb3a78", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29780, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29780, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bb4c88", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29785, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 29785, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bb3a98", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 29785, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 29785, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char[5]" + }, + "valueCategory": "lvalue", + "value": "\"vth2\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bb4d78", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 29801, + "line": 976, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 29814, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6bb4d48", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29808, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 29814, + "col": 22, + "tokLen": 4 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbee60", + "kind": "EnumConstantDecl", + "name": "VTH2", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bb60b8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 29824, + "line": 977, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 29868, + "line": 978, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6bb6008", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 29828, + "line": 977, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29833, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bb5ff0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29830, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29830, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bb5fd0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29830, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29830, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bb4da8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29828, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29828, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bb5fb8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29833, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 29833, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bb4dc8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 29833, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 29833, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char[11]" + }, + "valueCategory": "lvalue", + "value": "\"vrshaper_n\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bb60a8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 29855, + "line": 978, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 29868, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6bb6078", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29862, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 29868, + "col": 22, + "tokLen": 10 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbeeb0", + "kind": "EnumConstantDecl", + "name": "VRSHAPER_N", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bb73e8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 29884, + "line": 979, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 29927, + "line": 980, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6bb7338", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 29888, + "line": 979, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29893, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bb7320", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29890, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29890, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bb7300", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29890, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29890, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bb60d8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29888, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29888, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bb72e8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29893, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 29893, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bb60f8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 29893, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 29893, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"vipre_out\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bb73d8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 29914, + "line": 980, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 29927, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6bb73a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29921, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 29927, + "col": 22, + "tokLen": 9 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbef00", + "kind": "EnumConstantDecl", + "name": "VIPRE_OUT", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bb8718", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 29942, + "line": 981, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 29980, + "line": 982, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6bb8668", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 29946, + "line": 981, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29951, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bb8650", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29948, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29948, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bb8630", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29948, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29948, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bb7408", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29946, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29946, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bb8618", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29951, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 29951, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bb7428", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 29951, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 29951, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char[5]" + }, + "valueCategory": "lvalue", + "value": "\"vth3\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bb8708", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 29967, + "line": 982, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 29980, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6bb86d8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29974, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 29980, + "col": 22, + "tokLen": 4 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbef50", + "kind": "EnumConstantDecl", + "name": "VTH3", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bb9a48", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 29990, + "line": 983, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 30028, + "line": 984, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6bb9998", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 29994, + "line": 983, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29999, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bb9980", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29996, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29996, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bb9960", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29996, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29996, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bb8738", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29994, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29994, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bb9948", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29999, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 29999, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bb8758", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 29999, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 29999, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char[5]" + }, + "valueCategory": "lvalue", + "value": "\"vth1\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bb9a38", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 30015, + "line": 984, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 30028, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6bb9a08", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30022, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 30028, + "col": 22, + "tokLen": 4 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbefa0", + "kind": "EnumConstantDecl", + "name": "VTH1", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bbad78", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 30038, + "line": 985, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 30077, + "line": 986, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6bbacc8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 30042, + "line": 985, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30047, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bbacb0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30044, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30044, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bbac90", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30044, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30044, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bb9a68", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30042, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30042, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bbac78", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30047, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 30047, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bb9a88", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 30047, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 30047, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"vicin\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bbad68", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 30064, + "line": 986, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 30077, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6bbad38", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30071, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 30077, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbeff0", + "kind": "EnumConstantDecl", + "name": "VICIN", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bbc0a8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 30088, + "line": 987, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 30126, + "line": 988, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6bbbff8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 30092, + "line": 987, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30097, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bbbfe0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30094, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30094, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bbbfc0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30094, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30094, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bbad98", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30092, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30092, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bbbfa8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30097, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 30097, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bbadb8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 30097, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 30097, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char[5]" + }, + "valueCategory": "lvalue", + "value": "\"vcas\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bbc098", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 30113, + "line": 988, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 30126, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6bbc068", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30120, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 30126, + "col": 22, + "tokLen": 4 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf040", + "kind": "EnumConstantDecl", + "name": "VCAS", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b7c3e8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 30136, + "line": 989, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 30176, + "line": 990, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6b7c338", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 30140, + "line": 989, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30145, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b7c320", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30142, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30142, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b7c300", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30142, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30142, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bbc0c8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30140, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30140, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b7c2e8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30145, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 30145, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bbc0e8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 30145, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 30145, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"vcal_n\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b7c3d8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 30163, + "line": 990, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 30176, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6b7c3a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30170, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 30176, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf090", + "kind": "EnumConstantDecl", + "name": "VCAL_N", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b7d718", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 30188, + "line": 991, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 30227, + "line": 992, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6b7d668", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 30192, + "line": 991, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30197, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b7d650", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30194, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30194, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b7d630", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30194, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30194, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b7c408", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30192, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30192, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b7d618", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30197, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 30197, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b7c428", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 30197, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 30197, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"vipre\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b7d708", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 30214, + "line": 992, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 30227, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6b7d6d8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30221, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 30227, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf0e0", + "kind": "EnumConstantDecl", + "name": "VIPRE", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b7ea48", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 30238, + "line": 993, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 30278, + "line": 994, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6b7e998", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 30242, + "line": 993, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30247, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b7e980", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30244, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30244, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b7e960", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30244, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30244, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b7d738", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30242, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30242, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b7e948", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30247, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 30247, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b7d758", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 30247, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 30247, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"vcal_p\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b7ea38", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 30265, + "line": 994, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 30278, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6b7ea08", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30272, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 30278, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf130", + "kind": "EnumConstantDecl", + "name": "VCAL_P", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b7fd78", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 30290, + "line": 995, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 30329, + "line": 996, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6b7fcc8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 30294, + "line": 995, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30299, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b7fcb0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30296, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30296, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b7fc90", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30296, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30296, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b7ea68", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30294, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30294, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b7fc78", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30299, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 30299, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b7ea88", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 30299, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 30299, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"vdcsh\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b7fd68", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 30316, + "line": 996, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 30329, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6b7fd38", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30323, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 30329, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf180", + "kind": "EnumConstantDecl", + "name": "VDCSH", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b810a8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 30340, + "line": 997, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 30384, + "line": 998, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6b80ff8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 30344, + "line": 997, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30349, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b80fe0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30346, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30346, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b80fc0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30346, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30346, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b7fd98", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30344, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30344, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b80fa8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30349, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 30349, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b7fdb8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 30349, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 30349, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char[11]" + }, + "valueCategory": "lvalue", + "value": "\"vbp_colbuf\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b81098", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 30371, + "line": 998, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 30384, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6b81068", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30378, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 30384, + "col": 22, + "tokLen": 10 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf1d0", + "kind": "EnumConstantDecl", + "name": "VBP_COLBUF", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b823d8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 30400, + "line": 999, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 30440, + "line": 1000, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6b82328", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 30404, + "line": 999, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30409, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b82310", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30406, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30406, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b822f0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30406, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30406, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b810c8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30404, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30404, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b822d8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30409, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 30409, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b810e8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 30409, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 30409, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"vb_sda\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b823c8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 30427, + "line": 1000, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 30440, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6b82398", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30434, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 30440, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf220", + "kind": "EnumConstantDecl", + "name": "VB_SDA", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b83708", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 30452, + "line": 1001, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 30495, + "line": 1002, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6b83658", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 30456, + "line": 1001, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30461, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b83640", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30458, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30458, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b83620", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30458, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30458, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b823f8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30456, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30456, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b83608", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30461, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 30461, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b82418", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 30461, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 30461, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"vcasc_sfp\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b836f8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 30482, + "line": 1002, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 30495, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6b836c8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30489, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 30495, + "col": 22, + "tokLen": 9 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf270", + "kind": "EnumConstantDecl", + "name": "VCASC_SFP", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b84a38", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 30510, + "line": 1003, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 30553, + "line": 1004, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6b84988", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 30514, + "line": 1003, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30519, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b84970", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30516, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30516, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b84950", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30516, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30516, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b83728", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30514, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30514, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b84938", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30519, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 30519, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b83748", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 30519, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 30519, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"vipre_cds\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b84a28", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 30540, + "line": 1004, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 30553, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6b849f8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30547, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 30553, + "col": 22, + "tokLen": 9 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf2c0", + "kind": "EnumConstantDecl", + "name": "VIPRE_CDS", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b85d68", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 30568, + "line": 1005, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 30611, + "line": 1006, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6b85cb8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 30572, + "line": 1005, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30577, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b85ca0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30574, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30574, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b85c80", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30574, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30574, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b84a58", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30572, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30572, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b85c68", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30577, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 30577, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b84a78", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 30577, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 30577, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"ibias_sfp\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b85d58", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 30598, + "line": 1006, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 30611, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6b85d28", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30605, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 30611, + "col": 22, + "tokLen": 9 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf310", + "kind": "EnumConstantDecl", + "name": "IBIAS_SFP", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b87098", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 30626, + "line": 1007, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 30668, + "line": 1008, + "col": 22, + "tokLen": 12 + } + }, + "inner": [ + { + "id": "0x7f0da6b86fe8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 30630, + "line": 1007, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30635, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b86fd0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30632, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30632, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b86fb0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30632, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30632, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b85d88", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30630, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30630, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b86f98", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30635, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 30635, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b85da8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 30635, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 30635, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"trimbits\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b87088", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 30655, + "line": 1008, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 30668, + "col": 22, + "tokLen": 12 + } + }, + "inner": [ + { + "id": "0x7f0da6b87058", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30662, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 30668, + "col": 22, + "tokLen": 12 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf6d0", + "kind": "EnumConstantDecl", + "name": "TRIMBIT_SCAN", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b883c8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 30686, + "line": 1009, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 30731, + "line": 1010, + "col": 22, + "tokLen": 12 + } + }, + "inner": [ + { + "id": "0x7f0da6b88318", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 30690, + "line": 1009, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30695, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b88300", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30692, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30692, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b882e0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30692, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30692, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b870b8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30690, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30690, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b882c8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30695, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 30695, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b870d8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 30695, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 30695, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char[12]" + }, + "valueCategory": "lvalue", + "value": "\"highvoltage\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b883b8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 30718, + "line": 1010, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 30731, + "col": 22, + "tokLen": 12 + } + }, + "inner": [ + { + "id": "0x7f0da6b88388", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30725, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 30731, + "col": 22, + "tokLen": 12 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf3b0", + "kind": "EnumConstantDecl", + "name": "HIGH_VOLTAGE", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b896f8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 30749, + "line": 1011, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 30790, + "line": 1012, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b89648", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 30753, + "line": 1011, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30758, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b89630", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30755, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30755, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b89610", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30755, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30755, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b883e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30753, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30753, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b895f8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30758, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 30758, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b88408", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 30758, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 30758, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char[8]" + }, + "valueCategory": "lvalue", + "value": "\"iodelay\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b896e8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 30777, + "line": 1012, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 30790, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b896b8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30784, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 30790, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe550", + "kind": "EnumConstantDecl", + "name": "IO_DELAY", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b8aa28", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 30804, + "line": 1013, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 30846, + "line": 1014, + "col": 22, + "tokLen": 15 + } + }, + "inner": [ + { + "id": "0x7f0da6b8a978", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 30808, + "line": 1013, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30813, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b8a960", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30810, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30810, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b8a940", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30810, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30810, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b89718", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30808, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30808, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b8a928", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30813, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 30813, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b89738", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 30813, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 30813, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"temp_adc\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b8aa18", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 30833, + "line": 1014, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 30846, + "col": 22, + "tokLen": 15 + } + }, + "inner": [ + { + "id": "0x7f0da6b8a9e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30840, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 30846, + "col": 22, + "tokLen": 15 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf400", + "kind": "EnumConstantDecl", + "name": "TEMPERATURE_ADC", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b8bd58", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 30867, + "line": 1015, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 30910, + "line": 1016, + "col": 22, + "tokLen": 16 + } + }, + "inner": [ + { + "id": "0x7f0da6b8bca8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 30871, + "line": 1015, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30876, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b8bc90", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30873, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30873, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b8bc70", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30873, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30873, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b8aa48", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30871, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30871, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b8bc58", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30876, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 30876, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b8aa68", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 30876, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 30876, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"temp_fpga\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b8bd48", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 30897, + "line": 1016, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 30910, + "col": 22, + "tokLen": 16 + } + }, + "inner": [ + { + "id": "0x7f0da6b8bd18", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30904, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 30910, + "col": 22, + "tokLen": 16 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf450", + "kind": "EnumConstantDecl", + "name": "TEMPERATURE_FPGA", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b8d088", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 30932, + "line": 1017, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 30978, + "line": 1018, + "col": 22, + "tokLen": 19 + } + }, + "inner": [ + { + "id": "0x7f0da6b8cfd8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 30936, + "line": 1017, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30941, + "col": 14, + "tokLen": 14 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b8cfc0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30938, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30938, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b8cfa0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30938, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30938, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b8bd78", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30936, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30936, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b8cf88", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30941, + "col": 14, + "tokLen": 14 + }, + "end": { + "offset": 30941, + "col": 14, + "tokLen": 14 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b8bd98", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 30941, + "col": 14, + "tokLen": 14 + }, + "end": { + "offset": 30941, + "col": 14, + "tokLen": 14 + } + }, + "type": { + "qualType": "const char[13]" + }, + "valueCategory": "lvalue", + "value": "\"temp_fpgaext\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b8d078", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 30965, + "line": 1018, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 30978, + "col": 22, + "tokLen": 19 + } + }, + "inner": [ + { + "id": "0x7f0da6b8d048", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30972, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 30978, + "col": 22, + "tokLen": 19 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf4a0", + "kind": "EnumConstantDecl", + "name": "TEMPERATURE_FPGAEXT", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b8e3b8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 31003, + "line": 1019, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 31046, + "line": 1020, + "col": 22, + "tokLen": 16 + } + }, + "inner": [ + { + "id": "0x7f0da6b8e308", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 31007, + "line": 1019, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31012, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b8e2f0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31009, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31009, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b8e2d0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31009, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31009, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b8d0a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31007, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31007, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b8e2b8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31012, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 31012, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b8d0c8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 31012, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 31012, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"temp_10ge\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b8e3a8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 31033, + "line": 1020, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 31046, + "col": 22, + "tokLen": 16 + } + }, + "inner": [ + { + "id": "0x7f0da6b8e378", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31040, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 31046, + "col": 22, + "tokLen": 16 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf4f0", + "kind": "EnumConstantDecl", + "name": "TEMPERATURE_10GE", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b8f6e8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 31068, + "line": 1021, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 31111, + "line": 1022, + "col": 22, + "tokLen": 16 + } + }, + "inner": [ + { + "id": "0x7f0da6b8f638", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 31072, + "line": 1021, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31077, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b8f620", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31074, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31074, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b8f600", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31074, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31074, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b8e3d8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31072, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31072, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b8f5e8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31077, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 31077, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b8e3f8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 31077, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 31077, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"temp_dcdc\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b8f6d8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 31098, + "line": 1022, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 31111, + "col": 22, + "tokLen": 16 + } + }, + "inner": [ + { + "id": "0x7f0da6b8f6a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31105, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 31111, + "col": 22, + "tokLen": 16 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf540", + "kind": "EnumConstantDecl", + "name": "TEMPERATURE_DCDC", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b90a18", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 31133, + "line": 1023, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 31176, + "line": 1024, + "col": 22, + "tokLen": 16 + } + }, + "inner": [ + { + "id": "0x7f0da6b90968", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 31137, + "line": 1023, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31142, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b90950", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31139, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31139, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b90930", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31139, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31139, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b8f708", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31137, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31137, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b90918", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31142, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 31142, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b8f728", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 31142, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 31142, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"temp_sodl\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b90a08", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 31163, + "line": 1024, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 31176, + "col": 22, + "tokLen": 16 + } + }, + "inner": [ + { + "id": "0x7f0da6b909d8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31170, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 31176, + "col": 22, + "tokLen": 16 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf590", + "kind": "EnumConstantDecl", + "name": "TEMPERATURE_SODL", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b91d48", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 31198, + "line": 1025, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 31241, + "line": 1026, + "col": 22, + "tokLen": 16 + } + }, + "inner": [ + { + "id": "0x7f0da6b91c98", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 31202, + "line": 1025, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31207, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b91c80", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31204, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31204, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b91c60", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31204, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31204, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b90a38", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31202, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31202, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b91c48", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31207, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 31207, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b90a58", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 31207, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 31207, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"temp_sodr\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b91d38", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 31228, + "line": 1026, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 31241, + "col": 22, + "tokLen": 16 + } + }, + "inner": [ + { + "id": "0x7f0da6b91d08", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31235, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 31241, + "col": 22, + "tokLen": 16 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf5e0", + "kind": "EnumConstantDecl", + "name": "TEMPERATURE_SODR", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b93078", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 31263, + "line": 1027, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 31308, + "line": 1028, + "col": 22, + "tokLen": 17 + } + }, + "inner": [ + { + "id": "0x7f0da6b92fc8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 31267, + "line": 1027, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31272, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b92fb0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31269, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31269, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b92f90", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31269, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31269, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b91d68", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31267, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31267, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b92f78", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31272, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 31272, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b91d88", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 31272, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 31272, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char[12]" + }, + "valueCategory": "lvalue", + "value": "\"temp_fpgafl\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b93068", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 31295, + "line": 1028, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 31308, + "col": 22, + "tokLen": 17 + } + }, + "inner": [ + { + "id": "0x7f0da6b93038", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31302, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 31308, + "col": 22, + "tokLen": 17 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf630", + "kind": "EnumConstantDecl", + "name": "TEMPERATURE_FPGA2", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b943a8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 31331, + "line": 1029, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 31376, + "line": 1030, + "col": 22, + "tokLen": 17 + } + }, + "inner": [ + { + "id": "0x7f0da6b942f8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 31335, + "line": 1029, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31340, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b942e0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31337, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31337, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b942c0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31337, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31337, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b93098", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31335, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31335, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b942a8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31340, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 31340, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b930b8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 31340, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 31340, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char[12]" + }, + "valueCategory": "lvalue", + "value": "\"temp_fpgafr\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b94398", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 31363, + "line": 1030, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 31376, + "col": 22, + "tokLen": 17 + } + }, + "inner": [ + { + "id": "0x7f0da6b94368", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31370, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 31376, + "col": 22, + "tokLen": 17 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf680", + "kind": "EnumConstantDecl", + "name": "TEMPERATURE_FPGA3", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b956d8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 31399, + "line": 1031, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 31445, + "line": 1032, + "col": 22, + "tokLen": 13 + } + }, + "inner": [ + { + "id": "0x7f0da6b95628", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 31403, + "line": 1031, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31408, + "col": 14, + "tokLen": 14 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b95610", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31405, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31405, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b955f0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31405, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31405, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b943c8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31403, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31403, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b955d8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31408, + "col": 14, + "tokLen": 14 + }, + "end": { + "offset": 31408, + "col": 14, + "tokLen": 14 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b943e8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 31408, + "col": 14, + "tokLen": 14 + }, + "end": { + "offset": 31408, + "col": 14, + "tokLen": 14 + } + }, + "type": { + "qualType": "const char[13]" + }, + "valueCategory": "lvalue", + "value": "\"temp_slowadc\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b956c8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 31432, + "line": 1032, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 31445, + "col": 22, + "tokLen": 13 + } + }, + "inner": [ + { + "id": "0x7f0da6b95698", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31439, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 31445, + "col": 22, + "tokLen": 13 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc00a0", + "kind": "EnumConstantDecl", + "name": "SLOW_ADC_TEMP", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b95d68", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 31464, + "line": 1033, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 31507, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6b95d50", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 31464, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 31507, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b95d20", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 31470, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 31507, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b95d08", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 31470, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 31507, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6b95ce0", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 31470, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 31507, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6b95cc0", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 31470, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 31507, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b95cb8", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b95c88", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 31470, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 31507, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b95c70", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 31483, + "col": 24, + "tokLen": 20 + }, + "end": { + "offset": 31506, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6b95c58", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31483, + "col": 24, + "tokLen": 20 + }, + "end": { + "offset": 31506, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b95c38", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 31483, + "col": 24, + "tokLen": 20 + }, + "end": { + "offset": 31506, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b95c30", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b95bf8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 31483, + "col": 24, + "tokLen": 20 + }, + "end": { + "offset": 31506, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b95be0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31504, + "col": 45, + "tokLen": 1 + }, + "end": { + "offset": 31504, + "col": 45, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b95bc0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31504, + "col": 45, + "tokLen": 1 + }, + "end": { + "offset": 31504, + "col": 45, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6b95ba8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31483, + "col": 24, + "tokLen": 20 + }, + "end": { + "offset": 31483, + "col": 24, + "tokLen": 20 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b95708", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 31483, + "col": 24, + "tokLen": 20 + }, + "end": { + "offset": 31483, + "col": 24, + "tokLen": 20 + } + }, + "type": { + "qualType": "const char[19]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown dac Index \"" + } + ] + }, + { + "id": "0x7f0da6b95738", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31506, + "col": 47, + "tokLen": 1 + }, + "end": { + "offset": 31506, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +} +{ + "id": "0x7f0da6b961f8", + "kind": "FunctionDecl", + "loc": { + "offset": 31541, + "file": "ToString.cpp", + "line": 1036, + "col": 29, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 31513, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 31901, + "line": 1046, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d3789b8", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs9burstModeEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::burstMode (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::burstMode" + }, + "inner": [ + { + "id": "0x2cdc1230", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::burstMode" + }, + "decl": { + "id": "0x2cdc1188", + "kind": "EnumDecl", + "name": "burstMode" + } + } + ] + }, + { + "id": "0x7f0da6b96120", + "kind": "ParmVarDecl", + "loc": { + "offset": 31569, + "line": 1036, + "col": 57, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 31550, + "col": 38, + "tokLen": 5 + }, + "end": { + "offset": 31569, + "col": 57, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6b9b730", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 31572, + "col": 60, + "tokLen": 1 + }, + "end": { + "offset": 31901, + "line": 1046, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b976f8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 31578, + "line": 1037, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 31626, + "line": 1038, + "col": 22, + "tokLen": 14 + } + }, + "inner": [ + { + "id": "0x7f0da6b97648", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 31582, + "line": 1037, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31587, + "col": 14, + "tokLen": 16 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b97630", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31584, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31584, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b97610", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31584, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31584, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b963e0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31582, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31582, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b96120", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b975f8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31587, + "col": 14, + "tokLen": 16 + }, + "end": { + "offset": 31587, + "col": 14, + "tokLen": 16 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b96400", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 31587, + "col": 14, + "tokLen": 16 + }, + "end": { + "offset": 31587, + "col": 14, + "tokLen": 16 + } + }, + "type": { + "qualType": "const char[15]" + }, + "valueCategory": "lvalue", + "value": "\"burst_internal\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b976e8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 31613, + "line": 1038, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 31626, + "col": 22, + "tokLen": 14 + } + }, + "inner": [ + { + "id": "0x7f0da6b976b8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31620, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 31626, + "col": 22, + "tokLen": 14 + } + }, + "type": { + "qualType": "slsDetectorDefs::burstMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc1250", + "kind": "EnumConstantDecl", + "name": "BURST_INTERNAL", + "type": { + "qualType": "slsDetectorDefs::burstMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b98a28", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 31646, + "line": 1039, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 31694, + "line": 1040, + "col": 22, + "tokLen": 14 + } + }, + "inner": [ + { + "id": "0x7f0da6b98978", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 31650, + "line": 1039, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31655, + "col": 14, + "tokLen": 16 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b98960", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31652, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31652, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b98940", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31652, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31652, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b97718", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31650, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31650, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b96120", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b98928", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31655, + "col": 14, + "tokLen": 16 + }, + "end": { + "offset": 31655, + "col": 14, + "tokLen": 16 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b97738", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 31655, + "col": 14, + "tokLen": 16 + }, + "end": { + "offset": 31655, + "col": 14, + "tokLen": 16 + } + }, + "type": { + "qualType": "const char[15]" + }, + "valueCategory": "lvalue", + "value": "\"burst_external\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b98a18", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 31681, + "line": 1040, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 31694, + "col": 22, + "tokLen": 14 + } + }, + "inner": [ + { + "id": "0x7f0da6b989e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31688, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 31694, + "col": 22, + "tokLen": 14 + } + }, + "type": { + "qualType": "slsDetectorDefs::burstMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc12a0", + "kind": "EnumConstantDecl", + "name": "BURST_EXTERNAL", + "type": { + "qualType": "slsDetectorDefs::burstMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b99d58", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 31714, + "line": 1041, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 31759, + "line": 1042, + "col": 22, + "tokLen": 19 + } + }, + "inner": [ + { + "id": "0x7f0da6b99ca8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 31718, + "line": 1041, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31723, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b99c90", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31720, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31720, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b99c70", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31720, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31720, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b98a48", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31718, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31718, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b96120", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b99c58", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31723, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 31723, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b98a68", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 31723, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 31723, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char[12]" + }, + "valueCategory": "lvalue", + "value": "\"cw_internal\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b99d48", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 31746, + "line": 1042, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 31759, + "col": 22, + "tokLen": 19 + } + }, + "inner": [ + { + "id": "0x7f0da6b99d18", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31753, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 31759, + "col": 22, + "tokLen": 19 + } + }, + "type": { + "qualType": "slsDetectorDefs::burstMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc12f0", + "kind": "EnumConstantDecl", + "name": "CONTINUOUS_INTERNAL", + "type": { + "qualType": "slsDetectorDefs::burstMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b9b088", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 31784, + "line": 1043, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 31829, + "line": 1044, + "col": 22, + "tokLen": 19 + } + }, + "inner": [ + { + "id": "0x7f0da6b9afd8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 31788, + "line": 1043, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31793, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b9afc0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31790, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31790, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b9afa0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31790, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31790, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b99d78", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31788, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31788, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b96120", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b9af88", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31793, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 31793, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b99d98", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 31793, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 31793, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char[12]" + }, + "valueCategory": "lvalue", + "value": "\"cw_external\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b9b078", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 31816, + "line": 1044, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 31829, + "col": 22, + "tokLen": 19 + } + }, + "inner": [ + { + "id": "0x7f0da6b9b048", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31823, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 31829, + "col": 22, + "tokLen": 19 + } + }, + "type": { + "qualType": "slsDetectorDefs::burstMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc1340", + "kind": "EnumConstantDecl", + "name": "CONTINUOUS_EXTERNAL", + "type": { + "qualType": "slsDetectorDefs::burstMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b9b718", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 31854, + "line": 1045, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 31898, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6b9b700", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 31854, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 31898, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b9b6d0", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 31860, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 31898, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b9b6b8", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 31860, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 31898, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6b9b690", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 31860, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 31898, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6b9b670", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 31860, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 31898, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b9b668", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b9b638", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 31860, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 31898, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b9b620", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 31873, + "col": 24, + "tokLen": 21 + }, + "end": { + "offset": 31897, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6b9b608", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31873, + "col": 24, + "tokLen": 21 + }, + "end": { + "offset": 31897, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b9b5e8", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 31873, + "col": 24, + "tokLen": 21 + }, + "end": { + "offset": 31897, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b9b5e0", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b9b5a8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 31873, + "col": 24, + "tokLen": 21 + }, + "end": { + "offset": 31897, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b9b590", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31895, + "col": 46, + "tokLen": 1 + }, + "end": { + "offset": 31895, + "col": 46, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b9b570", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31895, + "col": 46, + "tokLen": 1 + }, + "end": { + "offset": 31895, + "col": 46, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6b9b558", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31873, + "col": 24, + "tokLen": 21 + }, + "end": { + "offset": 31873, + "col": 24, + "tokLen": 21 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b9b0b8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 31873, + "col": 24, + "tokLen": 21 + }, + "end": { + "offset": 31873, + "col": 24, + "tokLen": 21 + } + }, + "type": { + "qualType": "const char[20]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown burst mode \"" + } + ] + }, + { + "id": "0x7f0da6b9b0e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31897, + "col": 48, + "tokLen": 1 + }, + "end": { + "offset": 31897, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b96120", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +} +{ + "id": "0x7f0da6b9b8e8", + "kind": "FunctionDecl", + "loc": { + "offset": 31939, + "file": "ToString.cpp", + "line": 1048, + "col": 36, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 31904, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 32157, + "line": 1054, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d378f08", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs16timingSourceTypeEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::timingSourceType (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::timingSourceType" + }, + "inner": [ + { + "id": "0x2cdc14b0", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::timingSourceType" + }, + "decl": { + "id": "0x2cdc1408", + "kind": "EnumDecl", + "name": "timingSourceType" + } + } + ] + }, + { + "id": "0x7f0da6b9b810", + "kind": "ParmVarDecl", + "loc": { + "offset": 31967, + "line": 1048, + "col": 64, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 31948, + "col": 45, + "tokLen": 5 + }, + "end": { + "offset": 31967, + "col": 64, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6b5d808", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 31970, + "col": 67, + "tokLen": 1 + }, + "end": { + "offset": 32157, + "line": 1054, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b5bdf8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 31976, + "line": 1049, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 32018, + "line": 1050, + "col": 22, + "tokLen": 15 + } + }, + "inner": [ + { + "id": "0x7f0da6b5bd48", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 31980, + "line": 1049, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31985, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b5bd30", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31982, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31982, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b5bd10", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31982, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31982, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b9bad0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31980, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31980, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b9b810", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b5bcf8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31985, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 31985, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b9baf0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 31985, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 31985, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"internal\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b5bde8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 32005, + "line": 1050, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 32018, + "col": 22, + "tokLen": 15 + } + }, + "inner": [ + { + "id": "0x7f0da6b5bdb8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32012, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 32018, + "col": 22, + "tokLen": 15 + } + }, + "type": { + "qualType": "slsDetectorDefs::timingSourceType" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc14d0", + "kind": "EnumConstantDecl", + "name": "TIMING_INTERNAL", + "type": { + "qualType": "slsDetectorDefs::timingSourceType" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b5d128", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 32039, + "line": 1051, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 32081, + "line": 1052, + "col": 22, + "tokLen": 15 + } + }, + "inner": [ + { + "id": "0x7f0da6b5d078", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 32043, + "line": 1051, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32048, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b5d060", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32045, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32045, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b5d040", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32045, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32045, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b5be18", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32043, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32043, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b9b810", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b5d028", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32048, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 32048, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b5be38", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 32048, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 32048, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"external\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b5d118", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 32068, + "line": 1052, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 32081, + "col": 22, + "tokLen": 15 + } + }, + "inner": [ + { + "id": "0x7f0da6b5d0e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32075, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 32081, + "col": 22, + "tokLen": 15 + } + }, + "type": { + "qualType": "slsDetectorDefs::timingSourceType" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc1520", + "kind": "EnumConstantDecl", + "name": "TIMING_EXTERNAL", + "type": { + "qualType": "slsDetectorDefs::timingSourceType" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b5d7f0", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 32102, + "line": 1053, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 32154, + "col": 57, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6b5d7d8", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 32102, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 32154, + "col": 57, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b5d7a8", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 32108, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 32154, + "col": 57, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b5d790", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 32108, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 32154, + "col": 57, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6b5d768", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 32108, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 32154, + "col": 57, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6b5d748", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 32108, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 32154, + "col": 57, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b5d740", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b5d710", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 32108, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 32154, + "col": 57, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b5d6f8", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 32121, + "col": 24, + "tokLen": 29 + }, + "end": { + "offset": 32153, + "col": 56, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6b5d6e0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32121, + "col": 24, + "tokLen": 29 + }, + "end": { + "offset": 32153, + "col": 56, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b5d6c0", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 32121, + "col": 24, + "tokLen": 29 + }, + "end": { + "offset": 32153, + "col": 56, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b5d6b8", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b5d680", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 32121, + "col": 24, + "tokLen": 29 + }, + "end": { + "offset": 32153, + "col": 56, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b5d668", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32151, + "col": 54, + "tokLen": 1 + }, + "end": { + "offset": 32151, + "col": 54, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b5d648", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32151, + "col": 54, + "tokLen": 1 + }, + "end": { + "offset": 32151, + "col": 54, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6b5d630", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32121, + "col": 24, + "tokLen": 29 + }, + "end": { + "offset": 32121, + "col": 24, + "tokLen": 29 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b5d158", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 32121, + "col": 24, + "tokLen": 29 + }, + "end": { + "offset": 32121, + "col": 24, + "tokLen": 29 + } + }, + "type": { + "qualType": "const char[28]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown timing source type \"" + } + ] + }, + { + "id": "0x7f0da6b5d190", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32153, + "col": 56, + "tokLen": 1 + }, + "end": { + "offset": 32153, + "col": 56, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b9b810", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +} +{ + "id": "0x7f0da6b5d9a8", + "kind": "FunctionDecl", + "loc": { + "offset": 32190, + "file": "ToString.cpp", + "line": 1056, + "col": 31, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 32160, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 32600, + "line": 1070, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d379458", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs11M3_GainCapsEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::M3_GainCaps (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::M3_GainCaps" + }, + "inner": [ + { + "id": "0x2cdc1610", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::M3_GainCaps" + }, + "decl": { + "id": "0x2cdc1570", + "kind": "EnumDecl", + "name": "M3_GainCaps" + } + } + ] + }, + { + "id": "0x7f0da6b5d8d8", + "kind": "ParmVarDecl", + "loc": { + "offset": 32218, + "line": 1056, + "col": 59, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 32199, + "col": 40, + "tokLen": 5 + }, + "end": { + "offset": 32218, + "col": 59, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6b65530", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 32221, + "col": 62, + "tokLen": 1 + }, + "end": { + "offset": 32600, + "line": 1070, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b5ee98", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 32227, + "line": 1057, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 32267, + "line": 1058, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6b5ede8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 32231, + "line": 1057, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32236, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b5edd0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32233, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32233, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b5edb0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32233, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32233, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b5db90", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32231, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32231, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b5d8d8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b5ed98", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32236, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 32236, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b5dbb0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 32236, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 32236, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"C10pre\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b5ee88", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 32254, + "line": 1058, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 32267, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6b5ee58", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32261, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 32267, + "col": 22, + "tokLen": 9 + } + }, + "type": { + "qualType": "slsDetectorDefs::M3_GainCaps" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc16b0", + "kind": "EnumConstantDecl", + "name": "M3_C10pre", + "type": { + "qualType": "slsDetectorDefs::M3_GainCaps" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b601c8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 32282, + "line": 1059, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 32321, + "line": 1060, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b60118", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 32286, + "line": 1059, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32291, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b60100", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32288, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32288, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b600e0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32288, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32288, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b5eeb8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32286, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32286, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b5d8d8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b600c8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32291, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 32291, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b5eed8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 32291, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 32291, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"C15sh\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b601b8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 32308, + "line": 1060, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 32321, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b60188", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32315, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 32321, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::M3_GainCaps" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc1780", + "kind": "EnumConstantDecl", + "name": "M3_C15sh", + "type": { + "qualType": "slsDetectorDefs::M3_GainCaps" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b614f8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 32335, + "line": 1061, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 32374, + "line": 1062, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b61448", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 32339, + "line": 1061, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32344, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b61430", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32341, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32341, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b61410", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32341, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32341, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b601e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32339, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32339, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b5d8d8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b613f8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32344, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 32344, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b60208", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 32344, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 32344, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"C30sh\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b614e8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 32361, + "line": 1062, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 32374, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b614b8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32368, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 32374, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::M3_GainCaps" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc1850", + "kind": "EnumConstantDecl", + "name": "M3_C30sh", + "type": { + "qualType": "slsDetectorDefs::M3_GainCaps" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b62828", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 32388, + "line": 1063, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 32427, + "line": 1064, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b62778", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 32392, + "line": 1063, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32397, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b62760", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32394, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32394, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b62740", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32394, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32394, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b61518", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32392, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32392, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b5d8d8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b62728", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32397, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 32397, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b61538", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 32397, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 32397, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"C50sh\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b62818", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 32414, + "line": 1064, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 32427, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b627e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32421, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 32427, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::M3_GainCaps" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc1920", + "kind": "EnumConstantDecl", + "name": "M3_C50sh", + "type": { + "qualType": "slsDetectorDefs::M3_GainCaps" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b63b58", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 32441, + "line": 1065, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 32483, + "line": 1066, + "col": 22, + "tokLen": 11 + } + }, + "inner": [ + { + "id": "0x7f0da6b63aa8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 32445, + "line": 1065, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32450, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b63a90", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32447, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32447, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b63a70", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32447, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32447, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b62848", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32445, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32445, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b5d8d8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b63a58", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32450, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 32450, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b62868", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 32450, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 32450, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"C225ACsh\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b63b48", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 32470, + "line": 1066, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 32483, + "col": 22, + "tokLen": 11 + } + }, + "inner": [ + { + "id": "0x7f0da6b63b18", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32477, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 32483, + "col": 22, + "tokLen": 11 + } + }, + "type": { + "qualType": "slsDetectorDefs::M3_GainCaps" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc19f0", + "kind": "EnumConstantDecl", + "name": "M3_C225ACsh", + "type": { + "qualType": "slsDetectorDefs::M3_GainCaps" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b64e88", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 32500, + "line": 1067, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 32540, + "line": 1068, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6b64dd8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 32504, + "line": 1067, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32509, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b64dc0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32506, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32506, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b64da0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32506, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32506, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b63b78", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32504, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32504, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b5d8d8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b64d88", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32509, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 32509, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b63b98", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 32509, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 32509, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"C15pre\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b64e78", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 32527, + "line": 1068, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 32540, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6b64e48", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32534, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 32540, + "col": 22, + "tokLen": 9 + } + }, + "type": { + "qualType": "slsDetectorDefs::M3_GainCaps" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc1ac0", + "kind": "EnumConstantDecl", + "name": "M3_C15pre", + "type": { + "qualType": "slsDetectorDefs::M3_GainCaps" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b65518", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 32555, + "line": 1069, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 32597, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6b65500", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 32555, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 32597, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b654d0", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 32561, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 32597, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b654b8", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 32561, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 32597, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6b65490", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 32561, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 32597, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6b65470", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 32561, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 32597, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b65468", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b65438", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 32561, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 32597, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b65420", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 32574, + "col": 24, + "tokLen": 19 + }, + "end": { + "offset": 32596, + "col": 46, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6b65408", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32574, + "col": 24, + "tokLen": 19 + }, + "end": { + "offset": 32596, + "col": 46, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b653e8", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 32574, + "col": 24, + "tokLen": 19 + }, + "end": { + "offset": 32596, + "col": 46, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b653e0", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b653a8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 32574, + "col": 24, + "tokLen": 19 + }, + "end": { + "offset": 32596, + "col": 46, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b65390", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32594, + "col": 44, + "tokLen": 1 + }, + "end": { + "offset": 32594, + "col": 44, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b65370", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32594, + "col": 44, + "tokLen": 1 + }, + "end": { + "offset": 32594, + "col": 44, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6b65358", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32574, + "col": 24, + "tokLen": 19 + }, + "end": { + "offset": 32574, + "col": 24, + "tokLen": 19 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b64eb8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 32574, + "col": 24, + "tokLen": 19 + }, + "end": { + "offset": 32574, + "col": 24, + "tokLen": 19 + } + }, + "type": { + "qualType": "const char[18]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown gain cap \"" + } + ] + }, + { + "id": "0x7f0da6b64ee8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32596, + "col": 46, + "tokLen": 1 + }, + "end": { + "offset": 32596, + "col": 46, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b5d8d8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +} +{ + "id": "0x7f0da6b656f8", + "kind": "FunctionDecl", + "loc": { + "offset": 32634, + "file": "ToString.cpp", + "line": 1072, + "col": 32, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 32603, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 32917, + "line": 1082, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d3799a8", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs12portPositionEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::portPosition (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::portPosition" + }, + "inner": [ + { + "id": "0x2cdc1c40", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::portPosition" + }, + "decl": { + "id": "0x2cdc1ba0", + "kind": "EnumDecl", + "name": "portPosition" + } + } + ] + }, + { + "id": "0x7f0da6b65620", + "kind": "ParmVarDecl", + "loc": { + "offset": 32662, + "line": 1072, + "col": 60, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 32643, + "col": 41, + "tokLen": 5 + }, + "end": { + "offset": 32662, + "col": 60, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6b6ac20", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 32665, + "col": 63, + "tokLen": 1 + }, + "end": { + "offset": 32917, + "line": 1082, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b66be8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 32671, + "line": 1073, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 32709, + "line": 1074, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6b66b38", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 32675, + "line": 1073, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32680, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b66b20", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32677, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32677, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b66b00", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32677, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32677, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b658e0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32675, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32675, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b65620", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b66ae8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32680, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 32680, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b65900", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 32680, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 32680, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char[5]" + }, + "valueCategory": "lvalue", + "value": "\"left\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b66bd8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 32696, + "line": 1074, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 32709, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6b66ba8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32703, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 32709, + "col": 22, + "tokLen": 4 + } + }, + "type": { + "qualType": "slsDetectorDefs::portPosition" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc1c60", + "kind": "EnumConstantDecl", + "name": "LEFT", + "type": { + "qualType": "slsDetectorDefs::portPosition" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b67f18", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 32719, + "line": 1075, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 32758, + "line": 1076, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6b67e68", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 32723, + "line": 1075, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32728, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b67e50", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32725, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32725, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b67e30", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32725, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32725, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b66c08", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32723, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32723, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b65620", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b67e18", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32728, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 32728, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b66c28", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 32728, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 32728, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"right\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b67f08", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 32745, + "line": 1076, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 32758, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6b67ed8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32752, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 32758, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::portPosition" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc1cb0", + "kind": "EnumConstantDecl", + "name": "RIGHT", + "type": { + "qualType": "slsDetectorDefs::portPosition" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b69248", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 32769, + "line": 1077, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 32806, + "line": 1078, + "col": 22, + "tokLen": 3 + } + }, + "inner": [ + { + "id": "0x7f0da6b69198", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 32773, + "line": 1077, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32778, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b69180", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32775, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32775, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b69160", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32775, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32775, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b67f38", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32773, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32773, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b65620", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b69148", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32778, + "col": 14, + "tokLen": 5 + }, + "end": { + "offset": 32778, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b67f58", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 32778, + "col": 14, + "tokLen": 5 + }, + "end": { + "offset": 32778, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "const char[4]" + }, + "valueCategory": "lvalue", + "value": "\"top\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b69238", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 32793, + "line": 1078, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 32806, + "col": 22, + "tokLen": 3 + } + }, + "inner": [ + { + "id": "0x7f0da6b69208", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32800, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 32806, + "col": 22, + "tokLen": 3 + } + }, + "type": { + "qualType": "slsDetectorDefs::portPosition" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc1d00", + "kind": "EnumConstantDecl", + "name": "TOP", + "type": { + "qualType": "slsDetectorDefs::portPosition" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b6a578", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 32815, + "line": 1079, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 32855, + "line": 1080, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6b6a4c8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 32819, + "line": 1079, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32824, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b6a4b0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32821, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32821, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b6a490", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32821, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32821, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b69268", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32819, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32819, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b65620", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b6a478", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32824, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 32824, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b69288", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 32824, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 32824, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"bottom\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b6a568", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 32842, + "line": 1080, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 32855, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6b6a538", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32849, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 32855, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::portPosition" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc1d50", + "kind": "EnumConstantDecl", + "name": "BOTTOM", + "type": { + "qualType": "slsDetectorDefs::portPosition" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b6ac08", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 32867, + "line": 1081, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 32914, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6b6abf0", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 32867, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 32914, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b6abc0", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 32873, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 32914, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b6aba8", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 32873, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 32914, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6b6ab80", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 32873, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 32914, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6b6ab60", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 32873, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 32914, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b6ab58", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b6ab28", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 32873, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 32914, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b6ab10", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 32886, + "col": 24, + "tokLen": 24 + }, + "end": { + "offset": 32913, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6b6aaf8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32886, + "col": 24, + "tokLen": 24 + }, + "end": { + "offset": 32913, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b6aad8", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 32886, + "col": 24, + "tokLen": 24 + }, + "end": { + "offset": 32913, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b6aad0", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b6aa98", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 32886, + "col": 24, + "tokLen": 24 + }, + "end": { + "offset": 32913, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b6aa80", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32911, + "col": 49, + "tokLen": 1 + }, + "end": { + "offset": 32911, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b6aa60", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32911, + "col": 49, + "tokLen": 1 + }, + "end": { + "offset": 32911, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6b6aa48", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32886, + "col": 24, + "tokLen": 24 + }, + "end": { + "offset": 32886, + "col": 24, + "tokLen": 24 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b6a5a8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 32886, + "col": 24, + "tokLen": 24 + }, + "end": { + "offset": 32886, + "col": 24, + "tokLen": 24 + } + }, + "type": { + "qualType": "const char[23]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown port position \"" + } + ] + }, + { + "id": "0x7f0da6b6a5d8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32913, + "col": 51, + "tokLen": 1 + }, + "end": { + "offset": 32913, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b65620", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +} +{ + "id": "0x7f0da6b6add8", + "kind": "FunctionDecl", + "loc": { + "offset": 32957, + "file": "ToString.cpp", + "line": 1084, + "col": 38, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 32920, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 33380, + "line": 1095, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d379ef8", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs18streamingInterfaceEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::streamingInterface (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::streamingInterface" + }, + "inner": [ + { + "id": "0x2cdc1fd0", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::streamingInterface" + }, + "decl": { + "id": "0x2cdc1f30", + "kind": "EnumDecl", + "name": "streamingInterface" + } + } + ] + }, + { + "id": "0x7f0da6b6ad00", + "kind": "ParmVarDecl", + "loc": { + "offset": 32985, + "line": 1084, + "col": 66, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 32966, + "col": 47, + "tokLen": 5 + }, + "end": { + "offset": 32985, + "col": 66, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6b6f708", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 32988, + "col": 69, + "tokLen": 1 + }, + "end": { + "offset": 33380, + "line": 1095, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b6b0c0", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 32994, + "line": 1085, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 33012, + "col": 23, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b6b008", + "kind": "VarDecl", + "loc": { + "offset": 33006, + "col": 17, + "tokLen": 2 + }, + "range": { + "begin": { + "offset": 32994, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 33011, + "col": 22, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "rs", + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "init": "c", + "inner": [ + { + "id": "0x7f0da6b6b090", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 33011, + "col": 22, + "tokLen": 1 + }, + "end": { + "offset": 33011, + "col": 22, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const basic_string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b6b070", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33011, + "col": 22, + "tokLen": 1 + }, + "end": { + "offset": 33011, + "col": 22, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b6ad00", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6b6b610", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 33018, + "line": 1086, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 33085, + "line": 1087, + "col": 30, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b6b320", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 33022, + "line": 1086, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33050, + "col": 37, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "!=", + "inner": [ + { + "id": "0x7f0da6b6b1b0", + "kind": "CXXMemberCallExpr", + "range": { + "begin": { + "offset": 33022, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33032, + "col": 19, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b6b180", + "kind": "MemberExpr", + "range": { + "begin": { + "offset": 33022, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33024, + "col": 11, + "tokLen": 4 + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "name": "find", + "isArrow": false, + "referencedMemberDecl": "0x2c8caab0", + "inner": [ + { + "id": "0x7f0da6b6b0d8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33022, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33022, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b6ad00", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + }, + { + "id": "0x7f0da6b6b168", + "kind": "CharacterLiteral", + "range": { + "begin": { + "offset": 33029, + "col": 16, + "tokLen": 3 + }, + "end": { + "offset": 33029, + "col": 16, + "tokLen": 3 + } + }, + "type": { + "qualType": "char" + }, + "valueCategory": "prvalue", + "value": 44 + }, + { + "id": "0x7f0da6b6b1f8", + "kind": "CXXDefaultArgExpr", + "range": { + "begin": {}, + "end": {} + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue" + } + ] + }, + { + "id": "0x7f0da6b6b308", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33037, + "col": 24, + "tokLen": 3 + }, + "end": { + "offset": 33050, + "col": 37, + "tokLen": 4 + } + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "inner": [ + { + "id": "0x7f0da6b6b2d8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33037, + "col": 24, + "tokLen": 3 + }, + "end": { + "offset": 33050, + "col": 37, + "tokLen": 4 + } + }, + "type": { + "desugaredQualType": "const unsigned long", + "qualType": "const typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d0eda20", + "kind": "VarDecl", + "name": "npos", + "type": { + "desugaredQualType": "const unsigned long", + "qualType": "const typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + } + }, + "nonOdrUseReason": "constant" + } + ] + } + ] + }, + { + "id": "0x7f0da6b6b568", + "kind": "CXXMemberCallExpr", + "range": { + "begin": { + "offset": 33064, + "line": 1087, + "col": 9, + "tokLen": 2 + }, + "end": { + "offset": 33085, + "col": 30, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string" + }, + "valueCategory": "lvalue", + "inner": [ + { + "id": "0x7f0da6b6b538", + "kind": "MemberExpr", + "range": { + "begin": { + "offset": 33064, + "col": 9, + "tokLen": 2 + }, + "end": { + "offset": 33067, + "col": 12, + "tokLen": 5 + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "name": "erase", + "isArrow": false, + "referencedMemberDecl": "0x2c8c3390", + "inner": [ + { + "id": "0x7f0da6b6b340", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33064, + "col": 9, + "tokLen": 2 + }, + "end": { + "offset": 33064, + "col": 9, + "tokLen": 2 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b6b008", + "kind": "VarDecl", + "name": "rs", + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + } + } + } + ] + }, + { + "id": "0x7f0da6b6b4a0", + "kind": "CXXMemberCallExpr", + "range": { + "begin": { + "offset": 33073, + "col": 18, + "tokLen": 2 + }, + "end": { + "offset": 33084, + "col": 29, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b6b470", + "kind": "MemberExpr", + "range": { + "begin": { + "offset": 33073, + "col": 18, + "tokLen": 2 + }, + "end": { + "offset": 33076, + "col": 21, + "tokLen": 4 + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "name": "find", + "isArrow": false, + "referencedMemberDecl": "0x2c8caab0", + "inner": [ + { + "id": "0x7f0da6b6b4d0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33073, + "col": 18, + "tokLen": 2 + }, + "end": { + "offset": 33073, + "col": 18, + "tokLen": 2 + } + }, + "type": { + "qualType": "const std::basic_string" + }, + "valueCategory": "lvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b6b3c8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33073, + "col": 18, + "tokLen": 2 + }, + "end": { + "offset": 33073, + "col": 18, + "tokLen": 2 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b6b008", + "kind": "VarDecl", + "name": "rs", + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b6b458", + "kind": "CharacterLiteral", + "range": { + "begin": { + "offset": 33081, + "col": 26, + "tokLen": 3 + }, + "end": { + "offset": 33081, + "col": 26, + "tokLen": 3 + } + }, + "type": { + "qualType": "char" + }, + "valueCategory": "prvalue", + "value": 44 + }, + { + "id": "0x7f0da6b6b4e8", + "kind": "CXXDefaultArgExpr", + "range": { + "begin": {}, + "end": {} + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue" + } + ] + }, + { + "id": "0x7f0da6b6b5f0", + "kind": "CXXDefaultArgExpr", + "range": { + "begin": {}, + "end": {} + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue" + } + ] + } + ] + }, + { + "id": "0x7f0da6b6c968", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 33092, + "line": 1088, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 33151, + "line": 1089, + "col": 42, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6b6c8a0", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 33096, + "line": 1088, + "col": 9, + "tokLen": 2 + }, + "end": { + "offset": 33102, + "col": 15, + "tokLen": 6 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b6c888", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33099, + "col": 12, + "tokLen": 2 + }, + "end": { + "offset": 33099, + "col": 12, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b6c868", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33099, + "col": 12, + "tokLen": 2 + }, + "end": { + "offset": 33099, + "col": 12, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b6c838", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33096, + "col": 9, + "tokLen": 2 + }, + "end": { + "offset": 33096, + "col": 9, + "tokLen": 2 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b6b630", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33096, + "col": 9, + "tokLen": 2 + }, + "end": { + "offset": 33096, + "col": 9, + "tokLen": 2 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b6b008", + "kind": "VarDecl", + "name": "rs", + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + } + } + } + ] + }, + { + "id": "0x7f0da6b6c850", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33102, + "col": 15, + "tokLen": 6 + }, + "end": { + "offset": 33102, + "col": 15, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b6b650", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 33102, + "col": 15, + "tokLen": 6 + }, + "end": { + "offset": 33102, + "col": 15, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char[5]" + }, + "valueCategory": "lvalue", + "value": "\"none\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b6c958", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 33118, + "line": 1089, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 33151, + "col": 42, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6b6c928", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33125, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 33151, + "col": 42, + "tokLen": 4 + } + }, + "type": { + "qualType": "slsDetectorDefs::streamingInterface" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc2030", + "kind": "EnumConstantDecl", + "name": "NONE", + "type": { + "qualType": "slsDetectorDefs::streamingInterface" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b6dcc8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 33161, + "line": 1090, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 33219, + "line": 1091, + "col": 42, + "tokLen": 16 + } + }, + "inner": [ + { + "id": "0x7f0da6b6dc00", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 33165, + "line": 1090, + "col": 9, + "tokLen": 2 + }, + "end": { + "offset": 33171, + "col": 15, + "tokLen": 5 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b6dbe8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33168, + "col": 12, + "tokLen": 2 + }, + "end": { + "offset": 33168, + "col": 12, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b6dbc8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33168, + "col": 12, + "tokLen": 2 + }, + "end": { + "offset": 33168, + "col": 12, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b6db98", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33165, + "col": 9, + "tokLen": 2 + }, + "end": { + "offset": 33165, + "col": 9, + "tokLen": 2 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b6c988", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33165, + "col": 9, + "tokLen": 2 + }, + "end": { + "offset": 33165, + "col": 9, + "tokLen": 2 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b6b008", + "kind": "VarDecl", + "name": "rs", + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + } + } + } + ] + }, + { + "id": "0x7f0da6b6dbb0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33171, + "col": 15, + "tokLen": 5 + }, + "end": { + "offset": 33171, + "col": 15, + "tokLen": 5 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b6c9a8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 33171, + "col": 15, + "tokLen": 5 + }, + "end": { + "offset": 33171, + "col": 15, + "tokLen": 5 + } + }, + "type": { + "qualType": "const char[4]" + }, + "valueCategory": "lvalue", + "value": "\"lll\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b6dcb8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 33186, + "line": 1091, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 33219, + "col": 42, + "tokLen": 16 + } + }, + "inner": [ + { + "id": "0x7f0da6b6dc88", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33193, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 33219, + "col": 42, + "tokLen": 16 + } + }, + "type": { + "qualType": "slsDetectorDefs::streamingInterface" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc2100", + "kind": "EnumConstantDecl", + "name": "LOW_LATENCY_LINK", + "type": { + "qualType": "slsDetectorDefs::streamingInterface" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b6f028", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 33241, + "line": 1092, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 33301, + "line": 1093, + "col": 42, + "tokLen": 13 + } + }, + "inner": [ + { + "id": "0x7f0da6b6ef60", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 33245, + "line": 1092, + "col": 9, + "tokLen": 2 + }, + "end": { + "offset": 33251, + "col": 15, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b6ef48", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33248, + "col": 12, + "tokLen": 2 + }, + "end": { + "offset": 33248, + "col": 12, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b6ef28", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33248, + "col": 12, + "tokLen": 2 + }, + "end": { + "offset": 33248, + "col": 12, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b6eef8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33245, + "col": 9, + "tokLen": 2 + }, + "end": { + "offset": 33245, + "col": 9, + "tokLen": 2 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b6dce8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33245, + "col": 9, + "tokLen": 2 + }, + "end": { + "offset": 33245, + "col": 9, + "tokLen": 2 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b6b008", + "kind": "VarDecl", + "name": "rs", + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + } + } + } + ] + }, + { + "id": "0x7f0da6b6ef10", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33251, + "col": 15, + "tokLen": 7 + }, + "end": { + "offset": 33251, + "col": 15, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b6dd08", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 33251, + "col": 15, + "tokLen": 7 + }, + "end": { + "offset": 33251, + "col": 15, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"10gbe\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b6f018", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 33268, + "line": 1093, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 33301, + "col": 42, + "tokLen": 13 + } + }, + "inner": [ + { + "id": "0x7f0da6b6efe8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33275, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 33301, + "col": 42, + "tokLen": 13 + } + }, + "type": { + "qualType": "slsDetectorDefs::streamingInterface" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc21d0", + "kind": "EnumConstantDecl", + "name": "ETHERNET_10GB", + "type": { + "qualType": "slsDetectorDefs::streamingInterface" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b6f6f0", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 33320, + "line": 1094, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 33377, + "col": 62, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6b6f6d8", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 33320, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 33377, + "col": 62, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b6f6a8", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 33326, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 33377, + "col": 62, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b6f690", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 33326, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 33377, + "col": 62, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6b6f668", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 33326, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 33377, + "col": 62, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6b6f648", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 33326, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 33377, + "col": 62, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b6f640", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b6f610", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 33326, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 33377, + "col": 62, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b6f5f8", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 33339, + "col": 24, + "tokLen": 34 + }, + "end": { + "offset": 33376, + "col": 61, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6b6f5e0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33339, + "col": 24, + "tokLen": 34 + }, + "end": { + "offset": 33376, + "col": 61, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b6f5c0", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 33339, + "col": 24, + "tokLen": 34 + }, + "end": { + "offset": 33376, + "col": 61, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b6f5b8", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b6f580", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 33339, + "col": 24, + "tokLen": 34 + }, + "end": { + "offset": 33376, + "col": 61, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b6f568", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33374, + "col": 59, + "tokLen": 1 + }, + "end": { + "offset": 33374, + "col": 59, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b6f548", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33374, + "col": 59, + "tokLen": 1 + }, + "end": { + "offset": 33374, + "col": 59, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6b6f530", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33339, + "col": 24, + "tokLen": 34 + }, + "end": { + "offset": 33339, + "col": 24, + "tokLen": 34 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b6f058", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 33339, + "col": 24, + "tokLen": 34 + }, + "end": { + "offset": 33339, + "col": 24, + "tokLen": 34 + } + }, + "type": { + "qualType": "const char[33]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown streamingInterface type \"" + } + ] + }, + { + "id": "0x7f0da6b6f090", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33376, + "col": 61, + "tokLen": 1 + }, + "end": { + "offset": 33376, + "col": 61, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b6ad00", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +} +{ + "id": "0x7f0da6b6f8c8", + "kind": "FunctionDecl", + "loc": { + "offset": 33415, + "file": "ToString.cpp", + "line": 1097, + "col": 33, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 33383, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 33605, + "line": 1103, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d37a448", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs13vetoAlgorithmEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::vetoAlgorithm (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::vetoAlgorithm" + }, + "inner": [ + { + "id": "0x2cdc2390", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::vetoAlgorithm" + }, + "decl": { + "id": "0x2cdc22f0", + "kind": "EnumDecl", + "name": "vetoAlgorithm" + } + } + ] + }, + { + "id": "0x7f0da6b6f7f0", + "kind": "ParmVarDecl", + "loc": { + "offset": 33443, + "line": 1097, + "col": 61, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 33424, + "col": 42, + "tokLen": 5 + }, + "end": { + "offset": 33443, + "col": 61, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6b72790", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 33446, + "col": 64, + "tokLen": 1 + }, + "end": { + "offset": 33605, + "line": 1103, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b70db8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 33452, + "line": 1098, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 33490, + "line": 1099, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b70d08", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 33456, + "line": 1098, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33461, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b70cf0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33458, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 33458, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b70cd0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33458, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 33458, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b6fab0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33456, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33456, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b6f7f0", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b70cb8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33461, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 33461, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b6fad0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 33461, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 33461, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char[5]" + }, + "valueCategory": "lvalue", + "value": "\"hits\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b70da8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 33477, + "line": 1099, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 33490, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b70d78", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33484, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 33490, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::vetoAlgorithm" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc23b0", + "kind": "EnumConstantDecl", + "name": "ALG_HITS", + "type": { + "qualType": "slsDetectorDefs::vetoAlgorithm" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b720e8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 33504, + "line": 1100, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 33541, + "line": 1101, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6b72038", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 33508, + "line": 1100, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33513, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b72020", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33510, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 33510, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b72000", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33510, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 33510, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b70dd8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33508, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33508, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b6f7f0", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b71fe8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33513, + "col": 14, + "tokLen": 5 + }, + "end": { + "offset": 33513, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b70df8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 33513, + "col": 14, + "tokLen": 5 + }, + "end": { + "offset": 33513, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "const char[4]" + }, + "valueCategory": "lvalue", + "value": "\"raw\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b720d8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 33528, + "line": 1101, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 33541, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6b720a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33535, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 33541, + "col": 22, + "tokLen": 7 + } + }, + "type": { + "qualType": "slsDetectorDefs::vetoAlgorithm" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc2400", + "kind": "EnumConstantDecl", + "name": "ALG_RAW", + "type": { + "qualType": "slsDetectorDefs::vetoAlgorithm" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b72778", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 33554, + "line": 1102, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 33602, + "col": 53, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6b72760", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 33554, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 33602, + "col": 53, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b72730", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 33560, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 33602, + "col": 53, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b72718", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 33560, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 33602, + "col": 53, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6b726f0", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 33560, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 33602, + "col": 53, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6b726d0", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 33560, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 33602, + "col": 53, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b726c8", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b72698", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 33560, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 33602, + "col": 53, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b72680", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 33573, + "col": 24, + "tokLen": 25 + }, + "end": { + "offset": 33601, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6b72668", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33573, + "col": 24, + "tokLen": 25 + }, + "end": { + "offset": 33601, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b72648", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 33573, + "col": 24, + "tokLen": 25 + }, + "end": { + "offset": 33601, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b72640", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b72608", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 33573, + "col": 24, + "tokLen": 25 + }, + "end": { + "offset": 33601, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b725f0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33599, + "col": 50, + "tokLen": 1 + }, + "end": { + "offset": 33599, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b725d0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33599, + "col": 50, + "tokLen": 1 + }, + "end": { + "offset": 33599, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6b725b8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33573, + "col": 24, + "tokLen": 25 + }, + "end": { + "offset": 33573, + "col": 24, + "tokLen": 25 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b72118", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 33573, + "col": 24, + "tokLen": 25 + }, + "end": { + "offset": 33573, + "col": 24, + "tokLen": 25 + } + }, + "type": { + "qualType": "const char[24]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown veto algorithm \"" + } + ] + }, + { + "id": "0x7f0da6b72148", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33601, + "col": 52, + "tokLen": 1 + }, + "end": { + "offset": 33601, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b6f7f0", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +} +{ + "id": "0x7f0da6b72938", + "kind": "FunctionDecl", + "loc": { + "offset": 33635, + "file": "ToString.cpp", + "line": 1105, + "col": 28, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 33608, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 34061, + "line": 1119, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d37a998", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs8gainModeEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::gainMode (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::gainMode" + }, + "inner": [ + { + "id": "0x2cdc24f0", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::gainMode" + }, + "decl": { + "id": "0x2cdc2450", + "kind": "EnumDecl", + "name": "gainMode" + } + } + ] + }, + { + "id": "0x7f0da6b72860", + "kind": "ParmVarDecl", + "loc": { + "offset": 33663, + "line": 1105, + "col": 56, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 33644, + "col": 37, + "tokLen": 5 + }, + "end": { + "offset": 33663, + "col": 56, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6b7a4c0", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 33666, + "col": 59, + "tokLen": 1 + }, + "end": { + "offset": 34061, + "line": 1119, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b73e28", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 33672, + "line": 1106, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 33713, + "line": 1107, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6b73d78", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 33676, + "line": 1106, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33681, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b73d60", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33678, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 33678, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b73d40", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33678, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 33678, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b72b20", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33676, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33676, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b72860", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b73d28", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33681, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 33681, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b72b40", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 33681, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 33681, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char[8]" + }, + "valueCategory": "lvalue", + "value": "\"dynamic\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b73e18", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 33700, + "line": 1107, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 33713, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6b73de8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33707, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 33713, + "col": 22, + "tokLen": 7 + } + }, + "type": { + "qualType": "slsDetectorDefs::gainMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc2510", + "kind": "EnumConstantDecl", + "name": "DYNAMIC", + "type": { + "qualType": "slsDetectorDefs::gainMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b75158", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 33726, + "line": 1108, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 33773, + "line": 1109, + "col": 22, + "tokLen": 15 + } + }, + "inner": [ + { + "id": "0x7f0da6b750a8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 33730, + "line": 1108, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33735, + "col": 14, + "tokLen": 15 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b75090", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33732, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 33732, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b75070", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33732, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 33732, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b73e48", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33730, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33730, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b72860", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b75058", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33735, + "col": 14, + "tokLen": 15 + }, + "end": { + "offset": 33735, + "col": 14, + "tokLen": 15 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b73e68", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 33735, + "col": 14, + "tokLen": 15 + }, + "end": { + "offset": 33735, + "col": 14, + "tokLen": 15 + } + }, + "type": { + "qualType": "const char[14]" + }, + "valueCategory": "lvalue", + "value": "\"forceswitchg1\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b75148", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 33760, + "line": 1109, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 33773, + "col": 22, + "tokLen": 15 + } + }, + "inner": [ + { + "id": "0x7f0da6b75118", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33767, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 33773, + "col": 22, + "tokLen": 15 + } + }, + "type": { + "qualType": "slsDetectorDefs::gainMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc2560", + "kind": "EnumConstantDecl", + "name": "FORCE_SWITCH_G1", + "type": { + "qualType": "slsDetectorDefs::gainMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b76488", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 33794, + "line": 1110, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 33841, + "line": 1111, + "col": 22, + "tokLen": 15 + } + }, + "inner": [ + { + "id": "0x7f0da6b763d8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 33798, + "line": 1110, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33803, + "col": 14, + "tokLen": 15 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b763c0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33800, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 33800, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b763a0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33800, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 33800, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b75178", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33798, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33798, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b72860", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b76388", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33803, + "col": 14, + "tokLen": 15 + }, + "end": { + "offset": 33803, + "col": 14, + "tokLen": 15 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b75198", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 33803, + "col": 14, + "tokLen": 15 + }, + "end": { + "offset": 33803, + "col": 14, + "tokLen": 15 + } + }, + "type": { + "qualType": "const char[14]" + }, + "valueCategory": "lvalue", + "value": "\"forceswitchg2\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b76478", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 33828, + "line": 1111, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 33841, + "col": 22, + "tokLen": 15 + } + }, + "inner": [ + { + "id": "0x7f0da6b76448", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33835, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 33841, + "col": 22, + "tokLen": 15 + } + }, + "type": { + "qualType": "slsDetectorDefs::gainMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc25b0", + "kind": "EnumConstantDecl", + "name": "FORCE_SWITCH_G2", + "type": { + "qualType": "slsDetectorDefs::gainMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b777b8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 33862, + "line": 1112, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 33901, + "line": 1113, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6b77708", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 33866, + "line": 1112, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33871, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b776f0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33868, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 33868, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b776d0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33868, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 33868, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b764a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33866, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33866, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b72860", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b776b8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33871, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 33871, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b764c8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 33871, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 33871, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"fixg1\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b777a8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 33888, + "line": 1113, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 33901, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6b77778", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33895, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 33901, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::gainMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc2600", + "kind": "EnumConstantDecl", + "name": "FIX_G1", + "type": { + "qualType": "slsDetectorDefs::gainMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b78ae8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 33913, + "line": 1114, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 33952, + "line": 1115, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6b78a38", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 33917, + "line": 1114, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33922, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b78a20", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33919, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 33919, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b78a00", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33919, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 33919, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b777d8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33917, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33917, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b72860", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b789e8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33922, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 33922, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b777f8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 33922, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 33922, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"fixg2\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b78ad8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 33939, + "line": 1115, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 33952, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6b78aa8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33946, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 33952, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::gainMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc2650", + "kind": "EnumConstantDecl", + "name": "FIX_G2", + "type": { + "qualType": "slsDetectorDefs::gainMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b79e18", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 33964, + "line": 1116, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 34003, + "line": 1117, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6b79d68", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 33968, + "line": 1116, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33973, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b79d50", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33970, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 33970, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b79d30", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33970, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 33970, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b78b08", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33968, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33968, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b72860", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b79d18", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33973, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 33973, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b78b28", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 33973, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 33973, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"fixg0\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b79e08", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 33990, + "line": 1117, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 34003, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6b79dd8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33997, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 34003, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::gainMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc26a0", + "kind": "EnumConstantDecl", + "name": "FIX_G0", + "type": { + "qualType": "slsDetectorDefs::gainMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b7a4a8", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 34015, + "line": 1118, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 34058, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6b7a490", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 34015, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 34058, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b7a460", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 34021, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34058, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b7a448", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 34021, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34058, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6b7a420", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 34021, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34058, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6b7a400", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 34021, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34058, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b7a3f8", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b7a3c8", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 34021, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34058, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b7a3b0", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 34034, + "col": 24, + "tokLen": 20 + }, + "end": { + "offset": 34057, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6b7a398", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34034, + "col": 24, + "tokLen": 20 + }, + "end": { + "offset": 34057, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b7a378", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 34034, + "col": 24, + "tokLen": 20 + }, + "end": { + "offset": 34057, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b7a370", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b7a338", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 34034, + "col": 24, + "tokLen": 20 + }, + "end": { + "offset": 34057, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b7a320", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34055, + "col": 45, + "tokLen": 1 + }, + "end": { + "offset": 34055, + "col": 45, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b7a300", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34055, + "col": 45, + "tokLen": 1 + }, + "end": { + "offset": 34055, + "col": 45, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6b7a2e8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34034, + "col": 24, + "tokLen": 20 + }, + "end": { + "offset": 34034, + "col": 24, + "tokLen": 20 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b79e48", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 34034, + "col": 24, + "tokLen": 20 + }, + "end": { + "offset": 34034, + "col": 24, + "tokLen": 20 + } + }, + "type": { + "qualType": "const char[19]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown gain mode \"" + } + ] + }, + { + "id": "0x7f0da6b79e78", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34057, + "col": 47, + "tokLen": 1 + }, + "end": { + "offset": 34057, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b72860", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +} +{ + "id": "0x7f0da6b7a688", + "kind": "FunctionDecl", + "loc": { + "offset": 34091, + "file": "ToString.cpp", + "line": 1121, + "col": 28, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 34064, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 34280, + "line": 1127, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d37aee8", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs8polarityEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::polarity (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::polarity" + }, + "inner": [ + { + "id": "0x2cdc2790", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::polarity" + }, + "decl": { + "id": "0x2cdc26f0", + "kind": "EnumDecl", + "name": "polarity" + } + } + ] + }, + { + "id": "0x7f0da6b7a5b0", + "kind": "ParmVarDecl", + "loc": { + "offset": 34119, + "line": 1121, + "col": 56, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 34100, + "col": 37, + "tokLen": 5 + }, + "end": { + "offset": 34119, + "col": 56, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6b3c560", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 34122, + "col": 59, + "tokLen": 1 + }, + "end": { + "offset": 34280, + "line": 1127, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b3ab88", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 34128, + "line": 1122, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 34165, + "line": 1123, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b3aad8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 34132, + "line": 1122, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 34137, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b3aac0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34134, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 34134, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b3aaa0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34134, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 34134, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b7a870", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34132, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 34132, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b7a5b0", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b3aa88", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34137, + "col": 14, + "tokLen": 5 + }, + "end": { + "offset": 34137, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b7a890", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 34137, + "col": 14, + "tokLen": 5 + }, + "end": { + "offset": 34137, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "const char[4]" + }, + "valueCategory": "lvalue", + "value": "\"pos\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b3ab78", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 34152, + "line": 1123, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 34165, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b3ab48", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34159, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 34165, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::polarity" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc27b0", + "kind": "EnumConstantDecl", + "name": "POSITIVE", + "type": { + "qualType": "slsDetectorDefs::polarity" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b3beb8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 34179, + "line": 1124, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 34216, + "line": 1125, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b3be08", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 34183, + "line": 1124, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 34188, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b3bdf0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34185, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 34185, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b3bdd0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34185, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 34185, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b3aba8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34183, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 34183, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b7a5b0", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b3bdb8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34188, + "col": 14, + "tokLen": 5 + }, + "end": { + "offset": 34188, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b3abc8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 34188, + "col": 14, + "tokLen": 5 + }, + "end": { + "offset": 34188, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "const char[4]" + }, + "valueCategory": "lvalue", + "value": "\"neg\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b3bea8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 34203, + "line": 1125, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 34216, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b3be78", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34210, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 34216, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::polarity" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc2800", + "kind": "EnumConstantDecl", + "name": "NEGATIVE", + "type": { + "qualType": "slsDetectorDefs::polarity" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b3c548", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 34230, + "line": 1126, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 34277, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6b3c530", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 34230, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 34277, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b3c500", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 34236, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34277, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b3c4e8", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 34236, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34277, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6b3c4c0", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 34236, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34277, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6b3c4a0", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 34236, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34277, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b3c498", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b3c468", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 34236, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34277, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b3c450", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 34249, + "col": 24, + "tokLen": 24 + }, + "end": { + "offset": 34276, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6b3c438", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34249, + "col": 24, + "tokLen": 24 + }, + "end": { + "offset": 34276, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b3c418", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 34249, + "col": 24, + "tokLen": 24 + }, + "end": { + "offset": 34276, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b3c410", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b3c3d8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 34249, + "col": 24, + "tokLen": 24 + }, + "end": { + "offset": 34276, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b3c3c0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34274, + "col": 49, + "tokLen": 1 + }, + "end": { + "offset": 34274, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b3c3a0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34274, + "col": 49, + "tokLen": 1 + }, + "end": { + "offset": 34274, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6b3c388", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34249, + "col": 24, + "tokLen": 24 + }, + "end": { + "offset": 34249, + "col": 24, + "tokLen": 24 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b3bee8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 34249, + "col": 24, + "tokLen": 24 + }, + "end": { + "offset": 34249, + "col": 24, + "tokLen": 24 + } + }, + "type": { + "qualType": "const char[23]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown polarity mode \"" + } + ] + }, + { + "id": "0x7f0da6b3bf18", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34276, + "col": 51, + "tokLen": 1 + }, + "end": { + "offset": 34276, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b7a5b0", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +} +{ + "id": "0x7f0da6b3c708", + "kind": "FunctionDecl", + "loc": { + "offset": 34319, + "file": "ToString.cpp", + "line": 1129, + "col": 37, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 34283, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 34518, + "line": 1135, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d37b438", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs17timingInfoDecoderEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::timingInfoDecoder (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::timingInfoDecoder" + }, + "inner": [ + { + "id": "0x2cdc28f0", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::timingInfoDecoder" + }, + "decl": { + "id": "0x2cdc2850", + "kind": "EnumDecl", + "name": "timingInfoDecoder" + } + } + ] + }, + { + "id": "0x7f0da6b3c630", + "kind": "ParmVarDecl", + "loc": { + "offset": 34347, + "line": 1129, + "col": 65, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 34328, + "col": 46, + "tokLen": 5 + }, + "end": { + "offset": 34347, + "col": 65, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6b3f608", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 34350, + "col": 68, + "tokLen": 1 + }, + "end": { + "offset": 34518, + "line": 1135, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b3dbf8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 34356, + "line": 1130, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 34398, + "line": 1131, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b3db48", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 34360, + "line": 1130, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 34365, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b3db30", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34362, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 34362, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b3db10", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34362, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 34362, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b3c8f0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34360, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 34360, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b3c630", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b3daf8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34365, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 34365, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b3c910", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 34365, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 34365, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"swissfel\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b3dbe8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 34385, + "line": 1131, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 34398, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b3dbb8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34392, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 34398, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::timingInfoDecoder" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc2910", + "kind": "EnumConstantDecl", + "name": "SWISSFEL", + "type": { + "qualType": "slsDetectorDefs::timingInfoDecoder" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b3ef28", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 34412, + "line": 1132, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 34451, + "line": 1133, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6b3ee78", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 34416, + "line": 1132, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 34421, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b3ee60", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34418, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 34418, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b3ee40", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34418, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 34418, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b3dc18", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34416, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 34416, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b3c630", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b3ee28", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34421, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 34421, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b3dc38", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 34421, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 34421, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"shine\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b3ef18", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 34438, + "line": 1133, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 34451, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6b3eee8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34445, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 34451, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::timingInfoDecoder" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc2960", + "kind": "EnumConstantDecl", + "name": "SHINE", + "type": { + "qualType": "slsDetectorDefs::timingInfoDecoder" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b3f5f0", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 34462, + "line": 1134, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 34515, + "col": 58, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6b3f5d8", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 34462, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 34515, + "col": 58, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b3f5a8", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 34468, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34515, + "col": 58, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b3f590", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 34468, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34515, + "col": 58, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6b3f568", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 34468, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34515, + "col": 58, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6b3f548", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 34468, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34515, + "col": 58, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b3f540", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b3f510", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 34468, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34515, + "col": 58, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b3f4f8", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 34481, + "col": 24, + "tokLen": 30 + }, + "end": { + "offset": 34514, + "col": 57, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6b3f4e0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34481, + "col": 24, + "tokLen": 30 + }, + "end": { + "offset": 34514, + "col": 57, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b3f4c0", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 34481, + "col": 24, + "tokLen": 30 + }, + "end": { + "offset": 34514, + "col": 57, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b3f4b8", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b3f480", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 34481, + "col": 24, + "tokLen": 30 + }, + "end": { + "offset": 34514, + "col": 57, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b3f468", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34512, + "col": 55, + "tokLen": 1 + }, + "end": { + "offset": 34512, + "col": 55, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b3f448", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34512, + "col": 55, + "tokLen": 1 + }, + "end": { + "offset": 34512, + "col": 55, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6b3f430", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34481, + "col": 24, + "tokLen": 30 + }, + "end": { + "offset": 34481, + "col": 24, + "tokLen": 30 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b3ef58", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 34481, + "col": 24, + "tokLen": 30 + }, + "end": { + "offset": 34481, + "col": 24, + "tokLen": 30 + } + }, + "type": { + "qualType": "const char[29]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown Timing Info Decoder \"" + } + ] + }, + { + "id": "0x7f0da6b3ef90", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34514, + "col": 57, + "tokLen": 1 + }, + "end": { + "offset": 34514, + "col": 57, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b3c630", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +} +{ + "id": "0x7f0da6b3f7a8", + "kind": "FunctionDecl", + "loc": { + "offset": 34554, + "file": "ToString.cpp", + "line": 1137, + "col": 34, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 34521, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 34747, + "line": 1143, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d37b988", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs14collectionModeEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::collectionMode (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::collectionMode" + }, + "inner": [ + { + "id": "0x2cdc2a50", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::collectionMode" + }, + "decl": { + "id": "0x2cdc29b0", + "kind": "EnumDecl", + "name": "collectionMode" + } + } + ] + }, + { + "id": "0x7f0da6b3f6d8", + "kind": "ParmVarDecl", + "loc": { + "offset": 34582, + "line": 1137, + "col": 62, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 34563, + "col": 43, + "tokLen": 5 + }, + "end": { + "offset": 34582, + "col": 62, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6b426a8", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 34585, + "col": 65, + "tokLen": 1 + }, + "end": { + "offset": 34747, + "line": 1143, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b40c98", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 34591, + "line": 1138, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 34629, + "line": 1139, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6b40be8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 34595, + "line": 1138, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 34600, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b40bd0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34597, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 34597, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b40bb0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34597, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 34597, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b3f990", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34595, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 34595, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b3f6d8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b40b98", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34600, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 34600, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b3f9b0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 34600, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 34600, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char[5]" + }, + "valueCategory": "lvalue", + "value": "\"hole\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b40c88", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 34616, + "line": 1139, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 34629, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6b40c58", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34623, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 34629, + "col": 22, + "tokLen": 4 + } + }, + "type": { + "qualType": "slsDetectorDefs::collectionMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc2a70", + "kind": "EnumConstantDecl", + "name": "HOLE", + "type": { + "qualType": "slsDetectorDefs::collectionMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b41fc8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 34639, + "line": 1140, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 34681, + "line": 1141, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b41f18", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 34643, + "line": 1140, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 34648, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b41f00", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34645, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 34645, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b41ee0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34645, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 34645, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b40cb8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34643, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 34643, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b3f6d8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b41ec8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34648, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 34648, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b40cd8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 34648, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 34648, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"electron\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b41fb8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 34668, + "line": 1141, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 34681, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b41f88", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34675, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 34681, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::collectionMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc2ac0", + "kind": "EnumConstantDecl", + "name": "ELECTRON", + "type": { + "qualType": "slsDetectorDefs::collectionMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b42690", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 34695, + "line": 1142, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 34744, + "col": 54, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6b42678", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 34695, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 34744, + "col": 54, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b42648", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 34701, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34744, + "col": 54, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b42630", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 34701, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34744, + "col": 54, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6b42608", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 34701, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34744, + "col": 54, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6b425e8", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 34701, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34744, + "col": 54, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b425e0", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b425b0", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 34701, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34744, + "col": 54, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b42598", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 34714, + "col": 24, + "tokLen": 26 + }, + "end": { + "offset": 34743, + "col": 53, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6b42580", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34714, + "col": 24, + "tokLen": 26 + }, + "end": { + "offset": 34743, + "col": 53, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b42560", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 34714, + "col": 24, + "tokLen": 26 + }, + "end": { + "offset": 34743, + "col": 53, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b42558", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b42520", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 34714, + "col": 24, + "tokLen": 26 + }, + "end": { + "offset": 34743, + "col": 53, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b42508", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34741, + "col": 51, + "tokLen": 1 + }, + "end": { + "offset": 34741, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b424e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34741, + "col": 51, + "tokLen": 1 + }, + "end": { + "offset": 34741, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6b424d0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34714, + "col": 24, + "tokLen": 26 + }, + "end": { + "offset": 34714, + "col": 24, + "tokLen": 26 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b41ff8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 34714, + "col": 24, + "tokLen": 26 + }, + "end": { + "offset": 34714, + "col": 24, + "tokLen": 26 + } + }, + "type": { + "qualType": "const char[25]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown collection mode \"" + } + ] + }, + { + "id": "0x7f0da6b42028", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34743, + "col": 53, + "tokLen": 1 + }, + "end": { + "offset": 34743, + "col": 53, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b3f6d8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +} +{ + "id": "0x7f0da6b427f8", + "kind": "FunctionDecl", + "loc": { + "offset": 34770, + "file": "ToString.cpp", + "line": 1145, + "col": 21, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 34750, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 35199, + "line": 1154, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d37be88", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIhEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "uint8_t (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "unsigned char" + }, + "inner": [ + { + "id": "0x2bf08d50", + "kind": "BuiltinType", + "type": { + "qualType": "unsigned char" + } + } + ] + }, + { + "id": "0x7f0da6b42738", + "kind": "ParmVarDecl", + "loc": { + "offset": 34798, + "line": 1145, + "col": 49, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 34779, + "col": 30, + "tokLen": 5 + }, + "end": { + "offset": 34798, + "col": 49, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6b44c30", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 34801, + "col": 52, + "tokLen": 1 + }, + "end": { + "offset": 35199, + "line": 1154, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b42ce0", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 34807, + "line": 1146, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 34861, + "col": 59, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b429c8", + "kind": "VarDecl", + "loc": { + "offset": 34811, + "col": 9, + "tokLen": 4 + }, + "range": { + "begin": { + "offset": 34807, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 34859, + "col": 57, + "tokLen": 2 + } + }, + "isUsed": true, + "name": "base", + "type": { + "qualType": "int" + }, + "init": "c", + "inner": [ + { + "id": "0x7f0da6b42cb0", + "kind": "ConditionalOperator", + "range": { + "begin": { + "offset": 34818, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 34859, + "col": 57, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b42c50", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 34818, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 34847, + "col": 45, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "!=", + "inner": [ + { + "id": "0x7f0da6b42b10", + "kind": "CXXMemberCallExpr", + "range": { + "begin": { + "offset": 34818, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 34829, + "col": 27, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b42ae0", + "kind": "MemberExpr", + "range": { + "begin": { + "offset": 34818, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 34820, + "col": 18, + "tokLen": 4 + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "name": "find", + "isArrow": false, + "referencedMemberDecl": "0x2c8ca830", + "inner": [ + { + "id": "0x7f0da6b42a30", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34818, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 34818, + "col": 16, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b42738", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + }, + { + "id": "0x7f0da6b42b40", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34825, + "col": 23, + "tokLen": 4 + }, + "end": { + "offset": 34825, + "col": 23, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b42ac0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 34825, + "col": 23, + "tokLen": 4 + }, + "end": { + "offset": 34825, + "col": 23, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char[3]" + }, + "valueCategory": "lvalue", + "value": "\"0x\"" + } + ] + }, + { + "id": "0x7f0da6b42b70", + "kind": "CXXDefaultArgExpr", + "range": { + "begin": {}, + "end": {} + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue" + } + ] + }, + { + "id": "0x7f0da6b42c38", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34834, + "col": 32, + "tokLen": 3 + }, + "end": { + "offset": 34847, + "col": 45, + "tokLen": 4 + } + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "inner": [ + { + "id": "0x7f0da6b42c08", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34834, + "col": 32, + "tokLen": 3 + }, + "end": { + "offset": 34847, + "col": 45, + "tokLen": 4 + } + }, + "type": { + "desugaredQualType": "const unsigned long", + "qualType": "const typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d0eda20", + "kind": "VarDecl", + "name": "npos", + "type": { + "desugaredQualType": "const unsigned long", + "qualType": "const typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + } + }, + "nonOdrUseReason": "constant" + } + ] + } + ] + }, + { + "id": "0x7f0da6b42c70", + "kind": "IntegerLiteral", + "range": { + "begin": { + "offset": 34854, + "col": 52, + "tokLen": 2 + }, + "end": { + "offset": 34854, + "col": 52, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "value": "16" + }, + { + "id": "0x7f0da6b42c90", + "kind": "IntegerLiteral", + "range": { + "begin": { + "offset": 34859, + "col": 57, + "tokLen": 2 + }, + "end": { + "offset": 34859, + "col": 57, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "value": "10" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6b42f48", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 34867, + "line": 1147, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 34906, + "col": 44, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b42d10", + "kind": "VarDecl", + "loc": { + "offset": 34871, + "col": 9, + "tokLen": 5 + }, + "range": { + "begin": { + "offset": 34867, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 34905, + "col": 43, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "value", + "type": { + "qualType": "int" + }, + "init": "c", + "inner": [ + { + "id": "0x7f0da6b42ee0", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 34879, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 34905, + "col": 43, + "tokLen": 1 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b42ec8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34879, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 34884, + "col": 22, + "tokLen": 4 + } + }, + "type": { + "qualType": "int (*)(const string &, size_t *, int)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b42e38", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34879, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 34884, + "col": 22, + "tokLen": 4 + } + }, + "type": { + "qualType": "int (const string &, size_t *, int)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2c88ede0", + "kind": "FunctionDecl", + "name": "stoi", + "type": { + "qualType": "int (const string &, size_t *, int)" + } + } + } + ] + }, + { + "id": "0x7f0da6b42de8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34889, + "col": 27, + "tokLen": 1 + }, + "end": { + "offset": 34889, + "col": 27, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b42738", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b42f18", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34892, + "col": 30, + "tokLen": 7 + }, + "end": { + "offset": 34892, + "col": 30, + "tokLen": 7 + } + }, + "type": { + "qualType": "size_t *" + }, + "valueCategory": "prvalue", + "castKind": "NullToPointer", + "inner": [ + { + "id": "0x7f0da6b42e08", + "kind": "CXXNullPtrLiteralExpr", + "range": { + "begin": { + "offset": 34892, + "col": 30, + "tokLen": 7 + }, + "end": { + "offset": 34892, + "col": 30, + "tokLen": 7 + } + }, + "type": { + "qualType": "std::nullptr_t" + }, + "valueCategory": "prvalue" + } + ] + }, + { + "id": "0x7f0da6b42f30", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34901, + "col": 39, + "tokLen": 4 + }, + "end": { + "offset": 34901, + "col": 39, + "tokLen": 4 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "inner": [ + { + "id": "0x7f0da6b42e18", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34901, + "col": 39, + "tokLen": 4 + }, + "end": { + "offset": 34901, + "col": 39, + "tokLen": 4 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b429c8", + "kind": "VarDecl", + "name": "base", + "type": { + "qualType": "int" + } + } + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6b44b70", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 34912, + "line": 1148, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 35157, + "line": 1152, + "col": 5, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b432f8", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 34916, + "line": 1148, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 35013, + "line": 1149, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6b43140", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 34916, + "line": 1148, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 34958, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "<", + "inner": [ + { + "id": "0x7f0da6b43110", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34916, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 34916, + "col": 9, + "tokLen": 5 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "inner": [ + { + "id": "0x7f0da6b42f60", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34916, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 34916, + "col": 9, + "tokLen": 5 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b42d10", + "kind": "VarDecl", + "name": "value", + "type": { + "qualType": "int" + } + } + } + ] + }, + { + "id": "0x7f0da6b43128", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34924, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 34958, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "castKind": "IntegralCast", + "inner": [ + { + "id": "0x7f0da6b430f0", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 34924, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 34958, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "qualType": "unsigned char" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b430d8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34924, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 34954, + "col": 47, + "tokLen": 3 + } + }, + "type": { + "qualType": "unsigned char (*)() noexcept" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b430a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34924, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 34954, + "col": 47, + "tokLen": 3 + } + }, + "type": { + "qualType": "unsigned char () noexcept" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2c0d55a8", + "kind": "CXXMethodDecl", + "name": "min", + "type": { + "qualType": "unsigned char () noexcept" + } + } + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6b432d8", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 34971, + "line": 1149, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 35013, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": ">", + "inner": [ + { + "id": "0x7f0da6b432a8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34971, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 34971, + "col": 9, + "tokLen": 5 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "inner": [ + { + "id": "0x7f0da6b43160", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34971, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 34971, + "col": 9, + "tokLen": 5 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b42d10", + "kind": "VarDecl", + "name": "value", + "type": { + "qualType": "int" + } + } + } + ] + }, + { + "id": "0x7f0da6b432c0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34979, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 35013, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "castKind": "IntegralCast", + "inner": [ + { + "id": "0x7f0da6b43288", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 34979, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 35013, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "qualType": "unsigned char" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b43270", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34979, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 35009, + "col": 47, + "tokLen": 3 + } + }, + "type": { + "qualType": "unsigned char (*)() noexcept" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b43240", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34979, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 35009, + "col": 47, + "tokLen": 3 + } + }, + "type": { + "qualType": "unsigned char () noexcept" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2c0d5680", + "kind": "CXXMethodDecl", + "name": "max", + "type": { + "qualType": "unsigned char () noexcept" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6b44b58", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 35016, + "col": 54, + "tokLen": 1 + }, + "end": { + "offset": 35157, + "line": 1152, + "col": 5, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b44b40", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 35026, + "line": 1150, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 35150, + "line": 1151, + "col": 64, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6b44b28", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 35026, + "line": 1150, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 35150, + "line": 1151, + "col": 64, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b44af8", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 35032, + "line": 1150, + "col": 15, + "tokLen": 12 + }, + "end": { + "offset": 35150, + "line": 1151, + "col": 64, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b44ae0", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 35032, + "line": 1150, + "col": 15, + "tokLen": 12 + }, + "end": { + "offset": 35150, + "line": 1151, + "col": 64, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6b44ab8", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 35032, + "line": 1150, + "col": 15, + "tokLen": 12 + }, + "end": { + "offset": 35150, + "line": 1151, + "col": 64, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6b44a98", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 35032, + "line": 1150, + "col": 15, + "tokLen": 12 + }, + "end": { + "offset": 35150, + "line": 1151, + "col": 64, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b44a90", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b44a60", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 35032, + "line": 1150, + "col": 15, + "tokLen": 12 + }, + "end": { + "offset": 35150, + "line": 1151, + "col": 64, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b44a48", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 35045, + "line": 1150, + "col": 28, + "tokLen": 35 + }, + "end": { + "offset": 35114, + "line": 1151, + "col": 28, + "tokLen": 36 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6b44a30", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35045, + "line": 1150, + "col": 28, + "tokLen": 35 + }, + "end": { + "offset": 35114, + "line": 1151, + "col": 28, + "tokLen": 36 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b44a10", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 35045, + "line": 1150, + "col": 28, + "tokLen": 35 + }, + "end": { + "offset": 35114, + "line": 1151, + "col": 28, + "tokLen": 36 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b44a08", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b449d0", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 35045, + "line": 1150, + "col": 28, + "tokLen": 35 + }, + "end": { + "offset": 35114, + "line": 1151, + "col": 28, + "tokLen": 36 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b449b8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35085, + "line": 1150, + "col": 68, + "tokLen": 1 + }, + "end": { + "offset": 35085, + "col": 68, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(basic_string, allocator> &&, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b44940", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35085, + "col": 68, + "tokLen": 1 + }, + "end": { + "offset": 35085, + "col": 68, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (basic_string, allocator> &&, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b44798", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (basic_string, allocator> &&, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b44910", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 35045, + "col": 28, + "tokLen": 35 + }, + "end": { + "offset": 35083, + "col": 66, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6b43920", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 35045, + "col": 28, + "tokLen": 35 + }, + "end": { + "offset": 35083, + "col": 66, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b43918", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b438e0", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 35045, + "col": 28, + "tokLen": 35 + }, + "end": { + "offset": 35083, + "col": 66, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b438c8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35081, + "col": 64, + "tokLen": 1 + }, + "end": { + "offset": 35081, + "col": 64, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b438a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35081, + "col": 64, + "tokLen": 1 + }, + "end": { + "offset": 35081, + "col": 64, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6b43890", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35045, + "col": 28, + "tokLen": 35 + }, + "end": { + "offset": 35045, + "col": 28, + "tokLen": 35 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b433a8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 35045, + "col": 28, + "tokLen": 35 + }, + "end": { + "offset": 35045, + "col": 28, + "tokLen": 35 + } + }, + "type": { + "qualType": "const char[34]" + }, + "valueCategory": "lvalue", + "value": "\"Cannot scan uint8_t from string '\"" + } + ] + }, + { + "id": "0x7f0da6b433e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35083, + "col": 66, + "tokLen": 1 + }, + "end": { + "offset": 35083, + "col": 66, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b42738", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6b44928", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35114, + "line": 1151, + "col": 28, + "tokLen": 36 + }, + "end": { + "offset": 35114, + "col": 28, + "tokLen": 36 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b43940", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 35114, + "col": 28, + "tokLen": 36 + }, + "end": { + "offset": 35114, + "col": 28, + "tokLen": 36 + } + }, + "type": { + "qualType": "const char[35]" + }, + "valueCategory": "lvalue", + "value": "\"'. Value must be in range 0 - 255.\"" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6b44c20", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 35163, + "line": 1153, + "col": 5, + "tokLen": 6 + }, + "end": { + "offset": 35196, + "col": 38, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b44bf0", + "kind": "CXXStaticCastExpr", + "range": { + "begin": { + "offset": 35170, + "col": 12, + "tokLen": 11 + }, + "end": { + "offset": 35196, + "col": 38, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "unsigned char", + "qualType": "uint8_t", + "typeAliasDeclId": "0x2c0e6c18" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b44bd8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35191, + "col": 33, + "tokLen": 5 + }, + "end": { + "offset": 35191, + "col": 33, + "tokLen": 5 + } + }, + "type": { + "desugaredQualType": "unsigned char", + "qualType": "uint8_t", + "typeAliasDeclId": "0x2c0e6c18" + }, + "valueCategory": "prvalue", + "castKind": "IntegralCast", + "isPartOfExplicitCast": true, + "inner": [ + { + "id": "0x7f0da6b44bc0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35191, + "col": 33, + "tokLen": 5 + }, + "end": { + "offset": 35191, + "col": 33, + "tokLen": 5 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "isPartOfExplicitCast": true, + "inner": [ + { + "id": "0x7f0da6b44b90", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35191, + "col": 33, + "tokLen": 5 + }, + "end": { + "offset": 35191, + "col": 33, + "tokLen": 5 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b42d10", + "kind": "VarDecl", + "name": "value", + "type": { + "qualType": "int" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +} +{ + "id": "0x7f0da6b44d88", + "kind": "FunctionDecl", + "loc": { + "offset": 35223, + "file": "ToString.cpp", + "line": 1156, + "col": 22, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 35202, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 35658, + "line": 1165, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d37c358", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToItEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "uint16_t (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "unsigned short" + }, + "inner": [ + { + "id": "0x2bf08d70", + "kind": "BuiltinType", + "type": { + "qualType": "unsigned short" + } + } + ] + }, + { + "id": "0x7f0da6b44cc8", + "kind": "ParmVarDecl", + "loc": { + "offset": 35251, + "line": 1156, + "col": 50, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 35232, + "col": 31, + "tokLen": 5 + }, + "end": { + "offset": 35251, + "col": 50, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6b46558", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 35254, + "col": 53, + "tokLen": 1 + }, + "end": { + "offset": 35658, + "line": 1165, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b45258", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 35260, + "line": 1157, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 35314, + "col": 59, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b44f58", + "kind": "VarDecl", + "loc": { + "offset": 35264, + "col": 9, + "tokLen": 4 + }, + "range": { + "begin": { + "offset": 35260, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 35312, + "col": 57, + "tokLen": 2 + } + }, + "isUsed": true, + "name": "base", + "type": { + "qualType": "int" + }, + "init": "c", + "inner": [ + { + "id": "0x7f0da6b45228", + "kind": "ConditionalOperator", + "range": { + "begin": { + "offset": 35271, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 35312, + "col": 57, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b451c8", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 35271, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 35300, + "col": 45, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "!=", + "inner": [ + { + "id": "0x7f0da6b450a0", + "kind": "CXXMemberCallExpr", + "range": { + "begin": { + "offset": 35271, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 35282, + "col": 27, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b45070", + "kind": "MemberExpr", + "range": { + "begin": { + "offset": 35271, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 35273, + "col": 18, + "tokLen": 4 + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "name": "find", + "isArrow": false, + "referencedMemberDecl": "0x2c8ca830", + "inner": [ + { + "id": "0x7f0da6b44fc0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35271, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 35271, + "col": 16, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b44cc8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + }, + { + "id": "0x7f0da6b450d0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35278, + "col": 23, + "tokLen": 4 + }, + "end": { + "offset": 35278, + "col": 23, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b45050", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 35278, + "col": 23, + "tokLen": 4 + }, + "end": { + "offset": 35278, + "col": 23, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char[3]" + }, + "valueCategory": "lvalue", + "value": "\"0x\"" + } + ] + }, + { + "id": "0x7f0da6b450e8", + "kind": "CXXDefaultArgExpr", + "range": { + "begin": {}, + "end": {} + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue" + } + ] + }, + { + "id": "0x7f0da6b451b0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35287, + "col": 32, + "tokLen": 3 + }, + "end": { + "offset": 35300, + "col": 45, + "tokLen": 4 + } + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "inner": [ + { + "id": "0x7f0da6b45180", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35287, + "col": 32, + "tokLen": 3 + }, + "end": { + "offset": 35300, + "col": 45, + "tokLen": 4 + } + }, + "type": { + "desugaredQualType": "const unsigned long", + "qualType": "const typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d0eda20", + "kind": "VarDecl", + "name": "npos", + "type": { + "desugaredQualType": "const unsigned long", + "qualType": "const typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + } + }, + "nonOdrUseReason": "constant" + } + ] + } + ] + }, + { + "id": "0x7f0da6b451e8", + "kind": "IntegerLiteral", + "range": { + "begin": { + "offset": 35307, + "col": 52, + "tokLen": 2 + }, + "end": { + "offset": 35307, + "col": 52, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "value": "16" + }, + { + "id": "0x7f0da6b45208", + "kind": "IntegerLiteral", + "range": { + "begin": { + "offset": 35312, + "col": 57, + "tokLen": 2 + }, + "end": { + "offset": 35312, + "col": 57, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "value": "10" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6b45460", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 35320, + "line": 1158, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 35359, + "col": 44, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b45288", + "kind": "VarDecl", + "loc": { + "offset": 35324, + "col": 9, + "tokLen": 5 + }, + "range": { + "begin": { + "offset": 35320, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 35358, + "col": 43, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "value", + "type": { + "qualType": "int" + }, + "init": "c", + "inner": [ + { + "id": "0x7f0da6b453f8", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 35332, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 35358, + "col": 43, + "tokLen": 1 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b453e0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35332, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 35337, + "col": 22, + "tokLen": 4 + } + }, + "type": { + "qualType": "int (*)(const string &, size_t *, int)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b453b0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35332, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 35337, + "col": 22, + "tokLen": 4 + } + }, + "type": { + "qualType": "int (const string &, size_t *, int)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2c88ede0", + "kind": "FunctionDecl", + "name": "stoi", + "type": { + "qualType": "int (const string &, size_t *, int)" + } + } + } + ] + }, + { + "id": "0x7f0da6b45360", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35342, + "col": 27, + "tokLen": 1 + }, + "end": { + "offset": 35342, + "col": 27, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b44cc8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b45430", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35345, + "col": 30, + "tokLen": 7 + }, + "end": { + "offset": 35345, + "col": 30, + "tokLen": 7 + } + }, + "type": { + "qualType": "size_t *" + }, + "valueCategory": "prvalue", + "castKind": "NullToPointer", + "inner": [ + { + "id": "0x7f0da6b45380", + "kind": "CXXNullPtrLiteralExpr", + "range": { + "begin": { + "offset": 35345, + "col": 30, + "tokLen": 7 + }, + "end": { + "offset": 35345, + "col": 30, + "tokLen": 7 + } + }, + "type": { + "qualType": "std::nullptr_t" + }, + "valueCategory": "prvalue" + } + ] + }, + { + "id": "0x7f0da6b45448", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35354, + "col": 39, + "tokLen": 4 + }, + "end": { + "offset": 35354, + "col": 39, + "tokLen": 4 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "inner": [ + { + "id": "0x7f0da6b45390", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35354, + "col": 39, + "tokLen": 4 + }, + "end": { + "offset": 35354, + "col": 39, + "tokLen": 4 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b44f58", + "kind": "VarDecl", + "name": "base", + "type": { + "qualType": "int" + } + } + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6b46498", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 35365, + "line": 1159, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 35615, + "line": 1163, + "col": 5, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b457f8", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 35369, + "line": 1159, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 35468, + "line": 1160, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6b45640", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 35369, + "line": 1159, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 35412, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "<", + "inner": [ + { + "id": "0x7f0da6b45610", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35369, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 35369, + "col": 9, + "tokLen": 5 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "inner": [ + { + "id": "0x7f0da6b45478", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35369, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 35369, + "col": 9, + "tokLen": 5 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b45288", + "kind": "VarDecl", + "name": "value", + "type": { + "qualType": "int" + } + } + } + ] + }, + { + "id": "0x7f0da6b45628", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35377, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 35412, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "castKind": "IntegralCast", + "inner": [ + { + "id": "0x7f0da6b455f0", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 35377, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 35412, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "qualType": "unsigned short" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b455d8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35377, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 35408, + "col": 48, + "tokLen": 3 + } + }, + "type": { + "qualType": "unsigned short (*)() noexcept" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b455a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35377, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 35408, + "col": 48, + "tokLen": 3 + } + }, + "type": { + "qualType": "unsigned short () noexcept" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2c179c48", + "kind": "CXXMethodDecl", + "name": "min", + "type": { + "qualType": "unsigned short () noexcept" + } + } + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6b457d8", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 35425, + "line": 1160, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 35468, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": ">", + "inner": [ + { + "id": "0x7f0da6b457a8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35425, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 35425, + "col": 9, + "tokLen": 5 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "inner": [ + { + "id": "0x7f0da6b45660", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35425, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 35425, + "col": 9, + "tokLen": 5 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b45288", + "kind": "VarDecl", + "name": "value", + "type": { + "qualType": "int" + } + } + } + ] + }, + { + "id": "0x7f0da6b457c0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35433, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 35468, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "castKind": "IntegralCast", + "inner": [ + { + "id": "0x7f0da6b45788", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 35433, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 35468, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "qualType": "unsigned short" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b45770", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35433, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 35464, + "col": 48, + "tokLen": 3 + } + }, + "type": { + "qualType": "unsigned short (*)() noexcept" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b45740", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35433, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 35464, + "col": 48, + "tokLen": 3 + } + }, + "type": { + "qualType": "unsigned short () noexcept" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2c179d20", + "kind": "CXXMethodDecl", + "name": "max", + "type": { + "qualType": "unsigned short () noexcept" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6b46480", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 35471, + "col": 55, + "tokLen": 1 + }, + "end": { + "offset": 35615, + "line": 1163, + "col": 5, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b46468", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 35481, + "line": 1161, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 35608, + "line": 1162, + "col": 66, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6b46450", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 35481, + "line": 1161, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 35608, + "line": 1162, + "col": 66, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b46420", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 35487, + "line": 1161, + "col": 15, + "tokLen": 12 + }, + "end": { + "offset": 35608, + "line": 1162, + "col": 66, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b46408", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 35487, + "line": 1161, + "col": 15, + "tokLen": 12 + }, + "end": { + "offset": 35608, + "line": 1162, + "col": 66, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6b463e0", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 35487, + "line": 1161, + "col": 15, + "tokLen": 12 + }, + "end": { + "offset": 35608, + "line": 1162, + "col": 66, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6b463c0", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 35487, + "line": 1161, + "col": 15, + "tokLen": 12 + }, + "end": { + "offset": 35608, + "line": 1162, + "col": 66, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b463b8", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b46388", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 35487, + "line": 1161, + "col": 15, + "tokLen": 12 + }, + "end": { + "offset": 35608, + "line": 1162, + "col": 66, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b46370", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 35500, + "line": 1161, + "col": 28, + "tokLen": 36 + }, + "end": { + "offset": 35570, + "line": 1162, + "col": 28, + "tokLen": 38 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6b46358", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35500, + "line": 1161, + "col": 28, + "tokLen": 36 + }, + "end": { + "offset": 35570, + "line": 1162, + "col": 28, + "tokLen": 38 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b46338", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 35500, + "line": 1161, + "col": 28, + "tokLen": 36 + }, + "end": { + "offset": 35570, + "line": 1162, + "col": 28, + "tokLen": 38 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b46330", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b462f8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 35500, + "line": 1161, + "col": 28, + "tokLen": 36 + }, + "end": { + "offset": 35570, + "line": 1162, + "col": 28, + "tokLen": 38 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b462e0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35541, + "line": 1161, + "col": 69, + "tokLen": 1 + }, + "end": { + "offset": 35541, + "col": 69, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(basic_string, allocator> &&, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b462c0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35541, + "col": 69, + "tokLen": 1 + }, + "end": { + "offset": 35541, + "col": 69, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (basic_string, allocator> &&, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b44798", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (basic_string, allocator> &&, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b46290", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 35500, + "col": 28, + "tokLen": 36 + }, + "end": { + "offset": 35539, + "col": 67, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6b45d68", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 35500, + "col": 28, + "tokLen": 36 + }, + "end": { + "offset": 35539, + "col": 67, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b45d60", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b45d28", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 35500, + "col": 28, + "tokLen": 36 + }, + "end": { + "offset": 35539, + "col": 67, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b45d10", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35537, + "col": 65, + "tokLen": 1 + }, + "end": { + "offset": 35537, + "col": 65, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b45cf0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35537, + "col": 65, + "tokLen": 1 + }, + "end": { + "offset": 35537, + "col": 65, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6b45cd8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35500, + "col": 28, + "tokLen": 36 + }, + "end": { + "offset": 35500, + "col": 28, + "tokLen": 36 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b45828", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 35500, + "col": 28, + "tokLen": 36 + }, + "end": { + "offset": 35500, + "col": 28, + "tokLen": 36 + } + }, + "type": { + "qualType": "const char[35]" + }, + "valueCategory": "lvalue", + "value": "\"Cannot scan uint16_t from string '\"" + } + ] + }, + { + "id": "0x7f0da6b45868", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35539, + "col": 67, + "tokLen": 1 + }, + "end": { + "offset": 35539, + "col": 67, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b44cc8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6b462a8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35570, + "line": 1162, + "col": 28, + "tokLen": 38 + }, + "end": { + "offset": 35570, + "col": 28, + "tokLen": 38 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b45e08", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 35570, + "col": 28, + "tokLen": 38 + }, + "end": { + "offset": 35570, + "col": 28, + "tokLen": 38 + } + }, + "type": { + "qualType": "const char[37]" + }, + "valueCategory": "lvalue", + "value": "\"'. Value must be in range 0 - 65535.\"" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6b46548", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 35621, + "line": 1164, + "col": 5, + "tokLen": 6 + }, + "end": { + "offset": 35655, + "col": 39, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b46518", + "kind": "CXXStaticCastExpr", + "range": { + "begin": { + "offset": 35628, + "col": 12, + "tokLen": 11 + }, + "end": { + "offset": 35655, + "col": 39, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "unsigned short", + "qualType": "uint16_t", + "typeAliasDeclId": "0x2c0e6c80" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b46500", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35650, + "col": 34, + "tokLen": 5 + }, + "end": { + "offset": 35650, + "col": 34, + "tokLen": 5 + } + }, + "type": { + "desugaredQualType": "unsigned short", + "qualType": "uint16_t", + "typeAliasDeclId": "0x2c0e6c80" + }, + "valueCategory": "prvalue", + "castKind": "IntegralCast", + "isPartOfExplicitCast": true, + "inner": [ + { + "id": "0x7f0da6b464e8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35650, + "col": 34, + "tokLen": 5 + }, + "end": { + "offset": 35650, + "col": 34, + "tokLen": 5 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "isPartOfExplicitCast": true, + "inner": [ + { + "id": "0x7f0da6b464b8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35650, + "col": 34, + "tokLen": 5 + }, + "end": { + "offset": 35650, + "col": 34, + "tokLen": 5 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b45288", + "kind": "VarDecl", + "name": "value", + "type": { + "qualType": "int" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +} +{ + "id": "0x7f0da6b466b8", + "kind": "FunctionDecl", + "loc": { + "offset": 35682, + "file": "ToString.cpp", + "line": 1167, + "col": 22, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 35661, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 35816, + "line": 1170, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d37c828", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIjEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "uint32_t (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "unsigned int" + }, + "inner": [ + { + "id": "0x2bf08d90", + "kind": "BuiltinType", + "type": { + "qualType": "unsigned int" + } + } + ] + }, + { + "id": "0x7f0da6b465f0", + "kind": "ParmVarDecl", + "loc": { + "offset": 35710, + "line": 1167, + "col": 50, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 35691, + "col": 31, + "tokLen": 5 + }, + "end": { + "offset": 35710, + "col": 50, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6b46d90", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 35713, + "col": 53, + "tokLen": 1 + }, + "end": { + "offset": 35816, + "line": 1170, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b46b88", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 35719, + "line": 1168, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 35773, + "col": 59, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b46888", + "kind": "VarDecl", + "loc": { + "offset": 35723, + "col": 9, + "tokLen": 4 + }, + "range": { + "begin": { + "offset": 35719, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 35771, + "col": 57, + "tokLen": 2 + } + }, + "isUsed": true, + "name": "base", + "type": { + "qualType": "int" + }, + "init": "c", + "inner": [ + { + "id": "0x7f0da6b46b58", + "kind": "ConditionalOperator", + "range": { + "begin": { + "offset": 35730, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 35771, + "col": 57, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b46af8", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 35730, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 35759, + "col": 45, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "!=", + "inner": [ + { + "id": "0x7f0da6b469d0", + "kind": "CXXMemberCallExpr", + "range": { + "begin": { + "offset": 35730, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 35741, + "col": 27, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b469a0", + "kind": "MemberExpr", + "range": { + "begin": { + "offset": 35730, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 35732, + "col": 18, + "tokLen": 4 + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "name": "find", + "isArrow": false, + "referencedMemberDecl": "0x2c8ca830", + "inner": [ + { + "id": "0x7f0da6b468f0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35730, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 35730, + "col": 16, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b465f0", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + }, + { + "id": "0x7f0da6b46a00", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35737, + "col": 23, + "tokLen": 4 + }, + "end": { + "offset": 35737, + "col": 23, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b46980", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 35737, + "col": 23, + "tokLen": 4 + }, + "end": { + "offset": 35737, + "col": 23, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char[3]" + }, + "valueCategory": "lvalue", + "value": "\"0x\"" + } + ] + }, + { + "id": "0x7f0da6b46a18", + "kind": "CXXDefaultArgExpr", + "range": { + "begin": {}, + "end": {} + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue" + } + ] + }, + { + "id": "0x7f0da6b46ae0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35746, + "col": 32, + "tokLen": 3 + }, + "end": { + "offset": 35759, + "col": 45, + "tokLen": 4 + } + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "inner": [ + { + "id": "0x7f0da6b46ab0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35746, + "col": 32, + "tokLen": 3 + }, + "end": { + "offset": 35759, + "col": 45, + "tokLen": 4 + } + }, + "type": { + "desugaredQualType": "const unsigned long", + "qualType": "const typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d0eda20", + "kind": "VarDecl", + "name": "npos", + "type": { + "desugaredQualType": "const unsigned long", + "qualType": "const typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + } + }, + "nonOdrUseReason": "constant" + } + ] + } + ] + }, + { + "id": "0x7f0da6b46b18", + "kind": "IntegerLiteral", + "range": { + "begin": { + "offset": 35766, + "col": 52, + "tokLen": 2 + }, + "end": { + "offset": 35766, + "col": 52, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "value": "16" + }, + { + "id": "0x7f0da6b46b38", + "kind": "IntegerLiteral", + "range": { + "begin": { + "offset": 35771, + "col": 57, + "tokLen": 2 + }, + "end": { + "offset": 35771, + "col": 57, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "value": "10" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6b46d80", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 35779, + "line": 1169, + "col": 5, + "tokLen": 6 + }, + "end": { + "offset": 35813, + "col": 39, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b46d68", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35786, + "col": 12, + "tokLen": 3 + }, + "end": { + "offset": 35813, + "col": 39, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "unsigned int", + "qualType": "uint32_t", + "typeAliasDeclId": "0x2c0e6ce8" + }, + "valueCategory": "prvalue", + "castKind": "IntegralCast", + "inner": [ + { + "id": "0x7f0da6b46d00", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 35786, + "col": 12, + "tokLen": 3 + }, + "end": { + "offset": 35813, + "col": 39, + "tokLen": 1 + } + }, + "type": { + "qualType": "unsigned long" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b46ce8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35786, + "col": 12, + "tokLen": 3 + }, + "end": { + "offset": 35791, + "col": 17, + "tokLen": 5 + } + }, + "type": { + "qualType": "unsigned long (*)(const string &, size_t *, int)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b46c60", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35786, + "col": 12, + "tokLen": 3 + }, + "end": { + "offset": 35791, + "col": 17, + "tokLen": 5 + } + }, + "type": { + "qualType": "unsigned long (const string &, size_t *, int)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2c8d3880", + "kind": "FunctionDecl", + "name": "stoul", + "type": { + "qualType": "unsigned long (const string &, size_t *, int)" + } + } + } + ] + }, + { + "id": "0x7f0da6b46c10", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35797, + "col": 23, + "tokLen": 1 + }, + "end": { + "offset": 35797, + "col": 23, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b465f0", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b46d38", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35800, + "col": 26, + "tokLen": 7 + }, + "end": { + "offset": 35800, + "col": 26, + "tokLen": 7 + } + }, + "type": { + "qualType": "size_t *" + }, + "valueCategory": "prvalue", + "castKind": "NullToPointer", + "inner": [ + { + "id": "0x7f0da6b46c30", + "kind": "CXXNullPtrLiteralExpr", + "range": { + "begin": { + "offset": 35800, + "col": 26, + "tokLen": 7 + }, + "end": { + "offset": 35800, + "col": 26, + "tokLen": 7 + } + }, + "type": { + "qualType": "std::nullptr_t" + }, + "valueCategory": "prvalue" + } + ] + }, + { + "id": "0x7f0da6b46d50", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35809, + "col": 35, + "tokLen": 4 + }, + "end": { + "offset": 35809, + "col": 35, + "tokLen": 4 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "inner": [ + { + "id": "0x7f0da6b46c40", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35809, + "col": 35, + "tokLen": 4 + }, + "end": { + "offset": 35809, + "col": 35, + "tokLen": 4 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b46888", + "kind": "VarDecl", + "name": "base", + "type": { + "qualType": "int" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +} +{ + "id": "0x7f0da6b46ed8", + "kind": "FunctionDecl", + "loc": { + "offset": 35840, + "file": "ToString.cpp", + "line": 1172, + "col": 22, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 35819, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 35975, + "line": 1175, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d37ccc8", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToImEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "uint64_t (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "unsigned long" + }, + "inner": [ + { + "id": "0x2bf08db0", + "kind": "BuiltinType", + "type": { + "qualType": "unsigned long" + } + } + ] + }, + { + "id": "0x7f0da6b46e18", + "kind": "ParmVarDecl", + "loc": { + "offset": 35868, + "line": 1172, + "col": 50, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 35849, + "col": 31, + "tokLen": 5 + }, + "end": { + "offset": 35868, + "col": 50, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6b475b0", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 35871, + "col": 53, + "tokLen": 1 + }, + "end": { + "offset": 35975, + "line": 1175, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b473a8", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 35877, + "line": 1173, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 35931, + "col": 59, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b470a8", + "kind": "VarDecl", + "loc": { + "offset": 35881, + "col": 9, + "tokLen": 4 + }, + "range": { + "begin": { + "offset": 35877, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 35929, + "col": 57, + "tokLen": 2 + } + }, + "isUsed": true, + "name": "base", + "type": { + "qualType": "int" + }, + "init": "c", + "inner": [ + { + "id": "0x7f0da6b47378", + "kind": "ConditionalOperator", + "range": { + "begin": { + "offset": 35888, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 35929, + "col": 57, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b47318", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 35888, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 35917, + "col": 45, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "!=", + "inner": [ + { + "id": "0x7f0da6b471f0", + "kind": "CXXMemberCallExpr", + "range": { + "begin": { + "offset": 35888, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 35899, + "col": 27, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b471c0", + "kind": "MemberExpr", + "range": { + "begin": { + "offset": 35888, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 35890, + "col": 18, + "tokLen": 4 + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "name": "find", + "isArrow": false, + "referencedMemberDecl": "0x2c8ca830", + "inner": [ + { + "id": "0x7f0da6b47110", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35888, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 35888, + "col": 16, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b46e18", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + }, + { + "id": "0x7f0da6b47220", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35895, + "col": 23, + "tokLen": 4 + }, + "end": { + "offset": 35895, + "col": 23, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b471a0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 35895, + "col": 23, + "tokLen": 4 + }, + "end": { + "offset": 35895, + "col": 23, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char[3]" + }, + "valueCategory": "lvalue", + "value": "\"0x\"" + } + ] + }, + { + "id": "0x7f0da6b47238", + "kind": "CXXDefaultArgExpr", + "range": { + "begin": {}, + "end": {} + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue" + } + ] + }, + { + "id": "0x7f0da6b47300", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35904, + "col": 32, + "tokLen": 3 + }, + "end": { + "offset": 35917, + "col": 45, + "tokLen": 4 + } + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "inner": [ + { + "id": "0x7f0da6b472d0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35904, + "col": 32, + "tokLen": 3 + }, + "end": { + "offset": 35917, + "col": 45, + "tokLen": 4 + } + }, + "type": { + "desugaredQualType": "const unsigned long", + "qualType": "const typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d0eda20", + "kind": "VarDecl", + "name": "npos", + "type": { + "desugaredQualType": "const unsigned long", + "qualType": "const typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + } + }, + "nonOdrUseReason": "constant" + } + ] + } + ] + }, + { + "id": "0x7f0da6b47338", + "kind": "IntegerLiteral", + "range": { + "begin": { + "offset": 35924, + "col": 52, + "tokLen": 2 + }, + "end": { + "offset": 35924, + "col": 52, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "value": "16" + }, + { + "id": "0x7f0da6b47358", + "kind": "IntegerLiteral", + "range": { + "begin": { + "offset": 35929, + "col": 57, + "tokLen": 2 + }, + "end": { + "offset": 35929, + "col": 57, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "value": "10" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6b475a0", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 35937, + "line": 1174, + "col": 5, + "tokLen": 6 + }, + "end": { + "offset": 35972, + "col": 40, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b47588", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35944, + "col": 12, + "tokLen": 3 + }, + "end": { + "offset": 35972, + "col": 40, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "uint64_t", + "typeAliasDeclId": "0x2c0e6d50" + }, + "valueCategory": "prvalue", + "castKind": "IntegralCast", + "inner": [ + { + "id": "0x7f0da6b47520", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 35944, + "col": 12, + "tokLen": 3 + }, + "end": { + "offset": 35972, + "col": 40, + "tokLen": 1 + } + }, + "type": { + "qualType": "unsigned long long" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b47508", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35944, + "col": 12, + "tokLen": 3 + }, + "end": { + "offset": 35949, + "col": 17, + "tokLen": 6 + } + }, + "type": { + "qualType": "unsigned long long (*)(const string &, size_t *, int)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b47480", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35944, + "col": 12, + "tokLen": 3 + }, + "end": { + "offset": 35949, + "col": 17, + "tokLen": 6 + } + }, + "type": { + "qualType": "unsigned long long (const string &, size_t *, int)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2c8d5880", + "kind": "FunctionDecl", + "name": "stoull", + "type": { + "qualType": "unsigned long long (const string &, size_t *, int)" + } + } + } + ] + }, + { + "id": "0x7f0da6b47430", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35956, + "col": 24, + "tokLen": 1 + }, + "end": { + "offset": 35956, + "col": 24, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b46e18", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b47558", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35959, + "col": 27, + "tokLen": 7 + }, + "end": { + "offset": 35959, + "col": 27, + "tokLen": 7 + } + }, + "type": { + "qualType": "size_t *" + }, + "valueCategory": "prvalue", + "castKind": "NullToPointer", + "inner": [ + { + "id": "0x7f0da6b47450", + "kind": "CXXNullPtrLiteralExpr", + "range": { + "begin": { + "offset": 35959, + "col": 27, + "tokLen": 7 + }, + "end": { + "offset": 35959, + "col": 27, + "tokLen": 7 + } + }, + "type": { + "qualType": "std::nullptr_t" + }, + "valueCategory": "prvalue" + } + ] + }, + { + "id": "0x7f0da6b47570", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35968, + "col": 36, + "tokLen": 4 + }, + "end": { + "offset": 35968, + "col": 36, + "tokLen": 4 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "inner": [ + { + "id": "0x7f0da6b47460", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35968, + "col": 36, + "tokLen": 4 + }, + "end": { + "offset": 35968, + "col": 36, + "tokLen": 4 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b470a8", + "kind": "VarDecl", + "name": "base", + "type": { + "qualType": "int" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +} +{ + "id": "0x7f0da6b47700", + "kind": "FunctionDecl", + "loc": { + "offset": 35994, + "file": "ToString.cpp", + "line": 1177, + "col": 17, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 35978, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 36127, + "line": 1180, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d37d1a0", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIiEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "int (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "int" + }, + "inner": [ + { + "id": "0x2bf08cf0", + "kind": "BuiltinType", + "type": { + "qualType": "int" + } + } + ] + }, + { + "id": "0x7f0da6b47638", + "kind": "ParmVarDecl", + "loc": { + "offset": 36022, + "line": 1177, + "col": 45, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 36003, + "col": 26, + "tokLen": 5 + }, + "end": { + "offset": 36022, + "col": 45, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6b47d70", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 36025, + "col": 48, + "tokLen": 1 + }, + "end": { + "offset": 36127, + "line": 1180, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b47bd8", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 36031, + "line": 1178, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 36085, + "col": 59, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b478d8", + "kind": "VarDecl", + "loc": { + "offset": 36035, + "col": 9, + "tokLen": 4 + }, + "range": { + "begin": { + "offset": 36031, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 36083, + "col": 57, + "tokLen": 2 + } + }, + "isUsed": true, + "name": "base", + "type": { + "qualType": "int" + }, + "init": "c", + "inner": [ + { + "id": "0x7f0da6b47ba8", + "kind": "ConditionalOperator", + "range": { + "begin": { + "offset": 36042, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 36083, + "col": 57, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b47b48", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 36042, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 36071, + "col": 45, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "!=", + "inner": [ + { + "id": "0x7f0da6b47a20", + "kind": "CXXMemberCallExpr", + "range": { + "begin": { + "offset": 36042, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 36053, + "col": 27, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b479f0", + "kind": "MemberExpr", + "range": { + "begin": { + "offset": 36042, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 36044, + "col": 18, + "tokLen": 4 + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "name": "find", + "isArrow": false, + "referencedMemberDecl": "0x2c8ca830", + "inner": [ + { + "id": "0x7f0da6b47940", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 36042, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 36042, + "col": 16, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b47638", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + }, + { + "id": "0x7f0da6b47a50", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 36049, + "col": 23, + "tokLen": 4 + }, + "end": { + "offset": 36049, + "col": 23, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b479d0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 36049, + "col": 23, + "tokLen": 4 + }, + "end": { + "offset": 36049, + "col": 23, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char[3]" + }, + "valueCategory": "lvalue", + "value": "\"0x\"" + } + ] + }, + { + "id": "0x7f0da6b47a68", + "kind": "CXXDefaultArgExpr", + "range": { + "begin": {}, + "end": {} + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue" + } + ] + }, + { + "id": "0x7f0da6b47b30", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 36058, + "col": 32, + "tokLen": 3 + }, + "end": { + "offset": 36071, + "col": 45, + "tokLen": 4 + } + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "inner": [ + { + "id": "0x7f0da6b47b00", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 36058, + "col": 32, + "tokLen": 3 + }, + "end": { + "offset": 36071, + "col": 45, + "tokLen": 4 + } + }, + "type": { + "desugaredQualType": "const unsigned long", + "qualType": "const typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d0eda20", + "kind": "VarDecl", + "name": "npos", + "type": { + "desugaredQualType": "const unsigned long", + "qualType": "const typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + } + }, + "nonOdrUseReason": "constant" + } + ] + } + ] + }, + { + "id": "0x7f0da6b47b68", + "kind": "IntegerLiteral", + "range": { + "begin": { + "offset": 36078, + "col": 52, + "tokLen": 2 + }, + "end": { + "offset": 36078, + "col": 52, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "value": "16" + }, + { + "id": "0x7f0da6b47b88", + "kind": "IntegerLiteral", + "range": { + "begin": { + "offset": 36083, + "col": 57, + "tokLen": 2 + }, + "end": { + "offset": 36083, + "col": 57, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "value": "10" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6b47d60", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 36091, + "line": 1179, + "col": 5, + "tokLen": 6 + }, + "end": { + "offset": 36124, + "col": 38, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b47cf8", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 36098, + "col": 12, + "tokLen": 3 + }, + "end": { + "offset": 36124, + "col": 38, + "tokLen": 1 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b47ce0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 36098, + "col": 12, + "tokLen": 3 + }, + "end": { + "offset": 36103, + "col": 17, + "tokLen": 4 + } + }, + "type": { + "qualType": "int (*)(const string &, size_t *, int)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b47cb0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 36098, + "col": 12, + "tokLen": 3 + }, + "end": { + "offset": 36103, + "col": 17, + "tokLen": 4 + } + }, + "type": { + "qualType": "int (const string &, size_t *, int)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2c88ede0", + "kind": "FunctionDecl", + "name": "stoi", + "type": { + "qualType": "int (const string &, size_t *, int)" + } + } + } + ] + }, + { + "id": "0x7f0da6b47c60", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 36108, + "col": 22, + "tokLen": 1 + }, + "end": { + "offset": 36108, + "col": 22, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b47638", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b47d30", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 36111, + "col": 25, + "tokLen": 7 + }, + "end": { + "offset": 36111, + "col": 25, + "tokLen": 7 + } + }, + "type": { + "qualType": "size_t *" + }, + "valueCategory": "prvalue", + "castKind": "NullToPointer", + "inner": [ + { + "id": "0x7f0da6b47c80", + "kind": "CXXNullPtrLiteralExpr", + "range": { + "begin": { + "offset": 36111, + "col": 25, + "tokLen": 7 + }, + "end": { + "offset": 36111, + "col": 25, + "tokLen": 7 + } + }, + "type": { + "qualType": "std::nullptr_t" + }, + "valueCategory": "prvalue" + } + ] + }, + { + "id": "0x7f0da6b47d48", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 36120, + "col": 34, + "tokLen": 4 + }, + "end": { + "offset": 36120, + "col": 34, + "tokLen": 4 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "inner": [ + { + "id": "0x7f0da6b47c90", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 36120, + "col": 34, + "tokLen": 4 + }, + "end": { + "offset": 36120, + "col": 34, + "tokLen": 4 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b478d8", + "kind": "VarDecl", + "name": "base", + "type": { + "qualType": "int" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] +} +{ + "id": "0x7f0da6b47eb8", + "kind": "FunctionDecl", + "loc": { + "offset": 36147, + "file": "ToString.cpp", + "line": 1182, + "col": 18, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 36130, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 36391, + "line": 1192, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d37d648", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIbEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "bool (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "bool" + }, + "inner": [ + { + "id": "0x2bf08c70", + "kind": "BuiltinType", + "type": { + "qualType": "bool" + } + } + ] + }, + { + "id": "0x7f0da6b47df8", + "kind": "ParmVarDecl", + "loc": { + "offset": 36175, + "line": 1182, + "col": 46, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 36156, + "col": 27, + "tokLen": 5 + }, + "end": { + "offset": 36175, + "col": 46, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6b48578", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 36178, + "col": 49, + "tokLen": 1 + }, + "end": { + "offset": 36391, + "line": 1192, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b48248", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 36184, + "line": 1183, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 36217, + "col": 38, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b48088", + "kind": "VarDecl", + "loc": { + "offset": 36188, + "col": 9, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 36184, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 36216, + "col": 37, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "i", + "type": { + "qualType": "int" + }, + "init": "c", + "inner": [ + { + "id": "0x7f0da6b481f8", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 36192, + "col": 13, + "tokLen": 3 + }, + "end": { + "offset": 36216, + "col": 37, + "tokLen": 1 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b481e0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 36192, + "col": 13, + "tokLen": 3 + }, + "end": { + "offset": 36197, + "col": 18, + "tokLen": 4 + } + }, + "type": { + "qualType": "int (*)(const string &, size_t *, int)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b481b0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 36192, + "col": 13, + "tokLen": 3 + }, + "end": { + "offset": 36197, + "col": 18, + "tokLen": 4 + } + }, + "type": { + "qualType": "int (const string &, size_t *, int)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2c88ede0", + "kind": "FunctionDecl", + "name": "stoi", + "type": { + "qualType": "int (const string &, size_t *, int)" + } + } + } + ] + }, + { + "id": "0x7f0da6b48160", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 36202, + "col": 23, + "tokLen": 1 + }, + "end": { + "offset": 36202, + "col": 23, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b47df8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b48230", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 36205, + "col": 26, + "tokLen": 7 + }, + "end": { + "offset": 36205, + "col": 26, + "tokLen": 7 + } + }, + "type": { + "qualType": "size_t *" + }, + "valueCategory": "prvalue", + "castKind": "NullToPointer", + "inner": [ + { + "id": "0x7f0da6b48180", + "kind": "CXXNullPtrLiteralExpr", + "range": { + "begin": { + "offset": 36205, + "col": 26, + "tokLen": 7 + }, + "end": { + "offset": 36205, + "col": 26, + "tokLen": 7 + } + }, + "type": { + "qualType": "std::nullptr_t" + }, + "valueCategory": "prvalue" + } + ] + }, + { + "id": "0x7f0da6b48190", + "kind": "IntegerLiteral", + "range": { + "begin": { + "offset": 36214, + "col": 35, + "tokLen": 2 + }, + "end": { + "offset": 36214, + "col": 35, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "value": "10" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6b48298", + "kind": "SwitchStmt", + "range": { + "begin": { + "offset": 36223, + "line": 1184, + "col": 5, + "tokLen": 6 + }, + "end": { + "offset": 36389, + "line": 1191, + "col": 5, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b48280", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 36231, + "line": 1184, + "col": 13, + "tokLen": 1 + }, + "end": { + "offset": 36231, + "col": 13, + "tokLen": 1 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "inner": [ + { + "id": "0x7f0da6b48260", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 36231, + "col": 13, + "tokLen": 1 + }, + "end": { + "offset": 36231, + "col": 13, + "tokLen": 1 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b48088", + "kind": "VarDecl", + "name": "i", + "type": { + "qualType": "int" + } + } + } + ] + }, + { + "id": "0x7f0da6b48550", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 36234, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 36389, + "line": 1191, + "col": 5, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b48300", + "kind": "CaseStmt", + "range": { + "begin": { + "offset": 36240, + "line": 1185, + "col": 5, + "tokLen": 4 + }, + "end": { + "offset": 36263, + "line": 1186, + "col": 16, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6b482e0", + "kind": "ConstantExpr", + "range": { + "begin": { + "offset": 36245, + "line": 1185, + "col": 10, + "tokLen": 1 + }, + "end": { + "offset": 36245, + "col": 10, + "tokLen": 1 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "value": "0", + "inner": [ + { + "id": "0x7f0da6b482c0", + "kind": "IntegerLiteral", + "range": { + "begin": { + "offset": 36245, + "col": 10, + "tokLen": 1 + }, + "end": { + "offset": 36245, + "col": 10, + "tokLen": 1 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "value": "0" + } + ] + }, + { + "id": "0x7f0da6b48338", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 36256, + "line": 1186, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 36263, + "col": 16, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6b48328", + "kind": "CXXBoolLiteralExpr", + "range": { + "begin": { + "offset": 36263, + "col": 16, + "tokLen": 5 + }, + "end": { + "offset": 36263, + "col": 16, + "tokLen": 5 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "value": false + } + ] + } + ] + }, + { + "id": "0x7f0da6b48388", + "kind": "CaseStmt", + "range": { + "begin": { + "offset": 36274, + "line": 1187, + "col": 5, + "tokLen": 4 + }, + "end": { + "offset": 36297, + "line": 1188, + "col": 16, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6b48368", + "kind": "ConstantExpr", + "range": { + "begin": { + "offset": 36279, + "line": 1187, + "col": 10, + "tokLen": 1 + }, + "end": { + "offset": 36279, + "col": 10, + "tokLen": 1 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "value": "1", + "inner": [ + { + "id": "0x7f0da6b48348", + "kind": "IntegerLiteral", + "range": { + "begin": { + "offset": 36279, + "col": 10, + "tokLen": 1 + }, + "end": { + "offset": 36279, + "col": 10, + "tokLen": 1 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "value": "1" + } + ] + }, + { + "id": "0x7f0da6b483c0", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 36290, + "line": 1188, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 36297, + "col": 16, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6b483b0", + "kind": "CXXBoolLiteralExpr", + "range": { + "begin": { + "offset": 36297, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 36297, + "col": 16, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "value": true + } + ] + } + ] + }, + { + "id": "0x7f0da6b48530", + "kind": "DefaultStmt", + "range": { + "begin": { + "offset": 36307, + "line": 1189, + "col": 5, + "tokLen": 7 + }, + "end": { + "offset": 36382, + "line": 1190, + "col": 67, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b48518", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 36324, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 36382, + "col": 67, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6b48500", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 36324, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 36382, + "col": 67, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b484d0", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 36330, + "col": 15, + "tokLen": 12 + }, + "end": { + "offset": 36382, + "col": 67, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b484b8", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 36330, + "col": 15, + "tokLen": 12 + }, + "end": { + "offset": 36382, + "col": 67, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6b48490", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 36330, + "col": 15, + "tokLen": 12 + }, + "end": { + "offset": 36382, + "col": 67, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c968a58", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const char *)" + } + }, + "inner": [ + { + "id": "0x7f0da6b48470", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 36330, + "col": 15, + "tokLen": 12 + }, + "end": { + "offset": 36382, + "col": 67, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b48468", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b48438", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 36330, + "col": 15, + "tokLen": 12 + }, + "end": { + "offset": 36382, + "col": 67, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const char *)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b48420", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 36343, + "col": 28, + "tokLen": 39 + }, + "end": { + "offset": 36343, + "col": 28, + "tokLen": 39 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b483e0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 36343, + "col": 28, + "tokLen": 39 + }, + "end": { + "offset": 36343, + "col": 28, + "tokLen": 39 + } + }, + "type": { + "qualType": "const char[38]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown boolean. Expecting be 0 or 1.\"" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +} +{ + "id": "0x7f0da6b486c8", + "kind": "FunctionDecl", + "loc": { + "offset": 36414, + "file": "ToString.cpp", + "line": 1194, + "col": 21, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 36394, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 36547, + "line": 1197, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d37db18", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIlEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "int64_t (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "long" + }, + "inner": [ + { + "id": "0x2bf08d10", + "kind": "BuiltinType", + "type": { + "qualType": "long" + } + } + ] + }, + { + "id": "0x7f0da6b48600", + "kind": "ParmVarDecl", + "loc": { + "offset": 36442, + "line": 1194, + "col": 49, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 36423, + "col": 30, + "tokLen": 5 + }, + "end": { + "offset": 36442, + "col": 49, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6b48d88", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 36445, + "col": 52, + "tokLen": 1 + }, + "end": { + "offset": 36547, + "line": 1197, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b48b98", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 36451, + "line": 1195, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 36505, + "col": 59, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b48898", + "kind": "VarDecl", + "loc": { + "offset": 36455, + "col": 9, + "tokLen": 4 + }, + "range": { + "begin": { + "offset": 36451, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 36503, + "col": 57, + "tokLen": 2 + } + }, + "isUsed": true, + "name": "base", + "type": { + "qualType": "int" + }, + "init": "c", + "inner": [ + { + "id": "0x7f0da6b48b68", + "kind": "ConditionalOperator", + "range": { + "begin": { + "offset": 36462, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 36503, + "col": 57, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b48b08", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 36462, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 36491, + "col": 45, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "!=", + "inner": [ + { + "id": "0x7f0da6b489e0", + "kind": "CXXMemberCallExpr", + "range": { + "begin": { + "offset": 36462, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 36473, + "col": 27, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b489b0", + "kind": "MemberExpr", + "range": { + "begin": { + "offset": 36462, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 36464, + "col": 18, + "tokLen": 4 + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "name": "find", + "isArrow": false, + "referencedMemberDecl": "0x2c8ca830", + "inner": [ + { + "id": "0x7f0da6b48900", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 36462, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 36462, + "col": 16, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b48600", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + }, + { + "id": "0x7f0da6b48a10", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 36469, + "col": 23, + "tokLen": 4 + }, + "end": { + "offset": 36469, + "col": 23, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b48990", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 36469, + "col": 23, + "tokLen": 4 + }, + "end": { + "offset": 36469, + "col": 23, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char[3]" + }, + "valueCategory": "lvalue", + "value": "\"0x\"" + } + ] + }, + { + "id": "0x7f0da6b48a28", + "kind": "CXXDefaultArgExpr", + "range": { + "begin": {}, + "end": {} + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue" + } + ] + }, + { + "id": "0x7f0da6b48af0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 36478, + "col": 32, + "tokLen": 3 + }, + "end": { + "offset": 36491, + "col": 45, + "tokLen": 4 + } + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "inner": [ + { + "id": "0x7f0da6b48ac0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 36478, + "col": 32, + "tokLen": 3 + }, + "end": { + "offset": 36491, + "col": 45, + "tokLen": 4 + } + }, + "type": { + "desugaredQualType": "const unsigned long", + "qualType": "const typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d0eda20", + "kind": "VarDecl", + "name": "npos", + "type": { + "desugaredQualType": "const unsigned long", + "qualType": "const typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + } + }, + "nonOdrUseReason": "constant" + } + ] + } + ] + }, + { + "id": "0x7f0da6b48b28", + "kind": "IntegerLiteral", + "range": { + "begin": { + "offset": 36498, + "col": 52, + "tokLen": 2 + }, + "end": { + "offset": 36498, + "col": 52, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "value": "16" + }, + { + "id": "0x7f0da6b48b48", + "kind": "IntegerLiteral", + "range": { + "begin": { + "offset": 36503, + "col": 57, + "tokLen": 2 + }, + "end": { + "offset": 36503, + "col": 57, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "value": "10" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6b48d78", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 36511, + "line": 1196, + "col": 5, + "tokLen": 6 + }, + "end": { + "offset": 36544, + "col": 38, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b48d10", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 36518, + "col": 12, + "tokLen": 3 + }, + "end": { + "offset": 36544, + "col": 38, + "tokLen": 1 + } + }, + "type": { + "qualType": "long" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b48cf8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 36518, + "col": 12, + "tokLen": 3 + }, + "end": { + "offset": 36523, + "col": 17, + "tokLen": 4 + } + }, + "type": { + "qualType": "long (*)(const string &, size_t *, int)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b48c70", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 36518, + "col": 12, + "tokLen": 3 + }, + "end": { + "offset": 36523, + "col": 17, + "tokLen": 4 + } + }, + "type": { + "qualType": "long (const string &, size_t *, int)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2c8d05c0", + "kind": "FunctionDecl", + "name": "stol", + "type": { + "qualType": "long (const string &, size_t *, int)" + } + } + } + ] + }, + { + "id": "0x7f0da6b48c20", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 36528, + "col": 22, + "tokLen": 1 + }, + "end": { + "offset": 36528, + "col": 22, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b48600", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b48d48", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 36531, + "col": 25, + "tokLen": 7 + }, + "end": { + "offset": 36531, + "col": 25, + "tokLen": 7 + } + }, + "type": { + "qualType": "size_t *" + }, + "valueCategory": "prvalue", + "castKind": "NullToPointer", + "inner": [ + { + "id": "0x7f0da6b48c40", + "kind": "CXXNullPtrLiteralExpr", + "range": { + "begin": { + "offset": 36531, + "col": 25, + "tokLen": 7 + }, + "end": { + "offset": 36531, + "col": 25, + "tokLen": 7 + } + }, + "type": { + "qualType": "std::nullptr_t" + }, + "valueCategory": "prvalue" + } + ] + }, + { + "id": "0x7f0da6b48d60", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 36540, + "col": 34, + "tokLen": 4 + }, + "end": { + "offset": 36540, + "col": 34, + "tokLen": 4 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "inner": [ + { + "id": "0x7f0da6b48c50", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 36540, + "col": 34, + "tokLen": 4 + }, + "end": { + "offset": 36540, + "col": 34, + "tokLen": 4 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b48898", + "kind": "VarDecl", + "name": "base", + "type": { + "qualType": "int" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] +} diff --git a/slsDetectorSoftware/generator/autocomplete/fixed.json b/slsDetectorSoftware/generator/autocomplete/fixed.json new file mode 100644 index 000000000..32c285114 --- /dev/null +++ b/slsDetectorSoftware/generator/autocomplete/fixed.json @@ -0,0 +1,68285 @@ +[ +{ + "id": "0x2d33fd20", + "kind": "FunctionTemplateDecl", + "loc": { + "offset": 8829, + "file": "../include/sls/ToString.h", + "line": 276, + "col": 3, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 8805, + "line": 275, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9670, + "line": 298, + "col": 1, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "StringTo", + "inner": [ + { + "id": "0x2d33f9b8", + "kind": "TemplateTypeParmDecl", + "loc": { + "offset": 8824, + "line": 275, + "col": 20, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 8815, + "col": 11, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 8824, + "col": 20, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "isReferenced": true, + "name": "T", + "tagUsed": "typename", + "depth": 0, + "index": 0 + }, + { + "id": "0x2d33fc78", + "kind": "FunctionDecl", + "loc": { + "offset": 8829, + "line": 276, + "col": 3, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 8827, + "col": 1, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9670, + "line": 298, + "col": 1, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "StringTo", + "type": { + "qualType": "T (const std::string &, const std::string &)" + }, + "inner": [ + { + "id": "0x2d33faa8", + "kind": "ParmVarDecl", + "loc": { + "offset": 8857, + "line": 276, + "col": 31, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 8838, + "col": 12, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 8857, + "col": 31, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "isReferenced": true, + "name": "t", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x2d33fb68", + "kind": "ParmVarDecl", + "loc": { + "offset": 8879, + "col": 53, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 8860, + "col": 34, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 8879, + "col": 53, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "isReferenced": true, + "name": "unit", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x2d374e28", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 8885, + "col": 59, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9670, + "line": 298, + "col": 1, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d33ff58", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 8891, + "line": 277, + "col": 5, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 8905, + "col": 19, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d33fe18", + "kind": "VarDecl", + "loc": { + "offset": 8898, + "col": 12, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 8891, + "col": 5, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 8904, + "col": 18, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "isReferenced": true, + "name": "tval", + "type": { + "qualType": "double" + }, + "init": "list", + "inner": [ + { + "id": "0x2d33fef8", + "kind": "InitListExpr", + "range": { + "begin": { + "offset": 8902, + "col": 16, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 8904, + "col": 18, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "double" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d33ff38", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 8903, + "col": 17, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 8903, + "col": 17, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "double" + }, + "valueCategory": "prvalue", + "castKind": "IntegralToFloating", + "inner": [ + { + "id": "0x2d33fe80", + "kind": "IntegerLiteral", + "range": { + "begin": { + "offset": 8903, + "col": 17, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 8903, + "col": 17, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "value": "0" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x2d3404a8", + "kind": "CXXTryStmt", + "range": { + "begin": { + "offset": 8911, + "line": 278, + "col": 5, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9061, + "line": 282, + "col": 5, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d340130", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 8915, + "line": 278, + "col": 9, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 8950, + "line": 280, + "col": 5, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d340110", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 8925, + "line": 279, + "col": 9, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 8943, + "col": 27, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "double" + }, + "valueCategory": "lvalue", + "opcode": "=", + "inner": [ + { + "id": "0x2d33ff70", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 8925, + "col": 9, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 8925, + "col": 9, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "double" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d33fe18", + "kind": "VarDecl", + "name": "tval", + "type": { + "qualType": "double" + } + } + }, + { + "id": "0x2d3400c0", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 8932, + "col": 16, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 8943, + "col": 27, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "double" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d3400a8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 8932, + "col": 16, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 8937, + "col": 21, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "double (*)(const string &, size_t *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x2d340020", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 8932, + "col": 16, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 8937, + "col": 21, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "double (const string &, size_t *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2c8d75c0", + "kind": "FunctionDecl", + "name": "stod", + "type": { + "qualType": "double (const string &, size_t *)" + } + } + } + ] + }, + { + "id": "0x2d340000", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 8942, + "col": 26, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 8942, + "col": 26, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d33faa8", + "kind": "ParmVarDecl", + "name": "t", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x2d3400f0", + "kind": "CXXDefaultArgExpr", + "range": { + "begin": {}, + "end": {} + }, + "type": { + "qualType": "size_t *" + }, + "valueCategory": "prvalue" + } + ] + } + ] + } + ] + }, + { + "id": "0x2d340488", + "kind": "CXXCatchStmt", + "range": { + "begin": { + "offset": 8952, + "line": 280, + "col": 7, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9061, + "line": 282, + "col": 5, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d340200", + "kind": "VarDecl", + "loc": { + "offset": 8988, + "line": 280, + "col": 43, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 8959, + "col": 14, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 8988, + "col": 43, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "e", + "type": { + "qualType": "const std::invalid_argument &" + } + }, + { + "id": "0x2d340470", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 8991, + "col": 46, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9061, + "line": 282, + "col": 5, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d340458", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 9001, + "line": 281, + "col": 9, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9054, + "col": 62, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x2d340440", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 9001, + "col": 9, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9054, + "col": 62, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d340410", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 9007, + "col": 15, + "tokLen": 12, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9054, + "col": 62, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x2d3403f8", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 9007, + "col": 15, + "tokLen": 12, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9054, + "col": 62, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x2d3403d0", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 9007, + "col": 15, + "tokLen": 12, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9054, + "col": 62, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c968a58", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const char *)" + } + }, + "inner": [ + { + "id": "0x2d3403b0", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 9007, + "col": 15, + "tokLen": 12, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9054, + "col": 62, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x2d3403a8", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x2d340378", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 9007, + "col": 15, + "tokLen": 12, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9054, + "col": 62, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const char *)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x2d340330", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 9020, + "col": 28, + "tokLen": 34, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9020, + "col": 28, + "tokLen": 34, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x2d3402f8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 9020, + "col": 28, + "tokLen": 34, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9020, + "col": 28, + "tokLen": 34, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "const char[33]" + }, + "valueCategory": "lvalue", + "value": "\"Could not convert string to time\"" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x2d340580", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 9068, + "line": 284, + "col": 5, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9095, + "col": 32, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d3404d8", + "kind": "UsingDecl", + "loc": { + "offset": 9087, + "col": 24, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 9068, + "col": 5, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9087, + "col": 24, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "std::chrono::duration" + } + ] + }, + { + "id": "0x2d340650", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 9101, + "line": 285, + "col": 5, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9133, + "col": 37, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d3405a8", + "kind": "UsingDecl", + "loc": { + "offset": 9120, + "col": 24, + "tokLen": 13, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 9101, + "col": 5, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9120, + "col": 24, + "tokLen": 13, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "std::chrono::duration_cast" + } + ] + }, + { + "id": "0x2d374df8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 9139, + "line": 286, + "col": 5, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9668, + "line": 297, + "col": 5, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "hasElse": true, + "inner": [ + { + "id": "0x2d3418c8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 9143, + "line": 286, + "col": 9, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9151, + "col": 17, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x2d3418b0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 9148, + "col": 14, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9148, + "col": 14, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x2d341890", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 9148, + "col": 14, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9148, + "col": 14, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x2d340668", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 9143, + "col": 9, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9143, + "col": 9, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d33fb68", + "kind": "ParmVarDecl", + "name": "unit", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x2d341878", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 9151, + "col": 17, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9151, + "col": 17, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x2d340688", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 9151, + "col": 17, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9151, + "col": 17, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "const char[3]" + }, + "valueCategory": "lvalue", + "value": "\"ns\"" + } + ] + } + ] + }, + { + "id": "0x2d355c50", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 9157, + "col": 23, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9231, + "line": 288, + "col": 5, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d355c40", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 9167, + "line": 287, + "col": 9, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9224, + "col": 66, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d355c18", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 9174, + "col": 16, + "tokLen": 13, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9224, + "col": 66, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d341910", + "kind": "UnresolvedLookupExpr", + "range": { + "begin": { + "offset": 9174, + "col": 16, + "tokLen": 13, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9189, + "col": 31, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "lvalue", + "usesADL": true, + "name": "duration_cast", + "lookups": [ + { + "id": "0x2d340600", + "kind": "UsingShadowDecl", + "name": "duration_cast" + } + ] + }, + { + "id": "0x2d355bf0", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 9191, + "col": 33, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9223, + "col": 65, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "std::chrono::duration>", + "qualType": "duration" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2d355898", + "kind": "CXXConstructorDecl", + "name": "duration", + "type": { + "qualType": "void (const double &)" + } + }, + "inner": [ + { + "id": "0x2d355bc0", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 9191, + "col": 33, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9223, + "col": 65, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "std::chrono::duration>", + "qualType": "duration" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const double &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x2d3559f0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 9219, + "col": 61, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9219, + "col": 61, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const double", + "qualType": "const double" + }, + "valueCategory": "lvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x2d341be0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 9219, + "col": 61, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9219, + "col": 61, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "double" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d33fe18", + "kind": "VarDecl", + "name": "tval", + "type": { + "qualType": "double" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x2d374dc8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 9238, + "line": 288, + "col": 12, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9668, + "line": 297, + "col": 5, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "hasElse": true, + "inner": [ + { + "id": "0x2d356ec8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 9242, + "line": 288, + "col": 16, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9250, + "col": 24, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x2d356eb0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 9247, + "col": 21, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9247, + "col": 21, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x2d356e90", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 9247, + "col": 21, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9247, + "col": 21, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x2d355c68", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 9242, + "col": 16, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9242, + "col": 16, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d33fb68", + "kind": "ParmVarDecl", + "name": "unit", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x2d356e78", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 9250, + "col": 24, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9250, + "col": 24, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x2d355c88", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 9250, + "col": 24, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9250, + "col": 24, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "const char[3]" + }, + "valueCategory": "lvalue", + "value": "\"us\"" + } + ] + } + ] + }, + { + "id": "0x2d360050", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 9256, + "col": 30, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9331, + "line": 290, + "col": 5, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d360040", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 9266, + "line": 289, + "col": 9, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9324, + "col": 67, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d360018", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 9273, + "col": 16, + "tokLen": 13, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9324, + "col": 67, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d356f10", + "kind": "UnresolvedLookupExpr", + "range": { + "begin": { + "offset": 9273, + "col": 16, + "tokLen": 13, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9288, + "col": 31, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "lvalue", + "usesADL": true, + "name": "duration_cast", + "lookups": [ + { + "id": "0x2d340600", + "kind": "UsingShadowDecl", + "name": "duration_cast" + } + ] + }, + { + "id": "0x2d35fff0", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 9290, + "col": 33, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9323, + "col": 66, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "std::chrono::duration>", + "qualType": "duration" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2d35fc98", + "kind": "CXXConstructorDecl", + "name": "duration", + "type": { + "qualType": "void (const double &)" + } + }, + "inner": [ + { + "id": "0x2d35ffc0", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 9290, + "col": 33, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9323, + "col": 66, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "std::chrono::duration>", + "qualType": "duration" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const double &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x2d35fdf0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 9319, + "col": 62, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9319, + "col": 62, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const double", + "qualType": "const double" + }, + "valueCategory": "lvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x2d3571e0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 9319, + "col": 62, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9319, + "col": 62, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "double" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d33fe18", + "kind": "VarDecl", + "name": "tval", + "type": { + "qualType": "double" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x2d374d98", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 9338, + "line": 290, + "col": 12, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9668, + "line": 297, + "col": 5, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "hasElse": true, + "inner": [ + { + "id": "0x2d3612c8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 9342, + "line": 290, + "col": 16, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9350, + "col": 24, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x2d3612b0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 9347, + "col": 21, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9347, + "col": 21, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x2d361290", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 9347, + "col": 21, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9347, + "col": 21, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x2d360068", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 9342, + "col": 16, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9342, + "col": 16, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d33fb68", + "kind": "ParmVarDecl", + "name": "unit", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x2d361278", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 9350, + "col": 24, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9350, + "col": 24, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x2d360088", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 9350, + "col": 24, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9350, + "col": 24, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "const char[3]" + }, + "valueCategory": "lvalue", + "value": "\"ms\"" + } + ] + } + ] + }, + { + "id": "0x2d36a4b0", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 9356, + "col": 30, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9431, + "line": 292, + "col": 5, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d36a4a0", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 9366, + "line": 291, + "col": 9, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9424, + "col": 67, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d36a478", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 9373, + "col": 16, + "tokLen": 13, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9424, + "col": 67, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d361310", + "kind": "UnresolvedLookupExpr", + "range": { + "begin": { + "offset": 9373, + "col": 16, + "tokLen": 13, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9388, + "col": 31, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "lvalue", + "usesADL": true, + "name": "duration_cast", + "lookups": [ + { + "id": "0x2d340600", + "kind": "UsingShadowDecl", + "name": "duration_cast" + } + ] + }, + { + "id": "0x2d36a450", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 9390, + "col": 33, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9423, + "col": 66, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "std::chrono::duration>", + "qualType": "duration" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2d36a0f8", + "kind": "CXXConstructorDecl", + "name": "duration", + "type": { + "qualType": "void (const double &)" + } + }, + "inner": [ + { + "id": "0x2d36a420", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 9390, + "col": 33, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9423, + "col": 66, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "std::chrono::duration>", + "qualType": "duration" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const double &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x2d36a250", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 9419, + "col": 62, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9419, + "col": 62, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const double", + "qualType": "const double" + }, + "valueCategory": "lvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x2d3615e0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 9419, + "col": 62, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9419, + "col": 62, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "double" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d33fe18", + "kind": "VarDecl", + "name": "tval", + "type": { + "qualType": "double" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x2d374d68", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 9438, + "line": 292, + "col": 12, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9668, + "line": 297, + "col": 5, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "hasElse": true, + "inner": [ + { + "id": "0x2d36b7f8", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 9442, + "line": 292, + "col": 16, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9468, + "col": 42, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x2d36b728", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 9442, + "col": 16, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9450, + "col": 24, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x2d36b710", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 9447, + "col": 21, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9447, + "col": 21, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x2d36b6f0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 9447, + "col": 21, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9447, + "col": 21, + "tokLen": 2, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x2d36a4c8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 9442, + "col": 16, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9442, + "col": 16, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d33fb68", + "kind": "ParmVarDecl", + "name": "unit", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x2d36b6d8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 9450, + "col": 24, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9450, + "col": 24, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x2d36a4e8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 9450, + "col": 24, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9450, + "col": 24, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "const char[2]" + }, + "valueCategory": "lvalue", + "value": "\"s\"" + } + ] + } + ] + }, + { + "id": "0x2d36b7b0", + "kind": "CXXMemberCallExpr", + "range": { + "begin": { + "offset": 9457, + "col": 31, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9468, + "col": 42, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d36b780", + "kind": "MemberExpr", + "range": { + "begin": { + "offset": 9457, + "col": 31, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9462, + "col": 36, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "name": "empty", + "isArrow": false, + "referencedMemberDecl": "0x2c8bc688", + "inner": [ + { + "id": "0x2d36b760", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 9457, + "col": 31, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9457, + "col": 31, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d33fb68", + "kind": "ParmVarDecl", + "name": "unit", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + }, + { + "id": "0x2d374b80", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 9471, + "col": 45, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9547, + "line": 294, + "col": 5, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d374b70", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 9481, + "line": 293, + "col": 9, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9540, + "col": 68, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d374b48", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 9488, + "col": 16, + "tokLen": 13, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9540, + "col": 68, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d36b828", + "kind": "UnresolvedLookupExpr", + "range": { + "begin": { + "offset": 9488, + "col": 16, + "tokLen": 13, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9503, + "col": 31, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "lvalue", + "usesADL": true, + "name": "duration_cast", + "lookups": [ + { + "id": "0x2d340600", + "kind": "UsingShadowDecl", + "name": "duration_cast" + } + ] + }, + { + "id": "0x2d374b20", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 9505, + "col": 33, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9539, + "col": 67, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "std::chrono::duration", + "qualType": "std::chrono::duration" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2d3747c8", + "kind": "CXXConstructorDecl", + "name": "duration", + "type": { + "qualType": "void (const double &)" + } + }, + "inner": [ + { + "id": "0x2d374af0", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 9505, + "col": 33, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9539, + "col": 67, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "std::chrono::duration", + "qualType": "std::chrono::duration" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const double &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x2d374920", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 9535, + "col": 63, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9535, + "col": 63, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const double", + "qualType": "const double" + }, + "valueCategory": "lvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x2d36bad0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 9535, + "col": 63, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9535, + "col": 63, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "double" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d33fe18", + "kind": "VarDecl", + "name": "tval", + "type": { + "qualType": "double" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x2d374d50", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 9554, + "line": 294, + "col": 12, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9668, + "line": 297, + "col": 5, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d374d38", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 9564, + "line": 295, + "col": 9, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9661, + "line": 296, + "col": 78, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x2d374d20", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 9564, + "line": 295, + "col": 9, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9661, + "line": 296, + "col": 78, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d374cf0", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 9570, + "line": 295, + "col": 15, + "tokLen": 12, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9661, + "line": 296, + "col": 78, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x2d374cd8", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 9570, + "line": 295, + "col": 15, + "tokLen": 12, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9661, + "line": 296, + "col": 78, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x2d374cb0", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 9570, + "line": 295, + "col": 15, + "tokLen": 12, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9661, + "line": 296, + "col": 78, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c968a58", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const char *)" + } + }, + "inner": [ + { + "id": "0x2d374c90", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 9570, + "line": 295, + "col": 15, + "tokLen": 12, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9661, + "line": 296, + "col": 78, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x2d374c88", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x2d374c58", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 9570, + "line": 295, + "col": 15, + "tokLen": 12, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9661, + "line": 296, + "col": 78, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const char *)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x2d374c40", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 9596, + "col": 13, + "tokLen": 65, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9596, + "col": 13, + "tokLen": 65, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x2d374be8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 9596, + "col": 13, + "tokLen": 65, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9596, + "col": 13, + "tokLen": 65, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "const char[64]" + }, + "valueCategory": "lvalue", + "value": "\"Invalid unit in conversion from string to std::chrono::duration\"" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +}, +{ + "id": "0x2d3750e0", + "kind": "FunctionTemplateDecl", + "loc": { + "offset": 9697, + "file": "../include/sls/ToString.h", + "line": 300, + "col": 25, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 9673, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9822, + "line": 304, + "col": 1, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "StringTo", + "inner": [ + { + "id": "0x2d374e60", + "kind": "TemplateTypeParmDecl", + "loc": { + "offset": 9692, + "line": 300, + "col": 20, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 9683, + "col": 11, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9692, + "col": 20, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "isReferenced": true, + "name": "T", + "tagUsed": "typename", + "depth": 0, + "index": 0 + }, + { + "id": "0x2d375038", + "kind": "FunctionDecl", + "loc": { + "offset": 9697, + "col": 25, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 9695, + "col": 23, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9822, + "line": 304, + "col": 1, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "StringTo", + "type": { + "qualType": "T (const std::string &)" + }, + "inner": [ + { + "id": "0x2d374f48", + "kind": "ParmVarDecl", + "loc": { + "offset": 9725, + "line": 300, + "col": 53, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 9706, + "col": 34, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9725, + "col": 53, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "isReferenced": true, + "name": "t", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x2d375810", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 9728, + "col": 56, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9822, + "line": 304, + "col": 1, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d375340", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 9734, + "line": 301, + "col": 5, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9752, + "col": 23, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d375210", + "kind": "VarDecl", + "loc": { + "offset": 9746, + "col": 17, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 9734, + "col": 5, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9751, + "col": 22, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "isReferenced": true, + "name": "tmp", + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "init": "list", + "inner": [ + { + "id": "0x2d375310", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 9746, + "col": 17, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9751, + "col": 22, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const basic_string &)" + }, + "list": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x2d375278", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 9750, + "col": 21, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9750, + "col": 21, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d374f48", + "kind": "ParmVarDecl", + "name": "t", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + }, + { + "id": "0x2d3756d0", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 9758, + "line": 302, + "col": 5, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9785, + "col": 32, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d375398", + "kind": "VarDecl", + "loc": { + "offset": 9763, + "col": 10, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 9758, + "col": 5, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9784, + "col": 31, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "isReferenced": true, + "name": "unit", + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "init": "c", + "inner": [ + { + "id": "0x2d3756b8", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 9770, + "col": 17, + "tokLen": 10, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9784, + "col": 31, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x2d375688", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 9770, + "col": 17, + "tokLen": 10, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9784, + "col": 31, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (basic_string &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x2d375640", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 9770, + "col": 17, + "tokLen": 10, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9784, + "col": 31, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x2d375530", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 9770, + "col": 17, + "tokLen": 10, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9784, + "col": 31, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "prvalue", + "temp": "0x2d375528", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x2d375500", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 9770, + "col": 17, + "tokLen": 10, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9784, + "col": 31, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d3754e8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 9770, + "col": 17, + "tokLen": 10, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9770, + "col": 17, + "tokLen": 10, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "std::string (*)(std::string &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x2d375468", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 9770, + "col": 17, + "tokLen": 10, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9770, + "col": 17, + "tokLen": 10, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "std::string (std::string &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce1e5b8", + "kind": "FunctionDecl", + "name": "RemoveUnit", + "type": { + "qualType": "std::string (std::string &)" + } + } + } + ] + }, + { + "id": "0x2d375448", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 9781, + "col": 28, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9781, + "col": 28, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d375210", + "kind": "VarDecl", + "name": "tmp", + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x2d375800", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 9791, + "line": 303, + "col": 5, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9819, + "col": 33, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d3757d0", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 9798, + "col": 12, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9819, + "col": 33, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d375710", + "kind": "UnresolvedLookupExpr", + "range": { + "begin": { + "offset": 9798, + "col": 12, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9808, + "col": 22, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "lvalue", + "usesADL": true, + "name": "StringTo", + "lookups": [ + { + "id": "0x2d3750e0", + "kind": "FunctionTemplateDecl", + "name": "StringTo" + }, + { + "id": "0x2d33fd20", + "kind": "FunctionTemplateDecl", + "name": "StringTo" + } + ] + }, + { + "id": "0x2d375790", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 9810, + "col": 24, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9810, + "col": 24, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d375210", + "kind": "VarDecl", + "name": "tmp", + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + } + } + }, + { + "id": "0x2d3757b0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 9815, + "col": 29, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9815, + "col": 29, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d375398", + "kind": "VarDecl", + "name": "unit", + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + } + } + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6e85d18", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::detectorType (const std::string &)" + } + }, + { + "id": "0x7f0da6e90148", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::detectorSettings (const std::string &)" + } + }, + { + "id": "0x7f0da6e67ba8", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::speedLevel (const std::string &)" + } + }, + { + "id": "0x7f0da6e71f68", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::timingMode (const std::string &)" + } + }, + { + "id": "0x7f0da6e37988", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::frameDiscardPolicy (const std::string &)" + } + }, + { + "id": "0x7f0da6e3bd78", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::fileFormat (const std::string &)" + } + }, + { + "id": "0x7f0da6e3ede8", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::externalSignalFlag (const std::string &)" + } + }, + { + "id": "0x7f0da6e444e8", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::readoutMode (const std::string &)" + } + }, + { + "id": "0x7f0da6e4af48", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::dacIndex (const std::string &)" + } + }, + { + "id": "0x7f0da6b961f8", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::burstMode (const std::string &)" + } + }, + { + "id": "0x7f0da6b9b8e8", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::timingSourceType (const std::string &)" + } + }, + { + "id": "0x7f0da6b5d9a8", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::M3_GainCaps (const std::string &)" + } + }, + { + "id": "0x7f0da6b656f8", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::portPosition (const std::string &)" + } + }, + { + "id": "0x7f0da6b6add8", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::streamingInterface (const std::string &)" + } + }, + { + "id": "0x7f0da6b6f8c8", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::vetoAlgorithm (const std::string &)" + } + }, + { + "id": "0x7f0da6b72938", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::gainMode (const std::string &)" + } + }, + { + "id": "0x7f0da6b7a688", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::polarity (const std::string &)" + } + }, + { + "id": "0x7f0da6b3c708", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::timingInfoDecoder (const std::string &)" + } + }, + { + "id": "0x7f0da6b3f7a8", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "defs::collectionMode (const std::string &)" + } + }, + { + "id": "0x7f0da6b427f8", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "uint8_t (const std::string &)" + } + }, + { + "id": "0x7f0da6b44d88", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "uint16_t (const std::string &)" + } + }, + { + "id": "0x7f0da6b466b8", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "uint32_t (const std::string &)" + } + }, + { + "id": "0x7f0da6b46ed8", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "uint64_t (const std::string &)" + } + }, + { + "id": "0x7f0da6b47700", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "int (const std::string &)" + } + }, + { + "id": "0x7f0da6b47eb8", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "bool (const std::string &)" + } + }, + { + "id": "0x7f0da6b486c8", + "kind": "FunctionDecl", + "name": "StringTo", + "type": { + "qualType": "int64_t (const std::string &)" + } + } + ] +}, +{ + "id": "0x2d3759e8", + "kind": "FunctionDecl", + "loc": { + "offset": 9856, + "file": "../include/sls/ToString.h", + "line": 306, + "col": 32, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 9825, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9885, + "col": 61, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d375c48", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs12detectorTypeEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::detectorType (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::detectorType" + }, + "inner": [ + { + "id": "0x2cd03d20", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::detectorType" + }, + "decl": { + "id": "0x2cd03c80", + "kind": "EnumDecl", + "name": "detectorType" + } + } + ] + }, + { + "id": "0x2d3758e0", + "kind": "ParmVarDecl", + "loc": { + "offset": 9884, + "col": 60, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 9865, + "col": 41, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9884, + "col": 60, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +}, +{ + "id": "0x2d375f38", + "kind": "FunctionDecl", + "loc": { + "offset": 9923, + "file": "../include/sls/ToString.h", + "line": 307, + "col": 36, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 9888, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9952, + "col": 65, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d376198", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs16detectorSettingsEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::detectorSettings (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "inner": [ + { + "id": "0x2cdc0300", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "decl": { + "id": "0x2cdc0258", + "kind": "EnumDecl", + "name": "detectorSettings" + } + } + ] + }, + { + "id": "0x2d375e38", + "kind": "ParmVarDecl", + "loc": { + "offset": 9951, + "col": 64, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 9932, + "col": 45, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 9951, + "col": 64, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +}, +{ + "id": "0x2d376488", + "kind": "FunctionDecl", + "loc": { + "offset": 9984, + "file": "../include/sls/ToString.h", + "line": 308, + "col": 30, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 9955, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10013, + "col": 59, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d3766e8", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs10speedLevelEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::speedLevel (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::speedLevel" + }, + "inner": [ + { + "id": "0x2cdc0fb0", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::speedLevel" + }, + "decl": { + "id": "0x2cdc0f08", + "kind": "EnumDecl", + "name": "speedLevel" + } + } + ] + }, + { + "id": "0x2d376388", + "kind": "ParmVarDecl", + "loc": { + "offset": 10012, + "col": 58, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 9993, + "col": 39, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10012, + "col": 58, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +}, +{ + "id": "0x2d3769d8", + "kind": "FunctionDecl", + "loc": { + "offset": 10045, + "file": "../include/sls/ToString.h", + "line": 309, + "col": 30, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10016, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10074, + "col": 59, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d376c38", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs10timingModeEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::timingMode (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::timingMode" + }, + "inner": [ + { + "id": "0x2cdbd770", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::timingMode" + }, + "decl": { + "id": "0x2cdbd6c8", + "kind": "EnumDecl", + "name": "timingMode" + } + } + ] + }, + { + "id": "0x2d3768d8", + "kind": "ParmVarDecl", + "loc": { + "offset": 10073, + "col": 58, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10054, + "col": 39, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10073, + "col": 58, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +}, +{ + "id": "0x2d376f28", + "kind": "FunctionDecl", + "loc": { + "offset": 10114, + "file": "../include/sls/ToString.h", + "line": 310, + "col": 38, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10077, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10143, + "col": 67, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d377188", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs18frameDiscardPolicyEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::frameDiscardPolicy (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::frameDiscardPolicy" + }, + "inner": [ + { + "id": "0x2cdb87d0", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::frameDiscardPolicy" + }, + "decl": { + "id": "0x2cdb8730", + "kind": "EnumDecl", + "name": "frameDiscardPolicy" + } + } + ] + }, + { + "id": "0x2d376e28", + "kind": "ParmVarDecl", + "loc": { + "offset": 10142, + "col": 66, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10123, + "col": 47, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10142, + "col": 66, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +}, +{ + "id": "0x2d377478", + "kind": "FunctionDecl", + "loc": { + "offset": 10175, + "file": "../include/sls/ToString.h", + "line": 311, + "col": 30, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10146, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10204, + "col": 59, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d3776d8", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs10fileFormatEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::fileFormat (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::fileFormat" + }, + "inner": [ + { + "id": "0x2cdbbda0", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::fileFormat" + }, + "decl": { + "id": "0x2cdbbd00", + "kind": "EnumDecl", + "name": "fileFormat" + } + } + ] + }, + { + "id": "0x2d377378", + "kind": "ParmVarDecl", + "loc": { + "offset": 10203, + "col": 58, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10184, + "col": 39, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10203, + "col": 58, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +}, +{ + "id": "0x2d3779c8", + "kind": "FunctionDecl", + "loc": { + "offset": 10244, + "file": "../include/sls/ToString.h", + "line": 312, + "col": 38, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10207, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10273, + "col": 67, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d377c28", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs18externalSignalFlagEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::externalSignalFlag (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::externalSignalFlag" + }, + "inner": [ + { + "id": "0x2cdbd540", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::externalSignalFlag" + }, + "decl": { + "id": "0x2cdbd498", + "kind": "EnumDecl", + "name": "externalSignalFlag" + } + } + ] + }, + { + "id": "0x2d3778c8", + "kind": "ParmVarDecl", + "loc": { + "offset": 10272, + "col": 66, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10253, + "col": 47, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10272, + "col": 66, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +}, +{ + "id": "0x2d377f18", + "kind": "FunctionDecl", + "loc": { + "offset": 10306, + "file": "../include/sls/ToString.h", + "line": 313, + "col": 31, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10276, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10335, + "col": 60, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d378178", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs11readoutModeEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::readoutMode (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::readoutMode" + }, + "inner": [ + { + "id": "0x2cdc0d30", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::readoutMode" + }, + "decl": { + "id": "0x2cdc0c88", + "kind": "EnumDecl", + "name": "readoutMode" + } + } + ] + }, + { + "id": "0x2d377e18", + "kind": "ParmVarDecl", + "loc": { + "offset": 10334, + "col": 59, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10315, + "col": 40, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10334, + "col": 59, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +}, +{ + "id": "0x2d378468", + "kind": "FunctionDecl", + "loc": { + "offset": 10365, + "file": "../include/sls/ToString.h", + "line": 314, + "col": 28, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10338, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10394, + "col": 57, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d3786c8", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs8dacIndexEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::dacIndex (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "inner": [ + { + "id": "0x2cdbda40", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "decl": { + "id": "0x2cdbd998", + "kind": "EnumDecl", + "name": "dacIndex" + } + } + ] + }, + { + "id": "0x2d378368", + "kind": "ParmVarDecl", + "loc": { + "offset": 10393, + "col": 56, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10374, + "col": 37, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10393, + "col": 56, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +}, +{ + "id": "0x2d3789b8", + "kind": "FunctionDecl", + "loc": { + "offset": 10425, + "file": "../include/sls/ToString.h", + "line": 315, + "col": 29, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10397, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10454, + "col": 58, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d378c18", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs9burstModeEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::burstMode (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::burstMode" + }, + "inner": [ + { + "id": "0x2cdc1230", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::burstMode" + }, + "decl": { + "id": "0x2cdc1188", + "kind": "EnumDecl", + "name": "burstMode" + } + } + ] + }, + { + "id": "0x2d3788b8", + "kind": "ParmVarDecl", + "loc": { + "offset": 10453, + "col": 57, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10434, + "col": 38, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10453, + "col": 57, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +}, +{ + "id": "0x2d378f08", + "kind": "FunctionDecl", + "loc": { + "offset": 10492, + "file": "../include/sls/ToString.h", + "line": 316, + "col": 36, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10457, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10521, + "col": 65, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d379168", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs16timingSourceTypeEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::timingSourceType (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::timingSourceType" + }, + "inner": [ + { + "id": "0x2cdc14b0", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::timingSourceType" + }, + "decl": { + "id": "0x2cdc1408", + "kind": "EnumDecl", + "name": "timingSourceType" + } + } + ] + }, + { + "id": "0x2d378e08", + "kind": "ParmVarDecl", + "loc": { + "offset": 10520, + "col": 64, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10501, + "col": 45, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10520, + "col": 64, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +}, +{ + "id": "0x2d379458", + "kind": "FunctionDecl", + "loc": { + "offset": 10554, + "file": "../include/sls/ToString.h", + "line": 317, + "col": 31, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10524, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10583, + "col": 60, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d3796b8", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs11M3_GainCapsEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::M3_GainCaps (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::M3_GainCaps" + }, + "inner": [ + { + "id": "0x2cdc1610", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::M3_GainCaps" + }, + "decl": { + "id": "0x2cdc1570", + "kind": "EnumDecl", + "name": "M3_GainCaps" + } + } + ] + }, + { + "id": "0x2d379358", + "kind": "ParmVarDecl", + "loc": { + "offset": 10582, + "col": 59, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10563, + "col": 40, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10582, + "col": 59, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +}, +{ + "id": "0x2d3799a8", + "kind": "FunctionDecl", + "loc": { + "offset": 10617, + "file": "../include/sls/ToString.h", + "line": 318, + "col": 32, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10586, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10646, + "col": 61, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d379c08", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs12portPositionEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::portPosition (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::portPosition" + }, + "inner": [ + { + "id": "0x2cdc1c40", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::portPosition" + }, + "decl": { + "id": "0x2cdc1ba0", + "kind": "EnumDecl", + "name": "portPosition" + } + } + ] + }, + { + "id": "0x2d3798a8", + "kind": "ParmVarDecl", + "loc": { + "offset": 10645, + "col": 60, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10626, + "col": 41, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10645, + "col": 60, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +}, +{ + "id": "0x2d379ef8", + "kind": "FunctionDecl", + "loc": { + "offset": 10686, + "file": "../include/sls/ToString.h", + "line": 319, + "col": 38, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10649, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10715, + "col": 67, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d37a158", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs18streamingInterfaceEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::streamingInterface (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::streamingInterface" + }, + "inner": [ + { + "id": "0x2cdc1fd0", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::streamingInterface" + }, + "decl": { + "id": "0x2cdc1f30", + "kind": "EnumDecl", + "name": "streamingInterface" + } + } + ] + }, + { + "id": "0x2d379df8", + "kind": "ParmVarDecl", + "loc": { + "offset": 10714, + "col": 66, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10695, + "col": 47, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10714, + "col": 66, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +}, +{ + "id": "0x2d37a448", + "kind": "FunctionDecl", + "loc": { + "offset": 10750, + "file": "../include/sls/ToString.h", + "line": 320, + "col": 33, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10718, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10779, + "col": 62, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d37a6a8", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs13vetoAlgorithmEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::vetoAlgorithm (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::vetoAlgorithm" + }, + "inner": [ + { + "id": "0x2cdc2390", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::vetoAlgorithm" + }, + "decl": { + "id": "0x2cdc22f0", + "kind": "EnumDecl", + "name": "vetoAlgorithm" + } + } + ] + }, + { + "id": "0x2d37a348", + "kind": "ParmVarDecl", + "loc": { + "offset": 10778, + "col": 61, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10759, + "col": 42, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10778, + "col": 61, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +}, +{ + "id": "0x2d37a998", + "kind": "FunctionDecl", + "loc": { + "offset": 10809, + "file": "../include/sls/ToString.h", + "line": 321, + "col": 28, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10782, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10838, + "col": 57, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d37abf8", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs8gainModeEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::gainMode (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::gainMode" + }, + "inner": [ + { + "id": "0x2cdc24f0", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::gainMode" + }, + "decl": { + "id": "0x2cdc2450", + "kind": "EnumDecl", + "name": "gainMode" + } + } + ] + }, + { + "id": "0x2d37a898", + "kind": "ParmVarDecl", + "loc": { + "offset": 10837, + "col": 56, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10818, + "col": 37, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10837, + "col": 56, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +}, +{ + "id": "0x2d37aee8", + "kind": "FunctionDecl", + "loc": { + "offset": 10868, + "file": "../include/sls/ToString.h", + "line": 322, + "col": 28, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10841, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10897, + "col": 57, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d37b148", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs8polarityEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::polarity (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::polarity" + }, + "inner": [ + { + "id": "0x2cdc2790", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::polarity" + }, + "decl": { + "id": "0x2cdc26f0", + "kind": "EnumDecl", + "name": "polarity" + } + } + ] + }, + { + "id": "0x2d37ade8", + "kind": "ParmVarDecl", + "loc": { + "offset": 10896, + "col": 56, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10877, + "col": 37, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10896, + "col": 56, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +}, +{ + "id": "0x2d37b438", + "kind": "FunctionDecl", + "loc": { + "offset": 10936, + "file": "../include/sls/ToString.h", + "line": 323, + "col": 37, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10900, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10965, + "col": 66, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d37b698", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs17timingInfoDecoderEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::timingInfoDecoder (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::timingInfoDecoder" + }, + "inner": [ + { + "id": "0x2cdc28f0", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::timingInfoDecoder" + }, + "decl": { + "id": "0x2cdc2850", + "kind": "EnumDecl", + "name": "timingInfoDecoder" + } + } + ] + }, + { + "id": "0x2d37b338", + "kind": "ParmVarDecl", + "loc": { + "offset": 10964, + "col": 65, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10945, + "col": 46, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 10964, + "col": 65, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +}, +{ + "id": "0x2d37b988", + "kind": "FunctionDecl", + "loc": { + "offset": 11001, + "file": "../include/sls/ToString.h", + "line": 324, + "col": 34, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 10968, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11030, + "col": 63, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d37bbe8", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs14collectionModeEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::collectionMode (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::collectionMode" + }, + "inner": [ + { + "id": "0x2cdc2a50", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::collectionMode" + }, + "decl": { + "id": "0x2cdc29b0", + "kind": "EnumDecl", + "name": "collectionMode" + } + } + ] + }, + { + "id": "0x2d37b888", + "kind": "ParmVarDecl", + "loc": { + "offset": 11029, + "col": 62, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11010, + "col": 43, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11029, + "col": 62, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +}, +{ + "id": "0x2d37be88", + "kind": "FunctionDecl", + "loc": { + "offset": 11054, + "file": "../include/sls/ToString.h", + "line": 326, + "col": 21, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11034, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11083, + "col": 50, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d37c0b8", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIhEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "uint8_t (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "unsigned char" + }, + "inner": [ + { + "id": "0x2bf08d50", + "kind": "BuiltinType", + "type": { + "qualType": "unsigned char" + } + } + ] + }, + { + "id": "0x2d37bd98", + "kind": "ParmVarDecl", + "loc": { + "offset": 11082, + "col": 49, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11063, + "col": 30, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11082, + "col": 49, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +}, +{ + "id": "0x2d37c358", + "kind": "FunctionDecl", + "loc": { + "offset": 11107, + "file": "../include/sls/ToString.h", + "line": 327, + "col": 22, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11086, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11136, + "col": 51, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d37c588", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToItEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "uint16_t (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "unsigned short" + }, + "inner": [ + { + "id": "0x2bf08d70", + "kind": "BuiltinType", + "type": { + "qualType": "unsigned short" + } + } + ] + }, + { + "id": "0x2d37c268", + "kind": "ParmVarDecl", + "loc": { + "offset": 11135, + "col": 50, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11116, + "col": 31, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11135, + "col": 50, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +}, +{ + "id": "0x2d37c828", + "kind": "FunctionDecl", + "loc": { + "offset": 11160, + "file": "../include/sls/ToString.h", + "line": 328, + "col": 22, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11139, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11189, + "col": 51, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d37ca58", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIjEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "uint32_t (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "unsigned int" + }, + "inner": [ + { + "id": "0x2bf08d90", + "kind": "BuiltinType", + "type": { + "qualType": "unsigned int" + } + } + ] + }, + { + "id": "0x2d37c738", + "kind": "ParmVarDecl", + "loc": { + "offset": 11188, + "col": 50, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11169, + "col": 31, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11188, + "col": 50, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +}, +{ + "id": "0x2d37ccc8", + "kind": "FunctionDecl", + "loc": { + "offset": 11213, + "file": "../include/sls/ToString.h", + "line": 329, + "col": 22, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11192, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11242, + "col": 51, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d37cef8", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToImEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "uint64_t (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "unsigned long" + }, + "inner": [ + { + "id": "0x2bf08db0", + "kind": "BuiltinType", + "type": { + "qualType": "unsigned long" + } + } + ] + }, + { + "id": "0x2d37cc08", + "kind": "ParmVarDecl", + "loc": { + "offset": 11241, + "col": 50, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11222, + "col": 31, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11241, + "col": 50, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +}, +{ + "id": "0x2d37d1a0", + "kind": "FunctionDecl", + "loc": { + "offset": 11261, + "file": "../include/sls/ToString.h", + "line": 330, + "col": 17, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11245, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11290, + "col": 46, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d37d3d8", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIiEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "int (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "int" + }, + "inner": [ + { + "id": "0x2bf08cf0", + "kind": "BuiltinType", + "type": { + "qualType": "int" + } + } + ] + }, + { + "id": "0x2d37d0a8", + "kind": "ParmVarDecl", + "loc": { + "offset": 11289, + "col": 45, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11270, + "col": 26, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11289, + "col": 45, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +}, +{ + "id": "0x2d37d648", + "kind": "FunctionDecl", + "loc": { + "offset": 11310, + "file": "../include/sls/ToString.h", + "line": 331, + "col": 18, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11293, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11339, + "col": 47, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d37d878", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIbEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "bool (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "bool" + }, + "inner": [ + { + "id": "0x2bf08c70", + "kind": "BuiltinType", + "type": { + "qualType": "bool" + } + } + ] + }, + { + "id": "0x2d37d588", + "kind": "ParmVarDecl", + "loc": { + "offset": 11338, + "col": 46, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11319, + "col": 27, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11338, + "col": 46, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +}, +{ + "id": "0x2d37db18", + "kind": "FunctionDecl", + "loc": { + "offset": 11362, + "file": "../include/sls/ToString.h", + "line": 332, + "col": 21, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11342, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11391, + "col": 50, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "previousDecl": "0x2d37dd48", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIlEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "int64_t (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "long" + }, + "inner": [ + { + "id": "0x2bf08d10", + "kind": "BuiltinType", + "type": { + "qualType": "long" + } + } + ] + }, + { + "id": "0x2d37da28", + "kind": "ParmVarDecl", + "loc": { + "offset": 11390, + "col": 49, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11371, + "col": 30, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11390, + "col": 49, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + ] +}, +{ + "id": "0x2d37ec60", + "kind": "FunctionTemplateDecl", + "loc": { + "offset": 11628, + "file": "../include/sls/ToString.h", + "line": 342, + "col": 16, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11591, + "line": 341, + "col": 1, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11838, + "line": 348, + "col": 1, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "StringTo", + "inner": [ + { + "id": "0x2d37e648", + "kind": "TemplateTypeParmDecl", + "loc": { + "offset": 11610, + "line": 341, + "col": 20, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11601, + "col": 11, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11610, + "col": 20, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "isReferenced": true, + "name": "T", + "tagUsed": "typename", + "depth": 0, + "index": 0 + }, + { + "id": "0x2d37ebb8", + "kind": "FunctionDecl", + "loc": { + "offset": 11628, + "line": 342, + "col": 16, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11613, + "col": 1, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11838, + "line": 348, + "col": 1, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "name": "StringTo", + "type": { + "qualType": "std::vector (const std::vector &)" + }, + "inner": [ + { + "id": "0x2d37eaa0", + "kind": "ParmVarDecl", + "loc": { + "offset": 11669, + "line": 342, + "col": 57, + "tokLen": 7, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11637, + "col": 25, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11669, + "col": 57, + "tokLen": 7, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "isReferenced": true, + "name": "strings", + "type": { + "qualType": "const std::vector &" + } + }, + { + "id": "0x2d3b6478", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 11678, + "col": 66, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11838, + "line": 348, + "col": 1, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d37ef50", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 11684, + "line": 343, + "col": 5, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11705, + "col": 26, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d37eee8", + "kind": "VarDecl", + "loc": { + "offset": 11699, + "col": 20, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11684, + "col": 5, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11699, + "col": 20, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "isReferenced": true, + "name": "result", + "type": { + "desugaredQualType": "vector", + "qualType": "std::vector" + }, + "nrvo": true + } + ] + }, + { + "id": "0x2d3a9118", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 11711, + "line": 344, + "col": 5, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11740, + "col": 34, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d37ef88", + "kind": "CXXDependentScopeMemberExpr", + "range": { + "begin": { + "offset": 11711, + "col": 5, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11718, + "col": 12, + "tokLen": 7, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "lvalue", + "isArrow": false, + "member": "reserve", + "inner": [ + { + "id": "0x2d37ef68", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 11711, + "col": 5, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11711, + "col": 5, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "vector", + "qualType": "std::vector" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d37eee8", + "kind": "VarDecl", + "name": "result", + "type": { + "desugaredQualType": "vector", + "qualType": "std::vector" + } + } + } + ] + }, + { + "id": "0x2d3a8c00", + "kind": "CXXMemberCallExpr", + "range": { + "begin": { + "offset": 11726, + "col": 20, + "tokLen": 7, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11739, + "col": 33, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "size_type", + "typeAliasDeclId": "0x2c532128" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d3a8bd0", + "kind": "MemberExpr", + "range": { + "begin": { + "offset": 11726, + "col": 20, + "tokLen": 7, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11734, + "col": 28, + "tokLen": 4, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "name": "size", + "isArrow": false, + "referencedMemberDecl": "0x2d39e748", + "inner": [ + { + "id": "0x2d37efd0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 11726, + "col": 20, + "tokLen": 7, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11726, + "col": 20, + "tokLen": 7, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const std::vector>", + "qualType": "const std::vector" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d37eaa0", + "kind": "ParmVarDecl", + "name": "strings", + "type": { + "qualType": "const std::vector &" + } + } + } + ] + } + ] + } + ] + }, + { + "id": "0x2d3b6250", + "kind": "CXXForRangeStmt", + "range": { + "begin": { + "offset": 11747, + "line": 345, + "col": 5, + "tokLen": 3, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11816, + "line": 346, + "col": 40, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + {}, + { + "id": "0x2d3a94c0", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 11768, + "line": 345, + "col": 26, + "tokLen": 7, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11768, + "col": 26, + "tokLen": 7, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d3a92c0", + "kind": "VarDecl", + "loc": { + "offset": 11768, + "col": 26, + "tokLen": 7, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11768, + "col": 26, + "tokLen": 7, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11768, + "col": 26, + "tokLen": 7, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "isImplicit": true, + "isReferenced": true, + "name": "__range2", + "type": { + "qualType": "const std::vector &" + }, + "init": "c", + "inner": [ + { + "id": "0x2d3a9140", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 11768, + "col": 26, + "tokLen": 7, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11768, + "col": 26, + "tokLen": 7, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const std::vector>", + "qualType": "const std::vector" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d37eaa0", + "kind": "ParmVarDecl", + "name": "strings", + "type": { + "qualType": "const std::vector &" + } + } + } + ] + } + ] + }, + { + "id": "0x2d3b3a60", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d3a9558", + "kind": "VarDecl", + "loc": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "isImplicit": true, + "isReferenced": true, + "name": "__begin2", + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const_iterator", + "typeAliasDeclId": "0x2d393288" + }, + "init": "c", + "inner": [ + { + "id": "0x2d3b3320", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const_iterator", + "typeAliasDeclId": "0x2d393288" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d3b32f0", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const_iterator", + "typeAliasDeclId": "0x2d393288" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (__normal_iterator *, vector>> &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x2d3b30b8", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const_iterator", + "typeAliasDeclId": "0x2d393288" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x2d3a96f8", + "kind": "CXXMemberCallExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const_iterator", + "typeAliasDeclId": "0x2d393288" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d3a96c8", + "kind": "MemberExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "name": "begin", + "isArrow": false, + "referencedMemberDecl": "0x2d39da60", + "inner": [ + { + "id": "0x2d3a94d8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const std::vector>", + "qualType": "const std::vector" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d3a92c0", + "kind": "VarDecl", + "name": "__range2", + "type": { + "qualType": "const std::vector &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x2d3b3a78", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d3a9600", + "kind": "VarDecl", + "loc": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "isImplicit": true, + "isReferenced": true, + "name": "__end2", + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const_iterator", + "typeAliasDeclId": "0x2d393288" + }, + "init": "c", + "inner": [ + { + "id": "0x2d3b3a48", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const_iterator", + "typeAliasDeclId": "0x2d393288" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d3b3a18", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const_iterator", + "typeAliasDeclId": "0x2d393288" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (__normal_iterator *, vector>> &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x2d3b3a00", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const_iterator", + "typeAliasDeclId": "0x2d393288" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x2d3b33c8", + "kind": "CXXMemberCallExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const_iterator", + "typeAliasDeclId": "0x2d393288" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d3b3398", + "kind": "MemberExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "name": "end", + "isArrow": false, + "referencedMemberDecl": "0x2d39dc30", + "inner": [ + { + "id": "0x2d3a94f8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const std::vector>", + "qualType": "const std::vector" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d3a92c0", + "kind": "VarDecl", + "name": "__range2", + "type": { + "qualType": "const std::vector &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x2d3b5e70", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x2d3b5e58", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "bool (*)(const __normal_iterator *, vector, allocator>>> &, const __normal_iterator *, vector, allocator>>> &) noexcept" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x2d3b5dd8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "bool (const __normal_iterator *, vector, allocator>>> &, const __normal_iterator *, vector, allocator>>> &) noexcept" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d3b4560", + "kind": "FunctionDecl", + "name": "operator!=", + "type": { + "qualType": "bool (const __normal_iterator *, vector, allocator>>> &, const __normal_iterator *, vector, allocator>>> &) noexcept" + } + } + } + ] + }, + { + "id": "0x2d3b5da8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const __gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const __normal_iterator *, vector, allocator>>>" + }, + "valueCategory": "lvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x2d3b3a90", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const_iterator", + "typeAliasDeclId": "0x2d393288" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d3a9558", + "kind": "VarDecl", + "name": "__begin2", + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const_iterator", + "typeAliasDeclId": "0x2d393288" + } + } + } + ] + }, + { + "id": "0x2d3b5dc0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const __gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const __normal_iterator *, vector, allocator>>>" + }, + "valueCategory": "lvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x2d3b3ab0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const_iterator", + "typeAliasDeclId": "0x2d393288" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d3a9600", + "kind": "VarDecl", + "name": "__end2", + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const_iterator", + "typeAliasDeclId": "0x2d393288" + } + } + } + ] + } + ] + }, + { + "id": "0x2d3b5f60", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "__normal_iterator *, vector>>" + }, + "valueCategory": "lvalue", + "inner": [ + { + "id": "0x2d3b5f48", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "__normal_iterator *, vector>> &(*)() noexcept" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x2d3b5ec8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "__normal_iterator *, vector>> &() noexcept" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d3b0dc8", + "kind": "CXXMethodDecl", + "name": "operator++", + "type": { + "qualType": "__normal_iterator *, vector>> &() noexcept" + } + } + } + ] + }, + { + "id": "0x2d3b5ea8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const_iterator", + "typeAliasDeclId": "0x2d393288" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d3a9558", + "kind": "VarDecl", + "name": "__begin2", + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const_iterator", + "typeAliasDeclId": "0x2d393288" + } + } + } + ] + }, + { + "id": "0x2d3a9238", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 11752, + "col": 10, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11775, + "col": 33, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d3a91d0", + "kind": "VarDecl", + "loc": { + "offset": 11764, + "col": 22, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "range": { + "begin": { + "offset": 11752, + "col": 10, + "tokLen": 5, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "isReferenced": true, + "name": "s", + "type": { + "qualType": "std::basic_string const &" + }, + "init": "c", + "inner": [ + { + "id": "0x2d3b6080", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::basic_string" + }, + "valueCategory": "lvalue", + "inner": [ + { + "id": "0x2d3b6068", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "reference (*)() const noexcept" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x2d3b5ff0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "reference () const noexcept" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d3b0a80", + "kind": "CXXMethodDecl", + "name": "operator*", + "type": { + "qualType": "reference () const noexcept" + } + } + } + ] + }, + { + "id": "0x2d3b5fd8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "const __gnu_cxx::__normal_iterator *, std::vector>>" + }, + "valueCategory": "lvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x2d3b5f90", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11766, + "col": 24, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const_iterator", + "typeAliasDeclId": "0x2d393288" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d3a9558", + "kind": "VarDecl", + "name": "__begin2", + "type": { + "desugaredQualType": "__gnu_cxx::__normal_iterator *, std::vector>>", + "qualType": "const_iterator", + "typeAliasDeclId": "0x2d393288" + } + } + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x2d3b6418", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 11785, + "line": 346, + "col": 9, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11816, + "col": 40, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d3b62d0", + "kind": "CXXDependentScopeMemberExpr", + "range": { + "begin": { + "offset": 11785, + "col": 9, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11792, + "col": 16, + "tokLen": 9, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "lvalue", + "isArrow": false, + "member": "push_back", + "inner": [ + { + "id": "0x2d3b62b0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 11785, + "col": 9, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11785, + "col": 9, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "vector", + "qualType": "std::vector" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d37eee8", + "kind": "VarDecl", + "name": "result", + "type": { + "desugaredQualType": "vector", + "qualType": "std::vector" + } + } + } + ] + }, + { + "id": "0x2d3b63f0", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 11802, + "col": 26, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11815, + "col": 39, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x2d3b6348", + "kind": "UnresolvedLookupExpr", + "range": { + "begin": { + "offset": 11802, + "col": 26, + "tokLen": 8, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11812, + "col": 36, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "lvalue", + "usesADL": true, + "name": "StringTo", + "lookups": [ + { + "id": "0x2d37ec60", + "kind": "FunctionTemplateDecl", + "name": "StringTo" + }, + { + "id": "0x2d3750e0", + "kind": "FunctionTemplateDecl", + "name": "StringTo" + }, + { + "id": "0x2d33fd20", + "kind": "FunctionTemplateDecl", + "name": "StringTo" + } + ] + }, + { + "id": "0x2d3b63d0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 11814, + "col": 38, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11814, + "col": 38, + "tokLen": 1, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "std::basic_string const" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d3a91d0", + "kind": "VarDecl", + "name": "s", + "type": { + "qualType": "std::basic_string const &" + } + } + } + ] + } + ] + } + ] + }, + { + "id": "0x2d3b6460", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 11823, + "line": 347, + "col": 5, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11830, + "col": 12, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "inner": [ + { + "id": "0x2d3b6440", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 11830, + "col": 12, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + }, + "end": { + "offset": 11830, + "col": 12, + "tokLen": 6, + "includedFrom": { + "file": "ToString.cpp" + } + } + }, + "type": { + "desugaredQualType": "vector", + "qualType": "std::vector" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d37eee8", + "kind": "VarDecl", + "name": "result", + "type": { + "desugaredQualType": "vector", + "qualType": "std::vector" + } + } + } + ] + } + ] + } + ] + } + ] +}, +{ + "id": "0x7f0da6e85d18", + "kind": "FunctionDecl", + "loc": { + "offset": 21816, + "file": "ToString.cpp", + "line": 706, + "col": 32, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 21785, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 22375, + "line": 724, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d3759e8", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs12detectorTypeEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::detectorType (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::detectorType" + }, + "inner": [ + { + "id": "0x2cd03d20", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::detectorType" + }, + "decl": { + "id": "0x2cd03c80", + "kind": "EnumDecl", + "name": "detectorType" + } + } + ] + }, + { + "id": "0x7f0da6e85c40", + "kind": "ParmVarDecl", + "loc": { + "offset": 21844, + "line": 706, + "col": 60, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 21825, + "col": 41, + "tokLen": 5 + }, + "end": { + "offset": 21844, + "col": 60, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6e8ff78", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 21847, + "col": 63, + "tokLen": 1 + }, + "end": { + "offset": 22375, + "line": 724, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6e87208", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 21853, + "line": 707, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 21892, + "line": 708, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6e87158", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 21857, + "line": 707, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 21862, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e87140", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 21859, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 21859, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e87120", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 21859, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 21859, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e85f00", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 21857, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 21857, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e85c40", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e87108", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 21862, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 21862, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e85f20", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 21862, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 21862, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"Eiger\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e871f8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 21879, + "line": 708, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 21892, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6e871c8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 21886, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 21892, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorType" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cd03d90", + "kind": "EnumConstantDecl", + "name": "EIGER", + "type": { + "qualType": "slsDetectorDefs::detectorType" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e88538", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 21903, + "line": 709, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 21945, + "line": 710, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6e88488", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 21907, + "line": 709, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 21912, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e88470", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 21909, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 21909, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e88450", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 21909, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 21909, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e87228", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 21907, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 21907, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e85c40", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e88438", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 21912, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 21912, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e87248", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 21912, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 21912, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"Gotthard\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e88528", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 21932, + "line": 710, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 21945, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6e884f8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 21939, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 21945, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorType" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cd03de0", + "kind": "EnumConstantDecl", + "name": "GOTTHARD", + "type": { + "qualType": "slsDetectorDefs::detectorType" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e89868", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 21959, + "line": 711, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 22001, + "line": 712, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6e897b8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 21963, + "line": 711, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 21968, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e897a0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 21965, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 21965, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e89780", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 21965, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 21965, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e88558", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 21963, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 21963, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e85c40", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e89768", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 21968, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 21968, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e88578", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 21968, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 21968, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"Jungfrau\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e89858", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 21988, + "line": 712, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 22001, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6e89828", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 21995, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 22001, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorType" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cd03e30", + "kind": "EnumConstantDecl", + "name": "JUNGFRAU", + "type": { + "qualType": "slsDetectorDefs::detectorType" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e8ab98", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 22015, + "line": 713, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 22062, + "line": 714, + "col": 22, + "tokLen": 13 + } + }, + "inner": [ + { + "id": "0x7f0da6e8aae8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 22019, + "line": 713, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22024, + "col": 14, + "tokLen": 15 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e8aad0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22021, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22021, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e8aab0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22021, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22021, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e89888", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22019, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22019, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e85c40", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e8aa98", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22024, + "col": 14, + "tokLen": 15 + }, + "end": { + "offset": 22024, + "col": 14, + "tokLen": 15 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e898a8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 22024, + "col": 14, + "tokLen": 15 + }, + "end": { + "offset": 22024, + "col": 14, + "tokLen": 15 + } + }, + "type": { + "qualType": "const char[14]" + }, + "valueCategory": "lvalue", + "value": "\"ChipTestBoard\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e8ab88", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 22049, + "line": 714, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 22062, + "col": 22, + "tokLen": 13 + } + }, + "inner": [ + { + "id": "0x7f0da6e8ab58", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22056, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 22062, + "col": 22, + "tokLen": 13 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorType" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cd03e80", + "kind": "EnumConstantDecl", + "name": "CHIPTESTBOARD", + "type": { + "qualType": "slsDetectorDefs::detectorType" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e8bec8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 22081, + "line": 715, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 22121, + "line": 716, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6e8be18", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 22085, + "line": 715, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22090, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e8be00", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22087, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22087, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e8bde0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22087, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22087, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e8abb8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22085, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22085, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e85c40", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e8bdc8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22090, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 22090, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e8abd8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 22090, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 22090, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"Moench\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e8beb8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 22108, + "line": 716, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 22121, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6e8be88", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22115, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 22121, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorType" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cd03ed0", + "kind": "EnumConstantDecl", + "name": "MOENCH", + "type": { + "qualType": "slsDetectorDefs::detectorType" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e8d1f8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 22133, + "line": 717, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 22174, + "line": 718, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6e8d148", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 22137, + "line": 717, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22142, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e8d130", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22139, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22139, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e8d110", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22139, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22139, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e8bee8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22137, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22137, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e85c40", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e8d0f8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22142, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 22142, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e8bf08", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 22142, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 22142, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char[8]" + }, + "valueCategory": "lvalue", + "value": "\"Mythen3\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e8d1e8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 22161, + "line": 718, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 22174, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6e8d1b8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22168, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 22174, + "col": 22, + "tokLen": 7 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorType" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cd03f20", + "kind": "EnumConstantDecl", + "name": "MYTHEN3", + "type": { + "qualType": "slsDetectorDefs::detectorType" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e8e528", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 22187, + "line": 719, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 22230, + "line": 720, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6e8e478", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 22191, + "line": 719, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22196, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e8e460", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22193, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22193, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e8e440", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22193, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22193, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e8d218", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22191, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22191, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e85c40", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e8e428", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22196, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 22196, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e8d238", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 22196, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 22196, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"Gotthard2\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e8e518", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 22217, + "line": 720, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 22230, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6e8e4e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22224, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 22230, + "col": 22, + "tokLen": 9 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorType" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cd03f70", + "kind": "EnumConstantDecl", + "name": "GOTTHARD2", + "type": { + "qualType": "slsDetectorDefs::detectorType" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e8f898", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 22245, + "line": 721, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 22299, + "line": 722, + "col": 22, + "tokLen": 20 + } + }, + "inner": [ + { + "id": "0x7f0da6e8f7e8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 22249, + "line": 721, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22254, + "col": 14, + "tokLen": 22 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e8f7d0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22251, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22251, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e8f7b0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22251, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22251, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e8e548", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22249, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22249, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e85c40", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e8f798", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22254, + "col": 14, + "tokLen": 22 + }, + "end": { + "offset": 22254, + "col": 14, + "tokLen": 22 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e8e568", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 22254, + "col": 14, + "tokLen": 22 + }, + "end": { + "offset": 22254, + "col": 14, + "tokLen": 22 + } + }, + "type": { + "qualType": "const char[21]" + }, + "valueCategory": "lvalue", + "value": "\"Xilinx_ChipTestBoard\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e8f888", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 22286, + "line": 722, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 22299, + "col": 22, + "tokLen": 20 + } + }, + "inner": [ + { + "id": "0x7f0da6e8f858", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22293, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 22299, + "col": 22, + "tokLen": 20 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorType" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cd03fc0", + "kind": "EnumConstantDecl", + "name": "XILINX_CHIPTESTBOARD", + "type": { + "qualType": "slsDetectorDefs::detectorType" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e8ff60", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 22325, + "line": 723, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 22372, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6e8ff48", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 22325, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 22372, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6e8ff18", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 22331, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 22372, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6e8ff00", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 22331, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 22372, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6e8fed8", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 22331, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 22372, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6e8feb8", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 22331, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 22372, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6e8feb0", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6e8fe80", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 22331, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 22372, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6e8fe68", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 22344, + "col": 24, + "tokLen": 24 + }, + "end": { + "offset": 22371, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6e8fe50", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22344, + "col": 24, + "tokLen": 24 + }, + "end": { + "offset": 22371, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6e8fe30", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 22344, + "col": 24, + "tokLen": 24 + }, + "end": { + "offset": 22371, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6e8fe28", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6e8fdf0", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 22344, + "col": 24, + "tokLen": 24 + }, + "end": { + "offset": 22371, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e8fdd8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22369, + "col": 49, + "tokLen": 1 + }, + "end": { + "offset": 22369, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e8fdb8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22369, + "col": 49, + "tokLen": 1 + }, + "end": { + "offset": 22369, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6e8fda0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22344, + "col": 24, + "tokLen": 24 + }, + "end": { + "offset": 22344, + "col": 24, + "tokLen": 24 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e8f8c8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 22344, + "col": 24, + "tokLen": 24 + }, + "end": { + "offset": 22344, + "col": 24, + "tokLen": 24 + } + }, + "type": { + "qualType": "const char[23]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown detector type \"" + } + ] + }, + { + "id": "0x7f0da6e8f8f8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22371, + "col": 51, + "tokLen": 1 + }, + "end": { + "offset": 22371, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e85c40", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +}, +{ + "id": "0x7f0da6e90148", + "kind": "FunctionDecl", + "loc": { + "offset": 22413, + "file": "ToString.cpp", + "line": 726, + "col": 36, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 22378, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 23662, + "line": 768, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d375f38", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs16detectorSettingsEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::detectorSettings (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "inner": [ + { + "id": "0x2cdc0300", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "decl": { + "id": "0x2cdc0258", + "kind": "EnumDecl", + "name": "detectorSettings" + } + } + ] + }, + { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "loc": { + "offset": 22441, + "line": 726, + "col": 64, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 22422, + "col": 45, + "tokLen": 5 + }, + "end": { + "offset": 22441, + "col": 64, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6e67978", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 22444, + "col": 67, + "tokLen": 1 + }, + "end": { + "offset": 23662, + "line": 768, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6e91638", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 22450, + "line": 727, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 22492, + "line": 728, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6e91588", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 22454, + "line": 727, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22459, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e91570", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22456, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22456, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e91550", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22456, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22456, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e90330", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22454, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22454, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e91538", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22459, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 22459, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e90350", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 22459, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 22459, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"standard\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e91628", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 22479, + "line": 728, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 22492, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6e915f8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22486, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 22492, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0320", + "kind": "EnumConstantDecl", + "name": "STANDARD", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e92968", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 22506, + "line": 729, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 22544, + "line": 730, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6e928b8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 22510, + "line": 729, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22515, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e928a0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22512, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22512, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e92880", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22512, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22512, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e91658", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22510, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22510, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e92868", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22515, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 22515, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e91678", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 22515, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 22515, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char[5]" + }, + "valueCategory": "lvalue", + "value": "\"fast\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e92958", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 22531, + "line": 730, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 22544, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6e92928", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22538, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 22544, + "col": 22, + "tokLen": 4 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0370", + "kind": "EnumConstantDecl", + "name": "FAST", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e93c98", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 22554, + "line": 731, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 22596, + "line": 732, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6e93be8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 22558, + "line": 731, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22563, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e93bd0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22560, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22560, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e93bb0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22560, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22560, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e92988", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22558, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22558, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e93b98", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22563, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 22563, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e929a8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 22563, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 22563, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"highgain\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e93c88", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 22583, + "line": 732, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 22596, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6e93c58", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22590, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 22596, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc03c0", + "kind": "EnumConstantDecl", + "name": "HIGHGAIN", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e94fc8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 22610, + "line": 733, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 22655, + "line": 734, + "col": 22, + "tokLen": 11 + } + }, + "inner": [ + { + "id": "0x7f0da6e94f18", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 22614, + "line": 733, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22619, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e94f00", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22616, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22616, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e94ee0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22616, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22616, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e93cb8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22614, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22614, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e94ec8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22619, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 22619, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e93cd8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 22619, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 22619, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char[12]" + }, + "valueCategory": "lvalue", + "value": "\"dynamicgain\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e94fb8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 22642, + "line": 734, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 22655, + "col": 22, + "tokLen": 11 + } + }, + "inner": [ + { + "id": "0x7f0da6e94f88", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22649, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 22655, + "col": 22, + "tokLen": 11 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0410", + "kind": "EnumConstantDecl", + "name": "DYNAMICGAIN", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e962f8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 22672, + "line": 735, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 22713, + "line": 736, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6e96248", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 22676, + "line": 735, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22681, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e96230", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22678, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22678, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e96210", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22678, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22678, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e94fe8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22676, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22676, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e961f8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22681, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 22681, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e95008", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 22681, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 22681, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char[8]" + }, + "valueCategory": "lvalue", + "value": "\"lowgain\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e962e8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 22700, + "line": 736, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 22713, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6e962b8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22707, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 22713, + "col": 22, + "tokLen": 7 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0460", + "kind": "EnumConstantDecl", + "name": "LOWGAIN", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e56638", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 22726, + "line": 737, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 22770, + "line": 738, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6e56588", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 22730, + "line": 737, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22735, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e56570", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22732, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22732, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e56550", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22732, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22732, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e96318", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22730, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22730, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e56538", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22735, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 22735, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e96338", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 22735, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 22735, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char[11]" + }, + "valueCategory": "lvalue", + "value": "\"mediumgain\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e56628", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 22757, + "line": 738, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 22770, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6e565f8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22764, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 22770, + "col": 22, + "tokLen": 10 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc04b0", + "kind": "EnumConstantDecl", + "name": "MEDIUMGAIN", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e57968", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 22786, + "line": 739, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 22832, + "line": 740, + "col": 22, + "tokLen": 12 + } + }, + "inner": [ + { + "id": "0x7f0da6e578b8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 22790, + "line": 739, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22795, + "col": 14, + "tokLen": 14 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e578a0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22792, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22792, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e57880", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22792, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22792, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e56658", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22790, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22790, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e57868", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22795, + "col": 14, + "tokLen": 14 + }, + "end": { + "offset": 22795, + "col": 14, + "tokLen": 14 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e56678", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 22795, + "col": 14, + "tokLen": 14 + }, + "end": { + "offset": 22795, + "col": 14, + "tokLen": 14 + } + }, + "type": { + "qualType": "const char[13]" + }, + "valueCategory": "lvalue", + "value": "\"veryhighgain\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e57958", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 22819, + "line": 740, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 22832, + "col": 22, + "tokLen": 12 + } + }, + "inner": [ + { + "id": "0x7f0da6e57928", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22826, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 22832, + "col": 22, + "tokLen": 12 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0500", + "kind": "EnumConstantDecl", + "name": "VERYHIGHGAIN", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e58c98", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 22850, + "line": 741, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 22893, + "line": 742, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6e58be8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 22854, + "line": 741, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22859, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e58bd0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22856, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22856, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e58bb0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22856, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22856, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e57988", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22854, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22854, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e58b98", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22859, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 22859, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e579a8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 22859, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 22859, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"highgain0\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e58c88", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 22880, + "line": 742, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 22893, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6e58c58", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22887, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 22893, + "col": 22, + "tokLen": 9 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0550", + "kind": "EnumConstantDecl", + "name": "HIGHGAIN0", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e59fc8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 22908, + "line": 743, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 22950, + "line": 744, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6e59f18", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 22912, + "line": 743, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22917, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e59f00", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22914, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22914, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e59ee0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22914, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22914, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e58cb8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22912, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22912, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e59ec8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22917, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 22917, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e58cd8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 22917, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 22917, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"fixgain1\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e59fb8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 22937, + "line": 744, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 22950, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6e59f88", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22944, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 22950, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc05a0", + "kind": "EnumConstantDecl", + "name": "FIXGAIN1", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e5b2f8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 22964, + "line": 745, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 23006, + "line": 746, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6e5b248", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 22968, + "line": 745, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22973, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e5b230", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22970, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22970, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e5b210", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22970, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 22970, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e59fe8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 22968, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 22968, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e5b1f8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 22973, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 22973, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e5a008", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 22973, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 22973, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"fixgain2\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e5b2e8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 22993, + "line": 746, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 23006, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6e5b2b8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23000, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 23006, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc05f0", + "kind": "EnumConstantDecl", + "name": "FIXGAIN2", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e5c628", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 23020, + "line": 747, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 23065, + "line": 748, + "col": 22, + "tokLen": 11 + } + }, + "inner": [ + { + "id": "0x7f0da6e5c578", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 23024, + "line": 747, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23029, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e5c560", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23026, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23026, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e5c540", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23026, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23026, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e5b318", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23024, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23024, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e5c528", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23029, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 23029, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e5b338", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 23029, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 23029, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char[12]" + }, + "valueCategory": "lvalue", + "value": "\"verylowgain\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e5c618", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 23052, + "line": 748, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 23065, + "col": 22, + "tokLen": 11 + } + }, + "inner": [ + { + "id": "0x7f0da6e5c5e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23059, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 23065, + "col": 22, + "tokLen": 11 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0640", + "kind": "EnumConstantDecl", + "name": "VERYLOWGAIN", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e5d958", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 23082, + "line": 749, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 23121, + "line": 750, + "col": 22, + "tokLen": 11 + } + }, + "inner": [ + { + "id": "0x7f0da6e5d8a8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 23086, + "line": 749, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23091, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e5d890", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23088, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23088, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e5d870", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23088, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23088, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e5c648", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23086, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23086, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e5d858", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23091, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 23091, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e5c668", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 23091, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 23091, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"g1_hg\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e5d948", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 23108, + "line": 750, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 23121, + "col": 22, + "tokLen": 11 + } + }, + "inner": [ + { + "id": "0x7f0da6e5d918", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23115, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 23121, + "col": 22, + "tokLen": 11 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0690", + "kind": "EnumConstantDecl", + "name": "G1_HIGHGAIN", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e5ec88", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 23138, + "line": 751, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 23177, + "line": 752, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6e5ebd8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 23142, + "line": 751, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23147, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e5ebc0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23144, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23144, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e5eba0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23144, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23144, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e5d978", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23142, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23142, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e5eb88", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23147, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 23147, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e5d998", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 23147, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 23147, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"g1_lg\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e5ec78", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 23164, + "line": 752, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 23177, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6e5ec48", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23171, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 23177, + "col": 22, + "tokLen": 10 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc06e0", + "kind": "EnumConstantDecl", + "name": "G1_LOWGAIN", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e5ffb8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 23193, + "line": 753, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 23235, + "line": 754, + "col": 22, + "tokLen": 19 + } + }, + "inner": [ + { + "id": "0x7f0da6e5ff08", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 23197, + "line": 753, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23202, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e5fef0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23199, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23199, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e5fed0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23199, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23199, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e5eca8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23197, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23197, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e5feb8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23202, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 23202, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e5ecc8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 23202, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 23202, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"g2_hc_hg\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e5ffa8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 23222, + "line": 754, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 23235, + "col": 22, + "tokLen": 19 + } + }, + "inner": [ + { + "id": "0x7f0da6e5ff78", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23229, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 23235, + "col": 22, + "tokLen": 19 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0730", + "kind": "EnumConstantDecl", + "name": "G2_HIGHCAP_HIGHGAIN", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e612e8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 23260, + "line": 755, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 23302, + "line": 756, + "col": 22, + "tokLen": 18 + } + }, + "inner": [ + { + "id": "0x7f0da6e61238", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 23264, + "line": 755, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23269, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e61220", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23266, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23266, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e61200", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23266, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23266, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e5ffd8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23264, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23264, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e611e8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23269, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 23269, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e5fff8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 23269, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 23269, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"g2_hc_lg\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e612d8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 23289, + "line": 756, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 23302, + "col": 22, + "tokLen": 18 + } + }, + "inner": [ + { + "id": "0x7f0da6e612a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23296, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 23302, + "col": 22, + "tokLen": 18 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0780", + "kind": "EnumConstantDecl", + "name": "G2_HIGHCAP_LOWGAIN", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e62618", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 23326, + "line": 757, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 23368, + "line": 758, + "col": 22, + "tokLen": 18 + } + }, + "inner": [ + { + "id": "0x7f0da6e62568", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 23330, + "line": 757, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23335, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e62550", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23332, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23332, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e62530", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23332, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23332, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e61308", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23330, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23330, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e62518", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23335, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 23335, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e61328", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 23335, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 23335, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"g2_lc_hg\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e62608", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 23355, + "line": 758, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 23368, + "col": 22, + "tokLen": 18 + } + }, + "inner": [ + { + "id": "0x7f0da6e625d8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23362, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 23368, + "col": 22, + "tokLen": 18 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc07d0", + "kind": "EnumConstantDecl", + "name": "G2_LOWCAP_HIGHGAIN", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e63948", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 23392, + "line": 759, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 23434, + "line": 760, + "col": 22, + "tokLen": 17 + } + }, + "inner": [ + { + "id": "0x7f0da6e63898", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 23396, + "line": 759, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23401, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e63880", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23398, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23398, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e63860", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23398, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23398, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e62638", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23396, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23396, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e63848", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23401, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 23401, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e62658", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 23401, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 23401, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"g2_lc_lg\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e63938", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 23421, + "line": 760, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 23434, + "col": 22, + "tokLen": 17 + } + }, + "inner": [ + { + "id": "0x7f0da6e63908", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23428, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 23434, + "col": 22, + "tokLen": 17 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0820", + "kind": "EnumConstantDecl", + "name": "G2_LOWCAP_LOWGAIN", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e64c78", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 23457, + "line": 761, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 23496, + "line": 762, + "col": 22, + "tokLen": 11 + } + }, + "inner": [ + { + "id": "0x7f0da6e64bc8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 23461, + "line": 761, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23466, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e64bb0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23463, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23463, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e64b90", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23463, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23463, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e63968", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23461, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23461, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e64b78", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23466, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 23466, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e63988", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 23466, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 23466, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"g4_hg\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e64c68", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 23483, + "line": 762, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 23496, + "col": 22, + "tokLen": 11 + } + }, + "inner": [ + { + "id": "0x7f0da6e64c38", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23490, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 23496, + "col": 22, + "tokLen": 11 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0870", + "kind": "EnumConstantDecl", + "name": "G4_HIGHGAIN", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e65fa8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 23513, + "line": 763, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 23552, + "line": 764, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6e65ef8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 23517, + "line": 763, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23522, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e65ee0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23519, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23519, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e65ec0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23519, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23519, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e64c98", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23517, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23517, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e65ea8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23522, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 23522, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e64cb8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 23522, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 23522, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"gain0\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e65f98", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 23539, + "line": 764, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 23552, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6e65f68", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23546, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 23552, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0910", + "kind": "EnumConstantDecl", + "name": "GAIN0", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e672d8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 23563, + "line": 765, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 23602, + "line": 766, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6e67228", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 23567, + "line": 765, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23572, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e67210", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23569, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23569, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e671f0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23569, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23569, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e65fc8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23567, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23567, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e671d8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23572, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 23572, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e65fe8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 23572, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 23572, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"g4_lg\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e672c8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 23589, + "line": 766, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 23602, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6e67298", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23596, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 23602, + "col": 22, + "tokLen": 10 + } + }, + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc08c0", + "kind": "EnumConstantDecl", + "name": "G4_LOWGAIN", + "type": { + "qualType": "slsDetectorDefs::detectorSettings" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e67960", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 23618, + "line": 767, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 23659, + "col": 46, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6e67948", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 23618, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 23659, + "col": 46, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6e67918", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 23624, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 23659, + "col": 46, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6e67900", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 23624, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 23659, + "col": 46, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6e678d8", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 23624, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 23659, + "col": 46, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6e678b8", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 23624, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 23659, + "col": 46, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6e678b0", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6e67880", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 23624, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 23659, + "col": 46, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6e67868", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 23637, + "col": 24, + "tokLen": 18 + }, + "end": { + "offset": 23658, + "col": 45, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6e67850", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23637, + "col": 24, + "tokLen": 18 + }, + "end": { + "offset": 23658, + "col": 45, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6e67830", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 23637, + "col": 24, + "tokLen": 18 + }, + "end": { + "offset": 23658, + "col": 45, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6e67828", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6e677f0", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 23637, + "col": 24, + "tokLen": 18 + }, + "end": { + "offset": 23658, + "col": 45, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e677d8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23656, + "col": 43, + "tokLen": 1 + }, + "end": { + "offset": 23656, + "col": 43, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e677b8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23656, + "col": 43, + "tokLen": 1 + }, + "end": { + "offset": 23656, + "col": 43, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6e677a0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23637, + "col": 24, + "tokLen": 18 + }, + "end": { + "offset": 23637, + "col": 24, + "tokLen": 18 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e67308", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 23637, + "col": 24, + "tokLen": 18 + }, + "end": { + "offset": 23637, + "col": 24, + "tokLen": 18 + } + }, + "type": { + "qualType": "const char[17]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown setting \"" + } + ] + }, + { + "id": "0x7f0da6e67330", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23658, + "col": 45, + "tokLen": 1 + }, + "end": { + "offset": 23658, + "col": 45, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e90078", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +}, +{ + "id": "0x7f0da6e67ba8", + "kind": "FunctionDecl", + "loc": { + "offset": 23694, + "file": "ToString.cpp", + "line": 770, + "col": 30, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 23665, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 24219, + "line": 788, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d376488", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs10speedLevelEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::speedLevel (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::speedLevel" + }, + "inner": [ + { + "id": "0x2cdc0fb0", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::speedLevel" + }, + "decl": { + "id": "0x2cdc0f08", + "kind": "EnumDecl", + "name": "speedLevel" + } + } + ] + }, + { + "id": "0x7f0da6e67ad8", + "kind": "ParmVarDecl", + "loc": { + "offset": 23722, + "line": 770, + "col": 58, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 23703, + "col": 39, + "tokLen": 5 + }, + "end": { + "offset": 23722, + "col": 58, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6e71d98", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 23725, + "col": 61, + "tokLen": 1 + }, + "end": { + "offset": 24219, + "line": 788, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6e690a8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 23731, + "line": 771, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 23775, + "line": 772, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6e68ff8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 23735, + "line": 771, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23740, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e68fe0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23737, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23737, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e68fc0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23737, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23737, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e67d90", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23735, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23735, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e67ad8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e68fa8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23740, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 23740, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e67db0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 23740, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 23740, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char[11]" + }, + "valueCategory": "lvalue", + "value": "\"full_speed\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e69098", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 23762, + "line": 772, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 23775, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6e69068", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23769, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 23775, + "col": 22, + "tokLen": 10 + } + }, + "type": { + "qualType": "slsDetectorDefs::speedLevel" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0fd0", + "kind": "EnumConstantDecl", + "name": "FULL_SPEED", + "type": { + "qualType": "slsDetectorDefs::speedLevel" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e6a3d8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 23791, + "line": 773, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 23826, + "line": 774, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6e6a328", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 23795, + "line": 773, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23800, + "col": 14, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e6a310", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23797, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23797, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e6a2f0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23797, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23797, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e690c8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23795, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23795, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e67ad8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e6a2d8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23800, + "col": 14, + "tokLen": 3 + }, + "end": { + "offset": 23800, + "col": 14, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e690e8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 23800, + "col": 14, + "tokLen": 3 + }, + "end": { + "offset": 23800, + "col": 14, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char[2]" + }, + "valueCategory": "lvalue", + "value": "\"0\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e6a3c8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 23813, + "line": 774, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 23826, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6e6a398", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23820, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 23826, + "col": 22, + "tokLen": 10 + } + }, + "type": { + "qualType": "slsDetectorDefs::speedLevel" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0fd0", + "kind": "EnumConstantDecl", + "name": "FULL_SPEED", + "type": { + "qualType": "slsDetectorDefs::speedLevel" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e6b708", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 23842, + "line": 775, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 23886, + "line": 776, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6e6b658", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 23846, + "line": 775, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23851, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e6b640", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23848, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23848, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e6b620", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23848, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23848, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e6a3f8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23846, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23846, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e67ad8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e6b608", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23851, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 23851, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e6a418", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 23851, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 23851, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char[11]" + }, + "valueCategory": "lvalue", + "value": "\"half_speed\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e6b6f8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 23873, + "line": 776, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 23886, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6e6b6c8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23880, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 23886, + "col": 22, + "tokLen": 10 + } + }, + "type": { + "qualType": "slsDetectorDefs::speedLevel" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc1020", + "kind": "EnumConstantDecl", + "name": "HALF_SPEED", + "type": { + "qualType": "slsDetectorDefs::speedLevel" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e6ca38", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 23902, + "line": 777, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 23937, + "line": 778, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6e6c988", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 23906, + "line": 777, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23911, + "col": 14, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e6c970", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23908, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23908, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e6c950", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23908, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23908, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e6b728", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23906, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23906, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e67ad8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e6c938", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23911, + "col": 14, + "tokLen": 3 + }, + "end": { + "offset": 23911, + "col": 14, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e6b748", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 23911, + "col": 14, + "tokLen": 3 + }, + "end": { + "offset": 23911, + "col": 14, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char[2]" + }, + "valueCategory": "lvalue", + "value": "\"1\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e6ca28", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 23924, + "line": 778, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 23937, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6e6c9f8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23931, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 23937, + "col": 22, + "tokLen": 10 + } + }, + "type": { + "qualType": "slsDetectorDefs::speedLevel" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc1020", + "kind": "EnumConstantDecl", + "name": "HALF_SPEED", + "type": { + "qualType": "slsDetectorDefs::speedLevel" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e6dd68", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 23953, + "line": 779, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 24000, + "line": 780, + "col": 22, + "tokLen": 13 + } + }, + "inner": [ + { + "id": "0x7f0da6e6dcb8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 23957, + "line": 779, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23962, + "col": 14, + "tokLen": 15 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e6dca0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23959, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23959, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e6dc80", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23959, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 23959, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e6ca58", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23957, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 23957, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e67ad8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e6dc68", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 23962, + "col": 14, + "tokLen": 15 + }, + "end": { + "offset": 23962, + "col": 14, + "tokLen": 15 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e6ca78", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 23962, + "col": 14, + "tokLen": 15 + }, + "end": { + "offset": 23962, + "col": 14, + "tokLen": 15 + } + }, + "type": { + "qualType": "const char[14]" + }, + "valueCategory": "lvalue", + "value": "\"quarter_speed\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e6dd58", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 23987, + "line": 780, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 24000, + "col": 22, + "tokLen": 13 + } + }, + "inner": [ + { + "id": "0x7f0da6e6dd28", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 23994, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 24000, + "col": 22, + "tokLen": 13 + } + }, + "type": { + "qualType": "slsDetectorDefs::speedLevel" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc1070", + "kind": "EnumConstantDecl", + "name": "QUARTER_SPEED", + "type": { + "qualType": "slsDetectorDefs::speedLevel" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e6f098", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 24019, + "line": 781, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 24054, + "line": 782, + "col": 22, + "tokLen": 13 + } + }, + "inner": [ + { + "id": "0x7f0da6e6efe8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 24023, + "line": 781, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24028, + "col": 14, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e6efd0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24025, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24025, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e6efb0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24025, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24025, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e6dd88", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24023, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24023, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e67ad8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e6ef98", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24028, + "col": 14, + "tokLen": 3 + }, + "end": { + "offset": 24028, + "col": 14, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e6dda8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 24028, + "col": 14, + "tokLen": 3 + }, + "end": { + "offset": 24028, + "col": 14, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char[2]" + }, + "valueCategory": "lvalue", + "value": "\"2\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e6f088", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 24041, + "line": 782, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 24054, + "col": 22, + "tokLen": 13 + } + }, + "inner": [ + { + "id": "0x7f0da6e6f058", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24048, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 24054, + "col": 22, + "tokLen": 13 + } + }, + "type": { + "qualType": "slsDetectorDefs::speedLevel" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc1070", + "kind": "EnumConstantDecl", + "name": "QUARTER_SPEED", + "type": { + "qualType": "slsDetectorDefs::speedLevel" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e703c8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 24073, + "line": 783, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 24110, + "line": 784, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6e70318", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 24077, + "line": 783, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24082, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e70300", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24079, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24079, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e702e0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24079, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24079, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e6f0b8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24077, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24077, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e67ad8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e702c8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24082, + "col": 14, + "tokLen": 5 + }, + "end": { + "offset": 24082, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e6f0d8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 24082, + "col": 14, + "tokLen": 5 + }, + "end": { + "offset": 24082, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "const char[4]" + }, + "valueCategory": "lvalue", + "value": "\"108\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e703b8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 24097, + "line": 784, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 24110, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6e70388", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24104, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 24110, + "col": 22, + "tokLen": 9 + } + }, + "type": { + "qualType": "slsDetectorDefs::speedLevel" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc10c0", + "kind": "EnumConstantDecl", + "name": "G2_108MHZ", + "type": { + "qualType": "slsDetectorDefs::speedLevel" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e716f8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 24125, + "line": 785, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 24162, + "line": 786, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6e71648", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 24129, + "line": 785, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24134, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e71630", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24131, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24131, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e71610", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24131, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24131, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e703e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24129, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24129, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e67ad8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e715f8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24134, + "col": 14, + "tokLen": 5 + }, + "end": { + "offset": 24134, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e70408", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 24134, + "col": 14, + "tokLen": 5 + }, + "end": { + "offset": 24134, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "const char[4]" + }, + "valueCategory": "lvalue", + "value": "\"144\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e716e8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 24149, + "line": 786, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 24162, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6e716b8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24156, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 24162, + "col": 22, + "tokLen": 9 + } + }, + "type": { + "qualType": "slsDetectorDefs::speedLevel" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc1110", + "kind": "EnumConstantDecl", + "name": "G2_144MHZ", + "type": { + "qualType": "slsDetectorDefs::speedLevel" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e71d80", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 24177, + "line": 787, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 24216, + "col": 44, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6e71d68", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 24177, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 24216, + "col": 44, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6e71d38", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 24183, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 24216, + "col": 44, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6e71d20", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 24183, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 24216, + "col": 44, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6e71cf8", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 24183, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 24216, + "col": 44, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6e71cd8", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 24183, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 24216, + "col": 44, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6e71cd0", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6e71ca0", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 24183, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 24216, + "col": 44, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6e71c88", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 24196, + "col": 24, + "tokLen": 16 + }, + "end": { + "offset": 24215, + "col": 43, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6e71c70", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24196, + "col": 24, + "tokLen": 16 + }, + "end": { + "offset": 24215, + "col": 43, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6e71c50", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 24196, + "col": 24, + "tokLen": 16 + }, + "end": { + "offset": 24215, + "col": 43, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6e71c48", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6e71c10", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 24196, + "col": 24, + "tokLen": 16 + }, + "end": { + "offset": 24215, + "col": 43, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e71bf8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24213, + "col": 41, + "tokLen": 1 + }, + "end": { + "offset": 24213, + "col": 41, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e71bd8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24213, + "col": 41, + "tokLen": 1 + }, + "end": { + "offset": 24213, + "col": 41, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6e71bc0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24196, + "col": 24, + "tokLen": 16 + }, + "end": { + "offset": 24196, + "col": 24, + "tokLen": 16 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e71728", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 24196, + "col": 24, + "tokLen": 16 + }, + "end": { + "offset": 24196, + "col": 24, + "tokLen": 16 + } + }, + "type": { + "qualType": "const char[15]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown speed \"" + } + ] + }, + { + "id": "0x7f0da6e71750", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24215, + "col": 43, + "tokLen": 1 + }, + "end": { + "offset": 24215, + "col": 43, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e67ad8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +}, +{ + "id": "0x7f0da6e71f68", + "kind": "FunctionDecl", + "loc": { + "offset": 24251, + "file": "ToString.cpp", + "line": 790, + "col": 30, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 24222, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 24638, + "line": 802, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d3769d8", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs10timingModeEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::timingMode (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::timingMode" + }, + "inner": [ + { + "id": "0x2cdbd770", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::timingMode" + }, + "decl": { + "id": "0x2cdbd6c8", + "kind": "EnumDecl", + "name": "timingMode" + } + } + ] + }, + { + "id": "0x7f0da6e71e98", + "kind": "ParmVarDecl", + "loc": { + "offset": 24279, + "line": 790, + "col": 58, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 24260, + "col": 39, + "tokLen": 5 + }, + "end": { + "offset": 24279, + "col": 58, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6e377d0", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 24282, + "col": 61, + "tokLen": 1 + }, + "end": { + "offset": 24638, + "line": 802, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6e73458", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 24288, + "line": 791, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 24326, + "line": 792, + "col": 22, + "tokLen": 11 + } + }, + "inner": [ + { + "id": "0x7f0da6e733a8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 24292, + "line": 791, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24297, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e73390", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24294, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24294, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e73370", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24294, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24294, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e72150", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24292, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24292, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e71e98", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e73358", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24297, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 24297, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e72170", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 24297, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 24297, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char[5]" + }, + "valueCategory": "lvalue", + "value": "\"auto\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e73448", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 24313, + "line": 792, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 24326, + "col": 22, + "tokLen": 11 + } + }, + "inner": [ + { + "id": "0x7f0da6e73418", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24320, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 24326, + "col": 22, + "tokLen": 11 + } + }, + "type": { + "qualType": "slsDetectorDefs::timingMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbd790", + "kind": "EnumConstantDecl", + "name": "AUTO_TIMING", + "type": { + "qualType": "slsDetectorDefs::timingMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e74788", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 24343, + "line": 793, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 24384, + "line": 794, + "col": 22, + "tokLen": 16 + } + }, + "inner": [ + { + "id": "0x7f0da6e746d8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 24347, + "line": 793, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24352, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e746c0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24349, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24349, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e746a0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24349, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24349, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e73478", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24347, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24347, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e71e98", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e74688", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24352, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 24352, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e73498", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 24352, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 24352, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char[8]" + }, + "valueCategory": "lvalue", + "value": "\"trigger\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e74778", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 24371, + "line": 794, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 24384, + "col": 22, + "tokLen": 16 + } + }, + "inner": [ + { + "id": "0x7f0da6e74748", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24378, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 24384, + "col": 22, + "tokLen": 16 + } + }, + "type": { + "qualType": "slsDetectorDefs::timingMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbd7e0", + "kind": "EnumConstantDecl", + "name": "TRIGGER_EXPOSURE", + "type": { + "qualType": "slsDetectorDefs::timingMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e75ab8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 24406, + "line": 795, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 24446, + "line": 796, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6e75a08", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 24410, + "line": 795, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24415, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e759f0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24412, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24412, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e759d0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24412, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24412, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e747a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24410, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24410, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e71e98", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e759b8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24415, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 24415, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e747c8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 24415, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 24415, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"gating\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e75aa8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 24433, + "line": 796, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 24446, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6e75a78", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24440, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 24446, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::timingMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbd830", + "kind": "EnumConstantDecl", + "name": "GATED", + "type": { + "qualType": "slsDetectorDefs::timingMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e35df8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 24457, + "line": 797, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 24504, + "line": 798, + "col": 22, + "tokLen": 13 + } + }, + "inner": [ + { + "id": "0x7f0da6e35d48", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 24461, + "line": 797, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24466, + "col": 14, + "tokLen": 15 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e35d30", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24463, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24463, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e35d10", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24463, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24463, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e75ad8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24461, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24461, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e71e98", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e35cf8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24466, + "col": 14, + "tokLen": 15 + }, + "end": { + "offset": 24466, + "col": 14, + "tokLen": 15 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e75af8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 24466, + "col": 14, + "tokLen": 15 + }, + "end": { + "offset": 24466, + "col": 14, + "tokLen": 15 + } + }, + "type": { + "qualType": "const char[14]" + }, + "valueCategory": "lvalue", + "value": "\"burst_trigger\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e35de8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 24491, + "line": 798, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 24504, + "col": 22, + "tokLen": 13 + } + }, + "inner": [ + { + "id": "0x7f0da6e35db8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24498, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 24504, + "col": 22, + "tokLen": 13 + } + }, + "type": { + "qualType": "slsDetectorDefs::timingMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbd880", + "kind": "EnumConstantDecl", + "name": "BURST_TRIGGER", + "type": { + "qualType": "slsDetectorDefs::timingMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e37128", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 24523, + "line": 799, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 24571, + "line": 800, + "col": 22, + "tokLen": 13 + } + }, + "inner": [ + { + "id": "0x7f0da6e37078", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 24527, + "line": 799, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24532, + "col": 14, + "tokLen": 16 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e37060", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24529, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24529, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e37040", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24529, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24529, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e35e18", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24527, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24527, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e71e98", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e37028", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24532, + "col": 14, + "tokLen": 16 + }, + "end": { + "offset": 24532, + "col": 14, + "tokLen": 16 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e35e38", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 24532, + "col": 14, + "tokLen": 16 + }, + "end": { + "offset": 24532, + "col": 14, + "tokLen": 16 + } + }, + "type": { + "qualType": "const char[15]" + }, + "valueCategory": "lvalue", + "value": "\"trigger_gating\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e37118", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 24558, + "line": 800, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 24571, + "col": 22, + "tokLen": 13 + } + }, + "inner": [ + { + "id": "0x7f0da6e370e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24565, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 24571, + "col": 22, + "tokLen": 13 + } + }, + "type": { + "qualType": "slsDetectorDefs::timingMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbd8d0", + "kind": "EnumConstantDecl", + "name": "TRIGGER_GATED", + "type": { + "qualType": "slsDetectorDefs::timingMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e377b8", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 24590, + "line": 801, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 24635, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6e377a0", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 24590, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 24635, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6e37770", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 24596, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 24635, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6e37758", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 24596, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 24635, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6e37730", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 24596, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 24635, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6e37710", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 24596, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 24635, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6e37708", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6e376d8", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 24596, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 24635, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6e376c0", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 24609, + "col": 24, + "tokLen": 22 + }, + "end": { + "offset": 24634, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6e376a8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24609, + "col": 24, + "tokLen": 22 + }, + "end": { + "offset": 24634, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6e37688", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 24609, + "col": 24, + "tokLen": 22 + }, + "end": { + "offset": 24634, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6e37680", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6e37648", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 24609, + "col": 24, + "tokLen": 22 + }, + "end": { + "offset": 24634, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e37630", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24632, + "col": 47, + "tokLen": 1 + }, + "end": { + "offset": 24632, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e37610", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24632, + "col": 47, + "tokLen": 1 + }, + "end": { + "offset": 24632, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6e375f8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24609, + "col": 24, + "tokLen": 22 + }, + "end": { + "offset": 24609, + "col": 24, + "tokLen": 22 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e37158", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 24609, + "col": 24, + "tokLen": 22 + }, + "end": { + "offset": 24609, + "col": 24, + "tokLen": 22 + } + }, + "type": { + "qualType": "const char[21]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown timing mode \"" + } + ] + }, + { + "id": "0x7f0da6e37188", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24634, + "col": 49, + "tokLen": 1 + }, + "end": { + "offset": 24634, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e71e98", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +}, +{ + "id": "0x7f0da6e37988", + "kind": "FunctionDecl", + "loc": { + "offset": 24678, + "file": "ToString.cpp", + "line": 804, + "col": 38, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 24641, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 24979, + "line": 812, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d376f28", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs18frameDiscardPolicyEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::frameDiscardPolicy (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::frameDiscardPolicy" + }, + "inner": [ + { + "id": "0x2cdb87d0", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::frameDiscardPolicy" + }, + "decl": { + "id": "0x2cdb8730", + "kind": "EnumDecl", + "name": "frameDiscardPolicy" + } + } + ] + }, + { + "id": "0x7f0da6e378b8", + "kind": "ParmVarDecl", + "loc": { + "offset": 24706, + "line": 804, + "col": 66, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 24687, + "col": 47, + "tokLen": 5 + }, + "end": { + "offset": 24706, + "col": 66, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6e3bbc8", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 24709, + "col": 69, + "tokLen": 1 + }, + "end": { + "offset": 24979, + "line": 812, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6e38e88", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 24715, + "line": 805, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 24758, + "line": 806, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6e38dd8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 24719, + "line": 805, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24724, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e38dc0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24721, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24721, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e38da0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24721, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24721, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e37b70", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24719, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24719, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e378b8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e38d88", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24724, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 24724, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e37b90", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 24724, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 24724, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"nodiscard\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e38e78", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 24745, + "line": 806, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 24758, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6e38e48", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24752, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 24758, + "col": 22, + "tokLen": 10 + } + }, + "type": { + "qualType": "slsDetectorDefs::frameDiscardPolicy" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdb87f0", + "kind": "EnumConstantDecl", + "name": "NO_DISCARD", + "type": { + "qualType": "slsDetectorDefs::frameDiscardPolicy" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e3a1b8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 24774, + "line": 807, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 24820, + "line": 808, + "col": 22, + "tokLen": 20 + } + }, + "inner": [ + { + "id": "0x7f0da6e3a108", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 24778, + "line": 807, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24783, + "col": 14, + "tokLen": 14 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e3a0f0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24780, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24780, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e3a0d0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24780, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24780, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e38ea8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24778, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24778, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e378b8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e3a0b8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24783, + "col": 14, + "tokLen": 14 + }, + "end": { + "offset": 24783, + "col": 14, + "tokLen": 14 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e38ec8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 24783, + "col": 14, + "tokLen": 14 + }, + "end": { + "offset": 24783, + "col": 14, + "tokLen": 14 + } + }, + "type": { + "qualType": "const char[13]" + }, + "valueCategory": "lvalue", + "value": "\"discardempty\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e3a1a8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 24807, + "line": 808, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 24820, + "col": 22, + "tokLen": 20 + } + }, + "inner": [ + { + "id": "0x7f0da6e3a178", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24814, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 24820, + "col": 22, + "tokLen": 20 + } + }, + "type": { + "qualType": "slsDetectorDefs::frameDiscardPolicy" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdb8840", + "kind": "EnumConstantDecl", + "name": "DISCARD_EMPTY_FRAMES", + "type": { + "qualType": "slsDetectorDefs::frameDiscardPolicy" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e3b4e8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 24846, + "line": 809, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 24894, + "line": 810, + "col": 22, + "tokLen": 22 + } + }, + "inner": [ + { + "id": "0x7f0da6e3b438", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 24850, + "line": 809, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24855, + "col": 14, + "tokLen": 16 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e3b420", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24852, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24852, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e3b400", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24852, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 24852, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e3a1d8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24850, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 24850, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e378b8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e3b3e8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24855, + "col": 14, + "tokLen": 16 + }, + "end": { + "offset": 24855, + "col": 14, + "tokLen": 16 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e3a1f8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 24855, + "col": 14, + "tokLen": 16 + }, + "end": { + "offset": 24855, + "col": 14, + "tokLen": 16 + } + }, + "type": { + "qualType": "const char[15]" + }, + "valueCategory": "lvalue", + "value": "\"discardpartial\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e3b4d8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 24881, + "line": 810, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 24894, + "col": 22, + "tokLen": 22 + } + }, + "inner": [ + { + "id": "0x7f0da6e3b4a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24888, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 24894, + "col": 22, + "tokLen": 22 + } + }, + "type": { + "qualType": "slsDetectorDefs::frameDiscardPolicy" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdb8890", + "kind": "EnumConstantDecl", + "name": "DISCARD_PARTIAL_FRAMES", + "type": { + "qualType": "slsDetectorDefs::frameDiscardPolicy" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e3bbb0", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 24922, + "line": 811, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 24976, + "col": 59, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6e3bb98", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 24922, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 24976, + "col": 59, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6e3bb68", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 24928, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 24976, + "col": 59, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6e3bb50", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 24928, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 24976, + "col": 59, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6e3bb28", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 24928, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 24976, + "col": 59, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6e3bb08", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 24928, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 24976, + "col": 59, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6e3bb00", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6e3bad0", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 24928, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 24976, + "col": 59, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6e3bab8", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 24941, + "col": 24, + "tokLen": 31 + }, + "end": { + "offset": 24975, + "col": 58, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6e3baa0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24941, + "col": 24, + "tokLen": 31 + }, + "end": { + "offset": 24975, + "col": 58, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6e3ba80", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 24941, + "col": 24, + "tokLen": 31 + }, + "end": { + "offset": 24975, + "col": 58, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6e3ba78", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6e3ba40", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 24941, + "col": 24, + "tokLen": 31 + }, + "end": { + "offset": 24975, + "col": 58, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e3ba28", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24973, + "col": 56, + "tokLen": 1 + }, + "end": { + "offset": 24973, + "col": 56, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e3ba08", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24973, + "col": 56, + "tokLen": 1 + }, + "end": { + "offset": 24973, + "col": 56, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6e3b9f0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 24941, + "col": 24, + "tokLen": 31 + }, + "end": { + "offset": 24941, + "col": 24, + "tokLen": 31 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e3b518", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 24941, + "col": 24, + "tokLen": 31 + }, + "end": { + "offset": 24941, + "col": 24, + "tokLen": 31 + } + }, + "type": { + "qualType": "const char[30]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown frame discard policy \"" + } + ] + }, + { + "id": "0x7f0da6e3b550", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 24975, + "col": 58, + "tokLen": 1 + }, + "end": { + "offset": 24975, + "col": 58, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e378b8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +}, +{ + "id": "0x7f0da6e3bd78", + "kind": "FunctionDecl", + "loc": { + "offset": 25011, + "file": "ToString.cpp", + "line": 814, + "col": 30, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 24982, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 25196, + "line": 820, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d377478", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs10fileFormatEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::fileFormat (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::fileFormat" + }, + "inner": [ + { + "id": "0x2cdbbda0", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::fileFormat" + }, + "decl": { + "id": "0x2cdbbd00", + "kind": "EnumDecl", + "name": "fileFormat" + } + } + ] + }, + { + "id": "0x7f0da6e3bca0", + "kind": "ParmVarDecl", + "loc": { + "offset": 25039, + "line": 814, + "col": 58, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 25020, + "col": 39, + "tokLen": 5 + }, + "end": { + "offset": 25039, + "col": 58, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6e3ec40", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 25042, + "col": 61, + "tokLen": 1 + }, + "end": { + "offset": 25196, + "line": 820, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6e3d268", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 25048, + "line": 815, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 25086, + "line": 816, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6e3d1b8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 25052, + "line": 815, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25057, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e3d1a0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25054, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25054, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e3d180", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25054, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25054, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e3bf60", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25052, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25052, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e3bca0", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e3d168", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25057, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 25057, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e3bf80", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 25057, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 25057, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char[5]" + }, + "valueCategory": "lvalue", + "value": "\"hdf5\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e3d258", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 25073, + "line": 816, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 25086, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6e3d228", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25080, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 25086, + "col": 22, + "tokLen": 4 + } + }, + "type": { + "qualType": "slsDetectorDefs::fileFormat" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbbe10", + "kind": "EnumConstantDecl", + "name": "HDF5", + "type": { + "qualType": "slsDetectorDefs::fileFormat" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e3e598", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 25096, + "line": 817, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 25136, + "line": 818, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6e3e4e8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 25100, + "line": 817, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25105, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e3e4d0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25102, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25102, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e3e4b0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25102, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25102, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e3d288", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25100, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25100, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e3bca0", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e3e498", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25105, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 25105, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e3d2a8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 25105, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 25105, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"binary\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e3e588", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 25123, + "line": 818, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 25136, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6e3e558", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25130, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 25136, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::fileFormat" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbbdc0", + "kind": "EnumConstantDecl", + "name": "BINARY", + "type": { + "qualType": "slsDetectorDefs::fileFormat" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e3ec28", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 25148, + "line": 819, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 25193, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6e3ec10", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 25148, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 25193, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6e3ebe0", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 25154, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 25193, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6e3ebc8", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 25154, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 25193, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6e3eba0", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 25154, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 25193, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6e3eb80", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 25154, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 25193, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6e3eb78", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6e3eb48", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 25154, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 25193, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6e3eb30", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 25167, + "col": 24, + "tokLen": 22 + }, + "end": { + "offset": 25192, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6e3eb18", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25167, + "col": 24, + "tokLen": 22 + }, + "end": { + "offset": 25192, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6e3eaf8", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 25167, + "col": 24, + "tokLen": 22 + }, + "end": { + "offset": 25192, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6e3eaf0", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6e3eab8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 25167, + "col": 24, + "tokLen": 22 + }, + "end": { + "offset": 25192, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e3eaa0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25190, + "col": 47, + "tokLen": 1 + }, + "end": { + "offset": 25190, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e3ea80", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25190, + "col": 47, + "tokLen": 1 + }, + "end": { + "offset": 25190, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6e3ea68", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25167, + "col": 24, + "tokLen": 22 + }, + "end": { + "offset": 25167, + "col": 24, + "tokLen": 22 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e3e5c8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 25167, + "col": 24, + "tokLen": 22 + }, + "end": { + "offset": 25167, + "col": 24, + "tokLen": 22 + } + }, + "type": { + "qualType": "const char[21]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown file format \"" + } + ] + }, + { + "id": "0x7f0da6e3e5f8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25192, + "col": 49, + "tokLen": 1 + }, + "end": { + "offset": 25192, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e3bca0", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +}, +{ + "id": "0x7f0da6e3ede8", + "kind": "FunctionDecl", + "loc": { + "offset": 25236, + "file": "ToString.cpp", + "line": 822, + "col": 38, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 25199, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 25630, + "line": 832, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d3779c8", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs18externalSignalFlagEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::externalSignalFlag (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::externalSignalFlag" + }, + "inner": [ + { + "id": "0x2cdbd540", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::externalSignalFlag" + }, + "decl": { + "id": "0x2cdbd498", + "kind": "EnumDecl", + "name": "externalSignalFlag" + } + } + ] + }, + { + "id": "0x7f0da6e3ed10", + "kind": "ParmVarDecl", + "loc": { + "offset": 25264, + "line": 822, + "col": 66, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 25245, + "col": 47, + "tokLen": 5 + }, + "end": { + "offset": 25264, + "col": 66, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6e44338", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 25267, + "col": 69, + "tokLen": 1 + }, + "end": { + "offset": 25630, + "line": 832, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6e402e8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 25273, + "line": 823, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 25329, + "line": 824, + "col": 22, + "tokLen": 22 + } + }, + "inner": [ + { + "id": "0x7f0da6e40238", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 25277, + "line": 823, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25282, + "col": 14, + "tokLen": 24 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e40220", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25279, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25279, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e40200", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25279, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25279, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e3efd0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25277, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25277, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e3ed10", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e401e8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25282, + "col": 14, + "tokLen": 24 + }, + "end": { + "offset": 25282, + "col": 14, + "tokLen": 24 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e3eff0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 25282, + "col": 14, + "tokLen": 24 + }, + "end": { + "offset": 25282, + "col": 14, + "tokLen": 24 + } + }, + "type": { + "qualType": "const char[23]" + }, + "valueCategory": "lvalue", + "value": "\"trigger_in_rising_edge\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e402d8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 25316, + "line": 824, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 25329, + "col": 22, + "tokLen": 22 + } + }, + "inner": [ + { + "id": "0x7f0da6e402a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25323, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 25329, + "col": 22, + "tokLen": 22 + } + }, + "type": { + "qualType": "slsDetectorDefs::externalSignalFlag" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbd560", + "kind": "EnumConstantDecl", + "name": "TRIGGER_IN_RISING_EDGE", + "type": { + "qualType": "slsDetectorDefs::externalSignalFlag" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e41628", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 25357, + "line": 825, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 25414, + "line": 826, + "col": 22, + "tokLen": 23 + } + }, + "inner": [ + { + "id": "0x7f0da6e41578", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 25361, + "line": 825, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25366, + "col": 14, + "tokLen": 25 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e41560", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25363, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25363, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e41540", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25363, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25363, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e40308", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25361, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25361, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e3ed10", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e41528", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25366, + "col": 14, + "tokLen": 25 + }, + "end": { + "offset": 25366, + "col": 14, + "tokLen": 25 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e40328", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 25366, + "col": 14, + "tokLen": 25 + }, + "end": { + "offset": 25366, + "col": 14, + "tokLen": 25 + } + }, + "type": { + "qualType": "const char[24]" + }, + "valueCategory": "lvalue", + "value": "\"trigger_in_falling_edge\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e41618", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 25401, + "line": 826, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 25414, + "col": 22, + "tokLen": 23 + } + }, + "inner": [ + { + "id": "0x7f0da6e415e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25408, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 25414, + "col": 22, + "tokLen": 23 + } + }, + "type": { + "qualType": "slsDetectorDefs::externalSignalFlag" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbd5b0", + "kind": "EnumConstantDecl", + "name": "TRIGGER_IN_FALLING_EDGE", + "type": { + "qualType": "slsDetectorDefs::externalSignalFlag" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e42958", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 25443, + "line": 827, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 25489, + "line": 828, + "col": 22, + "tokLen": 12 + } + }, + "inner": [ + { + "id": "0x7f0da6e428a8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 25447, + "line": 827, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25452, + "col": 14, + "tokLen": 14 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e42890", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25449, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25449, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e42870", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25449, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25449, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e41648", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25447, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25447, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e3ed10", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e42858", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25452, + "col": 14, + "tokLen": 14 + }, + "end": { + "offset": 25452, + "col": 14, + "tokLen": 14 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e41668", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 25452, + "col": 14, + "tokLen": 14 + }, + "end": { + "offset": 25452, + "col": 14, + "tokLen": 14 + } + }, + "type": { + "qualType": "const char[13]" + }, + "valueCategory": "lvalue", + "value": "\"inversion_on\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e42948", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 25476, + "line": 828, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 25489, + "col": 22, + "tokLen": 12 + } + }, + "inner": [ + { + "id": "0x7f0da6e42918", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25483, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 25489, + "col": 22, + "tokLen": 12 + } + }, + "type": { + "qualType": "slsDetectorDefs::externalSignalFlag" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbd600", + "kind": "EnumConstantDecl", + "name": "INVERSION_ON", + "type": { + "qualType": "slsDetectorDefs::externalSignalFlag" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e43c88", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 25507, + "line": 829, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 25554, + "line": 830, + "col": 22, + "tokLen": 13 + } + }, + "inner": [ + { + "id": "0x7f0da6e43bd8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 25511, + "line": 829, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25516, + "col": 14, + "tokLen": 15 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e43bc0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25513, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25513, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e43ba0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25513, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25513, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e42978", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25511, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25511, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e3ed10", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e43b88", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25516, + "col": 14, + "tokLen": 15 + }, + "end": { + "offset": 25516, + "col": 14, + "tokLen": 15 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e42998", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 25516, + "col": 14, + "tokLen": 15 + }, + "end": { + "offset": 25516, + "col": 14, + "tokLen": 15 + } + }, + "type": { + "qualType": "const char[14]" + }, + "valueCategory": "lvalue", + "value": "\"inversion_off\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e43c78", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 25541, + "line": 830, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 25554, + "col": 22, + "tokLen": 13 + } + }, + "inner": [ + { + "id": "0x7f0da6e43c48", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25548, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 25554, + "col": 22, + "tokLen": 13 + } + }, + "type": { + "qualType": "slsDetectorDefs::externalSignalFlag" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbd650", + "kind": "EnumConstantDecl", + "name": "INVERSION_OFF", + "type": { + "qualType": "slsDetectorDefs::externalSignalFlag" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e44320", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 25573, + "line": 831, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 25627, + "col": 59, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6e44308", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 25573, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 25627, + "col": 59, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6e442d8", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 25579, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 25627, + "col": 59, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6e442c0", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 25579, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 25627, + "col": 59, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6e44298", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 25579, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 25627, + "col": 59, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6e44278", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 25579, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 25627, + "col": 59, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6e44270", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6e44240", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 25579, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 25627, + "col": 59, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6e44228", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 25592, + "col": 24, + "tokLen": 31 + }, + "end": { + "offset": 25626, + "col": 58, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6e44210", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25592, + "col": 24, + "tokLen": 31 + }, + "end": { + "offset": 25626, + "col": 58, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6e441f0", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 25592, + "col": 24, + "tokLen": 31 + }, + "end": { + "offset": 25626, + "col": 58, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6e441e8", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6e441b0", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 25592, + "col": 24, + "tokLen": 31 + }, + "end": { + "offset": 25626, + "col": 58, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e44198", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25624, + "col": 56, + "tokLen": 1 + }, + "end": { + "offset": 25624, + "col": 56, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e44178", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25624, + "col": 56, + "tokLen": 1 + }, + "end": { + "offset": 25624, + "col": 56, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6e44160", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25592, + "col": 24, + "tokLen": 31 + }, + "end": { + "offset": 25592, + "col": 24, + "tokLen": 31 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e43cb8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 25592, + "col": 24, + "tokLen": 31 + }, + "end": { + "offset": 25592, + "col": 24, + "tokLen": 31 + } + }, + "type": { + "qualType": "const char[30]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown external signal flag \"" + } + ] + }, + { + "id": "0x7f0da6e43cf0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25626, + "col": 58, + "tokLen": 1 + }, + "end": { + "offset": 25626, + "col": 58, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e3ed10", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +}, +{ + "id": "0x7f0da6e444e8", + "kind": "FunctionDecl", + "loc": { + "offset": 25663, + "file": "ToString.cpp", + "line": 834, + "col": 31, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 25633, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 26086, + "line": 846, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d377f18", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs11readoutModeEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::readoutMode (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::readoutMode" + }, + "inner": [ + { + "id": "0x2cdc0d30", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::readoutMode" + }, + "decl": { + "id": "0x2cdc0c88", + "kind": "EnumDecl", + "name": "readoutMode" + } + } + ] + }, + { + "id": "0x7f0da6e44418", + "kind": "ParmVarDecl", + "loc": { + "offset": 25691, + "line": 834, + "col": 59, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 25672, + "col": 40, + "tokLen": 5 + }, + "end": { + "offset": 25691, + "col": 59, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6e4ad88", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 25694, + "col": 62, + "tokLen": 1 + }, + "end": { + "offset": 26086, + "line": 846, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6e459d8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 25700, + "line": 835, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 25740, + "line": 836, + "col": 22, + "tokLen": 11 + } + }, + "inner": [ + { + "id": "0x7f0da6e45928", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 25704, + "line": 835, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25709, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e45910", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25706, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25706, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e458f0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25706, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25706, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e446d0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25704, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25704, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e44418", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e458d8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25709, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 25709, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e446f0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 25709, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 25709, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"analog\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e459c8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 25727, + "line": 836, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 25740, + "col": 22, + "tokLen": 11 + } + }, + "inner": [ + { + "id": "0x7f0da6e45998", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25734, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 25740, + "col": 22, + "tokLen": 11 + } + }, + "type": { + "qualType": "slsDetectorDefs::readoutMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0d50", + "kind": "EnumConstantDecl", + "name": "ANALOG_ONLY", + "type": { + "qualType": "slsDetectorDefs::readoutMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e46d08", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 25757, + "line": 837, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 25798, + "line": 838, + "col": 22, + "tokLen": 12 + } + }, + "inner": [ + { + "id": "0x7f0da6e46c58", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 25761, + "line": 837, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25766, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e46c40", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25763, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25763, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e46c20", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25763, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25763, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e459f8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25761, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25761, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e44418", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e46c08", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25766, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 25766, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e45a18", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 25766, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 25766, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char[8]" + }, + "valueCategory": "lvalue", + "value": "\"digital\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e46cf8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 25785, + "line": 838, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 25798, + "col": 22, + "tokLen": 12 + } + }, + "inner": [ + { + "id": "0x7f0da6e46cc8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25792, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 25798, + "col": 22, + "tokLen": 12 + } + }, + "type": { + "qualType": "slsDetectorDefs::readoutMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0da0", + "kind": "EnumConstantDecl", + "name": "DIGITAL_ONLY", + "type": { + "qualType": "slsDetectorDefs::readoutMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e48038", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 25816, + "line": 839, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 25864, + "line": 840, + "col": 22, + "tokLen": 18 + } + }, + "inner": [ + { + "id": "0x7f0da6e47f88", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 25820, + "line": 839, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25825, + "col": 14, + "tokLen": 16 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e47f70", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25822, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25822, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e47f50", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25822, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25822, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e46d28", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25820, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25820, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e44418", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e47f38", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25825, + "col": 14, + "tokLen": 16 + }, + "end": { + "offset": 25825, + "col": 14, + "tokLen": 16 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e46d48", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 25825, + "col": 14, + "tokLen": 16 + }, + "end": { + "offset": 25825, + "col": 14, + "tokLen": 16 + } + }, + "type": { + "qualType": "const char[15]" + }, + "valueCategory": "lvalue", + "value": "\"analog_digital\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e48028", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 25851, + "line": 840, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 25864, + "col": 22, + "tokLen": 18 + } + }, + "inner": [ + { + "id": "0x7f0da6e47ff8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25858, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 25864, + "col": 22, + "tokLen": 18 + } + }, + "type": { + "qualType": "slsDetectorDefs::readoutMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0df0", + "kind": "EnumConstantDecl", + "name": "ANALOG_AND_DIGITAL", + "type": { + "qualType": "slsDetectorDefs::readoutMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e49368", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 25888, + "line": 841, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 25933, + "line": 842, + "col": 22, + "tokLen": 16 + } + }, + "inner": [ + { + "id": "0x7f0da6e492b8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 25892, + "line": 841, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25897, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e492a0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25894, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25894, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e49280", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25894, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25894, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e48058", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25892, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25892, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e44418", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e49268", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25897, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 25897, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e48078", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 25897, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 25897, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char[12]" + }, + "valueCategory": "lvalue", + "value": "\"transceiver\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e49358", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 25920, + "line": 842, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 25933, + "col": 22, + "tokLen": 16 + } + }, + "inner": [ + { + "id": "0x7f0da6e49328", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25927, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 25933, + "col": 22, + "tokLen": 16 + } + }, + "type": { + "qualType": "slsDetectorDefs::readoutMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0e40", + "kind": "EnumConstantDecl", + "name": "TRANSCEIVER_ONLY", + "type": { + "qualType": "slsDetectorDefs::readoutMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e4a6a8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 25955, + "line": 843, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 26008, + "line": 844, + "col": 22, + "tokLen": 23 + } + }, + "inner": [ + { + "id": "0x7f0da6e4a5f8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 25959, + "line": 843, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25964, + "col": 14, + "tokLen": 21 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e4a5e0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25961, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25961, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e4a5c0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25961, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 25961, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e49388", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 25959, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 25959, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e44418", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e4a5a8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 25964, + "col": 14, + "tokLen": 21 + }, + "end": { + "offset": 25964, + "col": 14, + "tokLen": 21 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e493a8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 25964, + "col": 14, + "tokLen": 21 + }, + "end": { + "offset": 25964, + "col": 14, + "tokLen": 21 + } + }, + "type": { + "qualType": "const char[20]" + }, + "valueCategory": "lvalue", + "value": "\"digital_transceiver\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e4a698", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 25995, + "line": 844, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 26008, + "col": 22, + "tokLen": 23 + } + }, + "inner": [ + { + "id": "0x7f0da6e4a668", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26002, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 26008, + "col": 22, + "tokLen": 23 + } + }, + "type": { + "qualType": "slsDetectorDefs::readoutMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc0e90", + "kind": "EnumConstantDecl", + "name": "DIGITAL_AND_TRANSCEIVER", + "type": { + "qualType": "slsDetectorDefs::readoutMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e4ad70", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 26037, + "line": 845, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 26083, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6e4ad58", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 26037, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 26083, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6e4ad28", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 26043, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 26083, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6e4ad10", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 26043, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 26083, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6e4ace8", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 26043, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 26083, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6e4acc8", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 26043, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 26083, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6e4acc0", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6e4ac90", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 26043, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 26083, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6e4ac78", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 26056, + "col": 24, + "tokLen": 23 + }, + "end": { + "offset": 26082, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6e4ac60", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26056, + "col": 24, + "tokLen": 23 + }, + "end": { + "offset": 26082, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6e4ac40", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 26056, + "col": 24, + "tokLen": 23 + }, + "end": { + "offset": 26082, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6e4ac38", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6e4ac00", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26056, + "col": 24, + "tokLen": 23 + }, + "end": { + "offset": 26082, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e4abe8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26080, + "col": 48, + "tokLen": 1 + }, + "end": { + "offset": 26080, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e4abc8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26080, + "col": 48, + "tokLen": 1 + }, + "end": { + "offset": 26080, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6e4abb0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26056, + "col": 24, + "tokLen": 23 + }, + "end": { + "offset": 26056, + "col": 24, + "tokLen": 23 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e4a6d8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26056, + "col": 24, + "tokLen": 23 + }, + "end": { + "offset": 26056, + "col": 24, + "tokLen": 23 + } + }, + "type": { + "qualType": "const char[22]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown readout mode \"" + } + ] + }, + { + "id": "0x7f0da6e4a708", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26082, + "col": 50, + "tokLen": 1 + }, + "end": { + "offset": 26082, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e44418", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +}, +{ + "id": "0x7f0da6e4af48", + "kind": "FunctionDecl", + "loc": { + "offset": 26116, + "file": "ToString.cpp", + "line": 848, + "col": 28, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 26089, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 31510, + "line": 1034, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d378468", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs8dacIndexEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::dacIndex (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "inner": [ + { + "id": "0x2cdbda40", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "decl": { + "id": "0x2cdbd998", + "kind": "EnumDecl", + "name": "dacIndex" + } + } + ] + }, + { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "loc": { + "offset": 26144, + "line": 848, + "col": 56, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 26125, + "col": 37, + "tokLen": 5 + }, + "end": { + "offset": 26144, + "col": 56, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6b95d80", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 26147, + "col": 59, + "tokLen": 1 + }, + "end": { + "offset": 31510, + "line": 1034, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6e4d6e8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 26153, + "line": 849, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 26204, + "line": 850, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6e4d650", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 26157, + "line": 849, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26178, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6e4c388", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26157, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26162, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e4c370", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26159, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26159, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e4c350", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26159, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26159, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e4b130", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26157, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26157, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e4c338", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26162, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26162, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e4b150", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26162, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26162, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"dac 0\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e4d618", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26173, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26178, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e4d600", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26175, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26175, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e4d5e0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26175, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26175, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e4c3c0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26173, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26173, + "col": 25, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e4d5c8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26178, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26178, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e4c3e0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26178, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26178, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char[2]" + }, + "valueCategory": "lvalue", + "value": "\"0\"" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6e4d6d8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 26191, + "line": 850, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 26204, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6e4d6a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26198, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 26204, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbda60", + "kind": "EnumConstantDecl", + "name": "DAC_0", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e4fcc8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 26215, + "line": 851, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 26266, + "line": 852, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6e4fc30", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 26219, + "line": 851, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26240, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6e4e968", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26219, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26224, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e4e950", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26221, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26221, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e4e930", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26221, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26221, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e4d708", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26219, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26219, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e4e918", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26224, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26224, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e4d728", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26224, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26224, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"dac 1\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e4fbf8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26235, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26240, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e4fbe0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26237, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26237, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e4fbc0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26237, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26237, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e4e9a0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26235, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26235, + "col": 25, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e4fba8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26240, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26240, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e4e9c0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26240, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26240, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char[2]" + }, + "valueCategory": "lvalue", + "value": "\"1\"" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6e4fcb8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 26253, + "line": 852, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 26266, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6e4fc88", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26260, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 26266, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbdab0", + "kind": "EnumConstantDecl", + "name": "DAC_1", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e522a8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 26277, + "line": 853, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 26328, + "line": 854, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6e52210", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 26281, + "line": 853, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26302, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6e50f48", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26281, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26286, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e50f30", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26283, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26283, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e50f10", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26283, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26283, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e4fce8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26281, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26281, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e50ef8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26286, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26286, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e4fd08", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26286, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26286, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"dac 2\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e521d8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26297, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26302, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e521c0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26299, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26299, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e521a0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26299, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26299, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e50f80", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26297, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26297, + "col": 25, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e52188", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26302, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26302, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e50fa0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26302, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26302, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char[2]" + }, + "valueCategory": "lvalue", + "value": "\"2\"" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6e52298", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 26315, + "line": 854, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 26328, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6e52268", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26322, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 26328, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbdb00", + "kind": "EnumConstantDecl", + "name": "DAC_2", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6e54888", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 26339, + "line": 855, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 26390, + "line": 856, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6e547f0", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 26343, + "line": 855, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26364, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6e53528", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26343, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26348, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e53510", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26345, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26345, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e534f0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26345, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26345, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e522c8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26343, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26343, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e534d8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26348, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26348, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e522e8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26348, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26348, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"dac 3\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6e547b8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26359, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26364, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6e547a0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26361, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26361, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e54780", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26361, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26361, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e53560", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26359, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26359, + "col": 25, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6e54768", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26364, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26364, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e53580", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26364, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26364, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char[2]" + }, + "valueCategory": "lvalue", + "value": "\"3\"" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6e54878", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 26377, + "line": 856, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 26390, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6e54848", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26384, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 26390, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbdb50", + "kind": "EnumConstantDecl", + "name": "DAC_3", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6be0e68", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 26401, + "line": 857, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 26452, + "line": 858, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6be0dd0", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 26405, + "line": 857, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26426, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6bdfb08", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26405, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26410, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bdfaf0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26407, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26407, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bdfad0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26407, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26407, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6e548a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26405, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26405, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bdfab8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26410, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26410, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6e548c8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26410, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26410, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"dac 4\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6be0d98", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26421, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26426, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6be0d80", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26423, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26423, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6be0d60", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26423, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26423, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bdfb40", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26421, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26421, + "col": 25, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6be0d48", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26426, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26426, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bdfb60", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26426, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26426, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char[2]" + }, + "valueCategory": "lvalue", + "value": "\"4\"" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6be0e58", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 26439, + "line": 858, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 26452, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6be0e28", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26446, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 26452, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbdba0", + "kind": "EnumConstantDecl", + "name": "DAC_4", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6be3448", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 26463, + "line": 859, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 26514, + "line": 860, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6be33b0", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 26467, + "line": 859, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26488, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6be20e8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26467, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26472, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6be20d0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26469, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26469, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6be20b0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26469, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26469, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6be0e88", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26467, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26467, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6be2098", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26472, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26472, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6be0ea8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26472, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26472, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"dac 5\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6be3378", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26483, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26488, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6be3360", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26485, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26485, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6be3340", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26485, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26485, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6be2120", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26483, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26483, + "col": 25, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6be3328", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26488, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26488, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6be2140", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26488, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26488, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char[2]" + }, + "valueCategory": "lvalue", + "value": "\"5\"" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6be3438", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 26501, + "line": 860, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 26514, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6be3408", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26508, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 26514, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbdbf0", + "kind": "EnumConstantDecl", + "name": "DAC_5", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6be5a28", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 26525, + "line": 861, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 26576, + "line": 862, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6be5990", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 26529, + "line": 861, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26550, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6be46c8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26529, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26534, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6be46b0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26531, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26531, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6be4690", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26531, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26531, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6be3468", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26529, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26529, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6be4678", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26534, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26534, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6be3488", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26534, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26534, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"dac 6\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6be5958", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26545, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26550, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6be5940", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26547, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26547, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6be5920", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26547, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26547, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6be4700", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26545, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26545, + "col": 25, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6be5908", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26550, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26550, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6be4720", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26550, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26550, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char[2]" + }, + "valueCategory": "lvalue", + "value": "\"6\"" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6be5a18", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 26563, + "line": 862, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 26576, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6be59e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26570, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 26576, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbdc40", + "kind": "EnumConstantDecl", + "name": "DAC_6", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6be8008", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 26587, + "line": 863, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 26638, + "line": 864, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6be7f70", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 26591, + "line": 863, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26612, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6be6ca8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26591, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26596, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6be6c90", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26593, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26593, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6be6c70", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26593, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26593, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6be5a48", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26591, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26591, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6be6c58", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26596, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26596, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6be5a68", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26596, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26596, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"dac 7\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6be7f38", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26607, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26612, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6be7f20", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26609, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26609, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6be7f00", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26609, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26609, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6be6ce0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26607, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26607, + "col": 25, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6be7ee8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26612, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26612, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6be6d00", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26612, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26612, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char[2]" + }, + "valueCategory": "lvalue", + "value": "\"7\"" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6be7ff8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 26625, + "line": 864, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 26638, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6be7fc8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26632, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 26638, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbdc90", + "kind": "EnumConstantDecl", + "name": "DAC_7", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bea5e8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 26649, + "line": 865, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 26700, + "line": 866, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6bea550", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 26653, + "line": 865, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26674, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6be9288", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26653, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26658, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6be9270", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26655, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26655, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6be9250", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26655, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26655, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6be8028", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26653, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26653, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6be9238", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26658, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26658, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6be8048", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26658, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26658, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"dac 8\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bea518", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26669, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26674, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bea500", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26671, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26671, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bea4e0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26671, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26671, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6be92c0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26669, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26669, + "col": 25, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bea4c8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26674, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26674, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6be92e0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26674, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26674, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char[2]" + }, + "valueCategory": "lvalue", + "value": "\"8\"" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6bea5d8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 26687, + "line": 866, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 26700, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6bea5a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26694, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 26700, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbdce0", + "kind": "EnumConstantDecl", + "name": "DAC_8", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6becbc8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 26711, + "line": 867, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 26762, + "line": 868, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6becb30", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 26715, + "line": 867, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26736, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6beb868", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26715, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26720, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6beb850", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26717, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26717, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6beb830", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26717, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26717, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bea608", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26715, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26715, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6beb818", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26720, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26720, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bea628", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26720, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 26720, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"dac 9\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6becaf8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26731, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26736, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6becae0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26733, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26733, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6becac0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26733, + "col": 27, + "tokLen": 2 + }, + "end": { + "offset": 26733, + "col": 27, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6beb8a0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26731, + "col": 25, + "tokLen": 1 + }, + "end": { + "offset": 26731, + "col": 25, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6becaa8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26736, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26736, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6beb8c0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26736, + "col": 30, + "tokLen": 3 + }, + "end": { + "offset": 26736, + "col": 30, + "tokLen": 3 + } + }, + "type": { + "qualType": "const char[2]" + }, + "valueCategory": "lvalue", + "value": "\"9\"" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6becbb8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 26749, + "line": 868, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 26762, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6becb88", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26756, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 26762, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbdd30", + "kind": "EnumConstantDecl", + "name": "DAC_9", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bef1a8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 26773, + "line": 869, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 26826, + "line": 870, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bef110", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 26777, + "line": 869, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26799, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6bede48", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26777, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26782, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bede30", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26779, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26779, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bede10", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26779, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26779, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6becbe8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26777, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26777, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6beddf8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26782, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 26782, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6becc08", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26782, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 26782, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"dac 10\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bef0d8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26794, + "col": 26, + "tokLen": 1 + }, + "end": { + "offset": 26799, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bef0c0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26796, + "col": 28, + "tokLen": 2 + }, + "end": { + "offset": 26796, + "col": 28, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bef0a0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26796, + "col": 28, + "tokLen": 2 + }, + "end": { + "offset": 26796, + "col": 28, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bede80", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26794, + "col": 26, + "tokLen": 1 + }, + "end": { + "offset": 26794, + "col": 26, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bef088", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26799, + "col": 31, + "tokLen": 4 + }, + "end": { + "offset": 26799, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bedea0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26799, + "col": 31, + "tokLen": 4 + }, + "end": { + "offset": 26799, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char[3]" + }, + "valueCategory": "lvalue", + "value": "\"10\"" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6bef198", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 26813, + "line": 870, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 26826, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bef168", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26820, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 26826, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbdd80", + "kind": "EnumConstantDecl", + "name": "DAC_10", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bf1788", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 26838, + "line": 871, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 26891, + "line": 872, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bf16f0", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 26842, + "line": 871, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26864, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6bf0428", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26842, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26847, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bf0410", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26844, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26844, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bf03f0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26844, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26844, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bef1c8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26842, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26842, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bf03d8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26847, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 26847, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bef1e8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26847, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 26847, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"dac 11\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bf16b8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26859, + "col": 26, + "tokLen": 1 + }, + "end": { + "offset": 26864, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bf16a0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26861, + "col": 28, + "tokLen": 2 + }, + "end": { + "offset": 26861, + "col": 28, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bf1680", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26861, + "col": 28, + "tokLen": 2 + }, + "end": { + "offset": 26861, + "col": 28, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bf0460", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26859, + "col": 26, + "tokLen": 1 + }, + "end": { + "offset": 26859, + "col": 26, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bf1668", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26864, + "col": 31, + "tokLen": 4 + }, + "end": { + "offset": 26864, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bf0480", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26864, + "col": 31, + "tokLen": 4 + }, + "end": { + "offset": 26864, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char[3]" + }, + "valueCategory": "lvalue", + "value": "\"11\"" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6bf1778", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 26878, + "line": 872, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 26891, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bf1748", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26885, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 26891, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbddd0", + "kind": "EnumConstantDecl", + "name": "DAC_11", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bf3d68", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 26903, + "line": 873, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 26956, + "line": 874, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bf3cd0", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 26907, + "line": 873, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26929, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6bf2a08", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26907, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26912, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bf29f0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26909, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26909, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bf29d0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26909, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26909, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bf17a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26907, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26907, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bf29b8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26912, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 26912, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bf17c8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26912, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 26912, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"dac 12\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bf3c98", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26924, + "col": 26, + "tokLen": 1 + }, + "end": { + "offset": 26929, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bf3c80", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26926, + "col": 28, + "tokLen": 2 + }, + "end": { + "offset": 26926, + "col": 28, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bf3c60", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26926, + "col": 28, + "tokLen": 2 + }, + "end": { + "offset": 26926, + "col": 28, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bf2a40", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26924, + "col": 26, + "tokLen": 1 + }, + "end": { + "offset": 26924, + "col": 26, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bf3c48", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26929, + "col": 31, + "tokLen": 4 + }, + "end": { + "offset": 26929, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bf2a60", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26929, + "col": 31, + "tokLen": 4 + }, + "end": { + "offset": 26929, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char[3]" + }, + "valueCategory": "lvalue", + "value": "\"12\"" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6bf3d58", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 26943, + "line": 874, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 26956, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bf3d28", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26950, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 26956, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbde20", + "kind": "EnumConstantDecl", + "name": "DAC_12", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bf6348", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 26968, + "line": 875, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 27021, + "line": 876, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bf62b0", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 26972, + "line": 875, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26994, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6bf4fe8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26972, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26977, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bf4fd0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26974, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26974, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bf4fb0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26974, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 26974, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bf3d88", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26972, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 26972, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bf4f98", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26977, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 26977, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bf3da8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26977, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 26977, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"dac 13\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bf6278", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 26989, + "col": 26, + "tokLen": 1 + }, + "end": { + "offset": 26994, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bf6260", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26991, + "col": 28, + "tokLen": 2 + }, + "end": { + "offset": 26991, + "col": 28, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bf6240", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26991, + "col": 28, + "tokLen": 2 + }, + "end": { + "offset": 26991, + "col": 28, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bf5020", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 26989, + "col": 26, + "tokLen": 1 + }, + "end": { + "offset": 26989, + "col": 26, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bf6228", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 26994, + "col": 31, + "tokLen": 4 + }, + "end": { + "offset": 26994, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bf5040", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 26994, + "col": 31, + "tokLen": 4 + }, + "end": { + "offset": 26994, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char[3]" + }, + "valueCategory": "lvalue", + "value": "\"13\"" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6bf6338", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27008, + "line": 876, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 27021, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bf6308", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27015, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 27021, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbde70", + "kind": "EnumConstantDecl", + "name": "DAC_13", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bf8928", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 27033, + "line": 877, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 27086, + "line": 878, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bf8890", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 27037, + "line": 877, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27059, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6bf75c8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27037, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27042, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bf75b0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27039, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27039, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bf7590", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27039, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27039, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bf6368", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27037, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27037, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bf7578", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27042, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 27042, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bf6388", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27042, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 27042, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"dac 14\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bf8858", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27054, + "col": 26, + "tokLen": 1 + }, + "end": { + "offset": 27059, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bf8840", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27056, + "col": 28, + "tokLen": 2 + }, + "end": { + "offset": 27056, + "col": 28, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bf8820", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27056, + "col": 28, + "tokLen": 2 + }, + "end": { + "offset": 27056, + "col": 28, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bf7600", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27054, + "col": 26, + "tokLen": 1 + }, + "end": { + "offset": 27054, + "col": 26, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bf8808", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27059, + "col": 31, + "tokLen": 4 + }, + "end": { + "offset": 27059, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bf7620", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27059, + "col": 31, + "tokLen": 4 + }, + "end": { + "offset": 27059, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char[3]" + }, + "valueCategory": "lvalue", + "value": "\"14\"" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6bf8918", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27073, + "line": 878, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 27086, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bf88e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27080, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 27086, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbdec0", + "kind": "EnumConstantDecl", + "name": "DAC_14", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bfaf08", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 27098, + "line": 879, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 27151, + "line": 880, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bfae70", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 27102, + "line": 879, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27124, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6bf9ba8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27102, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27107, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bf9b90", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27104, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27104, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bf9b70", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27104, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27104, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bf8948", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27102, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27102, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bf9b58", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27107, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 27107, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bf8968", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27107, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 27107, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"dac 15\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bfae38", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27119, + "col": 26, + "tokLen": 1 + }, + "end": { + "offset": 27124, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bfae20", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27121, + "col": 28, + "tokLen": 2 + }, + "end": { + "offset": 27121, + "col": 28, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bfae00", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27121, + "col": 28, + "tokLen": 2 + }, + "end": { + "offset": 27121, + "col": 28, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bf9be0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27119, + "col": 26, + "tokLen": 1 + }, + "end": { + "offset": 27119, + "col": 26, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bfade8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27124, + "col": 31, + "tokLen": 4 + }, + "end": { + "offset": 27124, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bf9c00", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27124, + "col": 31, + "tokLen": 4 + }, + "end": { + "offset": 27124, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char[3]" + }, + "valueCategory": "lvalue", + "value": "\"15\"" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6bfaef8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27138, + "line": 880, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 27151, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bfaec8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27145, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 27151, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbdf10", + "kind": "EnumConstantDecl", + "name": "DAC_15", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bfd4e8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 27163, + "line": 881, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 27216, + "line": 882, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bfd450", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 27167, + "line": 881, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27189, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6bfc188", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27167, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27172, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bfc170", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27169, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27169, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bfc150", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27169, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27169, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bfaf28", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27167, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27167, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bfc138", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27172, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 27172, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bfaf48", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27172, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 27172, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"dac 16\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bfd418", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27184, + "col": 26, + "tokLen": 1 + }, + "end": { + "offset": 27189, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bfd400", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27186, + "col": 28, + "tokLen": 2 + }, + "end": { + "offset": 27186, + "col": 28, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bfd3e0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27186, + "col": 28, + "tokLen": 2 + }, + "end": { + "offset": 27186, + "col": 28, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bfc1c0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27184, + "col": 26, + "tokLen": 1 + }, + "end": { + "offset": 27184, + "col": 26, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bfd3c8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27189, + "col": 31, + "tokLen": 4 + }, + "end": { + "offset": 27189, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bfc1e0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27189, + "col": 31, + "tokLen": 4 + }, + "end": { + "offset": 27189, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char[3]" + }, + "valueCategory": "lvalue", + "value": "\"16\"" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6bfd4d8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27203, + "line": 882, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 27216, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bfd4a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27210, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 27216, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbdf60", + "kind": "EnumConstantDecl", + "name": "DAC_16", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bbeac8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 27228, + "line": 883, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 27281, + "line": 884, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bbea30", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 27232, + "line": 883, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27254, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6bfe768", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27232, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27237, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bfe750", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27234, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27234, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bfe730", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27234, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27234, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bfd508", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27232, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27232, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bfe718", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27237, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 27237, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bfd528", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27237, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 27237, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"dac 17\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bbe9f8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27249, + "col": 26, + "tokLen": 1 + }, + "end": { + "offset": 27254, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bbe9e0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27251, + "col": 28, + "tokLen": 2 + }, + "end": { + "offset": 27251, + "col": 28, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bbe9c0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27251, + "col": 28, + "tokLen": 2 + }, + "end": { + "offset": 27251, + "col": 28, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bfe7a0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27249, + "col": 26, + "tokLen": 1 + }, + "end": { + "offset": 27249, + "col": 26, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bbe9a8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27254, + "col": 31, + "tokLen": 4 + }, + "end": { + "offset": 27254, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bfe7c0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27254, + "col": 31, + "tokLen": 4 + }, + "end": { + "offset": 27254, + "col": 31, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char[3]" + }, + "valueCategory": "lvalue", + "value": "\"17\"" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6bbeab8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27268, + "line": 884, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 27281, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bbea88", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27275, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 27281, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbdfb0", + "kind": "EnumConstantDecl", + "name": "DAC_17", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bbfdf8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 27293, + "line": 885, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 27331, + "line": 886, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6bbfd48", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27297, + "line": 885, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27302, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bbfd30", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27299, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27299, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bbfd10", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27299, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27299, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bbeae8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27297, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27297, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bbfcf8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27302, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 27302, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bbeb08", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27302, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 27302, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char[5]" + }, + "valueCategory": "lvalue", + "value": "\"vsvp\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bbfde8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27318, + "line": 886, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 27331, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6bbfdb8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27325, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 27331, + "col": 22, + "tokLen": 4 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe000", + "kind": "EnumConstantDecl", + "name": "VSVP", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bc1128", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 27341, + "line": 887, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 27380, + "line": 888, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6bc1078", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27345, + "line": 887, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27350, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bc1060", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27347, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27347, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bc1040", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27347, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27347, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bbfe18", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27345, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27345, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bc1028", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27350, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 27350, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bbfe38", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27350, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 27350, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"vtrim\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bc1118", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27367, + "line": 888, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 27380, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6bc10e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27374, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 27380, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe050", + "kind": "EnumConstantDecl", + "name": "VTRIM", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bc2458", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 27391, + "line": 889, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 27433, + "line": 890, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6bc23a8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27395, + "line": 889, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27400, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bc2390", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27397, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27397, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bc2370", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27397, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27397, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bc1148", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27395, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27395, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bc2358", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27400, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 27400, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bc1168", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27400, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 27400, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"vrpreamp\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bc2448", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27420, + "line": 890, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 27433, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6bc2418", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27427, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 27433, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe0a0", + "kind": "EnumConstantDecl", + "name": "VRPREAMP", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bc3788", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 27447, + "line": 891, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 27489, + "line": 892, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6bc36d8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27451, + "line": 891, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27456, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bc36c0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27453, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27453, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bc36a0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27453, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27453, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bc2478", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27451, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27451, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bc3688", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27456, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 27456, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bc2498", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27456, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 27456, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"vrshaper\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bc3778", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27476, + "line": 892, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 27489, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6bc3748", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27483, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 27489, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe0f0", + "kind": "EnumConstantDecl", + "name": "VRSHAPER", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bc4ab8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 27503, + "line": 893, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 27541, + "line": 894, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6bc4a08", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27507, + "line": 893, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27512, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bc49f0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27509, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27509, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bc49d0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27509, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27509, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bc37a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27507, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27507, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bc49b8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27512, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 27512, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bc37c8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27512, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 27512, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char[5]" + }, + "valueCategory": "lvalue", + "value": "\"vsvn\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bc4aa8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27528, + "line": 894, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 27541, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6bc4a78", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27535, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 27541, + "col": 22, + "tokLen": 4 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe140", + "kind": "EnumConstantDecl", + "name": "VSVN", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bc5de8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 27551, + "line": 895, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 27591, + "line": 896, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bc5d38", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27555, + "line": 895, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27560, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bc5d20", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27557, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27557, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bc5d00", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27557, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27557, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bc4ad8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27555, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27555, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bc5ce8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27560, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 27560, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bc4af8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27560, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 27560, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"vtgstv\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bc5dd8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27578, + "line": 896, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 27591, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bc5da8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27585, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 27591, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe190", + "kind": "EnumConstantDecl", + "name": "VTGSTV", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bc7118", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 27603, + "line": 897, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 27644, + "line": 898, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6bc7068", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27607, + "line": 897, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27612, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bc7050", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27609, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27609, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bc7030", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27609, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27609, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bc5e08", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27607, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27607, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bc7018", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27612, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 27612, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bc5e28", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27612, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 27612, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char[8]" + }, + "valueCategory": "lvalue", + "value": "\"vcmp_ll\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bc7108", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27631, + "line": 898, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 27644, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6bc70d8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27638, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 27644, + "col": 22, + "tokLen": 7 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe1e0", + "kind": "EnumConstantDecl", + "name": "VCMP_LL", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bc8448", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 27657, + "line": 899, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 27698, + "line": 900, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6bc8398", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27661, + "line": 899, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27666, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bc8380", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27663, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27663, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bc8360", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27663, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27663, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bc7138", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27661, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27661, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bc8348", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27666, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 27666, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bc7158", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27666, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 27666, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char[8]" + }, + "valueCategory": "lvalue", + "value": "\"vcmp_lr\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bc8438", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27685, + "line": 900, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 27698, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6bc8408", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27692, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 27698, + "col": 22, + "tokLen": 7 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe230", + "kind": "EnumConstantDecl", + "name": "VCMP_LR", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bc9778", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 27711, + "line": 901, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 27749, + "line": 902, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6bc96c8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27715, + "line": 901, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27720, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bc96b0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27717, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27717, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bc9690", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27717, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27717, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bc8468", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27715, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27715, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bc9678", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27720, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 27720, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bc8488", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27720, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 27720, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char[5]" + }, + "valueCategory": "lvalue", + "value": "\"vcal\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bc9768", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27736, + "line": 902, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 27749, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6bc9738", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27743, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 27749, + "col": 22, + "tokLen": 4 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe280", + "kind": "EnumConstantDecl", + "name": "VCAL", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bcaaa8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 27759, + "line": 903, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 27800, + "line": 904, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6bca9f8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27763, + "line": 903, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27768, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bca9e0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27765, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27765, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bca9c0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27765, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27765, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bc9798", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27763, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27763, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bca9a8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27768, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 27768, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bc97b8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27768, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 27768, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char[8]" + }, + "valueCategory": "lvalue", + "value": "\"vcmp_rl\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bcaa98", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27787, + "line": 904, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 27800, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6bcaa68", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27794, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 27800, + "col": 22, + "tokLen": 7 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe2d0", + "kind": "EnumConstantDecl", + "name": "VCMP_RL", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bcbdd8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 27813, + "line": 905, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 27853, + "line": 906, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bcbd28", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27817, + "line": 905, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27822, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bcbd10", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27819, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27819, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bcbcf0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27819, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27819, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bcaac8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27817, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27817, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bcbcd8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27822, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 27822, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bcaae8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27822, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 27822, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"rxb_rb\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bcbdc8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27840, + "line": 906, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 27853, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bcbd98", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27847, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 27853, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe320", + "kind": "EnumConstantDecl", + "name": "RXB_RB", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bcd108", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 27865, + "line": 907, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 27905, + "line": 908, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bcd058", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27869, + "line": 907, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27874, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bcd040", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27871, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27871, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bcd020", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27871, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27871, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bcbdf8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27869, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27869, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bcd008", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27874, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 27874, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bcbe18", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27874, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 27874, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"rxb_lb\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bcd0f8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27892, + "line": 908, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 27905, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bcd0c8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27899, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 27905, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe370", + "kind": "EnumConstantDecl", + "name": "RXB_LB", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bce438", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 27917, + "line": 909, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 27958, + "line": 910, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6bce388", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27921, + "line": 909, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27926, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bce370", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27923, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27923, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bce350", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27923, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27923, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bcd128", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27921, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27921, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bce338", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27926, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 27926, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bcd148", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27926, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 27926, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char[8]" + }, + "valueCategory": "lvalue", + "value": "\"vcmp_rr\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bce428", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27945, + "line": 910, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 27958, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6bce3f8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27952, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 27958, + "col": 22, + "tokLen": 7 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe3c0", + "kind": "EnumConstantDecl", + "name": "VCMP_RR", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bcf768", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 27971, + "line": 911, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 28008, + "line": 912, + "col": 22, + "tokLen": 3 + } + }, + "inner": [ + { + "id": "0x7f0da6bcf6b8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 27975, + "line": 911, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27980, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bcf6a0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27977, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27977, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bcf680", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27977, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 27977, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bce458", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 27975, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 27975, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bcf668", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 27980, + "col": 14, + "tokLen": 5 + }, + "end": { + "offset": 27980, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bce478", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 27980, + "col": 14, + "tokLen": 5 + }, + "end": { + "offset": 27980, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "const char[4]" + }, + "valueCategory": "lvalue", + "value": "\"vcp\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bcf758", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 27995, + "line": 912, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 28008, + "col": 22, + "tokLen": 3 + } + }, + "inner": [ + { + "id": "0x7f0da6bcf728", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28002, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 28008, + "col": 22, + "tokLen": 3 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe410", + "kind": "EnumConstantDecl", + "name": "VCP", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bd0a98", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 28017, + "line": 913, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 28054, + "line": 914, + "col": 22, + "tokLen": 3 + } + }, + "inner": [ + { + "id": "0x7f0da6bd09e8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 28021, + "line": 913, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28026, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bd09d0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28023, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28023, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bd09b0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28023, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28023, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bcf788", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28021, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28021, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bd0998", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28026, + "col": 14, + "tokLen": 5 + }, + "end": { + "offset": 28026, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bcf7a8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 28026, + "col": 14, + "tokLen": 5 + }, + "end": { + "offset": 28026, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "const char[4]" + }, + "valueCategory": "lvalue", + "value": "\"vcn\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bd0a88", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 28041, + "line": 914, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 28054, + "col": 22, + "tokLen": 3 + } + }, + "inner": [ + { + "id": "0x7f0da6bd0a58", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28048, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 28054, + "col": 22, + "tokLen": 3 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe460", + "kind": "EnumConstantDecl", + "name": "VCN", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bd1dc8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 28063, + "line": 915, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 28105, + "line": 916, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6bd1d18", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 28067, + "line": 915, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28072, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bd1d00", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28069, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28069, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bd1ce0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28069, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28069, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bd0ab8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28067, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28067, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bd1cc8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28072, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 28072, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bd0ad8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 28072, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 28072, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"vishaper\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bd1db8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 28092, + "line": 916, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 28105, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6bd1d88", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28099, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 28105, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe4b0", + "kind": "EnumConstantDecl", + "name": "VISHAPER", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bd30f8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 28119, + "line": 917, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 28163, + "line": 918, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6bd3048", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 28123, + "line": 917, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28128, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bd3030", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28125, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28125, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bd3010", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28125, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28125, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bd1de8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28123, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28123, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bd2ff8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28128, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 28128, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bd1e08", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 28128, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 28128, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char[11]" + }, + "valueCategory": "lvalue", + "value": "\"vthreshold\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bd30e8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 28150, + "line": 918, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 28163, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6bd30b8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28157, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 28163, + "col": 22, + "tokLen": 10 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe500", + "kind": "EnumConstantDecl", + "name": "VTHRESHOLD", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bd4428", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 28179, + "line": 919, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 28220, + "line": 920, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6bd4378", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 28183, + "line": 919, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28188, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bd4360", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28185, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28185, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bd4340", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28185, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28185, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bd3118", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28183, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28183, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bd4328", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28188, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 28188, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bd3138", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 28188, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 28188, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char[8]" + }, + "valueCategory": "lvalue", + "value": "\"vref_ds\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bd4418", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 28207, + "line": 920, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 28220, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6bd43e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28214, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 28220, + "col": 22, + "tokLen": 7 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe5a0", + "kind": "EnumConstantDecl", + "name": "VREF_DS", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bd5758", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 28233, + "line": 921, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 28276, + "line": 922, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6bd56a8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 28237, + "line": 921, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28242, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bd5690", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28239, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28239, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bd5670", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28239, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28239, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bd4448", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28237, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28237, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bd5658", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28242, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 28242, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bd4468", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 28242, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 28242, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"vcascn_pb\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bd5748", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 28263, + "line": 922, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 28276, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6bd5718", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28270, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 28276, + "col": 22, + "tokLen": 9 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe5f0", + "kind": "EnumConstantDecl", + "name": "VCASCN_PB", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bd6a88", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 28291, + "line": 923, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 28334, + "line": 924, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6bd69d8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 28295, + "line": 923, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28300, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bd69c0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28297, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28297, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bd69a0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28297, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28297, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bd5778", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28295, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28295, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bd6988", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28300, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 28300, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bd5798", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 28300, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 28300, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"vcascp_pb\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bd6a78", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 28321, + "line": 924, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 28334, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6bd6a48", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28328, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 28334, + "col": 22, + "tokLen": 9 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe640", + "kind": "EnumConstantDecl", + "name": "VCASCP_PB", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bd7db8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 28349, + "line": 925, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 28390, + "line": 926, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6bd7d08", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 28353, + "line": 925, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28358, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bd7cf0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28355, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28355, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bd7cd0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28355, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28355, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bd6aa8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28353, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28353, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bd7cb8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28358, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 28358, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bd6ac8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 28358, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 28358, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char[8]" + }, + "valueCategory": "lvalue", + "value": "\"vout_cm\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bd7da8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 28377, + "line": 926, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 28390, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6bd7d78", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28384, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 28390, + "col": 22, + "tokLen": 7 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe690", + "kind": "EnumConstantDecl", + "name": "VOUT_CM", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bd90e8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 28403, + "line": 927, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 28446, + "line": 928, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6bd9038", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 28407, + "line": 927, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28412, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bd9020", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28409, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28409, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bd9000", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28409, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28409, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bd7dd8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28407, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28407, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bd8fe8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28412, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 28412, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bd7df8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 28412, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 28412, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"vcasc_out\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bd90d8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 28433, + "line": 928, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 28446, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6bd90a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28440, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 28446, + "col": 22, + "tokLen": 9 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe6e0", + "kind": "EnumConstantDecl", + "name": "VCASC_OUT", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bda418", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 28461, + "line": 929, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 28501, + "line": 930, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bda368", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 28465, + "line": 929, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28470, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bda350", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28467, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28467, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bda330", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28467, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28467, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bd9108", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28465, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28465, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bda318", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28470, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 28470, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bd9128", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 28470, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 28470, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"vin_cm\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bda408", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 28488, + "line": 930, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 28501, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bda3d8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28495, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 28501, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe730", + "kind": "EnumConstantDecl", + "name": "VIN_CM", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bdb748", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 28513, + "line": 931, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 28556, + "line": 932, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6bdb698", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 28517, + "line": 931, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28522, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bdb680", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28519, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28519, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bdb660", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28519, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28519, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bda438", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28517, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28517, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bdb648", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28522, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 28522, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bda458", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 28522, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 28522, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"vref_comp\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bdb738", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 28543, + "line": 932, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 28556, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6bdb708", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28550, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 28556, + "col": 22, + "tokLen": 9 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe780", + "kind": "EnumConstantDecl", + "name": "VREF_COMP", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bdca78", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 28571, + "line": 933, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 28614, + "line": 934, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6bdc9c8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 28575, + "line": 933, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28580, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bdc9b0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28577, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28577, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bdc990", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28577, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28577, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bdb768", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28575, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28575, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bdc978", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28580, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 28580, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bdb788", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 28580, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 28580, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"ib_test_c\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bdca68", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 28601, + "line": 934, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 28614, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6bdca38", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28608, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 28614, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe7d0", + "kind": "EnumConstantDecl", + "name": "IB_TESTC", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bddda8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 28628, + "line": 935, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 28669, + "line": 936, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6bddcf8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 28632, + "line": 935, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28637, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bddce0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28634, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28634, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bddcc0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28634, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28634, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bdca98", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28632, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28632, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bddca8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28637, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 28637, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bdcab8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 28637, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 28637, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char[8]" + }, + "valueCategory": "lvalue", + "value": "\"vb_comp\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bddd98", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 28656, + "line": 936, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 28669, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6bddd68", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28663, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 28669, + "col": 22, + "tokLen": 7 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe820", + "kind": "EnumConstantDecl", + "name": "VB_COMP", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b9e0f8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 28682, + "line": 937, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 28724, + "line": 938, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b9e048", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 28686, + "line": 937, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28691, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b9e030", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28688, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28688, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b9e010", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28688, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28688, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bdddc8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28686, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28686, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b9dff8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28691, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 28691, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bddde8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 28691, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 28691, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"vdd_prot\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b9e0e8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 28711, + "line": 938, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 28724, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b9e0b8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28718, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 28724, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe870", + "kind": "EnumConstantDecl", + "name": "VDD_PROT", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b9f428", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 28738, + "line": 939, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 28779, + "line": 940, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6b9f378", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 28742, + "line": 939, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28747, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b9f360", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28744, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28744, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b9f340", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28744, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28744, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b9e118", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28742, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28742, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b9f328", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28747, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 28747, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b9e138", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 28747, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 28747, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char[8]" + }, + "valueCategory": "lvalue", + "value": "\"vin_com\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b9f418", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 28766, + "line": 940, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 28779, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6b9f3e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28773, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 28779, + "col": 22, + "tokLen": 7 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe8c0", + "kind": "EnumConstantDecl", + "name": "VIN_COM", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6ba0758", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 28792, + "line": 941, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 28836, + "line": 942, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6ba06a8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 28796, + "line": 941, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28801, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6ba0690", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28798, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28798, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6ba0670", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28798, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28798, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b9f448", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28796, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28796, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6ba0658", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28801, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 28801, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b9f468", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 28801, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 28801, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char[11]" + }, + "valueCategory": "lvalue", + "value": "\"vref_prech\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6ba0748", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 28823, + "line": 942, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 28836, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6ba0718", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28830, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 28836, + "col": 22, + "tokLen": 10 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe910", + "kind": "EnumConstantDecl", + "name": "VREF_PRECH", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6ba1a88", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 28852, + "line": 943, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 28895, + "line": 944, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6ba19d8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 28856, + "line": 943, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28861, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6ba19c0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28858, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28858, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6ba19a0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28858, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28858, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6ba0778", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28856, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28856, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6ba1988", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28861, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 28861, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6ba0798", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 28861, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 28861, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"vb_pixbuf\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6ba1a78", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 28882, + "line": 944, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 28895, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6ba1a48", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28889, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 28895, + "col": 22, + "tokLen": 9 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe960", + "kind": "EnumConstantDecl", + "name": "VB_PIXBUF", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6ba2db8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 28910, + "line": 945, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 28949, + "line": 946, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6ba2d08", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 28914, + "line": 945, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28919, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6ba2cf0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28916, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28916, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6ba2cd0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28916, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28916, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6ba1aa8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28914, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28914, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6ba2cb8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28919, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 28919, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6ba1ac8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 28919, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 28919, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"vb_ds\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6ba2da8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 28936, + "line": 946, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 28949, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6ba2d78", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28943, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 28949, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe9b0", + "kind": "EnumConstantDecl", + "name": "VB_DS", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6ba40e8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 28960, + "line": 947, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 29004, + "line": 948, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6ba4038", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 28964, + "line": 947, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28969, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6ba4020", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28966, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28966, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6ba4000", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28966, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 28966, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6ba2dd8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28964, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 28964, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6ba3fe8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 28969, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 28969, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6ba2df8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 28969, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 28969, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char[11]" + }, + "valueCategory": "lvalue", + "value": "\"vref_h_adc\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6ba40d8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 28991, + "line": 948, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 29004, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6ba40a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 28998, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 29004, + "col": 22, + "tokLen": 10 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbea00", + "kind": "EnumConstantDecl", + "name": "VREF_H_ADC", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6ba5418", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 29020, + "line": 949, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 29064, + "line": 950, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6ba5368", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 29024, + "line": 949, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29029, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6ba5350", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29026, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29026, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6ba5330", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29026, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29026, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6ba4108", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29024, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29024, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6ba5318", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29029, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 29029, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6ba4128", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 29029, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 29029, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char[11]" + }, + "valueCategory": "lvalue", + "value": "\"vb_comp_fe\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6ba5408", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 29051, + "line": 950, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 29064, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6ba53d8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29058, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 29064, + "col": 22, + "tokLen": 10 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbea50", + "kind": "EnumConstantDecl", + "name": "VB_COMP_FE", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6ba6748", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 29080, + "line": 951, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 29125, + "line": 952, + "col": 22, + "tokLen": 11 + } + }, + "inner": [ + { + "id": "0x7f0da6ba6698", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 29084, + "line": 951, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29089, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6ba6680", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29086, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29086, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6ba6660", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29086, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29086, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6ba5438", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29084, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29084, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6ba6648", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29089, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 29089, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6ba5458", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 29089, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 29089, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char[12]" + }, + "valueCategory": "lvalue", + "value": "\"vb_comp_adc\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6ba6738", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 29112, + "line": 952, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 29125, + "col": 22, + "tokLen": 11 + } + }, + "inner": [ + { + "id": "0x7f0da6ba6708", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29119, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 29125, + "col": 22, + "tokLen": 11 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbeaa0", + "kind": "EnumConstantDecl", + "name": "VB_COMP_ADC", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6ba7a78", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 29142, + "line": 953, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 29184, + "line": 954, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6ba79c8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 29146, + "line": 953, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29151, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6ba79b0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29148, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29148, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6ba7990", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29148, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29148, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6ba6768", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29146, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29146, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6ba7978", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29151, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 29151, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6ba6788", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 29151, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 29151, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"vcom_cds\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6ba7a68", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 29171, + "line": 954, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 29184, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6ba7a38", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29178, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 29184, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbeaf0", + "kind": "EnumConstantDecl", + "name": "VCOM_CDS", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6ba8da8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 29198, + "line": 955, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 29243, + "line": 956, + "col": 22, + "tokLen": 11 + } + }, + "inner": [ + { + "id": "0x7f0da6ba8cf8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 29202, + "line": 955, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29207, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6ba8ce0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29204, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29204, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6ba8cc0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29204, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29204, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6ba7a98", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29202, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29202, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6ba8ca8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29207, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 29207, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6ba7ab8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 29207, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 29207, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char[12]" + }, + "valueCategory": "lvalue", + "value": "\"vref_rstore\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6ba8d98", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 29230, + "line": 956, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 29243, + "col": 22, + "tokLen": 11 + } + }, + "inner": [ + { + "id": "0x7f0da6ba8d68", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29237, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 29243, + "col": 22, + "tokLen": 11 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbeb40", + "kind": "EnumConstantDecl", + "name": "VREF_RSTORE", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6baa0d8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 29260, + "line": 957, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 29304, + "line": 958, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6baa028", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 29264, + "line": 957, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29269, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6baa010", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29266, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29266, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6ba9ff0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29266, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29266, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6ba8dc8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29264, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29264, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6ba9fd8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29269, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 29269, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6ba8de8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 29269, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 29269, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char[11]" + }, + "valueCategory": "lvalue", + "value": "\"vb_opa_1st\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6baa0c8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 29291, + "line": 958, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 29304, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6baa098", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29298, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 29304, + "col": 22, + "tokLen": 10 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbeb90", + "kind": "EnumConstantDecl", + "name": "VB_OPA_1ST", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bab408", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 29320, + "line": 959, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 29366, + "line": 960, + "col": 22, + "tokLen": 12 + } + }, + "inner": [ + { + "id": "0x7f0da6bab358", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 29324, + "line": 959, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29329, + "col": 14, + "tokLen": 14 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bab340", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29326, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29326, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bab320", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29326, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29326, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6baa0f8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29324, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29324, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bab308", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29329, + "col": 14, + "tokLen": 14 + }, + "end": { + "offset": 29329, + "col": 14, + "tokLen": 14 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6baa118", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 29329, + "col": 14, + "tokLen": 14 + }, + "end": { + "offset": 29329, + "col": 14, + "tokLen": 14 + } + }, + "type": { + "qualType": "const char[13]" + }, + "valueCategory": "lvalue", + "value": "\"vref_comp_fe\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bab3f8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 29353, + "line": 960, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 29366, + "col": 22, + "tokLen": 12 + } + }, + "inner": [ + { + "id": "0x7f0da6bab3c8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29360, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 29366, + "col": 22, + "tokLen": 12 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbebe0", + "kind": "EnumConstantDecl", + "name": "VREF_COMP_FE", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bac738", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 29384, + "line": 961, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 29427, + "line": 962, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6bac688", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 29388, + "line": 961, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29393, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bac670", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29390, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29390, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bac650", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29390, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29390, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bab428", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29388, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29388, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bac638", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29393, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 29393, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bab448", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 29393, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 29393, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"vcom_adc1\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bac728", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 29414, + "line": 962, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 29427, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6bac6f8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29421, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 29427, + "col": 22, + "tokLen": 9 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbec30", + "kind": "EnumConstantDecl", + "name": "VCOM_ADC1", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bada68", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 29442, + "line": 963, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 29486, + "line": 964, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6bad9b8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 29446, + "line": 963, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29451, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bad9a0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29448, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29448, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bad980", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29448, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29448, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bac758", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29446, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29446, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bad968", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29451, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 29451, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bac778", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 29451, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 29451, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char[11]" + }, + "valueCategory": "lvalue", + "value": "\"vref_l_adc\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bada58", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 29473, + "line": 964, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 29486, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6bada28", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29480, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 29486, + "col": 22, + "tokLen": 10 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbec80", + "kind": "EnumConstantDecl", + "name": "VREF_L_ADC", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6baed98", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 29502, + "line": 965, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 29544, + "line": 966, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6baece8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 29506, + "line": 965, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29511, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6baecd0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29508, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29508, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6baecb0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29508, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29508, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bada88", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29506, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29506, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6baec98", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29511, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 29511, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6badaa8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 29511, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 29511, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"vref_cds\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6baed88", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 29531, + "line": 966, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 29544, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6baed58", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29538, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 29544, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbecd0", + "kind": "EnumConstantDecl", + "name": "VREF_CDS", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bb00c8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 29558, + "line": 967, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 29597, + "line": 968, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6bb0018", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 29562, + "line": 967, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29567, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bb0000", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29564, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29564, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6baffe0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29564, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29564, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6baedb8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29562, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29562, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6baffc8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29567, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 29567, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6baedd8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 29567, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 29567, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"vb_cs\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bb00b8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 29584, + "line": 968, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 29597, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6bb0088", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29591, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 29597, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbed20", + "kind": "EnumConstantDecl", + "name": "VB_CS", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bb13f8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 29608, + "line": 969, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 29651, + "line": 970, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6bb1348", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 29612, + "line": 969, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29617, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bb1330", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29614, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29614, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bb1310", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29614, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29614, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bb00e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29612, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29612, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bb12f8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29617, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 29617, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bb0108", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 29617, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 29617, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"vb_opa_fd\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bb13e8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 29638, + "line": 970, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 29651, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6bb13b8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29645, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 29651, + "col": 22, + "tokLen": 9 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbed70", + "kind": "EnumConstantDecl", + "name": "VB_OPA_FD", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bb2728", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 29666, + "line": 971, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 29709, + "line": 972, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6bb2678", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 29670, + "line": 971, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29675, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bb2660", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29672, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29672, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bb2640", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29672, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29672, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bb1418", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29670, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29670, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bb2628", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29675, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 29675, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bb1438", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 29675, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 29675, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"vcom_adc2\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bb2718", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 29696, + "line": 972, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 29709, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6bb26e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29703, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 29709, + "col": 22, + "tokLen": 9 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbedc0", + "kind": "EnumConstantDecl", + "name": "VCOM_ADC2", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bb3a58", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 29724, + "line": 973, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 29764, + "line": 974, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bb39a8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 29728, + "line": 973, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29733, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bb3990", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29730, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29730, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bb3970", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29730, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29730, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bb2748", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29728, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29728, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bb3958", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29733, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 29733, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bb2768", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 29733, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 29733, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"vcassh\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bb3a48", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 29751, + "line": 974, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 29764, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6bb3a18", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29758, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 29764, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbee10", + "kind": "EnumConstantDecl", + "name": "VCASSH", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bb4d88", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 29776, + "line": 975, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 29814, + "line": 976, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6bb4cd8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 29780, + "line": 975, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29785, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bb4cc0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29782, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29782, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bb4ca0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29782, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29782, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bb3a78", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29780, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29780, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bb4c88", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29785, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 29785, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bb3a98", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 29785, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 29785, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char[5]" + }, + "valueCategory": "lvalue", + "value": "\"vth2\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bb4d78", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 29801, + "line": 976, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 29814, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6bb4d48", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29808, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 29814, + "col": 22, + "tokLen": 4 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbee60", + "kind": "EnumConstantDecl", + "name": "VTH2", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bb60b8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 29824, + "line": 977, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 29868, + "line": 978, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6bb6008", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 29828, + "line": 977, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29833, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bb5ff0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29830, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29830, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bb5fd0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29830, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29830, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bb4da8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29828, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29828, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bb5fb8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29833, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 29833, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bb4dc8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 29833, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 29833, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char[11]" + }, + "valueCategory": "lvalue", + "value": "\"vrshaper_n\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bb60a8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 29855, + "line": 978, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 29868, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6bb6078", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29862, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 29868, + "col": 22, + "tokLen": 10 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbeeb0", + "kind": "EnumConstantDecl", + "name": "VRSHAPER_N", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bb73e8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 29884, + "line": 979, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 29927, + "line": 980, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6bb7338", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 29888, + "line": 979, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29893, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bb7320", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29890, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29890, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bb7300", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29890, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29890, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bb60d8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29888, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29888, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bb72e8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29893, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 29893, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bb60f8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 29893, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 29893, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"vipre_out\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bb73d8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 29914, + "line": 980, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 29927, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6bb73a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29921, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 29927, + "col": 22, + "tokLen": 9 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbef00", + "kind": "EnumConstantDecl", + "name": "VIPRE_OUT", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bb8718", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 29942, + "line": 981, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 29980, + "line": 982, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6bb8668", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 29946, + "line": 981, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29951, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bb8650", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29948, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29948, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bb8630", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29948, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29948, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bb7408", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29946, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29946, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bb8618", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29951, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 29951, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bb7428", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 29951, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 29951, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char[5]" + }, + "valueCategory": "lvalue", + "value": "\"vth3\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bb8708", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 29967, + "line": 982, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 29980, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6bb86d8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29974, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 29980, + "col": 22, + "tokLen": 4 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbef50", + "kind": "EnumConstantDecl", + "name": "VTH3", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bb9a48", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 29990, + "line": 983, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 30028, + "line": 984, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6bb9998", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 29994, + "line": 983, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29999, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bb9980", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29996, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29996, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bb9960", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29996, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 29996, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bb8738", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 29994, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 29994, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bb9948", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 29999, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 29999, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bb8758", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 29999, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 29999, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char[5]" + }, + "valueCategory": "lvalue", + "value": "\"vth1\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bb9a38", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 30015, + "line": 984, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 30028, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6bb9a08", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30022, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 30028, + "col": 22, + "tokLen": 4 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbefa0", + "kind": "EnumConstantDecl", + "name": "VTH1", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bbad78", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 30038, + "line": 985, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 30077, + "line": 986, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6bbacc8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 30042, + "line": 985, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30047, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bbacb0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30044, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30044, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bbac90", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30044, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30044, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bb9a68", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30042, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30042, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bbac78", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30047, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 30047, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bb9a88", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 30047, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 30047, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"vicin\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bbad68", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 30064, + "line": 986, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 30077, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6bbad38", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30071, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 30077, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbeff0", + "kind": "EnumConstantDecl", + "name": "VICIN", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6bbc0a8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 30088, + "line": 987, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 30126, + "line": 988, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6bbbff8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 30092, + "line": 987, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30097, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6bbbfe0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30094, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30094, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bbbfc0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30094, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30094, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bbad98", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30092, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30092, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6bbbfa8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30097, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 30097, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bbadb8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 30097, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 30097, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char[5]" + }, + "valueCategory": "lvalue", + "value": "\"vcas\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6bbc098", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 30113, + "line": 988, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 30126, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6bbc068", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30120, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 30126, + "col": 22, + "tokLen": 4 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf040", + "kind": "EnumConstantDecl", + "name": "VCAS", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b7c3e8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 30136, + "line": 989, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 30176, + "line": 990, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6b7c338", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 30140, + "line": 989, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30145, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b7c320", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30142, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30142, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b7c300", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30142, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30142, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6bbc0c8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30140, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30140, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b7c2e8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30145, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 30145, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6bbc0e8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 30145, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 30145, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"vcal_n\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b7c3d8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 30163, + "line": 990, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 30176, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6b7c3a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30170, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 30176, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf090", + "kind": "EnumConstantDecl", + "name": "VCAL_N", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b7d718", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 30188, + "line": 991, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 30227, + "line": 992, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6b7d668", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 30192, + "line": 991, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30197, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b7d650", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30194, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30194, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b7d630", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30194, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30194, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b7c408", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30192, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30192, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b7d618", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30197, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 30197, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b7c428", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 30197, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 30197, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"vipre\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b7d708", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 30214, + "line": 992, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 30227, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6b7d6d8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30221, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 30227, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf0e0", + "kind": "EnumConstantDecl", + "name": "VIPRE", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b7ea48", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 30238, + "line": 993, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 30278, + "line": 994, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6b7e998", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 30242, + "line": 993, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30247, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b7e980", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30244, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30244, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b7e960", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30244, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30244, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b7d738", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30242, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30242, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b7e948", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30247, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 30247, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b7d758", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 30247, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 30247, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"vcal_p\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b7ea38", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 30265, + "line": 994, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 30278, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6b7ea08", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30272, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 30278, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf130", + "kind": "EnumConstantDecl", + "name": "VCAL_P", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b7fd78", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 30290, + "line": 995, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 30329, + "line": 996, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6b7fcc8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 30294, + "line": 995, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30299, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b7fcb0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30296, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30296, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b7fc90", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30296, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30296, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b7ea68", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30294, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30294, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b7fc78", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30299, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 30299, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b7ea88", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 30299, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 30299, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"vdcsh\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b7fd68", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 30316, + "line": 996, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 30329, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6b7fd38", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30323, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 30329, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf180", + "kind": "EnumConstantDecl", + "name": "VDCSH", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b810a8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 30340, + "line": 997, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 30384, + "line": 998, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6b80ff8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 30344, + "line": 997, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30349, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b80fe0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30346, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30346, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b80fc0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30346, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30346, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b7fd98", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30344, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30344, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b80fa8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30349, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 30349, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b7fdb8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 30349, + "col": 14, + "tokLen": 12 + }, + "end": { + "offset": 30349, + "col": 14, + "tokLen": 12 + } + }, + "type": { + "qualType": "const char[11]" + }, + "valueCategory": "lvalue", + "value": "\"vbp_colbuf\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b81098", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 30371, + "line": 998, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 30384, + "col": 22, + "tokLen": 10 + } + }, + "inner": [ + { + "id": "0x7f0da6b81068", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30378, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 30384, + "col": 22, + "tokLen": 10 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf1d0", + "kind": "EnumConstantDecl", + "name": "VBP_COLBUF", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b823d8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 30400, + "line": 999, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 30440, + "line": 1000, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6b82328", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 30404, + "line": 999, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30409, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b82310", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30406, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30406, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b822f0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30406, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30406, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b810c8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30404, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30404, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b822d8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30409, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 30409, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b810e8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 30409, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 30409, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"vb_sda\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b823c8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 30427, + "line": 1000, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 30440, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6b82398", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30434, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 30440, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf220", + "kind": "EnumConstantDecl", + "name": "VB_SDA", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b83708", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 30452, + "line": 1001, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 30495, + "line": 1002, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6b83658", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 30456, + "line": 1001, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30461, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b83640", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30458, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30458, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b83620", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30458, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30458, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b823f8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30456, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30456, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b83608", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30461, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 30461, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b82418", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 30461, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 30461, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"vcasc_sfp\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b836f8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 30482, + "line": 1002, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 30495, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6b836c8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30489, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 30495, + "col": 22, + "tokLen": 9 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf270", + "kind": "EnumConstantDecl", + "name": "VCASC_SFP", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b84a38", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 30510, + "line": 1003, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 30553, + "line": 1004, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6b84988", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 30514, + "line": 1003, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30519, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b84970", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30516, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30516, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b84950", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30516, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30516, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b83728", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30514, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30514, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b84938", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30519, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 30519, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b83748", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 30519, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 30519, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"vipre_cds\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b84a28", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 30540, + "line": 1004, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 30553, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6b849f8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30547, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 30553, + "col": 22, + "tokLen": 9 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf2c0", + "kind": "EnumConstantDecl", + "name": "VIPRE_CDS", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b85d68", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 30568, + "line": 1005, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 30611, + "line": 1006, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6b85cb8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 30572, + "line": 1005, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30577, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b85ca0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30574, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30574, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b85c80", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30574, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30574, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b84a58", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30572, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30572, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b85c68", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30577, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 30577, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b84a78", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 30577, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 30577, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"ibias_sfp\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b85d58", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 30598, + "line": 1006, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 30611, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6b85d28", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30605, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 30611, + "col": 22, + "tokLen": 9 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf310", + "kind": "EnumConstantDecl", + "name": "IBIAS_SFP", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b87098", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 30626, + "line": 1007, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 30668, + "line": 1008, + "col": 22, + "tokLen": 12 + } + }, + "inner": [ + { + "id": "0x7f0da6b86fe8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 30630, + "line": 1007, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30635, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b86fd0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30632, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30632, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b86fb0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30632, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30632, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b85d88", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30630, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30630, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b86f98", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30635, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 30635, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b85da8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 30635, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 30635, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"trimbits\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b87088", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 30655, + "line": 1008, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 30668, + "col": 22, + "tokLen": 12 + } + }, + "inner": [ + { + "id": "0x7f0da6b87058", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30662, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 30668, + "col": 22, + "tokLen": 12 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf6d0", + "kind": "EnumConstantDecl", + "name": "TRIMBIT_SCAN", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b883c8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 30686, + "line": 1009, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 30731, + "line": 1010, + "col": 22, + "tokLen": 12 + } + }, + "inner": [ + { + "id": "0x7f0da6b88318", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 30690, + "line": 1009, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30695, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b88300", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30692, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30692, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b882e0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30692, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30692, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b870b8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30690, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30690, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b882c8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30695, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 30695, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b870d8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 30695, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 30695, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char[12]" + }, + "valueCategory": "lvalue", + "value": "\"highvoltage\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b883b8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 30718, + "line": 1010, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 30731, + "col": 22, + "tokLen": 12 + } + }, + "inner": [ + { + "id": "0x7f0da6b88388", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30725, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 30731, + "col": 22, + "tokLen": 12 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf3b0", + "kind": "EnumConstantDecl", + "name": "HIGH_VOLTAGE", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b896f8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 30749, + "line": 1011, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 30790, + "line": 1012, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b89648", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 30753, + "line": 1011, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30758, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b89630", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30755, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30755, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b89610", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30755, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30755, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b883e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30753, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30753, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b895f8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30758, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 30758, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b88408", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 30758, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 30758, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char[8]" + }, + "valueCategory": "lvalue", + "value": "\"iodelay\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b896e8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 30777, + "line": 1012, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 30790, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b896b8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30784, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 30790, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbe550", + "kind": "EnumConstantDecl", + "name": "IO_DELAY", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b8aa28", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 30804, + "line": 1013, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 30846, + "line": 1014, + "col": 22, + "tokLen": 15 + } + }, + "inner": [ + { + "id": "0x7f0da6b8a978", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 30808, + "line": 1013, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30813, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b8a960", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30810, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30810, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b8a940", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30810, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30810, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b89718", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30808, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30808, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b8a928", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30813, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 30813, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b89738", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 30813, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 30813, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"temp_adc\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b8aa18", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 30833, + "line": 1014, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 30846, + "col": 22, + "tokLen": 15 + } + }, + "inner": [ + { + "id": "0x7f0da6b8a9e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30840, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 30846, + "col": 22, + "tokLen": 15 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf400", + "kind": "EnumConstantDecl", + "name": "TEMPERATURE_ADC", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b8bd58", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 30867, + "line": 1015, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 30910, + "line": 1016, + "col": 22, + "tokLen": 16 + } + }, + "inner": [ + { + "id": "0x7f0da6b8bca8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 30871, + "line": 1015, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30876, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b8bc90", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30873, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30873, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b8bc70", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30873, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30873, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b8aa48", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30871, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30871, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b8bc58", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30876, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 30876, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b8aa68", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 30876, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 30876, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"temp_fpga\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b8bd48", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 30897, + "line": 1016, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 30910, + "col": 22, + "tokLen": 16 + } + }, + "inner": [ + { + "id": "0x7f0da6b8bd18", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30904, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 30910, + "col": 22, + "tokLen": 16 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf450", + "kind": "EnumConstantDecl", + "name": "TEMPERATURE_FPGA", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b8d088", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 30932, + "line": 1017, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 30978, + "line": 1018, + "col": 22, + "tokLen": 19 + } + }, + "inner": [ + { + "id": "0x7f0da6b8cfd8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 30936, + "line": 1017, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30941, + "col": 14, + "tokLen": 14 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b8cfc0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30938, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30938, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b8cfa0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30938, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 30938, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b8bd78", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30936, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 30936, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b8cf88", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 30941, + "col": 14, + "tokLen": 14 + }, + "end": { + "offset": 30941, + "col": 14, + "tokLen": 14 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b8bd98", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 30941, + "col": 14, + "tokLen": 14 + }, + "end": { + "offset": 30941, + "col": 14, + "tokLen": 14 + } + }, + "type": { + "qualType": "const char[13]" + }, + "valueCategory": "lvalue", + "value": "\"temp_fpgaext\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b8d078", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 30965, + "line": 1018, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 30978, + "col": 22, + "tokLen": 19 + } + }, + "inner": [ + { + "id": "0x7f0da6b8d048", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 30972, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 30978, + "col": 22, + "tokLen": 19 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf4a0", + "kind": "EnumConstantDecl", + "name": "TEMPERATURE_FPGAEXT", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b8e3b8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 31003, + "line": 1019, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 31046, + "line": 1020, + "col": 22, + "tokLen": 16 + } + }, + "inner": [ + { + "id": "0x7f0da6b8e308", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 31007, + "line": 1019, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31012, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b8e2f0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31009, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31009, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b8e2d0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31009, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31009, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b8d0a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31007, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31007, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b8e2b8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31012, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 31012, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b8d0c8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 31012, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 31012, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"temp_10ge\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b8e3a8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 31033, + "line": 1020, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 31046, + "col": 22, + "tokLen": 16 + } + }, + "inner": [ + { + "id": "0x7f0da6b8e378", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31040, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 31046, + "col": 22, + "tokLen": 16 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf4f0", + "kind": "EnumConstantDecl", + "name": "TEMPERATURE_10GE", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b8f6e8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 31068, + "line": 1021, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 31111, + "line": 1022, + "col": 22, + "tokLen": 16 + } + }, + "inner": [ + { + "id": "0x7f0da6b8f638", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 31072, + "line": 1021, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31077, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b8f620", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31074, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31074, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b8f600", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31074, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31074, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b8e3d8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31072, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31072, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b8f5e8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31077, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 31077, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b8e3f8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 31077, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 31077, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"temp_dcdc\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b8f6d8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 31098, + "line": 1022, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 31111, + "col": 22, + "tokLen": 16 + } + }, + "inner": [ + { + "id": "0x7f0da6b8f6a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31105, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 31111, + "col": 22, + "tokLen": 16 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf540", + "kind": "EnumConstantDecl", + "name": "TEMPERATURE_DCDC", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b90a18", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 31133, + "line": 1023, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 31176, + "line": 1024, + "col": 22, + "tokLen": 16 + } + }, + "inner": [ + { + "id": "0x7f0da6b90968", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 31137, + "line": 1023, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31142, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b90950", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31139, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31139, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b90930", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31139, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31139, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b8f708", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31137, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31137, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b90918", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31142, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 31142, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b8f728", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 31142, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 31142, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"temp_sodl\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b90a08", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 31163, + "line": 1024, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 31176, + "col": 22, + "tokLen": 16 + } + }, + "inner": [ + { + "id": "0x7f0da6b909d8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31170, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 31176, + "col": 22, + "tokLen": 16 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf590", + "kind": "EnumConstantDecl", + "name": "TEMPERATURE_SODL", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b91d48", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 31198, + "line": 1025, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 31241, + "line": 1026, + "col": 22, + "tokLen": 16 + } + }, + "inner": [ + { + "id": "0x7f0da6b91c98", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 31202, + "line": 1025, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31207, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b91c80", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31204, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31204, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b91c60", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31204, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31204, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b90a38", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31202, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31202, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b91c48", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31207, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 31207, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b90a58", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 31207, + "col": 14, + "tokLen": 11 + }, + "end": { + "offset": 31207, + "col": 14, + "tokLen": 11 + } + }, + "type": { + "qualType": "const char[10]" + }, + "valueCategory": "lvalue", + "value": "\"temp_sodr\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b91d38", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 31228, + "line": 1026, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 31241, + "col": 22, + "tokLen": 16 + } + }, + "inner": [ + { + "id": "0x7f0da6b91d08", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31235, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 31241, + "col": 22, + "tokLen": 16 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf5e0", + "kind": "EnumConstantDecl", + "name": "TEMPERATURE_SODR", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b93078", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 31263, + "line": 1027, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 31308, + "line": 1028, + "col": 22, + "tokLen": 17 + } + }, + "inner": [ + { + "id": "0x7f0da6b92fc8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 31267, + "line": 1027, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31272, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b92fb0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31269, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31269, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b92f90", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31269, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31269, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b91d68", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31267, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31267, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b92f78", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31272, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 31272, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b91d88", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 31272, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 31272, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char[12]" + }, + "valueCategory": "lvalue", + "value": "\"temp_fpgafl\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b93068", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 31295, + "line": 1028, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 31308, + "col": 22, + "tokLen": 17 + } + }, + "inner": [ + { + "id": "0x7f0da6b93038", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31302, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 31308, + "col": 22, + "tokLen": 17 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf630", + "kind": "EnumConstantDecl", + "name": "TEMPERATURE_FPGA2", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b943a8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 31331, + "line": 1029, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 31376, + "line": 1030, + "col": 22, + "tokLen": 17 + } + }, + "inner": [ + { + "id": "0x7f0da6b942f8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 31335, + "line": 1029, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31340, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b942e0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31337, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31337, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b942c0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31337, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31337, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b93098", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31335, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31335, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b942a8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31340, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 31340, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b930b8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 31340, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 31340, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char[12]" + }, + "valueCategory": "lvalue", + "value": "\"temp_fpgafr\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b94398", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 31363, + "line": 1030, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 31376, + "col": 22, + "tokLen": 17 + } + }, + "inner": [ + { + "id": "0x7f0da6b94368", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31370, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 31376, + "col": 22, + "tokLen": 17 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdbf680", + "kind": "EnumConstantDecl", + "name": "TEMPERATURE_FPGA3", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b956d8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 31399, + "line": 1031, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 31445, + "line": 1032, + "col": 22, + "tokLen": 13 + } + }, + "inner": [ + { + "id": "0x7f0da6b95628", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 31403, + "line": 1031, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31408, + "col": 14, + "tokLen": 14 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b95610", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31405, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31405, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b955f0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31405, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31405, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b943c8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31403, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31403, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b955d8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31408, + "col": 14, + "tokLen": 14 + }, + "end": { + "offset": 31408, + "col": 14, + "tokLen": 14 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b943e8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 31408, + "col": 14, + "tokLen": 14 + }, + "end": { + "offset": 31408, + "col": 14, + "tokLen": 14 + } + }, + "type": { + "qualType": "const char[13]" + }, + "valueCategory": "lvalue", + "value": "\"temp_slowadc\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b956c8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 31432, + "line": 1032, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 31445, + "col": 22, + "tokLen": 13 + } + }, + "inner": [ + { + "id": "0x7f0da6b95698", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31439, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 31445, + "col": 22, + "tokLen": 13 + } + }, + "type": { + "qualType": "slsDetectorDefs::dacIndex" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc00a0", + "kind": "EnumConstantDecl", + "name": "SLOW_ADC_TEMP", + "type": { + "qualType": "slsDetectorDefs::dacIndex" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b95d68", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 31464, + "line": 1033, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 31507, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6b95d50", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 31464, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 31507, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b95d20", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 31470, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 31507, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b95d08", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 31470, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 31507, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6b95ce0", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 31470, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 31507, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6b95cc0", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 31470, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 31507, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b95cb8", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b95c88", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 31470, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 31507, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b95c70", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 31483, + "col": 24, + "tokLen": 20 + }, + "end": { + "offset": 31506, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6b95c58", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31483, + "col": 24, + "tokLen": 20 + }, + "end": { + "offset": 31506, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b95c38", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 31483, + "col": 24, + "tokLen": 20 + }, + "end": { + "offset": 31506, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b95c30", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b95bf8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 31483, + "col": 24, + "tokLen": 20 + }, + "end": { + "offset": 31506, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b95be0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31504, + "col": 45, + "tokLen": 1 + }, + "end": { + "offset": 31504, + "col": 45, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b95bc0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31504, + "col": 45, + "tokLen": 1 + }, + "end": { + "offset": 31504, + "col": 45, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6b95ba8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31483, + "col": 24, + "tokLen": 20 + }, + "end": { + "offset": 31483, + "col": 24, + "tokLen": 20 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b95708", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 31483, + "col": 24, + "tokLen": 20 + }, + "end": { + "offset": 31483, + "col": 24, + "tokLen": 20 + } + }, + "type": { + "qualType": "const char[19]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown dac Index \"" + } + ] + }, + { + "id": "0x7f0da6b95738", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31506, + "col": 47, + "tokLen": 1 + }, + "end": { + "offset": 31506, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6e4ae70", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +}, +{ + "id": "0x7f0da6b961f8", + "kind": "FunctionDecl", + "loc": { + "offset": 31541, + "file": "ToString.cpp", + "line": 1036, + "col": 29, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 31513, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 31901, + "line": 1046, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d3789b8", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs9burstModeEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::burstMode (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::burstMode" + }, + "inner": [ + { + "id": "0x2cdc1230", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::burstMode" + }, + "decl": { + "id": "0x2cdc1188", + "kind": "EnumDecl", + "name": "burstMode" + } + } + ] + }, + { + "id": "0x7f0da6b96120", + "kind": "ParmVarDecl", + "loc": { + "offset": 31569, + "line": 1036, + "col": 57, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 31550, + "col": 38, + "tokLen": 5 + }, + "end": { + "offset": 31569, + "col": 57, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6b9b730", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 31572, + "col": 60, + "tokLen": 1 + }, + "end": { + "offset": 31901, + "line": 1046, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b976f8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 31578, + "line": 1037, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 31626, + "line": 1038, + "col": 22, + "tokLen": 14 + } + }, + "inner": [ + { + "id": "0x7f0da6b97648", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 31582, + "line": 1037, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31587, + "col": 14, + "tokLen": 16 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b97630", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31584, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31584, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b97610", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31584, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31584, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b963e0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31582, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31582, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b96120", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b975f8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31587, + "col": 14, + "tokLen": 16 + }, + "end": { + "offset": 31587, + "col": 14, + "tokLen": 16 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b96400", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 31587, + "col": 14, + "tokLen": 16 + }, + "end": { + "offset": 31587, + "col": 14, + "tokLen": 16 + } + }, + "type": { + "qualType": "const char[15]" + }, + "valueCategory": "lvalue", + "value": "\"burst_internal\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b976e8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 31613, + "line": 1038, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 31626, + "col": 22, + "tokLen": 14 + } + }, + "inner": [ + { + "id": "0x7f0da6b976b8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31620, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 31626, + "col": 22, + "tokLen": 14 + } + }, + "type": { + "qualType": "slsDetectorDefs::burstMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc1250", + "kind": "EnumConstantDecl", + "name": "BURST_INTERNAL", + "type": { + "qualType": "slsDetectorDefs::burstMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b98a28", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 31646, + "line": 1039, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 31694, + "line": 1040, + "col": 22, + "tokLen": 14 + } + }, + "inner": [ + { + "id": "0x7f0da6b98978", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 31650, + "line": 1039, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31655, + "col": 14, + "tokLen": 16 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b98960", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31652, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31652, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b98940", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31652, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31652, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b97718", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31650, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31650, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b96120", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b98928", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31655, + "col": 14, + "tokLen": 16 + }, + "end": { + "offset": 31655, + "col": 14, + "tokLen": 16 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b97738", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 31655, + "col": 14, + "tokLen": 16 + }, + "end": { + "offset": 31655, + "col": 14, + "tokLen": 16 + } + }, + "type": { + "qualType": "const char[15]" + }, + "valueCategory": "lvalue", + "value": "\"burst_external\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b98a18", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 31681, + "line": 1040, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 31694, + "col": 22, + "tokLen": 14 + } + }, + "inner": [ + { + "id": "0x7f0da6b989e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31688, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 31694, + "col": 22, + "tokLen": 14 + } + }, + "type": { + "qualType": "slsDetectorDefs::burstMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc12a0", + "kind": "EnumConstantDecl", + "name": "BURST_EXTERNAL", + "type": { + "qualType": "slsDetectorDefs::burstMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b99d58", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 31714, + "line": 1041, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 31759, + "line": 1042, + "col": 22, + "tokLen": 19 + } + }, + "inner": [ + { + "id": "0x7f0da6b99ca8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 31718, + "line": 1041, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31723, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b99c90", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31720, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31720, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b99c70", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31720, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31720, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b98a48", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31718, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31718, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b96120", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b99c58", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31723, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 31723, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b98a68", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 31723, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 31723, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char[12]" + }, + "valueCategory": "lvalue", + "value": "\"cw_internal\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b99d48", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 31746, + "line": 1042, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 31759, + "col": 22, + "tokLen": 19 + } + }, + "inner": [ + { + "id": "0x7f0da6b99d18", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31753, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 31759, + "col": 22, + "tokLen": 19 + } + }, + "type": { + "qualType": "slsDetectorDefs::burstMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc12f0", + "kind": "EnumConstantDecl", + "name": "CONTINUOUS_INTERNAL", + "type": { + "qualType": "slsDetectorDefs::burstMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b9b088", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 31784, + "line": 1043, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 31829, + "line": 1044, + "col": 22, + "tokLen": 19 + } + }, + "inner": [ + { + "id": "0x7f0da6b9afd8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 31788, + "line": 1043, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31793, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b9afc0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31790, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31790, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b9afa0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31790, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31790, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b99d78", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31788, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31788, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b96120", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b9af88", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31793, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 31793, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b99d98", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 31793, + "col": 14, + "tokLen": 13 + }, + "end": { + "offset": 31793, + "col": 14, + "tokLen": 13 + } + }, + "type": { + "qualType": "const char[12]" + }, + "valueCategory": "lvalue", + "value": "\"cw_external\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b9b078", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 31816, + "line": 1044, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 31829, + "col": 22, + "tokLen": 19 + } + }, + "inner": [ + { + "id": "0x7f0da6b9b048", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31823, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 31829, + "col": 22, + "tokLen": 19 + } + }, + "type": { + "qualType": "slsDetectorDefs::burstMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc1340", + "kind": "EnumConstantDecl", + "name": "CONTINUOUS_EXTERNAL", + "type": { + "qualType": "slsDetectorDefs::burstMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b9b718", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 31854, + "line": 1045, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 31898, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6b9b700", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 31854, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 31898, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b9b6d0", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 31860, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 31898, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b9b6b8", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 31860, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 31898, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6b9b690", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 31860, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 31898, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6b9b670", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 31860, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 31898, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b9b668", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b9b638", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 31860, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 31898, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b9b620", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 31873, + "col": 24, + "tokLen": 21 + }, + "end": { + "offset": 31897, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6b9b608", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31873, + "col": 24, + "tokLen": 21 + }, + "end": { + "offset": 31897, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b9b5e8", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 31873, + "col": 24, + "tokLen": 21 + }, + "end": { + "offset": 31897, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b9b5e0", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b9b5a8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 31873, + "col": 24, + "tokLen": 21 + }, + "end": { + "offset": 31897, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b9b590", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31895, + "col": 46, + "tokLen": 1 + }, + "end": { + "offset": 31895, + "col": 46, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b9b570", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31895, + "col": 46, + "tokLen": 1 + }, + "end": { + "offset": 31895, + "col": 46, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6b9b558", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31873, + "col": 24, + "tokLen": 21 + }, + "end": { + "offset": 31873, + "col": 24, + "tokLen": 21 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b9b0b8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 31873, + "col": 24, + "tokLen": 21 + }, + "end": { + "offset": 31873, + "col": 24, + "tokLen": 21 + } + }, + "type": { + "qualType": "const char[20]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown burst mode \"" + } + ] + }, + { + "id": "0x7f0da6b9b0e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31897, + "col": 48, + "tokLen": 1 + }, + "end": { + "offset": 31897, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b96120", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +}, +{ + "id": "0x7f0da6b9b8e8", + "kind": "FunctionDecl", + "loc": { + "offset": 31939, + "file": "ToString.cpp", + "line": 1048, + "col": 36, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 31904, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 32157, + "line": 1054, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d378f08", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs16timingSourceTypeEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::timingSourceType (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::timingSourceType" + }, + "inner": [ + { + "id": "0x2cdc14b0", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::timingSourceType" + }, + "decl": { + "id": "0x2cdc1408", + "kind": "EnumDecl", + "name": "timingSourceType" + } + } + ] + }, + { + "id": "0x7f0da6b9b810", + "kind": "ParmVarDecl", + "loc": { + "offset": 31967, + "line": 1048, + "col": 64, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 31948, + "col": 45, + "tokLen": 5 + }, + "end": { + "offset": 31967, + "col": 64, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6b5d808", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 31970, + "col": 67, + "tokLen": 1 + }, + "end": { + "offset": 32157, + "line": 1054, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b5bdf8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 31976, + "line": 1049, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 32018, + "line": 1050, + "col": 22, + "tokLen": 15 + } + }, + "inner": [ + { + "id": "0x7f0da6b5bd48", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 31980, + "line": 1049, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31985, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b5bd30", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31982, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31982, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b5bd10", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31982, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 31982, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b9bad0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 31980, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 31980, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b9b810", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b5bcf8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 31985, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 31985, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b9baf0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 31985, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 31985, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"internal\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b5bde8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 32005, + "line": 1050, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 32018, + "col": 22, + "tokLen": 15 + } + }, + "inner": [ + { + "id": "0x7f0da6b5bdb8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32012, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 32018, + "col": 22, + "tokLen": 15 + } + }, + "type": { + "qualType": "slsDetectorDefs::timingSourceType" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc14d0", + "kind": "EnumConstantDecl", + "name": "TIMING_INTERNAL", + "type": { + "qualType": "slsDetectorDefs::timingSourceType" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b5d128", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 32039, + "line": 1051, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 32081, + "line": 1052, + "col": 22, + "tokLen": 15 + } + }, + "inner": [ + { + "id": "0x7f0da6b5d078", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 32043, + "line": 1051, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32048, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b5d060", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32045, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32045, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b5d040", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32045, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32045, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b5be18", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32043, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32043, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b9b810", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b5d028", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32048, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 32048, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b5be38", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 32048, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 32048, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"external\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b5d118", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 32068, + "line": 1052, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 32081, + "col": 22, + "tokLen": 15 + } + }, + "inner": [ + { + "id": "0x7f0da6b5d0e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32075, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 32081, + "col": 22, + "tokLen": 15 + } + }, + "type": { + "qualType": "slsDetectorDefs::timingSourceType" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc1520", + "kind": "EnumConstantDecl", + "name": "TIMING_EXTERNAL", + "type": { + "qualType": "slsDetectorDefs::timingSourceType" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b5d7f0", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 32102, + "line": 1053, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 32154, + "col": 57, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6b5d7d8", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 32102, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 32154, + "col": 57, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b5d7a8", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 32108, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 32154, + "col": 57, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b5d790", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 32108, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 32154, + "col": 57, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6b5d768", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 32108, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 32154, + "col": 57, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6b5d748", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 32108, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 32154, + "col": 57, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b5d740", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b5d710", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 32108, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 32154, + "col": 57, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b5d6f8", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 32121, + "col": 24, + "tokLen": 29 + }, + "end": { + "offset": 32153, + "col": 56, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6b5d6e0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32121, + "col": 24, + "tokLen": 29 + }, + "end": { + "offset": 32153, + "col": 56, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b5d6c0", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 32121, + "col": 24, + "tokLen": 29 + }, + "end": { + "offset": 32153, + "col": 56, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b5d6b8", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b5d680", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 32121, + "col": 24, + "tokLen": 29 + }, + "end": { + "offset": 32153, + "col": 56, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b5d668", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32151, + "col": 54, + "tokLen": 1 + }, + "end": { + "offset": 32151, + "col": 54, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b5d648", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32151, + "col": 54, + "tokLen": 1 + }, + "end": { + "offset": 32151, + "col": 54, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6b5d630", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32121, + "col": 24, + "tokLen": 29 + }, + "end": { + "offset": 32121, + "col": 24, + "tokLen": 29 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b5d158", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 32121, + "col": 24, + "tokLen": 29 + }, + "end": { + "offset": 32121, + "col": 24, + "tokLen": 29 + } + }, + "type": { + "qualType": "const char[28]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown timing source type \"" + } + ] + }, + { + "id": "0x7f0da6b5d190", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32153, + "col": 56, + "tokLen": 1 + }, + "end": { + "offset": 32153, + "col": 56, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b9b810", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +}, +{ + "id": "0x7f0da6b5d9a8", + "kind": "FunctionDecl", + "loc": { + "offset": 32190, + "file": "ToString.cpp", + "line": 1056, + "col": 31, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 32160, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 32600, + "line": 1070, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d379458", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs11M3_GainCapsEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::M3_GainCaps (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::M3_GainCaps" + }, + "inner": [ + { + "id": "0x2cdc1610", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::M3_GainCaps" + }, + "decl": { + "id": "0x2cdc1570", + "kind": "EnumDecl", + "name": "M3_GainCaps" + } + } + ] + }, + { + "id": "0x7f0da6b5d8d8", + "kind": "ParmVarDecl", + "loc": { + "offset": 32218, + "line": 1056, + "col": 59, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 32199, + "col": 40, + "tokLen": 5 + }, + "end": { + "offset": 32218, + "col": 59, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6b65530", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 32221, + "col": 62, + "tokLen": 1 + }, + "end": { + "offset": 32600, + "line": 1070, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b5ee98", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 32227, + "line": 1057, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 32267, + "line": 1058, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6b5ede8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 32231, + "line": 1057, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32236, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b5edd0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32233, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32233, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b5edb0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32233, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32233, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b5db90", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32231, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32231, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b5d8d8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b5ed98", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32236, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 32236, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b5dbb0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 32236, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 32236, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"C10pre\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b5ee88", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 32254, + "line": 1058, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 32267, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6b5ee58", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32261, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 32267, + "col": 22, + "tokLen": 9 + } + }, + "type": { + "qualType": "slsDetectorDefs::M3_GainCaps" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc16b0", + "kind": "EnumConstantDecl", + "name": "M3_C10pre", + "type": { + "qualType": "slsDetectorDefs::M3_GainCaps" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b601c8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 32282, + "line": 1059, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 32321, + "line": 1060, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b60118", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 32286, + "line": 1059, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32291, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b60100", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32288, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32288, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b600e0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32288, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32288, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b5eeb8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32286, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32286, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b5d8d8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b600c8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32291, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 32291, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b5eed8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 32291, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 32291, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"C15sh\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b601b8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 32308, + "line": 1060, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 32321, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b60188", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32315, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 32321, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::M3_GainCaps" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc1780", + "kind": "EnumConstantDecl", + "name": "M3_C15sh", + "type": { + "qualType": "slsDetectorDefs::M3_GainCaps" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b614f8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 32335, + "line": 1061, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 32374, + "line": 1062, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b61448", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 32339, + "line": 1061, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32344, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b61430", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32341, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32341, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b61410", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32341, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32341, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b601e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32339, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32339, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b5d8d8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b613f8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32344, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 32344, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b60208", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 32344, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 32344, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"C30sh\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b614e8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 32361, + "line": 1062, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 32374, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b614b8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32368, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 32374, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::M3_GainCaps" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc1850", + "kind": "EnumConstantDecl", + "name": "M3_C30sh", + "type": { + "qualType": "slsDetectorDefs::M3_GainCaps" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b62828", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 32388, + "line": 1063, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 32427, + "line": 1064, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b62778", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 32392, + "line": 1063, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32397, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b62760", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32394, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32394, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b62740", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32394, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32394, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b61518", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32392, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32392, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b5d8d8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b62728", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32397, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 32397, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b61538", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 32397, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 32397, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"C50sh\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b62818", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 32414, + "line": 1064, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 32427, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b627e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32421, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 32427, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::M3_GainCaps" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc1920", + "kind": "EnumConstantDecl", + "name": "M3_C50sh", + "type": { + "qualType": "slsDetectorDefs::M3_GainCaps" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b63b58", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 32441, + "line": 1065, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 32483, + "line": 1066, + "col": 22, + "tokLen": 11 + } + }, + "inner": [ + { + "id": "0x7f0da6b63aa8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 32445, + "line": 1065, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32450, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b63a90", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32447, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32447, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b63a70", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32447, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32447, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b62848", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32445, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32445, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b5d8d8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b63a58", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32450, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 32450, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b62868", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 32450, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 32450, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"C225ACsh\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b63b48", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 32470, + "line": 1066, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 32483, + "col": 22, + "tokLen": 11 + } + }, + "inner": [ + { + "id": "0x7f0da6b63b18", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32477, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 32483, + "col": 22, + "tokLen": 11 + } + }, + "type": { + "qualType": "slsDetectorDefs::M3_GainCaps" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc19f0", + "kind": "EnumConstantDecl", + "name": "M3_C225ACsh", + "type": { + "qualType": "slsDetectorDefs::M3_GainCaps" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b64e88", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 32500, + "line": 1067, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 32540, + "line": 1068, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6b64dd8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 32504, + "line": 1067, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32509, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b64dc0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32506, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32506, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b64da0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32506, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32506, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b63b78", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32504, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32504, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b5d8d8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b64d88", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32509, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 32509, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b63b98", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 32509, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 32509, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"C15pre\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b64e78", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 32527, + "line": 1068, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 32540, + "col": 22, + "tokLen": 9 + } + }, + "inner": [ + { + "id": "0x7f0da6b64e48", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32534, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 32540, + "col": 22, + "tokLen": 9 + } + }, + "type": { + "qualType": "slsDetectorDefs::M3_GainCaps" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc1ac0", + "kind": "EnumConstantDecl", + "name": "M3_C15pre", + "type": { + "qualType": "slsDetectorDefs::M3_GainCaps" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b65518", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 32555, + "line": 1069, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 32597, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6b65500", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 32555, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 32597, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b654d0", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 32561, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 32597, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b654b8", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 32561, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 32597, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6b65490", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 32561, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 32597, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6b65470", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 32561, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 32597, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b65468", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b65438", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 32561, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 32597, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b65420", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 32574, + "col": 24, + "tokLen": 19 + }, + "end": { + "offset": 32596, + "col": 46, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6b65408", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32574, + "col": 24, + "tokLen": 19 + }, + "end": { + "offset": 32596, + "col": 46, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b653e8", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 32574, + "col": 24, + "tokLen": 19 + }, + "end": { + "offset": 32596, + "col": 46, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b653e0", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b653a8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 32574, + "col": 24, + "tokLen": 19 + }, + "end": { + "offset": 32596, + "col": 46, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b65390", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32594, + "col": 44, + "tokLen": 1 + }, + "end": { + "offset": 32594, + "col": 44, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b65370", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32594, + "col": 44, + "tokLen": 1 + }, + "end": { + "offset": 32594, + "col": 44, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6b65358", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32574, + "col": 24, + "tokLen": 19 + }, + "end": { + "offset": 32574, + "col": 24, + "tokLen": 19 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b64eb8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 32574, + "col": 24, + "tokLen": 19 + }, + "end": { + "offset": 32574, + "col": 24, + "tokLen": 19 + } + }, + "type": { + "qualType": "const char[18]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown gain cap \"" + } + ] + }, + { + "id": "0x7f0da6b64ee8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32596, + "col": 46, + "tokLen": 1 + }, + "end": { + "offset": 32596, + "col": 46, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b5d8d8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +}, +{ + "id": "0x7f0da6b656f8", + "kind": "FunctionDecl", + "loc": { + "offset": 32634, + "file": "ToString.cpp", + "line": 1072, + "col": 32, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 32603, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 32917, + "line": 1082, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d3799a8", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs12portPositionEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::portPosition (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::portPosition" + }, + "inner": [ + { + "id": "0x2cdc1c40", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::portPosition" + }, + "decl": { + "id": "0x2cdc1ba0", + "kind": "EnumDecl", + "name": "portPosition" + } + } + ] + }, + { + "id": "0x7f0da6b65620", + "kind": "ParmVarDecl", + "loc": { + "offset": 32662, + "line": 1072, + "col": 60, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 32643, + "col": 41, + "tokLen": 5 + }, + "end": { + "offset": 32662, + "col": 60, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6b6ac20", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 32665, + "col": 63, + "tokLen": 1 + }, + "end": { + "offset": 32917, + "line": 1082, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b66be8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 32671, + "line": 1073, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 32709, + "line": 1074, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6b66b38", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 32675, + "line": 1073, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32680, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b66b20", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32677, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32677, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b66b00", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32677, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32677, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b658e0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32675, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32675, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b65620", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b66ae8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32680, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 32680, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b65900", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 32680, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 32680, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char[5]" + }, + "valueCategory": "lvalue", + "value": "\"left\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b66bd8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 32696, + "line": 1074, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 32709, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6b66ba8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32703, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 32709, + "col": 22, + "tokLen": 4 + } + }, + "type": { + "qualType": "slsDetectorDefs::portPosition" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc1c60", + "kind": "EnumConstantDecl", + "name": "LEFT", + "type": { + "qualType": "slsDetectorDefs::portPosition" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b67f18", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 32719, + "line": 1075, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 32758, + "line": 1076, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6b67e68", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 32723, + "line": 1075, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32728, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b67e50", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32725, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32725, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b67e30", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32725, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32725, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b66c08", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32723, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32723, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b65620", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b67e18", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32728, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 32728, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b66c28", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 32728, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 32728, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"right\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b67f08", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 32745, + "line": 1076, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 32758, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6b67ed8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32752, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 32758, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::portPosition" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc1cb0", + "kind": "EnumConstantDecl", + "name": "RIGHT", + "type": { + "qualType": "slsDetectorDefs::portPosition" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b69248", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 32769, + "line": 1077, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 32806, + "line": 1078, + "col": 22, + "tokLen": 3 + } + }, + "inner": [ + { + "id": "0x7f0da6b69198", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 32773, + "line": 1077, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32778, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b69180", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32775, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32775, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b69160", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32775, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32775, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b67f38", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32773, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32773, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b65620", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b69148", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32778, + "col": 14, + "tokLen": 5 + }, + "end": { + "offset": 32778, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b67f58", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 32778, + "col": 14, + "tokLen": 5 + }, + "end": { + "offset": 32778, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "const char[4]" + }, + "valueCategory": "lvalue", + "value": "\"top\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b69238", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 32793, + "line": 1078, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 32806, + "col": 22, + "tokLen": 3 + } + }, + "inner": [ + { + "id": "0x7f0da6b69208", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32800, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 32806, + "col": 22, + "tokLen": 3 + } + }, + "type": { + "qualType": "slsDetectorDefs::portPosition" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc1d00", + "kind": "EnumConstantDecl", + "name": "TOP", + "type": { + "qualType": "slsDetectorDefs::portPosition" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b6a578", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 32815, + "line": 1079, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 32855, + "line": 1080, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6b6a4c8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 32819, + "line": 1079, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32824, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b6a4b0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32821, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32821, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b6a490", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32821, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 32821, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b69268", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32819, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 32819, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b65620", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b6a478", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32824, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 32824, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b69288", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 32824, + "col": 14, + "tokLen": 8 + }, + "end": { + "offset": 32824, + "col": 14, + "tokLen": 8 + } + }, + "type": { + "qualType": "const char[7]" + }, + "valueCategory": "lvalue", + "value": "\"bottom\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b6a568", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 32842, + "line": 1080, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 32855, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6b6a538", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32849, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 32855, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::portPosition" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc1d50", + "kind": "EnumConstantDecl", + "name": "BOTTOM", + "type": { + "qualType": "slsDetectorDefs::portPosition" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b6ac08", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 32867, + "line": 1081, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 32914, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6b6abf0", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 32867, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 32914, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b6abc0", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 32873, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 32914, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b6aba8", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 32873, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 32914, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6b6ab80", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 32873, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 32914, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6b6ab60", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 32873, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 32914, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b6ab58", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b6ab28", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 32873, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 32914, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b6ab10", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 32886, + "col": 24, + "tokLen": 24 + }, + "end": { + "offset": 32913, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6b6aaf8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32886, + "col": 24, + "tokLen": 24 + }, + "end": { + "offset": 32913, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b6aad8", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 32886, + "col": 24, + "tokLen": 24 + }, + "end": { + "offset": 32913, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b6aad0", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b6aa98", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 32886, + "col": 24, + "tokLen": 24 + }, + "end": { + "offset": 32913, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b6aa80", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32911, + "col": 49, + "tokLen": 1 + }, + "end": { + "offset": 32911, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b6aa60", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32911, + "col": 49, + "tokLen": 1 + }, + "end": { + "offset": 32911, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6b6aa48", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 32886, + "col": 24, + "tokLen": 24 + }, + "end": { + "offset": 32886, + "col": 24, + "tokLen": 24 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b6a5a8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 32886, + "col": 24, + "tokLen": 24 + }, + "end": { + "offset": 32886, + "col": 24, + "tokLen": 24 + } + }, + "type": { + "qualType": "const char[23]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown port position \"" + } + ] + }, + { + "id": "0x7f0da6b6a5d8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 32913, + "col": 51, + "tokLen": 1 + }, + "end": { + "offset": 32913, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b65620", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +}, +{ + "id": "0x7f0da6b6add8", + "kind": "FunctionDecl", + "loc": { + "offset": 32957, + "file": "ToString.cpp", + "line": 1084, + "col": 38, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 32920, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 33380, + "line": 1095, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d379ef8", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs18streamingInterfaceEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::streamingInterface (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::streamingInterface" + }, + "inner": [ + { + "id": "0x2cdc1fd0", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::streamingInterface" + }, + "decl": { + "id": "0x2cdc1f30", + "kind": "EnumDecl", + "name": "streamingInterface" + } + } + ] + }, + { + "id": "0x7f0da6b6ad00", + "kind": "ParmVarDecl", + "loc": { + "offset": 32985, + "line": 1084, + "col": 66, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 32966, + "col": 47, + "tokLen": 5 + }, + "end": { + "offset": 32985, + "col": 66, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6b6f708", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 32988, + "col": 69, + "tokLen": 1 + }, + "end": { + "offset": 33380, + "line": 1095, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b6b0c0", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 32994, + "line": 1085, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 33012, + "col": 23, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b6b008", + "kind": "VarDecl", + "loc": { + "offset": 33006, + "col": 17, + "tokLen": 2 + }, + "range": { + "begin": { + "offset": 32994, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 33011, + "col": 22, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "rs", + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "init": "c", + "inner": [ + { + "id": "0x7f0da6b6b090", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 33011, + "col": 22, + "tokLen": 1 + }, + "end": { + "offset": 33011, + "col": 22, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const basic_string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b6b070", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33011, + "col": 22, + "tokLen": 1 + }, + "end": { + "offset": 33011, + "col": 22, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b6ad00", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6b6b610", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 33018, + "line": 1086, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 33085, + "line": 1087, + "col": 30, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b6b320", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 33022, + "line": 1086, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33050, + "col": 37, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "!=", + "inner": [ + { + "id": "0x7f0da6b6b1b0", + "kind": "CXXMemberCallExpr", + "range": { + "begin": { + "offset": 33022, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33032, + "col": 19, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b6b180", + "kind": "MemberExpr", + "range": { + "begin": { + "offset": 33022, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33024, + "col": 11, + "tokLen": 4 + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "name": "find", + "isArrow": false, + "referencedMemberDecl": "0x2c8caab0", + "inner": [ + { + "id": "0x7f0da6b6b0d8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33022, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33022, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b6ad00", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + }, + { + "id": "0x7f0da6b6b168", + "kind": "CharacterLiteral", + "range": { + "begin": { + "offset": 33029, + "col": 16, + "tokLen": 3 + }, + "end": { + "offset": 33029, + "col": 16, + "tokLen": 3 + } + }, + "type": { + "qualType": "char" + }, + "valueCategory": "prvalue", + "value": 44 + }, + { + "id": "0x7f0da6b6b1f8", + "kind": "CXXDefaultArgExpr", + "range": { + "begin": {}, + "end": {} + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue" + } + ] + }, + { + "id": "0x7f0da6b6b308", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33037, + "col": 24, + "tokLen": 3 + }, + "end": { + "offset": 33050, + "col": 37, + "tokLen": 4 + } + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "inner": [ + { + "id": "0x7f0da6b6b2d8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33037, + "col": 24, + "tokLen": 3 + }, + "end": { + "offset": 33050, + "col": 37, + "tokLen": 4 + } + }, + "type": { + "desugaredQualType": "const unsigned long", + "qualType": "const typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d0eda20", + "kind": "VarDecl", + "name": "npos", + "type": { + "desugaredQualType": "const unsigned long", + "qualType": "const typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + } + }, + "nonOdrUseReason": "constant" + } + ] + } + ] + }, + { + "id": "0x7f0da6b6b568", + "kind": "CXXMemberCallExpr", + "range": { + "begin": { + "offset": 33064, + "line": 1087, + "col": 9, + "tokLen": 2 + }, + "end": { + "offset": 33085, + "col": 30, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string" + }, + "valueCategory": "lvalue", + "inner": [ + { + "id": "0x7f0da6b6b538", + "kind": "MemberExpr", + "range": { + "begin": { + "offset": 33064, + "col": 9, + "tokLen": 2 + }, + "end": { + "offset": 33067, + "col": 12, + "tokLen": 5 + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "name": "erase", + "isArrow": false, + "referencedMemberDecl": "0x2c8c3390", + "inner": [ + { + "id": "0x7f0da6b6b340", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33064, + "col": 9, + "tokLen": 2 + }, + "end": { + "offset": 33064, + "col": 9, + "tokLen": 2 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b6b008", + "kind": "VarDecl", + "name": "rs", + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + } + } + } + ] + }, + { + "id": "0x7f0da6b6b4a0", + "kind": "CXXMemberCallExpr", + "range": { + "begin": { + "offset": 33073, + "col": 18, + "tokLen": 2 + }, + "end": { + "offset": 33084, + "col": 29, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b6b470", + "kind": "MemberExpr", + "range": { + "begin": { + "offset": 33073, + "col": 18, + "tokLen": 2 + }, + "end": { + "offset": 33076, + "col": 21, + "tokLen": 4 + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "name": "find", + "isArrow": false, + "referencedMemberDecl": "0x2c8caab0", + "inner": [ + { + "id": "0x7f0da6b6b4d0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33073, + "col": 18, + "tokLen": 2 + }, + "end": { + "offset": 33073, + "col": 18, + "tokLen": 2 + } + }, + "type": { + "qualType": "const std::basic_string" + }, + "valueCategory": "lvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b6b3c8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33073, + "col": 18, + "tokLen": 2 + }, + "end": { + "offset": 33073, + "col": 18, + "tokLen": 2 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b6b008", + "kind": "VarDecl", + "name": "rs", + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b6b458", + "kind": "CharacterLiteral", + "range": { + "begin": { + "offset": 33081, + "col": 26, + "tokLen": 3 + }, + "end": { + "offset": 33081, + "col": 26, + "tokLen": 3 + } + }, + "type": { + "qualType": "char" + }, + "valueCategory": "prvalue", + "value": 44 + }, + { + "id": "0x7f0da6b6b4e8", + "kind": "CXXDefaultArgExpr", + "range": { + "begin": {}, + "end": {} + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue" + } + ] + }, + { + "id": "0x7f0da6b6b5f0", + "kind": "CXXDefaultArgExpr", + "range": { + "begin": {}, + "end": {} + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue" + } + ] + } + ] + }, + { + "id": "0x7f0da6b6c968", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 33092, + "line": 1088, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 33151, + "line": 1089, + "col": 42, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6b6c8a0", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 33096, + "line": 1088, + "col": 9, + "tokLen": 2 + }, + "end": { + "offset": 33102, + "col": 15, + "tokLen": 6 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b6c888", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33099, + "col": 12, + "tokLen": 2 + }, + "end": { + "offset": 33099, + "col": 12, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b6c868", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33099, + "col": 12, + "tokLen": 2 + }, + "end": { + "offset": 33099, + "col": 12, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b6c838", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33096, + "col": 9, + "tokLen": 2 + }, + "end": { + "offset": 33096, + "col": 9, + "tokLen": 2 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b6b630", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33096, + "col": 9, + "tokLen": 2 + }, + "end": { + "offset": 33096, + "col": 9, + "tokLen": 2 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b6b008", + "kind": "VarDecl", + "name": "rs", + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + } + } + } + ] + }, + { + "id": "0x7f0da6b6c850", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33102, + "col": 15, + "tokLen": 6 + }, + "end": { + "offset": 33102, + "col": 15, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b6b650", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 33102, + "col": 15, + "tokLen": 6 + }, + "end": { + "offset": 33102, + "col": 15, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char[5]" + }, + "valueCategory": "lvalue", + "value": "\"none\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b6c958", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 33118, + "line": 1089, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 33151, + "col": 42, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6b6c928", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33125, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 33151, + "col": 42, + "tokLen": 4 + } + }, + "type": { + "qualType": "slsDetectorDefs::streamingInterface" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc2030", + "kind": "EnumConstantDecl", + "name": "NONE", + "type": { + "qualType": "slsDetectorDefs::streamingInterface" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b6dcc8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 33161, + "line": 1090, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 33219, + "line": 1091, + "col": 42, + "tokLen": 16 + } + }, + "inner": [ + { + "id": "0x7f0da6b6dc00", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 33165, + "line": 1090, + "col": 9, + "tokLen": 2 + }, + "end": { + "offset": 33171, + "col": 15, + "tokLen": 5 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b6dbe8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33168, + "col": 12, + "tokLen": 2 + }, + "end": { + "offset": 33168, + "col": 12, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b6dbc8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33168, + "col": 12, + "tokLen": 2 + }, + "end": { + "offset": 33168, + "col": 12, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b6db98", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33165, + "col": 9, + "tokLen": 2 + }, + "end": { + "offset": 33165, + "col": 9, + "tokLen": 2 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b6c988", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33165, + "col": 9, + "tokLen": 2 + }, + "end": { + "offset": 33165, + "col": 9, + "tokLen": 2 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b6b008", + "kind": "VarDecl", + "name": "rs", + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + } + } + } + ] + }, + { + "id": "0x7f0da6b6dbb0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33171, + "col": 15, + "tokLen": 5 + }, + "end": { + "offset": 33171, + "col": 15, + "tokLen": 5 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b6c9a8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 33171, + "col": 15, + "tokLen": 5 + }, + "end": { + "offset": 33171, + "col": 15, + "tokLen": 5 + } + }, + "type": { + "qualType": "const char[4]" + }, + "valueCategory": "lvalue", + "value": "\"lll\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b6dcb8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 33186, + "line": 1091, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 33219, + "col": 42, + "tokLen": 16 + } + }, + "inner": [ + { + "id": "0x7f0da6b6dc88", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33193, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 33219, + "col": 42, + "tokLen": 16 + } + }, + "type": { + "qualType": "slsDetectorDefs::streamingInterface" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc2100", + "kind": "EnumConstantDecl", + "name": "LOW_LATENCY_LINK", + "type": { + "qualType": "slsDetectorDefs::streamingInterface" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b6f028", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 33241, + "line": 1092, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 33301, + "line": 1093, + "col": 42, + "tokLen": 13 + } + }, + "inner": [ + { + "id": "0x7f0da6b6ef60", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 33245, + "line": 1092, + "col": 9, + "tokLen": 2 + }, + "end": { + "offset": 33251, + "col": 15, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b6ef48", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33248, + "col": 12, + "tokLen": 2 + }, + "end": { + "offset": 33248, + "col": 12, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b6ef28", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33248, + "col": 12, + "tokLen": 2 + }, + "end": { + "offset": 33248, + "col": 12, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b6eef8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33245, + "col": 9, + "tokLen": 2 + }, + "end": { + "offset": 33245, + "col": 9, + "tokLen": 2 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b6dce8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33245, + "col": 9, + "tokLen": 2 + }, + "end": { + "offset": 33245, + "col": 9, + "tokLen": 2 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b6b008", + "kind": "VarDecl", + "name": "rs", + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "std::string", + "typeAliasDeclId": "0x2c6c0c90" + } + } + } + ] + }, + { + "id": "0x7f0da6b6ef10", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33251, + "col": 15, + "tokLen": 7 + }, + "end": { + "offset": 33251, + "col": 15, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b6dd08", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 33251, + "col": 15, + "tokLen": 7 + }, + "end": { + "offset": 33251, + "col": 15, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"10gbe\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b6f018", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 33268, + "line": 1093, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 33301, + "col": 42, + "tokLen": 13 + } + }, + "inner": [ + { + "id": "0x7f0da6b6efe8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33275, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 33301, + "col": 42, + "tokLen": 13 + } + }, + "type": { + "qualType": "slsDetectorDefs::streamingInterface" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc21d0", + "kind": "EnumConstantDecl", + "name": "ETHERNET_10GB", + "type": { + "qualType": "slsDetectorDefs::streamingInterface" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b6f6f0", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 33320, + "line": 1094, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 33377, + "col": 62, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6b6f6d8", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 33320, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 33377, + "col": 62, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b6f6a8", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 33326, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 33377, + "col": 62, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b6f690", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 33326, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 33377, + "col": 62, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6b6f668", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 33326, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 33377, + "col": 62, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6b6f648", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 33326, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 33377, + "col": 62, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b6f640", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b6f610", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 33326, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 33377, + "col": 62, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b6f5f8", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 33339, + "col": 24, + "tokLen": 34 + }, + "end": { + "offset": 33376, + "col": 61, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6b6f5e0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33339, + "col": 24, + "tokLen": 34 + }, + "end": { + "offset": 33376, + "col": 61, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b6f5c0", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 33339, + "col": 24, + "tokLen": 34 + }, + "end": { + "offset": 33376, + "col": 61, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b6f5b8", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b6f580", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 33339, + "col": 24, + "tokLen": 34 + }, + "end": { + "offset": 33376, + "col": 61, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b6f568", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33374, + "col": 59, + "tokLen": 1 + }, + "end": { + "offset": 33374, + "col": 59, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b6f548", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33374, + "col": 59, + "tokLen": 1 + }, + "end": { + "offset": 33374, + "col": 59, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6b6f530", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33339, + "col": 24, + "tokLen": 34 + }, + "end": { + "offset": 33339, + "col": 24, + "tokLen": 34 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b6f058", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 33339, + "col": 24, + "tokLen": 34 + }, + "end": { + "offset": 33339, + "col": 24, + "tokLen": 34 + } + }, + "type": { + "qualType": "const char[33]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown streamingInterface type \"" + } + ] + }, + { + "id": "0x7f0da6b6f090", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33376, + "col": 61, + "tokLen": 1 + }, + "end": { + "offset": 33376, + "col": 61, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b6ad00", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +}, +{ + "id": "0x7f0da6b6f8c8", + "kind": "FunctionDecl", + "loc": { + "offset": 33415, + "file": "ToString.cpp", + "line": 1097, + "col": 33, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 33383, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 33605, + "line": 1103, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d37a448", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs13vetoAlgorithmEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::vetoAlgorithm (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::vetoAlgorithm" + }, + "inner": [ + { + "id": "0x2cdc2390", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::vetoAlgorithm" + }, + "decl": { + "id": "0x2cdc22f0", + "kind": "EnumDecl", + "name": "vetoAlgorithm" + } + } + ] + }, + { + "id": "0x7f0da6b6f7f0", + "kind": "ParmVarDecl", + "loc": { + "offset": 33443, + "line": 1097, + "col": 61, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 33424, + "col": 42, + "tokLen": 5 + }, + "end": { + "offset": 33443, + "col": 61, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6b72790", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 33446, + "col": 64, + "tokLen": 1 + }, + "end": { + "offset": 33605, + "line": 1103, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b70db8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 33452, + "line": 1098, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 33490, + "line": 1099, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b70d08", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 33456, + "line": 1098, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33461, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b70cf0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33458, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 33458, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b70cd0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33458, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 33458, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b6fab0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33456, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33456, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b6f7f0", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b70cb8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33461, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 33461, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b6fad0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 33461, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 33461, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char[5]" + }, + "valueCategory": "lvalue", + "value": "\"hits\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b70da8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 33477, + "line": 1099, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 33490, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b70d78", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33484, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 33490, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::vetoAlgorithm" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc23b0", + "kind": "EnumConstantDecl", + "name": "ALG_HITS", + "type": { + "qualType": "slsDetectorDefs::vetoAlgorithm" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b720e8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 33504, + "line": 1100, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 33541, + "line": 1101, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6b72038", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 33508, + "line": 1100, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33513, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b72020", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33510, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 33510, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b72000", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33510, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 33510, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b70dd8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33508, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33508, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b6f7f0", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b71fe8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33513, + "col": 14, + "tokLen": 5 + }, + "end": { + "offset": 33513, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b70df8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 33513, + "col": 14, + "tokLen": 5 + }, + "end": { + "offset": 33513, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "const char[4]" + }, + "valueCategory": "lvalue", + "value": "\"raw\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b720d8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 33528, + "line": 1101, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 33541, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6b720a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33535, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 33541, + "col": 22, + "tokLen": 7 + } + }, + "type": { + "qualType": "slsDetectorDefs::vetoAlgorithm" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc2400", + "kind": "EnumConstantDecl", + "name": "ALG_RAW", + "type": { + "qualType": "slsDetectorDefs::vetoAlgorithm" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b72778", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 33554, + "line": 1102, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 33602, + "col": 53, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6b72760", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 33554, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 33602, + "col": 53, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b72730", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 33560, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 33602, + "col": 53, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b72718", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 33560, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 33602, + "col": 53, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6b726f0", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 33560, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 33602, + "col": 53, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6b726d0", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 33560, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 33602, + "col": 53, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b726c8", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b72698", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 33560, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 33602, + "col": 53, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b72680", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 33573, + "col": 24, + "tokLen": 25 + }, + "end": { + "offset": 33601, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6b72668", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33573, + "col": 24, + "tokLen": 25 + }, + "end": { + "offset": 33601, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b72648", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 33573, + "col": 24, + "tokLen": 25 + }, + "end": { + "offset": 33601, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b72640", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b72608", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 33573, + "col": 24, + "tokLen": 25 + }, + "end": { + "offset": 33601, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b725f0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33599, + "col": 50, + "tokLen": 1 + }, + "end": { + "offset": 33599, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b725d0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33599, + "col": 50, + "tokLen": 1 + }, + "end": { + "offset": 33599, + "col": 50, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6b725b8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33573, + "col": 24, + "tokLen": 25 + }, + "end": { + "offset": 33573, + "col": 24, + "tokLen": 25 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b72118", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 33573, + "col": 24, + "tokLen": 25 + }, + "end": { + "offset": 33573, + "col": 24, + "tokLen": 25 + } + }, + "type": { + "qualType": "const char[24]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown veto algorithm \"" + } + ] + }, + { + "id": "0x7f0da6b72148", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33601, + "col": 52, + "tokLen": 1 + }, + "end": { + "offset": 33601, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b6f7f0", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +}, +{ + "id": "0x7f0da6b72938", + "kind": "FunctionDecl", + "loc": { + "offset": 33635, + "file": "ToString.cpp", + "line": 1105, + "col": 28, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 33608, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 34061, + "line": 1119, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d37a998", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs8gainModeEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::gainMode (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::gainMode" + }, + "inner": [ + { + "id": "0x2cdc24f0", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::gainMode" + }, + "decl": { + "id": "0x2cdc2450", + "kind": "EnumDecl", + "name": "gainMode" + } + } + ] + }, + { + "id": "0x7f0da6b72860", + "kind": "ParmVarDecl", + "loc": { + "offset": 33663, + "line": 1105, + "col": 56, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 33644, + "col": 37, + "tokLen": 5 + }, + "end": { + "offset": 33663, + "col": 56, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6b7a4c0", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 33666, + "col": 59, + "tokLen": 1 + }, + "end": { + "offset": 34061, + "line": 1119, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b73e28", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 33672, + "line": 1106, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 33713, + "line": 1107, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6b73d78", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 33676, + "line": 1106, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33681, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b73d60", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33678, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 33678, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b73d40", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33678, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 33678, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b72b20", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33676, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33676, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b72860", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b73d28", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33681, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 33681, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b72b40", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 33681, + "col": 14, + "tokLen": 9 + }, + "end": { + "offset": 33681, + "col": 14, + "tokLen": 9 + } + }, + "type": { + "qualType": "const char[8]" + }, + "valueCategory": "lvalue", + "value": "\"dynamic\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b73e18", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 33700, + "line": 1107, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 33713, + "col": 22, + "tokLen": 7 + } + }, + "inner": [ + { + "id": "0x7f0da6b73de8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33707, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 33713, + "col": 22, + "tokLen": 7 + } + }, + "type": { + "qualType": "slsDetectorDefs::gainMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc2510", + "kind": "EnumConstantDecl", + "name": "DYNAMIC", + "type": { + "qualType": "slsDetectorDefs::gainMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b75158", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 33726, + "line": 1108, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 33773, + "line": 1109, + "col": 22, + "tokLen": 15 + } + }, + "inner": [ + { + "id": "0x7f0da6b750a8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 33730, + "line": 1108, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33735, + "col": 14, + "tokLen": 15 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b75090", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33732, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 33732, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b75070", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33732, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 33732, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b73e48", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33730, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33730, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b72860", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b75058", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33735, + "col": 14, + "tokLen": 15 + }, + "end": { + "offset": 33735, + "col": 14, + "tokLen": 15 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b73e68", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 33735, + "col": 14, + "tokLen": 15 + }, + "end": { + "offset": 33735, + "col": 14, + "tokLen": 15 + } + }, + "type": { + "qualType": "const char[14]" + }, + "valueCategory": "lvalue", + "value": "\"forceswitchg1\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b75148", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 33760, + "line": 1109, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 33773, + "col": 22, + "tokLen": 15 + } + }, + "inner": [ + { + "id": "0x7f0da6b75118", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33767, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 33773, + "col": 22, + "tokLen": 15 + } + }, + "type": { + "qualType": "slsDetectorDefs::gainMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc2560", + "kind": "EnumConstantDecl", + "name": "FORCE_SWITCH_G1", + "type": { + "qualType": "slsDetectorDefs::gainMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b76488", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 33794, + "line": 1110, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 33841, + "line": 1111, + "col": 22, + "tokLen": 15 + } + }, + "inner": [ + { + "id": "0x7f0da6b763d8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 33798, + "line": 1110, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33803, + "col": 14, + "tokLen": 15 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b763c0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33800, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 33800, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b763a0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33800, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 33800, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b75178", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33798, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33798, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b72860", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b76388", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33803, + "col": 14, + "tokLen": 15 + }, + "end": { + "offset": 33803, + "col": 14, + "tokLen": 15 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b75198", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 33803, + "col": 14, + "tokLen": 15 + }, + "end": { + "offset": 33803, + "col": 14, + "tokLen": 15 + } + }, + "type": { + "qualType": "const char[14]" + }, + "valueCategory": "lvalue", + "value": "\"forceswitchg2\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b76478", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 33828, + "line": 1111, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 33841, + "col": 22, + "tokLen": 15 + } + }, + "inner": [ + { + "id": "0x7f0da6b76448", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33835, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 33841, + "col": 22, + "tokLen": 15 + } + }, + "type": { + "qualType": "slsDetectorDefs::gainMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc25b0", + "kind": "EnumConstantDecl", + "name": "FORCE_SWITCH_G2", + "type": { + "qualType": "slsDetectorDefs::gainMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b777b8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 33862, + "line": 1112, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 33901, + "line": 1113, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6b77708", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 33866, + "line": 1112, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33871, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b776f0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33868, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 33868, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b776d0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33868, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 33868, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b764a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33866, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33866, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b72860", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b776b8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33871, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 33871, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b764c8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 33871, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 33871, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"fixg1\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b777a8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 33888, + "line": 1113, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 33901, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6b77778", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33895, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 33901, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::gainMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc2600", + "kind": "EnumConstantDecl", + "name": "FIX_G1", + "type": { + "qualType": "slsDetectorDefs::gainMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b78ae8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 33913, + "line": 1114, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 33952, + "line": 1115, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6b78a38", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 33917, + "line": 1114, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33922, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b78a20", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33919, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 33919, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b78a00", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33919, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 33919, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b777d8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33917, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33917, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b72860", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b789e8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33922, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 33922, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b777f8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 33922, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 33922, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"fixg2\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b78ad8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 33939, + "line": 1115, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 33952, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6b78aa8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33946, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 33952, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::gainMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc2650", + "kind": "EnumConstantDecl", + "name": "FIX_G2", + "type": { + "qualType": "slsDetectorDefs::gainMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b79e18", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 33964, + "line": 1116, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 34003, + "line": 1117, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6b79d68", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 33968, + "line": 1116, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33973, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b79d50", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33970, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 33970, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b79d30", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33970, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 33970, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b78b08", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33968, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 33968, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b72860", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b79d18", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 33973, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 33973, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b78b28", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 33973, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 33973, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"fixg0\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b79e08", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 33990, + "line": 1117, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 34003, + "col": 22, + "tokLen": 6 + } + }, + "inner": [ + { + "id": "0x7f0da6b79dd8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 33997, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 34003, + "col": 22, + "tokLen": 6 + } + }, + "type": { + "qualType": "slsDetectorDefs::gainMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc26a0", + "kind": "EnumConstantDecl", + "name": "FIX_G0", + "type": { + "qualType": "slsDetectorDefs::gainMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b7a4a8", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 34015, + "line": 1118, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 34058, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6b7a490", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 34015, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 34058, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b7a460", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 34021, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34058, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b7a448", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 34021, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34058, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6b7a420", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 34021, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34058, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6b7a400", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 34021, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34058, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b7a3f8", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b7a3c8", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 34021, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34058, + "col": 48, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b7a3b0", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 34034, + "col": 24, + "tokLen": 20 + }, + "end": { + "offset": 34057, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6b7a398", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34034, + "col": 24, + "tokLen": 20 + }, + "end": { + "offset": 34057, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b7a378", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 34034, + "col": 24, + "tokLen": 20 + }, + "end": { + "offset": 34057, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b7a370", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b7a338", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 34034, + "col": 24, + "tokLen": 20 + }, + "end": { + "offset": 34057, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b7a320", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34055, + "col": 45, + "tokLen": 1 + }, + "end": { + "offset": 34055, + "col": 45, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b7a300", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34055, + "col": 45, + "tokLen": 1 + }, + "end": { + "offset": 34055, + "col": 45, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6b7a2e8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34034, + "col": 24, + "tokLen": 20 + }, + "end": { + "offset": 34034, + "col": 24, + "tokLen": 20 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b79e48", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 34034, + "col": 24, + "tokLen": 20 + }, + "end": { + "offset": 34034, + "col": 24, + "tokLen": 20 + } + }, + "type": { + "qualType": "const char[19]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown gain mode \"" + } + ] + }, + { + "id": "0x7f0da6b79e78", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34057, + "col": 47, + "tokLen": 1 + }, + "end": { + "offset": 34057, + "col": 47, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b72860", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +}, +{ + "id": "0x7f0da6b7a688", + "kind": "FunctionDecl", + "loc": { + "offset": 34091, + "file": "ToString.cpp", + "line": 1121, + "col": 28, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 34064, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 34280, + "line": 1127, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d37aee8", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs8polarityEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::polarity (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::polarity" + }, + "inner": [ + { + "id": "0x2cdc2790", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::polarity" + }, + "decl": { + "id": "0x2cdc26f0", + "kind": "EnumDecl", + "name": "polarity" + } + } + ] + }, + { + "id": "0x7f0da6b7a5b0", + "kind": "ParmVarDecl", + "loc": { + "offset": 34119, + "line": 1121, + "col": 56, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 34100, + "col": 37, + "tokLen": 5 + }, + "end": { + "offset": 34119, + "col": 56, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6b3c560", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 34122, + "col": 59, + "tokLen": 1 + }, + "end": { + "offset": 34280, + "line": 1127, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b3ab88", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 34128, + "line": 1122, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 34165, + "line": 1123, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b3aad8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 34132, + "line": 1122, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 34137, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b3aac0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34134, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 34134, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b3aaa0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34134, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 34134, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b7a870", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34132, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 34132, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b7a5b0", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b3aa88", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34137, + "col": 14, + "tokLen": 5 + }, + "end": { + "offset": 34137, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b7a890", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 34137, + "col": 14, + "tokLen": 5 + }, + "end": { + "offset": 34137, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "const char[4]" + }, + "valueCategory": "lvalue", + "value": "\"pos\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b3ab78", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 34152, + "line": 1123, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 34165, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b3ab48", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34159, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 34165, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::polarity" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc27b0", + "kind": "EnumConstantDecl", + "name": "POSITIVE", + "type": { + "qualType": "slsDetectorDefs::polarity" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b3beb8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 34179, + "line": 1124, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 34216, + "line": 1125, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b3be08", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 34183, + "line": 1124, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 34188, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b3bdf0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34185, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 34185, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b3bdd0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34185, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 34185, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b3aba8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34183, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 34183, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b7a5b0", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b3bdb8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34188, + "col": 14, + "tokLen": 5 + }, + "end": { + "offset": 34188, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b3abc8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 34188, + "col": 14, + "tokLen": 5 + }, + "end": { + "offset": 34188, + "col": 14, + "tokLen": 5 + } + }, + "type": { + "qualType": "const char[4]" + }, + "valueCategory": "lvalue", + "value": "\"neg\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b3bea8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 34203, + "line": 1125, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 34216, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b3be78", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34210, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 34216, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::polarity" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc2800", + "kind": "EnumConstantDecl", + "name": "NEGATIVE", + "type": { + "qualType": "slsDetectorDefs::polarity" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b3c548", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 34230, + "line": 1126, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 34277, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6b3c530", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 34230, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 34277, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b3c500", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 34236, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34277, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b3c4e8", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 34236, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34277, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6b3c4c0", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 34236, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34277, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6b3c4a0", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 34236, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34277, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b3c498", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b3c468", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 34236, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34277, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b3c450", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 34249, + "col": 24, + "tokLen": 24 + }, + "end": { + "offset": 34276, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6b3c438", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34249, + "col": 24, + "tokLen": 24 + }, + "end": { + "offset": 34276, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b3c418", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 34249, + "col": 24, + "tokLen": 24 + }, + "end": { + "offset": 34276, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b3c410", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b3c3d8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 34249, + "col": 24, + "tokLen": 24 + }, + "end": { + "offset": 34276, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b3c3c0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34274, + "col": 49, + "tokLen": 1 + }, + "end": { + "offset": 34274, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b3c3a0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34274, + "col": 49, + "tokLen": 1 + }, + "end": { + "offset": 34274, + "col": 49, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6b3c388", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34249, + "col": 24, + "tokLen": 24 + }, + "end": { + "offset": 34249, + "col": 24, + "tokLen": 24 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b3bee8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 34249, + "col": 24, + "tokLen": 24 + }, + "end": { + "offset": 34249, + "col": 24, + "tokLen": 24 + } + }, + "type": { + "qualType": "const char[23]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown polarity mode \"" + } + ] + }, + { + "id": "0x7f0da6b3bf18", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34276, + "col": 51, + "tokLen": 1 + }, + "end": { + "offset": 34276, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b7a5b0", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +}, +{ + "id": "0x7f0da6b3c708", + "kind": "FunctionDecl", + "loc": { + "offset": 34319, + "file": "ToString.cpp", + "line": 1129, + "col": 37, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 34283, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 34518, + "line": 1135, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d37b438", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs17timingInfoDecoderEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::timingInfoDecoder (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::timingInfoDecoder" + }, + "inner": [ + { + "id": "0x2cdc28f0", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::timingInfoDecoder" + }, + "decl": { + "id": "0x2cdc2850", + "kind": "EnumDecl", + "name": "timingInfoDecoder" + } + } + ] + }, + { + "id": "0x7f0da6b3c630", + "kind": "ParmVarDecl", + "loc": { + "offset": 34347, + "line": 1129, + "col": 65, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 34328, + "col": 46, + "tokLen": 5 + }, + "end": { + "offset": 34347, + "col": 65, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6b3f608", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 34350, + "col": 68, + "tokLen": 1 + }, + "end": { + "offset": 34518, + "line": 1135, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b3dbf8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 34356, + "line": 1130, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 34398, + "line": 1131, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b3db48", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 34360, + "line": 1130, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 34365, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b3db30", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34362, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 34362, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b3db10", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34362, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 34362, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b3c8f0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34360, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 34360, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b3c630", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b3daf8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34365, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 34365, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b3c910", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 34365, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 34365, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"swissfel\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b3dbe8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 34385, + "line": 1131, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 34398, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b3dbb8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34392, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 34398, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::timingInfoDecoder" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc2910", + "kind": "EnumConstantDecl", + "name": "SWISSFEL", + "type": { + "qualType": "slsDetectorDefs::timingInfoDecoder" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b3ef28", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 34412, + "line": 1132, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 34451, + "line": 1133, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6b3ee78", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 34416, + "line": 1132, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 34421, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b3ee60", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34418, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 34418, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b3ee40", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34418, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 34418, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b3dc18", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34416, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 34416, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b3c630", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b3ee28", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34421, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 34421, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b3dc38", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 34421, + "col": 14, + "tokLen": 7 + }, + "end": { + "offset": 34421, + "col": 14, + "tokLen": 7 + } + }, + "type": { + "qualType": "const char[6]" + }, + "valueCategory": "lvalue", + "value": "\"shine\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b3ef18", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 34438, + "line": 1133, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 34451, + "col": 22, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6b3eee8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34445, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 34451, + "col": 22, + "tokLen": 5 + } + }, + "type": { + "qualType": "slsDetectorDefs::timingInfoDecoder" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc2960", + "kind": "EnumConstantDecl", + "name": "SHINE", + "type": { + "qualType": "slsDetectorDefs::timingInfoDecoder" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b3f5f0", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 34462, + "line": 1134, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 34515, + "col": 58, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6b3f5d8", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 34462, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 34515, + "col": 58, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b3f5a8", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 34468, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34515, + "col": 58, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b3f590", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 34468, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34515, + "col": 58, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6b3f568", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 34468, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34515, + "col": 58, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6b3f548", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 34468, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34515, + "col": 58, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b3f540", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b3f510", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 34468, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34515, + "col": 58, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b3f4f8", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 34481, + "col": 24, + "tokLen": 30 + }, + "end": { + "offset": 34514, + "col": 57, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6b3f4e0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34481, + "col": 24, + "tokLen": 30 + }, + "end": { + "offset": 34514, + "col": 57, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b3f4c0", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 34481, + "col": 24, + "tokLen": 30 + }, + "end": { + "offset": 34514, + "col": 57, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b3f4b8", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b3f480", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 34481, + "col": 24, + "tokLen": 30 + }, + "end": { + "offset": 34514, + "col": 57, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b3f468", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34512, + "col": 55, + "tokLen": 1 + }, + "end": { + "offset": 34512, + "col": 55, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b3f448", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34512, + "col": 55, + "tokLen": 1 + }, + "end": { + "offset": 34512, + "col": 55, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6b3f430", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34481, + "col": 24, + "tokLen": 30 + }, + "end": { + "offset": 34481, + "col": 24, + "tokLen": 30 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b3ef58", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 34481, + "col": 24, + "tokLen": 30 + }, + "end": { + "offset": 34481, + "col": 24, + "tokLen": 30 + } + }, + "type": { + "qualType": "const char[29]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown Timing Info Decoder \"" + } + ] + }, + { + "id": "0x7f0da6b3ef90", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34514, + "col": 57, + "tokLen": 1 + }, + "end": { + "offset": 34514, + "col": 57, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b3c630", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +}, +{ + "id": "0x7f0da6b3f7a8", + "kind": "FunctionDecl", + "loc": { + "offset": 34554, + "file": "ToString.cpp", + "line": 1137, + "col": 34, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 34521, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 34747, + "line": 1143, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d37b988", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIN15slsDetectorDefs14collectionModeEEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "defs::collectionMode (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "slsDetectorDefs::collectionMode" + }, + "inner": [ + { + "id": "0x2cdc2a50", + "kind": "EnumType", + "type": { + "qualType": "slsDetectorDefs::collectionMode" + }, + "decl": { + "id": "0x2cdc29b0", + "kind": "EnumDecl", + "name": "collectionMode" + } + } + ] + }, + { + "id": "0x7f0da6b3f6d8", + "kind": "ParmVarDecl", + "loc": { + "offset": 34582, + "line": 1137, + "col": 62, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 34563, + "col": 43, + "tokLen": 5 + }, + "end": { + "offset": 34582, + "col": 62, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6b426a8", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 34585, + "col": 65, + "tokLen": 1 + }, + "end": { + "offset": 34747, + "line": 1143, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b40c98", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 34591, + "line": 1138, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 34629, + "line": 1139, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6b40be8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 34595, + "line": 1138, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 34600, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b40bd0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34597, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 34597, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b40bb0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34597, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 34597, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b3f990", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34595, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 34595, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b3f6d8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b40b98", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34600, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 34600, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b3f9b0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 34600, + "col": 14, + "tokLen": 6 + }, + "end": { + "offset": 34600, + "col": 14, + "tokLen": 6 + } + }, + "type": { + "qualType": "const char[5]" + }, + "valueCategory": "lvalue", + "value": "\"hole\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b40c88", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 34616, + "line": 1139, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 34629, + "col": 22, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6b40c58", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34623, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 34629, + "col": 22, + "tokLen": 4 + } + }, + "type": { + "qualType": "slsDetectorDefs::collectionMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc2a70", + "kind": "EnumConstantDecl", + "name": "HOLE", + "type": { + "qualType": "slsDetectorDefs::collectionMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b41fc8", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 34639, + "line": 1140, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 34681, + "line": 1141, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b41f18", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 34643, + "line": 1140, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 34648, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b41f00", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34645, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 34645, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (*)(const basic_string, allocator> &, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b41ee0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34645, + "col": 11, + "tokLen": 2 + }, + "end": { + "offset": 34645, + "col": 11, + "tokLen": 2 + } + }, + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d2f20c8", + "kind": "FunctionDecl", + "name": "operator==", + "type": { + "qualType": "bool (const basic_string, allocator> &, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b40cb8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34643, + "col": 9, + "tokLen": 1 + }, + "end": { + "offset": 34643, + "col": 9, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b3f6d8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b41ec8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34648, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 34648, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b40cd8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 34648, + "col": 14, + "tokLen": 10 + }, + "end": { + "offset": 34648, + "col": 14, + "tokLen": 10 + } + }, + "type": { + "qualType": "const char[9]" + }, + "valueCategory": "lvalue", + "value": "\"electron\"" + } + ] + } + ] + }, + { + "id": "0x7f0da6b41fb8", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 34668, + "line": 1141, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 34681, + "col": 22, + "tokLen": 8 + } + }, + "inner": [ + { + "id": "0x7f0da6b41f88", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34675, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 34681, + "col": 22, + "tokLen": 8 + } + }, + "type": { + "qualType": "slsDetectorDefs::collectionMode" + }, + "valueCategory": "prvalue", + "referencedDecl": { + "id": "0x2cdc2ac0", + "kind": "EnumConstantDecl", + "name": "ELECTRON", + "type": { + "qualType": "slsDetectorDefs::collectionMode" + } + } + } + ] + } + ] + }, + { + "id": "0x7f0da6b42690", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 34695, + "line": 1142, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 34744, + "col": 54, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6b42678", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 34695, + "col": 5, + "tokLen": 5 + }, + "end": { + "offset": 34744, + "col": 54, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b42648", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 34701, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34744, + "col": 54, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b42630", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 34701, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34744, + "col": 54, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6b42608", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 34701, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34744, + "col": 54, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6b425e8", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 34701, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34744, + "col": 54, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b425e0", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b425b0", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 34701, + "col": 11, + "tokLen": 12 + }, + "end": { + "offset": 34744, + "col": 54, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b42598", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 34714, + "col": 24, + "tokLen": 26 + }, + "end": { + "offset": 34743, + "col": 53, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6b42580", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34714, + "col": 24, + "tokLen": 26 + }, + "end": { + "offset": 34743, + "col": 53, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b42560", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 34714, + "col": 24, + "tokLen": 26 + }, + "end": { + "offset": 34743, + "col": 53, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b42558", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b42520", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 34714, + "col": 24, + "tokLen": 26 + }, + "end": { + "offset": 34743, + "col": 53, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b42508", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34741, + "col": 51, + "tokLen": 1 + }, + "end": { + "offset": 34741, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b424e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34741, + "col": 51, + "tokLen": 1 + }, + "end": { + "offset": 34741, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6b424d0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34714, + "col": 24, + "tokLen": 26 + }, + "end": { + "offset": 34714, + "col": 24, + "tokLen": 26 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b41ff8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 34714, + "col": 24, + "tokLen": 26 + }, + "end": { + "offset": 34714, + "col": 24, + "tokLen": 26 + } + }, + "type": { + "qualType": "const char[25]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown collection mode \"" + } + ] + }, + { + "id": "0x7f0da6b42028", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34743, + "col": 53, + "tokLen": 1 + }, + "end": { + "offset": 34743, + "col": 53, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b3f6d8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +}, +{ + "id": "0x7f0da6b427f8", + "kind": "FunctionDecl", + "loc": { + "offset": 34770, + "file": "ToString.cpp", + "line": 1145, + "col": 21, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 34750, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 35199, + "line": 1154, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d37be88", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIhEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "uint8_t (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "unsigned char" + }, + "inner": [ + { + "id": "0x2bf08d50", + "kind": "BuiltinType", + "type": { + "qualType": "unsigned char" + } + } + ] + }, + { + "id": "0x7f0da6b42738", + "kind": "ParmVarDecl", + "loc": { + "offset": 34798, + "line": 1145, + "col": 49, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 34779, + "col": 30, + "tokLen": 5 + }, + "end": { + "offset": 34798, + "col": 49, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6b44c30", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 34801, + "col": 52, + "tokLen": 1 + }, + "end": { + "offset": 35199, + "line": 1154, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b42ce0", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 34807, + "line": 1146, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 34861, + "col": 59, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b429c8", + "kind": "VarDecl", + "loc": { + "offset": 34811, + "col": 9, + "tokLen": 4 + }, + "range": { + "begin": { + "offset": 34807, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 34859, + "col": 57, + "tokLen": 2 + } + }, + "isUsed": true, + "name": "base", + "type": { + "qualType": "int" + }, + "init": "c", + "inner": [ + { + "id": "0x7f0da6b42cb0", + "kind": "ConditionalOperator", + "range": { + "begin": { + "offset": 34818, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 34859, + "col": 57, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b42c50", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 34818, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 34847, + "col": 45, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "!=", + "inner": [ + { + "id": "0x7f0da6b42b10", + "kind": "CXXMemberCallExpr", + "range": { + "begin": { + "offset": 34818, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 34829, + "col": 27, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b42ae0", + "kind": "MemberExpr", + "range": { + "begin": { + "offset": 34818, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 34820, + "col": 18, + "tokLen": 4 + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "name": "find", + "isArrow": false, + "referencedMemberDecl": "0x2c8ca830", + "inner": [ + { + "id": "0x7f0da6b42a30", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34818, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 34818, + "col": 16, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b42738", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + }, + { + "id": "0x7f0da6b42b40", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34825, + "col": 23, + "tokLen": 4 + }, + "end": { + "offset": 34825, + "col": 23, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b42ac0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 34825, + "col": 23, + "tokLen": 4 + }, + "end": { + "offset": 34825, + "col": 23, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char[3]" + }, + "valueCategory": "lvalue", + "value": "\"0x\"" + } + ] + }, + { + "id": "0x7f0da6b42b70", + "kind": "CXXDefaultArgExpr", + "range": { + "begin": {}, + "end": {} + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue" + } + ] + }, + { + "id": "0x7f0da6b42c38", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34834, + "col": 32, + "tokLen": 3 + }, + "end": { + "offset": 34847, + "col": 45, + "tokLen": 4 + } + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "inner": [ + { + "id": "0x7f0da6b42c08", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34834, + "col": 32, + "tokLen": 3 + }, + "end": { + "offset": 34847, + "col": 45, + "tokLen": 4 + } + }, + "type": { + "desugaredQualType": "const unsigned long", + "qualType": "const typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d0eda20", + "kind": "VarDecl", + "name": "npos", + "type": { + "desugaredQualType": "const unsigned long", + "qualType": "const typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + } + }, + "nonOdrUseReason": "constant" + } + ] + } + ] + }, + { + "id": "0x7f0da6b42c70", + "kind": "IntegerLiteral", + "range": { + "begin": { + "offset": 34854, + "col": 52, + "tokLen": 2 + }, + "end": { + "offset": 34854, + "col": 52, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "value": "16" + }, + { + "id": "0x7f0da6b42c90", + "kind": "IntegerLiteral", + "range": { + "begin": { + "offset": 34859, + "col": 57, + "tokLen": 2 + }, + "end": { + "offset": 34859, + "col": 57, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "value": "10" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6b42f48", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 34867, + "line": 1147, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 34906, + "col": 44, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b42d10", + "kind": "VarDecl", + "loc": { + "offset": 34871, + "col": 9, + "tokLen": 5 + }, + "range": { + "begin": { + "offset": 34867, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 34905, + "col": 43, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "value", + "type": { + "qualType": "int" + }, + "init": "c", + "inner": [ + { + "id": "0x7f0da6b42ee0", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 34879, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 34905, + "col": 43, + "tokLen": 1 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b42ec8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34879, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 34884, + "col": 22, + "tokLen": 4 + } + }, + "type": { + "qualType": "int (*)(const string &, size_t *, int)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b42e38", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34879, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 34884, + "col": 22, + "tokLen": 4 + } + }, + "type": { + "qualType": "int (const string &, size_t *, int)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2c88ede0", + "kind": "FunctionDecl", + "name": "stoi", + "type": { + "qualType": "int (const string &, size_t *, int)" + } + } + } + ] + }, + { + "id": "0x7f0da6b42de8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34889, + "col": 27, + "tokLen": 1 + }, + "end": { + "offset": 34889, + "col": 27, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b42738", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b42f18", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34892, + "col": 30, + "tokLen": 7 + }, + "end": { + "offset": 34892, + "col": 30, + "tokLen": 7 + } + }, + "type": { + "qualType": "size_t *" + }, + "valueCategory": "prvalue", + "castKind": "NullToPointer", + "inner": [ + { + "id": "0x7f0da6b42e08", + "kind": "CXXNullPtrLiteralExpr", + "range": { + "begin": { + "offset": 34892, + "col": 30, + "tokLen": 7 + }, + "end": { + "offset": 34892, + "col": 30, + "tokLen": 7 + } + }, + "type": { + "qualType": "std::nullptr_t" + }, + "valueCategory": "prvalue" + } + ] + }, + { + "id": "0x7f0da6b42f30", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34901, + "col": 39, + "tokLen": 4 + }, + "end": { + "offset": 34901, + "col": 39, + "tokLen": 4 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "inner": [ + { + "id": "0x7f0da6b42e18", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34901, + "col": 39, + "tokLen": 4 + }, + "end": { + "offset": 34901, + "col": 39, + "tokLen": 4 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b429c8", + "kind": "VarDecl", + "name": "base", + "type": { + "qualType": "int" + } + } + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6b44b70", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 34912, + "line": 1148, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 35157, + "line": 1152, + "col": 5, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b432f8", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 34916, + "line": 1148, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 35013, + "line": 1149, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6b43140", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 34916, + "line": 1148, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 34958, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "<", + "inner": [ + { + "id": "0x7f0da6b43110", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34916, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 34916, + "col": 9, + "tokLen": 5 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "inner": [ + { + "id": "0x7f0da6b42f60", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34916, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 34916, + "col": 9, + "tokLen": 5 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b42d10", + "kind": "VarDecl", + "name": "value", + "type": { + "qualType": "int" + } + } + } + ] + }, + { + "id": "0x7f0da6b43128", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34924, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 34958, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "castKind": "IntegralCast", + "inner": [ + { + "id": "0x7f0da6b430f0", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 34924, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 34958, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "qualType": "unsigned char" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b430d8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34924, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 34954, + "col": 47, + "tokLen": 3 + } + }, + "type": { + "qualType": "unsigned char (*)() noexcept" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b430a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34924, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 34954, + "col": 47, + "tokLen": 3 + } + }, + "type": { + "qualType": "unsigned char () noexcept" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2c0d55a8", + "kind": "CXXMethodDecl", + "name": "min", + "type": { + "qualType": "unsigned char () noexcept" + } + } + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6b432d8", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 34971, + "line": 1149, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 35013, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": ">", + "inner": [ + { + "id": "0x7f0da6b432a8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34971, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 34971, + "col": 9, + "tokLen": 5 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "inner": [ + { + "id": "0x7f0da6b43160", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34971, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 34971, + "col": 9, + "tokLen": 5 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b42d10", + "kind": "VarDecl", + "name": "value", + "type": { + "qualType": "int" + } + } + } + ] + }, + { + "id": "0x7f0da6b432c0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34979, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 35013, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "castKind": "IntegralCast", + "inner": [ + { + "id": "0x7f0da6b43288", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 34979, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 35013, + "col": 51, + "tokLen": 1 + } + }, + "type": { + "qualType": "unsigned char" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b43270", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 34979, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 35009, + "col": 47, + "tokLen": 3 + } + }, + "type": { + "qualType": "unsigned char (*)() noexcept" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b43240", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 34979, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 35009, + "col": 47, + "tokLen": 3 + } + }, + "type": { + "qualType": "unsigned char () noexcept" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2c0d5680", + "kind": "CXXMethodDecl", + "name": "max", + "type": { + "qualType": "unsigned char () noexcept" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6b44b58", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 35016, + "col": 54, + "tokLen": 1 + }, + "end": { + "offset": 35157, + "line": 1152, + "col": 5, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b44b40", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 35026, + "line": 1150, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 35150, + "line": 1151, + "col": 64, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6b44b28", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 35026, + "line": 1150, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 35150, + "line": 1151, + "col": 64, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b44af8", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 35032, + "line": 1150, + "col": 15, + "tokLen": 12 + }, + "end": { + "offset": 35150, + "line": 1151, + "col": 64, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b44ae0", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 35032, + "line": 1150, + "col": 15, + "tokLen": 12 + }, + "end": { + "offset": 35150, + "line": 1151, + "col": 64, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6b44ab8", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 35032, + "line": 1150, + "col": 15, + "tokLen": 12 + }, + "end": { + "offset": 35150, + "line": 1151, + "col": 64, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6b44a98", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 35032, + "line": 1150, + "col": 15, + "tokLen": 12 + }, + "end": { + "offset": 35150, + "line": 1151, + "col": 64, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b44a90", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b44a60", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 35032, + "line": 1150, + "col": 15, + "tokLen": 12 + }, + "end": { + "offset": 35150, + "line": 1151, + "col": 64, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b44a48", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 35045, + "line": 1150, + "col": 28, + "tokLen": 35 + }, + "end": { + "offset": 35114, + "line": 1151, + "col": 28, + "tokLen": 36 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6b44a30", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35045, + "line": 1150, + "col": 28, + "tokLen": 35 + }, + "end": { + "offset": 35114, + "line": 1151, + "col": 28, + "tokLen": 36 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b44a10", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 35045, + "line": 1150, + "col": 28, + "tokLen": 35 + }, + "end": { + "offset": 35114, + "line": 1151, + "col": 28, + "tokLen": 36 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b44a08", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b449d0", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 35045, + "line": 1150, + "col": 28, + "tokLen": 35 + }, + "end": { + "offset": 35114, + "line": 1151, + "col": 28, + "tokLen": 36 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b449b8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35085, + "line": 1150, + "col": 68, + "tokLen": 1 + }, + "end": { + "offset": 35085, + "col": 68, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(basic_string, allocator> &&, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b44940", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35085, + "col": 68, + "tokLen": 1 + }, + "end": { + "offset": 35085, + "col": 68, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (basic_string, allocator> &&, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b44798", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (basic_string, allocator> &&, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b44910", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 35045, + "col": 28, + "tokLen": 35 + }, + "end": { + "offset": 35083, + "col": 66, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6b43920", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 35045, + "col": 28, + "tokLen": 35 + }, + "end": { + "offset": 35083, + "col": 66, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b43918", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b438e0", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 35045, + "col": 28, + "tokLen": 35 + }, + "end": { + "offset": 35083, + "col": 66, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b438c8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35081, + "col": 64, + "tokLen": 1 + }, + "end": { + "offset": 35081, + "col": 64, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b438a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35081, + "col": 64, + "tokLen": 1 + }, + "end": { + "offset": 35081, + "col": 64, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6b43890", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35045, + "col": 28, + "tokLen": 35 + }, + "end": { + "offset": 35045, + "col": 28, + "tokLen": 35 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b433a8", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 35045, + "col": 28, + "tokLen": 35 + }, + "end": { + "offset": 35045, + "col": 28, + "tokLen": 35 + } + }, + "type": { + "qualType": "const char[34]" + }, + "valueCategory": "lvalue", + "value": "\"Cannot scan uint8_t from string '\"" + } + ] + }, + { + "id": "0x7f0da6b433e8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35083, + "col": 66, + "tokLen": 1 + }, + "end": { + "offset": 35083, + "col": 66, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b42738", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6b44928", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35114, + "line": 1151, + "col": 28, + "tokLen": 36 + }, + "end": { + "offset": 35114, + "col": 28, + "tokLen": 36 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b43940", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 35114, + "col": 28, + "tokLen": 36 + }, + "end": { + "offset": 35114, + "col": 28, + "tokLen": 36 + } + }, + "type": { + "qualType": "const char[35]" + }, + "valueCategory": "lvalue", + "value": "\"'. Value must be in range 0 - 255.\"" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6b44c20", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 35163, + "line": 1153, + "col": 5, + "tokLen": 6 + }, + "end": { + "offset": 35196, + "col": 38, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b44bf0", + "kind": "CXXStaticCastExpr", + "range": { + "begin": { + "offset": 35170, + "col": 12, + "tokLen": 11 + }, + "end": { + "offset": 35196, + "col": 38, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "unsigned char", + "qualType": "uint8_t", + "typeAliasDeclId": "0x2c0e6c18" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b44bd8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35191, + "col": 33, + "tokLen": 5 + }, + "end": { + "offset": 35191, + "col": 33, + "tokLen": 5 + } + }, + "type": { + "desugaredQualType": "unsigned char", + "qualType": "uint8_t", + "typeAliasDeclId": "0x2c0e6c18" + }, + "valueCategory": "prvalue", + "castKind": "IntegralCast", + "isPartOfExplicitCast": true, + "inner": [ + { + "id": "0x7f0da6b44bc0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35191, + "col": 33, + "tokLen": 5 + }, + "end": { + "offset": 35191, + "col": 33, + "tokLen": 5 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "isPartOfExplicitCast": true, + "inner": [ + { + "id": "0x7f0da6b44b90", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35191, + "col": 33, + "tokLen": 5 + }, + "end": { + "offset": 35191, + "col": 33, + "tokLen": 5 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b42d10", + "kind": "VarDecl", + "name": "value", + "type": { + "qualType": "int" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +}, +{ + "id": "0x7f0da6b44d88", + "kind": "FunctionDecl", + "loc": { + "offset": 35223, + "file": "ToString.cpp", + "line": 1156, + "col": 22, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 35202, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 35658, + "line": 1165, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d37c358", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToItEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "uint16_t (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "unsigned short" + }, + "inner": [ + { + "id": "0x2bf08d70", + "kind": "BuiltinType", + "type": { + "qualType": "unsigned short" + } + } + ] + }, + { + "id": "0x7f0da6b44cc8", + "kind": "ParmVarDecl", + "loc": { + "offset": 35251, + "line": 1156, + "col": 50, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 35232, + "col": 31, + "tokLen": 5 + }, + "end": { + "offset": 35251, + "col": 50, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6b46558", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 35254, + "col": 53, + "tokLen": 1 + }, + "end": { + "offset": 35658, + "line": 1165, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b45258", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 35260, + "line": 1157, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 35314, + "col": 59, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b44f58", + "kind": "VarDecl", + "loc": { + "offset": 35264, + "col": 9, + "tokLen": 4 + }, + "range": { + "begin": { + "offset": 35260, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 35312, + "col": 57, + "tokLen": 2 + } + }, + "isUsed": true, + "name": "base", + "type": { + "qualType": "int" + }, + "init": "c", + "inner": [ + { + "id": "0x7f0da6b45228", + "kind": "ConditionalOperator", + "range": { + "begin": { + "offset": 35271, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 35312, + "col": 57, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b451c8", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 35271, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 35300, + "col": 45, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "!=", + "inner": [ + { + "id": "0x7f0da6b450a0", + "kind": "CXXMemberCallExpr", + "range": { + "begin": { + "offset": 35271, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 35282, + "col": 27, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b45070", + "kind": "MemberExpr", + "range": { + "begin": { + "offset": 35271, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 35273, + "col": 18, + "tokLen": 4 + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "name": "find", + "isArrow": false, + "referencedMemberDecl": "0x2c8ca830", + "inner": [ + { + "id": "0x7f0da6b44fc0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35271, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 35271, + "col": 16, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b44cc8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + }, + { + "id": "0x7f0da6b450d0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35278, + "col": 23, + "tokLen": 4 + }, + "end": { + "offset": 35278, + "col": 23, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b45050", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 35278, + "col": 23, + "tokLen": 4 + }, + "end": { + "offset": 35278, + "col": 23, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char[3]" + }, + "valueCategory": "lvalue", + "value": "\"0x\"" + } + ] + }, + { + "id": "0x7f0da6b450e8", + "kind": "CXXDefaultArgExpr", + "range": { + "begin": {}, + "end": {} + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue" + } + ] + }, + { + "id": "0x7f0da6b451b0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35287, + "col": 32, + "tokLen": 3 + }, + "end": { + "offset": 35300, + "col": 45, + "tokLen": 4 + } + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "inner": [ + { + "id": "0x7f0da6b45180", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35287, + "col": 32, + "tokLen": 3 + }, + "end": { + "offset": 35300, + "col": 45, + "tokLen": 4 + } + }, + "type": { + "desugaredQualType": "const unsigned long", + "qualType": "const typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d0eda20", + "kind": "VarDecl", + "name": "npos", + "type": { + "desugaredQualType": "const unsigned long", + "qualType": "const typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + } + }, + "nonOdrUseReason": "constant" + } + ] + } + ] + }, + { + "id": "0x7f0da6b451e8", + "kind": "IntegerLiteral", + "range": { + "begin": { + "offset": 35307, + "col": 52, + "tokLen": 2 + }, + "end": { + "offset": 35307, + "col": 52, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "value": "16" + }, + { + "id": "0x7f0da6b45208", + "kind": "IntegerLiteral", + "range": { + "begin": { + "offset": 35312, + "col": 57, + "tokLen": 2 + }, + "end": { + "offset": 35312, + "col": 57, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "value": "10" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6b45460", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 35320, + "line": 1158, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 35359, + "col": 44, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b45288", + "kind": "VarDecl", + "loc": { + "offset": 35324, + "col": 9, + "tokLen": 5 + }, + "range": { + "begin": { + "offset": 35320, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 35358, + "col": 43, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "value", + "type": { + "qualType": "int" + }, + "init": "c", + "inner": [ + { + "id": "0x7f0da6b453f8", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 35332, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 35358, + "col": 43, + "tokLen": 1 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b453e0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35332, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 35337, + "col": 22, + "tokLen": 4 + } + }, + "type": { + "qualType": "int (*)(const string &, size_t *, int)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b453b0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35332, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 35337, + "col": 22, + "tokLen": 4 + } + }, + "type": { + "qualType": "int (const string &, size_t *, int)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2c88ede0", + "kind": "FunctionDecl", + "name": "stoi", + "type": { + "qualType": "int (const string &, size_t *, int)" + } + } + } + ] + }, + { + "id": "0x7f0da6b45360", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35342, + "col": 27, + "tokLen": 1 + }, + "end": { + "offset": 35342, + "col": 27, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b44cc8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b45430", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35345, + "col": 30, + "tokLen": 7 + }, + "end": { + "offset": 35345, + "col": 30, + "tokLen": 7 + } + }, + "type": { + "qualType": "size_t *" + }, + "valueCategory": "prvalue", + "castKind": "NullToPointer", + "inner": [ + { + "id": "0x7f0da6b45380", + "kind": "CXXNullPtrLiteralExpr", + "range": { + "begin": { + "offset": 35345, + "col": 30, + "tokLen": 7 + }, + "end": { + "offset": 35345, + "col": 30, + "tokLen": 7 + } + }, + "type": { + "qualType": "std::nullptr_t" + }, + "valueCategory": "prvalue" + } + ] + }, + { + "id": "0x7f0da6b45448", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35354, + "col": 39, + "tokLen": 4 + }, + "end": { + "offset": 35354, + "col": 39, + "tokLen": 4 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "inner": [ + { + "id": "0x7f0da6b45390", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35354, + "col": 39, + "tokLen": 4 + }, + "end": { + "offset": 35354, + "col": 39, + "tokLen": 4 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b44f58", + "kind": "VarDecl", + "name": "base", + "type": { + "qualType": "int" + } + } + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6b46498", + "kind": "IfStmt", + "range": { + "begin": { + "offset": 35365, + "line": 1159, + "col": 5, + "tokLen": 2 + }, + "end": { + "offset": 35615, + "line": 1163, + "col": 5, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b457f8", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 35369, + "line": 1159, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 35468, + "line": 1160, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "||", + "inner": [ + { + "id": "0x7f0da6b45640", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 35369, + "line": 1159, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 35412, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "<", + "inner": [ + { + "id": "0x7f0da6b45610", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35369, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 35369, + "col": 9, + "tokLen": 5 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "inner": [ + { + "id": "0x7f0da6b45478", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35369, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 35369, + "col": 9, + "tokLen": 5 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b45288", + "kind": "VarDecl", + "name": "value", + "type": { + "qualType": "int" + } + } + } + ] + }, + { + "id": "0x7f0da6b45628", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35377, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 35412, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "castKind": "IntegralCast", + "inner": [ + { + "id": "0x7f0da6b455f0", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 35377, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 35412, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "qualType": "unsigned short" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b455d8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35377, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 35408, + "col": 48, + "tokLen": 3 + } + }, + "type": { + "qualType": "unsigned short (*)() noexcept" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b455a8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35377, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 35408, + "col": 48, + "tokLen": 3 + } + }, + "type": { + "qualType": "unsigned short () noexcept" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2c179c48", + "kind": "CXXMethodDecl", + "name": "min", + "type": { + "qualType": "unsigned short () noexcept" + } + } + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6b457d8", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 35425, + "line": 1160, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 35468, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": ">", + "inner": [ + { + "id": "0x7f0da6b457a8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35425, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 35425, + "col": 9, + "tokLen": 5 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "inner": [ + { + "id": "0x7f0da6b45660", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35425, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 35425, + "col": 9, + "tokLen": 5 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b45288", + "kind": "VarDecl", + "name": "value", + "type": { + "qualType": "int" + } + } + } + ] + }, + { + "id": "0x7f0da6b457c0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35433, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 35468, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "castKind": "IntegralCast", + "inner": [ + { + "id": "0x7f0da6b45788", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 35433, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 35468, + "col": 52, + "tokLen": 1 + } + }, + "type": { + "qualType": "unsigned short" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b45770", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35433, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 35464, + "col": 48, + "tokLen": 3 + } + }, + "type": { + "qualType": "unsigned short (*)() noexcept" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b45740", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35433, + "col": 17, + "tokLen": 3 + }, + "end": { + "offset": 35464, + "col": 48, + "tokLen": 3 + } + }, + "type": { + "qualType": "unsigned short () noexcept" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2c179d20", + "kind": "CXXMethodDecl", + "name": "max", + "type": { + "qualType": "unsigned short () noexcept" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6b46480", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 35471, + "col": 55, + "tokLen": 1 + }, + "end": { + "offset": 35615, + "line": 1163, + "col": 5, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b46468", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 35481, + "line": 1161, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 35608, + "line": 1162, + "col": 66, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6b46450", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 35481, + "line": 1161, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 35608, + "line": 1162, + "col": 66, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b46420", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 35487, + "line": 1161, + "col": 15, + "tokLen": 12 + }, + "end": { + "offset": 35608, + "line": 1162, + "col": 66, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b46408", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 35487, + "line": 1161, + "col": 15, + "tokLen": 12 + }, + "end": { + "offset": 35608, + "line": 1162, + "col": 66, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6b463e0", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 35487, + "line": 1161, + "col": 15, + "tokLen": 12 + }, + "end": { + "offset": 35608, + "line": 1162, + "col": 66, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c9688e8", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const std::string &)" + } + }, + "inner": [ + { + "id": "0x7f0da6b463c0", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 35487, + "line": 1161, + "col": 15, + "tokLen": 12 + }, + "end": { + "offset": 35608, + "line": 1162, + "col": 66, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b463b8", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b46388", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 35487, + "line": 1161, + "col": 15, + "tokLen": 12 + }, + "end": { + "offset": 35608, + "line": 1162, + "col": 66, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const std::string &)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b46370", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 35500, + "line": 1161, + "col": 28, + "tokLen": 36 + }, + "end": { + "offset": 35570, + "line": 1162, + "col": 28, + "tokLen": 38 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "lvalue", + "storageDuration": "full expression", + "boundToLValueRef": true, + "inner": [ + { + "id": "0x7f0da6b46358", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35500, + "line": 1161, + "col": 28, + "tokLen": 36 + }, + "end": { + "offset": 35570, + "line": 1162, + "col": 28, + "tokLen": 38 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const basic_string, allocator>" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b46338", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 35500, + "line": 1161, + "col": 28, + "tokLen": 36 + }, + "end": { + "offset": 35570, + "line": 1162, + "col": 28, + "tokLen": 38 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b46330", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b462f8", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 35500, + "line": 1161, + "col": 28, + "tokLen": 36 + }, + "end": { + "offset": 35570, + "line": 1162, + "col": 28, + "tokLen": 38 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b462e0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35541, + "line": 1161, + "col": 69, + "tokLen": 1 + }, + "end": { + "offset": 35541, + "col": 69, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(basic_string, allocator> &&, const char *)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b462c0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35541, + "col": 69, + "tokLen": 1 + }, + "end": { + "offset": 35541, + "col": 69, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (basic_string, allocator> &&, const char *)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b44798", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (basic_string, allocator> &&, const char *)" + } + } + } + ] + }, + { + "id": "0x7f0da6b46290", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 35500, + "col": 28, + "tokLen": 36 + }, + "end": { + "offset": 35539, + "col": 67, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6b45d68", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 35500, + "col": 28, + "tokLen": 36 + }, + "end": { + "offset": 35539, + "col": 67, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b45d60", + "dtor": { + "id": "0x2c8ba378", + "kind": "CXXDestructorDecl", + "name": "~basic_string", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b45d28", + "kind": "CXXOperatorCallExpr", + "range": { + "begin": { + "offset": 35500, + "col": 28, + "tokLen": 36 + }, + "end": { + "offset": 35539, + "col": 67, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "std::basic_string", + "qualType": "basic_string, allocator>" + }, + "valueCategory": "prvalue", + "adl": true, + "inner": [ + { + "id": "0x7f0da6b45d10", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35537, + "col": 65, + "tokLen": 1 + }, + "end": { + "offset": 35537, + "col": 65, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (*)(const char *, const basic_string, allocator> &)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b45cf0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35537, + "col": 65, + "tokLen": 1 + }, + "end": { + "offset": 35537, + "col": 65, + "tokLen": 1 + } + }, + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2ce13b68", + "kind": "FunctionDecl", + "name": "operator+", + "type": { + "qualType": "basic_string, allocator> (const char *, const basic_string, allocator> &)" + } + } + } + ] + }, + { + "id": "0x7f0da6b45cd8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35500, + "col": 28, + "tokLen": 36 + }, + "end": { + "offset": 35500, + "col": 28, + "tokLen": 36 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b45828", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 35500, + "col": 28, + "tokLen": 36 + }, + "end": { + "offset": 35500, + "col": 28, + "tokLen": 36 + } + }, + "type": { + "qualType": "const char[35]" + }, + "valueCategory": "lvalue", + "value": "\"Cannot scan uint16_t from string '\"" + } + ] + }, + { + "id": "0x7f0da6b45868", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35539, + "col": 67, + "tokLen": 1 + }, + "end": { + "offset": 35539, + "col": 67, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b44cc8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6b462a8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35570, + "line": 1162, + "col": 28, + "tokLen": 38 + }, + "end": { + "offset": 35570, + "col": 28, + "tokLen": 38 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b45e08", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 35570, + "col": 28, + "tokLen": 38 + }, + "end": { + "offset": 35570, + "col": 28, + "tokLen": 38 + } + }, + "type": { + "qualType": "const char[37]" + }, + "valueCategory": "lvalue", + "value": "\"'. Value must be in range 0 - 65535.\"" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6b46548", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 35621, + "line": 1164, + "col": 5, + "tokLen": 6 + }, + "end": { + "offset": 35655, + "col": 39, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b46518", + "kind": "CXXStaticCastExpr", + "range": { + "begin": { + "offset": 35628, + "col": 12, + "tokLen": 11 + }, + "end": { + "offset": 35655, + "col": 39, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "unsigned short", + "qualType": "uint16_t", + "typeAliasDeclId": "0x2c0e6c80" + }, + "valueCategory": "prvalue", + "castKind": "NoOp", + "inner": [ + { + "id": "0x7f0da6b46500", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35650, + "col": 34, + "tokLen": 5 + }, + "end": { + "offset": 35650, + "col": 34, + "tokLen": 5 + } + }, + "type": { + "desugaredQualType": "unsigned short", + "qualType": "uint16_t", + "typeAliasDeclId": "0x2c0e6c80" + }, + "valueCategory": "prvalue", + "castKind": "IntegralCast", + "isPartOfExplicitCast": true, + "inner": [ + { + "id": "0x7f0da6b464e8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35650, + "col": 34, + "tokLen": 5 + }, + "end": { + "offset": 35650, + "col": 34, + "tokLen": 5 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "isPartOfExplicitCast": true, + "inner": [ + { + "id": "0x7f0da6b464b8", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35650, + "col": 34, + "tokLen": 5 + }, + "end": { + "offset": 35650, + "col": 34, + "tokLen": 5 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b45288", + "kind": "VarDecl", + "name": "value", + "type": { + "qualType": "int" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +}, +{ + "id": "0x7f0da6b466b8", + "kind": "FunctionDecl", + "loc": { + "offset": 35682, + "file": "ToString.cpp", + "line": 1167, + "col": 22, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 35661, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 35816, + "line": 1170, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d37c828", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIjEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "uint32_t (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "unsigned int" + }, + "inner": [ + { + "id": "0x2bf08d90", + "kind": "BuiltinType", + "type": { + "qualType": "unsigned int" + } + } + ] + }, + { + "id": "0x7f0da6b465f0", + "kind": "ParmVarDecl", + "loc": { + "offset": 35710, + "line": 1167, + "col": 50, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 35691, + "col": 31, + "tokLen": 5 + }, + "end": { + "offset": 35710, + "col": 50, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6b46d90", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 35713, + "col": 53, + "tokLen": 1 + }, + "end": { + "offset": 35816, + "line": 1170, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b46b88", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 35719, + "line": 1168, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 35773, + "col": 59, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b46888", + "kind": "VarDecl", + "loc": { + "offset": 35723, + "col": 9, + "tokLen": 4 + }, + "range": { + "begin": { + "offset": 35719, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 35771, + "col": 57, + "tokLen": 2 + } + }, + "isUsed": true, + "name": "base", + "type": { + "qualType": "int" + }, + "init": "c", + "inner": [ + { + "id": "0x7f0da6b46b58", + "kind": "ConditionalOperator", + "range": { + "begin": { + "offset": 35730, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 35771, + "col": 57, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b46af8", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 35730, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 35759, + "col": 45, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "!=", + "inner": [ + { + "id": "0x7f0da6b469d0", + "kind": "CXXMemberCallExpr", + "range": { + "begin": { + "offset": 35730, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 35741, + "col": 27, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b469a0", + "kind": "MemberExpr", + "range": { + "begin": { + "offset": 35730, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 35732, + "col": 18, + "tokLen": 4 + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "name": "find", + "isArrow": false, + "referencedMemberDecl": "0x2c8ca830", + "inner": [ + { + "id": "0x7f0da6b468f0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35730, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 35730, + "col": 16, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b465f0", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + }, + { + "id": "0x7f0da6b46a00", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35737, + "col": 23, + "tokLen": 4 + }, + "end": { + "offset": 35737, + "col": 23, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b46980", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 35737, + "col": 23, + "tokLen": 4 + }, + "end": { + "offset": 35737, + "col": 23, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char[3]" + }, + "valueCategory": "lvalue", + "value": "\"0x\"" + } + ] + }, + { + "id": "0x7f0da6b46a18", + "kind": "CXXDefaultArgExpr", + "range": { + "begin": {}, + "end": {} + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue" + } + ] + }, + { + "id": "0x7f0da6b46ae0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35746, + "col": 32, + "tokLen": 3 + }, + "end": { + "offset": 35759, + "col": 45, + "tokLen": 4 + } + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "inner": [ + { + "id": "0x7f0da6b46ab0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35746, + "col": 32, + "tokLen": 3 + }, + "end": { + "offset": 35759, + "col": 45, + "tokLen": 4 + } + }, + "type": { + "desugaredQualType": "const unsigned long", + "qualType": "const typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d0eda20", + "kind": "VarDecl", + "name": "npos", + "type": { + "desugaredQualType": "const unsigned long", + "qualType": "const typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + } + }, + "nonOdrUseReason": "constant" + } + ] + } + ] + }, + { + "id": "0x7f0da6b46b18", + "kind": "IntegerLiteral", + "range": { + "begin": { + "offset": 35766, + "col": 52, + "tokLen": 2 + }, + "end": { + "offset": 35766, + "col": 52, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "value": "16" + }, + { + "id": "0x7f0da6b46b38", + "kind": "IntegerLiteral", + "range": { + "begin": { + "offset": 35771, + "col": 57, + "tokLen": 2 + }, + "end": { + "offset": 35771, + "col": 57, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "value": "10" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6b46d80", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 35779, + "line": 1169, + "col": 5, + "tokLen": 6 + }, + "end": { + "offset": 35813, + "col": 39, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b46d68", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35786, + "col": 12, + "tokLen": 3 + }, + "end": { + "offset": 35813, + "col": 39, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "unsigned int", + "qualType": "uint32_t", + "typeAliasDeclId": "0x2c0e6ce8" + }, + "valueCategory": "prvalue", + "castKind": "IntegralCast", + "inner": [ + { + "id": "0x7f0da6b46d00", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 35786, + "col": 12, + "tokLen": 3 + }, + "end": { + "offset": 35813, + "col": 39, + "tokLen": 1 + } + }, + "type": { + "qualType": "unsigned long" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b46ce8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35786, + "col": 12, + "tokLen": 3 + }, + "end": { + "offset": 35791, + "col": 17, + "tokLen": 5 + } + }, + "type": { + "qualType": "unsigned long (*)(const string &, size_t *, int)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b46c60", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35786, + "col": 12, + "tokLen": 3 + }, + "end": { + "offset": 35791, + "col": 17, + "tokLen": 5 + } + }, + "type": { + "qualType": "unsigned long (const string &, size_t *, int)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2c8d3880", + "kind": "FunctionDecl", + "name": "stoul", + "type": { + "qualType": "unsigned long (const string &, size_t *, int)" + } + } + } + ] + }, + { + "id": "0x7f0da6b46c10", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35797, + "col": 23, + "tokLen": 1 + }, + "end": { + "offset": 35797, + "col": 23, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b465f0", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b46d38", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35800, + "col": 26, + "tokLen": 7 + }, + "end": { + "offset": 35800, + "col": 26, + "tokLen": 7 + } + }, + "type": { + "qualType": "size_t *" + }, + "valueCategory": "prvalue", + "castKind": "NullToPointer", + "inner": [ + { + "id": "0x7f0da6b46c30", + "kind": "CXXNullPtrLiteralExpr", + "range": { + "begin": { + "offset": 35800, + "col": 26, + "tokLen": 7 + }, + "end": { + "offset": 35800, + "col": 26, + "tokLen": 7 + } + }, + "type": { + "qualType": "std::nullptr_t" + }, + "valueCategory": "prvalue" + } + ] + }, + { + "id": "0x7f0da6b46d50", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35809, + "col": 35, + "tokLen": 4 + }, + "end": { + "offset": 35809, + "col": 35, + "tokLen": 4 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "inner": [ + { + "id": "0x7f0da6b46c40", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35809, + "col": 35, + "tokLen": 4 + }, + "end": { + "offset": 35809, + "col": 35, + "tokLen": 4 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b46888", + "kind": "VarDecl", + "name": "base", + "type": { + "qualType": "int" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +}, +{ + "id": "0x7f0da6b46ed8", + "kind": "FunctionDecl", + "loc": { + "offset": 35840, + "file": "ToString.cpp", + "line": 1172, + "col": 22, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 35819, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 35975, + "line": 1175, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d37ccc8", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToImEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "uint64_t (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "unsigned long" + }, + "inner": [ + { + "id": "0x2bf08db0", + "kind": "BuiltinType", + "type": { + "qualType": "unsigned long" + } + } + ] + }, + { + "id": "0x7f0da6b46e18", + "kind": "ParmVarDecl", + "loc": { + "offset": 35868, + "line": 1172, + "col": 50, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 35849, + "col": 31, + "tokLen": 5 + }, + "end": { + "offset": 35868, + "col": 50, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6b475b0", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 35871, + "col": 53, + "tokLen": 1 + }, + "end": { + "offset": 35975, + "line": 1175, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b473a8", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 35877, + "line": 1173, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 35931, + "col": 59, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b470a8", + "kind": "VarDecl", + "loc": { + "offset": 35881, + "col": 9, + "tokLen": 4 + }, + "range": { + "begin": { + "offset": 35877, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 35929, + "col": 57, + "tokLen": 2 + } + }, + "isUsed": true, + "name": "base", + "type": { + "qualType": "int" + }, + "init": "c", + "inner": [ + { + "id": "0x7f0da6b47378", + "kind": "ConditionalOperator", + "range": { + "begin": { + "offset": 35888, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 35929, + "col": 57, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b47318", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 35888, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 35917, + "col": 45, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "!=", + "inner": [ + { + "id": "0x7f0da6b471f0", + "kind": "CXXMemberCallExpr", + "range": { + "begin": { + "offset": 35888, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 35899, + "col": 27, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b471c0", + "kind": "MemberExpr", + "range": { + "begin": { + "offset": 35888, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 35890, + "col": 18, + "tokLen": 4 + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "name": "find", + "isArrow": false, + "referencedMemberDecl": "0x2c8ca830", + "inner": [ + { + "id": "0x7f0da6b47110", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35888, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 35888, + "col": 16, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b46e18", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + }, + { + "id": "0x7f0da6b47220", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35895, + "col": 23, + "tokLen": 4 + }, + "end": { + "offset": 35895, + "col": 23, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b471a0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 35895, + "col": 23, + "tokLen": 4 + }, + "end": { + "offset": 35895, + "col": 23, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char[3]" + }, + "valueCategory": "lvalue", + "value": "\"0x\"" + } + ] + }, + { + "id": "0x7f0da6b47238", + "kind": "CXXDefaultArgExpr", + "range": { + "begin": {}, + "end": {} + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue" + } + ] + }, + { + "id": "0x7f0da6b47300", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35904, + "col": 32, + "tokLen": 3 + }, + "end": { + "offset": 35917, + "col": 45, + "tokLen": 4 + } + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "inner": [ + { + "id": "0x7f0da6b472d0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35904, + "col": 32, + "tokLen": 3 + }, + "end": { + "offset": 35917, + "col": 45, + "tokLen": 4 + } + }, + "type": { + "desugaredQualType": "const unsigned long", + "qualType": "const typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d0eda20", + "kind": "VarDecl", + "name": "npos", + "type": { + "desugaredQualType": "const unsigned long", + "qualType": "const typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + } + }, + "nonOdrUseReason": "constant" + } + ] + } + ] + }, + { + "id": "0x7f0da6b47338", + "kind": "IntegerLiteral", + "range": { + "begin": { + "offset": 35924, + "col": 52, + "tokLen": 2 + }, + "end": { + "offset": 35924, + "col": 52, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "value": "16" + }, + { + "id": "0x7f0da6b47358", + "kind": "IntegerLiteral", + "range": { + "begin": { + "offset": 35929, + "col": 57, + "tokLen": 2 + }, + "end": { + "offset": 35929, + "col": 57, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "value": "10" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6b475a0", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 35937, + "line": 1174, + "col": 5, + "tokLen": 6 + }, + "end": { + "offset": 35972, + "col": 40, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b47588", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35944, + "col": 12, + "tokLen": 3 + }, + "end": { + "offset": 35972, + "col": 40, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "uint64_t", + "typeAliasDeclId": "0x2c0e6d50" + }, + "valueCategory": "prvalue", + "castKind": "IntegralCast", + "inner": [ + { + "id": "0x7f0da6b47520", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 35944, + "col": 12, + "tokLen": 3 + }, + "end": { + "offset": 35972, + "col": 40, + "tokLen": 1 + } + }, + "type": { + "qualType": "unsigned long long" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b47508", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35944, + "col": 12, + "tokLen": 3 + }, + "end": { + "offset": 35949, + "col": 17, + "tokLen": 6 + } + }, + "type": { + "qualType": "unsigned long long (*)(const string &, size_t *, int)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b47480", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35944, + "col": 12, + "tokLen": 3 + }, + "end": { + "offset": 35949, + "col": 17, + "tokLen": 6 + } + }, + "type": { + "qualType": "unsigned long long (const string &, size_t *, int)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2c8d5880", + "kind": "FunctionDecl", + "name": "stoull", + "type": { + "qualType": "unsigned long long (const string &, size_t *, int)" + } + } + } + ] + }, + { + "id": "0x7f0da6b47430", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35956, + "col": 24, + "tokLen": 1 + }, + "end": { + "offset": 35956, + "col": 24, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b46e18", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b47558", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35959, + "col": 27, + "tokLen": 7 + }, + "end": { + "offset": 35959, + "col": 27, + "tokLen": 7 + } + }, + "type": { + "qualType": "size_t *" + }, + "valueCategory": "prvalue", + "castKind": "NullToPointer", + "inner": [ + { + "id": "0x7f0da6b47450", + "kind": "CXXNullPtrLiteralExpr", + "range": { + "begin": { + "offset": 35959, + "col": 27, + "tokLen": 7 + }, + "end": { + "offset": 35959, + "col": 27, + "tokLen": 7 + } + }, + "type": { + "qualType": "std::nullptr_t" + }, + "valueCategory": "prvalue" + } + ] + }, + { + "id": "0x7f0da6b47570", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 35968, + "col": 36, + "tokLen": 4 + }, + "end": { + "offset": 35968, + "col": 36, + "tokLen": 4 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "inner": [ + { + "id": "0x7f0da6b47460", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 35968, + "col": 36, + "tokLen": 4 + }, + "end": { + "offset": 35968, + "col": 36, + "tokLen": 4 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b470a8", + "kind": "VarDecl", + "name": "base", + "type": { + "qualType": "int" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +}, +{ + "id": "0x7f0da6b47700", + "kind": "FunctionDecl", + "loc": { + "offset": 35994, + "file": "ToString.cpp", + "line": 1177, + "col": 17, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 35978, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 36127, + "line": 1180, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d37d1a0", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIiEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "int (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "int" + }, + "inner": [ + { + "id": "0x2bf08cf0", + "kind": "BuiltinType", + "type": { + "qualType": "int" + } + } + ] + }, + { + "id": "0x7f0da6b47638", + "kind": "ParmVarDecl", + "loc": { + "offset": 36022, + "line": 1177, + "col": 45, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 36003, + "col": 26, + "tokLen": 5 + }, + "end": { + "offset": 36022, + "col": 45, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6b47d70", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 36025, + "col": 48, + "tokLen": 1 + }, + "end": { + "offset": 36127, + "line": 1180, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b47bd8", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 36031, + "line": 1178, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 36085, + "col": 59, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b478d8", + "kind": "VarDecl", + "loc": { + "offset": 36035, + "col": 9, + "tokLen": 4 + }, + "range": { + "begin": { + "offset": 36031, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 36083, + "col": 57, + "tokLen": 2 + } + }, + "isUsed": true, + "name": "base", + "type": { + "qualType": "int" + }, + "init": "c", + "inner": [ + { + "id": "0x7f0da6b47ba8", + "kind": "ConditionalOperator", + "range": { + "begin": { + "offset": 36042, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 36083, + "col": 57, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b47b48", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 36042, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 36071, + "col": 45, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "!=", + "inner": [ + { + "id": "0x7f0da6b47a20", + "kind": "CXXMemberCallExpr", + "range": { + "begin": { + "offset": 36042, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 36053, + "col": 27, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b479f0", + "kind": "MemberExpr", + "range": { + "begin": { + "offset": 36042, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 36044, + "col": 18, + "tokLen": 4 + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "name": "find", + "isArrow": false, + "referencedMemberDecl": "0x2c8ca830", + "inner": [ + { + "id": "0x7f0da6b47940", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 36042, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 36042, + "col": 16, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b47638", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + }, + { + "id": "0x7f0da6b47a50", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 36049, + "col": 23, + "tokLen": 4 + }, + "end": { + "offset": 36049, + "col": 23, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b479d0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 36049, + "col": 23, + "tokLen": 4 + }, + "end": { + "offset": 36049, + "col": 23, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char[3]" + }, + "valueCategory": "lvalue", + "value": "\"0x\"" + } + ] + }, + { + "id": "0x7f0da6b47a68", + "kind": "CXXDefaultArgExpr", + "range": { + "begin": {}, + "end": {} + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue" + } + ] + }, + { + "id": "0x7f0da6b47b30", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 36058, + "col": 32, + "tokLen": 3 + }, + "end": { + "offset": 36071, + "col": 45, + "tokLen": 4 + } + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "inner": [ + { + "id": "0x7f0da6b47b00", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 36058, + "col": 32, + "tokLen": 3 + }, + "end": { + "offset": 36071, + "col": 45, + "tokLen": 4 + } + }, + "type": { + "desugaredQualType": "const unsigned long", + "qualType": "const typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d0eda20", + "kind": "VarDecl", + "name": "npos", + "type": { + "desugaredQualType": "const unsigned long", + "qualType": "const typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + } + }, + "nonOdrUseReason": "constant" + } + ] + } + ] + }, + { + "id": "0x7f0da6b47b68", + "kind": "IntegerLiteral", + "range": { + "begin": { + "offset": 36078, + "col": 52, + "tokLen": 2 + }, + "end": { + "offset": 36078, + "col": 52, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "value": "16" + }, + { + "id": "0x7f0da6b47b88", + "kind": "IntegerLiteral", + "range": { + "begin": { + "offset": 36083, + "col": 57, + "tokLen": 2 + }, + "end": { + "offset": 36083, + "col": 57, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "value": "10" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6b47d60", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 36091, + "line": 1179, + "col": 5, + "tokLen": 6 + }, + "end": { + "offset": 36124, + "col": 38, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b47cf8", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 36098, + "col": 12, + "tokLen": 3 + }, + "end": { + "offset": 36124, + "col": 38, + "tokLen": 1 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b47ce0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 36098, + "col": 12, + "tokLen": 3 + }, + "end": { + "offset": 36103, + "col": 17, + "tokLen": 4 + } + }, + "type": { + "qualType": "int (*)(const string &, size_t *, int)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b47cb0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 36098, + "col": 12, + "tokLen": 3 + }, + "end": { + "offset": 36103, + "col": 17, + "tokLen": 4 + } + }, + "type": { + "qualType": "int (const string &, size_t *, int)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2c88ede0", + "kind": "FunctionDecl", + "name": "stoi", + "type": { + "qualType": "int (const string &, size_t *, int)" + } + } + } + ] + }, + { + "id": "0x7f0da6b47c60", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 36108, + "col": 22, + "tokLen": 1 + }, + "end": { + "offset": 36108, + "col": 22, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b47638", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b47d30", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 36111, + "col": 25, + "tokLen": 7 + }, + "end": { + "offset": 36111, + "col": 25, + "tokLen": 7 + } + }, + "type": { + "qualType": "size_t *" + }, + "valueCategory": "prvalue", + "castKind": "NullToPointer", + "inner": [ + { + "id": "0x7f0da6b47c80", + "kind": "CXXNullPtrLiteralExpr", + "range": { + "begin": { + "offset": 36111, + "col": 25, + "tokLen": 7 + }, + "end": { + "offset": 36111, + "col": 25, + "tokLen": 7 + } + }, + "type": { + "qualType": "std::nullptr_t" + }, + "valueCategory": "prvalue" + } + ] + }, + { + "id": "0x7f0da6b47d48", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 36120, + "col": 34, + "tokLen": 4 + }, + "end": { + "offset": 36120, + "col": 34, + "tokLen": 4 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "inner": [ + { + "id": "0x7f0da6b47c90", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 36120, + "col": 34, + "tokLen": 4 + }, + "end": { + "offset": 36120, + "col": 34, + "tokLen": 4 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b478d8", + "kind": "VarDecl", + "name": "base", + "type": { + "qualType": "int" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] +}, +{ + "id": "0x7f0da6b47eb8", + "kind": "FunctionDecl", + "loc": { + "offset": 36147, + "file": "ToString.cpp", + "line": 1182, + "col": 18, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 36130, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 36391, + "line": 1192, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d37d648", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIbEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "bool (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "bool" + }, + "inner": [ + { + "id": "0x2bf08c70", + "kind": "BuiltinType", + "type": { + "qualType": "bool" + } + } + ] + }, + { + "id": "0x7f0da6b47df8", + "kind": "ParmVarDecl", + "loc": { + "offset": 36175, + "line": 1182, + "col": 46, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 36156, + "col": 27, + "tokLen": 5 + }, + "end": { + "offset": 36175, + "col": 46, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6b48578", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 36178, + "col": 49, + "tokLen": 1 + }, + "end": { + "offset": 36391, + "line": 1192, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b48248", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 36184, + "line": 1183, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 36217, + "col": 38, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b48088", + "kind": "VarDecl", + "loc": { + "offset": 36188, + "col": 9, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 36184, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 36216, + "col": 37, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "i", + "type": { + "qualType": "int" + }, + "init": "c", + "inner": [ + { + "id": "0x7f0da6b481f8", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 36192, + "col": 13, + "tokLen": 3 + }, + "end": { + "offset": 36216, + "col": 37, + "tokLen": 1 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b481e0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 36192, + "col": 13, + "tokLen": 3 + }, + "end": { + "offset": 36197, + "col": 18, + "tokLen": 4 + } + }, + "type": { + "qualType": "int (*)(const string &, size_t *, int)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b481b0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 36192, + "col": 13, + "tokLen": 3 + }, + "end": { + "offset": 36197, + "col": 18, + "tokLen": 4 + } + }, + "type": { + "qualType": "int (const string &, size_t *, int)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2c88ede0", + "kind": "FunctionDecl", + "name": "stoi", + "type": { + "qualType": "int (const string &, size_t *, int)" + } + } + } + ] + }, + { + "id": "0x7f0da6b48160", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 36202, + "col": 23, + "tokLen": 1 + }, + "end": { + "offset": 36202, + "col": 23, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b47df8", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b48230", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 36205, + "col": 26, + "tokLen": 7 + }, + "end": { + "offset": 36205, + "col": 26, + "tokLen": 7 + } + }, + "type": { + "qualType": "size_t *" + }, + "valueCategory": "prvalue", + "castKind": "NullToPointer", + "inner": [ + { + "id": "0x7f0da6b48180", + "kind": "CXXNullPtrLiteralExpr", + "range": { + "begin": { + "offset": 36205, + "col": 26, + "tokLen": 7 + }, + "end": { + "offset": 36205, + "col": 26, + "tokLen": 7 + } + }, + "type": { + "qualType": "std::nullptr_t" + }, + "valueCategory": "prvalue" + } + ] + }, + { + "id": "0x7f0da6b48190", + "kind": "IntegerLiteral", + "range": { + "begin": { + "offset": 36214, + "col": 35, + "tokLen": 2 + }, + "end": { + "offset": 36214, + "col": 35, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "value": "10" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6b48298", + "kind": "SwitchStmt", + "range": { + "begin": { + "offset": 36223, + "line": 1184, + "col": 5, + "tokLen": 6 + }, + "end": { + "offset": 36389, + "line": 1191, + "col": 5, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b48280", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 36231, + "line": 1184, + "col": 13, + "tokLen": 1 + }, + "end": { + "offset": 36231, + "col": 13, + "tokLen": 1 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "inner": [ + { + "id": "0x7f0da6b48260", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 36231, + "col": 13, + "tokLen": 1 + }, + "end": { + "offset": 36231, + "col": 13, + "tokLen": 1 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b48088", + "kind": "VarDecl", + "name": "i", + "type": { + "qualType": "int" + } + } + } + ] + }, + { + "id": "0x7f0da6b48550", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 36234, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 36389, + "line": 1191, + "col": 5, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b48300", + "kind": "CaseStmt", + "range": { + "begin": { + "offset": 36240, + "line": 1185, + "col": 5, + "tokLen": 4 + }, + "end": { + "offset": 36263, + "line": 1186, + "col": 16, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6b482e0", + "kind": "ConstantExpr", + "range": { + "begin": { + "offset": 36245, + "line": 1185, + "col": 10, + "tokLen": 1 + }, + "end": { + "offset": 36245, + "col": 10, + "tokLen": 1 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "value": "0", + "inner": [ + { + "id": "0x7f0da6b482c0", + "kind": "IntegerLiteral", + "range": { + "begin": { + "offset": 36245, + "col": 10, + "tokLen": 1 + }, + "end": { + "offset": 36245, + "col": 10, + "tokLen": 1 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "value": "0" + } + ] + }, + { + "id": "0x7f0da6b48338", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 36256, + "line": 1186, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 36263, + "col": 16, + "tokLen": 5 + } + }, + "inner": [ + { + "id": "0x7f0da6b48328", + "kind": "CXXBoolLiteralExpr", + "range": { + "begin": { + "offset": 36263, + "col": 16, + "tokLen": 5 + }, + "end": { + "offset": 36263, + "col": 16, + "tokLen": 5 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "value": false + } + ] + } + ] + }, + { + "id": "0x7f0da6b48388", + "kind": "CaseStmt", + "range": { + "begin": { + "offset": 36274, + "line": 1187, + "col": 5, + "tokLen": 4 + }, + "end": { + "offset": 36297, + "line": 1188, + "col": 16, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6b48368", + "kind": "ConstantExpr", + "range": { + "begin": { + "offset": 36279, + "line": 1187, + "col": 10, + "tokLen": 1 + }, + "end": { + "offset": 36279, + "col": 10, + "tokLen": 1 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "value": "1", + "inner": [ + { + "id": "0x7f0da6b48348", + "kind": "IntegerLiteral", + "range": { + "begin": { + "offset": 36279, + "col": 10, + "tokLen": 1 + }, + "end": { + "offset": 36279, + "col": 10, + "tokLen": 1 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "value": "1" + } + ] + }, + { + "id": "0x7f0da6b483c0", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 36290, + "line": 1188, + "col": 9, + "tokLen": 6 + }, + "end": { + "offset": 36297, + "col": 16, + "tokLen": 4 + } + }, + "inner": [ + { + "id": "0x7f0da6b483b0", + "kind": "CXXBoolLiteralExpr", + "range": { + "begin": { + "offset": 36297, + "col": 16, + "tokLen": 4 + }, + "end": { + "offset": 36297, + "col": 16, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "value": true + } + ] + } + ] + }, + { + "id": "0x7f0da6b48530", + "kind": "DefaultStmt", + "range": { + "begin": { + "offset": 36307, + "line": 1189, + "col": 5, + "tokLen": 7 + }, + "end": { + "offset": 36382, + "line": 1190, + "col": 67, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b48518", + "kind": "ExprWithCleanups", + "range": { + "begin": { + "offset": 36324, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 36382, + "col": 67, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "cleanupsHaveSideEffects": true, + "inner": [ + { + "id": "0x7f0da6b48500", + "kind": "CXXThrowExpr", + "range": { + "begin": { + "offset": 36324, + "col": 9, + "tokLen": 5 + }, + "end": { + "offset": 36382, + "col": 67, + "tokLen": 1 + } + }, + "type": { + "qualType": "void" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b484d0", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 36330, + "col": 15, + "tokLen": 12 + }, + "end": { + "offset": 36382, + "col": 67, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (RuntimeError &&) noexcept" + }, + "elidable": true, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b484b8", + "kind": "MaterializeTemporaryExpr", + "range": { + "begin": { + "offset": 36330, + "col": 15, + "tokLen": 12 + }, + "end": { + "offset": 36382, + "col": 67, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "xvalue", + "storageDuration": "full expression", + "inner": [ + { + "id": "0x7f0da6b48490", + "kind": "CXXFunctionalCastExpr", + "range": { + "begin": { + "offset": 36330, + "col": 15, + "tokLen": 12 + }, + "end": { + "offset": 36382, + "col": 67, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "castKind": "ConstructorConversion", + "conversionFunc": { + "id": "0x2c968a58", + "kind": "CXXConstructorDecl", + "name": "RuntimeError", + "type": { + "qualType": "void (const char *)" + } + }, + "inner": [ + { + "id": "0x7f0da6b48470", + "kind": "CXXBindTemporaryExpr", + "range": { + "begin": { + "offset": 36330, + "col": 15, + "tokLen": 12 + }, + "end": { + "offset": 36382, + "col": 67, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "temp": "0x7f0da6b48468", + "dtor": { + "id": "0x2c9692d0", + "kind": "CXXDestructorDecl", + "name": "~RuntimeError", + "type": { + "qualType": "void () noexcept" + } + }, + "inner": [ + { + "id": "0x7f0da6b48438", + "kind": "CXXConstructExpr", + "range": { + "begin": { + "offset": 36330, + "col": 15, + "tokLen": 12 + }, + "end": { + "offset": 36382, + "col": 67, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "sls::RuntimeError", + "qualType": "RuntimeError" + }, + "valueCategory": "prvalue", + "ctorType": { + "qualType": "void (const char *)" + }, + "hadMultipleCandidates": true, + "constructionKind": "complete", + "inner": [ + { + "id": "0x7f0da6b48420", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 36343, + "col": 28, + "tokLen": 39 + }, + "end": { + "offset": 36343, + "col": 28, + "tokLen": 39 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b483e0", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 36343, + "col": 28, + "tokLen": 39 + }, + "end": { + "offset": 36343, + "col": 28, + "tokLen": 39 + } + }, + "type": { + "qualType": "const char[38]" + }, + "valueCategory": "lvalue", + "value": "\"Unknown boolean. Expecting be 0 or 1.\"" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +}, +{ + "id": "0x7f0da6b486c8", + "kind": "FunctionDecl", + "loc": { + "offset": 36414, + "file": "ToString.cpp", + "line": 1194, + "col": 21, + "tokLen": 8 + }, + "range": { + "begin": { + "offset": 36394, + "col": 1, + "tokLen": 8 + }, + "end": { + "offset": 36547, + "line": 1197, + "col": 1, + "tokLen": 1 + } + }, + "previousDecl": "0x2d37db18", + "name": "StringTo", + "mangledName": "_ZN3sls8StringToIlEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", + "type": { + "qualType": "int64_t (const std::string &)" + }, + "inner": [ + { + "kind": "TemplateArgument", + "type": { + "qualType": "long" + }, + "inner": [ + { + "id": "0x2bf08d10", + "kind": "BuiltinType", + "type": { + "qualType": "long" + } + } + ] + }, + { + "id": "0x7f0da6b48600", + "kind": "ParmVarDecl", + "loc": { + "offset": 36442, + "line": 1194, + "col": 49, + "tokLen": 1 + }, + "range": { + "begin": { + "offset": 36423, + "col": 30, + "tokLen": 5 + }, + "end": { + "offset": 36442, + "col": 49, + "tokLen": 1 + } + }, + "isUsed": true, + "name": "s", + "type": { + "qualType": "const std::string &" + } + }, + { + "id": "0x7f0da6b48d88", + "kind": "CompoundStmt", + "range": { + "begin": { + "offset": 36445, + "col": 52, + "tokLen": 1 + }, + "end": { + "offset": 36547, + "line": 1197, + "col": 1, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b48b98", + "kind": "DeclStmt", + "range": { + "begin": { + "offset": 36451, + "line": 1195, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 36505, + "col": 59, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b48898", + "kind": "VarDecl", + "loc": { + "offset": 36455, + "col": 9, + "tokLen": 4 + }, + "range": { + "begin": { + "offset": 36451, + "col": 5, + "tokLen": 3 + }, + "end": { + "offset": 36503, + "col": 57, + "tokLen": 2 + } + }, + "isUsed": true, + "name": "base", + "type": { + "qualType": "int" + }, + "init": "c", + "inner": [ + { + "id": "0x7f0da6b48b68", + "kind": "ConditionalOperator", + "range": { + "begin": { + "offset": 36462, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 36503, + "col": 57, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b48b08", + "kind": "BinaryOperator", + "range": { + "begin": { + "offset": 36462, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 36491, + "col": 45, + "tokLen": 4 + } + }, + "type": { + "qualType": "bool" + }, + "valueCategory": "prvalue", + "opcode": "!=", + "inner": [ + { + "id": "0x7f0da6b489e0", + "kind": "CXXMemberCallExpr", + "range": { + "begin": { + "offset": 36462, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 36473, + "col": 27, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b489b0", + "kind": "MemberExpr", + "range": { + "begin": { + "offset": 36462, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 36464, + "col": 18, + "tokLen": 4 + } + }, + "type": { + "qualType": "" + }, + "valueCategory": "prvalue", + "name": "find", + "isArrow": false, + "referencedMemberDecl": "0x2c8ca830", + "inner": [ + { + "id": "0x7f0da6b48900", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 36462, + "col": 16, + "tokLen": 1 + }, + "end": { + "offset": 36462, + "col": 16, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b48600", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + } + ] + }, + { + "id": "0x7f0da6b48a10", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 36469, + "col": 23, + "tokLen": 4 + }, + "end": { + "offset": 36469, + "col": 23, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char *" + }, + "valueCategory": "prvalue", + "castKind": "ArrayToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b48990", + "kind": "StringLiteral", + "range": { + "begin": { + "offset": 36469, + "col": 23, + "tokLen": 4 + }, + "end": { + "offset": 36469, + "col": 23, + "tokLen": 4 + } + }, + "type": { + "qualType": "const char[3]" + }, + "valueCategory": "lvalue", + "value": "\"0x\"" + } + ] + }, + { + "id": "0x7f0da6b48a28", + "kind": "CXXDefaultArgExpr", + "range": { + "begin": {}, + "end": {} + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue" + } + ] + }, + { + "id": "0x7f0da6b48af0", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 36478, + "col": 32, + "tokLen": 3 + }, + "end": { + "offset": 36491, + "col": 45, + "tokLen": 4 + } + }, + "type": { + "desugaredQualType": "unsigned long", + "qualType": "typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "inner": [ + { + "id": "0x7f0da6b48ac0", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 36478, + "col": 32, + "tokLen": 3 + }, + "end": { + "offset": 36491, + "col": 45, + "tokLen": 4 + } + }, + "type": { + "desugaredQualType": "const unsigned long", + "qualType": "const typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2d0eda20", + "kind": "VarDecl", + "name": "npos", + "type": { + "desugaredQualType": "const unsigned long", + "qualType": "const typename basic_string, allocator>::size_type", + "typeAliasDeclId": "0x2c8ab7b0" + } + }, + "nonOdrUseReason": "constant" + } + ] + } + ] + }, + { + "id": "0x7f0da6b48b28", + "kind": "IntegerLiteral", + "range": { + "begin": { + "offset": 36498, + "col": 52, + "tokLen": 2 + }, + "end": { + "offset": 36498, + "col": 52, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "value": "16" + }, + { + "id": "0x7f0da6b48b48", + "kind": "IntegerLiteral", + "range": { + "begin": { + "offset": 36503, + "col": 57, + "tokLen": 2 + }, + "end": { + "offset": 36503, + "col": 57, + "tokLen": 2 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "value": "10" + } + ] + } + ] + } + ] + }, + { + "id": "0x7f0da6b48d78", + "kind": "ReturnStmt", + "range": { + "begin": { + "offset": 36511, + "line": 1196, + "col": 5, + "tokLen": 6 + }, + "end": { + "offset": 36544, + "col": 38, + "tokLen": 1 + } + }, + "inner": [ + { + "id": "0x7f0da6b48d10", + "kind": "CallExpr", + "range": { + "begin": { + "offset": 36518, + "col": 12, + "tokLen": 3 + }, + "end": { + "offset": 36544, + "col": 38, + "tokLen": 1 + } + }, + "type": { + "qualType": "long" + }, + "valueCategory": "prvalue", + "inner": [ + { + "id": "0x7f0da6b48cf8", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 36518, + "col": 12, + "tokLen": 3 + }, + "end": { + "offset": 36523, + "col": 17, + "tokLen": 4 + } + }, + "type": { + "qualType": "long (*)(const string &, size_t *, int)" + }, + "valueCategory": "prvalue", + "castKind": "FunctionToPointerDecay", + "inner": [ + { + "id": "0x7f0da6b48c70", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 36518, + "col": 12, + "tokLen": 3 + }, + "end": { + "offset": 36523, + "col": 17, + "tokLen": 4 + } + }, + "type": { + "qualType": "long (const string &, size_t *, int)" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x2c8d05c0", + "kind": "FunctionDecl", + "name": "stol", + "type": { + "qualType": "long (const string &, size_t *, int)" + } + } + } + ] + }, + { + "id": "0x7f0da6b48c20", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 36528, + "col": 22, + "tokLen": 1 + }, + "end": { + "offset": 36528, + "col": 22, + "tokLen": 1 + } + }, + "type": { + "desugaredQualType": "const std::basic_string", + "qualType": "const std::string", + "typeAliasDeclId": "0x2c6c0c90" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b48600", + "kind": "ParmVarDecl", + "name": "s", + "type": { + "qualType": "const std::string &" + } + } + }, + { + "id": "0x7f0da6b48d48", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 36531, + "col": 25, + "tokLen": 7 + }, + "end": { + "offset": 36531, + "col": 25, + "tokLen": 7 + } + }, + "type": { + "qualType": "size_t *" + }, + "valueCategory": "prvalue", + "castKind": "NullToPointer", + "inner": [ + { + "id": "0x7f0da6b48c40", + "kind": "CXXNullPtrLiteralExpr", + "range": { + "begin": { + "offset": 36531, + "col": 25, + "tokLen": 7 + }, + "end": { + "offset": 36531, + "col": 25, + "tokLen": 7 + } + }, + "type": { + "qualType": "std::nullptr_t" + }, + "valueCategory": "prvalue" + } + ] + }, + { + "id": "0x7f0da6b48d60", + "kind": "ImplicitCastExpr", + "range": { + "begin": { + "offset": 36540, + "col": 34, + "tokLen": 4 + }, + "end": { + "offset": 36540, + "col": 34, + "tokLen": 4 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "prvalue", + "castKind": "LValueToRValue", + "inner": [ + { + "id": "0x7f0da6b48c50", + "kind": "DeclRefExpr", + "range": { + "begin": { + "offset": 36540, + "col": 34, + "tokLen": 4 + }, + "end": { + "offset": 36540, + "col": 34, + "tokLen": 4 + } + }, + "type": { + "qualType": "int" + }, + "valueCategory": "lvalue", + "referencedDecl": { + "id": "0x7f0da6b48898", + "kind": "VarDecl", + "name": "base", + "type": { + "qualType": "int" + } + } + } + ] + } + ] + } + ] + } + ] + } + ] +} +] \ No newline at end of file diff --git a/slsDetectorSoftware/generator/autocomplete/slsdet-completion.bash b/slsDetectorSoftware/generator/autocomplete/slsdet-completion.bash new file mode 100644 index 000000000..2ae81a4b8 --- /dev/null +++ b/slsDetectorSoftware/generator/autocomplete/slsdet-completion.bash @@ -0,0 +1,177 @@ +#### simpler version of autocomplete.sh to understand the logic +#### each command has its own function when called it will produce the possible values for autocompletion + + +_sd() { + + # Reassemble command line words, excluding specified characters from the + # list of word completion separators (COMP_WORDBREAKS). + # @param $1 chars Characters out of $COMP_WORDBREAKS which should + # NOT be considered word breaks. This is useful for things like scp where + # we want to return host:path and not only path, so we would pass the + # colon (:) as $1 here. + # @param $2 words Name of variable to return words to + # @param $3 cword Name of variable to return cword to + # + _comp__reassemble_words() +{ + local exclude="" i j line ref + # Exclude word separator characters? + if [[ $1 ]]; then + # Yes, exclude word separator characters; + # Exclude only those characters, which were really included + exclude="[${1//[^$COMP_WORDBREAKS]/}]" + fi + + # Default to cword unchanged + printf -v "$3" %s "$COMP_CWORD" + # Are characters excluded which were former included? + if [[ $exclude ]]; then + # Yes, list of word completion separators has shrunk; + line=$COMP_LINE + # Re-assemble words to complete + for ((i = 0, j = 0; i < ${#COMP_WORDS[@]}; i++, j++)); do + # Is current word not word 0 (the command itself) and is word not + # empty and is word made up of just word separator characters to + # be excluded and is current word not preceded by whitespace in + # original line? + while [[ $i -gt 0 && ${COMP_WORDS[i]} == +($exclude) ]]; do + # Is word separator not preceded by whitespace in original line + # and are we not going to append to word 0 (the command + # itself), then append to current word. + [[ $line != [[:blank:]]* ]] && ((j >= 2)) && ((j--)) + # Append word separator to current or new word + ref="$2[$j]" + printf -v "$ref" %s "${!ref-}${COMP_WORDS[i]}" + # Indicate new cword + ((i == COMP_CWORD)) && printf -v "$3" %s "$j" + # Remove optional whitespace + word separator from line copy + line=${line#*"${COMP_WORDS[i]}"} + # Indicate next word if available, else end *both* while and + # for loop + if ((i < ${#COMP_WORDS[@]} - 1)); then + ((i++)) + else + break 2 + fi + # Start new word if word separator in original line is + # followed by whitespace. + [[ $line == [[:blank:]]* ]] && ((j++)) + done + # Append word to current word + ref="$2[$j]" + printf -v "$ref" %s "${!ref-}${COMP_WORDS[i]}" + # Remove optional whitespace + word from line copy + line=${line#*"${COMP_WORDS[i]}"} + # Indicate new cword + ((i == COMP_CWORD)) && printf -v "$3" %s "$j" + done + ((i == COMP_CWORD)) && printf -v "$3" %s "$j" + else + # No, list of word completions separators hasn't changed; + for i in "${!COMP_WORDS[@]}"; do + printf -v "$2[i]" %s "${COMP_WORDS[i]}" + done + fi +} + + + + __exptime(){ + if [ "${IS_GET}" == "1" ]; then + if [ "${cword}" == "2" ]; then + FCN_RETURN="s ms us ns" + fi + else + if [ "${cword}" == "2" ]; then + FCN_RETURN="" + fi + + if [ "${cword}" == "3" ]; then + FCN_RETURN="s ms us ns" + fi + + fi + } + + # trimbits will activate IS_PATH and signal that its input is a path + __trimbits(){ + if [ "${IS_GET}" == "1" ]; then + if [ "${cword}" == "2" ]; then + FCN_RETURN="" + IS_PATH=1 + fi + else + if [ "${cword}" == "2" ]; then + FCN_RETURN="" + IS_PATH=1 + fi + fi + } + + local cword words=() + _comp__reassemble_words ":" words cword + local FCN_RETURN="" + local IS_PATH=0 + COMPREPLY=() + local OPTIONS_NEW="" +# _get_comp_words_by_ref -n : cur + local cur=${words[cword]} + # check the action (get or put) + if [ "${words[0]}" == "sls_detector_get" ]; then + local IS_GET=1 + else + local IS_GET=0 + fi + + + # if no command is written, autocomplete with the commands + if [[ ${cword} -eq 1 ]]; then + local SLS_COMMANDS="trimbits exptime" + local SLS_COMMANDS_NEW="" + + case "$cur" in + [0-9]*:*) + local suggestions=($(compgen -W "${SLS_COMMANDS}" -- "${cur#*:}")) + COMPREPLY=( ${suggestions[*]} ) + ;; + [0-9]*) + COMPREPLY=() + ;; + *) + COMPREPLY=( $( compgen -W "$SLS_COMMANDS -h" -- "$cur" ) );; + + esac + return 0 + fi + + # if a command is written, autocomplete with the options + # call the function for the command + __"${words[1]##*:}" + + # if IS_PATH is activated, autocomplete with the path + if [[ ${IS_PATH} -eq 1 ]]; then + COMPREPLY=($(compgen -f -- "${cur}")) + return 0 + fi + + # autocomplete with the options + COMPREPLY=($(compgen -W "${FCN_RETURN}" -- "${cur}")) + + + +} + +complete -F _sd -o filenames sls_detector_put +complete -F _sd -o filenames sls_detector_get + +complete -F _sd -o filenames g +complete -F _sd -o filenames p + +complete -F _sd -o filenames detg +complete -F _sd -o filenames detp + + +complete -F _sd -o filenames sls_detector +complete -F _sd -o filenames det + diff --git a/slsDetectorSoftware/generator/autocomplete/zsh_autocomplete.in.sh b/slsDetectorSoftware/generator/autocomplete/zsh_autocomplete.in.sh new file mode 100644 index 000000000..cbf8fad6b --- /dev/null +++ b/slsDetectorSoftware/generator/autocomplete/zsh_autocomplete.in.sh @@ -0,0 +1,77 @@ +# GENERATED FILE - DO NOT EDIT +# ANY CHANGES TO THIS FILE WILL BE OVERWRITTEN + +_sd() { + + + # -- THIS LINE WILL BE REPLACED WITH GENERATED CODE -- + + + local FCN_RETURN="" + local IS_PATH=0 + COMPREPLY=() + local OPTIONS_NEW="" + words=("${COMP_WORDS[@]}") + cword=$COMP_CWORD + + local cur=${words[cword]} + # check the action (get or put) + case "${words[0]}" in + "sls_detector_get" | "g" | "detg") + local IS_GET=1 + ;; + *) + local IS_GET=0 + ;; + esac + + # if no command is written, autocomplete with the commands + if [[ ${cword} -eq 1 ]]; then + + case "$cur" in + [0-9]*) + for i in $SLS_COMMANDS; do + SLS_COMMANDS_NEW="${SLS_COMMANDS_NEW} ${cur%%:*}:$i" + done + COMPREPLY=( $( compgen -W "${SLS_COMMANDS_NEW}" -- "$cur" ) );; + *) + COMPREPLY=( $( compgen -W "$SLS_COMMANDS -h" -- "$cur" ) );; + esac + return 0 + fi + + if [[ ${cword} -eq 2 ]] && [[ ${words[1]} == "-h" ]]; then + COMPREPLY=( $( compgen -W "$SLS_COMMANDS" -- "$cur" ) ) + return 0 + fi + + # if a command is written, autocomplete with the options + # call the function for the command + + if [[ "$SLS_COMMANDS" == *"${words[1]##*:}"* ]]; then + __"${words[1]##*:}" + fi + + # if IS_PATH is activated, autocomplete with the path + if [[ ${IS_PATH} -eq 1 ]]; then + COMPREPLY=($(compgen -f -- "${cur}")) + return 0 + fi + + # autocomplete with the options + COMPREPLY=($(compgen -W "${FCN_RETURN}" -- "${cur}")) + + + +} + +complete -F _sd -o filenames sls_detector_get +complete -F _sd -o filenames g +complete -F _sd -o filenames detg + +complete -F _sd -o filenames sls_detector_put +complete -F _sd -o filenames p +complete -F _sd -o filenames detp + +complete -F _sd -o filenames sls_detector +complete -F _sd -o filenames det diff --git a/slsDetectorSoftware/generator/autocomplete/zsh_autocomplete.sh b/slsDetectorSoftware/generator/autocomplete/zsh_autocomplete.sh new file mode 100644 index 000000000..c4c36afe7 --- /dev/null +++ b/slsDetectorSoftware/generator/autocomplete/zsh_autocomplete.sh @@ -0,0 +1,3223 @@ +# GENERATED FILE - DO NOT EDIT +# ANY CHANGES TO THIS FILE WILL BE OVERWRITTEN + +_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 patternX 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 " +__acquire() { +FCN_RETURN="" +return 0 +} +__activate() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__adcclk() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__adcenable() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__adcenable10g() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__adcindex() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__adcinvert() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__adclist() { +FCN_RETURN="" +return 0 +} +__adcname() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__adcphase() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="deg" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="deg" +fi +fi +return 0 +} +__adcpipeline() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__adcreg() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__adcvpp() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="mV mv" +fi +fi +return 0 +} +__apulse() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__asamples() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__autocompdisable() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__badchannels() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__blockingtrigger() { +FCN_RETURN="" +return 0 +} +__burstmode() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="burst_external burst_internal cw_external cw_internal" +fi +fi +return 0 +} +__burstperiod() { +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="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="ms ns s us" +fi +fi +return 0 +} +__bursts() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__burstsl() { +FCN_RETURN="" +return 0 +} +__bustest() { +FCN_RETURN="" +return 0 +} +__cdsgain() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__chipversion() { +FCN_RETURN="" +return 0 +} +__clearbit() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="--validate" +fi +fi +return 0 +} +__clearbusy() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="--validate" +fi +fi +return 0 +} +__clearroi() { +FCN_RETURN="" +return 0 +} +__clientversion() { +FCN_RETURN="" +return 0 +} +__clkdiv() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__clkfreq() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__clkphase() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="deg" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="deg" +fi +fi +return 0 +} +__collectionmode() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="electron hole" +fi +fi +return 0 +} +__column() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__compdisabletime() { +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="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="ms ns s us" +fi +fi +return 0 +} +__confadc() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__config() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +IS_PATH=1 +fi +fi +return 0 +} +__configtransceiver() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +IS_PATH=1 +fi +fi +return 0 +} +__counters() { +FCN_RETURN="" +return 0 +} +__currentsource() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="fix nofix" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "5" ]]; then +FCN_RETURN="low normal" +fi +fi +return 0 +} +__dac() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="`sls_detector_get daclist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="mV mv" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="`sls_detector_get daclist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="mV mv" +fi +fi +return 0 +} +__dacindex() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__daclist() { +FCN_RETURN="" +return 0 +} +__dacname() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="`sls_detector_get daclist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="`sls_detector_get daclist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__dacvalues() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="mV mv" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="mV mv" +fi +fi +return 0 +} +__datastream() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="bottom left right top" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="bottom left right top" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__dbitclk() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__dbitphase() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="deg" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="deg" +fi +fi +return 0 +} +__dbitpipeline() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__defaultdac() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="`sls_detector_get daclist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="`sls_detector_get settingslist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="`sls_detector_get daclist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="`sls_detector_get settingslist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +fi +return 0 +} +__defaultpattern() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="`sls_detector_get daclist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="`sls_detector_get settingslist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +fi +return 0 +} +__delay() { +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="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="ms ns s us" +fi +fi +return 0 +} +__delayl() { +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 +} +__detectorserverversion() { +FCN_RETURN="" +return 0 +} +__detsize() { +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 +} +__diodelay() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__dpulse() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__dr() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__drlist() { +FCN_RETURN="" +return 0 +} +__dsamples() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__execcommand() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__exptime() { +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="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="ms ns s us" +fi +fi +return 0 +} +__exptime1() { +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="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="ms ns s us" +fi +fi +return 0 +} +__exptime2() { +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="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="ms ns s us" +fi +fi +return 0 +} +__exptime3() { +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="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="ms ns s us" +fi +fi +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() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__extsampling() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__extsamplingsrc() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__extsig() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="inversion_off inversion_on trigger_in_falling_edge trigger_in_rising_edge" +fi +fi +return 0 +} +__fformat() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="binary hdf5" +fi +fi +return 0 +} +__filtercells() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__filterresistor() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__findex() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__firmwaretest() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__firmwareversion() { +FCN_RETURN="" +return 0 +} +__fliprows() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__flowcontrol10g() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__fmaster() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__fname() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__foverwrite() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__fpath() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +IS_PATH=1 +fi +fi +return 0 +} +__framecounter() { +FCN_RETURN="" +return 0 +} +__frames() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__framesl() { +FCN_RETURN="" +return 0 +} +__frametime() { +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 +} +__free() { +FCN_RETURN="" +return 0 +} +__fwrite() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__gaincaps() { +FCN_RETURN="" +return 0 +} +__gainmode() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="dynamic fixg0 fixg1 fixg2 forceswitchg1 forceswitchg2" +fi +fi +return 0 +} +__gappixels() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__gatedelay() { +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="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="ms ns s us" +fi +fi +return 0 +} +__gatedelay1() { +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="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="ms ns s us" +fi +fi +return 0 +} +__gatedelay2() { +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="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="ms ns s us" +fi +fi +return 0 +} +__gatedelay3() { +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="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="ms ns s us" +fi +fi +return 0 +} +__gates() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__getbit() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__hardwareversion() { +FCN_RETURN="" +return 0 +} +__highvoltage() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__hostname() { +FCN_RETURN="" +return 0 +} +__im_a() { +FCN_RETURN="" +return 0 +} +__im_b() { +FCN_RETURN="" +return 0 +} +__im_c() { +FCN_RETURN="" +return 0 +} +__im_d() { +FCN_RETURN="" +return 0 +} +__im_io() { +FCN_RETURN="" +return 0 +} +__imagetest() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__initialchecks() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__inj_ch() { +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 +} +__interpolation() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__interruptsubframe() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__kernelversion() { +FCN_RETURN="" +return 0 +} +__lastclient() { +FCN_RETURN="" +return 0 +} +__led() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__lock() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__master() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__maxadcphaseshift() { +FCN_RETURN="" +return 0 +} +__maxclkphaseshift() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__maxdbitphaseshift() { +FCN_RETURN="" +return 0 +} +__measuredperiod() { +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 +} +__measuredsubperiod() { +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 +} +__moduleid() { +FCN_RETURN="" +return 0 +} +__nextframenumber() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__nmod() { +FCN_RETURN="" +return 0 +} +__numinterfaces() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__overflow() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__packageversion() { +FCN_RETURN="" +return 0 +} +__parallel() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__parameters() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +IS_PATH=1 +fi +fi +return 0 +} +__partialreset() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__patfname() { +FCN_RETURN="" +return 0 +} +__patioctrl() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__patlimits() { +FCN_RETURN="" +return 0 +} +__patloop() { +FCN_RETURN="" +return 0 +} +__patloop0() { +FCN_RETURN="" +return 0 +} +__patloop1() { +FCN_RETURN="" +return 0 +} +__patloop2() { +FCN_RETURN="" +return 0 +} +__patmask() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__patnloop() { +FCN_RETURN="" +return 0 +} +__patnloop0() { +FCN_RETURN="" +return 0 +} +__patnloop1() { +FCN_RETURN="" +return 0 +} +__patnloop2() { +FCN_RETURN="" +return 0 +} +__patsetbit() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__patternX() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__patternstart() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__patwait() { +FCN_RETURN="" +return 0 +} +__patwait0() { +FCN_RETURN="" +return 0 +} +__patwait1() { +FCN_RETURN="" +return 0 +} +__patwait2() { +FCN_RETURN="" +return 0 +} +__patwaittime() { +FCN_RETURN="" +return 0 +} +__patwaittime0() { +FCN_RETURN="" +return 0 +} +__patwaittime1() { +FCN_RETURN="" +return 0 +} +__patwaittime2() { +FCN_RETURN="" +return 0 +} +__patword() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__pedestalmode() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN=" 0" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__period() { +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="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="ms ns s us" +fi +fi +return 0 +} +__periodl() { +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 +} +__polarity() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="neg pos" +fi +fi +return 0 +} +__port() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__powerchip() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__powerindex() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__powerlist() { +FCN_RETURN="" +return 0 +} +__powername() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="`sls_detector_get daclist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="`sls_detector_get daclist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__powervalues() { +FCN_RETURN="" +return 0 +} +__programfpga() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +IS_PATH=1 +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="--force-delete-normal-file" +fi +fi +return 0 +} +__pulse() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +IS_PATH=1 +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="--force-delete-normal-file" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__pulsechip() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__pulsenmove() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__pumpprobe() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__quad() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__ratecorr() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__readnrows() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__readout() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__readoutspeed() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1 108 144 2 full_speed half_speed quarter_speed" +fi +fi +return 0 +} +__readoutspeedlist() { +FCN_RETURN="" +return 0 +} +__rebootcontroller() { +FCN_RETURN="" +return 0 +} +__reg() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="--validate" +fi +fi +return 0 +} +__resetdacs() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="--validate" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="hard" +fi +fi +return 0 +} +__resetfpga() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="hard" +fi +fi +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() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="analog analog_digital digital digital_transceiver transceiver" +fi +fi +return 0 +} +__row() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__runclk() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__runtime() { +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 +} +__rx_arping() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__rx_clearroi() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__rx_dbitlist() { +FCN_RETURN="" +return 0 +} +__rx_dbitoffset() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__rx_discardpolicy() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="discardempty discardpartial nodiscard" +fi +fi +return 0 +} +__rx_fifodepth() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__rx_frameindex() { +FCN_RETURN="" +return 0 +} +__rx_framescaught() { +FCN_RETURN="" +return 0 +} +__rx_framesperfile() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__rx_hostname() { +FCN_RETURN="" +return 0 +} +__rx_jsonaddheader() { +FCN_RETURN="" +return 0 +} +__rx_jsonpara() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__rx_lastclient() { +FCN_RETURN="" +return 0 +} +__rx_lock() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__rx_missingpackets() { +FCN_RETURN="" +return 0 +} +__rx_padding() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__rx_printconfig() { +FCN_RETURN="" +return 0 +} +__rx_realudpsocksize() { +FCN_RETURN="" +return 0 +} +__rx_roi() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "5" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__rx_silent() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__rx_start() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__rx_status() { +FCN_RETURN="" +return 0 +} +__rx_stop() { +FCN_RETURN="" +return 0 +} +__rx_tcpport() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__rx_threads() { +FCN_RETURN="" +return 0 +} +__rx_udpsocksize() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__rx_version() { +FCN_RETURN="" +return 0 +} +__rx_zmqfreq() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__rx_zmqhwm() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__rx_zmqip() { +FCN_RETURN="" +return 0 +} +__rx_zmqport() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__rx_zmqstartfnum() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__rx_zmqstream() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__samples() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__savepattern() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +IS_PATH=1 +fi +fi +return 0 +} +__scan() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="`sls_detector_get daclist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "5" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "6" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__scanerrmsg() { +FCN_RETURN="" +return 0 +} +__selinterface() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__serialnumber() { +FCN_RETURN="" +return 0 +} +__setbit() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="--validate" +fi +fi +return 0 +} +__settings() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="`sls_detector_get settingslist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +fi +return 0 +} +__settingslist() { +FCN_RETURN="" +return 0 +} +__settingspath() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +IS_PATH=1 +fi +fi +return 0 +} +__signalindex() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__signallist() { +FCN_RETURN="" +return 0 +} +__signalname() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__sleep() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="ms ns s us" +fi +fi +return 0 +} +__slowadc() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__slowadcindex() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__slowadclist() { +FCN_RETURN="" +return 0 +} +__slowadcname() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="`sls_detector_get daclist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="`sls_detector_get daclist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__slowadcvalues() { +FCN_RETURN="" +return 0 +} +__start() { +FCN_RETURN="" +return 0 +} +__status() { +FCN_RETURN="" +return 0 +} +__stop() { +FCN_RETURN="" +return 0 +} +__stopport() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__storagecell_delay() { +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="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="ms ns s us" +fi +fi +return 0 +} +__storagecell_start() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__subdeadtime() { +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="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="ms ns s us" +fi +fi +return 0 +} +__subexptime() { +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="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="ms ns s us" +fi +fi +return 0 +} +__sync() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__syncclk() { +FCN_RETURN="" +return 0 +} +__temp_10ge() { +FCN_RETURN="" +return 0 +} +__temp_adc() { +FCN_RETURN="" +return 0 +} +__temp_control() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__temp_dcdc() { +FCN_RETURN="" +return 0 +} +__temp_event() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__temp_fpga() { +FCN_RETURN="" +return 0 +} +__temp_fpgaext() { +FCN_RETURN="" +return 0 +} +__temp_fpgafl() { +FCN_RETURN="" +return 0 +} +__temp_fpgafr() { +FCN_RETURN="" +return 0 +} +__temp_slowadc() { +FCN_RETURN="" +return 0 +} +__temp_sodl() { +FCN_RETURN="" +return 0 +} +__temp_sodr() { +FCN_RETURN="" +return 0 +} +__temp_threshold() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__templist() { +FCN_RETURN="" +return 0 +} +__tempvalues() { +FCN_RETURN="" +return 0 +} +__tengiga() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__threshold() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="`sls_detector_get settingslist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "5" ]]; then +FCN_RETURN="`sls_detector_get settingslist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +fi +return 0 +} +__thresholdnotb() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="`sls_detector_get settingslist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "5" ]]; then +FCN_RETURN="`sls_detector_get settingslist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +fi +return 0 +} +__timing() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="`sls_detector_get timinglist | sed -e 's/.*\[\(.*\)\].*/\1/' | sed 's/,//g'`" +fi +fi +return 0 +} +__timing_info_decoder() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="shine swissfel" +fi +fi +return 0 +} +__timinglist() { +FCN_RETURN="" +return 0 +} +__timingsource() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="external internal" +fi +fi +return 0 +} +__top() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__transceiverenable() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__trigger() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__triggers() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__triggersl() { +FCN_RETURN="" +return 0 +} +__trimbits() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +IS_PATH=1 +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +IS_PATH=1 +fi +fi +return 0 +} +__trimen() { +FCN_RETURN="" +return 0 +} +__trimval() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__tsamples() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__txdelay() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__txdelay_frame() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__txdelay_left() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__txdelay_right() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__type() { +FCN_RETURN="" +return 0 +} +__udp_cleardst() { +FCN_RETURN="" +return 0 +} +__udp_dstip() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__udp_dstip2() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__udp_dstlist() { +FCN_RETURN="" +return 0 +} +__udp_dstmac() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__udp_dstmac2() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__udp_dstport() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__udp_dstport2() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__udp_firstdst() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__udp_numdst() { +FCN_RETURN="" +return 0 +} +__udp_reconfigure() { +FCN_RETURN="" +return 0 +} +__udp_srcip() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__udp_srcip2() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__udp_srcmac() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__udp_srcmac2() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__udp_validate() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__update() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +IS_PATH=1 +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +IS_PATH=1 +fi +fi +return 0 +} +__updatedetectorserver() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +IS_PATH=1 +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +IS_PATH=1 +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +IS_PATH=1 +fi +fi +return 0 +} +__updatekernel() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +IS_PATH=1 +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +IS_PATH=1 +fi +fi +return 0 +} +__updatemode() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__user() { +FCN_RETURN="" +return 0 +} +__v_a() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__v_b() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__v_c() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__v_chip() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__v_d() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__v_io() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__v_limit() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__vchip_comp_adc() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__vchip_comp_fe() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__vchip_cs() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__vchip_opa_1st() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__vchip_opa_fd() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__vchip_ref_comp_fe() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__versions() { +FCN_RETURN="" +return 0 +} +__veto() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="0 1" +fi +fi +return 0 +} +__vetoalg() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="10gbe lll none" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="hits raw" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="10gbe lll none" +fi +fi +return 0 +} +__vetofile() { +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 +} +__vetophoton() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 1 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "3" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "4" ]]; then +FCN_RETURN="" +fi +if [[ "${cword}" == "5" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__vetoref() { +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 +} +__vetostream() { +FCN_RETURN="" +return 0 +} +__virtual() { +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 +} +__vm_a() { +FCN_RETURN="" +return 0 +} +__vm_b() { +FCN_RETURN="" +return 0 +} +__vm_c() { +FCN_RETURN="" +return 0 +} +__vm_d() { +FCN_RETURN="" +return 0 +} +__vm_io() { +FCN_RETURN="" +return 0 +} +__zmqhwm() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__zmqip() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} +__zmqport() { +FCN_RETURN="" +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi +return 0 +} + + + local FCN_RETURN="" + local IS_PATH=0 + COMPREPLY=() + local OPTIONS_NEW="" + words=("${COMP_WORDS[@]}") + cword=$COMP_CWORD + + local cur=${words[cword]} + # check the action (get or put) + case "${words[0]}" in + "sls_detector_get" | "g" | "detg") + local IS_GET=1 + ;; + *) + local IS_GET=0 + ;; + esac + + # if no command is written, autocomplete with the commands + if [[ ${cword} -eq 1 ]]; then + + case "$cur" in + [0-9]*) + for i in $SLS_COMMANDS; do + SLS_COMMANDS_NEW="${SLS_COMMANDS_NEW} ${cur%%:*}:$i" + done + COMPREPLY=( $( compgen -W "${SLS_COMMANDS_NEW}" -- "$cur" ) );; + *) + COMPREPLY=( $( compgen -W "$SLS_COMMANDS -h" -- "$cur" ) );; + esac + return 0 + fi + + if [[ ${cword} -eq 2 ]] && [[ ${words[1]} == "-h" ]]; then + COMPREPLY=( $( compgen -W "$SLS_COMMANDS" -- "$cur" ) ) + return 0 + fi + + # if a command is written, autocomplete with the options + # call the function for the command + + if [[ "$SLS_COMMANDS" == *"${words[1]##*:}"* ]]; then + __"${words[1]##*:}" + fi + + # if IS_PATH is activated, autocomplete with the path + if [[ ${IS_PATH} -eq 1 ]]; then + COMPREPLY=($(compgen -f -- "${cur}")) + return 0 + fi + + # autocomplete with the options + COMPREPLY=($(compgen -W "${FCN_RETURN}" -- "${cur}")) + + + +} + +complete -F _sd -o filenames sls_detector_get +complete -F _sd -o filenames g +complete -F _sd -o filenames detg + +complete -F _sd -o filenames sls_detector_put +complete -F _sd -o filenames p +complete -F _sd -o filenames detp + +complete -F _sd -o filenames sls_detector +complete -F _sd -o filenames det diff --git a/slsDetectorSoftware/generator/commands.yaml b/slsDetectorSoftware/generator/commands.yaml new file mode 100644 index 000000000..4d8ac3586 --- /dev/null +++ b/slsDetectorSoftware/generator/commands.yaml @@ -0,0 +1,4335 @@ +--- +# detectors: MYTHEN3 + +################# TEMPLATES ################# +TIME_COMMAND: + infer_action: true + help: "" + template: true + actions: + GET: + require_det_id: true + function: '' + args: + - argc: 0 + output: [ OutString(t) ] + - argc: 1 + arg_types: [ special::time_unit ] + output: [ "OutString(t , args[0])" ] + PUT: + function: '' + require_det_id: true + input: [ converted_time ] + input_types: [ time::ns ] + args: + - argc: 1 + arg_types: [ std::string ] + + separate_time_units: + input: 'args[0]' + output: [ converted_time, unit ] + output: [ 'args[0]' ] + - argc: 2 + arg_types: [ int, special::time_unit ] + + convert_to_time: + input: [ 'args[0]', 'args[1]' ] + output: converted_time + output: [ 'args[0]', 'args[1]' ] + +TIME_GET_COMMAND: + infer_action: true + help: "" + template: true + actions: + GET: + require_det_id: true + function: '' + args: + - argc: 0 + output: [ OutString(t) ] + - argc: 1 + arg_types: [ special::time_unit ] + output: [ "OutString(t , args[0])" ] + +STRING_COMMAND: + infer_action: true + help: "" + template: true + actions: + GET: + require_det_id: true + function: '' + argc: 0 + output: [ OutString(t) ] + PUT: + function: '' + output: [ 'args.front()' ] + input: [ 'args[0]' ] + input_types: [ std::string ] + require_det_id: true + cast_input: [ false ] + argc: 1 + +INTEGER_COMMAND_HEX_WIDTH16: + infer_action: true + help: "" + template: true + actions: + GET: + require_det_id: true + function: '' + argc: 0 + output: [ "OutStringHex(t, 16)" ] + PUT: + require_det_id: true + function: '' + argc: 1 + input: [ 'args[0]' ] + cast_input: [ true ] + input_types: [ uint64_t ] + output: [ "ToStringHex(arg0, 16)" ] + +INTEGER_COMMAND_HEX: + template: true + infer_action: true + help: "" + actions: + GET: + require_det_id: true + function: '' + argc: 0 + output: [ "OutStringHex(t)" ] + PUT: + require_det_id: true + function: '' + argc: 1 + input: [ 'args[0]' ] + cast_input: [ true ] + input_types: [ uint32_t ] + output: [ "args.front()" ] + +INTEGER_COMMAND_VEC_ID: + template: true + infer_action: true + help: "" + actions: + GET: + require_det_id: true + function: '' + argc: 0 + output: [ OutString(t) ] + PUT: + require_det_id: true + function: '' + argc: 1 + input: [ 'args[0]' ] + cast_input: [ true ] + input_types: [ int ] + output: [ 'args.front()' ] + +INTEGER_COMMAND_VEC_ID_GET: + template: true + infer_action: true + help: "" + actions: + GET: + require_det_id: true + function: '' + argc: 0 + output: [ OutString(t) ] + PUT: + require_det_id: true + convert_det_id: false + function: '' + argc: 1 + input: [ 'args[0]' ] + cast_input: [ true ] + input_types: [ int ] + output: [ 'args.front()' ] + +INTEGER_COMMAND_SET_NOID_GET_ID: + template: true + infer_action: true + help: "" + actions: + GET: + require_det_id: true + function: '' + argc: 0 + output: [ OutString(t) ] + PUT: + check_det_id: true + function: '' + argc: 1 + input: [ 'args[0]' ] + cast_input: [ true ] + input_types: [ int ] + output: [ 'args.front()' ] + +INTEGER_COMMAND_NOID: + template: true + infer_action: true + help: "" + actions: + GET: + check_det_id: true + function: '' + argc: 0 + output: [ OutString(t) ] + PUT: + check_det_id: true + function: '' + argc: 1 + input: [ 'args[0]' ] + cast_input: [ true ] + input_types: [ int ] + output: [ 'args.front()' ] + +INTEGER_IND_COMMAND: + template: true + infer_action: true + help: "" + actions: + GET: + # extra variable to store the index + require_det_id: true + function: '' + argc: 0 + input: [ 'INDEX' ] + input_types: [ int ] + cast_input: [ false ] + output: [ OutString(t) ] + PUT: + # extra variable to store the index + function: '' + require_det_id: true + argc: 1 + input: [ 'INDEX', 'args[0]' ] + input_types: [ int, int ] + cast_input: [ false, true ] + output: [ 'args.front()' ] + +INTEGER_USER_IND_COMMAND: + template: true + infer_action: true + help: "" + actions: + GET: + # extra variable to store the index + require_det_id: true + function: '' + argc: 1 + input: [ 'INDEX', 'args[0]' ] + cast_input: [ false, true ] + input_types: [ int, int ] + output: [ 'args[0]', "' '", OutStringHex(t) ] + PUT: + # extra variable to store the index + function: '' + require_det_id: true + argc: 2 + input: [ 'INDEX', 'args[0]', 'args[1]' ] + cast_input: [ false, true, true ] + input_types: [ int, int , int ] + output: [ 'args[0]', "' '", 'args[1]' ] + +EXECUTE_SET_COMMAND_NOID: + template: true + infer_action: true + help: "" + actions: + PUT: + check_det_id: true + function: '' + output: [ '"successful"' ] + argc: 0 + +EXECUTE_SET_COMMAND: + template: true + infer_action: true + help: "" + actions: + PUT: + require_det_id: true + function: '' + output: [ '"successful"' ] + argc: 0 + +EXECUTE_SET_COMMAND_NOID_1ARG: + template: true + infer_action: true + help: "" + actions: + PUT: + check_det_id: true + function: '' + argc: 1 + input: [ 'args[0]' ] + cast_input: [ false ] + arg_types: [special::path] + input_types: [ std::string ] + output: [ 'args.front()' ] + +GET_COMMAND: + template: true + infer_action: true + help: "" + actions: + GET: + require_det_id: true + function: '' + argc: 0 + output: [ OutString(t) ] + +GET_COMMAND_NOID: + template: true + infer_action: true + help: "" + actions: + GET: + function: '' + argc: 0 + output: [ ToString(t) ] + +GET_IND_COMMAND: + template: true + infer_action: true + help: "" + actions: + GET: + require_det_id: true + function: '' + argc: 0 + input: [ 'VAL' ] + cast_input: [ false ] + input_types: [ int ] + output: [ OutString(t) ] + +CTB_NAMED_LIST: + template: true + infer_action: true + actions: + GET: + extra_variables: + - name: det_type + type: auto + value: det->getDetectorType().squash(defs::GENERIC); + exceptions: + - condition: 'cmd != "daclist" && det_type != defs::CHIPTESTBOARD && det_type != defs::XILINX_CHIPTESTBOARD' + message: 'cmd + " only allowed for CTB."' + check_det_id: true + argc: 0 + output: [ 'ToString(t)' ] + PUT: + extra_variables: + - name: det_type + type: auto + value: det->getDetectorType().squash(defs::GENERIC); + exceptions: + - condition: 'cmd != "daclist" && det_type != defs::CHIPTESTBOARD && det_type != defs::XILINX_CHIPTESTBOARD' + message: 'cmd + " only allowed for CTB."' + - condition: 'cmd == "daclist" && det_type != defs::CHIPTESTBOARD && det_type != defs::XILINX_CHIPTESTBOARD' + message: '"This detector already has fixed dac names. Cannot change them."' + check_det_id: true + input: [ 'args' ] + argc: -1 # unknown number of args + input_types: [ std::string ] + output: [ 'ToString(args)' ] + +CTB_SINGLE_DACNAME: + template: true + infer_action: true + actions: + GET: + extra_variables: + - name: index + type: defs::dacIndex + value: 0 + exceptions: + - condition: 'det->getDetectorType().squash(defs::GENERIC) != defs::CHIPTESTBOARD && det->getDetectorType().squash(defs::GENERIC) != defs::XILINX_CHIPTESTBOARD' + message: 'cmd + " only allowed for CTB."' + check_det_id: true + argc: 1 + input: [ "static_cast(StringTo(args[0]) + index)" ] + input_types: [ defs::dacIndex ] + output: [ 'args[0]',"' '", 't' ] + + PUT: + extra_variables: + - name: index + type: defs::dacIndex + value: 0 + exceptions: + - condition: 'det->getDetectorType().squash(defs::GENERIC) != defs::CHIPTESTBOARD && det->getDetectorType().squash(defs::GENERIC) != defs::XILINX_CHIPTESTBOARD' + message: 'cmd + " only allowed for CTB."' + check_det_id: true + argc: 2 + input: [ "static_cast(StringTo(args[0]) + index)","args[1]" ] + input_types: [ defs::dacIndex , std::string ] + output: [ 'ToString(args)' ] + +CTB_GET_DACINDEX: + template: true + infer_action: true + actions: + GET: + extra_variables: + - name: index + type: defs::dacIndex + value: 0 + + check_det_id: true + exceptions: + - condition: 'det->getDetectorType().squash(defs::GENERIC) != defs::CHIPTESTBOARD && det->getDetectorType().squash(defs::GENERIC) != defs::XILINX_CHIPTESTBOARD' + message: 'cmd + " only allowed for CTB."' + argc: 1 + input: [ 'args[0]' ] + input_types: [ std::string ] + output: [ 'ToString(static_cast(t) - index)' ] + +CTB_SINGLE_NAME: + template: true + infer_action: true + actions: + GET: + check_det_id: true + exceptions: + - condition: 'det->getDetectorType().squash(defs::GENERIC) != defs::CHIPTESTBOARD && det->getDetectorType().squash(defs::GENERIC) != defs::XILINX_CHIPTESTBOARD' + message: 'cmd + " only allowed for CTB."' + argc: 1 + input: [ "args[0]" ] + cast_input: [ true ] + input_types: [ int ] + output: [ 'args[0]',"' '", 't' ] + PUT: + check_det_id: true + exceptions: + - condition: 'det->getDetectorType().squash(defs::GENERIC) != defs::CHIPTESTBOARD && det->getDetectorType().squash(defs::GENERIC) != defs::XILINX_CHIPTESTBOARD' + message: 'cmd + " only allowed for CTB."' + argc: 2 + cast_input: [ true, false ] + input: [ "args[0]","args[1]" ] + input_types: [ int , std::string ] + output: [ 'ToString(args)' ] + +CTB_GET_INDEX: + template: true + infer_action: true + actions: + GET: + check_det_id: true + exceptions: + - condition: 'det->getDetectorType().squash(defs::GENERIC) != defs::CHIPTESTBOARD && det->getDetectorType().squash(defs::GENERIC) != defs::XILINX_CHIPTESTBOARD' + message: 'cmd + " only allowed for CTB."' + argc: 1 + input: [ 'args[0]' ] + input_types: [ std::string ] + output: [ 'static_cast(t)' ] + + +################# COMMANDS ################################## +################# TIME_COMMAND ############# + +period: + help: "[duration] [(optional unit) ns|us|ms|s]\n\tPeriod between frames" + inherit_actions: TIME_COMMAND + actions: + GET: + function: getPeriod + PUT: + function: setPeriod + +delay: + help: "[duration] [(optional unit) ns|us|ms|s]\n\t[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb][Moench][Xilinx Ctb] Delay after trigger" + inherit_actions: TIME_COMMAND + actions: + GET: + function: getDelayAfterTrigger + PUT: + function: setDelayAfterTrigger + +subexptime: + help: "[duration] [(optional unit) ns|us|ms|s]\n\t[Eiger] Exposure time of EIGER subframes in 32 bit mode." + inherit_actions: TIME_COMMAND + actions: + GET: + function: getSubExptime + PUT: + function: setSubExptime + +subdeadtime: + help: "[duration] [(optional unit) ns|us|ms|s]\n\t[Eiger] Dead time of EIGER subframes in 32 bit mode. Subperiod = subexptime + subdeadtime." + inherit_actions: TIME_COMMAND + actions: + GET: + function: getSubDeadTime + PUT: + function: setSubDeadTime + +compdisabletime: + help: "[duration] [(optional unit) ns|us|ms|s]\n\t[Jungfrau] Time before end of exposure when comparator is disabled. It is only possible for chipv1.1." + inherit_actions: TIME_COMMAND + actions: + GET: + function: getComparatorDisableTime + PUT: + function: setComparatorDisableTime + +storagecell_delay: + help: "[duration (0-1638375 ns)] [(optional unit) ns|us|ms|s]\n\t[Jungfrau] Additional time delay between 2 consecutive exposures in burst mode (resolution of 25ns). Only applicable for chipv1.0. For advanced users only." + inherit_actions: TIME_COMMAND + actions: + GET: + function: getStorageCellDelay + PUT: + function: setStorageCellDelay + +burstperiod: + help: "[duration] [(optional unit) ns|us|ms|s]\n\t[Gotthard2] Period between 2 bursts. Only in burst mode and auto timing mode." + inherit_actions: TIME_COMMAND + actions: + GET: + function: getBurstPeriod + PUT: + function: setBurstPeriod + +################# TIME_GET_COMMAND ############# +delayl: + help: "\n\t[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Delay Left in Acquisition. \n\t[Gotthard2] only in continuous mode." + inherit_actions: TIME_GET_COMMAND + actions: + GET: + function: getDelayAfterTriggerLeft + +periodl: + help: "\n\t[Gotthard][Jungfrau][Moench][Ctb][Mythen3][Gotthard2][Xilinx Ctb] Period left for current frame. \n\t[Gotthard2] only in continuous mode." + inherit_actions: TIME_GET_COMMAND + actions: + GET: + function: getPeriodLeft + +measuredperiod: + help: "[(optional unit) ns|us|ms|s]\n\t[Eiger] Measured frame period between last frame and previous one. Can be measured with minimum 2 frames in an acquisition." + inherit_actions: TIME_GET_COMMAND + actions: + GET: + function: getMeasuredPeriod + +measuredsubperiod: + help: "[(optional unit) ns|us|ms|s]\n\t[Eiger] Measured sub frame period between last sub frame and previous one." + inherit_actions: TIME_GET_COMMAND + actions: + GET: + 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: + 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 + actions: + GET: + function: getActualTime + +frametime: + help: "[(optional unit) ns|us|ms|s]\n\t[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Timestamp at a frame start.\n\t[Gotthard2] not in burst and auto mode." + inherit_actions: TIME_GET_COMMAND + actions: + GET: + function: getMeasurementTime + +################# STRING_COMMAND ################# +settingspath: + help: "[path]\n\t[Eiger][Mythen3] Directory where settings files are loaded from/to." + inherit_actions: STRING_COMMAND + actions: + GET: + function: getSettingsPath + PUT: + function: setSettingsPath + arg_types: [ special::path ] + +fpath: + help: "[path]\n\tDirectory where output data files are written in receiver. Default is '/'. \n\tIf path does not exist and fwrite enabled, it will try to create it at start of acquisition." + inherit_actions: STRING_COMMAND + actions: + GET: + function: getFilePath + PUT: + function: setFilePath + arg_types: [ special::path ] + +fname: + help: "[name]\n\tFile name prefix for output data file. Default is run. File name: [file name prefix]_d[detector index]_f[sub file index]_[acquisition/file index].raw." + inherit_actions: STRING_COMMAND + actions: + GET: + function: getFileNamePrefix + PUT: + function: setFileNamePrefix + +################# INTEGER_COMMAND_HEX_WIDTH16 ################# +patioctrl: + help: "[64 bit mask]\n\t[Ctb] 64 bit mask defining input (0) and output (1) signals." + inherit_actions: INTEGER_COMMAND_HEX_WIDTH16 + actions: + GET: + function: getPatternIOControl + PUT: + function: setPatternIOControl + +patmask: + help: "[64 bit mask]\n\t[Ctb][Mythen3][Xilinx Ctb] Selects the bits that will have a pattern mask applied to the selected patmask for every pattern." + inherit_actions: INTEGER_COMMAND_HEX_WIDTH16 + actions: + GET: + function: getPatternMask + PUT: + function: setPatternMask + +patsetbit: + help: "[64 bit mask]\n\t[Ctb][Mythen3][Xilinx Ctb] Sets the mask applied to every pattern to the selected bits." + inherit_actions: INTEGER_COMMAND_HEX_WIDTH16 + actions: + GET: + function: getPatternBitMask + PUT: + function: setPatternBitMask + +################# INTEGER_COMMAND_HEX ################# +adcenable: + help: "[bitmask]\n\t[Ctb] ADC Enable Mask for 1Gb Enable for each 32 ADC channel." + inherit_actions: INTEGER_COMMAND_HEX + actions: + GET: + function: getADCEnableMask + PUT: + function: setADCEnableMask + +adcenable10g: + help: "[bitmask]\n\t[Ctb] ADC Enable Mask for 10Gb mode for each 32 ADC channel. However, if any of a consecutive 4 bits are enabled, the complete 4 bits are enabled." + inherit_actions: INTEGER_COMMAND_HEX + actions: + GET: + function: getTenGigaADCEnableMask + PUT: + function: setTenGigaADCEnableMask + +transceiverenable: + help: "[bitmask]\n\t[Ctb][Xilinx Ctb] Transceiver Enable Mask. Enable for each 4 Transceiver channel." + inherit_actions: INTEGER_COMMAND_HEX + actions: + GET: + function: getTransceiverEnableMask + PUT: + function: setTransceiverEnableMask + +adcinvert: + help: "[bitmask]\n\t[Ctb][Jungfrau][Moench] ADC Inversion Mask.\n\t[Jungfrau][Moench] Inversions on top of the default mask." + inherit_actions: INTEGER_COMMAND_HEX + actions: + GET: + function: getADCInvert + PUT: + function: setADCInvert + +################# INTEGER_COMMAND_VEC_ID ################# +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]" + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getSettings + PUT: + function: setSettings + input_types: [ defs::detectorSettings ] + +trimval: + help: "[n_trimval]\n\t[Eiger][Mythen3] All trimbits set to this value. Returns -1 if all trimbits are different values." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getAllTrimbits + PUT: + function: setAllTrimbits + +fliprows: + help: "[0, 1]\n\t[Eiger] flips rows paramater sent to slsreceiver to stream as json parameter to flip rows in gui \n\t[Jungfrau][Moench] flips rows in the detector itself. For bottom module and number of interfaces must be set to 2. slsReceiver and slsDetectorGui does not handle." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getFlipRows + PUT: + function: setFlipRows + input_types: [ bool ] + +row: + inherit_actions: INTEGER_COMMAND_VEC_ID + help: "[value]\n\tSet Detector row (udp header) to value. \n\tGui uses it to rearrange for complete image" + actions: + GET: + function: getRow + PUT: + function: setRow + +column: + help: "[value]\n\tSet Detector column (udp header) to value. \n\tGui uses it to rearrange for complete image" + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getColumn + PUT: + function: setColumn + +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]" + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getTimingMode + PUT: + function: setTimingMode + input_types: [ defs::timingMode ] + +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]" + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getHighVoltage + PUT: + function: setHighVoltage + +powerchip: + help: "[0, 1]\n\t[Jungfrau][Moench][Mythen3][Gotthard2][Xilinx Ctb] Power the chip. \n\t[Jungfrau][Moench] Default is 0. Get will return power status. Can be off if temperature event occured (temperature over temp_threshold with temp_control enabled. Will configure chip (only chip v1.1)\n\t[Mythen3][Gotthard2] Default is 1. If module not connected or wrong module, powerchip will fail.\n\t[Xilinx Ctb] Default is 0. Also configures the chip if powered on." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getPowerChip + PUT: + function: setPowerChip + input_types: [ bool ] + +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." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getImageTestMode + PUT: + function: setImageTestMode + input_types: [ bool ] + +parallel: + help: "[0, 1]\n\t[Eiger][Mythen3][Gotthard2][Moench] Enable or disable parallel mode.\n\t[Mythen3] If exptime is too short, the acquisition will return ERROR status and take fewer frames than expected.\n\t[Mythen3][Eiger][Moench] Default: Non parallel.\n\t[Gotthard2] Default: Parallel. Non parallel mode works only in continuous mode." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getParallelMode + PUT: + function: setParallelMode + input_types: [ bool ] + +filterresistor: + help: "[value] [Gotthard2][Jungfrau] Set filter resistor. Increasing values for increasing resistance.\n\t[Gotthard2] Options: [0|1|2|3]. Default is 0.\n\t[Jungfrau] Options: [0|1]. Default is 1." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getFilterResistor + PUT: + function: setFilterResistor + +dbitpipeline: + help: "[n_value]\n\t[Ctb][Gotthard2] Pipeline of the clock for latching digital bits.\n\t[Gotthard2] Options: 0-7\n\t[Ctb] Options: 0-255" + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getDBITPipeline + PUT: + function: setDBITPipeline + +readnrows: + help: "\n\t[1-256]\n\t\t[Eiger] Number of rows to readout per half module starting from the centre. Options: 0 - 256. 256 is default. The permissible values depend on dynamic range and 10Gbe enabled.\n\t[8-512 (multiple of 8)]\n\t\t[Jungfrau] Number of rows per module starting from the centre. Options: 8 - 512, must be multiples of 8. Default is 512.\n\t\t[Moench] Number of rows per module starting from the centre. Options:16 - 400, must be multiples of 16. Default is 400." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getReadNRows + PUT: + function: setReadNRows + +nextframenumber: + help: "[n_value]\n\t[Eiger][Jungfrau][Moench][Ctb][Xilinx Ctb][Gotthard2] Next frame number. Stopping acquisition might result in different frame numbers for different modules. So, after stopping, next frame number (max + 1) is set for all the modules afterwards." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getNextFrameNumber + PUT: + function: setNextFrameNumber + input_types: [ uint64_t ] + +numinterfaces: + help: "[1, 2]\n\t[Jungfrau][Moench] Number of udp interfaces to stream data from detector. Default: 1.\n\tAlso enables second interface in receiver for listening (Writes a file per interface if writing enabled).\n\tAlso restarts client and receiver zmq sockets if zmq streaming enabled.\n\t[Eiger] Only gets with result 2." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getNumberofUDPInterfaces + PUT: + function: setNumberofUDPInterfaces + +selinterface: + help: "[0, 1]\n\t[Jungfrau][Moench] The udp interface to stream data from detector. Effective only when number of interfaces is 1. Default: 0 (outer)" + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getSelectedUDPInterface + PUT: + function: selectUDPInterface + input_types: [ bool ] + +udp_firstdst: + help: "\n\t[0 - N]\n\twhere N is the max number of udp destinations - 1.\n\t[Jungfrau][Moench][Gotthard2] Max number of udp destinations is 32.\n\t[Mythen3] Max number of udp destination is 64.\n\t One can set which is the first destination that the detector will stream images out from in a round robin fashion. The entry must not have been empty. Default: 0" + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getFirstUDPDestination + PUT: + function: setFirstUDPDestination + +udp_srcmac: + help: "[x:x:x:x:x:x]\n\tMac address of the detector (source) udp interface. \n\t[Eiger] Do not set as detector will replace with its own DHCP Mac (1G) or DHCP Mac + 1 (10G)." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getSourceUDPMAC + PUT: + function: setSourceUDPMAC + input_types: [ MacAddr ] + input: [ 'MacAddr(args[0])' ] + cast_input: [ false ] + +udp_srcmac2: + help: "[x:x:x:x:x:x]\n\t[Jungfrau][Moench] Mac address of the top half or inner (source) udp interface. " + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getSourceUDPMAC2 + PUT: + function: setSourceUDPMAC2 + input_types: [ MacAddr ] + input: [ 'MacAddr(args[0])' ] + cast_input: [ false ] + +udp_dstmac: + help: "[x:x:x:x:x:x]\n\tMac address of the receiver (destination) udp interface. Not mandatory to set as udp_dstip retrieves it from slsReceiver process, but must be set if you use a custom receiver (not slsReceiver). Use router mac if router between detector and receiver." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getDestinationUDPMAC + PUT: + function: setDestinationUDPMAC + input_types: [ MacAddr ] + input: [ 'MacAddr(args[0])' ] + cast_input: [ false ] + +udp_dstmac2: + help: "[x:x:x:x:x:x]\n\t[Jungfrau][Moench] Mac address of the receiver (destination) udp interface 2. Not mandatory to set as udp_dstip2 retrieves it from slsReceiver process but must be set if you use a custom receiver (not slsReceiver). \n\t [Jungfrau][Moench] top half or inner interface \n\t [Gotthard2] veto debugging. Use router mac if router between detector and receiver." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getDestinationUDPMAC2 + PUT: + function: setDestinationUDPMAC2 + input_types: [ MacAddr ] + input: [ 'MacAddr(args[0])' ] + cast_input: [ false ] + +tengiga: + help: "[0, 1]\n\t[Eiger][Ctb][Mythen3] 10GbE Enable." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getTenGiga + PUT: + function: setTenGiga + input_types: [ bool ] + +flowcontrol10g: + help: "[0, 1]\n\t[Eiger][Jungfrau][Moench] 10GbE Flow Control." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getTenGigaFlowControl + PUT: + function: setTenGigaFlowControl + input_types: [ bool ] + +txdelay_frame: + help: "[n_delay]\n\t[Eiger][Jungfrau][Moench][Mythen3] Transmission delay of first udp packet being streamed out of the module.\n\t[Jungfrau][Moench] [0-31] Each value represents 1 ms\n\t[Eiger] Additional delay to txdelay_left and txdelay_right. Each value represents 10ns. Typical value is 50000.\n\t[Mythen3] [0-16777215] Each value represents 8 ns (125 MHz clock), max is 134 ms." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getTransmissionDelayFrame + PUT: + function: setTransmissionDelayFrame + +txdelay_left: + help: "[n_delay]\n\t[Eiger] Transmission delay of first packet in an image being streamed out of the module's left UDP port. Each value represents 10ns. Typical value is 50000." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getTransmissionDelayLeft + PUT: + function: setTransmissionDelayLeft + +txdelay_right: + help: "[n_delay]\n\t[Eiger] Transmission delay of first packet in an image being streamed out of the module's right UDP port. Each value represents 10ns. Typical value is 50000." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getTransmissionDelayRight + PUT: + function: setTransmissionDelayRight + +rx_fifodepth: + help: "[n_frames]\n\tSet the number of frames in the receiver fifo depth (buffer between listener and writer threads)." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getRxFifoDepth + PUT: + function: setRxFifoDepth + +rx_silent: + help: "[0, 1]\n\tSwitch on or off receiver text output during acquisition." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getRxSilentMode + PUT: + function: setRxSilentMode + input_types: [ bool ] + +rx_discardpolicy: + help: "[nodiscard (default)|discardempty|discardpartial(fastest)]\n\tFrame discard policy of receiver. nodiscard does not discard frames, discardempty discards empty frames, discardpartial discards partial frames." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getRxFrameDiscardPolicy + PUT: + function: setRxFrameDiscardPolicy + input_types: [ defs::frameDiscardPolicy ] + +rx_padding: + help: "[0, 1]\n\tPartial frames padding enable in the receiver. Default: enabled. Disabling is fastest." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getPartialFramesPadding + PUT: + function: setPartialFramesPadding + input_types: [ bool ] + +rx_udpsocksize: + help: "[n_size]\n\tUDP socket buffer size in receiver. Tune rmem_default and rmem_max accordingly. Max value is INT_MAX/2." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getRxUDPSocketBufferSize + PUT: + function: setRxUDPSocketBufferSize + +rx_lock: + help: "[0, 1]\n\tLock receiver to one client IP, 1 locks, 0 unlocks. Default is unlocked." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getRxLock + PUT: + function: setRxLock + input_types: [ bool ] + +rx_arping: + help: "[0, 1]\n\tStarts a thread in slsReceiver to arping the interface it is listening to every minute. Useful in 10G mode." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getRxArping + PUT: + function: setRxArping + input_types: [ bool ] + +fformat: + help: "[binary|hdf5]\n\tFile format of data file. For HDF5, package must be compiled with HDF5 flags. Default is binary." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getFileFormat + PUT: + function: setFileFormat + input_types: [ defs::fileFormat ] + +findex: + help: "[n_value]\n\tFile or Acquisition index." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getAcquisitionIndex + PUT: + function: setAcquisitionIndex + input_types: [ uint64_t ] + +fwrite: + help: "[0, 1]\n\tEnable or disable receiver file write. Default is 0." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getFileWrite + PUT: + function: setFileWrite + input_types: [ bool ] + +foverwrite: + help: "[0, 1]\n\tEnable or disable file overwriting. Default is 1." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getFileOverWrite + PUT: + function: setFileOverWrite + input_types: [ bool ] + +rx_framesperfile: + help: "[n_frames]\n\tNumber of frames per file in receiver in an acquisition. Default depends on detector type. 0 is infinite or all frames in single file." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getFramesPerFile + PUT: + function: setFramesPerFile + +rx_zmqstream: + help: "[0, 1]\n\tEnable/ disable data streaming from receiver via zmq (eg. to GUI or to another process for further processing). This creates/ destroys zmq streamer threads in receiver. \n\tSwitching to Gui automatically enables data streaming in receiver. \n\tSwitching back to command line acquire will require disabling data streaming in receiver for fast applications. " + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getRxZmqDataStream + PUT: + function: setRxZmqDataStream + input_types: [ bool ] + +rx_zmqfreq: + help: "[nth frame]\n\tFrequency of frames streamed out from receiver via zmq\n\tDefault: 1, Means every frame is streamed out. \n\tIf 2, every second frame is streamed out. \n\tIf 0, streaming timer is the timeout, after which current frame is sent out. (default timeout is 500 ms). Usually used for gui purposes." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getRxZmqFrequency + PUT: + function: setRxZmqFrequency + +rx_zmqstartfnum: + help: "[fnum]\n\tThe starting frame index to stream out. 0 by default, which streams the first frame in an acquisition, and then depending on the rx zmq frequency/ timer" + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getRxZmqStartingFrame + PUT: + function: setRxZmqStartingFrame + +zmqip: + help: "[x.x.x.x]\n\tIp Address to listen to zmq data streamed out from receiver or intermediate process. Default connects to receiver zmq Ip Address (from rx_hostname). Modified only when using an intermediate process between receiver and client(gui). Also restarts client zmq streaming if enabled." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getClientZmqIp + PUT: + function: setClientZmqIp + input_types: [ IpAddr ] + input: [ 'IpAddr(args[0])' ] + cast_input: [ false ] + +overflow: + help: "[0, 1]\n\t[Eiger] Enable or disable show overflow flag in 32 bit mode. Default is disabled." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getOverFlowMode + PUT: + function: setOverFlowMode + input_types: [ bool ] + +interruptsubframe: + help: "[0, 1]\n\t[Eiger] 1 interrupts last subframe at required exposure time. 0 will wait for last sub frame to finish exposing. 0 is default." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getInterruptSubframe + PUT: + function: setInterruptSubframe + input_types: [ bool ] + +activate: + help: "[0, 1]\n\t[Eiger] 1 is default. 0 deactivates readout and does not send data." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getActive + PUT: + function: setActive + input_types: [ bool ] + +partialreset: + help: "[0, 1]\n\t[Eiger] Sets up detector to do partial or complete reset at start of acquisition. 0 complete reset, 1 partial reset. Default is complete reset. Advanced function!" + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getPartialReset + PUT: + function: setPartialReset + input_types: [ bool ] + +top: + help: "[0, 1]\n\t[Eiger] Sets half module to top (1), else bottom." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getTop + PUT: + function: setTop + input_types: [ bool ] + +temp_threshold: + help: "[n_temp (in degrees)]\n\t[Jungfrau][Moench] Threshold temperature in degrees. If temperature crosses threshold temperature and temperature control is enabled, power to chip will be switched off and temperature event occurs. To power on chip again, temperature has to be less than threshold temperature and temperature event has to be cleared." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getThresholdTemperature + PUT: + function: setThresholdTemperature + +temp_control: + help: "[0, 1]\n\t[Jungfrau][Moench] Temperature control enable. Default is 0 (disabled). If temperature crosses threshold temperature and temperature control is enabled, power to chip will be switched off and temperature event occurs. To power on chip again, temperature has to be less than threshold temperature and temperature event has to be cleared." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getTemperatureControl + PUT: + function: setTemperatureControl + input_types: [ bool ] + +autocompdisable: + help: "[0, 1]\n\t[Jungfrau] Auto comparator disable mode. By default, the on-chip gain switching is active during the entire exposure.This mode disables the on - chip gain switching comparator automatically after 93.75% (only for chipv1.0) of exposure time (only for longer than 100us). It is possible to set the duration for chipv1.1 using compdisabletime command.\n\tDefault is 0 or this mode disabled(comparator enabled throughout). 1 enables mode. 0 disables mode. " + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getAutoComparatorDisable + PUT: + function: setAutoComparatorDisable + input_types: [ bool ] + +storagecell_start: + help: "[0-max]\n\t[Jungfrau] Storage cell that stores the first acquisition of the series. max is 15 (default) for chipv1.0 and 3 (default) for chipv1.1. For advanced users only." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getStorageCellStart + PUT: + function: setStorageCellStart + +gainmode: + help: "[dynamic|forceswitchg1|forceswitchg2|fixg1|fixg2|fixg0]\n\t[Jungfrau] Gain mode.\n\tCAUTION: Do not use fixg0 without caution, you can damage the detector!!!" + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getGainMode + PUT: + function: setGainMode + input_types: [ defs::gainMode ] + +filtercells: + help: "[0-12]\n\t[Jungfrau] Set Filter Cell. Only for chipv1.1. Advanced user Command" + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getNumberOfFilterCells + PUT: + function: setNumberOfFilterCells + +cdsgain: + help: "[0, 1]\n\t[Gotthard2] Enable or disable CDS gain. Default is disabled." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getCDSGain + PUT: + function: setCDSGain + input_types: [ bool ] + +timingsource: + help: "[internal|external]\n\t[Gotthard2] Timing source. Internal is crystal and external is system timing. Default is internal." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getTimingSource + PUT: + function: setTimingSource + input_types: [ defs::timingSourceType ] + +veto: + help: "[0, 1]\n\t[Gotthard2] Enable or disable veto data data from chip. Default is 0." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getVeto + PUT: + function: setVeto + input_types: [ bool ] + +gates: + help: "[n_gates]\n\t[Mythen3] Number of external gates in gating or trigger_gating mode (external gating)." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getNumberOfGates + PUT: + function: setNumberOfGates + +polarity: + help: "[pos|neg]\n\t[Mythen3] Sets negative or positive polarity. Default is positive" + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getPolarity + PUT: + function: setPolarity + input_types: [ defs::polarity ] + +timing_info_decoder: + help: "[swissfel|shine]\n\t[Jungfrau] Advanced Command and only for Swissfel and Shine. Sets the bunch id or timing info decoder. Default is swissfel." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getTimingInfoDecoder + PUT: + function: setTimingInfoDecoder + input_types: [ defs::timingInfoDecoder ] + +collectionmode: + help: "[hole|electron]\n\t[Jungfrau] Sets collection mode to hole or electron. Default is hole." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getCollectionMode + PUT: + function: setCollectionMode + input_types: [ defs::collectionMode ] + +interpolation: + help: "[0, 1]\n\t[Mythen3] Enables or disables interpolation. Default is disabled. Interpolation mode enables all counters and disables vth3. Disabling sets back counter mask and vth3." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getInterpolation + PUT: + function: setInterpolation + input_types: [ bool ] + +pumpprobe: + help: "[0, 1]\n\t[Mythen3] Enables or disables pump probe mode. Default is disabled. Pump probe mode only enables vth2. Disabling sets back to previous value." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getPumpProbe + PUT: + function: setPumpProbe + input_types: [ bool ] + +apulse: + help: "[0, 1]\n\t[Mythen3] Enables or disables analog pulsing. Default is disabled" + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getAnalogPulsing + PUT: + function: setAnalogPulsing + input_types: [ bool ] + +dpulse: + help: "[0, 1]\n\t[Mythen3] Enables or disables digital pulsing. Default is disabled" + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getDigitalPulsing + PUT: + function: setDigitalPulsing + input_types: [ bool ] + +asamples: + help: "[n_samples]\n\t[Ctb] Number of analog samples expected." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getNumberOfAnalogSamples + PUT: + function: setNumberOfAnalogSamples + +adcclk: + help: "[n_clk in MHz]\n\t[Ctb] ADC clock frequency in MHz." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getADCClock + PUT: + function: setADCClock + +runclk: + help: "[n_clk in MHz]\n\t[Ctb] Run clock in MHz." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getRUNClock + PUT: + function: setRUNClock + +dsamples: + help: "[n_value]\n\t[Ctb] Number of digital samples expected." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getNumberOfDigitalSamples + PUT: + function: setNumberOfDigitalSamples + +tsamples: + help: "[n_value]\n\t[Ctb][Xilinx Ctb] Number of transceiver samples expected." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getNumberOfTransceiverSamples + PUT: + function: setNumberOfTransceiverSamples + +romode: + help: "[analog|digital|analog_digital|transceiver|digital_transceiver]\n\t[Ctb][xilinx Ctb] Readout mode. [Ctb] Default is analog. [Xilinx Ctb] Default is Transceiver (only one implemented so far)" + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getReadoutMode + PUT: + function: setReadoutMode + input_types: [ defs::readoutMode ] + +dbitclk: + help: "[n_clk in MHz]\n\t[Ctb] Clock for latching the digital bits in MHz." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getDBITClock + PUT: + function: setDBITClock + +extsampling: + help: "[0, 1]\n\t[Ctb] Enable for external sampling signal for digital data to signal by extsampling src command. For advanced users only." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getExternalSampling + PUT: + function: setExternalSampling + input_types: [ bool ] + +extsamplingsrc: + help: "[0-63]\n\t[Ctb] Sampling source signal for digital data. For advanced users only." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getExternalSamplingSource + PUT: + function: setExternalSamplingSource + +rx_dbitoffset: + help: "[n_bytes]\n\t[Ctb] Offset in bytes in digital data to skip in receiver." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getRxDbitOffset + PUT: + function: setRxDbitOffset + +led: + help: "[0, 1]\n\t[Ctb] Switches on/off all LEDs." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getLEDEnable + PUT: + function: setLEDEnable + input_types: [ bool ] + +adcpipeline: + help: "[n_value]\n\t[Ctb][Moench] Pipeline for ADC clock." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getADCPipeline + PUT: + function: setADCPipeline + +updatemode: + help: "[0|1]\n\tRestart the detector server in update mode or not. This is useful when server-firmware compatibility is at its worst and server cannot start up normally" + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getUpdateMode + PUT: + function: setUpdateMode + +port: + help: "[n]\n\tPort number of the control server on detector for detector-client tcp interface. Default is 1952. Normally unchanged. Set different ports for virtual servers on same pc." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getControlPort + PUT: + input_types: [ uint16_t ] + function: setControlPort + +stopport: + help: "[n]\n\tPort number of the stop server on detector for detector-client tcp interface. Default is 1953. Normally unchanged." + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getStopPort + PUT: + input_types: [ uint16_t ] + function: setStopPort + +lock: + help: "[0, 1]\n\tLock detector to one IP, 1: locks. Default is unlocked" + inherit_actions: INTEGER_COMMAND_VEC_ID + actions: + GET: + function: getDetectorLock + PUT: + function: setDetectorLock + input_types: [ bool ] + +################# INTEGER_COMMAND_VEC_ID_GET ################# + +master: + 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." + actions: + GET: + function: getMaster + PUT: + function: setMaster + input_types: [ bool ] + +udp_dstport: + inherit_actions: INTEGER_COMMAND_VEC_ID_GET + help: "[n]\n\tPort number of the receiver (destination) udp interface. Default is 50001. \n\tIf multi command, ports for each module is calculated (incremented by 1 if no 2nd interface)" + actions: + GET: + function: getDestinationUDPPort + PUT: + input_types: [ uint16_t ] + function: setDestinationUDPPort + +udp_dstport2: + inherit_actions: INTEGER_COMMAND_VEC_ID_GET + help: "[n]\n\t[Jungfrau][Moench][Eiger][Gotthard2] Port number of the receiver (destination) udp interface 2. Default is 50002. \n\tIf multi command, ports for each module is calculated (incremented by 2) \n\t[Jungfrau][Moench] top half or inner interface \n\t[Eiger] right half \n\t[Gotthard2] veto debugging" + actions: + GET: + function: getDestinationUDPPort2 + PUT: + input_types: [ uint16_t ] + function: setDestinationUDPPort2 + +rx_tcpport: + help: "[port]\n\tTCP port for client-receiver communication. Default is 1954. Must be different if multiple receivers on same pc. Must be first command to set a receiver parameter. Multi command will automatically increment for individual modules." + inherit_actions: INTEGER_COMMAND_VEC_ID_GET + actions: + GET: + function: getRxPort + PUT: + input_types: [ uint16_t ] + function: setRxPort + +rx_zmqport: + help: "[port]\n\tZmq port for data to be streamed out of the receiver. Also restarts receiver zmq streaming if enabled. Default is 30001. Modified only when using an intermediate process between receiver and client(gui). Must be different for every detector (and udp port). Multi command will automatically increment for individual modules." + inherit_actions: INTEGER_COMMAND_VEC_ID_GET + actions: + GET: + function: getRxZmqPort + PUT: + input_types: [ uint16_t ] + function: setRxZmqPort + +zmqport: + help: "[port]\n\tZmq port in client(gui) or intermediate process for data to be streamed to from receiver. Default connects to receiver zmq streaming out port (30001). Modified only when using an intermediate process between receiver and client(gui). Also restarts client zmq streaming if enabled. Must be different for every detector (and udp port). Multi command will automatically increment for individual modules." + inherit_actions: INTEGER_COMMAND_VEC_ID_GET + actions: + GET: + function: getClientZmqPort + PUT: + input_types: [ uint16_t ] + function: setClientZmqPort + +################# INTEGER_COMMAND_SET_NOID_GET_ID ############ +sync: + inherit_actions: INTEGER_COMMAND_SET_NOID_GET_ID + help: "[0, 1]\n\t[Jungfrau][Moench] Enables or disables synchronization between modules. Sync mode requires at least one master configured. Also requires flatband cabling between master and slave with termination board." + actions: + GET: + function: getSynchronization + PUT: + function: setSynchronization + input_types: [ bool ] + +frames: + inherit_actions: INTEGER_COMMAND_SET_NOID_GET_ID + help: "[n_frames]\n\tNumber of frames per acquisition. In trigger mode, number of frames per trigger. \n\tCannot be set in modular level. \n\tIn scan mode, number of frames is set to number of steps.\n\t[Gotthard2] Burst mode has a maximum of 2720 frames." + actions: + GET: + function: getNumberOfFrames + PUT: + function: setNumberOfFrames + input_types: [ int64_t ] + +triggers: + inherit_actions: INTEGER_COMMAND_SET_NOID_GET_ID + help: "[n_triggers]\n\tNumber of triggers per aquire. Set timing mode to use triggers." + actions: + GET: + function: getNumberOfTriggers + PUT: + function: setNumberOfTriggers + input_types: [ int64_t ] + +dr: + 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" + actions: + GET: + function: getDynamicRange + PUT: + function: setDynamicRange + +rx_zmqhwm: + inherit_actions: INTEGER_COMMAND_SET_NOID_GET_ID + help: "[n_value]\n\tReceiver's zmq send high water mark. Default is the zmq library's default (1000). This is a high number and can be set to 2 for gui purposes. One must also set the client's receive high water mark to similar value. Final effect is sum of them. Also restarts receiver zmq streaming if enabled. Can set to -1 to set default value." + actions: + GET: + function: getRxZmqHwm + PUT: + function: setRxZmqHwm + +extrastoragecells: + inherit_actions: INTEGER_COMMAND_SET_NOID_GET_ID + help: "[0-15]\n\t[Jungfrau] Only for chipv1.0. Number of additional storage cells. Default is 0. For advanced users only. \n\tThe #images = #frames x #triggers x (#extrastoragecells + 1)." + actions: + GET: + function: getNumberOfAdditionalStorageCells + PUT: + function: setNumberOfAdditionalStorageCells + +bursts: + inherit_actions: INTEGER_COMMAND_SET_NOID_GET_ID + help: "[n_bursts]\n\t[Gotthard2] Number of bursts per aquire. Only in auto timing mode and burst mode. Use timing command to set timing mode and burstmode command to set burst mode." + actions: + GET: + function: getNumberOfBursts + PUT: + function: setNumberOfBursts + input_types: [ int64_t ] + +################# INTEGER_COMMAND_NOID ####################### +fmaster: + inherit_actions: INTEGER_COMMAND_NOID + help: "[0, 1]\n\tEnable or disable receiver master file. Default is 1." + actions: + GET: + function: getMasterFileWrite + PUT: + function: setMasterFileWrite + input_types: [ bool ] + +################# INTEGER_IND_COMMAND ####################### +v_limit: + inherit_actions: INTEGER_IND_COMMAND + help: "[n_value]\n\t[Ctb][Xilinx Ctb] Soft limit for power supplies (ctb only) and DACS in mV." + actions: + GET: + function: getPower + input: [ 'defs::V_LIMIT' ] + PUT: + function: setPower + input: [ 'defs::V_LIMIT', 'args[0]' ] + +v_a: + inherit_actions: INTEGER_IND_COMMAND + help: "[n_value]\n\t[Ctb][Xilinx Ctb] Power supply a in mV." + actions: + GET: + function: getPower + input: [ 'defs::V_POWER_A' ] + PUT: + function: setPower + input: [ 'defs::V_POWER_A', 'args[0]' ] + +v_b: + inherit_actions: INTEGER_IND_COMMAND + help: "[n_value]\n\t[Ctb][Xilinx Ctb] Power supply b in mV." + actions: + GET: + function: getPower + input: [ 'defs::V_POWER_B' ] + PUT: + function: setPower + input: [ 'defs::V_POWER_B', 'args[0]' ] + +v_c: + inherit_actions: INTEGER_IND_COMMAND + help: "[n_value]\n\t[Ctb][Xilinx Ctb] Power supply c in mV." + actions: + GET: + function: getPower + input: [ 'defs::V_POWER_C' ] + PUT: + function: setPower + input: [ 'defs::V_POWER_C', 'args[0]' ] + +v_d: + inherit_actions: INTEGER_IND_COMMAND + help: "[n_value]\n\t[Ctb][Xilinx Ctb] Power supply d in mV." + actions: + GET: + function: getPower + input: [ 'defs::V_POWER_D' ] + PUT: + function: setPower + input: [ 'defs::V_POWER_D', 'args[0]' ] + +v_io: + inherit_actions: INTEGER_IND_COMMAND + help: "[n_value]\n\t[Ctb][Xilinx Ctb] Power supply io in mV. Minimum 1200 mV. Must be the first power regulator to be set after fpga reset (on-board detector server start up)." + actions: + GET: + function: getPower + input: [ 'defs::V_POWER_IO' ] + PUT: + function: setPower + input: [ 'defs::V_POWER_IO', 'args[0]' ] + +v_chip: + inherit_actions: INTEGER_IND_COMMAND + help: "[n_value]\n\t[Ctb] Power supply chip in mV. Do not use it unless you are completely sure you will not fry the board." + actions: + GET: + function: getPower + input: [ 'defs::V_POWER_CHIP' ] + PUT: + function: setPower + input: [ 'defs::V_POWER_CHIP', 'args[0]' ] + +################# INTEGER_USER_IND_COMMAND ################### +vchip_comp_fe: + inherit_actions: INTEGER_USER_IND_COMMAND + help: "[chip index 0-9, -1 for all][10 bit hex value] \n\t[Gotthard2] On chip Dac for comparator current of analogue front end." + actions: + GET: + function: getOnChipDAC + input: [ 'defs::VB_COMP_FE', 'args[0]' ] + PUT: + function: setOnChipDAC + input: [ 'defs::VB_COMP_FE', 'args[0]', 'args[1]' ] + +vchip_opa_1st: + inherit_actions: INTEGER_USER_IND_COMMAND + help: "[chip index 0-9, -1 for all][10 bit hex value] \n\t[Gotthard2] On chip Dac for opa current for driving the other DACs in chip." + actions: + GET: + function: getOnChipDAC + input: [ 'defs::VB_OPA_1ST', 'args[0]' ] + PUT: + function: setOnChipDAC + input: [ 'defs::VB_OPA_1ST', 'args[0]', 'args[1]' ] + +vchip_opa_fd: + inherit_actions: INTEGER_USER_IND_COMMAND + help: "[chip index 0-9, -1 for all][10 bit hex value] \n\t[Gotthard2] On chip Dac current for CDS opa stage." + actions: + GET: + function: getOnChipDAC + input: [ 'defs::VB_OPA_FD', 'args[0]' ] + PUT: + function: setOnChipDAC + input: [ 'defs::VB_OPA_FD', 'args[0]', 'args[1]' ] + +vchip_comp_adc: + inherit_actions: INTEGER_USER_IND_COMMAND + help: "[chip index 0-9, -1 for all][10 bit hex value] \n\t[Gotthard2] On chip Dac for comparator current of ADC." + actions: + GET: + function: getOnChipDAC + input: [ 'defs::VB_COMP_ADC', 'args[0]' ] + PUT: + function: setOnChipDAC + input: [ 'defs::VB_COMP_ADC', 'args[0]', 'args[1]' ] + +vchip_ref_comp_fe: + inherit_actions: INTEGER_USER_IND_COMMAND + help: "[chip index 0-9, -1 for all][10 bit hex value] \n\t[Gotthard2] On chip Dac for reference voltage of the comparator of analogue front end." + actions: + GET: + function: getOnChipDAC + input: [ 'defs::VREF_COMP_FE', 'args[0]' ] + PUT: + function: setOnChipDAC + input: [ 'defs::VREF_COMP_FE', 'args[0]', 'args[1]' ] + +vchip_cs: + inherit_actions: INTEGER_USER_IND_COMMAND + help: "[chip index 0-9, -1 for all][10 bit hex value] \n\t[Gotthard2] On chip Dac for current injection into preamplifier." + actions: + GET: + function: getOnChipDAC + input: [ 'defs::VB_CS', 'args[0]' ] + PUT: + function: setOnChipDAC + input: [ 'defs::VB_CS', 'args[0]', 'args[1]' ] + +################# EXECUTE_SET_COMMAND_NOID ####################### +clearbusy: + inherit_actions: EXECUTE_SET_COMMAND_NOID + help: "\n\tIf acquisition aborted during acquire command, use this to clear acquiring flag in shared memory before starting next acquisition" + actions: + PUT: + function: clearAcquiringFlag + +rx_start: + inherit_actions: EXECUTE_SET_COMMAND_NOID + help: "\n\tStarts receiver listener for detector data packets and create a data file (if file write enabled)." + actions: + PUT: + function: startReceiver + +rx_stop: + inherit_actions: EXECUTE_SET_COMMAND_NOID + help: "\n\tStops receiver listener for detector data packets and closes current data file (if file write enabled)." + actions: + PUT: + function: stopReceiver + +readout: + inherit_actions: EXECUTE_SET_COMMAND_NOID + help: "\n\t[Mythen3] Starts detector readout. Status changes to TRANSMITTING and automatically returns to idle at the end of readout." + actions: + PUT: + function: startDetectorReadout + +rx_clearroi: + inherit_actions: EXECUTE_SET_COMMAND_NOID + help: "\n\tResets Region of interest in receiver. Default is all channels/pixels enabled." + actions: + PUT: + function: clearRxROI + +################# EXECUTE_SET_COMMAND ######################## +start: + inherit_actions: EXECUTE_SET_COMMAND + help: "\n\tStarts detector acquisition. Status changes to RUNNING or WAITING and automatically returns to idle at the end of acquisition. If the acquisition was abruptly stopped, some detectors come back to STOPPED." + actions: + PUT: + function: startDetector + +stop: + inherit_actions: EXECUTE_SET_COMMAND + help: "\n\tAbort detector acquisition. Status changes to IDLE or STOPPED. Goes to stop server." + actions: + PUT: + function: stopDetector + +udp_cleardst: + inherit_actions: EXECUTE_SET_COMMAND + help: "\n\tClears udp destination details on the detector." + actions: + PUT: + function: clearUDPDestinations + +udp_reconfigure: + inherit_actions: EXECUTE_SET_COMMAND + help: "\n\tReconfigures Detector with UDP destination. More for debugging as the configuration is done automatically when the detector has sufficient UDP details." + actions: + PUT: + function: reconfigureUDPDestination + +udp_validate: + inherit_actions: EXECUTE_SET_COMMAND + help: "\n\tValidates that UDP configuration in the detector is valid. If not configured, it will throw with error message requesting missing udp information." + actions: + PUT: + 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: + 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." + actions: + PUT: + function: loadDefaultPattern + +patternstart: + inherit_actions: EXECUTE_SET_COMMAND + help: "\n\t[Mythen3] Starts Pattern" + actions: + PUT: + function: startPattern + +resetfpga: + inherit_actions: EXECUTE_SET_COMMAND + help: "\n\t[Jungfrau][Moench][Ctb][Xilinx Ctb] Reset FPGA." + actions: + PUT: + function: resetFPGA + +rebootcontroller: + inherit_actions: EXECUTE_SET_COMMAND + help: "\n\t[Jungfrau][Moench][Ctb][Gotthard][Mythen3][Gotthard2][Xilinx Ctb] Reboot controller of detector." + actions: + PUT: + function: rebootController + +firmwaretest: + 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." + actions: + PUT: + function: executeFirmwareTest + +bustest: + 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!" + actions: + PUT: + function: executeBusTest + +configtransceiver: + inherit_actions: EXECUTE_SET_COMMAND + help: "\n\t[Xilinx Ctb] Waits for transceiver to be aligned. Chip had to be configured (powered on) before this." + actions: + PUT: + function: configureTransceiver + +################# EXECUTE_SET_COMMAND_NOID_1ARG ############## +config: + inherit_actions: EXECUTE_SET_COMMAND_NOID_1ARG + help: "\n\tFrees shared memory before loading configuration file. Set up once." + actions: + PUT: + function: loadConfig + +parameters: + inherit_actions: EXECUTE_SET_COMMAND_NOID_1ARG + help: "\n\tSets detector measurement parameters to those contained in fname. Set up per measurement." + actions: + PUT: + function: loadParameters + +savepattern: + inherit_actions: EXECUTE_SET_COMMAND_NOID_1ARG + help: "\n\t[Ctb][Mythen3][Xilinx Ctb] Saves pattern to file (ascii). \n\t[Ctb] Also executes pattern." + actions: + PUT: + function: savePattern + +################# GET_COMMAND ################################ +detectorserverversion: + inherit_actions: GET_COMMAND + help: "\n\tOn-board detector server software version" + actions: + GET: + function: getDetectorServerVersion + +hardwareversion: + inherit_actions: GET_COMMAND + help: "\n\tHardware version of detector. \n\t[Eiger] Hardware version of front FPGA on detector." + actions: + GET: + function: getHardwareVersion + +kernelversion: + inherit_actions: GET_COMMAND + help: "\n\tGet kernel version on the detector including time and date." + actions: + GET: + function: getKernelVersion + +rx_version: + inherit_actions: GET_COMMAND + help: "\n\tReceiver version" + actions: + GET: + function: getReceiverVersion + +moduleid: + inherit_actions: GET_COMMAND + help: "\n\t[Gotthard2][Eiger][Mythen3][Jungfrau][Moench] 16 bit value (ideally unique) that is streamed out in the UDP header of the detector. Picked up from a file on the module." + actions: + GET: + function: getModuleId + +type: + inherit_actions: GET_COMMAND + help: "\n\tReturns detector type. Can be Eiger, Jungfrau, Gotthard, Moench, Mythen3, Gotthard2, ChipTestBoard, Xilinx_ChipTestBoard" + actions: + GET: + function: getDetectorType + +framesl: + 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." + actions: + GET: + function: getNumberOfFramesLeft + +triggersl: + 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." + actions: + GET: + function: getNumberOfTriggersLeft + +maxadcphaseshift: + inherit_actions: GET_COMMAND + help: "\n\t[Jungfrau][Moench][Ctb] Absolute maximum Phase shift of ADC clock." + actions: + GET: + function: getMaxADCPhaseShift + +maxdbitphaseshift: + inherit_actions: GET_COMMAND + help: "\n\t[Ctb][Jungfrau] Absolute maximum Phase shift of of the clock to latch digital bits." + actions: + GET: + function: getMaxDBITPhaseShift + +rx_framescaught: + inherit_actions: GET_COMMAND + help: "\n\tNumber of frames caught by each port in receiver." + actions: + GET: + function: getFramesCaught + +rx_missingpackets: + inherit_actions: GET_COMMAND + help: "\n\tNumber of missing packets for receiver. If negative, they are packets in excess." + actions: + GET: + function: getNumMissingPackets + +rx_frameindex: + inherit_actions: GET_COMMAND + help: "\n\tCurrent frame index received for each port in receiver during acquisition." + actions: + GET: + function: getRxCurrentFrameIndex + +scanerrmsg: + inherit_actions: GET_COMMAND + help: "\n\tGets Scan error message if scan ended in error for non blocking acquisitions." + actions: + GET: + function: getScanErrorMessage + +udp_numdst: + inherit_actions: GET_COMMAND + help: "\n\t[Jungfrau][Moench][Eiger][Mythen3][Gotthard2] One can enter upto 32 (64 for Mythen3) destinations that the detector will stream images out in a round robin fashion. This is get only command. Default: 1" + actions: + GET: + function: getNumberofUDPDestinations + +rx_printconfig: + inherit_actions: GET_COMMAND + help: "\n\tPrints the receiver configuration." + actions: + GET: + function: printRxConfiguration + +rx_realudpsocksize: + inherit_actions: GET_COMMAND + help: "\n\tActual udp socket buffer size. Double the size of rx_udpsocksize due to kernel bookkeeping." + actions: + GET: + function: getRxRealUDPSocketBufferSize + +rx_lastclient: + inherit_actions: GET_COMMAND + help: "\n\tClient IP Address that last communicated with the receiver." + actions: + GET: + function: getRxLastClientIP + +rx_threads: + inherit_actions: GET_COMMAND + help: "\n\tGet kernel thread ids from the receiver in order of [parent, tcp, listener 0, processor 0, streamer 0, listener 1, processor 1, streamer 1, arping]. If no streamer yet or there is no second interface, it gives 0 in its place." + actions: + GET: + function: getRxThreadIds + +chipversion: + inherit_actions: GET_COMMAND + help: "\n\t[Jungfrau] Returns chip version. Can be 1.0 or 1.1" + actions: + GET: + function: getChipVersion + +burstsl: + inherit_actions: GET_COMMAND + help: "\n\t[Gotthard2] Number of bursts left in acquisition. Only in burst auto mode." + actions: + GET: + function: getNumberOfBurstsLeft + +syncclk: + inherit_actions: GET_COMMAND + help: "[n_clk in MHz]\n\t[Ctb] Sync clock in MHz." + actions: + GET: + function: getSYNCClock + +patfname: + inherit_actions: GET_COMMAND + help: "\n\t[Ctb][Mythen3][Xilinx Ctb] Gets the pattern file name including path of the last pattern uploaded. Returns an empty if nothing was uploaded or via a server default file" + actions: + GET: + function: getPatterFileName + +lastclient: + inherit_actions: GET_COMMAND + help: "\n\tClient IP Address that last communicated with the detector." + actions: + GET: + function: getLastClientIP + +framecounter: + inherit_actions: GET_COMMAND + help: "\n\t[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number of frames from start run control.\n\t[Gotthard2] only in continuous mode." + actions: + GET: + function: getNumberOfFramesFromStart + +################# GET_COMMAND_HEX ############################ +serialnumber: + inherit_actions: GET_COMMAND + help: "\n\t[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb]\n\tSerial number of detector." + actions: + GET: + function: getSerialNumber + output: [ "OutStringHex(t)" ] + +################# GET_COMMAND_NOID ########################### +nmod: + inherit_actions: GET_COMMAND_NOID + help: "\n\tNumber of modules in shared memory." + actions: + GET: + function: size + +settingslist: + inherit_actions: GET_COMMAND_NOID + help: "\n\tList of settings implemented for this detector." + actions: + GET: + function: getSettingsList + +drlist: + inherit_actions: GET_COMMAND_NOID + help: "\n\tGets the list of dynamic ranges for this detector." + actions: + GET: + function: getDynamicRangeList + +timinglist: + inherit_actions: GET_COMMAND_NOID + help: "\n\tGets the list of timing modes for this detector." + actions: + GET: + function: getTimingModeList + +readoutspeedlist: + inherit_actions: GET_COMMAND_NOID + help: "\n\tList of readout speed levels implemented for this detector." + actions: + GET: + function: getReadoutSpeedList + +templist: + inherit_actions: GET_COMMAND_NOID + help: "\n\tList of temperature commands implemented for this detector." + actions: + GET: + function: getTemperatureList + +################# GET_IND_COMMAND ############################ +temp_adc: + inherit_actions: GET_IND_COMMAND + help: "[n_value]\n\t[Jungfrau][Moench][Gotthard] ADC Temperature" + actions: + GET: + function: getTemperature + input: [ 'defs::TEMPERATURE_ADC' ] + output: [ OutString(t), '" °C"' ] + +temp_fpga: + inherit_actions: GET_IND_COMMAND + help: "[n_value]\n\t[Eiger][Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Xilinx CTB] FPGA Temperature" + actions: + GET: + function: getTemperature + input: [ 'defs::TEMPERATURE_FPGA' ] + output: [ OutString(t), '" °C"' ] + +temp_fpgaext: + inherit_actions: GET_IND_COMMAND + help: "[n_value]\n\t[Eiger]Temperature close to the FPGA" + actions: + GET: + function: getTemperature + input: [ 'defs::TEMPERATURE_FPGAEXT' ] + output: [ OutString(t), '" °C"' ] + +temp_10ge: + inherit_actions: GET_IND_COMMAND + help: "[n_value]\n\t[Eiger]Temperature close to the 10GbE" + actions: + GET: + function: getTemperature + input: [ 'defs::TEMPERATURE_10GE' ] + output: [ OutString(t), '" °C"' ] + +temp_dcdc: + inherit_actions: GET_IND_COMMAND + help: "[n_value]\n\t[Eiger]Temperature close to the dc dc converter" + actions: + GET: + function: getTemperature + input: [ 'defs::TEMPERATURE_DCDC' ] + output: [ OutString(t), '" °C"' ] + +temp_sodl: + inherit_actions: GET_IND_COMMAND + help: "[n_value]\n\t[Eiger]Temperature close to the left so-dimm memory" + actions: + GET: + function: getTemperature + input: [ 'defs::TEMPERATURE_SODL' ] + output: [ OutString(t), '" °C"' ] + +temp_sodr: + inherit_actions: GET_IND_COMMAND + help: "[n_value]\n\t[Eiger]Temperature close to the right so-dimm memory" + actions: + GET: + function: getTemperature + input: [ 'defs::TEMPERATURE_SODR' ] + output: [ OutString(t), '" °C"' ] + +temp_fpgafl: + inherit_actions: GET_IND_COMMAND + help: "[n_value]\n\t[Eiger]Temperature of the left front end board fpga." + actions: + GET: + function: getTemperature + input: [ 'defs::TEMPERATURE_FPGA2' ] + output: [ OutString(t), '" °C"' ] + +temp_fpgafr: + inherit_actions: GET_IND_COMMAND + help: "[n_value]\n\t[Eiger]Temperature of the right front end board fpga." + actions: + GET: + function: getTemperature + input: [ 'defs::TEMPERATURE_FPGA3' ] + output: [ OutString(t), '" °C"' ] + +temp_slowadc: + inherit_actions: GET_IND_COMMAND + help: "[n_value]\n\t[Ctb]Temperature of the slow adc" + actions: + GET: + function: getTemperature + input: [ 'defs::SLOW_ADC_TEMP' ] + output: [ OutString(t), '" °C"' ] + +vm_a: + inherit_actions: GET_IND_COMMAND + help: "\n\t[Ctb] Measured voltage of power supply a in mV." + actions: + GET: + function: getMeasuredPower + input: [ 'defs::V_POWER_A' ] + +vm_b: + inherit_actions: GET_IND_COMMAND + help: "\n\t[Ctb] Measured voltage of power supply b in mV." + actions: + GET: + function: getMeasuredPower + input: [ 'defs::V_POWER_B' ] + +vm_c: + inherit_actions: GET_IND_COMMAND + help: "\n\t[Ctb] Measured voltage of power supply c in mV." + actions: + GET: + function: getMeasuredPower + input: [ 'defs::V_POWER_C' ] + +vm_d: + inherit_actions: GET_IND_COMMAND + help: "\n\t[Ctb] Measured voltage of power supply d in mV." + actions: + GET: + function: getMeasuredPower + input: [ 'defs::V_POWER_D' ] + +vm_io: + inherit_actions: GET_IND_COMMAND + help: "\n\t[Ctb] Measured voltage of power supply io in mV." + actions: + GET: + function: getMeasuredPower + input: [ 'defs::V_POWER_IO' ] + +im_a: + inherit_actions: GET_IND_COMMAND + help: "\n\t[Ctb] Measured current of power supply a in mA." + actions: + GET: + function: getMeasuredCurrent + input: [ 'defs::I_POWER_A' ] + +im_b: + inherit_actions: GET_IND_COMMAND + help: "\n\t[Ctb] Measured current of power supply b in mA." + actions: + GET: + function: getMeasuredCurrent + input: [ 'defs::I_POWER_B' ] + +im_c: + inherit_actions: GET_IND_COMMAND + help: "\n\t[Ctb] Measured current of power supply c in mA." + actions: + GET: + function: getMeasuredCurrent + input: [ 'defs::I_POWER_C' ] + +im_d: + inherit_actions: GET_IND_COMMAND + help: "\n\t[Ctb] Measured current of power supply d in mA." + actions: + GET: + function: getMeasuredCurrent + input: [ 'defs::I_POWER_D' ] + +im_io: + inherit_actions: GET_IND_COMMAND + help: "\n\t[Ctb] Measured current of power supply io in mA." + actions: + GET: + function: getMeasuredCurrent + input: [ 'defs::I_POWER_IO' ] + +################# CTB_NAMED_LIST ############################# +daclist: + inherit_actions: CTB_NAMED_LIST + help: "[dacname1 dacname2 .. dacname18] \n\t\t[Ctb][Xilinx_Ctb] Set the list of dac names for this detector.\n\t\t[All] Gets the list of dac names for every dac for this detector." + actions: + GET: + function: getDacNames + PUT: + function: setDacNames + +adclist: + inherit_actions: CTB_NAMED_LIST + help: "[adcname1 adcname2 .. adcname32] \n\t\t[Ctb][Xilinx_Ctb] Set the list of adc names for this board." + actions: + GET: + function: getAdcNames + PUT: + function: setAdcNames + +signallist: + inherit_actions: CTB_NAMED_LIST + help: "[signalname1 signalname2 .. signalname63] \n\t\t[Ctb][Xilinx_Ctb] Set the list of signal names for this board." + actions: + GET: + function: getSignalNames + PUT: + function: setSignalNames + +powerlist: + inherit_actions: CTB_NAMED_LIST + help: "[powername1 powername2 .. powername4] \n\t\t[Ctb][Xilinx_Ctb] Set the list of power names for this board." + actions: + GET: + function: getPowerNames + PUT: + function: setPowerNames + +slowadclist: + inherit_actions: CTB_NAMED_LIST + help: "[slowadcname1 slowadcname2 .. slowadcname7] \n\t\t[Ctb][Xilinx_Ctb] Set the list of slowadc names for this board." + actions: + GET: + function: getSlowADCNames + PUT: + function: setSlowADCNames + +################# CTB_VALUES ################################ +powervalues: + help: "[name] \n\t\t[Ctb][Xilinx_Ctb] Get values of all powers." + actions: + GET: + argc: 0 + ctb_output_list: + GETFCNLIST: getPowerList + GETFCNNAME: getPowerNames + GETFCN: getPower + suffix: "mV" + printable_name: "*name_it++" + +slowadcvalues: + help: "[name] \n\t\t[Ctb][Xilinx_Ctb] Get values of all slow adcs." + actions: + GET: + argc: 0 + ctb_output_list: + GETFCNLIST: getSlowADCList + GETFCNNAME: getSlowADCNames + GETFCN: getSlowADC + suffix: "uV" + printable_name: "*name_it++" + +tempvalues: + help: "\n\tGets the values for every temperature for this detector." + actions: + GET: + argc: 0 + ctb_output_list: + GETFCNLIST: getTemperatureList + GETFCNNAME: "" + GETFCN: getTemperature + suffix: "°C" + printable_name: "*it" + +################# CTB_SINGLE_DACNAME ######################## +dacname: + inherit_actions: CTB_SINGLE_DACNAME + help: "[0-17][name] \n\t\t[Ctb][Xilinx_Ctb] Set the dac at the given position to the given name." + actions: + GET: + function: getDacName + extra_variables: + - name: index + type: defs::dacIndex + value: defs::DAC_0 + PUT: + function: setDacName + extra_variables: + - name: index + type: defs::dacIndex + value: defs::DAC_0 + +powername: + inherit_actions: CTB_SINGLE_DACNAME + help: "[0-4][name] \n\t\t[Ctb][Xilinx_Ctb] Set the power at the given position to the given name." + actions: + GET: + function: getPowerName + extra_variables: + - name: index + type: defs::dacIndex + value: defs::V_POWER_A + PUT: + function: setPowerName + extra_variables: + - name: index + type: defs::dacIndex + value: defs::V_POWER_A + +slowadcname: + inherit_actions: CTB_SINGLE_DACNAME + help: "[0-7][name] \n\t\t[Ctb][Xilinx_Ctb] Set the slowadc at the given position to the given name." + actions: + GET: + function: getSlowADCName + extra_variables: + - name: index + type: defs::dacIndex + value: defs::SLOW_ADC0 + PUT: + function: setSlowADCName + extra_variables: + - name: index + type: defs::dacIndex + value: defs::SLOW_ADC0 + +################# CTB_GET_DACINDEX ########################## +dacindex: + inherit_actions: CTB_GET_DACINDEX + help: "[name] \n\t\t[Ctb][Xilinx_Ctb] Get the dac index for the given name." + actions: + GET: + function: getDacIndex + extra_variables: + - name: index + type: defs::dacIndex + value: defs::DAC_0 + +powerindex: + inherit_actions: CTB_GET_DACINDEX + help: "[name] \n\t\t[Ctb][Xilinx_Ctb] Get the power index for the given name." + actions: + GET: + function: getPowerIndex + extra_variables: + - name: index + type: defs::dacIndex + value: defs::V_POWER_A + +slowadcindex: + inherit_actions: CTB_GET_DACINDEX + help: "[name] \n\t\t[Ctb][Xilinx_Ctb] Get the slowadc index for the given name." + actions: + GET: + function: getSlowADCIndex + extra_variables: + - name: index + type: defs::dacIndex + value: defs::SLOW_ADC0 + +################# CTB_SINGLE_NAME ########################### +adcname: + inherit_actions: CTB_SINGLE_NAME + help: "[0-31][name] \n\t\t[Ctb][Xilinx_Ctb] Set the adc at the given position to the given name." + actions: + GET: + function: getAdcName + PUT: + function: setAdcName + +signalname: + inherit_actions: CTB_SINGLE_NAME + help: "[0-63][name] \n\t\t[Ctb][Xilinx_Ctb] Set the signal at the given position to the given name." + actions: + GET: + function: getSignalName + PUT: + function: setSignalName + +################# CTB_GET_INDEX ############################# +adcindex: + inherit_actions: CTB_GET_INDEX + help: "[name] \n\t\t[Ctb][Xilinx_Ctb] Get the adc index for the given name." + actions: + GET: + function: getAdcIndex + +signalindex: + inherit_actions: CTB_GET_INDEX + help: "[name] \n\t\t[Ctb][Xilinx_Ctb] Get the signal index for the given name." + actions: + GET: + function: getSignalIndex + + +######################### description only commands ############################# +## code is generated for these commands +free: + is_description: true + actions: + GET: + argc: 0 + PUT: + argc: 0 + +hostname: + is_description: true + actions: + GET: + argc: 0 + PUT: + argc: -1 + arg_types: [ std::string ] + +acquire: + is_description: true + actions: + GET: + argc: 0 + PUT: + argc: 0 + +versions: + is_description: true + actions: + GET: + argc: 0 + +threshold: + is_description: true + actions: + GET: + argc: 0 + PUT: + args: + - argc: 1 + arg_types: [ int ] + - argc: 2 + arg_types: [ int, defs::detectorSettings ] + - argc: 3 + arg_types: [ int,int,int ] + - argc: 4 + arg_types: [ int ,int,int,defs::detectorSettings] + +thresholdnotb: + is_description: true + duplicate_function: true + function_alias: threshold + actions: + GET: + argc: 0 + PUT: + args: + - argc: 1 + arg_types: [ int ] + - argc: 2 + arg_types: [ int, defs::detectorSettings ] + - argc: 3 + arg_types: [ int,int,int ] + - argc: 4 + arg_types: [ int ,int,int,defs::detectorSettings ] + +trimen: + is_description: true + actions: + GET: + argc: 0 + PUT: + argc: -1 + +badchannels: + is_description: true + actions: + GET: + argc: 1 + arg_types: [ std::string ] + PUT: + argc: -1 + +udp_srcip: + is_description: true + actions: + GET: + argc: 0 + PUT: + argc: 1 + arg_types: [ std::string ] + +udp_srcip2: + is_description: true + actions: + GET: + argc: 0 + PUT: + argc: 1 + arg_types: [ std::string ] + +udp_dstip: + is_description: true + actions: + GET: + argc: 0 + PUT: + argc: 1 + arg_types: [ std::string ] + +udp_dstip2: + is_description: true + actions: + GET: + argc: 0 + PUT: + argc: 1 + arg_types: [ std::string ] + +rx_hostname: + is_description: true + actions: + GET: + argc: 0 + PUT: + argc: -1 + +rx_zmqip: + is_description: true + actions: + GET: + argc: 0 + PUT: + argc: -1 + +rx_roi: + is_description: true + actions: + GET: + argc: 0 + PUT: + args: + - argc: 2 + arg_types: [ int, int ] + - argc: 4 + arg_types: [ int, int, int, int ] + +ratecorr: + is_description: true + actions: + GET: + argc: 0 + PUT: + argc: 1 + arg_types: [ int ] + +burstmode: + is_description: true + actions: + GET: + argc: 0 + PUT: + argc: 1 + arg_types: [ defs::burstMode ] + +vetostream: + is_description: true + actions: + GET: + argc: 0 + PUT: + argc: -1 + +counters: + is_description: true + actions: + GET: + argc: 0 + PUT: + argc: -1 + +samples: + is_description: true + actions: + GET: + argc: 0 + PUT: + argc: 1 + arg_types: [ int ] + +slowadc: + is_description: true + actions: + GET: + argc: 1 + arg_types: [ int ] + +rx_dbitlist: + is_description: true + actions: + GET: + argc: 0 + PUT: + argc: -1 + +rx_jsonaddheader: + is_description: true + actions: + GET: + argc: 0 + PUT: + argc: -1 + +execcommand: + is_description: true + actions: + PUT: + argc: -1 + +dacvalues: + is_description: true + actions: + GET: + args: + - argc: 0 + - argc: 1 + arg_types: [ special::mv ] + +currentsource: + is_description: true + actions: + GET: + argc: 0 + PUT: + args: + - argc: 1 + arg_types: [ bool ] + - argc: 3 + arg_types: [ bool, special::currentSourceFix, int ] + - argc: 4 + arg_types: [bool, special::currentSourceFix, int, special::currentSourceLow ] + +gaincaps: + is_description: true + actions: + GET: + argc: 0 + PUT: + argc: -1 + arg_types: [ defs::defs::M3_GainCaps ] + +sleep: + is_description: true + actions: + PUT: + args: + - argc: 1 + arg_types: [ int ] + - argc: 2 + arg_types: [ int, special::time_unit ] + + +################# special commands ########################## + +virtual: + function_alias: virtualFunction + help: "[n_servers] [starting_port_number]\n\tConnecs to n virtual server at local host starting at specific control port. Every virtual server will have a stop port (control port + 1)" + actions: + PUT: + function: setVirtualDetectorServers + argc: 2 + check_det_id: true + input: [ 'args[0]', 'args[1]' ] + input_types: [ int, uint16_t ] + cast_input: [ true, true ] + output: [ 'ToString(args)' ] + +packageversion: + help: "\n\tPackage version." + actions: + GET: + argc: 0 + function: getPackageVersion + output: [ t ] + +clientversion: + help: "\n\tClient software version" + actions: + GET: + argc: 0 + function: getClientVersion + output: [ t ] + +firmwareversion: + help: "\n\tFirmware version of detector in format [0xYYMMDD] or an increasing 2 digit number for Eiger." + actions: + GET: + argc: 0 + require_det_id: true + function: getFirmwareVersion + output: [ OutStringHex(t) ] + detectors: + EIGER: + output: [ OutString(t) ] + +detsize: + help: "[nx] [ny]\n\tDetector size, ie. Number of channels in x and y dim. This is used to calculate module coordinates included in UDP data. \n\tBy default, it adds module in y dimension for 2d detectors and in x dimension for 1d detectors packet header." + actions: + GET: + argc: 0 + function: getDetectorSize + output: [ t ] + PUT: + argc: 2 + function: setDetectorSize + input: [ 'defs::xy(StringTo(args[0]),StringTo(args[1]))' ] + input_types: [ defs::xy ] + arg_types: [int, int] + output: [ 'ToString(args)' ] + +trimbits: + infer_action: true + help: "[fname]\n\t[Eiger][Mythen3] Put will load the trimbit file to detector. If no extension specified, serial number of each module is attached. Get will save the trimbits from the detector to file with serial number added to file name." + actions: + GET: + argc: 1 + require_det_id: true + store_result_in_t: false + function: saveTrimbits + input: [ 'args[0]' ] + input_types: [ std::string ] + arg_types: [special::path] + output: [ "args[0]" ] + PUT: + argc: 1 + require_det_id: true + function: loadTrimbits + input: [ 'args[0]' ] + input_types: [ std::string ] + arg_types: [special::path] + output: [ "args[0]" ] + +gappixels: + help: "[0, 1]\n\t[Eiger][Jungfrau][Moench] Include Gap pixels in client data call back in Detecor api. Will not be in detector streaming, receiver file or streaming. Default is 0. " + actions: + GET: + argc: 0 + check_det_id: true + function: getGapPixelsinCallback + output: [ t ] + PUT: + argc: 1 + check_det_id: true + function: setGapPixelsinCallback + input: [ 'args[0]' ] + input_types: [ bool ] + cast_input: [ true ] + output: [ args.front() ] + +Exptime: + template: true + infer_action: true # infer action based on actions' argc (they must be unique if true) + actions: + GET: + require_det_id: true + function: '' + args: + - argc: 0 + output: [ OutString(t) ] + - argc: 1 + arg_types: [ special::time_unit ] + output: [ "OutString(t , args[0])" ] + PUT: + require_det_id: true + function: '' + input: [ converted_time ] + input_types: [ time::ns ] + args: + - argc: 1 + arg_types: [ std::string ] + separate_time_units: + input: 'args[0]' + output: [ converted_time, unit ] + output: [ 'args[0]' ] + - argc: 2 + arg_types: [ int, special::time_unit ] + convert_to_time: + input: [ 'args[0]', 'args[1]' ] + output: converted_time + output: [ 'args[0]', 'args[1]' ] + +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." + actions: + GET: + function: getExptime + detectors: + MYTHEN3: + function: getExptimeForAllGates + PUT: + function: setExptime + +exptime1: + inherit_actions: Exptime + help: "[n_value]\n\t[Mythen3] Exposure time of gate signal 1 in auto and trigger mode (internal gating)." + actions: + GET: + extra_variables: + - name: gateIndex + type: int + value: 0 + function: getExptime + input: [ gateIndex ] + input_types: [ int ] + PUT: + extra_variables: + - name: gateIndex + type: int + value: 0 + function: setExptime + input: [ gateIndex,converted_time ] + input_types: [ int, time::ns ] + +exptime2: + inherit_actions: exptime1 + help: "[n_value]\n\t[Mythen3] Exposure time of gate signal 2 in auto and trigger mode (internal gating)." + actions: + GET: + extra_variables: + - name: gateIndex + type: int + value: 1 + PUT: + extra_variables: + - name: gateIndex + type: int + value: 1 + +exptime3: + inherit_actions: exptime1 + help: "[n_value]\n\t[Mythen3] Exposure time of gate signal 3 in auto and trigger mode (internal gating)." + actions: + GET: + extra_variables: + - name: gateIndex + type: int + value: 2 + PUT: + extra_variables: + - name: gateIndex + type: int + value: 2 + +readoutspeed: + help: "\n\t[0 or full_speed|1 or half_speed|2 or quarter_speed]\n\t[Eiger][Jungfrau][Moench][Mythen3] Readout speed of chip.\n\t[Eiger][Moench] Default speed is full_speed.\n\t[Jungfrau][Mythen3] Default speed is half_speed. \n\t[Jungfrau] full_speed option only available from v2.0 boards and is recommended to set number of interfaces to 2. Also overwrites adcphase to recommended default.\n\t [144|108]\n\t\t[Gotthard2] Readout speed of chip in MHz. Default is 108." + actions: + GET: + extra_variables: + - name: det_type + type: auto + value: det->getDetectorType().squash(defs::GENERIC); + exceptions: + - condition: 'det_type == defs::CHIPTESTBOARD || det_type == defs::XILINX_CHIPTESTBOARD' + message: '"ReadoutSpeed not implemented. Did you mean runclk?"' + argc: 0 + require_det_id: true + function: getReadoutSpeed + output: [ OutString(t) ] + PUT: + extra_variables: + - name: det_type + type: auto + value: det->getDetectorType().squash(defs::GENERIC); + exceptions: + - condition: 'det_type == defs::CHIPTESTBOARD || det_type == defs::XILINX_CHIPTESTBOARD' + message: '"ReadoutSpeed not implemented. Did you mean runclk?"' + argc: 1 + require_det_id: true + function: setReadoutSpeed + input: [ 'args[0]' ] + input_types: [ defs::speedLevel ] + cast_input: [ true ] + output: [ 'ToString(StringTo(args[0]))' ] + +adcphase: + 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" + actions: + GET: + require_det_id: true + extra_variables: + - name: det_type + type: auto + value: det->getDetectorType().squash(defs::GENERIC); + + exceptions: + - condition: 'det_type == defs::EIGER || det_type == defs::MYTHEN3 || det_type == defs::GOTTHARD2' + message: '"adcphase not implemented for this detector"' + args: + - argc: 0 + function: getADCPhase + output: [ OutString(t) ] + - argc: 1 + exceptions: + - condition: 'det_type == defs::EIGER || det_type == defs::MYTHEN3 || det_type == defs::GOTTHARD2' + message: '"adcphase not implemented for this detector"' + - condition: 'args[0] != "deg"' + message: '"Unknown adcphase argument " + args[0] + ". Did you mean deg? "' + function: getADCPhaseInDegrees + arg_types: [ special::deg ] + output: [ OutString(t), '" deg"' ] + + PUT: + extra_variables: + - name: det_type + type: auto + value: det->getDetectorType().squash(defs::GENERIC); + exceptions: + - condition: 'det_type == defs::EIGER || det_type == defs::MYTHEN3 || det_type == defs::GOTTHARD2' + message: '"adcphase not implemented for this detector"' + require_det_id: true + input: [ 'args[0]' ] + input_types: [ int ] + cast_input: [ true ] + + args: + - argc: 1 + function: setADCPhase + output: [ 'args.front()' ] + - argc: 2 + arg_types: [ int, special::deg ] + exceptions: + - condition: 'det_type == defs::EIGER || det_type == defs::MYTHEN3 || det_type == defs::GOTTHARD2' + message: '"adcphase not implemented for this detector"' + - condition: 'args[1] != "deg"' + message: '"Unknown adcphase 2nd argument " + args[1] + ". Did you mean deg?"' + + function: setADCPhaseInDegrees + output: [ 'args[0]',"' '", 'args[1]' ] + +dbitphase: + help: "[n_value] [(optional)deg]\n\t[Ctb][Jungfrau] Phase shift of clock to latch digital bits. Absolute phase shift. If deg used, then shift in degrees. \n\t[Ctb]Changing dbitclk also resets dbitphase and sets to previous values." + actions: + GET: + extra_variables: + - name: det_type + type: auto + value: det->getDetectorType().squash(defs::GENERIC); + + exceptions: + - condition: 'det_type == defs::EIGER || det_type == defs::MYTHEN3 || det_type == defs::GOTTHARD2 || det_type == defs::MOENCH' + message: '"dbitphase not implemented for this detector"' + require_det_id: true + args: + - argc: 0 + function: getDBITPhase + output: [ OutString(t) ] + - argc: 1 + exceptions: + - condition: 'det_type == defs::EIGER || det_type == defs::MYTHEN3 || det_type == defs::GOTTHARD2 || det_type == defs::MOENCH' + message: '"dbitphase not implemented for this detector"' + - condition: 'args[0] != "deg"' + message: '"Unknown dbitphase argument " + args[0] + ". Did you mean deg? "' + function: getDBITPhaseInDegrees + arg_types: [ special::deg ] + output: [ OutString(t), '" deg"' ] + PUT: + extra_variables: + - name: det_type + type: auto + value: det->getDetectorType().squash(defs::GENERIC); + + exceptions: + - condition: 'det_type == defs::EIGER || det_type == defs::MYTHEN3 || det_type == defs::GOTTHARD2 || det_type == defs::MOENCH' + message: '"dbitphase not implemented for this detector"' + require_det_id: true + input: [ 'args[0]' ] + input_types: [ int ] + cast_input: [ true ] + args: + - argc: 1 + function: setDBITPhase + output: [ 'args.front()' ] + - argc: 2 + exceptions: + - condition: 'det_type == defs::EIGER || det_type == defs::MYTHEN3 || det_type == defs::GOTTHARD2 || det_type == defs::MOENCH' + message: '"dbitphase not implemented for this detector"' + - condition: 'args[1] != "deg"' + message: '"Unknown dbitphase 2nd argument " + args[1] + ". Did you mean deg? "' + function: setDBITPhaseInDegrees + arg_types: [ int, special::deg ] + output: [ 'args[0]',"' '", 'args[1]' ] + +clkfreq: + help: "[n_clock] [freq_in_Hz]\n\t[Gotthard2][Mythen3] Frequency of clock n_clock in Hz. Use clkdiv to set frequency.\n\t[Gotthard2] Clock index range: 0-5\n\t[Mythen3] Clock index range: 0" + actions: + GET: + extra_variables: + - name: type + type: defs::detectorType + value: det->getDetectorType().squash(defs::GENERIC); + exceptions: + - condition: 'type != defs::GOTTHARD2 && type != defs::MYTHEN3' + message: '"clkfreq not implemented for this detector."' + argc: 1 + require_det_id: true + function: getClockFrequency + input: [ 'args[0]' ] + input_types: [ int ] + cast_input: [ true ] + output: [ OutString(t) ] + +clkphase: + help: "[n_clock] [phase] [deg (optional)]\n\t[Gotthard2][Mythen3] Phase of clock n_clock. If deg, then phase shift in degrees, else absolute phase shift values.n\t[Gotthard2] Clock index range: 0-5\n\t[Mythen3] Clock index range: 0" + actions: + GET: + extra_variables: + - name: type + type: defs::detectorType + value: det->getDetectorType().squash(defs::GENERIC); + exceptions: + - condition: 'type != defs::GOTTHARD2 && type != defs::MYTHEN3' + message: '"clkphase not implemented for this detector."' + require_det_id: true + input: [ 'args[0]' ] + input_types: [ int ] + cast_input: [ true ] + output: [ OutString(t) ] + args: + - argc: 1 + function: getClockPhase + - argc: 2 + exceptions: + - condition: 'type != defs::GOTTHARD2 && type != defs::MYTHEN3' + message: '"clkphase not implemented for this detector."' + - condition: 'args[1] != "deg"' + message: '"Cannot scan argument" + args[1] + ". Did you mean deg?"' + arg_types: [ int , special::deg ] + function: getClockPhaseinDegrees + output: [ OutString(t), '" deg"' ] + PUT: + extra_variables: + - name: type + type: defs::detectorType + value: det->getDetectorType().squash(defs::GENERIC); + exceptions: + - condition: 'type != defs::GOTTHARD2 && type != defs::MYTHEN3' + message: '"clkphase not implemented for this detector."' + require_det_id: true + input: [ 'args[0]', 'args[1]' ] + input_types: [ int, int ] + cast_input: [ true, true ] + args: + - argc: 2 + function: setClockPhase + output: [ 'args[1]' ] + - argc: 3 + arg_types: [int, int , special::deg ] + + exceptions: + - condition: 'type != defs::GOTTHARD2 && type != defs::MYTHEN3' + message: '"clkphase not implemented for this detector."' + - condition: 'args[2] != "deg"' + message: '"Cannot scan argument" + args[2] + ". Did you mean deg?"' + function: setClockPhaseinDegrees + output: [ 'args[1]', '" "', 'args[2]' ] + +maxclkphaseshift: + help: "[n_clock]\n\t[Gotthard2][Mythen3] Absolute Maximum Phase shift of clock n_clock.n\t[Gotthard2] Clock index range: 0-5\n\t[Mythen3] Clock index range: 0" + actions: + GET: + extra_variables: + - name: type + type: defs::detectorType + value: det->getDetectorType().squash(defs::GENERIC); + exceptions: + - condition: 'type != defs::GOTTHARD2 && type != defs::MYTHEN3' + message: '"maxclkphaseshift not implemented for this detector."' + require_det_id: true + input: [ 'args[0]' ] + input_types: [ int ] + cast_input: [ true ] + output: [ OutString(t) ] + argc: 1 + function: getMaxClockPhaseShift + +clkdiv: + help: "[n_clock] [n_divider]\n\t[Gotthard2][Mythen3] Clock Divider of clock n_clock. Must be greater than 1.\n\t[Gotthard2] Clock index range: 0-5\n\t[Mythen3] Clock index range: 0" + actions: + GET: + extra_variables: + - name: type + type: defs::detectorType + value: det->getDetectorType().squash(defs::GENERIC); + exceptions: + - condition: 'type != defs::GOTTHARD2 && type != defs::MYTHEN3' + message: '"clkdiv not implemented for this detector."' + require_det_id: true + function: getClockDivider + argc: 1 + input: [ 'args[0]' ] + input_types: [ int ] + cast_input: [ true ] + output: [ 'args[0]', "' '", OutString(t) ] + PUT: + extra_variables: + - name: type + type: defs::detectorType + value: det->getDetectorType().squash(defs::GENERIC); + exceptions: + - condition: 'type != defs::GOTTHARD2 && type != defs::MYTHEN3' + message: '"clkdiv not implemented for this detector."' + require_det_id: true + function: setClockDivider + argc: 2 + arg_types: [ int, int ] + input: [ 'args[0]', 'args[1]'] + input_types: [ int, int ] + cast_input: [ true, true ] + output: [ 'args[0]', "' '", 'args[1]' ] + +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." + actions: + GET: + argc: 1 + require_det_id: true + function: getExternalSignalFlags + input: [ 'args[0]' ] + input_types: [ int ] + cast_input: [ true ] + output: [ "args[0]","' '", OutString(t) ] + PUT: + argc: 2 + require_det_id: true + function: setExternalSignalFlags + input: [ 'args[0]', 'args[1]' ] + input_types: [ int, defs::externalSignalFlag ] + cast_input: [ true, true ] + output: [ 'args[0]', "' '", 'args[1]' ] + +dac: + help: "code: return GetHelpDacWrapper(cmd, args);\n" # this is a special case + actions: + GET: + exceptions: + - condition: "is_int(args[0]) && det->getDetectorType().squash() != defs::CHIPTESTBOARD && det->getDetectorType().squash() != defs::XILINX_CHIPTESTBOARD" + message: '"Dac indices can only be used for chip test board. Use daclist to get list of dac names for current detector."' + extra_variables: + - name: dacIndex + type: defs::dacIndex + value: "((det->getDetectorType().squash() == defs::CHIPTESTBOARD || det->getDetectorType().squash() == defs::XILINX_CHIPTESTBOARD) && !is_int(args[0])) ? det->getDacIndex(args[0]) : StringTo(args[0])" + function: getDAC + require_det_id: true + input_types: [ defs::dacIndex, bool ] + cast_input: [ false, true ] + args: + - argc: 1 + arg_types: [defs::dacIndex] + input: [ dacIndex, '"0"' ] + output: [ 'args[0]', "' '", OutString(t) ] + - argc: 2 + exceptions: + - condition: "is_int(args[0]) && det->getDetectorType().squash() != defs::CHIPTESTBOARD && det->getDetectorType().squash() != defs::XILINX_CHIPTESTBOARD" + message: '"Dac indices can only be used for chip test board. Use daclist to get list of dac names for current detector."' + - condition: 'args[1] != "mv" && args[1] != "mV"' + message: '"Unknown argument " + args[1] + ". Did you mean mV?"' + arg_types: [defs::dacIndex, special::mv] + input: [ dacIndex, '"1"' ] + output: [ 'args[0]', "' '" , OutString(t), '" mV"' ] + PUT: + exceptions: + - condition: "is_int(args[0]) && det->getDetectorType().squash() != defs::CHIPTESTBOARD && det->getDetectorType().squash() != defs::XILINX_CHIPTESTBOARD" + message: '"Dac indices can only be used for chip test board. Use daclist to get list of dac names for current detector."' + extra_variables: + - name: dacIndex + type: defs::dacIndex + value: "((det->getDetectorType().squash() == defs::CHIPTESTBOARD || det->getDetectorType().squash() == defs::XILINX_CHIPTESTBOARD) && !is_int(args[0])) ? det->getDacIndex(args[0]) : StringTo(args[0])" + function: setDAC + require_det_id: true + input_types: [ defs::dacIndex, int, bool ] + cast_input: [ false, true, true ] + args: + - argc: 2 + arg_types: [defs::dacIndex, int] + input: [ dacIndex, "args[1]", '"0"' ] + output: [ "args[0]", "' '", "args[1]" ] + - argc: 3 + arg_types: [defs::dacIndex, int, special::mv] + input: [ dacIndex, "args[1]", '"1"' ] + output: [ "args[0]", "' '", "args[1]", '" mV"' ] + +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." + actions: + PUT: + function: resetToDefaultDacs + require_det_id: true + input_types: [ bool ] + output: [ '"successful"' ] + args: + - argc: 1 + arg_types: [ special::hard ] + exceptions: + - condition: 'args[0] != "hard"' + message: '"Unknown argument " + args[0] + ". Did you mean hard?"' + input: [ '"1"' ] + - argc: 0 + input: [ '"0"' ] + +defaultdac: + help: "[dac name][value][(optional)setting]\n\tSets the default for that dac to this value.\n\t[Jungfrau][Moench][Mythen3] When settings is provided, it sets the default value only for that setting" + actions: + GET: + function: getDefaultDac + require_det_id: true + args: + - argc: 1 + input: [ "args[0]" ] + cast_input: [ true ] + input_types: [ defs::dacIndex ] + output: [ "args[0]", "' '", OutString(t) ] + - argc: 2 + input: [ "args[0]", "args[1]" ] + cast_input: [ true, true ] + input_types: [ defs::dacIndex, defs::detectorSettings ] + output: [ "args[0]", "' '", "args[1]", "' '", OutString(t) ] + PUT: + function: setDefaultDac + require_det_id: true + args: + - argc: 2 + cast_input: [ true, true ] + input: [ "args[0]", "args[1]" ] + input_types: [ defs::dacIndex, int ] + output: [ "args[0]", "' '", "args[1]" ] + + - argc: 3 + cast_input: [ true, true, true ] + input: [ "args[0]", "args[1]", "args[2]" ] + input_types: [ defs::dacIndex, int, defs::detectorSettings ] + output: [ "args[0]", "' '", "args[2]", "' '", "args[1]" ] + +rx_status: + help: "[running, idle, transmitting]\n\tReceiver listener status." + actions: + GET: + argc: 0 + function: getReceiverStatus + require_det_id: true + output: [ OutString(t) ] + PUT: + argc: -1 + exceptions: + - condition: 'true' + message: '"Cannot put. Did you mean to use command: \"rx_start\" or \"rx_stop\"?"' + +status: + help: "[running, error, transmitting, finished, waiting, idle]\n\tDetector status. Goes to stop server." + actions: + GET: + argc: 0 + function: getDetectorStatus + require_det_id: true + output: [ OutString(t) ] + PUT: + argc: -1 + exceptions: + - condition: 'true' + message: '"Cannot put. Did you mean to use command: \"start\" or \"stop\"?"' + + +scan: + help: "[dac_name|0|trimbits] [start_val] [stop_val] [step_size] [dac settling time ns|us|ms|s]\n\tEnables/ disables scans for dac and trimbits \n\tEnabling scan sets number of frames to number of steps in receiver. \n\tTo cancel scan configuration, set dac to '0', which also sets number of frames to 1. \n\t[Eiger][Mythen3] Use trimbits as dac name for a trimbit scan." + actions: + GET: + argc: 0 + function: getScan + require_det_id: true + output: [ OutString(t) ] + PUT: + check_det_id: true + function: setScan + output: [ ToString(args) ] + args: + - argc: 1 + exceptions: + - condition: 'StringTo(args[0]) != 0' + message: '"Unknown argument " + args[0] + ". Did you mean 0 to disable scan?"' + arg_types: [ int ] + input: [ "defs::scanParameters()" ] + input_types: [ auto ] + - argc: 4 + arg_types: [ defs::dacIndex, int, int, int ] + input: [ "defs::scanParameters(StringTo(args[0]), StringTo(args[1]), StringTo(args[2]), StringTo(args[3]))" ] + input_types: [ auto ] + - argc: 5 + arg_types: [ defs::dacIndex, int, int, int, std::string ] + separate_time_units: + input: 'args[4]' + output: [ t, unit ] + input: [ "defs::scanParameters(StringTo(args[0]), StringTo(args[1]), StringTo(args[2]), StringTo(args[3]), t)" ] + input_types: [ auto ] + +Trigger: + template: true + actions: + PUT: + check_det_id: true + argc: 0 + function: sendSoftwareTrigger + input: [ block ] + input_types: [ bool ] + cast_input: [ false ] + output: [ '"successful"' ] + +trigger: + inherit_actions: Trigger + help: "\n\t[Eiger][Mythen3][Jungfrau][Moench] Sends software trigger signal to detector" + actions: + PUT: + extra_variables: + - name: block + type: bool + value: "false" + +blockingtrigger: + inherit_actions: Trigger + help: "\n\t[Eiger][Jungfrau][Moench] Sends software trigger signal to detector and blocks till the frames are sent out for that trigger." + actions: + PUT: + extra_variables: + - name: block + type: bool + value: "true" + +udp_dstlist: + help: "[ip=x.x.x.x] [(optional)ip2=x.x.x.x] \n\t\t[mac=xx:xx:xx:xx:xx:xx] [(optional)mac2=xx:xx:xx:xx:xx:xx]\n\t\t[port=value] [(optional)port2=value]\n\t\tThe order of ip, mac and port does not matter. entry_value can be >0 only for [Eiger][Jungfrau][Moench][Mythen3][Gotthard2] where round robin is implemented. If 'auto' used, then ip is set to ip of rx_hostname." + actions: + GET: + exceptions: + - condition: "det_id == -1" + message: '"Can execute udp_dstlist only at module level."' + - condition: "rx_id < 0 || rx_id >= MAX_UDP_DESTINATION" + message: '"Invalid receiver index " + std::to_string(rx_id) + " to set round robin entry."' + argc: 0 + function: getDestinationUDPList + require_det_id: true + input: [ rx_id ] + input_types: [ auto ] + output: [ OutString(t) ] + PUT: + exceptions: + - condition: "det_id == -1" + message: '"Can execute udp_dstlist only at module level."' + - condition: "rx_id < 0 || rx_id >= MAX_UDP_DESTINATION" + message: '"Invalid receiver index " + std::to_string(rx_id) + " to set round robin entry."' + - condition: "args.empty()" + message: '"udp_dstlist require at least one argument."' + argc: -1 + function: setDestinationUDPList + require_det_id: true + convert_det_id: false + arg_types: [ std::string ] + input: [ getUdpEntry() ] + input_types: [ auto ] + output: [ ToString(args) ] + +txdelay: + help: "[n_delay]\n\t[Eiger][Jungfrau][Moench][Mythen3] Set transmission delay for all modules in the detector using the step size provided.Sets up \n\t[Eiger] txdelay_left to (2 * mod_index * n_delay), \n\t[Eiger] txdelay_right to ((2 * mod_index + 1) * n_delay) and \n\t[Eiger] txdelay_frame to (2 *num_modules * n_delay)\n\t[Jungfrau][Moench][Mythen3] txdelay_frame to (num_modules * n_delay) for every module." + actions: + GET: + argc: 0 + check_det_id: true + function: getTransmissionDelay + output: [ OutString(t) ] + PUT: + argc: 1 + check_det_id: true + function: setTransmissionDelay + input: [ 'args[0]' ] + input_types: [ int ] + cast_input: [ true ] + output: [ 'args.front()' ] + +zmqhwm: + help: "[n_limit] \n\tClient's zmq receive high water mark. Default is the zmq library's default (1000), can also be set here using -1. \n\tThis is a high number and can be set to 2 for gui purposes. \n\tOne must also set the receiver's send high water mark to similar value. Final effect is sum of them.\n\t Setting it via command line is useful only before zmq enabled (before opening gui)." + actions: + GET: + argc: 0 + function: getClientZmqHwm + output: [ t ] + PUT: + argc: 1 + function: setClientZmqHwm + input: [ 'args[0]' ] + input_types: [ int ] + cast_input: [ true ] + output: [ 'det->getClientZmqHwm()' ] + +Pulse: + template: true + help: '' + actions: + PUT: + argc: 3 + require_det_id: true + function: '' + arg_types: [int, int, int] + extra_variables: + - name: c + type: defs::xy + value: defs::xy(StringTo(args[1]), StringTo(args[2])) + input: [ 'args[0]', c ] + input_types: [ int, defs::xy ] + cast_input: [ true, false ] + output: [ ToString(args) ] + +pulse: + inherit_actions: Pulse + help: "[n_times] [x] [y]\n\t[Eiger] Pulse pixel n number of times at coordinates (x, y). Advanced User!" + actions: + PUT: + function: pulsePixel + +pulsenmove: + inherit_actions: Pulse + help: "[n_times] [x] [y]\n\t[Eiger] Pulse pixel n number of times and moves relatively by (x, y). Advanced User!" + actions: + PUT: + function: pulsePixelNMove + +pulsechip: + help: "[n_times] \n\t[Eiger] Pulse chip n times. If n is -1, resets to normal mode (reset chip completely at start of acquisition, where partialreset = 0). Advanced User!" + actions: + PUT: + argc: 1 + require_det_id: true + function: pulseChip + input: [ 'args[0]' ] + input_types: [ int ] + cast_input: [ true ] + output: [ args.front() ] + +quad: + help: "[0, 1]\n\t[Eiger] Sets detector size to a quad. 0 (disabled) is default. (Specific hardware required)." + actions: + GET: + argc: 0 + require_det_id: true + function: getQuad + output: [ OutString(t) ] + PUT: + argc: 1 + check_det_id: true + function: setQuad + input: [ 'args[0]' ] + input_types: [ bool ] + cast_input: [ true ] + output: [ args.front() ] + +datastream: + help: "[left|right] [0, 1]\n\t[Eiger] Enables or disables data streaming from left or/and right side of detector for 10 GbE mode. 1 (enabled) by default." + actions: + GET: + argc: 1 + require_det_id: true + function: getDataStream + input: [ 'args[0]' ] + input_types: [ defs::portPosition ] + cast_input: [ true ] + output: [ OutString(t) ] + PUT: + argc: 2 + require_det_id: true + function: setDataStream + input: [ 'args[0]', 'args[1]' ] + input_types: [ defs::portPosition, bool ] + cast_input: [ true, true ] + output: [ 'ToString(args)' ] + +temp_event: + help: "[0]\n\t[Jungfrau][Moench] 1, if a temperature event occured. To clear this event, set it to 0.\n\tIf temperature crosses threshold temperature and temperature control is enabled, power to chip will be switched off and temperature event occurs. To power on chip again, temperature has to be less than threshold temperature and temperature event has to be cleared." + actions: + GET: + argc: 0 + require_det_id: true + function: getTemperatureEvent + output: [ OutString(t) ] + PUT: + argc: 1 + exceptions: + - condition: 'StringTo(args[0]) != 0' + message: '"Unknown argument for temp event: ( " + args[0] + " ). Did you mean 0 to reset event?"' + require_det_id: true + function: resetTemperatureEvent + arg_types: [ int ] + output: [ '"cleared"' ] + +pedestalmode: + help: " [frames] [loops]\n\t\t[Jungfrau] Enable pedestal mode. \n\t\tThe number of frames or triggers is overwritten by: \n\t\t(#pedestal_frames x #pedestal_loops x 2). \n\t\tIn auto timing mode or in trigger mode with #frames > 1, \n\t\t#frames is overwritten and #triggers = 1, \n\t\telse #triggers is overwritten and #frames = 1. \n\t\tOne cannot set #frames, #triggers or timing mode in pedestal mode (exception thrown).\n\tpedestalmode [0]\n\t\t[Jungfrau] Disable pedestal mode.\n\t\tDisabling pedestal mode will set back the normal mode values of #frames and #triggers." + actions: + GET: + argc: 0 + require_det_id: true + function: getPedestalMode + output: [ OutString(t) ] + PUT: + function: setPedestalMode + output: [ "ToString(args)" ] + args: + - argc: 1 + exceptions: + - condition: 'args[0] != "0"' + message: '"Unknown argument " + args[0] + ". Did you mean 0 to disable pedestal mode?"' + arg_types: [ special::pedestal_parameters ] + input: [ defs::pedestalParameters() ] + input_types: [ defs::pedestalParameters ] + - argc: 2 + arg_types: [ uint8_t, uint16_t ] + input_types: [ defs::pedestalParameters ] + input: [ 'defs::pedestalParameters(StringTo(args[0]), StringTo(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(args[0]), StringTo(args[1])) + input: [ t ] + input_types: [ defs::ROI ] + output: [ 't' ] + +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." + actions: + GET: + argc: 0 + require_det_id: true + function: getInjectChannel + output: [ OutString(t) ] + PUT: + argc: 2 + function: setInjectChannel + require_det_id: true + arg_types: [int, int] + input: [ 'args[0]', 'args[1]' ] + input_types: [ int, int ] + cast_input: [ true, true ] + output: [ ToString(args) ] + +vetophoton: + help: "[ichip] [#photons] [energy in keV] [reference file]\n\t[Gotthard2] Set veto reference for 128 channels for chip ichip according to reference file and #photons and energy in keV.\n\t[ichip] [output file]\n\t Get gain indices and veto reference for 128 channels for chip ichip, saved to file." + actions: + GET: + argc: 2 + require_det_id: true + function: getVetoPhoton + store_result_in_t: false + input: [ 'args[0]', 'args[1]' ] + input_types: [ int, std::string ] + cast_input: [ true, false ] + output: [ '"saved to file "' , "args[1]" ] + PUT: + argc: 4 + require_det_id: true + function: setVetoPhoton + input: [ 'args[0]', 'args[1]', "args[2]", "args[3]" ] + input_types: [ int, int, int, std::string ] + cast_input: [ true, true, true, false ] + output: [ ToString(args) ] + +vetoref: + help: "[gain index] [12 bit value]\n\t[Gotthard2] Set veto reference for all 128 channels for all chips." + actions: + GET: + argc: -1 + exceptions: + - condition: 'true' + message: '"Cannot get vetoref. Did you mean vetophoton?"' + + PUT: + argc: 2 + function: setVetoReference + input: [ 'args[0]', 'args[1]' ] + input_types: [ int, int ] + cast_input: [ true, true ] + output: [ ToString(args) ] + +vetofile: + help: "[chip index 0-9, -1 for all] [file name] \n\t[Gotthard2] Set veto reference for each 128 channels for specific chip. The file should have 128 rows of gain index and 12 bit value in dec" + actions: + GET: + argc: -1 + exceptions: + - condition: 'true' + message: '"Cannot get vetofile. Did you mean vetophoton?"' + PUT: + argc: 2 + function: setVetoFile + require_det_id: true + input: [ 'args[0]', 'args[1]' ] + input_types: [ int, std::string ] + cast_input: [ true, false ] + output: [ ToString(args) ] + +vetoalg: + help: "[hits|raw] [lll|10gbe]\n\t[Gotthard2] Set the veto algorithm. Default is hits." + actions: + GET: + argc: 1 + extra_variables: + - name: interface + type: defs::streamingInterface + value: StringTo(args[0]) + exceptions: + - condition: 'interface == defs::streamingInterface::NONE' + message: '"Must specify an interface to set algorithm"' + require_det_id: true + function: getVetoAlgorithm + input: [ 'interface' ] + input_types: [ defs::streamingInterface ] + cast_input: [ false ] + output: [ OutString(t), "' '", ToString(interface) ] + PUT: + argc: 2 + extra_variables: + - name: alg + type: defs::vetoAlgorithm + value: StringTo(args[0]) + - name: interface + type: defs::streamingInterface + value: StringTo(args[1]) + exceptions: + - condition: 'interface == defs::streamingInterface::NONE' + message: '"Must specify an interface to set algorithm"' + require_det_id: true + function: setVetoAlgorithm + input: [ 'alg', 'interface' ] + input_types: [ defs::vetoAlgorithm, defs::streamingInterface ] + cast_input: [ false, false ] + output: [ ToString(alg), "' '", ToString(interface) ] + +confadc: + help: "[chip index 0-9, -1 for all] [adc index 0-31, -1 for all] [7 bit configuration value in hex]\n\t[Gotthard2] Sets configuration for specific chip and adc, but configures 1 chip (all adcs for that chip) at a time." + actions: + GET: + argc: 2 + require_det_id: true + function: getADCConfiguration + input: [ 'args[0]', 'args[1]' ] + input_types: [ int, int ] + cast_input: [ true, true ] + output: [ OutStringHex(t) ] + PUT: + argc: 3 + require_det_id: true + function: setADCConfiguration + input: [ 'args[0]', 'args[1]', 'args[2]' ] + input_types: [ int, int, int ] + cast_input: [ true, true, true ] + output: [ "'['", "args[0]", '", "', "args[1]", '", "', "ToStringHex( StringTo(args[2]))", '"]"' ] + +gatedelay: + help: "[duration] [(optional unit) ns|us|ms|s]\n\t[Mythen3] Gate Delay of all gate signals in auto and trigger mode (internal gating)." + actions: + GET: + function: getGateDelayForAllGates + require_det_id: true + args: + - argc: 0 + output: [ OutString(t) ] + - argc: 1 + arg_types: [ special::time_unit ] + output: [ "OutString(t, args[0])" ] + PUT: + extra_variables: + - name: gateIndex + type: int + value: -1 + require_det_id: true + function: setGateDelay + input: [ gateIndex, converted_time ] + input_types: [ int, time::ns ] + args: + - argc: 1 + arg_types: [ std::string ] + separate_time_units: + input: 'args[0]' + output: [ converted_time, unit ] + output: [ 'args[0]' ] + - argc: 2 + arg_types: [ int, special::time_unit ] + convert_to_time: + input: [ 'args[0]', 'args[1]' ] + output: converted_time + output: [ 'args[0]', 'args[1]' ] + +gatedelay1: + help: "[duration] [(optional unit) ns|us|ms|s]\n\t[Mythen3] Gate Delay of gate signal 1 in auto and trigger mode (internal gating)." + inherit_actions: gatedelay + actions: + GET: + extra_variables: + - name: gateIndex + type: int + value: 0 + function: getGateDelay + input: [ gateIndex ] + input_types: [ int ] + PUT: + extra_variables: + - name: gateIndex + type: int + value: 0 + +gatedelay2: + help: "[duration] [(optional unit) ns|us|ms|s]\n\t[Mythen3] Gate Delay of gate signal 2 in auto and trigger mode (internal gating)." + inherit_actions: gatedelay1 + actions: + GET: + extra_variables: + - name: gateIndex + type: int + value: 1 + PUT: + extra_variables: + - name: gateIndex + type: int + value: 1 + +gatedelay3: + help: "[duration] [(optional unit) ns|us|ms|s]\n\t[Mythen3] Gate Delay of gate signal 3 in auto and trigger mode (internal gating)." + inherit_actions: gatedelay1 + actions: + GET: + extra_variables: + - name: gateIndex + type: int + value: 2 + PUT: + extra_variables: + - name: gateIndex + type: int + value: 2 + +adcvpp: + help: "[dac or mV value][(optional unit) mV] \n\t[Ctb] Vpp of ADC.\n\t 0 -> 1V ; 1 -> 1.14V ; 2 -> 1.33V ; 3 -> 1.6V ; 4 -> 2V. \n\tAdvanced User function!" + actions: + GET: + require_det_id: true + function: getADCVpp + args: + - argc: 0 + input: [ '"0"' ] + input_types: [ bool ] + cast_input: [ true ] + output: [ OutString(t) ] + - argc: 1 + arg_type: [ special::mv ] + exceptions: + - condition: '(args[0] != "mv") && (args[0] != "mV")' + message: '"Unknown argument " + args[0] + ". Did you mean mV?"' + input: [ '"1"' ] + input_types: [ bool ] + cast_input: [ true ] + output: [ OutString(t), '" mV"' ] + PUT: + require_det_id: true + function: setADCVpp + args: + - argc: 1 + output: [ "args[0]" ] + input: [ "args[0]", '"0"' ] + input_types: [ int, bool ] + arg_types: [ int ] + cast_input: [ true, true ] + - argc: 2 + arg_types: [ int, special::mv ] + exceptions: + - condition: '(args[1] != "mv") && (args[1] != "mV")' + message: '"Unknown argument " + args[1] + ". Did you mean mV?"' + input: [ "args[0]", '"1"' ] + input_types: [ int, bool ] + cast_input: [ true , true ] + output: [ "args[0]", '" mV"' ] + +diodelay: + help: "[0-775]\n\t[Ctb] Delay for diode. Delay is in ps and max of 775 ps. Resolution is 25 ps." + actions: + PUT: + argc: 2 + require_det_id: true + function: setDigitalIODelay + input: [ 'args[0]', 'args[1]' ] + input_types: [ uint64_t, int ] + cast_input: [ true, true ] + output: [ ToString(args) ] + +# pattern is a keyword in yaml, so patternX is used to avoid it +patternX: + help: "[fname]\n\t[Mythen3][Ctb][Xilinx Ctb] Loads ASCII pattern file directly to server (instead of executing line by line)" + command_name: "pattern" + actions: + PUT: + argc: 1 + require_det_id: true + function: setPattern + input: [ 'args[0]' ] + input_types: [ std::string ] + cast_input: [ false ] + output: [ 'args.front()' ] + +patword: + help: "[step or address] [64 bit mask]\n\t[Ctb][Mythen3][Xilinx Ctb] 64 bit pattern at address of pattern memory.\n\t[Ctb] read is same as executing pattern" + actions: + GET: + argc: 1 + require_det_id: true + function: getPatternWord + input: [ 'args[0]' ] + input_types: [ int ] + cast_input: [ true ] + output: [ "'['","ToStringHex(arg0, 4)", '", "', "OutStringHex(t, 16)", '"]"' ] + PUT: + argc: 2 + require_det_id: true + function: setPatternWord + input: [ 'args[0]', 'args[1]' ] + input_types: [ int, uint64_t ] + cast_input: [ true, true ] + output: [ "'['", "ToStringHex(arg0, 4)", '", "', "ToStringHex(arg1, 16)", '"]"' ] + +patlimits: + help: "[start addr] [stop addr] \n\t[Ctb][Mythen3][Xilinx Ctb] Limits of complete pattern" + actions: + GET: + argc: -1 + require_det_id: true + function: getPatternLoopAddresses + input: [ '"-1"' ] + input_types: [ int ] + cast_input: [ true ] + output: [ "OutStringHex(t, 4)" ] + PUT: + argc: -1 + require_det_id: true + function: setPatternLoopAddresses + input: [ '"-1"', 'args[0]', 'args[1]' ] + input_types: [ int, int, int ] + cast_input: [ true, true, true ] + output: [ "'['" , "ToStringHex(arg1, 4)" , '", "' , "ToStringHex(arg2, 4)", "']'" ] + +patloop: + help: "[0-6] [start addr] [stop addr] \n\t[Ctb][Mythen3][Xilinx Ctb] Limits of the loop level provided.\n\t[Mythen3] Level options: 0-3 only." + actions: + GET: + argc: -1 + pattern_command: + command_name: patloop + nGetArgs: 0 + nPutArgs: 2 + require_det_id: true + function: getPatternLoopAddresses + input: [ level ] + input_types: [ int ] + cast_input: [ false ] + output: [level,"' '" ,"OutStringHex(t, 4)" ] + PUT: + argc: -1 + extra_variables: + - name: start + type: int + value: "StringTo(args[iArg++])" + - name: stop + type: int + value: "StringTo(args[iArg++])" + pattern_command: + command_name: patloop + nGetArgs: 0 + nPutArgs: 2 + require_det_id: true + function: setPatternLoopAddresses + input: [ level, start, stop ] + input_types: [ int, int, int ] + output: [level,"' '" , "'['" , "ToStringHex(start, 4)" , '", "' , "ToStringHex(stop, 4)", "']'" ] + +patloop0: + help: "\n\tDeprecated command. Use patloop." + inherit_actions: patloop + actions: + GET: + output: ["OutStringHex(t, 4)" ] + PUT: + output: [ "'['" , "ToStringHex(start, 4)" , '", "' , "ToStringHex(stop, 4)", "']'" ] + +patloop1: + inherit_actions: patloop0 + +patloop2: + inherit_actions: patloop0 + +patnloop: + help: "[0-6] [n_cycles] \n\t[Ctb][Mythen3][Xilinx Ctb] Number of cycles of the loop level provided.\n\t[Mythen3] Level options: 0-3 only." + actions: + GET: + argc: -1 + pattern_command: + command_name: patnloop + nGetArgs: 0 + nPutArgs: 1 + require_det_id: true + function: getPatternLoopCycles + input: [ level ] + input_types: [ int ] + cast_input: [ false ] + output: [ level,"' '" , "OutString(t)" ] + PUT: + argc: -1 + extra_variables: + - name: nloops + type: std::string + value: "args[iArg++]" + pattern_command: + command_name: patnloop + nGetArgs: 0 + nPutArgs: 1 + require_det_id: true + function: setPatternLoopCycles + input: [ level, nloops ] + input_types: [ int, int ] + cast_input: [ false, true ] + output: [ level,"' '" , nloops ] + +patnloop0: + help: "\n\tDeprecated command. Use patnloop." + inherit_actions: patnloop + actions: + GET: + output: [ "OutString(t)" ] + PUT: + output: [ "nloops" ] + +patnloop1: + inherit_actions: patnloop0 + +patnloop2: + inherit_actions: patnloop0 + +patwait: + help: "[0-6] [addr] \n\t[Ctb][Mythen3][Xilinx Ctb] Wait address for loop level provided. \n\t[Mythen3] Level options: 0-3 only." + actions: + GET: + argc: -1 + pattern_command: + command_name: patwait + nGetArgs: 0 + nPutArgs: 1 + require_det_id: true + function: getPatternWaitAddr + input: [ level ] + input_types: [ int ] + cast_input: [ false ] + output: [level,"' '" , "OutStringHex(t, 4)" ] + PUT: + argc: -1 + extra_variables: + - name: addr + type: int + value: "StringTo(args[iArg++])" + pattern_command: + command_name: patwait + nGetArgs: 0 + nPutArgs: 1 + require_det_id: true + function: setPatternWaitAddr + input: [ level, addr ] + input_types: [ int, int ] + output: [level,"' '" , "ToStringHex(addr, 4)" ] + +patwait0: + help: "\n\tDeprecated command. Use patwait." + inherit_actions: patwait + actions: + GET: + output: [ "OutStringHex(t, 4)" ] + PUT: + output: [ "ToStringHex(addr, 4)" ] + +patwait1: + inherit_actions: patwait0 + +patwait2: + inherit_actions: patwait0 + +patwaittime: + help: "[0-6] [n_clk] \n\t[Ctb][Mythen3][Xilinx Ctb] Wait time in clock cycles for the loop provided.\n\t[Mythen3] Level options: 0-3 only." + actions: + GET: + argc: -1 + pattern_command: + command_name: patwaittime + nGetArgs: 0 + nPutArgs: 1 + require_det_id: true + function: getPatternWaitTime + input: [ level ] + input_types: [ int ] + cast_input: [ false ] + output: [ level,"' '" , "OutString(t)" ] + PUT: + argc: -1 + extra_variables: + - name: waittime + type: uint64_t + value: "StringTo(args[iArg++])" + pattern_command: + command_name: patwaittime + nGetArgs: 0 + nPutArgs: 1 + require_det_id: true + function: setPatternWaitTime + input: [ level, waittime ] + input_types: [ int, int ] + output: [level,"' '" , "waittime" ] + +patwaittime0: + help: "\n\tDeprecated command. Use patwaittime." + inherit_actions: patwaittime + actions: + GET: + output: [ "OutString(t)" ] + PUT: + output: [ "waittime" ] + +patwaittime1: + inherit_actions: patwaittime0 + +patwaittime2: + inherit_actions: patwaittime0 + +rx_jsonpara: + help: "[key1] [value1]\n\t[Receiver] Additional json header parameter streamed out from receiver. If not found in header, the pair is appended. An empty values deletes parameter. Max 20 characters for each key/value." + actions: + GET: + argc: 1 + require_det_id: true + function: getAdditionalJsonParameter + input: [ 'args[0]' ] + input_types: [ std::string ] + output: [ OutString(t) ] + PUT: + require_det_id: true + function: setAdditionalJsonParameter + args: + - argc: 1 + input: [ 'args[0]', '""' ] + arg_types: [ std::string ] + input_types: [ std::string, std::string ] + cast_input: [ false, false ] + output: [ 'args[0]', '" deleted"' ] + - argc: 2 + input: [ 'args[0]', 'args[1]' ] + input_types: [ std::string, std::string ] + cast_input: [ false, false ] + output: [ '"{"', 'args[0]', '": "', 'args[1]', '"}"' ] + +programfpga: + help: "[fname.pof | fname.rbf (full path)][(opitonal)--force-delete-normal-file]\n\t[Jungfrau][Moench][Ctb] Programs FPGA from pof file (full path). Then, detector controller is rebooted. \n\t\tUse --force-delete-normal-file argument, if normal file found in device tree, it must be deleted, a new device drive created and programming continued.\n\t[Mythen3][Gotthard2] Programs FPGA from rbf file (full path). Then, detector controller is rebooted." + actions: + PUT: + require_det_id: true + function: programFPGA + output: [ '"successful"' ] + args: + - argc: 1 + input: [ 'args[0]', '"0"' ] + input_types: [ std::string, bool ] + arg_types: [special::path] + cast_input: [ false, true ] + - argc: 2 + arg_types: [special::path, special::force-delete-normal-file] + exceptions: + - condition: 'args[1] != "--force-delete-normal-file"' + message: '"Could not scan second argument. Did you mean --force-delete-normal-file?"' + input: [ 'args[0]', '"1"' ] + input_types: [ std::string, bool ] + cast_input: [ false, true ] + +updatedetectorserver: + help: "[server_name with full path]\n\t[Jungfrau][Moench][Eiger][Ctb][Mythen3][Gotthard2] Copies detector server via TCP (without tftp). Makes a symbolic link with a shorter name (without vx.x.x). Then, detector controller reboots (except Eiger).\n\t[Jungfrau][Moench][Ctb]Also changes respawn server to the link, which is effective after a reboot." + actions: + PUT: + argc: 1 + require_det_id: true + function: updateDetectorServer + input: [ 'args[0]' ] + arg_types: [special::path] + input_types: [ std::string ] + output: [ '"successful"' ] + +updatekernel: + help: "[kernel_name with full path]\n\t[Jungfrau][Moench][Ctb][Mythen3][Gotthard2] Advanced Command!! You could damage the detector. Please use with caution.\n\tUpdates the kernel image. Then, detector controller reboots with new kernel." + actions: + PUT: + argc: 1 + require_det_id: true + function: updateKernel + input: [ 'args[0]' ] + arg_types: [special::path] + input_types: [ std::string ] + output: [ '"successful"' ] + +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" + actions: + PUT: + argc: 2 + exceptions: + - condition: 'args[args.size() - 1].find(".pof") == std::string::npos && args[args.size() - 1].find(".rbf") == std::string::npos' + message: '"Programming file must be a pof/rbf file."' + require_det_id: true + function: updateFirmwareAndServer + input: [ 'args[0]', 'args[1]' ] + arg_types: [ special::path, special::path ] + input_types: [ std::string, std::string ] + output: [ '"successful"' ] + +reg: + help: "[address] [32 bit value][(optional)--validate]\n\t[Mythen3][Gotthard2] Reads/writes to a 32 bit register in hex. Advanced Function!\n\tGoes to stop server. Hence, can be called while calling blocking acquire().\n\t\t Use --validate to force validation when writing to it.\n\t[Eiger] +0x100 for only left, +0x200 for only right." + actions: + GET: + argc: 1 + require_det_id: true + function: readRegister + input: [ 'args[0]' ] + input_types: [ uint32_t ] + cast_input: [ true ] + output: [ OutStringHex(t) ] + PUT: + require_det_id: true + function: writeRegister + output: [ '"["', 'args[0]', '", "', 'args[1]', '"]"' ] + args: + - argc: 2 + input: [ 'args[0]', 'args[1]', '"0"' ] + input_types: [ uint32_t, uint32_t, bool ] + arg_types: [ uint32_t, uint32_t ] + cast_input: [ true, true, true ] + - argc: 3 + arg_types: [ uint32_t, uint32_t, special::validate ] + exceptions: + - condition: 'args[2] != "--validate"' + message: '"Could not scan third argument. Did you mean --validate?"' + input: [ 'args[0]', 'args[1]', '"1"' ] + input_types: [ uint32_t, uint32_t, bool ] + cast_input: [ true, true, true ] + +adcreg: + help: "[address] [value]\n\t[Jungfrau][Moench][Ctb][Gotthard] Writes to an adc register in hex. Advanced user Function!" + actions: + PUT: + argc: 2 + require_det_id: true + function: writeAdcRegister + input: [ 'args[0]', 'args[1]' ] + input_types: [ uint32_t, uint32_t ] + cast_input: [ true, true ] + output: [ ToString(args) ] + +getbit: + help: "[reg address in hex] [bit index]\n\tGets bit in address." + actions: + GET: + argc: 2 + exceptions: + - condition: 'StringTo(args[1]) < 0 || StringTo(args[1]) > 31' + message: '"Bit number out of range: " + args[1]' + require_det_id: true + function: getBit + input: [ 'args[0]', 'args[1]' ] + input_types: [ uint32_t, int ] + cast_input: [ true, true ] + output: [ OutString(t) ] + +Setbit: + template: true + actions: + PUT: + require_det_id: true + function: setBit + output: [ '"["', 'args[0]', '", "', 'args[1]', '"]"' ] + args: + - argc: 2 + exceptions: + - condition: 'StringTo(args[1]) < 0 || StringTo(args[1]) > 31' + message: '"Bit number out of range: " + args[1]' + input: [ 'args[0]', 'args[1]', '"0"' ] + input_types: [ uint32_t, int, bool ] + arg_types: [ uint32_t, int ] + cast_input: [ true, true, true ] + - argc: 3 + arg_types: [ uint32_t, int, special::validate ] + exceptions: + - condition: 'StringTo(args[1]) < 0 || StringTo(args[1]) > 31' + message: '"Bit number out of range: " + args[1]' + - condition: 'args[2] != "--validate"' + message: '"Could not scan third argument. Did you mean --validate?"' + input: [ 'args[0]', 'args[1]', '"1"' ] + input_types: [ uint32_t, int, bool ] + cast_input: [ true, true, true ] + + +setbit: + inherit_actions: Setbit + help: "[reg address in hex] [bit index]\n\tSets bit in address.\n\tUse --validate to force validation." + actions: + PUT: + function: setBit + +clearbit: + inherit_actions: Setbit + help: "[reg address in hex] [bit index]\n\tClears bit in address.\n\tUse --validate to force validation." + actions: + PUT: + function: clearBit + +initialchecks: + help: "[0, 1]\n\t[Mythen3][Gotthard2] Enable or disable intial compatibility and other checks at detector start up. It is enabled by default. Must come before 'hostname' command to take effect. Can be used to reprogram fpga when current firmware is incompatible.\n\tAdvanced User function!" + actions: + GET: + argc: 0 + check_det_id: true + function: getInitialChecks + output: [ t ] + PUT: + argc: 1 + check_det_id: true + function: setInitialChecks + input: [ 'args[0]' ] + input_types: [ bool ] + cast_input: [ true ] + output: [ args.front() ] + +user: + help: "\n\tUser details from shared memory (hostname, type, PID, User, Date)." + actions: + GET: + argc: 0 + check_det_id: true + function: getUserDetails + output: [ t ] + + + + + + diff --git a/slsDetectorSoftware/generator/commands_parser/__init__.py b/slsDetectorSoftware/generator/commands_parser/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/slsDetectorSoftware/generator/commands_parser/commands_parser.py b/slsDetectorSoftware/generator/commands_parser/commands_parser.py new file mode 100644 index 000000000..9a11cd789 --- /dev/null +++ b/slsDetectorSoftware/generator/commands_parser/commands_parser.py @@ -0,0 +1,379 @@ +import copy +import logging +import yaml +from pathlib import Path + + +class CommandParser: + def __init__( + self, + commands_file: Path = Path(__file__).parent.parent / 'commands.yaml', + output_file: Path = Path(__file__).parent.parent / 'extended_commands.yaml' + ): + + self.output_file = output_file + self.commands_file = commands_file + self.fp = self.commands_file.open('r') + self.simple_commands = yaml.unsafe_load(self.fp) + self.extended_commands = {} + self.argc_set = set() + self.logger = logging.getLogger('command_parser') + self.__current_action: str = '' + FORMAT = '[%(levelname)s] %(message)s' + logging.basicConfig(format=FORMAT, level=logging.INFO) + + self.propagate_config = { + 'require_det_id': False, + 'convert_det_id': True, + 'input': [], + 'input_types': [], + 'function': '', + 'output': [], + 'cast_input': [], + 'check_det_id': False, + 'arg_types': [], + # 'store_result_in_t': False, # always true in GET action + } + self.default_config = { + 'infer_action': True, + 'help': '', + 'actions': {} + } + + def _verify_argument(self, arg, infer_action, command_name, action): + if arg['function'] == '' and 'ctb_output_list' not in arg: + special_exception_message_list = ["Cannot put", "Cannot get"] + if 'exceptions' in arg and arg['exceptions'][0]['condition'] == 'true' and any(ele in arg['exceptions'][0]['message'] for ele in special_exception_message_list): + self.logger.warning(f"{command_name} has a special exception message for {action}.") + else: + self.logger.warning(f"{command_name} [{action}] does not have a function") + if len(arg['input_types']) != len(arg['input']): + raise ValueError(f'Argument {arg} does not have the correct number of inputs') + if 'separate_time_units' in arg: + + if arg['separate_time_units']['input'] == "": + raise ValueError(f'Argument {arg} does not have the correct number of inputs for separate_time_units') + if len(arg['separate_time_units']['output']) != 2: + raise ValueError(f'Argument {arg} does not have the correct number of outputs for separate_time_units') + if 'convert_to_time' in arg: + if len(arg['convert_to_time']['input']) != 2: + raise ValueError(f'Argument {arg} does not have the correct number of inputs for convert_to_time') + if len(arg['convert_to_time']['output']) == "": + raise ValueError(f'Argument {arg} does not have the correct number of outputs for convert_to_time') + # if infer_action: + # if arg['argc'] in self.argc_set: + # raise ValueError(f'Argument {arg} has a duplicate argc') + # self.argc_set.add(arg['argc']) + + def verify_format(self): + # todo verify detectors + # todo verify circular inheritance + # todo verify child commands (those that inherit) + # todo verify that there is no wrongly typed parameters + # todo verify that the same number of input_types and input are given + # todo verify that each argument has argc (error can happen when inheriting) + for command_name, command in self.simple_commands.items(): + if 'inherit_actions' in command or 'template' in command and command[ + 'template'] or 'is_description' in command and command['is_description']: + continue + self.argc_set = set() + if 'infer_action' not in command: + command['infer_action'] = True + if 'actions' not in command: + raise ValueError(f'Command {command_name} does not have any actions') + for action, action_params in command['actions'].items(): + if 'argc' in action_params: + if 'args' in action_params: + raise ValueError(f'Action {action} has both argc and args') + arg = {**self.propagate_config, **action_params} + self._verify_argument(arg, command['infer_action'], command_name, action) + elif 'args' in action_params: + if type(action_params['args']) is not list: + raise ValueError(f'Action {action} args is not a list') + if len(action_params['args']) == 0: + raise ValueError(f'Action {action} args is empty') + action_args = {**self.propagate_config, **action_params} + del action_args['args'] + for arg in action_params['args']: + arg = {**action_args, **arg} + self._verify_argument(arg, command['infer_action'], command_name, action) + self.logger.info('Commands file is valid ✅️') + return True + + def _parse_inherited_command(self, parent, command, simple_parent): + """ + parse a command that inherits from parent command + :param parent: parsed parent command + :param command: the current command + :param simple_parent: unparsed parent command + :return: parsed command + """ + # deepcopy parent and command to avoid modifying the originals + command = copy.deepcopy(command) + config = copy.deepcopy(parent) + # add help + if 'help' in command: + config['help'] = command['help'] + if 'actions' not in command: + return config + for action, command_params in command['actions'].items(): + self.__current_action = action + if action not in config['actions']: + # todo: handle this case + pass + parent_params = config['actions'][action] + if 'args' in command_params: + # child has args => inherit action level params from parent + override with child args + use child's + # action level params + context = {**self.propagate_config, **simple_parent['actions'][action], **command_params} + config['actions'][action]['args'] = self.parse_action(context, command_params['args']) + elif 'argc' in command_params: + # child has action level args (argc) + context = {**self.propagate_config, **simple_parent['actions'][action], **command_params} + config['actions'][action]['args'] = self.parse_action(context, []) + else: + # child does not have args => use parent's action level params + override with child's action level + if 'args' in parent_params: + config['actions'][action]['args'] = self.parse_action({}, parent_params['args'], command_params) + + if 'detectors' in command_params: + if command_params['detectors'] is None: + # if child has an empty detector section, then delete the parent's detector section + del config['actions'][action]['detectors'] + continue + + for detector_name, detector_params in command_params['detectors'].items(): + if 'detectors' not in config['actions'][action]: + config['actions'][action]['detectors'] = {} + config_detector = config['actions'][action]['detectors'] + if 'detectors' not in parent_params or detector_name not in parent_params['detectors']: + if 'args' in detector_params: + # if child has detector args and parent does not have detectors + # => use child's detector args + context = {**self.propagate_config, **simple_parent['actions'][action], **detector_params} + config_detector[detector_name] = self.parse_action(context, detector_params['args']) + elif 'args' in parent_params: + # if child does not have detector args and parent does not have detectors + # => use the child's action args + context = {**self.propagate_config, **simple_parent['actions'][action]} + config_detector[detector_name] = self.parse_action(context, + config['actions'][action]['args'], + detector_params) + elif detector_name in parent_params['detectors']: + + if 'args' in detector_params: + # child and parent have the same detector and child has detector args + # => use child's detector args + context = { + **self.propagate_config, + **simple_parent['actions'][action], + **simple_parent['actions'][action]['detectors'][detector_name], + + } + config_detector[detector_name] = self.parse_action(context, detector_params['args']) + else: + # child and parent have the same detector and child does not have detector args + # => use parent's detector args + priority_context = {**command_params, **detector_params} + config_detector[detector_name] = self.parse_action( + {}, + parent_params['detectors'][detector_name], + priority_context + ) + + else: + pass + + return config + + def _parse_command(self, command): + """ + logic function for parse_command. + This function is recursive + :return: parsed command + """ + config = self.default_config.copy() + config.update(command) + config['actions'] = {} + + # check if command inherits from another command + if 'inherit_actions' in command: + if command['inherit_actions'] in self.extended_commands: + # if parent command has already been parsed, use that + parent = self.extended_commands[command['inherit_actions']] + else: + # if parent command has not been parsed, parse it + parent = self.parse_command(command['inherit_actions']) + # parse the current command and merge it with the parent command + config = self._parse_inherited_command(parent, command, self.simple_commands[command['inherit_actions']]) + return config + + if 'actions' not in command: + return config + + for action, action_params in command['actions'].items(): + self.__current_action = action + + config['actions'][action] = {} + config_action = config['actions'][action] + # the context in the current command and the current action + action_context = {**self.propagate_config, **action_params} + if 'args' not in action_params: + # parse the action with the action context + if action_params.keys() != {'detectors'}: + config_action['args'] = self.parse_action(action_context, []) + else: + config_action['args'] = self.parse_action(action_context, action_params['args']) + + # check if the action has detectors + if 'detectors' in action_params: + config_action['detectors'] = {} + for detector_name, detector_params in action_params['detectors'].items(): + # get the context for the detector and merge it with the action context + detector_context = {**action_context, **detector_params} + + # if the detector does not have args, then use the action args + # otherwise, use the detector args and override the action args + tmp_args = [] + if 'args' not in detector_params: + if 'args' in config_action: + tmp_args = config_action['args'] + else: + tmp_args = detector_params['args'] + detector_params['args'] = tmp_args + + # parse the action with the detector context + config_action['detectors'][detector_name] = self.parse_action(detector_context, + tmp_args, + detector_params) + return config + + def sanitize_argument(func): + def f(self, action_context, args_old, priority_context={}): + args = func(self, action_context, args_old, priority_context) + for i, arg in enumerate(args): + if 'args' in arg: + del arg['args'] + if 'detectors' in arg: + del arg['detectors'] + if not arg['cast_input']: + # if the cast_input is empty, then set it to False + arg['cast_input'] = [False] * len(arg['input']) + + elif len(arg['cast_input']) != len(arg['input']): + # if the cast_input is not the same length as the input, then set it to False + arg['cast_input'] = [False] * len(arg['input']) + self.logger.warning(f'cast_input for {arg["function"]} ' + f'with argc: {arg["argc"]} has different length than input') + if 'store_result_in_t' not in arg: + if self.__current_action == 'GET': + arg['store_result_in_t'] = True + else: + arg['store_result_in_t'] = False + return args + + return f + + @sanitize_argument + def parse_action(self, action_context, args, priority_context={}): + """ + parse an action + :param action_context: context of the action + :param args: arguments to be used in the action + :param priority_context: context that should override the arguments params + :return: parsed action + """ + + def add_cast_input(argument): + return argument + + # deepcopy action_context to avoid modifying the original + action_context = {**self.propagate_config, **copy.deepcopy(action_context)} + priority_context = copy.deepcopy(priority_context) + + if 'detectors' in action_context: + del action_context['detectors'] + if 'detectors' in priority_context: + del priority_context['detectors'] + + if args == []: + # if there are no arguments, then the action has only one argument + context = {**action_context, **priority_context} + return [add_cast_input(context)] + + ret_args = [] + if 'args' in action_context: + del action_context['args'] + if 'args' in priority_context: + del priority_context['args'] + + # if there are arguments, then merge them with the action context and priority context + for arg in args: + arg = {**action_context, **arg, **priority_context} + ret_args.append(add_cast_input(arg)) + return ret_args + + def parse_command(self, command_name): + """ + parse a single command + This function is recursive + + :param command_name: name of the command to parse + :return: the parsed command + """ + command = self.simple_commands[command_name] + parsed_command = self._parse_command(command) + if 'function_alias' not in command: + if 'command_name' in command: + parsed_command['function_alias'] = command['command_name'] + else: + parsed_command['function_alias'] = command_name + + if 'command_name' not in command: + parsed_command['command_name'] = command_name + + if 'template' in command and command['template']: + return parsed_command + self.extended_commands[command_name] = parsed_command + return self.extended_commands[command_name] + + def parse_all_commands(self): + """ + iterate over all commands in yaml file and parse them + :return: None + """ + + for command_name in self.simple_commands: + # todo remove this (added for debugging) + if command_name != 'xtiming': + self.parse_command(command_name) + + # post-process the parsed commands + self.post_process_all_commands() + + yaml.Dumper.ignore_aliases = lambda *args: True + self.logger.info(f'parsed {len(self.extended_commands)} commands') + yaml.dump(self.extended_commands, self.output_file.open('w'), default_flow_style=False) + + def post_process_all_commands(self): + for command_name, command in self.extended_commands.items(): + if 'is_description' in command and command['is_description']: + continue + for action_name, action, in command['actions'].items(): + for arg in action['args']: + if arg['argc'] == 0: + arg['arg_types'] = [] + continue + if arg['argc'] == -1: + pass + if arg['arg_types'] == []: + arg['arg_types'] = arg['input_types'] + + +# command_parser = CommandParser(Path( +# '/afs/psi.ch/user/b/braham_b/github/slsDetectorPackage/slsDetectorSoftware/generator/tests/command_parser/data/detectors.yaml')) +command_parser = CommandParser() + +if __name__ == '__main__': + command_parser.verify_format() + command_parser.parse_all_commands() diff --git a/slsDetectorSoftware/generator/cpp_codegen/__init__.py b/slsDetectorSoftware/generator/cpp_codegen/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/slsDetectorSoftware/generator/cpp_codegen/codegen.py b/slsDetectorSoftware/generator/cpp_codegen/codegen.py new file mode 100644 index 000000000..ffb2c52e8 --- /dev/null +++ b/slsDetectorSoftware/generator/cpp_codegen/codegen.py @@ -0,0 +1,282 @@ +class CodeGenerator: + def __init__(self): + self.file = None + self.actions_dict = { + 'GET': 'slsDetectorDefs::GET_ACTION', + 'PUT': 'slsDetectorDefs::PUT_ACTION', + 'READOUT': 'slsDetectorDefs::READOUT_ACTION', + 'HELP': 'slsDetectorDefs::HELP_ACTION', + } + self.template_file = None + + def open(self, path): + self.file = path.open('w') + + def close(self): + self.file.close() + self.file = None + + def write_line(self, line): + self.file.write(line + '\n') + + def write(self, text): + self.file.write(text) + + def write_opening(self, path): + """Write the opening file for the caller.cpp file""" + self.template_file = path.open('r') + for line in self.template_file: + if "THIS COMMENT TO BE REPLACED BY THE ACTUAL CODE" in line: + return + self.file.write(line) + + def write_closing(self): + """Write the closing file for the caller.cpp file""" + for line in self.template_file.readlines(): + self.file.write(line) + self.template_file.close() + + def write_header(self, in_path, out_path, commands, deprecated_commands): + """Write the header file for the caller.h file""" + with out_path.open('w') as fp: + with in_path.open('r') as fp2: + for line in fp2: + if "THIS COMMENT TO BE REPLACED BY THE ACTUAL CODE (1)" in line: + for command_name, command in commands.items(): + if 'duplicate_function' in command and command['duplicate_function']: + continue + fp.write(f'std::string {command["function_alias"]}(int action);\n') + continue + if "THIS COMMENT TO BE REPLACED BY THE ACTUAL CODE (2)" in line: + map_string = '' + for command_name, command in commands.items(): + map_string += f'{{"{command_name}", &Caller::{command["function_alias"]}}},' + fp.write(map_string[:-1] + '\n') + continue + + if "THIS COMMENT TO BE REPLACED BY THE ACTUAL CODE (3)" in line: + for key, value in deprecated_commands.items(): + fp.write(f'{{"{key}", "{value}"}},\n') + continue + + fp.write(line) + + def write_infer_header(self, in_path, out_path, commands): + """Write the header file for the inferAction.h file""" + with out_path.open('w+') as fp: + with in_path.open('r') as fp2: + for line in fp2: + if "THIS COMMENT TO BE REPLACED BY THE ACTUAL CODE (1) - DO NOT REMOVE" in line: + for command_name, command in commands.items(): + if 'duplicate_function' in command and command['duplicate_function']: + continue + + fp.write(f'int {command["function_alias"]}();\n') + continue + if "THIS COMMENT TO BE REPLACED BY THE ACTUAL CODE (2) - DO NOT REMOVE" in line: + map_string = '' + for command_name, command in commands.items(): + map_string += f'{{"{command_name}", &InferAction::{command["function_alias"]}}},' + fp.write(map_string[:-1] + '\n') + continue + fp.write(line) + + def write_infer_cpp(self, in_path, out_path, commands, non_dist, type_dist): + """Write the source file for the inferAction.cpp file""" + with in_path.open('r') as fp2: + for line in fp2: + if "THIS COMMENT TO BE REPLACED BY THE ACTUAL CODE (1) - DO NOT REMOVE" in line: + for command_name, command in commands.items(): + if 'duplicate_function' in command and command['duplicate_function']: + continue + + with function('int', f"InferAction::{command['function_alias']}", []) as f: + if (command_name, -1) in non_dist| type_dist: + self.write_line( + f'throw RuntimeError("sls_detector is disabled for command: {command_name}. Use sls_detector_get or sls_detector_put");') + elif not command['infer_action']: + self.write_line('throw RuntimeError("infer_action is disabled");') + else: + checked_argcs = set() + for action, action_params in command['actions'].items(): + for arg in action_params['args']: + if arg['argc'] in checked_argcs: + continue + checked_argcs.add(arg['argc']) + with if_block(f'args.size() == {arg["argc"]}'): + # check if this argc is not distinguishable + if (command_name, arg["argc"]) in non_dist | type_dist: + self.write_line( + f'throw RuntimeError("sls_detector is disabled for command: {command_name} with number of arguments {arg["argc"]}. Use sls_detector_get or sls_detector_put");') + else: + self.write_line(f'return {self.actions_dict[action]};') + with else_block(): + self.write_line( + 'throw RuntimeError("Could not infer action: Wrong number of arguments");') + continue + self.write_line(line) + + def write_check_arg(self): + pass + + def write_arg(self, args, action, command_name): + for arg in args: + if arg['argc'] != -1: + if_block(f'args.size() == {arg["argc"]}',).__enter__() + if 'pattern_command' in arg and arg['pattern_command']: + self.write_line(f'int level = -1, iArg = 0, ' + f'nGetArgs = {arg["pattern_command"]["nGetArgs"]},' + f' nPutArgs = {arg["pattern_command"]["nPutArgs"]};\nGetLevelAndUpdateArgIndex(action, ' + f'"{arg["pattern_command"]["command_name"]}", level, iArg, nGetArgs,nPutArgs);' + ) + + if 'extra_variables' in arg: + for var in arg['extra_variables']: + codegen.write_line(f'{var["type"]} {var["name"]} = {var["value"]};') + if 'separate_time_units' in arg and arg['separate_time_units']: + self.write_line(f'std::string tmp_time({arg["separate_time_units"]["input"]});') + self.write_line(f'std::string {arg["separate_time_units"]["output"][1]}' + f' = RemoveUnit(tmp_time);') + self.write_line(f'auto {arg["separate_time_units"]["output"][0]} = ' + f'StringTo < time::ns > (tmp_time,' + f' {arg["separate_time_units"]["output"][1]});') + if 'convert_to_time' in arg and arg['convert_to_time']: + self.write_line(f'auto {arg["convert_to_time"]["output"]} = ' + f'StringTo < time::ns > ({", ".join(arg["convert_to_time"]["input"])});') + input_arguments = [] + if 'exceptions' in arg: + for exception in arg['exceptions']: + self.write_line(f'if ({exception["condition"]}) {{ throw RuntimeError({exception["message"]}); }}') + if 'check_det_id' in arg and arg['check_det_id']: + self.write_line( + f'if (det_id != -1) {{ throw RuntimeError("Cannot execute {command_name} at module level"); }} ' + ) + # only used for 3 commands :( + if 'ctb_output_list' in arg: + self.write_line(f""" + std::string suffix = " {arg['ctb_output_list']['suffix']}"; + auto t = det->{arg['ctb_output_list']['GETFCNLIST']}();""") + if arg['ctb_output_list']['GETFCNNAME'] != '': + self.write_line(f""" + auto names = det->{arg['ctb_output_list']['GETFCNNAME']}(); + auto name_it = names.begin();""") + self.write_line("os << '[';") + with if_block(f't.size() > 0'): + self.write_line(f""" + auto it = t.cbegin(); + os << ToString({arg['ctb_output_list']['printable_name']}) << ' '; + os << OutString(det->{arg['ctb_output_list']['GETFCN']}(*it++, std::vector{{det_id}}))<< suffix; + while (it != t.cend()) {{ + os << ", " << ToString({arg['ctb_output_list']['printable_name']}) << ' '; + os << OutString(det->{arg['ctb_output_list']['GETFCN']}(*it++, std::vector{{det_id}}))<< suffix; + }} + """) + self.write_line('os << "]\\n";') + if arg['argc'] != -1: + if_block().__exit__() + + return + + for i in range(len(arg['input'])): + if arg['cast_input'][i]: + self.write_line( + f'auto arg{i} = StringTo<{arg["input_types"][i]}>({arg["input"][i]});') + input_arguments.append(f'arg{i}') + else: + input_arguments.append(arg["input"][i]) + if 'require_det_id' in arg and arg['require_det_id']: + if 'convert_det_id' in arg and arg['convert_det_id']: + input_arguments.append("std::vector{ det_id }") + else: + input_arguments.append("det_id") + + input_arguments = ", ".join(input_arguments) + # call function + if arg["function"]: + if arg['store_result_in_t']: + self.write_line(f'auto t = det->{arg["function"]}({input_arguments});') + else: + self.write_line(f'det->{arg["function"]}({input_arguments});') + else: + pass #We have no function so skip block + + output_args = [] + for output in arg['output']: + output_args.append(output) + if len(output_args) > 0: + self.write_line(f"os << {'<< '.join(output_args)} << '\\n';") + + if arg['argc'] != -1: + if_block().__exit__() + + +class if_block: + def __init__(self, condition="", elseif=False): + self.condition = condition + self.elseif = elseif + self.block = False + + def __enter__(self): + if self.elseif: + codegen.write_line('else if (' + self.condition + ') {') + else: + codegen.write_line('if (' + self.condition + ') {') + if self.block: + codegen.write_line('{\n') + + def __exit__(self, *args): + codegen.write_line('}') + if self.block: + codegen.write_line('}') + codegen.write_line('') + + +class else_block: + def __init__(self): + pass + + def __enter__(self): + codegen.write_line('else {') + codegen.write_line('') + + def __exit__(self, *args): + codegen.write_line('}') + codegen.write_line('') + + +class for_block: + def __init__(self, condition): + self.condition = condition + + def __enter__(self): + codegen.write_line('for (' + self.condition + ') {') + codegen.write_line('') + + def __exit__(self, *args): + codegen.write_line('}') + codegen.write_line('') + + +class function: + def __init__(self, return_type, name, args: list[tuple[str, str]]): + self.name = name + self.args = args + self.return_type = return_type + + def __enter__(self): + s = "" + for arg in self.args: + arg_type, arg_name = arg + s += arg_type + ' ' + arg_name + ', ' + s = s[:-2] + codegen.write_line(self.return_type + ' ' + self.name + + f'({s}) {{') + codegen.write_line('') + return self + + def __exit__(self, *args): + codegen.write_line('}') + codegen.write_line('') + + +codegen = CodeGenerator() diff --git a/slsDetectorSoftware/generator/deprecated_commands.yaml b/slsDetectorSoftware/generator/deprecated_commands.yaml new file mode 100644 index 000000000..22788505d --- /dev/null +++ b/slsDetectorSoftware/generator/deprecated_commands.yaml @@ -0,0 +1,176 @@ +#configuration +detectorversion: firmwareversion +softwareversion: detectorserverversion +receiverversion: rx_version +detectornumber: serialnumber +thisversion: clientversion +detsizechan: detsize +trimdir: settingspath +settingsdir: settingspath +flippeddatax: fliprows + +#acquisition parameters +cycles: triggers +cyclesl: triggersl +clkdivider: readoutspeed +speed: readoutspeed +vhighvoltage: highvoltage +digitest: imagetest +filter: filterresistor +readnlines: readnrows + +# temperature + +# super old dacs +vtr: vtrim +vrf: vrpreamp +vrs: vrshaper +vcall: vcal +vis: vishaper +vshaper: vrshaper +vpreamp: vrpreamp +vshaperneg: vrshaper_n +viinsh: vishaper +vpl: vcal_n +vph: vcal_p + +# dacs +vthreshold: dac +vsvp: dac +vsvn: dac +vtrim: dac +vrpreamp: dac +vrshaper: dac +vtgstv: dac +vcmp_ll: dac +vcmp_lr: dac +vcal: dac +vcmp_rl: dac +vcmp_rr: dac +rxb_rb: dac +rxb_lb: dac +vcp: dac +vcn: dac +vishaper: dac +iodelay: dac +vref_ds: dac +vcascn_pb: dac +vcascp_pb: dac +vout_cm: dac +vcasc_out: dac +vin_cm: dac +vref_comp: dac +ib_test_c: dac +vrshaper_n: dac +vipre: dac +vdcsh: dac +vth1: dac +vth2: dac +vth3: dac +vcal_n: dac +vcal_p: dac +vcassh: dac +vcas: dac +vicin: dac +vipre_out: dac +vref_h_adc: dac +vb_comp_fe: dac +vb_comp_adc: dac +vcom_cds: dac +vref_rstore: dac +vb_opa_1st: dac +vref_comp_fe: dac +vcom_adc1: dac +vref_prech: dac +vref_l_adc: dac +vref_cds: dac +vb_cs: dac +vb_opa_fd: dac +vcom_adc2: dac +vb_ds: dac +vb_comp: dac +vb_pixbuf: dac +vin_com: dac +vdd_prot: dac +vbp_colbuf: dac +vb_sda: dac +vcasc_sfp: dac +vipre_cds: dac +ibias_sfp: dac + +defaultdacs: resetdacs + +#acquisition +busy: clearbusy +receiver: rx_status +framescaught: rx_framescaught +startingfnum: nextframenumber + +#Network Configuration (Detector<->Receiver) +detectorip: udp_srcip +detectorip2: udp_srcip2 +detectormac: udp_srcmac +detectormac2: udp_srcmac2 +rx_udpip: udp_dstip +rx_udpip2: udp_dstip2 +rx_udpmac: udp_dstmac +rx_udpmac2: udp_dstmac2 +rx_udpport: udp_dstport +rx_udpport2: udp_dstport2 +flowcontrol_10g: flowcontrol10g +txndelay_frame: txdelay_frame +txndelay_left: txdelay_left +txndelay_right: txdelay_right + +#Receiver Config +r_silent: rx_silent +r_discardpolicy: rx_discardpolicy +r_padding: rx_padding +r_lock: rx_lock +r_lastclient: rx_lastclient + +#File +fileformat: fformat +outdir: fpath +index: findex +enablefwrite: fwrite +masterfile: fmaster +overwrite: foverwrite +r_framesperfile: rx_framesperfile + +#ZMQ Streaming Parameters (Receiver<->Client) +r_readfreq: rx_zmqfreq +rx_readfreq: rx_zmqfreq +rx_datastream: rx_zmqstream + +#Eiger Specific +resmat: partialreset + +#Jungfrau Specific +storagecells: extrastoragecells +auto_comp_disable: autocompdisable +comp_disable_time: compdisabletime + +#Gotthard Specific +#Gotthard2 Specific +#Mythen3 Specific +#CTB Specific +adc: slowadc +flags: romode +i_a: im_a +i_b: im_b +i_c: im_c +i_d: im_d +i_io: im_io + +#Pattern +#Moench + +#Advanced +copydetectorserver: updatedetectorserver + +#Insignificant +nframes: framecounter +now: runtime +timestamp: frametime +frameindex: rx_frameindex \ No newline at end of file diff --git a/slsDetectorSoftware/generator/extended_commands.yaml b/slsDetectorSoftware/generator/extended_commands.yaml new file mode 100644 index 000000000..6702c6a12 --- /dev/null +++ b/slsDetectorSoftware/generator/extended_commands.yaml @@ -0,0 +1,14072 @@ +acquire: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: false + command_name: acquire + function_alias: acquire + help: '' + infer_action: true + is_description: true +activate: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getActive + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - bool + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setActive + input: + - args[0] + input_types: + - bool + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: activate + function_alias: activate + help: "[0, 1]\n\t[Eiger] 1 is default. 0 deactivates readout and does not send data." + infer_action: true + template: true +adcclk: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getADCClock + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setADCClock + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: adcclk + function_alias: adcclk + help: "[n_clk in MHz]\n\t[Ctb] ADC clock frequency in MHz." + infer_action: true + template: true +adcenable: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getADCEnableMask + input: [] + input_types: [] + output: + - OutStringHex(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - uint32_t + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setADCEnableMask + input: + - args[0] + input_types: + - uint32_t + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: adcenable + function_alias: adcenable + help: "[bitmask]\n\t[Ctb] ADC Enable Mask for 1Gb Enable for each 32 ADC channel." + infer_action: true + template: true +adcenable10g: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getTenGigaADCEnableMask + input: [] + input_types: [] + output: + - OutStringHex(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - uint32_t + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setTenGigaADCEnableMask + input: + - args[0] + input_types: + - uint32_t + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: adcenable10g + function_alias: adcenable10g + help: "[bitmask]\n\t[Ctb] ADC Enable Mask for 10Gb mode for each 32 ADC channel.\ + \ However, if any of a consecutive 4 bits are enabled, the complete 4 bits are\ + \ enabled." + infer_action: true + template: true +adcindex: + actions: + GET: + args: + - arg_types: + - std::string + argc: 1 + cast_input: + - false + check_det_id: true + convert_det_id: true + exceptions: + - condition: det->getDetectorType().squash(defs::GENERIC) != defs::CHIPTESTBOARD + && det->getDetectorType().squash(defs::GENERIC) != defs::XILINX_CHIPTESTBOARD + message: cmd + " only allowed for CTB." + function: getAdcIndex + input: + - args[0] + input_types: + - std::string + output: + - static_cast(t) + require_det_id: false + store_result_in_t: true + command_name: adcindex + function_alias: adcindex + help: "[name] \n\t\t[Ctb][Xilinx_Ctb] Get the adc index for the given name." + infer_action: true + template: true +adcinvert: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getADCInvert + input: [] + input_types: [] + output: + - OutStringHex(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - uint32_t + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setADCInvert + input: + - args[0] + input_types: + - uint32_t + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: adcinvert + function_alias: adcinvert + help: "[bitmask]\n\t[Ctb][Jungfrau][Moench] ADC Inversion Mask.\n\t[Jungfrau][Moench]\ + \ Inversions on top of the default mask." + infer_action: true + template: true +adclist: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: true + convert_det_id: true + exceptions: + - condition: cmd != "daclist" && det_type != defs::CHIPTESTBOARD && det_type + != defs::XILINX_CHIPTESTBOARD + message: cmd + " only allowed for CTB." + extra_variables: + - name: det_type + type: auto + value: det->getDetectorType().squash(defs::GENERIC); + function: getAdcNames + input: [] + input_types: [] + output: + - ToString(t) + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: + - std::string + argc: -1 + cast_input: + - false + check_det_id: true + convert_det_id: true + exceptions: + - condition: cmd != "daclist" && det_type != defs::CHIPTESTBOARD && det_type + != defs::XILINX_CHIPTESTBOARD + message: cmd + " only allowed for CTB." + - condition: cmd == "daclist" && det_type != defs::CHIPTESTBOARD && det_type + != defs::XILINX_CHIPTESTBOARD + message: '"This detector already has fixed dac names. Cannot change them."' + extra_variables: + - name: det_type + type: auto + value: det->getDetectorType().squash(defs::GENERIC); + function: setAdcNames + input: + - args + input_types: + - std::string + output: + - ToString(args) + require_det_id: false + store_result_in_t: false + command_name: adclist + function_alias: adclist + help: "[adcname1 adcname2 .. adcname32] \n\t\t[Ctb][Xilinx_Ctb] Set the list of\ + \ adc names for this board." + infer_action: true + template: true +adcname: + actions: + GET: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: true + convert_det_id: true + exceptions: + - condition: det->getDetectorType().squash(defs::GENERIC) != defs::CHIPTESTBOARD + && det->getDetectorType().squash(defs::GENERIC) != defs::XILINX_CHIPTESTBOARD + message: cmd + " only allowed for CTB." + function: getAdcName + input: + - args[0] + input_types: + - int + output: + - args[0] + - ''' ''' + - t + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - std::string + argc: 2 + cast_input: + - true + - false + check_det_id: true + convert_det_id: true + exceptions: + - condition: det->getDetectorType().squash(defs::GENERIC) != defs::CHIPTESTBOARD + && det->getDetectorType().squash(defs::GENERIC) != defs::XILINX_CHIPTESTBOARD + message: cmd + " only allowed for CTB." + function: setAdcName + input: + - args[0] + - args[1] + input_types: + - int + - std::string + output: + - ToString(args) + require_det_id: false + store_result_in_t: false + command_name: adcname + function_alias: adcname + help: "[0-31][name] \n\t\t[Ctb][Xilinx_Ctb] Set the adc at the given position to\ + \ the given name." + infer_action: true + template: true +adcphase: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + exceptions: + - condition: det_type == defs::EIGER || det_type == defs::MYTHEN3 || det_type + == defs::GOTTHARD2 + message: '"adcphase not implemented for this detector"' + extra_variables: + - name: det_type + type: auto + value: det->getDetectorType().squash(defs::GENERIC); + function: getADCPhase + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + - arg_types: + - special::deg + argc: 1 + cast_input: [] + check_det_id: false + convert_det_id: true + exceptions: + - condition: det_type == defs::EIGER || det_type == defs::MYTHEN3 || det_type + == defs::GOTTHARD2 + message: '"adcphase not implemented for this detector"' + - condition: args[0] != "deg" + message: '"Unknown adcphase argument " + args[0] + ". Did you mean deg? "' + extra_variables: + - name: det_type + type: auto + value: det->getDetectorType().squash(defs::GENERIC); + function: getADCPhaseInDegrees + input: [] + input_types: [] + output: + - OutString(t) + - '" deg"' + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + exceptions: + - condition: det_type == defs::EIGER || det_type == defs::MYTHEN3 || det_type + == defs::GOTTHARD2 + message: '"adcphase not implemented for this detector"' + extra_variables: + - name: det_type + type: auto + value: det->getDetectorType().squash(defs::GENERIC); + function: setADCPhase + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + - arg_types: + - int + - special::deg + argc: 2 + cast_input: + - true + check_det_id: false + convert_det_id: true + exceptions: + - condition: det_type == defs::EIGER || det_type == defs::MYTHEN3 || det_type + == defs::GOTTHARD2 + message: '"adcphase not implemented for this detector"' + - condition: args[1] != "deg" + message: '"Unknown adcphase 2nd argument " + args[1] + ". Did you mean deg?"' + extra_variables: + - name: det_type + type: auto + value: det->getDetectorType().squash(defs::GENERIC); + function: setADCPhaseInDegrees + input: + - args[0] + input_types: + - int + output: + - args[0] + - ''' ''' + - args[1] + require_det_id: true + store_result_in_t: false + command_name: adcphase + function_alias: adcphase + 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" + infer_action: true +adcpipeline: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getADCPipeline + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setADCPipeline + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: adcpipeline + function_alias: adcpipeline + help: "[n_value]\n\t[Ctb][Moench] Pipeline for ADC clock." + infer_action: true + template: true +adcreg: + actions: + PUT: + args: + - arg_types: + - uint32_t + - uint32_t + argc: 2 + cast_input: + - true + - true + check_det_id: false + convert_det_id: true + function: writeAdcRegister + input: + - args[0] + - args[1] + input_types: + - uint32_t + - uint32_t + output: + - ToString(args) + require_det_id: true + store_result_in_t: false + command_name: adcreg + function_alias: adcreg + help: "[address] [value]\n\t[Jungfrau][Moench][Ctb][Gotthard] Writes to an adc register\ + \ in hex. Advanced user Function!" + infer_action: true +adcvpp: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: getADCVpp + input: + - '"0"' + input_types: + - bool + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + - arg_type: + - special::mv + arg_types: + - bool + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + exceptions: + - condition: (args[0] != "mv") && (args[0] != "mV") + message: '"Unknown argument " + args[0] + ". Did you mean mV?"' + function: getADCVpp + input: + - '"1"' + input_types: + - bool + output: + - OutString(t) + - '" mV"' + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + - true + check_det_id: false + convert_det_id: true + function: setADCVpp + input: + - args[0] + - '"0"' + input_types: + - int + - bool + output: + - args[0] + require_det_id: true + store_result_in_t: false + - arg_types: + - int + - special::mv + argc: 2 + cast_input: + - true + - true + check_det_id: false + convert_det_id: true + exceptions: + - condition: (args[1] != "mv") && (args[1] != "mV") + message: '"Unknown argument " + args[1] + ". Did you mean mV?"' + function: setADCVpp + input: + - args[0] + - '"1"' + input_types: + - int + - bool + output: + - args[0] + - '" mV"' + require_det_id: true + store_result_in_t: false + command_name: adcvpp + function_alias: adcvpp + help: "[dac or mV value][(optional unit) mV] \n\t[Ctb] Vpp of ADC.\n\t 0 -> 1V ;\ + \ 1 -> 1.14V ; 2 -> 1.33V ; 3 -> 1.6V ; 4 -> 2V. \n\tAdvanced User function!" + infer_action: true +apulse: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getAnalogPulsing + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - bool + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setAnalogPulsing + input: + - args[0] + input_types: + - bool + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: apulse + function_alias: apulse + help: "[0, 1]\n\t[Mythen3] Enables or disables analog pulsing. Default is disabled" + infer_action: true + template: true +asamples: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getNumberOfAnalogSamples + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setNumberOfAnalogSamples + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: asamples + function_alias: asamples + help: "[n_samples]\n\t[Ctb] Number of analog samples expected." + infer_action: true + template: true +autocompdisable: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getAutoComparatorDisable + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - bool + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setAutoComparatorDisable + input: + - args[0] + input_types: + - bool + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: autocompdisable + function_alias: autocompdisable + help: "[0, 1]\n\t[Jungfrau] Auto comparator disable mode. By default, the on-chip\ + \ gain switching is active during the entire exposure.This mode disables the on\ + \ - chip gain switching comparator automatically after 93.75% (only for chipv1.0)\ + \ of exposure time (only for longer than 100us). It is possible to set the duration\ + \ for chipv1.1 using compdisabletime command.\n\tDefault is 0 or this mode disabled(comparator\ + \ enabled throughout). 1 enables mode. 0 disables mode. " + infer_action: true + template: true +badchannels: + actions: + GET: + args: + - arg_types: + - std::string + argc: 1 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: [] + argc: -1 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: false + command_name: badchannels + function_alias: badchannels + help: '' + infer_action: true + is_description: true +blockingtrigger: + actions: + PUT: + args: + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: true + convert_det_id: true + extra_variables: + - name: block + type: bool + value: 'true' + function: sendSoftwareTrigger + input: + - block + input_types: + - bool + output: + - '"successful"' + require_det_id: false + store_result_in_t: false + command_name: blockingtrigger + function_alias: blockingtrigger + help: "\n\t[Eiger][Jungfrau][Moench] Sends software trigger signal to detector and\ + \ blocks till the frames are sent out for that trigger." + infer_action: true + template: true +burstmode: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: + - defs::burstMode + argc: 1 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: false + command_name: burstmode + function_alias: burstmode + help: '' + infer_action: true + is_description: true +burstperiod: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getBurstPeriod + 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: getBurstPeriod + input: [] + input_types: [] + output: + - OutString(t , args[0]) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - std::string + argc: 1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: setBurstPeriod + input: + - converted_time + input_types: + - time::ns + output: + - args[0] + require_det_id: true + separate_time_units: + input: args[0] + output: + - converted_time + - unit + store_result_in_t: false + - arg_types: + - int + - special::time_unit + argc: 2 + cast_input: + - false + check_det_id: false + convert_det_id: true + convert_to_time: + input: + - args[0] + - args[1] + output: converted_time + function: setBurstPeriod + input: + - converted_time + input_types: + - time::ns + output: + - args[0] + - args[1] + require_det_id: true + store_result_in_t: false + command_name: burstperiod + function_alias: burstperiod + help: "[duration] [(optional unit) ns|us|ms|s]\n\t[Gotthard2] Period between 2 bursts.\ + \ Only in burst mode and auto timing mode." + infer_action: true + template: true +bursts: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getNumberOfBursts + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int64_t + argc: 1 + cast_input: + - true + check_det_id: true + convert_det_id: true + function: setNumberOfBursts + input: + - args[0] + input_types: + - int64_t + output: + - args.front() + require_det_id: false + store_result_in_t: false + command_name: bursts + function_alias: bursts + help: "[n_bursts]\n\t[Gotthard2] Number of bursts per aquire. Only in auto timing\ + \ mode and burst mode. Use timing command to set timing mode and burstmode command\ + \ to set burst mode." + infer_action: true + template: true +burstsl: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getNumberOfBurstsLeft + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: burstsl + function_alias: burstsl + help: "\n\t[Gotthard2] Number of bursts left in acquisition. Only in burst auto\ + \ mode." + infer_action: true + template: true +bustest: + actions: + PUT: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: executeBusTest + input: [] + input_types: [] + output: + - '"successful"' + require_det_id: true + store_result_in_t: false + command_name: bustest + function_alias: bustest + 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\t\ + Advanced User function!" + infer_action: true + template: true +cdsgain: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getCDSGain + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - bool + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setCDSGain + input: + - args[0] + input_types: + - bool + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: cdsgain + function_alias: cdsgain + help: "[0, 1]\n\t[Gotthard2] Enable or disable CDS gain. Default is disabled." + infer_action: true + template: true +chipversion: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getChipVersion + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: chipversion + function_alias: chipversion + help: "\n\t[Jungfrau] Returns chip version. Can be 1.0 or 1.1" + infer_action: true + template: true +clearbit: + actions: + PUT: + args: + - arg_types: + - uint32_t + - int + argc: 2 + cast_input: + - true + - true + - true + check_det_id: false + convert_det_id: true + exceptions: + - condition: StringTo(args[1]) < 0 || StringTo(args[1]) > 31 + message: '"Bit number out of range: " + args[1]' + function: clearBit + input: + - args[0] + - args[1] + - '"0"' + input_types: + - uint32_t + - int + - bool + output: + - '"["' + - args[0] + - '", "' + - args[1] + - '"]"' + require_det_id: true + store_result_in_t: false + - arg_types: + - uint32_t + - int + - special::validate + argc: 3 + cast_input: + - true + - true + - true + check_det_id: false + convert_det_id: true + exceptions: + - condition: StringTo(args[1]) < 0 || StringTo(args[1]) > 31 + message: '"Bit number out of range: " + args[1]' + - condition: args[2] != "--validate" + message: '"Could not scan third argument. Did you mean --validate?"' + function: clearBit + input: + - args[0] + - args[1] + - '"1"' + input_types: + - uint32_t + - int + - bool + output: + - '"["' + - args[0] + - '", "' + - args[1] + - '"]"' + require_det_id: true + store_result_in_t: false + command_name: clearbit + function_alias: clearbit + help: "[reg address in hex] [bit index]\n\tClears bit in address.\n\tUse --validate\ + \ to force validation." + infer_action: true + template: true +clearbusy: + actions: + PUT: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: true + convert_det_id: true + function: clearAcquiringFlag + input: [] + input_types: [] + output: + - '"successful"' + require_det_id: false + store_result_in_t: false + command_name: clearbusy + function_alias: clearbusy + help: "\n\tIf acquisition aborted during acquire command, use this to clear acquiring\ + \ flag in shared memory before starting next acquisition" + infer_action: 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: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getClientVersion + input: [] + input_types: [] + output: + - t + require_det_id: false + store_result_in_t: true + command_name: clientversion + function_alias: clientversion + help: "\n\tClient software version" + infer_action: true +clkdiv: + actions: + GET: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + exceptions: + - condition: type != defs::GOTTHARD2 && type != defs::MYTHEN3 + message: '"clkdiv not implemented for this detector."' + extra_variables: + - name: type + type: defs::detectorType + value: det->getDetectorType().squash(defs::GENERIC); + function: getClockDivider + input: + - args[0] + input_types: + - int + output: + - args[0] + - ''' ''' + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - int + argc: 2 + cast_input: + - true + - true + check_det_id: false + convert_det_id: true + exceptions: + - condition: type != defs::GOTTHARD2 && type != defs::MYTHEN3 + message: '"clkdiv not implemented for this detector."' + extra_variables: + - name: type + type: defs::detectorType + value: det->getDetectorType().squash(defs::GENERIC); + function: setClockDivider + input: + - args[0] + - args[1] + input_types: + - int + - int + output: + - args[0] + - ''' ''' + - args[1] + require_det_id: true + store_result_in_t: false + command_name: clkdiv + function_alias: clkdiv + help: "[n_clock] [n_divider]\n\t[Gotthard2][Mythen3] Clock Divider of clock n_clock.\ + \ Must be greater than 1.\n\t[Gotthard2] Clock index range: 0-5\n\t[Mythen3] Clock\ + \ index range: 0" + infer_action: true +clkfreq: + actions: + GET: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + exceptions: + - condition: type != defs::GOTTHARD2 && type != defs::MYTHEN3 + message: '"clkfreq not implemented for this detector."' + extra_variables: + - name: type + type: defs::detectorType + value: det->getDetectorType().squash(defs::GENERIC); + function: getClockFrequency + input: + - args[0] + input_types: + - int + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: clkfreq + function_alias: clkfreq + help: "[n_clock] [freq_in_Hz]\n\t[Gotthard2][Mythen3] Frequency of clock n_clock\ + \ in Hz. Use clkdiv to set frequency.\n\t[Gotthard2] Clock index range: 0-5\n\t\ + [Mythen3] Clock index range: 0" + infer_action: true +clkphase: + actions: + GET: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + exceptions: + - condition: type != defs::GOTTHARD2 && type != defs::MYTHEN3 + message: '"clkphase not implemented for this detector."' + extra_variables: + - name: type + type: defs::detectorType + value: det->getDetectorType().squash(defs::GENERIC); + function: getClockPhase + input: + - args[0] + input_types: + - int + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + - arg_types: + - int + - special::deg + argc: 2 + cast_input: + - true + check_det_id: false + convert_det_id: true + exceptions: + - condition: type != defs::GOTTHARD2 && type != defs::MYTHEN3 + message: '"clkphase not implemented for this detector."' + - condition: args[1] != "deg" + message: '"Cannot scan argument" + args[1] + ". Did you mean deg?"' + extra_variables: + - name: type + type: defs::detectorType + value: det->getDetectorType().squash(defs::GENERIC); + function: getClockPhaseinDegrees + input: + - args[0] + input_types: + - int + output: + - OutString(t) + - '" deg"' + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - int + argc: 2 + cast_input: + - true + - true + check_det_id: false + convert_det_id: true + exceptions: + - condition: type != defs::GOTTHARD2 && type != defs::MYTHEN3 + message: '"clkphase not implemented for this detector."' + extra_variables: + - name: type + type: defs::detectorType + value: det->getDetectorType().squash(defs::GENERIC); + function: setClockPhase + input: + - args[0] + - args[1] + input_types: + - int + - int + output: + - args[1] + require_det_id: true + store_result_in_t: false + - arg_types: + - int + - int + - special::deg + argc: 3 + cast_input: + - true + - true + check_det_id: false + convert_det_id: true + exceptions: + - condition: type != defs::GOTTHARD2 && type != defs::MYTHEN3 + message: '"clkphase not implemented for this detector."' + - condition: args[2] != "deg" + message: '"Cannot scan argument" + args[2] + ". Did you mean deg?"' + extra_variables: + - name: type + type: defs::detectorType + value: det->getDetectorType().squash(defs::GENERIC); + function: setClockPhaseinDegrees + input: + - args[0] + - args[1] + input_types: + - int + - int + output: + - args[1] + - '" "' + - args[2] + require_det_id: true + store_result_in_t: false + command_name: clkphase + function_alias: clkphase + help: "[n_clock] [phase] [deg (optional)]\n\t[Gotthard2][Mythen3] Phase of clock\ + \ n_clock. If deg, then phase shift in degrees, else absolute phase shift values.n\t\ + [Gotthard2] Clock index range: 0-5\n\t[Mythen3] Clock index range: 0" + infer_action: true +collectionmode: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getCollectionMode + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - defs::collectionMode + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setCollectionMode + input: + - args[0] + input_types: + - defs::collectionMode + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: collectionmode + function_alias: collectionmode + help: "[hole|electron]\n\t[Jungfrau] Sets collection mode to hole or electron. Default\ + \ is hole." + infer_action: true + template: true +column: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getColumn + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setColumn + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: column + function_alias: column + help: "[value]\n\tSet Detector column (udp header) to value. \n\tGui uses it to\ + \ rearrange for complete image" + infer_action: true + template: true +compdisabletime: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getComparatorDisableTime + 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: getComparatorDisableTime + input: [] + input_types: [] + output: + - OutString(t , args[0]) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - std::string + argc: 1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: setComparatorDisableTime + input: + - converted_time + input_types: + - time::ns + output: + - args[0] + require_det_id: true + separate_time_units: + input: args[0] + output: + - converted_time + - unit + store_result_in_t: false + - arg_types: + - int + - special::time_unit + argc: 2 + cast_input: + - false + check_det_id: false + convert_det_id: true + convert_to_time: + input: + - args[0] + - args[1] + output: converted_time + function: setComparatorDisableTime + input: + - converted_time + input_types: + - time::ns + output: + - args[0] + - args[1] + require_det_id: true + store_result_in_t: false + command_name: compdisabletime + function_alias: compdisabletime + help: "[duration] [(optional unit) ns|us|ms|s]\n\t[Jungfrau] Time before end of\ + \ exposure when comparator is disabled. It is only possible for chipv1.1." + infer_action: true + template: true +confadc: + actions: + GET: + args: + - arg_types: + - int + - int + argc: 2 + cast_input: + - true + - true + check_det_id: false + convert_det_id: true + function: getADCConfiguration + input: + - args[0] + - args[1] + input_types: + - int + - int + output: + - OutStringHex(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - int + - int + argc: 3 + cast_input: + - true + - true + - true + check_det_id: false + convert_det_id: true + function: setADCConfiguration + input: + - args[0] + - args[1] + - args[2] + input_types: + - int + - int + - int + output: + - '''[''' + - args[0] + - '", "' + - args[1] + - '", "' + - ToStringHex( StringTo(args[2])) + - '"]"' + require_det_id: true + store_result_in_t: false + command_name: confadc + function_alias: confadc + help: "[chip index 0-9, -1 for all] [adc index 0-31, -1 for all] [7 bit configuration\ + \ value in hex]\n\t[Gotthard2] Sets configuration for specific chip and adc,\ + \ but configures 1 chip (all adcs for that chip) at a time." + infer_action: true +config: + actions: + PUT: + args: + - arg_types: + - special::path + argc: 1 + cast_input: + - false + check_det_id: true + convert_det_id: true + function: loadConfig + input: + - args[0] + input_types: + - std::string + output: + - args.front() + require_det_id: false + store_result_in_t: false + command_name: config + function_alias: config + help: "\n\tFrees shared memory before loading configuration file. Set up once." + infer_action: true + template: true +configtransceiver: + actions: + PUT: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: configureTransceiver + input: [] + input_types: [] + output: + - '"successful"' + require_det_id: true + store_result_in_t: false + command_name: configtransceiver + function_alias: configtransceiver + help: "\n\t[Xilinx Ctb] Waits for transceiver to be aligned. Chip had to be configured\ + \ (powered on) before this." + infer_action: true + template: true +counters: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: [] + argc: -1 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: false + command_name: counters + function_alias: counters + help: '' + infer_action: true + is_description: true +currentsource: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: + - bool + argc: 1 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: false + - arg_types: + - bool + - special::currentSourceFix + - int + argc: 3 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: false + - arg_types: + - bool + - special::currentSourceFix + - int + - special::currentSourceLow + argc: 4 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: false + command_name: currentsource + function_alias: currentsource + help: '' + infer_action: true + is_description: true +dac: + actions: + GET: + args: + - arg_types: + - defs::dacIndex + argc: 1 + cast_input: + - false + - true + check_det_id: false + convert_det_id: true + exceptions: + - condition: is_int(args[0]) && det->getDetectorType().squash() != defs::CHIPTESTBOARD + && det->getDetectorType().squash() != defs::XILINX_CHIPTESTBOARD + message: '"Dac indices can only be used for chip test board. Use daclist + to get list of dac names for current detector."' + extra_variables: + - name: dacIndex + type: defs::dacIndex + value: '((det->getDetectorType().squash() == defs::CHIPTESTBOARD || det->getDetectorType().squash() + == defs::XILINX_CHIPTESTBOARD) && !is_int(args[0])) ? det->getDacIndex(args[0]) + : StringTo(args[0])' + function: getDAC + input: + - dacIndex + - '"0"' + input_types: + - defs::dacIndex + - bool + output: + - args[0] + - ''' ''' + - OutString(t) + require_det_id: true + store_result_in_t: true + - arg_types: + - defs::dacIndex + - special::mv + argc: 2 + cast_input: + - false + - true + check_det_id: false + convert_det_id: true + exceptions: + - condition: is_int(args[0]) && det->getDetectorType().squash() != defs::CHIPTESTBOARD + && det->getDetectorType().squash() != defs::XILINX_CHIPTESTBOARD + message: '"Dac indices can only be used for chip test board. Use daclist + to get list of dac names for current detector."' + - condition: args[1] != "mv" && args[1] != "mV" + message: '"Unknown argument " + args[1] + ". Did you mean mV?"' + extra_variables: + - name: dacIndex + type: defs::dacIndex + value: '((det->getDetectorType().squash() == defs::CHIPTESTBOARD || det->getDetectorType().squash() + == defs::XILINX_CHIPTESTBOARD) && !is_int(args[0])) ? det->getDacIndex(args[0]) + : StringTo(args[0])' + function: getDAC + input: + - dacIndex + - '"1"' + input_types: + - defs::dacIndex + - bool + output: + - args[0] + - ''' ''' + - OutString(t) + - '" mV"' + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - defs::dacIndex + - int + argc: 2 + cast_input: + - false + - true + - true + check_det_id: false + convert_det_id: true + exceptions: + - condition: is_int(args[0]) && det->getDetectorType().squash() != defs::CHIPTESTBOARD + && det->getDetectorType().squash() != defs::XILINX_CHIPTESTBOARD + message: '"Dac indices can only be used for chip test board. Use daclist + to get list of dac names for current detector."' + extra_variables: + - name: dacIndex + type: defs::dacIndex + value: '((det->getDetectorType().squash() == defs::CHIPTESTBOARD || det->getDetectorType().squash() + == defs::XILINX_CHIPTESTBOARD) && !is_int(args[0])) ? det->getDacIndex(args[0]) + : StringTo(args[0])' + function: setDAC + input: + - dacIndex + - args[1] + - '"0"' + input_types: + - defs::dacIndex + - int + - bool + output: + - args[0] + - ''' ''' + - args[1] + require_det_id: true + store_result_in_t: false + - arg_types: + - defs::dacIndex + - int + - special::mv + argc: 3 + cast_input: + - false + - true + - true + check_det_id: false + convert_det_id: true + exceptions: + - condition: is_int(args[0]) && det->getDetectorType().squash() != defs::CHIPTESTBOARD + && det->getDetectorType().squash() != defs::XILINX_CHIPTESTBOARD + message: '"Dac indices can only be used for chip test board. Use daclist + to get list of dac names for current detector."' + extra_variables: + - name: dacIndex + type: defs::dacIndex + value: '((det->getDetectorType().squash() == defs::CHIPTESTBOARD || det->getDetectorType().squash() + == defs::XILINX_CHIPTESTBOARD) && !is_int(args[0])) ? det->getDacIndex(args[0]) + : StringTo(args[0])' + function: setDAC + input: + - dacIndex + - args[1] + - '"1"' + input_types: + - defs::dacIndex + - int + - bool + output: + - args[0] + - ''' ''' + - args[1] + - '" mV"' + require_det_id: true + store_result_in_t: false + command_name: dac + function_alias: dac + help: 'code: return GetHelpDacWrapper(cmd, args); + + ' + infer_action: true +dacindex: + actions: + GET: + args: + - arg_types: + - std::string + argc: 1 + cast_input: + - false + check_det_id: true + convert_det_id: true + exceptions: + - condition: det->getDetectorType().squash(defs::GENERIC) != defs::CHIPTESTBOARD + && det->getDetectorType().squash(defs::GENERIC) != defs::XILINX_CHIPTESTBOARD + message: cmd + " only allowed for CTB." + extra_variables: + - name: index + type: defs::dacIndex + value: defs::DAC_0 + function: getDacIndex + input: + - args[0] + input_types: + - std::string + output: + - ToString(static_cast(t) - index) + require_det_id: false + store_result_in_t: true + command_name: dacindex + function_alias: dacindex + help: "[name] \n\t\t[Ctb][Xilinx_Ctb] Get the dac index for the given name." + infer_action: true + template: true +daclist: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: true + convert_det_id: true + exceptions: + - condition: cmd != "daclist" && det_type != defs::CHIPTESTBOARD && det_type + != defs::XILINX_CHIPTESTBOARD + message: cmd + " only allowed for CTB." + extra_variables: + - name: det_type + type: auto + value: det->getDetectorType().squash(defs::GENERIC); + function: getDacNames + input: [] + input_types: [] + output: + - ToString(t) + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: + - std::string + argc: -1 + cast_input: + - false + check_det_id: true + convert_det_id: true + exceptions: + - condition: cmd != "daclist" && det_type != defs::CHIPTESTBOARD && det_type + != defs::XILINX_CHIPTESTBOARD + message: cmd + " only allowed for CTB." + - condition: cmd == "daclist" && det_type != defs::CHIPTESTBOARD && det_type + != defs::XILINX_CHIPTESTBOARD + message: '"This detector already has fixed dac names. Cannot change them."' + extra_variables: + - name: det_type + type: auto + value: det->getDetectorType().squash(defs::GENERIC); + function: setDacNames + input: + - args + input_types: + - std::string + output: + - ToString(args) + require_det_id: false + store_result_in_t: false + command_name: daclist + function_alias: daclist + help: "[dacname1 dacname2 .. dacname18] \n\t\t[Ctb][Xilinx_Ctb] Set the list of\ + \ dac names for this detector.\n\t\t[All] Gets the list of dac names for every\ + \ dac for this detector." + infer_action: true + template: true +dacname: + actions: + GET: + args: + - arg_types: + - defs::dacIndex + argc: 1 + cast_input: + - false + check_det_id: true + convert_det_id: true + exceptions: + - condition: det->getDetectorType().squash(defs::GENERIC) != defs::CHIPTESTBOARD + && det->getDetectorType().squash(defs::GENERIC) != defs::XILINX_CHIPTESTBOARD + message: cmd + " only allowed for CTB." + extra_variables: + - name: index + type: defs::dacIndex + value: defs::DAC_0 + function: getDacName + input: + - static_cast(StringTo(args[0]) + index) + input_types: + - defs::dacIndex + output: + - args[0] + - ''' ''' + - t + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: + - defs::dacIndex + - std::string + argc: 2 + cast_input: + - false + - false + check_det_id: true + convert_det_id: true + exceptions: + - condition: det->getDetectorType().squash(defs::GENERIC) != defs::CHIPTESTBOARD + && det->getDetectorType().squash(defs::GENERIC) != defs::XILINX_CHIPTESTBOARD + message: cmd + " only allowed for CTB." + extra_variables: + - name: index + type: defs::dacIndex + value: defs::DAC_0 + function: setDacName + input: + - static_cast(StringTo(args[0]) + index) + - args[1] + input_types: + - defs::dacIndex + - std::string + output: + - ToString(args) + require_det_id: false + store_result_in_t: false + command_name: dacname + function_alias: dacname + help: "[0-17][name] \n\t\t[Ctb][Xilinx_Ctb] Set the dac at the given position to\ + \ the given name." + infer_action: true + template: true +dacvalues: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: true + - arg_types: + - special::mv + argc: 1 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: true + command_name: dacvalues + function_alias: dacvalues + help: '' + infer_action: true + is_description: true +datastream: + actions: + GET: + args: + - arg_types: + - defs::portPosition + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: getDataStream + input: + - args[0] + input_types: + - defs::portPosition + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - defs::portPosition + - bool + argc: 2 + cast_input: + - true + - true + check_det_id: false + convert_det_id: true + function: setDataStream + input: + - args[0] + - args[1] + input_types: + - defs::portPosition + - bool + output: + - ToString(args) + require_det_id: true + store_result_in_t: false + command_name: datastream + function_alias: datastream + help: "[left|right] [0, 1]\n\t[Eiger] Enables or disables data streaming from left\ + \ or/and right side of detector for 10 GbE mode. 1 (enabled) by default." + infer_action: true +dbitclk: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getDBITClock + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setDBITClock + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: dbitclk + function_alias: dbitclk + help: "[n_clk in MHz]\n\t[Ctb] Clock for latching the digital bits in MHz." + infer_action: true + template: true +dbitphase: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + exceptions: + - condition: det_type == defs::EIGER || det_type == defs::MYTHEN3 || det_type + == defs::GOTTHARD2 || det_type == defs::MOENCH + message: '"dbitphase not implemented for this detector"' + extra_variables: + - name: det_type + type: auto + value: det->getDetectorType().squash(defs::GENERIC); + function: getDBITPhase + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + - arg_types: + - special::deg + argc: 1 + cast_input: [] + check_det_id: false + convert_det_id: true + exceptions: + - condition: det_type == defs::EIGER || det_type == defs::MYTHEN3 || det_type + == defs::GOTTHARD2 || det_type == defs::MOENCH + message: '"dbitphase not implemented for this detector"' + - condition: args[0] != "deg" + message: '"Unknown dbitphase argument " + args[0] + ". Did you mean deg? "' + extra_variables: + - name: det_type + type: auto + value: det->getDetectorType().squash(defs::GENERIC); + function: getDBITPhaseInDegrees + input: [] + input_types: [] + output: + - OutString(t) + - '" deg"' + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + exceptions: + - condition: det_type == defs::EIGER || det_type == defs::MYTHEN3 || det_type + == defs::GOTTHARD2 || det_type == defs::MOENCH + message: '"dbitphase not implemented for this detector"' + extra_variables: + - name: det_type + type: auto + value: det->getDetectorType().squash(defs::GENERIC); + function: setDBITPhase + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + - arg_types: + - int + - special::deg + argc: 2 + cast_input: + - true + check_det_id: false + convert_det_id: true + exceptions: + - condition: det_type == defs::EIGER || det_type == defs::MYTHEN3 || det_type + == defs::GOTTHARD2 || det_type == defs::MOENCH + message: '"dbitphase not implemented for this detector"' + - condition: args[1] != "deg" + message: '"Unknown dbitphase 2nd argument " + args[1] + ". Did you mean + deg? "' + extra_variables: + - name: det_type + type: auto + value: det->getDetectorType().squash(defs::GENERIC); + function: setDBITPhaseInDegrees + input: + - args[0] + input_types: + - int + output: + - args[0] + - ''' ''' + - args[1] + require_det_id: true + store_result_in_t: false + command_name: dbitphase + function_alias: dbitphase + help: "[n_value] [(optional)deg]\n\t[Ctb][Jungfrau] Phase shift of clock to latch\ + \ digital bits. Absolute phase shift. If deg used, then shift in degrees. \n\t\ + [Ctb]Changing dbitclk also resets dbitphase and sets to previous values." + infer_action: true +dbitpipeline: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getDBITPipeline + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setDBITPipeline + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: dbitpipeline + function_alias: dbitpipeline + help: "[n_value]\n\t[Ctb][Gotthard2] Pipeline of the clock for latching digital\ + \ bits.\n\t[Gotthard2] Options: 0-7\n\t[Ctb] Options: 0-255" + infer_action: true + template: true +defaultdac: + actions: + GET: + args: + - arg_types: + - defs::dacIndex + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: getDefaultDac + input: + - args[0] + input_types: + - defs::dacIndex + output: + - args[0] + - ''' ''' + - OutString(t) + require_det_id: true + store_result_in_t: true + - arg_types: + - defs::dacIndex + - defs::detectorSettings + argc: 2 + cast_input: + - true + - true + check_det_id: false + convert_det_id: true + function: getDefaultDac + input: + - args[0] + - args[1] + input_types: + - defs::dacIndex + - defs::detectorSettings + output: + - args[0] + - ''' ''' + - args[1] + - ''' ''' + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - defs::dacIndex + - int + argc: 2 + cast_input: + - true + - true + check_det_id: false + convert_det_id: true + function: setDefaultDac + input: + - args[0] + - args[1] + input_types: + - defs::dacIndex + - int + output: + - args[0] + - ''' ''' + - args[1] + require_det_id: true + store_result_in_t: false + - arg_types: + - defs::dacIndex + - int + - defs::detectorSettings + argc: 3 + cast_input: + - true + - true + - true + check_det_id: false + convert_det_id: true + function: setDefaultDac + input: + - args[0] + - args[1] + - args[2] + input_types: + - defs::dacIndex + - int + - defs::detectorSettings + output: + - args[0] + - ''' ''' + - args[2] + - ''' ''' + - args[1] + require_det_id: true + store_result_in_t: false + command_name: defaultdac + function_alias: defaultdac + help: "[dac name][value][(optional)setting]\n\tSets the default for that dac to\ + \ this value.\n\t[Jungfrau][Moench][Mythen3] When settings is provided, it sets\ + \ the default value only for that setting" + infer_action: true +defaultpattern: + actions: + PUT: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: loadDefaultPattern + input: [] + input_types: [] + output: + - '"successful"' + require_det_id: true + store_result_in_t: false + command_name: defaultpattern + function_alias: defaultpattern + help: "\n\t[Mythen3] Loads and runs default pattern in pattern generator. It is\ + \ to go back to initial settings." + infer_action: true + template: true +delay: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getDelayAfterTrigger + 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: getDelayAfterTrigger + input: [] + input_types: [] + output: + - OutString(t , args[0]) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - std::string + argc: 1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: setDelayAfterTrigger + input: + - converted_time + input_types: + - time::ns + output: + - args[0] + require_det_id: true + separate_time_units: + input: args[0] + output: + - converted_time + - unit + store_result_in_t: false + - arg_types: + - int + - special::time_unit + argc: 2 + cast_input: + - false + check_det_id: false + convert_det_id: true + convert_to_time: + input: + - args[0] + - args[1] + output: converted_time + function: setDelayAfterTrigger + input: + - converted_time + input_types: + - time::ns + output: + - args[0] + - args[1] + require_det_id: true + store_result_in_t: false + command_name: delay + function_alias: delay + help: "[duration] [(optional unit) ns|us|ms|s]\n\t[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb][Moench][Xilinx\ + \ Ctb] Delay after trigger" + infer_action: true + template: true +delayl: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getDelayAfterTriggerLeft + 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: getDelayAfterTriggerLeft + input: [] + input_types: [] + output: + - OutString(t , args[0]) + require_det_id: true + store_result_in_t: true + command_name: delayl + function_alias: delayl + help: "\n\t[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Delay\ + \ Left in Acquisition. \n\t[Gotthard2] only in continuous mode." + infer_action: true + template: true +detectorserverversion: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getDetectorServerVersion + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: detectorserverversion + function_alias: detectorserverversion + help: "\n\tOn-board detector server software version" + infer_action: true + template: true +detsize: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getDetectorSize + input: [] + input_types: [] + output: + - t + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - int + argc: 2 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: setDetectorSize + input: + - defs::xy(StringTo(args[0]),StringTo(args[1])) + input_types: + - defs::xy + output: + - ToString(args) + require_det_id: false + store_result_in_t: false + command_name: detsize + function_alias: detsize + help: "[nx] [ny]\n\tDetector size, ie. Number of channels in x and y dim. This is\ + \ used to calculate module coordinates included in UDP data. \n\tBy default, it\ + \ adds module in y dimension for 2d detectors and in x dimension for 1d detectors\ + \ packet header." + infer_action: true +diodelay: + actions: + PUT: + args: + - arg_types: + - uint64_t + - int + argc: 2 + cast_input: + - true + - true + check_det_id: false + convert_det_id: true + function: setDigitalIODelay + input: + - args[0] + - args[1] + input_types: + - uint64_t + - int + output: + - ToString(args) + require_det_id: true + store_result_in_t: false + command_name: diodelay + function_alias: diodelay + help: "[0-775]\n\t[Ctb] Delay for diode. Delay is in ps and max of 775 ps. Resolution\ + \ is 25 ps." + infer_action: true +dpulse: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getDigitalPulsing + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - bool + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setDigitalPulsing + input: + - args[0] + input_types: + - bool + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: dpulse + function_alias: dpulse + help: "[0, 1]\n\t[Mythen3] Enables or disables digital pulsing. Default is disabled" + infer_action: true + template: true +dr: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getDynamicRange + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: true + convert_det_id: true + function: setDynamicRange + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: false + store_result_in_t: false + command_name: dr + function_alias: dr + 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" + infer_action: true + template: true +drlist: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getDynamicRangeList + input: [] + input_types: [] + output: + - ToString(t) + require_det_id: false + store_result_in_t: true + command_name: drlist + function_alias: drlist + help: "\n\tGets the list of dynamic ranges for this detector." + infer_action: true + template: true +dsamples: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getNumberOfDigitalSamples + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setNumberOfDigitalSamples + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: dsamples + function_alias: dsamples + help: "[n_value]\n\t[Ctb] Number of digital samples expected." + infer_action: true + template: true +execcommand: + actions: + PUT: + args: + - arg_types: [] + argc: -1 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: false + command_name: execcommand + function_alias: execcommand + help: '' + infer_action: true + is_description: true +exptime: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getExptime + 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: getExptime + input: [] + input_types: [] + output: + - OutString(t , args[0]) + require_det_id: true + store_result_in_t: true + detectors: + MYTHEN3: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getExptimeForAllGates + 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: getExptimeForAllGates + input: [] + input_types: [] + output: + - OutString(t , args[0]) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - std::string + argc: 1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: setExptime + input: + - converted_time + input_types: + - time::ns + output: + - args[0] + require_det_id: true + separate_time_units: + input: args[0] + output: + - converted_time + - unit + store_result_in_t: false + - arg_types: + - int + - special::time_unit + argc: 2 + cast_input: + - false + check_det_id: false + convert_det_id: true + convert_to_time: + input: + - args[0] + - args[1] + output: converted_time + function: setExptime + input: + - converted_time + input_types: + - time::ns + output: + - args[0] + - args[1] + require_det_id: true + store_result_in_t: false + command_name: exptime + function_alias: 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." + infer_action: true + template: true +exptime1: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: false + convert_det_id: true + extra_variables: + - name: gateIndex + type: int + value: 0 + function: getExptime + input: + - gateIndex + input_types: + - int + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + - arg_types: + - special::time_unit + argc: 1 + cast_input: + - false + check_det_id: false + convert_det_id: true + extra_variables: + - name: gateIndex + type: int + value: 0 + function: getExptime + input: + - gateIndex + input_types: + - int + output: + - OutString(t , args[0]) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - std::string + argc: 1 + cast_input: + - false + - false + check_det_id: false + convert_det_id: true + extra_variables: + - name: gateIndex + type: int + value: 0 + function: setExptime + input: + - gateIndex + - converted_time + input_types: + - int + - time::ns + output: + - args[0] + require_det_id: true + separate_time_units: + input: args[0] + output: + - converted_time + - unit + store_result_in_t: false + - arg_types: + - int + - special::time_unit + argc: 2 + cast_input: + - false + - false + check_det_id: false + convert_det_id: true + convert_to_time: + input: + - args[0] + - args[1] + output: converted_time + extra_variables: + - name: gateIndex + type: int + value: 0 + function: setExptime + input: + - gateIndex + - converted_time + input_types: + - int + - time::ns + output: + - args[0] + - args[1] + require_det_id: true + store_result_in_t: false + command_name: exptime1 + function_alias: exptime1 + help: "[n_value]\n\t[Mythen3] Exposure time of gate signal 1 in auto and trigger\ + \ mode (internal gating)." + infer_action: true + template: true +exptime2: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: false + convert_det_id: true + extra_variables: + - name: gateIndex + type: int + value: 1 + function: getExptime + input: + - gateIndex + input_types: + - int + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + - arg_types: + - special::time_unit + argc: 1 + cast_input: + - false + check_det_id: false + convert_det_id: true + extra_variables: + - name: gateIndex + type: int + value: 1 + function: getExptime + input: + - gateIndex + input_types: + - int + output: + - OutString(t , args[0]) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - std::string + argc: 1 + cast_input: + - false + - false + check_det_id: false + convert_det_id: true + extra_variables: + - name: gateIndex + type: int + value: 1 + function: setExptime + input: + - gateIndex + - converted_time + input_types: + - int + - time::ns + output: + - args[0] + require_det_id: true + separate_time_units: + input: args[0] + output: + - converted_time + - unit + store_result_in_t: false + - arg_types: + - int + - special::time_unit + argc: 2 + cast_input: + - false + - false + check_det_id: false + convert_det_id: true + convert_to_time: + input: + - args[0] + - args[1] + output: converted_time + extra_variables: + - name: gateIndex + type: int + value: 1 + function: setExptime + input: + - gateIndex + - converted_time + input_types: + - int + - time::ns + output: + - args[0] + - args[1] + require_det_id: true + store_result_in_t: false + command_name: exptime2 + function_alias: exptime2 + help: "[n_value]\n\t[Mythen3] Exposure time of gate signal 2 in auto and trigger\ + \ mode (internal gating)." + infer_action: true + template: true +exptime3: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: false + convert_det_id: true + extra_variables: + - name: gateIndex + type: int + value: 2 + function: getExptime + input: + - gateIndex + input_types: + - int + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + - arg_types: + - special::time_unit + argc: 1 + cast_input: + - false + check_det_id: false + convert_det_id: true + extra_variables: + - name: gateIndex + type: int + value: 2 + function: getExptime + input: + - gateIndex + input_types: + - int + output: + - OutString(t , args[0]) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - std::string + argc: 1 + cast_input: + - false + - false + check_det_id: false + convert_det_id: true + extra_variables: + - name: gateIndex + type: int + value: 2 + function: setExptime + input: + - gateIndex + - converted_time + input_types: + - int + - time::ns + output: + - args[0] + require_det_id: true + separate_time_units: + input: args[0] + output: + - converted_time + - unit + store_result_in_t: false + - arg_types: + - int + - special::time_unit + argc: 2 + cast_input: + - false + - false + check_det_id: false + convert_det_id: true + convert_to_time: + input: + - args[0] + - args[1] + output: converted_time + extra_variables: + - name: gateIndex + type: int + value: 2 + function: setExptime + input: + - gateIndex + - converted_time + input_types: + - int + - time::ns + output: + - args[0] + - args[1] + require_det_id: true + store_result_in_t: false + command_name: exptime3 + function_alias: exptime3 + help: "[n_value]\n\t[Mythen3] Exposure time of gate signal 3 in auto and trigger\ + \ mode (internal gating)." + infer_action: 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: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getNumberOfAdditionalStorageCells + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: true + convert_det_id: true + function: setNumberOfAdditionalStorageCells + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: false + store_result_in_t: false + command_name: extrastoragecells + function_alias: extrastoragecells + help: "[0-15]\n\t[Jungfrau] Only for chipv1.0. Number of additional storage cells.\ + \ Default is 0. For advanced users only. \n\tThe #images = #frames x #triggers\ + \ x (#extrastoragecells + 1)." + infer_action: true + template: true +extsampling: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getExternalSampling + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - bool + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setExternalSampling + input: + - args[0] + input_types: + - bool + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: extsampling + function_alias: extsampling + help: "[0, 1]\n\t[Ctb] Enable for external sampling signal for digital data to signal\ + \ by extsampling src command. For advanced users only." + infer_action: true + template: true +extsamplingsrc: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getExternalSamplingSource + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setExternalSamplingSource + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: extsamplingsrc + function_alias: extsamplingsrc + help: "[0-63]\n\t[Ctb] Sampling source signal for digital data. For advanced users\ + \ only." + infer_action: true + template: true +extsig: + actions: + GET: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: getExternalSignalFlags + input: + - args[0] + input_types: + - int + output: + - args[0] + - ''' ''' + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - defs::externalSignalFlag + argc: 2 + cast_input: + - true + - true + check_det_id: false + convert_det_id: true + function: setExternalSignalFlags + input: + - args[0] + - args[1] + input_types: + - int + - defs::externalSignalFlag + output: + - args[0] + - ''' ''' + - args[1] + require_det_id: true + store_result_in_t: false + command_name: extsig + function_alias: 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." + infer_action: true +fformat: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getFileFormat + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - defs::fileFormat + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setFileFormat + input: + - args[0] + input_types: + - defs::fileFormat + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: fformat + function_alias: fformat + help: "[binary|hdf5]\n\tFile format of data file. For HDF5, package must be compiled\ + \ with HDF5 flags. Default is binary." + infer_action: true + template: true +filtercells: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getNumberOfFilterCells + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setNumberOfFilterCells + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: filtercells + function_alias: filtercells + help: "[0-12]\n\t[Jungfrau] Set Filter Cell. Only for chipv1.1. Advanced user Command" + infer_action: true + template: true +filterresistor: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getFilterResistor + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setFilterResistor + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: filterresistor + function_alias: filterresistor + help: "[value] [Gotthard2][Jungfrau] Set filter resistor. Increasing values for\ + \ increasing resistance.\n\t[Gotthard2] Options: [0|1|2|3]. Default is 0.\n\t\ + [Jungfrau] Options: [0|1]. Default is 1." + infer_action: true + template: true +findex: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getAcquisitionIndex + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - uint64_t + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setAcquisitionIndex + input: + - args[0] + input_types: + - uint64_t + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: findex + function_alias: findex + help: "[n_value]\n\tFile or Acquisition index." + infer_action: true + template: true +firmwaretest: + actions: + PUT: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: executeFirmwareTest + input: [] + input_types: [] + output: + - '"successful"' + require_det_id: true + store_result_in_t: false + command_name: firmwaretest + function_alias: firmwaretest + help: "\n\t[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Firmware\ + \ test, ie. reads a read fixed pattern from a register." + infer_action: true + template: true +firmwareversion: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getFirmwareVersion + input: [] + input_types: [] + output: + - OutStringHex(t) + require_det_id: true + store_result_in_t: true + detectors: + EIGER: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getFirmwareVersion + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: firmwareversion + function_alias: firmwareversion + help: "\n\tFirmware version of detector in format [0xYYMMDD] or an increasing 2\ + \ digit number for Eiger." + infer_action: true +fliprows: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getFlipRows + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - bool + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setFlipRows + input: + - args[0] + input_types: + - bool + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: fliprows + function_alias: fliprows + help: "[0, 1]\n\t[Eiger] flips rows paramater sent to slsreceiver to stream as json\ + \ parameter to flip rows in gui \n\t[Jungfrau][Moench] flips rows in the detector\ + \ itself. For bottom module and number of interfaces must be set to 2. slsReceiver\ + \ and slsDetectorGui does not handle." + infer_action: true + template: true +flowcontrol10g: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getTenGigaFlowControl + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - bool + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setTenGigaFlowControl + input: + - args[0] + input_types: + - bool + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: flowcontrol10g + function_alias: flowcontrol10g + help: "[0, 1]\n\t[Eiger][Jungfrau][Moench] 10GbE Flow Control." + infer_action: true + template: true +fmaster: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: true + convert_det_id: true + function: getMasterFileWrite + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: + - bool + argc: 1 + cast_input: + - true + check_det_id: true + convert_det_id: true + function: setMasterFileWrite + input: + - args[0] + input_types: + - bool + output: + - args.front() + require_det_id: false + store_result_in_t: false + command_name: fmaster + function_alias: fmaster + help: "[0, 1]\n\tEnable or disable receiver master file. Default is 1." + infer_action: true + template: true +fname: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getFileNamePrefix + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - std::string + argc: 1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: setFileNamePrefix + input: + - args[0] + input_types: + - std::string + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: fname + function_alias: fname + help: "[name]\n\tFile name prefix for output data file. Default is run. File name:\ + \ [file name prefix]_d[detector index]_f[sub file index]_[acquisition/file index].raw." + infer_action: true + template: true +foverwrite: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getFileOverWrite + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - bool + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setFileOverWrite + input: + - args[0] + input_types: + - bool + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: foverwrite + function_alias: foverwrite + help: "[0, 1]\n\tEnable or disable file overwriting. Default is 1." + infer_action: true + template: true +fpath: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getFilePath + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - special::path + argc: 1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: setFilePath + input: + - args[0] + input_types: + - std::string + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: fpath + function_alias: fpath + help: "[path]\n\tDirectory where output data files are written in receiver. Default\ + \ is '/'. \n\tIf path does not exist and fwrite enabled, it will try to create\ + \ it at start of acquisition." + infer_action: true + template: true +framecounter: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getNumberOfFramesFromStart + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: framecounter + function_alias: framecounter + help: "\n\t[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number of frames\ + \ from start run control.\n\t[Gotthard2] only in continuous mode." + infer_action: true + template: true +frames: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getNumberOfFrames + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int64_t + argc: 1 + cast_input: + - true + check_det_id: true + convert_det_id: true + function: setNumberOfFrames + input: + - args[0] + input_types: + - int64_t + output: + - args.front() + require_det_id: false + store_result_in_t: false + command_name: frames + function_alias: frames + help: "[n_frames]\n\tNumber of frames per acquisition. In trigger mode, number of\ + \ frames per trigger. \n\tCannot be set in modular level. \n\tIn scan mode, number\ + \ of frames is set to number of steps.\n\t[Gotthard2] Burst mode has a maximum\ + \ of 2720 frames." + infer_action: true + template: true +framesl: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getNumberOfFramesLeft + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: framesl + function_alias: framesl + 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." + infer_action: true + template: true +frametime: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getMeasurementTime + 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: getMeasurementTime + input: [] + input_types: [] + output: + - OutString(t , args[0]) + require_det_id: true + store_result_in_t: true + command_name: frametime + function_alias: frametime + help: "[(optional unit) ns|us|ms|s]\n\t[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx\ + \ Ctb] Timestamp at a frame start.\n\t[Gotthard2] not in burst and auto mode." + infer_action: true + template: true +free: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: false + command_name: free + function_alias: free + help: '' + infer_action: true + is_description: true +fwrite: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getFileWrite + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - bool + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setFileWrite + input: + - args[0] + input_types: + - bool + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: fwrite + function_alias: fwrite + help: "[0, 1]\n\tEnable or disable receiver file write. Default is 0." + infer_action: true + template: true +gaincaps: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: + - defs::defs::M3_GainCaps + argc: -1 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: false + command_name: gaincaps + function_alias: gaincaps + help: '' + infer_action: true + is_description: true +gainmode: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getGainMode + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - defs::gainMode + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setGainMode + input: + - args[0] + input_types: + - defs::gainMode + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: gainmode + function_alias: gainmode + help: "[dynamic|forceswitchg1|forceswitchg2|fixg1|fixg2|fixg0]\n\t[Jungfrau] Gain\ + \ mode.\n\tCAUTION: Do not use fixg0 without caution, you can damage the detector!!!" + infer_action: true + template: true +gappixels: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: true + convert_det_id: true + function: getGapPixelsinCallback + input: [] + input_types: [] + output: + - t + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: + - bool + argc: 1 + cast_input: + - true + check_det_id: true + convert_det_id: true + function: setGapPixelsinCallback + input: + - args[0] + input_types: + - bool + output: + - args.front() + require_det_id: false + store_result_in_t: false + command_name: gappixels + function_alias: gappixels + help: "[0, 1]\n\t[Eiger][Jungfrau][Moench] Include Gap pixels in client data call\ + \ back in Detecor api. Will not be in detector streaming, receiver file or streaming.\ + \ Default is 0. " + infer_action: true +gatedelay: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getGateDelayForAllGates + 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: getGateDelayForAllGates + input: [] + input_types: [] + output: + - OutString(t, args[0]) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - std::string + argc: 1 + cast_input: + - false + - false + check_det_id: false + convert_det_id: true + extra_variables: + - name: gateIndex + type: int + value: -1 + function: setGateDelay + input: + - gateIndex + - converted_time + input_types: + - int + - time::ns + output: + - args[0] + require_det_id: true + separate_time_units: + input: args[0] + output: + - converted_time + - unit + store_result_in_t: false + - arg_types: + - int + - special::time_unit + argc: 2 + cast_input: + - false + - false + check_det_id: false + convert_det_id: true + convert_to_time: + input: + - args[0] + - args[1] + output: converted_time + extra_variables: + - name: gateIndex + type: int + value: -1 + function: setGateDelay + input: + - gateIndex + - converted_time + input_types: + - int + - time::ns + output: + - args[0] + - args[1] + require_det_id: true + store_result_in_t: false + command_name: gatedelay + function_alias: gatedelay + help: "[duration] [(optional unit) ns|us|ms|s]\n\t[Mythen3] Gate Delay of all gate\ + \ signals in auto and trigger mode (internal gating)." + infer_action: true +gatedelay1: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: false + convert_det_id: true + extra_variables: + - name: gateIndex + type: int + value: 0 + function: getGateDelay + input: + - gateIndex + input_types: + - int + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + - arg_types: + - special::time_unit + argc: 1 + cast_input: + - false + check_det_id: false + convert_det_id: true + extra_variables: + - name: gateIndex + type: int + value: 0 + function: getGateDelay + input: + - gateIndex + input_types: + - int + output: + - OutString(t, args[0]) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - std::string + argc: 1 + cast_input: + - false + - false + check_det_id: false + convert_det_id: true + extra_variables: + - name: gateIndex + type: int + value: 0 + function: setGateDelay + input: + - gateIndex + - converted_time + input_types: + - int + - time::ns + output: + - args[0] + require_det_id: true + separate_time_units: + input: args[0] + output: + - converted_time + - unit + store_result_in_t: false + - arg_types: + - int + - special::time_unit + argc: 2 + cast_input: + - false + - false + check_det_id: false + convert_det_id: true + convert_to_time: + input: + - args[0] + - args[1] + output: converted_time + extra_variables: + - name: gateIndex + type: int + value: 0 + function: setGateDelay + input: + - gateIndex + - converted_time + input_types: + - int + - time::ns + output: + - args[0] + - args[1] + require_det_id: true + store_result_in_t: false + command_name: gatedelay1 + function_alias: gatedelay1 + help: "[duration] [(optional unit) ns|us|ms|s]\n\t[Mythen3] Gate Delay of gate signal\ + \ 1 in auto and trigger mode (internal gating)." + infer_action: true +gatedelay2: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: false + convert_det_id: true + extra_variables: + - name: gateIndex + type: int + value: 1 + function: getGateDelay + input: + - gateIndex + input_types: + - int + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + - arg_types: + - special::time_unit + argc: 1 + cast_input: + - false + check_det_id: false + convert_det_id: true + extra_variables: + - name: gateIndex + type: int + value: 1 + function: getGateDelay + input: + - gateIndex + input_types: + - int + output: + - OutString(t, args[0]) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - std::string + argc: 1 + cast_input: + - false + - false + check_det_id: false + convert_det_id: true + extra_variables: + - name: gateIndex + type: int + value: 1 + function: setGateDelay + input: + - gateIndex + - converted_time + input_types: + - int + - time::ns + output: + - args[0] + require_det_id: true + separate_time_units: + input: args[0] + output: + - converted_time + - unit + store_result_in_t: false + - arg_types: + - int + - special::time_unit + argc: 2 + cast_input: + - false + - false + check_det_id: false + convert_det_id: true + convert_to_time: + input: + - args[0] + - args[1] + output: converted_time + extra_variables: + - name: gateIndex + type: int + value: 1 + function: setGateDelay + input: + - gateIndex + - converted_time + input_types: + - int + - time::ns + output: + - args[0] + - args[1] + require_det_id: true + store_result_in_t: false + command_name: gatedelay2 + function_alias: gatedelay2 + help: "[duration] [(optional unit) ns|us|ms|s]\n\t[Mythen3] Gate Delay of gate signal\ + \ 2 in auto and trigger mode (internal gating)." + infer_action: true +gatedelay3: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: false + convert_det_id: true + extra_variables: + - name: gateIndex + type: int + value: 2 + function: getGateDelay + input: + - gateIndex + input_types: + - int + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + - arg_types: + - special::time_unit + argc: 1 + cast_input: + - false + check_det_id: false + convert_det_id: true + extra_variables: + - name: gateIndex + type: int + value: 2 + function: getGateDelay + input: + - gateIndex + input_types: + - int + output: + - OutString(t, args[0]) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - std::string + argc: 1 + cast_input: + - false + - false + check_det_id: false + convert_det_id: true + extra_variables: + - name: gateIndex + type: int + value: 2 + function: setGateDelay + input: + - gateIndex + - converted_time + input_types: + - int + - time::ns + output: + - args[0] + require_det_id: true + separate_time_units: + input: args[0] + output: + - converted_time + - unit + store_result_in_t: false + - arg_types: + - int + - special::time_unit + argc: 2 + cast_input: + - false + - false + check_det_id: false + convert_det_id: true + convert_to_time: + input: + - args[0] + - args[1] + output: converted_time + extra_variables: + - name: gateIndex + type: int + value: 2 + function: setGateDelay + input: + - gateIndex + - converted_time + input_types: + - int + - time::ns + output: + - args[0] + - args[1] + require_det_id: true + store_result_in_t: false + command_name: gatedelay3 + function_alias: gatedelay3 + help: "[duration] [(optional unit) ns|us|ms|s]\n\t[Mythen3] Gate Delay of gate signal\ + \ 3 in auto and trigger mode (internal gating)." + infer_action: true +gates: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getNumberOfGates + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setNumberOfGates + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: gates + function_alias: gates + help: "[n_gates]\n\t[Mythen3] Number of external gates in gating or trigger_gating\ + \ mode (external gating)." + infer_action: true + template: true +getbit: + actions: + GET: + args: + - arg_types: + - uint32_t + - int + argc: 2 + cast_input: + - true + - true + check_det_id: false + convert_det_id: true + exceptions: + - condition: StringTo(args[1]) < 0 || StringTo(args[1]) > 31 + message: '"Bit number out of range: " + args[1]' + function: getBit + input: + - args[0] + - args[1] + input_types: + - uint32_t + - int + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: getbit + function_alias: getbit + help: "[reg address in hex] [bit index]\n\tGets bit in address." + infer_action: true +hardwareversion: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getHardwareVersion + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: hardwareversion + function_alias: hardwareversion + help: "\n\tHardware version of detector. \n\t[Eiger] Hardware version of front FPGA\ + \ on detector." + infer_action: true + template: true +highvoltage: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getHighVoltage + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setHighVoltage + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: 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]\ + \ \n\t[Eiger][Mythen3][Gotthard2] 0-200 \n\t[Jungfrau][Moench][Ctb] [0|60-200]" + infer_action: true + template: true +hostname: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: + - std::string + argc: -1 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: false + command_name: hostname + function_alias: hostname + help: '' + infer_action: true + is_description: true +im_a: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getMeasuredCurrent + input: + - defs::I_POWER_A + input_types: + - int + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: im_a + function_alias: im_a + help: "\n\t[Ctb] Measured current of power supply a in mA." + infer_action: true + template: true +im_b: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getMeasuredCurrent + input: + - defs::I_POWER_B + input_types: + - int + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: im_b + function_alias: im_b + help: "\n\t[Ctb] Measured current of power supply b in mA." + infer_action: true + template: true +im_c: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getMeasuredCurrent + input: + - defs::I_POWER_C + input_types: + - int + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: im_c + function_alias: im_c + help: "\n\t[Ctb] Measured current of power supply c in mA." + infer_action: true + template: true +im_d: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getMeasuredCurrent + input: + - defs::I_POWER_D + input_types: + - int + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: im_d + function_alias: im_d + help: "\n\t[Ctb] Measured current of power supply d in mA." + infer_action: true + template: true +im_io: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getMeasuredCurrent + input: + - defs::I_POWER_IO + input_types: + - int + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: im_io + function_alias: im_io + help: "\n\t[Ctb] Measured current of power supply io in mA." + infer_action: true + template: true +imagetest: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getImageTestMode + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - bool + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setImageTestMode + input: + - args[0] + input_types: + - bool + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: imagetest + function_alias: 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." + infer_action: true + template: true +initialchecks: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: true + convert_det_id: true + function: getInitialChecks + input: [] + input_types: [] + output: + - t + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: + - bool + argc: 1 + cast_input: + - true + check_det_id: true + convert_det_id: true + function: setInitialChecks + input: + - args[0] + input_types: + - bool + output: + - args.front() + require_det_id: false + store_result_in_t: false + command_name: initialchecks + function_alias: initialchecks + help: "[0, 1]\n\t[Mythen3][Gotthard2] Enable or disable intial compatibility and\ + \ other checks at detector start up. It is enabled by default. Must come before\ + \ 'hostname' command to take effect. Can be used to reprogram fpga when current\ + \ firmware is incompatible.\n\tAdvanced User function!" + infer_action: true +inj_ch: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getInjectChannel + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - int + argc: 2 + cast_input: + - true + - true + check_det_id: false + convert_det_id: true + function: setInjectChannel + input: + - args[0] + - args[1] + input_types: + - int + - int + output: + - ToString(args) + require_det_id: true + store_result_in_t: false + command_name: inj_ch + function_alias: 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." + infer_action: true +interpolation: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getInterpolation + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - bool + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setInterpolation + input: + - args[0] + input_types: + - bool + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: interpolation + function_alias: interpolation + help: "[0, 1]\n\t[Mythen3] Enables or disables interpolation. Default is disabled.\ + \ Interpolation mode enables all counters and disables vth3. Disabling sets back\ + \ counter mask and vth3." + infer_action: true + template: true +interruptsubframe: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getInterruptSubframe + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - bool + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setInterruptSubframe + input: + - args[0] + input_types: + - bool + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: interruptsubframe + function_alias: interruptsubframe + help: "[0, 1]\n\t[Eiger] 1 interrupts last subframe at required exposure time. 0\ + \ will wait for last sub frame to finish exposing. 0 is default." + infer_action: true + template: true +kernelversion: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getKernelVersion + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: kernelversion + function_alias: kernelversion + help: "\n\tGet kernel version on the detector including time and date." + infer_action: true + template: true +lastclient: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getLastClientIP + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: lastclient + function_alias: lastclient + help: "\n\tClient IP Address that last communicated with the detector." + infer_action: true + template: true +led: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getLEDEnable + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - bool + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setLEDEnable + input: + - args[0] + input_types: + - bool + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: led + function_alias: led + help: "[0, 1]\n\t[Ctb] Switches on/off all LEDs." + infer_action: true + template: true +lock: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getDetectorLock + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - bool + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setDetectorLock + input: + - args[0] + input_types: + - bool + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: lock + function_alias: lock + help: "[0, 1]\n\tLock detector to one IP, 1: locks. Default is unlocked" + infer_action: true + template: true +master: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getMaster + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - bool + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: false + function: setMaster + input: + - args[0] + input_types: + - bool + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: master + function_alias: 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]\ + \ Gets if the current (half) module is master." + infer_action: true + template: true +maxadcphaseshift: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getMaxADCPhaseShift + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: maxadcphaseshift + function_alias: maxadcphaseshift + help: "\n\t[Jungfrau][Moench][Ctb] Absolute maximum Phase shift of ADC clock." + infer_action: true + template: true +maxclkphaseshift: + actions: + GET: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + exceptions: + - condition: type != defs::GOTTHARD2 && type != defs::MYTHEN3 + message: '"maxclkphaseshift not implemented for this detector."' + extra_variables: + - name: type + type: defs::detectorType + value: det->getDetectorType().squash(defs::GENERIC); + function: getMaxClockPhaseShift + input: + - args[0] + input_types: + - int + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: maxclkphaseshift + function_alias: maxclkphaseshift + help: "[n_clock]\n\t[Gotthard2][Mythen3] Absolute Maximum Phase shift of clock n_clock.n\t\ + [Gotthard2] Clock index range: 0-5\n\t[Mythen3] Clock index range: 0" + infer_action: true +maxdbitphaseshift: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getMaxDBITPhaseShift + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: maxdbitphaseshift + function_alias: maxdbitphaseshift + help: "\n\t[Ctb][Jungfrau] Absolute maximum Phase shift of of the clock to latch\ + \ digital bits." + infer_action: true + template: true +measuredperiod: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getMeasuredPeriod + 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: getMeasuredPeriod + input: [] + input_types: [] + output: + - OutString(t , args[0]) + require_det_id: true + store_result_in_t: true + command_name: measuredperiod + function_alias: measuredperiod + help: "[(optional unit) ns|us|ms|s]\n\t[Eiger] Measured frame period between last\ + \ frame and previous one. Can be measured with minimum 2 frames in an acquisition." + infer_action: true + template: true +measuredsubperiod: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getMeasuredSubFramePeriod + 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: getMeasuredSubFramePeriod + input: [] + input_types: [] + output: + - OutString(t , args[0]) + require_det_id: true + store_result_in_t: true + command_name: measuredsubperiod + function_alias: measuredsubperiod + help: "[(optional unit) ns|us|ms|s]\n\t[Eiger] Measured sub frame period between\ + \ last sub frame and previous one." + infer_action: true + template: true +moduleid: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getModuleId + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: moduleid + function_alias: moduleid + help: "\n\t[Gotthard2][Eiger][Mythen3][Jungfrau][Moench] 16 bit value (ideally unique)\ + \ that is streamed out in the UDP header of the detector. Picked up from a file\ + \ on the module." + infer_action: true + template: true +nextframenumber: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getNextFrameNumber + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - uint64_t + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setNextFrameNumber + input: + - args[0] + input_types: + - uint64_t + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: nextframenumber + function_alias: nextframenumber + help: "[n_value]\n\t[Eiger][Jungfrau][Moench][Ctb][Xilinx Ctb][Gotthard2] Next frame\ + \ number. Stopping acquisition might result in different frame numbers for different\ + \ modules. So, after stopping, next frame number (max + 1) is set for all the\ + \ modules afterwards." + infer_action: true + template: true +nmod: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: size + input: [] + input_types: [] + output: + - ToString(t) + require_det_id: false + store_result_in_t: true + command_name: nmod + function_alias: nmod + help: "\n\tNumber of modules in shared memory." + infer_action: true + template: true +numinterfaces: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getNumberofUDPInterfaces + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setNumberofUDPInterfaces + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: numinterfaces + function_alias: numinterfaces + help: "[1, 2]\n\t[Jungfrau][Moench] Number of udp interfaces to stream data from\ + \ detector. Default: 1.\n\tAlso enables second interface in receiver for listening\ + \ (Writes a file per interface if writing enabled).\n\tAlso restarts client and\ + \ receiver zmq sockets if zmq streaming enabled.\n\t[Eiger] Only gets with result\ + \ 2." + infer_action: true + template: true +overflow: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getOverFlowMode + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - bool + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setOverFlowMode + input: + - args[0] + input_types: + - bool + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: overflow + function_alias: overflow + help: "[0, 1]\n\t[Eiger] Enable or disable show overflow flag in 32 bit mode. Default\ + \ is disabled." + infer_action: true + template: true +packageversion: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getPackageVersion + input: [] + input_types: [] + output: + - t + require_det_id: false + store_result_in_t: true + command_name: packageversion + function_alias: packageversion + help: "\n\tPackage version." + infer_action: true +parallel: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getParallelMode + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - bool + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setParallelMode + input: + - args[0] + input_types: + - bool + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: parallel + function_alias: parallel + help: "[0, 1]\n\t[Eiger][Mythen3][Gotthard2][Moench] Enable or disable parallel\ + \ mode.\n\t[Mythen3] If exptime is too short, the acquisition will return ERROR\ + \ status and take fewer frames than expected.\n\t[Mythen3][Eiger][Moench] Default:\ + \ Non parallel.\n\t[Gotthard2] Default: Parallel. Non parallel mode works only\ + \ in continuous mode." + infer_action: true + template: true +parameters: + actions: + PUT: + args: + - arg_types: + - special::path + argc: 1 + cast_input: + - false + check_det_id: true + convert_det_id: true + function: loadParameters + input: + - args[0] + input_types: + - std::string + output: + - args.front() + require_det_id: false + store_result_in_t: false + command_name: parameters + function_alias: parameters + help: "\n\tSets detector measurement parameters to those contained in fname. Set\ + \ up per measurement." + infer_action: true + template: true +partialreset: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getPartialReset + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - bool + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setPartialReset + input: + - args[0] + input_types: + - bool + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: partialreset + function_alias: partialreset + help: "[0, 1]\n\t[Eiger] Sets up detector to do partial or complete reset at start\ + \ of acquisition. 0 complete reset, 1 partial reset. Default is complete reset.\ + \ Advanced function!" + infer_action: true + template: true +patfname: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getPatterFileName + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: patfname + function_alias: patfname + help: "\n\t[Ctb][Mythen3][Xilinx Ctb] Gets the pattern file name including path\ + \ of the last pattern uploaded. Returns an empty if nothing was uploaded or via\ + \ a server default file" + infer_action: true + template: true +patioctrl: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getPatternIOControl + input: [] + input_types: [] + output: + - OutStringHex(t, 16) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - uint64_t + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setPatternIOControl + input: + - args[0] + input_types: + - uint64_t + output: + - ToStringHex(arg0, 16) + require_det_id: true + store_result_in_t: false + command_name: patioctrl + function_alias: patioctrl + help: "[64 bit mask]\n\t[Ctb] 64 bit mask defining input (0) and output (1) signals." + infer_action: true + template: true +patlimits: + actions: + GET: + args: + - arg_types: + - int + argc: -1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: getPatternLoopAddresses + input: + - '"-1"' + input_types: + - int + output: + - OutStringHex(t, 4) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - int + - int + argc: -1 + cast_input: + - true + - true + - true + check_det_id: false + convert_det_id: true + function: setPatternLoopAddresses + input: + - '"-1"' + - args[0] + - args[1] + input_types: + - int + - int + - int + output: + - '''[''' + - ToStringHex(arg1, 4) + - '", "' + - ToStringHex(arg2, 4) + - ''']''' + require_det_id: true + store_result_in_t: false + command_name: patlimits + function_alias: patlimits + help: "[start addr] [stop addr] \n\t[Ctb][Mythen3][Xilinx Ctb] Limits of complete\ + \ pattern" + infer_action: true +patloop: + actions: + GET: + args: + - arg_types: + - int + argc: -1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getPatternLoopAddresses + input: + - level + input_types: + - int + output: + - level + - ''' ''' + - OutStringHex(t, 4) + pattern_command: + command_name: patloop + nGetArgs: 0 + nPutArgs: 2 + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - int + - int + argc: -1 + cast_input: + - false + - false + - false + check_det_id: false + convert_det_id: true + extra_variables: + - name: start + type: int + value: StringTo(args[iArg++]) + - name: stop + type: int + value: StringTo(args[iArg++]) + function: setPatternLoopAddresses + input: + - level + - start + - stop + input_types: + - int + - int + - int + output: + - level + - ''' ''' + - '''[''' + - ToStringHex(start, 4) + - '", "' + - ToStringHex(stop, 4) + - ''']''' + pattern_command: + command_name: patloop + nGetArgs: 0 + nPutArgs: 2 + require_det_id: true + store_result_in_t: false + command_name: patloop + function_alias: patloop + help: "[0-6] [start addr] [stop addr] \n\t[Ctb][Mythen3][Xilinx Ctb] Limits of the\ + \ loop level provided.\n\t[Mythen3] Level options: 0-3 only." + infer_action: true +patloop0: + actions: + GET: + args: + - arg_types: + - int + argc: -1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getPatternLoopAddresses + input: + - level + input_types: + - int + output: + - OutStringHex(t, 4) + pattern_command: + command_name: patloop + nGetArgs: 0 + nPutArgs: 2 + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - int + - int + argc: -1 + cast_input: + - false + - false + - false + check_det_id: false + convert_det_id: true + extra_variables: + - name: start + type: int + value: StringTo(args[iArg++]) + - name: stop + type: int + value: StringTo(args[iArg++]) + function: setPatternLoopAddresses + input: + - level + - start + - stop + input_types: + - int + - int + - int + output: + - '''[''' + - ToStringHex(start, 4) + - '", "' + - ToStringHex(stop, 4) + - ''']''' + pattern_command: + command_name: patloop + nGetArgs: 0 + nPutArgs: 2 + require_det_id: true + store_result_in_t: false + command_name: patloop0 + function_alias: patloop0 + help: "\n\tDeprecated command. Use patloop." + infer_action: true +patloop1: + actions: + GET: + args: + - arg_types: + - int + argc: -1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getPatternLoopAddresses + input: + - level + input_types: + - int + output: + - OutStringHex(t, 4) + pattern_command: + command_name: patloop + nGetArgs: 0 + nPutArgs: 2 + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - int + - int + argc: -1 + cast_input: + - false + - false + - false + check_det_id: false + convert_det_id: true + extra_variables: + - name: start + type: int + value: StringTo(args[iArg++]) + - name: stop + type: int + value: StringTo(args[iArg++]) + function: setPatternLoopAddresses + input: + - level + - start + - stop + input_types: + - int + - int + - int + output: + - '''[''' + - ToStringHex(start, 4) + - '", "' + - ToStringHex(stop, 4) + - ''']''' + pattern_command: + command_name: patloop + nGetArgs: 0 + nPutArgs: 2 + require_det_id: true + store_result_in_t: false + command_name: patloop1 + function_alias: patloop1 + help: "\n\tDeprecated command. Use patloop." + infer_action: true +patloop2: + actions: + GET: + args: + - arg_types: + - int + argc: -1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getPatternLoopAddresses + input: + - level + input_types: + - int + output: + - OutStringHex(t, 4) + pattern_command: + command_name: patloop + nGetArgs: 0 + nPutArgs: 2 + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - int + - int + argc: -1 + cast_input: + - false + - false + - false + check_det_id: false + convert_det_id: true + extra_variables: + - name: start + type: int + value: StringTo(args[iArg++]) + - name: stop + type: int + value: StringTo(args[iArg++]) + function: setPatternLoopAddresses + input: + - level + - start + - stop + input_types: + - int + - int + - int + output: + - '''[''' + - ToStringHex(start, 4) + - '", "' + - ToStringHex(stop, 4) + - ''']''' + pattern_command: + command_name: patloop + nGetArgs: 0 + nPutArgs: 2 + require_det_id: true + store_result_in_t: false + command_name: patloop2 + function_alias: patloop2 + help: "\n\tDeprecated command. Use patloop." + infer_action: true +patmask: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getPatternMask + input: [] + input_types: [] + output: + - OutStringHex(t, 16) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - uint64_t + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setPatternMask + input: + - args[0] + input_types: + - uint64_t + output: + - ToStringHex(arg0, 16) + require_det_id: true + store_result_in_t: false + command_name: patmask + function_alias: patmask + help: "[64 bit mask]\n\t[Ctb][Mythen3][Xilinx Ctb] Selects the bits that will have\ + \ a pattern mask applied to the selected patmask for every pattern." + infer_action: true + template: true +patnloop: + actions: + GET: + args: + - arg_types: + - int + argc: -1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getPatternLoopCycles + input: + - level + input_types: + - int + output: + - level + - ''' ''' + - OutString(t) + pattern_command: + command_name: patnloop + nGetArgs: 0 + nPutArgs: 1 + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - int + argc: -1 + cast_input: + - false + - true + check_det_id: false + convert_det_id: true + extra_variables: + - name: nloops + type: std::string + value: args[iArg++] + function: setPatternLoopCycles + input: + - level + - nloops + input_types: + - int + - int + output: + - level + - ''' ''' + - nloops + pattern_command: + command_name: patnloop + nGetArgs: 0 + nPutArgs: 1 + require_det_id: true + store_result_in_t: false + command_name: patnloop + function_alias: patnloop + help: "[0-6] [n_cycles] \n\t[Ctb][Mythen3][Xilinx Ctb] Number of cycles of the loop\ + \ level provided.\n\t[Mythen3] Level options: 0-3 only." + infer_action: true +patnloop0: + actions: + GET: + args: + - arg_types: + - int + argc: -1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getPatternLoopCycles + input: + - level + input_types: + - int + output: + - OutString(t) + pattern_command: + command_name: patnloop + nGetArgs: 0 + nPutArgs: 1 + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - int + argc: -1 + cast_input: + - false + - true + check_det_id: false + convert_det_id: true + extra_variables: + - name: nloops + type: std::string + value: args[iArg++] + function: setPatternLoopCycles + input: + - level + - nloops + input_types: + - int + - int + output: + - nloops + pattern_command: + command_name: patnloop + nGetArgs: 0 + nPutArgs: 1 + require_det_id: true + store_result_in_t: false + command_name: patnloop0 + function_alias: patnloop0 + help: "\n\tDeprecated command. Use patnloop." + infer_action: true +patnloop1: + actions: + GET: + args: + - arg_types: + - int + argc: -1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getPatternLoopCycles + input: + - level + input_types: + - int + output: + - OutString(t) + pattern_command: + command_name: patnloop + nGetArgs: 0 + nPutArgs: 1 + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - int + argc: -1 + cast_input: + - false + - true + check_det_id: false + convert_det_id: true + extra_variables: + - name: nloops + type: std::string + value: args[iArg++] + function: setPatternLoopCycles + input: + - level + - nloops + input_types: + - int + - int + output: + - nloops + pattern_command: + command_name: patnloop + nGetArgs: 0 + nPutArgs: 1 + require_det_id: true + store_result_in_t: false + command_name: patnloop1 + function_alias: patnloop1 + help: "\n\tDeprecated command. Use patnloop." + infer_action: true +patnloop2: + actions: + GET: + args: + - arg_types: + - int + argc: -1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getPatternLoopCycles + input: + - level + input_types: + - int + output: + - OutString(t) + pattern_command: + command_name: patnloop + nGetArgs: 0 + nPutArgs: 1 + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - int + argc: -1 + cast_input: + - false + - true + check_det_id: false + convert_det_id: true + extra_variables: + - name: nloops + type: std::string + value: args[iArg++] + function: setPatternLoopCycles + input: + - level + - nloops + input_types: + - int + - int + output: + - nloops + pattern_command: + command_name: patnloop + nGetArgs: 0 + nPutArgs: 1 + require_det_id: true + store_result_in_t: false + command_name: patnloop2 + function_alias: patnloop2 + help: "\n\tDeprecated command. Use patnloop." + infer_action: true +patsetbit: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getPatternBitMask + input: [] + input_types: [] + output: + - OutStringHex(t, 16) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - uint64_t + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setPatternBitMask + input: + - args[0] + input_types: + - uint64_t + output: + - ToStringHex(arg0, 16) + require_det_id: true + store_result_in_t: false + command_name: patsetbit + function_alias: patsetbit + help: "[64 bit mask]\n\t[Ctb][Mythen3][Xilinx Ctb] Sets the mask applied to every\ + \ pattern to the selected bits." + infer_action: true + template: true +patternX: + actions: + PUT: + args: + - arg_types: + - std::string + argc: 1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: setPattern + input: + - args[0] + input_types: + - std::string + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: pattern + function_alias: pattern + help: "[fname]\n\t[Mythen3][Ctb][Xilinx Ctb] Loads ASCII pattern file directly to\ + \ server (instead of executing line by line)" + infer_action: true +patternstart: + actions: + PUT: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: startPattern + input: [] + input_types: [] + output: + - '"successful"' + require_det_id: true + store_result_in_t: false + command_name: patternstart + function_alias: patternstart + help: "\n\t[Mythen3] Starts Pattern" + infer_action: true + template: true +patwait: + actions: + GET: + args: + - arg_types: + - int + argc: -1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getPatternWaitAddr + input: + - level + input_types: + - int + output: + - level + - ''' ''' + - OutStringHex(t, 4) + pattern_command: + command_name: patwait + nGetArgs: 0 + nPutArgs: 1 + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - int + argc: -1 + cast_input: + - false + - false + check_det_id: false + convert_det_id: true + extra_variables: + - name: addr + type: int + value: StringTo(args[iArg++]) + function: setPatternWaitAddr + input: + - level + - addr + input_types: + - int + - int + output: + - level + - ''' ''' + - ToStringHex(addr, 4) + pattern_command: + command_name: patwait + nGetArgs: 0 + nPutArgs: 1 + require_det_id: true + store_result_in_t: false + command_name: patwait + function_alias: patwait + help: "[0-6] [addr] \n\t[Ctb][Mythen3][Xilinx Ctb] Wait address for loop level provided.\ + \ \n\t[Mythen3] Level options: 0-3 only." + infer_action: true +patwait0: + actions: + GET: + args: + - arg_types: + - int + argc: -1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getPatternWaitAddr + input: + - level + input_types: + - int + output: + - OutStringHex(t, 4) + pattern_command: + command_name: patwait + nGetArgs: 0 + nPutArgs: 1 + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - int + argc: -1 + cast_input: + - false + - false + check_det_id: false + convert_det_id: true + extra_variables: + - name: addr + type: int + value: StringTo(args[iArg++]) + function: setPatternWaitAddr + input: + - level + - addr + input_types: + - int + - int + output: + - ToStringHex(addr, 4) + pattern_command: + command_name: patwait + nGetArgs: 0 + nPutArgs: 1 + require_det_id: true + store_result_in_t: false + command_name: patwait0 + function_alias: patwait0 + help: "\n\tDeprecated command. Use patwait." + infer_action: true +patwait1: + actions: + GET: + args: + - arg_types: + - int + argc: -1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getPatternWaitAddr + input: + - level + input_types: + - int + output: + - OutStringHex(t, 4) + pattern_command: + command_name: patwait + nGetArgs: 0 + nPutArgs: 1 + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - int + argc: -1 + cast_input: + - false + - false + check_det_id: false + convert_det_id: true + extra_variables: + - name: addr + type: int + value: StringTo(args[iArg++]) + function: setPatternWaitAddr + input: + - level + - addr + input_types: + - int + - int + output: + - ToStringHex(addr, 4) + pattern_command: + command_name: patwait + nGetArgs: 0 + nPutArgs: 1 + require_det_id: true + store_result_in_t: false + command_name: patwait1 + function_alias: patwait1 + help: "\n\tDeprecated command. Use patwait." + infer_action: true +patwait2: + actions: + GET: + args: + - arg_types: + - int + argc: -1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getPatternWaitAddr + input: + - level + input_types: + - int + output: + - OutStringHex(t, 4) + pattern_command: + command_name: patwait + nGetArgs: 0 + nPutArgs: 1 + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - int + argc: -1 + cast_input: + - false + - false + check_det_id: false + convert_det_id: true + extra_variables: + - name: addr + type: int + value: StringTo(args[iArg++]) + function: setPatternWaitAddr + input: + - level + - addr + input_types: + - int + - int + output: + - ToStringHex(addr, 4) + pattern_command: + command_name: patwait + nGetArgs: 0 + nPutArgs: 1 + require_det_id: true + store_result_in_t: false + command_name: patwait2 + function_alias: patwait2 + help: "\n\tDeprecated command. Use patwait." + infer_action: true +patwaittime: + actions: + GET: + args: + - arg_types: + - int + argc: -1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getPatternWaitTime + input: + - level + input_types: + - int + output: + - level + - ''' ''' + - OutString(t) + pattern_command: + command_name: patwaittime + nGetArgs: 0 + nPutArgs: 1 + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - int + argc: -1 + cast_input: + - false + - false + check_det_id: false + convert_det_id: true + extra_variables: + - name: waittime + type: uint64_t + value: StringTo(args[iArg++]) + function: setPatternWaitTime + input: + - level + - waittime + input_types: + - int + - int + output: + - level + - ''' ''' + - waittime + pattern_command: + command_name: patwaittime + nGetArgs: 0 + nPutArgs: 1 + require_det_id: true + store_result_in_t: false + command_name: patwaittime + function_alias: patwaittime + help: "[0-6] [n_clk] \n\t[Ctb][Mythen3][Xilinx Ctb] Wait time in clock cycles for\ + \ the loop provided.\n\t[Mythen3] Level options: 0-3 only." + infer_action: true +patwaittime0: + actions: + GET: + args: + - arg_types: + - int + argc: -1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getPatternWaitTime + input: + - level + input_types: + - int + output: + - OutString(t) + pattern_command: + command_name: patwaittime + nGetArgs: 0 + nPutArgs: 1 + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - int + argc: -1 + cast_input: + - false + - false + check_det_id: false + convert_det_id: true + extra_variables: + - name: waittime + type: uint64_t + value: StringTo(args[iArg++]) + function: setPatternWaitTime + input: + - level + - waittime + input_types: + - int + - int + output: + - waittime + pattern_command: + command_name: patwaittime + nGetArgs: 0 + nPutArgs: 1 + require_det_id: true + store_result_in_t: false + command_name: patwaittime0 + function_alias: patwaittime0 + help: "\n\tDeprecated command. Use patwaittime." + infer_action: true +patwaittime1: + actions: + GET: + args: + - arg_types: + - int + argc: -1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getPatternWaitTime + input: + - level + input_types: + - int + output: + - OutString(t) + pattern_command: + command_name: patwaittime + nGetArgs: 0 + nPutArgs: 1 + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - int + argc: -1 + cast_input: + - false + - false + check_det_id: false + convert_det_id: true + extra_variables: + - name: waittime + type: uint64_t + value: StringTo(args[iArg++]) + function: setPatternWaitTime + input: + - level + - waittime + input_types: + - int + - int + output: + - waittime + pattern_command: + command_name: patwaittime + nGetArgs: 0 + nPutArgs: 1 + require_det_id: true + store_result_in_t: false + command_name: patwaittime1 + function_alias: patwaittime1 + help: "\n\tDeprecated command. Use patwaittime." + infer_action: true +patwaittime2: + actions: + GET: + args: + - arg_types: + - int + argc: -1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getPatternWaitTime + input: + - level + input_types: + - int + output: + - OutString(t) + pattern_command: + command_name: patwaittime + nGetArgs: 0 + nPutArgs: 1 + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - int + argc: -1 + cast_input: + - false + - false + check_det_id: false + convert_det_id: true + extra_variables: + - name: waittime + type: uint64_t + value: StringTo(args[iArg++]) + function: setPatternWaitTime + input: + - level + - waittime + input_types: + - int + - int + output: + - waittime + pattern_command: + command_name: patwaittime + nGetArgs: 0 + nPutArgs: 1 + require_det_id: true + store_result_in_t: false + command_name: patwaittime2 + function_alias: patwaittime2 + help: "\n\tDeprecated command. Use patwaittime." + infer_action: true +patword: + actions: + GET: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: getPatternWord + input: + - args[0] + input_types: + - int + output: + - '''[''' + - ToStringHex(arg0, 4) + - '", "' + - OutStringHex(t, 16) + - '"]"' + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - uint64_t + argc: 2 + cast_input: + - true + - true + check_det_id: false + convert_det_id: true + function: setPatternWord + input: + - args[0] + - args[1] + input_types: + - int + - uint64_t + output: + - '''[''' + - ToStringHex(arg0, 4) + - '", "' + - ToStringHex(arg1, 16) + - '"]"' + require_det_id: true + store_result_in_t: false + command_name: patword + function_alias: patword + help: "[step or address] [64 bit mask]\n\t[Ctb][Mythen3][Xilinx Ctb] 64 bit pattern\ + \ at address of pattern memory.\n\t[Ctb] read is same as executing pattern" + infer_action: true +pedestalmode: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getPedestalMode + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - special::pedestal_parameters + argc: 1 + cast_input: + - false + check_det_id: false + convert_det_id: true + exceptions: + - condition: args[0] != "0" + message: '"Unknown argument " + args[0] + ". Did you mean 0 to disable pedestal + mode?"' + function: setPedestalMode + input: + - defs::pedestalParameters() + input_types: + - defs::pedestalParameters + output: + - ToString(args) + require_det_id: false + store_result_in_t: false + - arg_types: + - uint8_t + - uint16_t + argc: 2 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: setPedestalMode + input: + - defs::pedestalParameters(StringTo(args[0]), StringTo(args[1])) + input_types: + - defs::pedestalParameters + output: + - ToString(args) + require_det_id: false + store_result_in_t: false + command_name: pedestalmode + function_alias: pedestalmode + help: " [frames] [loops]\n\t\t[Jungfrau] Enable pedestal mode.\ + \ \n\t\tThe number of frames or triggers is overwritten by: \n\t\t(#pedestal_frames\ + \ x #pedestal_loops x 2). \n\t\tIn auto timing mode or in trigger mode with #frames\ + \ > 1, \n\t\t#frames is overwritten and #triggers = 1, \n\t\telse #triggers is\ + \ overwritten and #frames = 1. \n\t\tOne cannot set #frames, #triggers or timing\ + \ mode in pedestal mode (exception thrown).\n\tpedestalmode [0]\n\t\t[Jungfrau]\ + \ Disable pedestal mode.\n\t\tDisabling pedestal mode will set back the normal\ + \ mode values of #frames and #triggers." + infer_action: true +period: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getPeriod + 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: getPeriod + input: [] + input_types: [] + output: + - OutString(t , args[0]) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - std::string + argc: 1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: setPeriod + input: + - converted_time + input_types: + - time::ns + output: + - args[0] + require_det_id: true + separate_time_units: + input: args[0] + output: + - converted_time + - unit + store_result_in_t: false + - arg_types: + - int + - special::time_unit + argc: 2 + cast_input: + - false + check_det_id: false + convert_det_id: true + convert_to_time: + input: + - args[0] + - args[1] + output: converted_time + function: setPeriod + input: + - converted_time + input_types: + - time::ns + output: + - args[0] + - args[1] + require_det_id: true + store_result_in_t: false + command_name: period + function_alias: period + help: "[duration] [(optional unit) ns|us|ms|s]\n\tPeriod between frames" + infer_action: true + template: true +periodl: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getPeriodLeft + 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: getPeriodLeft + input: [] + input_types: [] + output: + - OutString(t , args[0]) + require_det_id: true + store_result_in_t: true + command_name: periodl + function_alias: periodl + help: "\n\t[Gotthard][Jungfrau][Moench][Ctb][Mythen3][Gotthard2][Xilinx Ctb] Period\ + \ left for current frame. \n\t[Gotthard2] only in continuous mode." + infer_action: true + template: true +polarity: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getPolarity + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - defs::polarity + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setPolarity + input: + - args[0] + input_types: + - defs::polarity + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: polarity + function_alias: polarity + help: "[pos|neg]\n\t[Mythen3] Sets negative or positive polarity. Default is positive" + infer_action: true + template: true +port: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getControlPort + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - uint16_t + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setControlPort + input: + - args[0] + input_types: + - uint16_t + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: port + function_alias: port + help: "[n]\n\tPort number of the control server on detector for detector-client\ + \ tcp interface. Default is 1952. Normally unchanged. Set different ports for\ + \ virtual servers on same pc." + infer_action: true + template: true +powerchip: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getPowerChip + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - bool + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setPowerChip + input: + - args[0] + input_types: + - bool + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: powerchip + function_alias: powerchip + help: "[0, 1]\n\t[Jungfrau][Moench][Mythen3][Gotthard2][Xilinx Ctb] Power the chip.\ + \ \n\t[Jungfrau][Moench] Default is 0. Get will return power status. Can be off\ + \ if temperature event occured (temperature over temp_threshold with temp_control\ + \ enabled. Will configure chip (only chip v1.1)\n\t[Mythen3][Gotthard2] Default\ + \ is 1. If module not connected or wrong module, powerchip will fail.\n\t[Xilinx\ + \ Ctb] Default is 0. Also configures the chip if powered on." + infer_action: true + template: true +powerindex: + actions: + GET: + args: + - arg_types: + - std::string + argc: 1 + cast_input: + - false + check_det_id: true + convert_det_id: true + exceptions: + - condition: det->getDetectorType().squash(defs::GENERIC) != defs::CHIPTESTBOARD + && det->getDetectorType().squash(defs::GENERIC) != defs::XILINX_CHIPTESTBOARD + message: cmd + " only allowed for CTB." + extra_variables: + - name: index + type: defs::dacIndex + value: defs::V_POWER_A + function: getPowerIndex + input: + - args[0] + input_types: + - std::string + output: + - ToString(static_cast(t) - index) + require_det_id: false + store_result_in_t: true + command_name: powerindex + function_alias: powerindex + help: "[name] \n\t\t[Ctb][Xilinx_Ctb] Get the power index for the given name." + infer_action: true + template: true +powerlist: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: true + convert_det_id: true + exceptions: + - condition: cmd != "daclist" && det_type != defs::CHIPTESTBOARD && det_type + != defs::XILINX_CHIPTESTBOARD + message: cmd + " only allowed for CTB." + extra_variables: + - name: det_type + type: auto + value: det->getDetectorType().squash(defs::GENERIC); + function: getPowerNames + input: [] + input_types: [] + output: + - ToString(t) + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: + - std::string + argc: -1 + cast_input: + - false + check_det_id: true + convert_det_id: true + exceptions: + - condition: cmd != "daclist" && det_type != defs::CHIPTESTBOARD && det_type + != defs::XILINX_CHIPTESTBOARD + message: cmd + " only allowed for CTB." + - condition: cmd == "daclist" && det_type != defs::CHIPTESTBOARD && det_type + != defs::XILINX_CHIPTESTBOARD + message: '"This detector already has fixed dac names. Cannot change them."' + extra_variables: + - name: det_type + type: auto + value: det->getDetectorType().squash(defs::GENERIC); + function: setPowerNames + input: + - args + input_types: + - std::string + output: + - ToString(args) + require_det_id: false + store_result_in_t: false + command_name: powerlist + function_alias: powerlist + help: "[powername1 powername2 .. powername4] \n\t\t[Ctb][Xilinx_Ctb] Set the list\ + \ of power names for this board." + infer_action: true + template: true +powername: + actions: + GET: + args: + - arg_types: + - defs::dacIndex + argc: 1 + cast_input: + - false + check_det_id: true + convert_det_id: true + exceptions: + - condition: det->getDetectorType().squash(defs::GENERIC) != defs::CHIPTESTBOARD + && det->getDetectorType().squash(defs::GENERIC) != defs::XILINX_CHIPTESTBOARD + message: cmd + " only allowed for CTB." + extra_variables: + - name: index + type: defs::dacIndex + value: defs::V_POWER_A + function: getPowerName + input: + - static_cast(StringTo(args[0]) + index) + input_types: + - defs::dacIndex + output: + - args[0] + - ''' ''' + - t + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: + - defs::dacIndex + - std::string + argc: 2 + cast_input: + - false + - false + check_det_id: true + convert_det_id: true + exceptions: + - condition: det->getDetectorType().squash(defs::GENERIC) != defs::CHIPTESTBOARD + && det->getDetectorType().squash(defs::GENERIC) != defs::XILINX_CHIPTESTBOARD + message: cmd + " only allowed for CTB." + extra_variables: + - name: index + type: defs::dacIndex + value: defs::V_POWER_A + function: setPowerName + input: + - static_cast(StringTo(args[0]) + index) + - args[1] + input_types: + - defs::dacIndex + - std::string + output: + - ToString(args) + require_det_id: false + store_result_in_t: false + command_name: powername + function_alias: powername + help: "[0-4][name] \n\t\t[Ctb][Xilinx_Ctb] Set the power at the given position to\ + \ the given name." + infer_action: true + template: true +powervalues: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + ctb_output_list: + GETFCN: getPower + GETFCNLIST: getPowerList + GETFCNNAME: getPowerNames + printable_name: '*name_it++' + suffix: mV + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: true + command_name: powervalues + function_alias: powervalues + help: "[name] \n\t\t[Ctb][Xilinx_Ctb] Get values of all powers." + infer_action: true +programfpga: + actions: + PUT: + args: + - arg_types: + - special::path + argc: 1 + cast_input: + - false + - true + check_det_id: false + convert_det_id: true + function: programFPGA + input: + - args[0] + - '"0"' + input_types: + - std::string + - bool + output: + - '"successful"' + require_det_id: true + store_result_in_t: false + - arg_types: + - special::path + - special::force-delete-normal-file + argc: 2 + cast_input: + - false + - true + check_det_id: false + convert_det_id: true + exceptions: + - condition: args[1] != "--force-delete-normal-file" + message: '"Could not scan second argument. Did you mean --force-delete-normal-file?"' + function: programFPGA + input: + - args[0] + - '"1"' + input_types: + - std::string + - bool + output: + - '"successful"' + require_det_id: true + store_result_in_t: false + command_name: programfpga + function_alias: programfpga + help: "[fname.pof | fname.rbf (full path)][(opitonal)--force-delete-normal-file]\n\ + \t[Jungfrau][Moench][Ctb] Programs FPGA from pof file (full path). Then, detector\ + \ controller is rebooted. \n\t\tUse --force-delete-normal-file argument, if normal\ + \ file found in device tree, it must be deleted, a new device drive created and\ + \ programming continued.\n\t[Mythen3][Gotthard2] Programs FPGA from rbf file (full\ + \ path). Then, detector controller is rebooted." + infer_action: true +pulse: + actions: + PUT: + args: + - arg_types: + - int + - int + - int + argc: 3 + cast_input: + - true + - false + check_det_id: false + convert_det_id: true + extra_variables: + - name: c + type: defs::xy + value: defs::xy(StringTo(args[1]), StringTo(args[2])) + function: pulsePixel + input: + - args[0] + - c + input_types: + - int + - defs::xy + output: + - ToString(args) + require_det_id: true + store_result_in_t: false + command_name: pulse + function_alias: pulse + help: "[n_times] [x] [y]\n\t[Eiger] Pulse pixel n number of times at coordinates\ + \ (x, y). Advanced User!" + infer_action: true + template: true +pulsechip: + actions: + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: pulseChip + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: pulsechip + function_alias: pulsechip + help: "[n_times] \n\t[Eiger] Pulse chip n times. If n is -1, resets to normal mode\ + \ (reset chip completely at start of acquisition, where partialreset = 0). Advanced\ + \ User!" + infer_action: true +pulsenmove: + actions: + PUT: + args: + - arg_types: + - int + - int + - int + argc: 3 + cast_input: + - true + - false + check_det_id: false + convert_det_id: true + extra_variables: + - name: c + type: defs::xy + value: defs::xy(StringTo(args[1]), StringTo(args[2])) + function: pulsePixelNMove + input: + - args[0] + - c + input_types: + - int + - defs::xy + output: + - ToString(args) + require_det_id: true + store_result_in_t: false + command_name: pulsenmove + function_alias: pulsenmove + help: "[n_times] [x] [y]\n\t[Eiger] Pulse pixel n number of times and moves relatively\ + \ by (x, y). Advanced User!" + infer_action: true + template: true +pumpprobe: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getPumpProbe + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - bool + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setPumpProbe + input: + - args[0] + input_types: + - bool + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: pumpprobe + function_alias: pumpprobe + help: "[0, 1]\n\t[Mythen3] Enables or disables pump probe mode. Default is disabled.\ + \ Pump probe mode only enables vth2. Disabling sets back to previous value." + infer_action: true + template: true +quad: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getQuad + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - bool + argc: 1 + cast_input: + - true + check_det_id: true + convert_det_id: true + function: setQuad + input: + - args[0] + input_types: + - bool + output: + - args.front() + require_det_id: false + store_result_in_t: false + command_name: quad + function_alias: quad + help: "[0, 1]\n\t[Eiger] Sets detector size to a quad. 0 (disabled) is default.\ + \ (Specific hardware required)." + infer_action: true +ratecorr: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: false + command_name: ratecorr + function_alias: ratecorr + help: '' + infer_action: true + is_description: true +readnrows: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getReadNRows + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setReadNRows + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: readnrows + function_alias: readnrows + help: "\n\t[1-256]\n\t\t[Eiger] Number of rows to readout per half module starting\ + \ from the centre. Options: 0 - 256. 256 is default. The permissible values depend\ + \ on dynamic range and 10Gbe enabled.\n\t[8-512 (multiple of 8)]\n\t\t[Jungfrau]\ + \ Number of rows per module starting from the centre. Options: 8 - 512, must be\ + \ multiples of 8. Default is 512.\n\t\t[Moench] Number of rows per module starting\ + \ from the centre. Options:16 - 400, must be multiples of 16. Default is 400." + infer_action: true + template: true +readout: + actions: + PUT: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: true + convert_det_id: true + function: startDetectorReadout + input: [] + input_types: [] + output: + - '"successful"' + require_det_id: false + store_result_in_t: false + command_name: readout + function_alias: readout + help: "\n\t[Mythen3] Starts detector readout. Status changes to TRANSMITTING and\ + \ automatically returns to idle at the end of readout." + infer_action: true + template: true +readoutspeed: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + exceptions: + - condition: det_type == defs::CHIPTESTBOARD || det_type == defs::XILINX_CHIPTESTBOARD + message: '"ReadoutSpeed not implemented. Did you mean runclk?"' + extra_variables: + - name: det_type + type: auto + value: det->getDetectorType().squash(defs::GENERIC); + function: getReadoutSpeed + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - defs::speedLevel + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + exceptions: + - condition: det_type == defs::CHIPTESTBOARD || det_type == defs::XILINX_CHIPTESTBOARD + message: '"ReadoutSpeed not implemented. Did you mean runclk?"' + extra_variables: + - name: det_type + type: auto + value: det->getDetectorType().squash(defs::GENERIC); + function: setReadoutSpeed + input: + - args[0] + input_types: + - defs::speedLevel + output: + - ToString(StringTo(args[0])) + require_det_id: true + store_result_in_t: false + command_name: readoutspeed + function_alias: readoutspeed + help: "\n\t[0 or full_speed|1 or half_speed|2 or quarter_speed]\n\t[Eiger][Jungfrau][Moench][Mythen3]\ + \ Readout speed of chip.\n\t[Eiger][Moench] Default speed is full_speed.\n\t[Jungfrau][Mythen3]\ + \ Default speed is half_speed. \n\t[Jungfrau] full_speed option only available\ + \ from v2.0 boards and is recommended to set number of interfaces to 2. Also overwrites\ + \ adcphase to recommended default.\n\t [144|108]\n\t\t[Gotthard2] Readout speed\ + \ of chip in MHz. Default is 108." + infer_action: true +readoutspeedlist: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getReadoutSpeedList + input: [] + input_types: [] + output: + - ToString(t) + require_det_id: false + store_result_in_t: true + command_name: readoutspeedlist + function_alias: readoutspeedlist + help: "\n\tList of readout speed levels implemented for this detector." + infer_action: true + template: true +rebootcontroller: + actions: + PUT: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: rebootController + input: [] + input_types: [] + output: + - '"successful"' + require_det_id: true + store_result_in_t: false + command_name: rebootcontroller + function_alias: rebootcontroller + help: "\n\t[Jungfrau][Moench][Ctb][Gotthard][Mythen3][Gotthard2][Xilinx Ctb] Reboot\ + \ controller of detector." + infer_action: true + template: true +reg: + actions: + GET: + args: + - arg_types: + - uint32_t + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: readRegister + input: + - args[0] + input_types: + - uint32_t + output: + - OutStringHex(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - uint32_t + - uint32_t + argc: 2 + cast_input: + - true + - true + - true + check_det_id: false + convert_det_id: true + function: writeRegister + input: + - args[0] + - args[1] + - '"0"' + input_types: + - uint32_t + - uint32_t + - bool + output: + - '"["' + - args[0] + - '", "' + - args[1] + - '"]"' + require_det_id: true + store_result_in_t: false + - arg_types: + - uint32_t + - uint32_t + - special::validate + argc: 3 + cast_input: + - true + - true + - true + check_det_id: false + convert_det_id: true + exceptions: + - condition: args[2] != "--validate" + message: '"Could not scan third argument. Did you mean --validate?"' + function: writeRegister + input: + - args[0] + - args[1] + - '"1"' + input_types: + - uint32_t + - uint32_t + - bool + output: + - '"["' + - args[0] + - '", "' + - args[1] + - '"]"' + require_det_id: true + store_result_in_t: false + command_name: reg + function_alias: reg + help: "[address] [32 bit value][(optional)--validate]\n\t[Mythen3][Gotthard2] Reads/writes\ + \ to a 32 bit register in hex. Advanced Function!\n\tGoes to stop server. Hence,\ + \ can be called while calling blocking acquire().\n\t\t Use --validate to force\ + \ validation when writing to it.\n\t[Eiger] +0x100 for only left, +0x200 for only\ + \ right." + infer_action: true +resetdacs: + actions: + PUT: + args: + - arg_types: + - special::hard + argc: 1 + cast_input: + - false + check_det_id: false + convert_det_id: true + exceptions: + - condition: args[0] != "hard" + message: '"Unknown argument " + args[0] + ". Did you mean hard?"' + function: resetToDefaultDacs + input: + - '"1"' + input_types: + - bool + output: + - '"successful"' + require_det_id: true + store_result_in_t: false + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: resetToDefaultDacs + input: + - '"0"' + input_types: + - bool + output: + - '"successful"' + require_det_id: true + store_result_in_t: false + command_name: resetdacs + function_alias: 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." + infer_action: true +resetfpga: + actions: + PUT: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: resetFPGA + input: [] + input_types: [] + output: + - '"successful"' + require_det_id: true + store_result_in_t: false + command_name: resetfpga + function_alias: resetfpga + help: "\n\t[Jungfrau][Moench][Ctb][Xilinx Ctb] Reset FPGA." + infer_action: 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(args[0]), StringTo(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: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getReadoutMode + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - defs::readoutMode + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setReadoutMode + input: + - args[0] + input_types: + - defs::readoutMode + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: romode + function_alias: romode + help: "[analog|digital|analog_digital|transceiver|digital_transceiver]\n\t[Ctb][xilinx\ + \ Ctb] Readout mode. [Ctb] Default is analog. [Xilinx Ctb] Default is Transceiver\ + \ (only one implemented so far)" + infer_action: true + template: true +row: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getRow + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setRow + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: row + function_alias: row + help: "[value]\n\tSet Detector row (udp header) to value. \n\tGui uses it to rearrange\ + \ for complete image" + infer_action: true + template: true +runclk: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getRUNClock + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setRUNClock + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: runclk + function_alias: runclk + help: "[n_clk in MHz]\n\t[Ctb] Run clock in MHz." + infer_action: true + template: true +runtime: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getActualTime + 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: getActualTime + input: [] + input_types: [] + output: + - OutString(t , args[0]) + require_det_id: true + store_result_in_t: true + command_name: runtime + function_alias: 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." + infer_action: true + template: true +rx_arping: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getRxArping + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - bool + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setRxArping + input: + - args[0] + input_types: + - bool + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: rx_arping + function_alias: rx_arping + help: "[0, 1]\n\tStarts a thread in slsReceiver to arping the interface it is listening\ + \ to every minute. Useful in 10G mode." + infer_action: true + template: true +rx_clearroi: + actions: + PUT: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: true + convert_det_id: true + function: clearRxROI + input: [] + input_types: [] + output: + - '"successful"' + require_det_id: false + store_result_in_t: false + command_name: rx_clearroi + function_alias: rx_clearroi + help: "\n\tResets Region of interest in receiver. Default is all channels/pixels\ + \ enabled." + infer_action: true + template: true +rx_dbitlist: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: [] + argc: -1 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: false + command_name: rx_dbitlist + function_alias: rx_dbitlist + help: '' + infer_action: true + is_description: true +rx_dbitoffset: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getRxDbitOffset + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setRxDbitOffset + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: rx_dbitoffset + function_alias: rx_dbitoffset + help: "[n_bytes]\n\t[Ctb] Offset in bytes in digital data to skip in receiver." + infer_action: true + template: true +rx_discardpolicy: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getRxFrameDiscardPolicy + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - defs::frameDiscardPolicy + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setRxFrameDiscardPolicy + input: + - args[0] + input_types: + - defs::frameDiscardPolicy + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: rx_discardpolicy + function_alias: rx_discardpolicy + help: "[nodiscard (default)|discardempty|discardpartial(fastest)]\n\tFrame discard\ + \ policy of receiver. nodiscard does not discard frames, discardempty discards\ + \ empty frames, discardpartial discards partial frames." + infer_action: true + template: true +rx_fifodepth: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getRxFifoDepth + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setRxFifoDepth + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: rx_fifodepth + function_alias: rx_fifodepth + help: "[n_frames]\n\tSet the number of frames in the receiver fifo depth (buffer\ + \ between listener and writer threads)." + infer_action: true + template: true +rx_frameindex: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getRxCurrentFrameIndex + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: rx_frameindex + function_alias: rx_frameindex + help: "\n\tCurrent frame index received for each port in receiver during acquisition." + infer_action: true + template: true +rx_framescaught: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getFramesCaught + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: rx_framescaught + function_alias: rx_framescaught + help: "\n\tNumber of frames caught by each port in receiver." + infer_action: true + template: true +rx_framesperfile: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getFramesPerFile + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setFramesPerFile + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: rx_framesperfile + function_alias: rx_framesperfile + help: "[n_frames]\n\tNumber of frames per file in receiver in an acquisition. Default\ + \ depends on detector type. 0 is infinite or all frames in single file." + infer_action: true + template: true +rx_hostname: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: [] + argc: -1 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: false + command_name: rx_hostname + function_alias: rx_hostname + help: '' + infer_action: true + is_description: true +rx_jsonaddheader: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: [] + argc: -1 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: false + command_name: rx_jsonaddheader + function_alias: rx_jsonaddheader + help: '' + infer_action: true + is_description: true +rx_jsonpara: + actions: + GET: + args: + - arg_types: + - std::string + argc: 1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getAdditionalJsonParameter + input: + - args[0] + input_types: + - std::string + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - std::string + argc: 1 + cast_input: + - false + - false + check_det_id: false + convert_det_id: true + function: setAdditionalJsonParameter + input: + - args[0] + - '""' + input_types: + - std::string + - std::string + output: + - args[0] + - '" deleted"' + require_det_id: true + store_result_in_t: false + - arg_types: + - std::string + - std::string + argc: 2 + cast_input: + - false + - false + check_det_id: false + convert_det_id: true + function: setAdditionalJsonParameter + input: + - args[0] + - args[1] + input_types: + - std::string + - std::string + output: + - '"{"' + - args[0] + - '": "' + - args[1] + - '"}"' + require_det_id: true + store_result_in_t: false + command_name: rx_jsonpara + function_alias: rx_jsonpara + help: "[key1] [value1]\n\t[Receiver] Additional json header parameter streamed out\ + \ from receiver. If not found in header, the pair is appended. An empty values\ + \ deletes parameter. Max 20 characters for each key/value." + infer_action: true +rx_lastclient: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getRxLastClientIP + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: rx_lastclient + function_alias: rx_lastclient + help: "\n\tClient IP Address that last communicated with the receiver." + infer_action: true + template: true +rx_lock: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getRxLock + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - bool + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setRxLock + input: + - args[0] + input_types: + - bool + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: rx_lock + function_alias: rx_lock + help: "[0, 1]\n\tLock receiver to one client IP, 1 locks, 0 unlocks. Default is\ + \ unlocked." + infer_action: true + template: true +rx_missingpackets: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getNumMissingPackets + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: rx_missingpackets + function_alias: rx_missingpackets + help: "\n\tNumber of missing packets for receiver. If negative, they are packets\ + \ in excess." + infer_action: true + template: true +rx_padding: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getPartialFramesPadding + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - bool + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setPartialFramesPadding + input: + - args[0] + input_types: + - bool + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: rx_padding + function_alias: rx_padding + help: "[0, 1]\n\tPartial frames padding enable in the receiver. Default: enabled.\ + \ Disabling is fastest." + infer_action: true + template: true +rx_printconfig: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: printRxConfiguration + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: rx_printconfig + function_alias: rx_printconfig + help: "\n\tPrints the receiver configuration." + infer_action: true + template: true +rx_realudpsocksize: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getRxRealUDPSocketBufferSize + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: rx_realudpsocksize + function_alias: rx_realudpsocksize + help: "\n\tActual udp socket buffer size. Double the size of rx_udpsocksize due\ + \ to kernel bookkeeping." + infer_action: true + template: true +rx_roi: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - int + argc: 2 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: false + - arg_types: + - int + - int + - int + - int + argc: 4 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: false + command_name: rx_roi + function_alias: rx_roi + help: '' + infer_action: true + is_description: true +rx_silent: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getRxSilentMode + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - bool + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setRxSilentMode + input: + - args[0] + input_types: + - bool + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: rx_silent + function_alias: rx_silent + help: "[0, 1]\n\tSwitch on or off receiver text output during acquisition." + infer_action: true + template: true +rx_start: + actions: + PUT: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: true + convert_det_id: true + function: startReceiver + input: [] + input_types: [] + output: + - '"successful"' + require_det_id: false + store_result_in_t: false + command_name: rx_start + function_alias: rx_start + help: "\n\tStarts receiver listener for detector data packets and create a data\ + \ file (if file write enabled)." + infer_action: true + template: true +rx_status: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getReceiverStatus + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: [] + argc: -1 + cast_input: [] + check_det_id: false + convert_det_id: true + exceptions: + - condition: 'true' + message: '"Cannot put. Did you mean to use command: \"rx_start\" or \"rx_stop\"?"' + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: false + command_name: rx_status + function_alias: rx_status + help: "[running, idle, transmitting]\n\tReceiver listener status." + infer_action: true +rx_stop: + actions: + PUT: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: true + convert_det_id: true + function: stopReceiver + input: [] + input_types: [] + output: + - '"successful"' + require_det_id: false + store_result_in_t: false + command_name: rx_stop + function_alias: rx_stop + help: "\n\tStops receiver listener for detector data packets and closes current\ + \ data file (if file write enabled)." + infer_action: true + template: true +rx_tcpport: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getRxPort + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - uint16_t + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: false + function: setRxPort + input: + - args[0] + input_types: + - uint16_t + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: rx_tcpport + function_alias: rx_tcpport + help: "[port]\n\tTCP port for client-receiver communication. Default is 1954. Must\ + \ be different if multiple receivers on same pc. Must be first command to set\ + \ a receiver parameter. Multi command will automatically increment for individual\ + \ modules." + infer_action: true + template: true +rx_threads: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getRxThreadIds + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: rx_threads + function_alias: rx_threads + help: "\n\tGet kernel thread ids from the receiver in order of [parent, tcp, listener\ + \ 0, processor 0, streamer 0, listener 1, processor 1, streamer 1, arping]. If\ + \ no streamer yet or there is no second interface, it gives 0 in its place." + infer_action: true + template: true +rx_udpsocksize: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getRxUDPSocketBufferSize + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setRxUDPSocketBufferSize + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: rx_udpsocksize + function_alias: rx_udpsocksize + help: "[n_size]\n\tUDP socket buffer size in receiver. Tune rmem_default and rmem_max\ + \ accordingly. Max value is INT_MAX/2." + infer_action: true + template: true +rx_version: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getReceiverVersion + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: rx_version + function_alias: rx_version + help: "\n\tReceiver version" + infer_action: true + template: true +rx_zmqfreq: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getRxZmqFrequency + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setRxZmqFrequency + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: rx_zmqfreq + function_alias: rx_zmqfreq + help: "[nth frame]\n\tFrequency of frames streamed out from receiver via zmq\n\t\ + Default: 1, Means every frame is streamed out. \n\tIf 2, every second frame is\ + \ streamed out. \n\tIf 0, streaming timer is the timeout, after which current\ + \ frame is sent out. (default timeout is 500 ms). Usually used for gui purposes." + infer_action: true + template: true +rx_zmqhwm: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getRxZmqHwm + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: true + convert_det_id: true + function: setRxZmqHwm + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: false + store_result_in_t: false + command_name: rx_zmqhwm + function_alias: rx_zmqhwm + help: "[n_value]\n\tReceiver's zmq send high water mark. Default is the zmq library's\ + \ default (1000). This is a high number and can be set to 2 for gui purposes.\ + \ One must also set the client's receive high water mark to similar value. Final\ + \ effect is sum of them. Also restarts receiver zmq streaming if enabled. Can\ + \ set to -1 to set default value." + infer_action: true + template: true +rx_zmqip: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: [] + argc: -1 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: false + command_name: rx_zmqip + function_alias: rx_zmqip + help: '' + infer_action: true + is_description: true +rx_zmqport: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getRxZmqPort + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - uint16_t + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: false + function: setRxZmqPort + input: + - args[0] + input_types: + - uint16_t + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: rx_zmqport + function_alias: rx_zmqport + help: "[port]\n\tZmq port for data to be streamed out of the receiver. Also restarts\ + \ receiver zmq streaming if enabled. Default is 30001. Modified only when using\ + \ an intermediate process between receiver and client(gui). Must be different\ + \ for every detector (and udp port). Multi command will automatically increment\ + \ for individual modules." + infer_action: true + template: true +rx_zmqstartfnum: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getRxZmqStartingFrame + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setRxZmqStartingFrame + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: rx_zmqstartfnum + function_alias: rx_zmqstartfnum + help: "[fnum]\n\tThe starting frame index to stream out. 0 by default, which streams\ + \ the first frame in an acquisition, and then depending on the rx zmq frequency/\ + \ timer" + infer_action: true + template: true +rx_zmqstream: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getRxZmqDataStream + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - bool + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setRxZmqDataStream + input: + - args[0] + input_types: + - bool + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: rx_zmqstream + function_alias: rx_zmqstream + help: "[0, 1]\n\tEnable/ disable data streaming from receiver via zmq (eg. to GUI\ + \ or to another process for further processing). This creates/ destroys zmq streamer\ + \ threads in receiver. \n\tSwitching to Gui automatically enables data streaming\ + \ in receiver. \n\tSwitching back to command line acquire will require disabling\ + \ data streaming in receiver for fast applications. " + infer_action: true + template: true +samples: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: false + command_name: samples + function_alias: samples + help: '' + infer_action: true + is_description: true +savepattern: + actions: + PUT: + args: + - arg_types: + - special::path + argc: 1 + cast_input: + - false + check_det_id: true + convert_det_id: true + function: savePattern + input: + - args[0] + input_types: + - std::string + output: + - args.front() + require_det_id: false + store_result_in_t: false + command_name: savepattern + function_alias: savepattern + help: "\n\t[Ctb][Mythen3][Xilinx Ctb] Saves pattern to file (ascii). \n\t[Ctb] Also\ + \ executes pattern." + infer_action: true + template: true +scan: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getScan + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - false + check_det_id: true + convert_det_id: true + exceptions: + - condition: StringTo(args[0]) != 0 + message: '"Unknown argument " + args[0] + ". Did you mean 0 to disable scan?"' + function: setScan + input: + - defs::scanParameters() + input_types: + - auto + output: + - ToString(args) + require_det_id: false + store_result_in_t: false + - arg_types: + - defs::dacIndex + - int + - int + - int + argc: 4 + cast_input: + - false + check_det_id: true + convert_det_id: true + function: setScan + input: + - defs::scanParameters(StringTo(args[0]), StringTo(args[1]), + StringTo(args[2]), StringTo(args[3])) + input_types: + - auto + output: + - ToString(args) + require_det_id: false + store_result_in_t: false + - arg_types: + - defs::dacIndex + - int + - int + - int + - std::string + argc: 5 + cast_input: + - false + check_det_id: true + convert_det_id: true + function: setScan + input: + - defs::scanParameters(StringTo(args[0]), StringTo(args[1]), + StringTo(args[2]), StringTo(args[3]), t) + input_types: + - auto + output: + - ToString(args) + require_det_id: false + separate_time_units: + input: args[4] + output: + - t + - unit + store_result_in_t: false + command_name: scan + function_alias: scan + help: "[dac_name|0|trimbits] [start_val] [stop_val] [step_size] [dac settling time\ + \ ns|us|ms|s]\n\tEnables/ disables scans for dac and trimbits \n\tEnabling scan\ + \ sets number of frames to number of steps in receiver. \n\tTo cancel scan configuration,\ + \ set dac to '0', which also sets number of frames to 1. \n\t[Eiger][Mythen3]\ + \ Use trimbits as dac name for a trimbit scan." + infer_action: true +scanerrmsg: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getScanErrorMessage + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: scanerrmsg + function_alias: scanerrmsg + help: "\n\tGets Scan error message if scan ended in error for non blocking acquisitions." + infer_action: true + template: true +selinterface: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getSelectedUDPInterface + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - bool + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: selectUDPInterface + input: + - args[0] + input_types: + - bool + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: selinterface + function_alias: selinterface + help: "[0, 1]\n\t[Jungfrau][Moench] The udp interface to stream data from detector.\ + \ Effective only when number of interfaces is 1. Default: 0 (outer)" + infer_action: true + template: true +serialnumber: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getSerialNumber + input: [] + input_types: [] + output: + - OutStringHex(t) + require_det_id: true + store_result_in_t: true + command_name: serialnumber + function_alias: serialnumber + help: "\n\t[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb]\n\tSerial number\ + \ of detector." + infer_action: true + template: true +setbit: + actions: + PUT: + args: + - arg_types: + - uint32_t + - int + argc: 2 + cast_input: + - true + - true + - true + check_det_id: false + convert_det_id: true + exceptions: + - condition: StringTo(args[1]) < 0 || StringTo(args[1]) > 31 + message: '"Bit number out of range: " + args[1]' + function: setBit + input: + - args[0] + - args[1] + - '"0"' + input_types: + - uint32_t + - int + - bool + output: + - '"["' + - args[0] + - '", "' + - args[1] + - '"]"' + require_det_id: true + store_result_in_t: false + - arg_types: + - uint32_t + - int + - special::validate + argc: 3 + cast_input: + - true + - true + - true + check_det_id: false + convert_det_id: true + exceptions: + - condition: StringTo(args[1]) < 0 || StringTo(args[1]) > 31 + message: '"Bit number out of range: " + args[1]' + - condition: args[2] != "--validate" + message: '"Could not scan third argument. Did you mean --validate?"' + function: setBit + input: + - args[0] + - args[1] + - '"1"' + input_types: + - uint32_t + - int + - bool + output: + - '"["' + - args[0] + - '", "' + - args[1] + - '"]"' + require_det_id: true + store_result_in_t: false + command_name: setbit + function_alias: setbit + help: "[reg address in hex] [bit index]\n\tSets bit in address.\n\tUse --validate\ + \ to force validation." + infer_action: true + template: true +settings: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getSettings + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - defs::detectorSettings + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setSettings + input: + - args[0] + input_types: + - defs::detectorSettings + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: settings + function_alias: 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]" + infer_action: true + template: true +settingslist: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getSettingsList + input: [] + input_types: [] + output: + - ToString(t) + require_det_id: false + store_result_in_t: true + command_name: settingslist + function_alias: settingslist + help: "\n\tList of settings implemented for this detector." + infer_action: true + template: true +settingspath: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getSettingsPath + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - special::path + argc: 1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: setSettingsPath + input: + - args[0] + input_types: + - std::string + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: settingspath + function_alias: settingspath + help: "[path]\n\t[Eiger][Mythen3] Directory where settings files are loaded from/to." + infer_action: true + template: true +signalindex: + actions: + GET: + args: + - arg_types: + - std::string + argc: 1 + cast_input: + - false + check_det_id: true + convert_det_id: true + exceptions: + - condition: det->getDetectorType().squash(defs::GENERIC) != defs::CHIPTESTBOARD + && det->getDetectorType().squash(defs::GENERIC) != defs::XILINX_CHIPTESTBOARD + message: cmd + " only allowed for CTB." + function: getSignalIndex + input: + - args[0] + input_types: + - std::string + output: + - static_cast(t) + require_det_id: false + store_result_in_t: true + command_name: signalindex + function_alias: signalindex + help: "[name] \n\t\t[Ctb][Xilinx_Ctb] Get the signal index for the given name." + infer_action: true + template: true +signallist: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: true + convert_det_id: true + exceptions: + - condition: cmd != "daclist" && det_type != defs::CHIPTESTBOARD && det_type + != defs::XILINX_CHIPTESTBOARD + message: cmd + " only allowed for CTB." + extra_variables: + - name: det_type + type: auto + value: det->getDetectorType().squash(defs::GENERIC); + function: getSignalNames + input: [] + input_types: [] + output: + - ToString(t) + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: + - std::string + argc: -1 + cast_input: + - false + check_det_id: true + convert_det_id: true + exceptions: + - condition: cmd != "daclist" && det_type != defs::CHIPTESTBOARD && det_type + != defs::XILINX_CHIPTESTBOARD + message: cmd + " only allowed for CTB." + - condition: cmd == "daclist" && det_type != defs::CHIPTESTBOARD && det_type + != defs::XILINX_CHIPTESTBOARD + message: '"This detector already has fixed dac names. Cannot change them."' + extra_variables: + - name: det_type + type: auto + value: det->getDetectorType().squash(defs::GENERIC); + function: setSignalNames + input: + - args + input_types: + - std::string + output: + - ToString(args) + require_det_id: false + store_result_in_t: false + command_name: signallist + function_alias: signallist + help: "[signalname1 signalname2 .. signalname63] \n\t\t[Ctb][Xilinx_Ctb] Set the\ + \ list of signal names for this board." + infer_action: true + template: true +signalname: + actions: + GET: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: true + convert_det_id: true + exceptions: + - condition: det->getDetectorType().squash(defs::GENERIC) != defs::CHIPTESTBOARD + && det->getDetectorType().squash(defs::GENERIC) != defs::XILINX_CHIPTESTBOARD + message: cmd + " only allowed for CTB." + function: getSignalName + input: + - args[0] + input_types: + - int + output: + - args[0] + - ''' ''' + - t + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - std::string + argc: 2 + cast_input: + - true + - false + check_det_id: true + convert_det_id: true + exceptions: + - condition: det->getDetectorType().squash(defs::GENERIC) != defs::CHIPTESTBOARD + && det->getDetectorType().squash(defs::GENERIC) != defs::XILINX_CHIPTESTBOARD + message: cmd + " only allowed for CTB." + function: setSignalName + input: + - args[0] + - args[1] + input_types: + - int + - std::string + output: + - ToString(args) + require_det_id: false + store_result_in_t: false + command_name: signalname + function_alias: signalname + help: "[0-63][name] \n\t\t[Ctb][Xilinx_Ctb] Set the signal at the given position\ + \ to the given name." + infer_action: true + template: true +sleep: + actions: + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: false + - arg_types: + - int + - special::time_unit + argc: 2 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: false + command_name: sleep + function_alias: sleep + help: '' + infer_action: true + is_description: true +slowadc: + actions: + GET: + args: + - arg_types: + - int + argc: 1 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: true + command_name: slowadc + function_alias: slowadc + help: '' + infer_action: true + is_description: true +slowadcindex: + actions: + GET: + args: + - arg_types: + - std::string + argc: 1 + cast_input: + - false + check_det_id: true + convert_det_id: true + exceptions: + - condition: det->getDetectorType().squash(defs::GENERIC) != defs::CHIPTESTBOARD + && det->getDetectorType().squash(defs::GENERIC) != defs::XILINX_CHIPTESTBOARD + message: cmd + " only allowed for CTB." + extra_variables: + - name: index + type: defs::dacIndex + value: defs::SLOW_ADC0 + function: getSlowADCIndex + input: + - args[0] + input_types: + - std::string + output: + - ToString(static_cast(t) - index) + require_det_id: false + store_result_in_t: true + command_name: slowadcindex + function_alias: slowadcindex + help: "[name] \n\t\t[Ctb][Xilinx_Ctb] Get the slowadc index for the given name." + infer_action: true + template: true +slowadclist: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: true + convert_det_id: true + exceptions: + - condition: cmd != "daclist" && det_type != defs::CHIPTESTBOARD && det_type + != defs::XILINX_CHIPTESTBOARD + message: cmd + " only allowed for CTB." + extra_variables: + - name: det_type + type: auto + value: det->getDetectorType().squash(defs::GENERIC); + function: getSlowADCNames + input: [] + input_types: [] + output: + - ToString(t) + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: + - std::string + argc: -1 + cast_input: + - false + check_det_id: true + convert_det_id: true + exceptions: + - condition: cmd != "daclist" && det_type != defs::CHIPTESTBOARD && det_type + != defs::XILINX_CHIPTESTBOARD + message: cmd + " only allowed for CTB." + - condition: cmd == "daclist" && det_type != defs::CHIPTESTBOARD && det_type + != defs::XILINX_CHIPTESTBOARD + message: '"This detector already has fixed dac names. Cannot change them."' + extra_variables: + - name: det_type + type: auto + value: det->getDetectorType().squash(defs::GENERIC); + function: setSlowADCNames + input: + - args + input_types: + - std::string + output: + - ToString(args) + require_det_id: false + store_result_in_t: false + command_name: slowadclist + function_alias: slowadclist + help: "[slowadcname1 slowadcname2 .. slowadcname7] \n\t\t[Ctb][Xilinx_Ctb] Set the\ + \ list of slowadc names for this board." + infer_action: true + template: true +slowadcname: + actions: + GET: + args: + - arg_types: + - defs::dacIndex + argc: 1 + cast_input: + - false + check_det_id: true + convert_det_id: true + exceptions: + - condition: det->getDetectorType().squash(defs::GENERIC) != defs::CHIPTESTBOARD + && det->getDetectorType().squash(defs::GENERIC) != defs::XILINX_CHIPTESTBOARD + message: cmd + " only allowed for CTB." + extra_variables: + - name: index + type: defs::dacIndex + value: defs::SLOW_ADC0 + function: getSlowADCName + input: + - static_cast(StringTo(args[0]) + index) + input_types: + - defs::dacIndex + output: + - args[0] + - ''' ''' + - t + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: + - defs::dacIndex + - std::string + argc: 2 + cast_input: + - false + - false + check_det_id: true + convert_det_id: true + exceptions: + - condition: det->getDetectorType().squash(defs::GENERIC) != defs::CHIPTESTBOARD + && det->getDetectorType().squash(defs::GENERIC) != defs::XILINX_CHIPTESTBOARD + message: cmd + " only allowed for CTB." + extra_variables: + - name: index + type: defs::dacIndex + value: defs::SLOW_ADC0 + function: setSlowADCName + input: + - static_cast(StringTo(args[0]) + index) + - args[1] + input_types: + - defs::dacIndex + - std::string + output: + - ToString(args) + require_det_id: false + store_result_in_t: false + command_name: slowadcname + function_alias: slowadcname + help: "[0-7][name] \n\t\t[Ctb][Xilinx_Ctb] Set the slowadc at the given position\ + \ to the given name." + infer_action: true + template: true +slowadcvalues: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + ctb_output_list: + GETFCN: getSlowADC + GETFCNLIST: getSlowADCList + GETFCNNAME: getSlowADCNames + printable_name: '*name_it++' + suffix: uV + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: true + command_name: slowadcvalues + function_alias: slowadcvalues + help: "[name] \n\t\t[Ctb][Xilinx_Ctb] Get values of all slow adcs." + infer_action: true +start: + actions: + PUT: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: startDetector + input: [] + input_types: [] + output: + - '"successful"' + require_det_id: true + store_result_in_t: false + command_name: start + function_alias: start + help: "\n\tStarts detector acquisition. Status changes to RUNNING or WAITING and\ + \ automatically returns to idle at the end of acquisition. If the acquisition\ + \ was abruptly stopped, some detectors come back to STOPPED." + infer_action: true + template: true +status: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getDetectorStatus + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: [] + argc: -1 + cast_input: [] + check_det_id: false + convert_det_id: true + exceptions: + - condition: 'true' + message: '"Cannot put. Did you mean to use command: \"start\" or \"stop\"?"' + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: false + command_name: status + function_alias: status + help: "[running, error, transmitting, finished, waiting, idle]\n\tDetector status.\ + \ Goes to stop server." + infer_action: true +stop: + actions: + PUT: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: stopDetector + input: [] + input_types: [] + output: + - '"successful"' + require_det_id: true + store_result_in_t: false + command_name: stop + function_alias: stop + help: "\n\tAbort detector acquisition. Status changes to IDLE or STOPPED. Goes to\ + \ stop server." + infer_action: true + template: true +stopport: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getStopPort + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - uint16_t + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setStopPort + input: + - args[0] + input_types: + - uint16_t + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: stopport + function_alias: stopport + help: "[n]\n\tPort number of the stop server on detector for detector-client tcp\ + \ interface. Default is 1953. Normally unchanged." + infer_action: true + template: true +storagecell_delay: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getStorageCellDelay + 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: getStorageCellDelay + input: [] + input_types: [] + output: + - OutString(t , args[0]) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - std::string + argc: 1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: setStorageCellDelay + input: + - converted_time + input_types: + - time::ns + output: + - args[0] + require_det_id: true + separate_time_units: + input: args[0] + output: + - converted_time + - unit + store_result_in_t: false + - arg_types: + - int + - special::time_unit + argc: 2 + cast_input: + - false + check_det_id: false + convert_det_id: true + convert_to_time: + input: + - args[0] + - args[1] + output: converted_time + function: setStorageCellDelay + input: + - converted_time + input_types: + - time::ns + output: + - args[0] + - args[1] + require_det_id: true + store_result_in_t: false + command_name: storagecell_delay + function_alias: storagecell_delay + help: "[duration (0-1638375 ns)] [(optional unit) ns|us|ms|s]\n\t[Jungfrau] Additional\ + \ time delay between 2 consecutive exposures in burst mode (resolution of 25ns).\ + \ Only applicable for chipv1.0. For advanced users only." + infer_action: true + template: true +storagecell_start: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getStorageCellStart + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setStorageCellStart + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: storagecell_start + function_alias: storagecell_start + help: "[0-max]\n\t[Jungfrau] Storage cell that stores the first acquisition of the\ + \ series. max is 15 (default) for chipv1.0 and 3 (default) for chipv1.1. For advanced\ + \ users only." + infer_action: true + template: true +subdeadtime: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getSubDeadTime + 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: getSubDeadTime + input: [] + input_types: [] + output: + - OutString(t , args[0]) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - std::string + argc: 1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: setSubDeadTime + input: + - converted_time + input_types: + - time::ns + output: + - args[0] + require_det_id: true + separate_time_units: + input: args[0] + output: + - converted_time + - unit + store_result_in_t: false + - arg_types: + - int + - special::time_unit + argc: 2 + cast_input: + - false + check_det_id: false + convert_det_id: true + convert_to_time: + input: + - args[0] + - args[1] + output: converted_time + function: setSubDeadTime + input: + - converted_time + input_types: + - time::ns + output: + - args[0] + - args[1] + require_det_id: true + store_result_in_t: false + command_name: subdeadtime + function_alias: subdeadtime + help: "[duration] [(optional unit) ns|us|ms|s]\n\t[Eiger] Dead time of EIGER subframes\ + \ in 32 bit mode. Subperiod = subexptime + subdeadtime." + infer_action: true + template: true +subexptime: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getSubExptime + 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: getSubExptime + input: [] + input_types: [] + output: + - OutString(t , args[0]) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - std::string + argc: 1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: setSubExptime + input: + - converted_time + input_types: + - time::ns + output: + - args[0] + require_det_id: true + separate_time_units: + input: args[0] + output: + - converted_time + - unit + store_result_in_t: false + - arg_types: + - int + - special::time_unit + argc: 2 + cast_input: + - false + check_det_id: false + convert_det_id: true + convert_to_time: + input: + - args[0] + - args[1] + output: converted_time + function: setSubExptime + input: + - converted_time + input_types: + - time::ns + output: + - args[0] + - args[1] + require_det_id: true + store_result_in_t: false + command_name: subexptime + function_alias: subexptime + help: "[duration] [(optional unit) ns|us|ms|s]\n\t[Eiger] Exposure time of EIGER\ + \ subframes in 32 bit mode." + infer_action: true + template: true +sync: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getSynchronization + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - bool + argc: 1 + cast_input: + - true + check_det_id: true + convert_det_id: true + function: setSynchronization + input: + - args[0] + input_types: + - bool + output: + - args.front() + require_det_id: false + store_result_in_t: false + command_name: sync + function_alias: sync + help: "[0, 1]\n\t[Jungfrau][Moench] Enables or disables synchronization between\ + \ modules. Sync mode requires at least one master configured. Also requires flatband\ + \ cabling between master and slave with termination board." + infer_action: true + template: true +syncclk: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getSYNCClock + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: syncclk + function_alias: syncclk + help: "[n_clk in MHz]\n\t[Ctb] Sync clock in MHz." + infer_action: true + template: true +temp_10ge: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getTemperature + input: + - defs::TEMPERATURE_10GE + input_types: + - int + output: + - OutString(t) + - "\" \xB0C\"" + require_det_id: true + store_result_in_t: true + command_name: temp_10ge + function_alias: temp_10ge + help: "[n_value]\n\t[Eiger]Temperature close to the 10GbE" + infer_action: true + template: true +temp_adc: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getTemperature + input: + - defs::TEMPERATURE_ADC + input_types: + - int + output: + - OutString(t) + - "\" \xB0C\"" + require_det_id: true + store_result_in_t: true + command_name: temp_adc + function_alias: temp_adc + help: "[n_value]\n\t[Jungfrau][Moench][Gotthard] ADC Temperature" + infer_action: true + template: true +temp_control: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getTemperatureControl + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - bool + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setTemperatureControl + input: + - args[0] + input_types: + - bool + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: temp_control + function_alias: temp_control + help: "[0, 1]\n\t[Jungfrau][Moench] Temperature control enable. Default is 0 (disabled).\ + \ If temperature crosses threshold temperature and temperature control is enabled,\ + \ power to chip will be switched off and temperature event occurs. To power on\ + \ chip again, temperature has to be less than threshold temperature and temperature\ + \ event has to be cleared." + infer_action: true + template: true +temp_dcdc: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getTemperature + input: + - defs::TEMPERATURE_DCDC + input_types: + - int + output: + - OutString(t) + - "\" \xB0C\"" + require_det_id: true + store_result_in_t: true + command_name: temp_dcdc + function_alias: temp_dcdc + help: "[n_value]\n\t[Eiger]Temperature close to the dc dc converter" + infer_action: true + template: true +temp_event: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getTemperatureEvent + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: [] + check_det_id: false + convert_det_id: true + exceptions: + - condition: StringTo(args[0]) != 0 + message: '"Unknown argument for temp event: ( " + args[0] + " ). Did you + mean 0 to reset event?"' + function: resetTemperatureEvent + input: [] + input_types: [] + output: + - '"cleared"' + require_det_id: true + store_result_in_t: false + command_name: temp_event + function_alias: temp_event + help: "[0]\n\t[Jungfrau][Moench] 1, if a temperature event occured. To clear this\ + \ event, set it to 0.\n\tIf temperature crosses threshold temperature and temperature\ + \ control is enabled, power to chip will be switched off and temperature event\ + \ occurs. To power on chip again, temperature has to be less than threshold temperature\ + \ and temperature event has to be cleared." + infer_action: true +temp_fpga: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getTemperature + input: + - defs::TEMPERATURE_FPGA + input_types: + - int + output: + - OutString(t) + - "\" \xB0C\"" + require_det_id: true + store_result_in_t: true + command_name: temp_fpga + function_alias: temp_fpga + help: "[n_value]\n\t[Eiger][Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Xilinx\ + \ CTB] FPGA Temperature" + infer_action: true + template: true +temp_fpgaext: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getTemperature + input: + - defs::TEMPERATURE_FPGAEXT + input_types: + - int + output: + - OutString(t) + - "\" \xB0C\"" + require_det_id: true + store_result_in_t: true + command_name: temp_fpgaext + function_alias: temp_fpgaext + help: "[n_value]\n\t[Eiger]Temperature close to the FPGA" + infer_action: true + template: true +temp_fpgafl: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getTemperature + input: + - defs::TEMPERATURE_FPGA2 + input_types: + - int + output: + - OutString(t) + - "\" \xB0C\"" + require_det_id: true + store_result_in_t: true + command_name: temp_fpgafl + function_alias: temp_fpgafl + help: "[n_value]\n\t[Eiger]Temperature of the left front end board fpga." + infer_action: true + template: true +temp_fpgafr: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getTemperature + input: + - defs::TEMPERATURE_FPGA3 + input_types: + - int + output: + - OutString(t) + - "\" \xB0C\"" + require_det_id: true + store_result_in_t: true + command_name: temp_fpgafr + function_alias: temp_fpgafr + help: "[n_value]\n\t[Eiger]Temperature of the right front end board fpga." + infer_action: true + template: true +temp_slowadc: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getTemperature + input: + - defs::SLOW_ADC_TEMP + input_types: + - int + output: + - OutString(t) + - "\" \xB0C\"" + require_det_id: true + store_result_in_t: true + command_name: temp_slowadc + function_alias: temp_slowadc + help: "[n_value]\n\t[Ctb]Temperature of the slow adc" + infer_action: true + template: true +temp_sodl: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getTemperature + input: + - defs::TEMPERATURE_SODL + input_types: + - int + output: + - OutString(t) + - "\" \xB0C\"" + require_det_id: true + store_result_in_t: true + command_name: temp_sodl + function_alias: temp_sodl + help: "[n_value]\n\t[Eiger]Temperature close to the left so-dimm memory" + infer_action: true + template: true +temp_sodr: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getTemperature + input: + - defs::TEMPERATURE_SODR + input_types: + - int + output: + - OutString(t) + - "\" \xB0C\"" + require_det_id: true + store_result_in_t: true + command_name: temp_sodr + function_alias: temp_sodr + help: "[n_value]\n\t[Eiger]Temperature close to the right so-dimm memory" + infer_action: true + template: true +temp_threshold: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getThresholdTemperature + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setThresholdTemperature + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: temp_threshold + function_alias: temp_threshold + help: "[n_temp (in degrees)]\n\t[Jungfrau][Moench] Threshold temperature in degrees.\ + \ If temperature crosses threshold temperature and temperature control is enabled,\ + \ power to chip will be switched off and temperature event occurs. To power on\ + \ chip again, temperature has to be less than threshold temperature and temperature\ + \ event has to be cleared." + infer_action: true + template: true +templist: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getTemperatureList + input: [] + input_types: [] + output: + - ToString(t) + require_det_id: false + store_result_in_t: true + command_name: templist + function_alias: templist + help: "\n\tList of temperature commands implemented for this detector." + infer_action: true + template: true +tempvalues: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + ctb_output_list: + GETFCN: getTemperature + GETFCNLIST: getTemperatureList + GETFCNNAME: '' + printable_name: '*it' + suffix: "\xB0C" + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: true + command_name: tempvalues + function_alias: tempvalues + help: "\n\tGets the values for every temperature for this detector." + infer_action: true +tengiga: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getTenGiga + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - bool + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setTenGiga + input: + - args[0] + input_types: + - bool + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: tengiga + function_alias: tengiga + help: "[0, 1]\n\t[Eiger][Ctb][Mythen3] 10GbE Enable." + infer_action: true + template: true +threshold: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: false + - arg_types: + - int + - defs::detectorSettings + argc: 2 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: false + - arg_types: + - int + - int + - int + argc: 3 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: false + - arg_types: + - int + - int + - int + - defs::detectorSettings + argc: 4 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: false + command_name: threshold + function_alias: threshold + help: '' + infer_action: true + is_description: true +thresholdnotb: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: false + - arg_types: + - int + - defs::detectorSettings + argc: 2 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: false + - arg_types: + - int + - int + - int + argc: 3 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: false + - arg_types: + - int + - int + - int + - defs::detectorSettings + argc: 4 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: false + command_name: thresholdnotb + duplicate_function: true + function_alias: threshold + help: '' + infer_action: true + is_description: true +timing: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getTimingMode + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - defs::timingMode + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setTimingMode + input: + - args[0] + input_types: + - defs::timingMode + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: timing + function_alias: 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]" + infer_action: true + template: true +timing_info_decoder: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getTimingInfoDecoder + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - defs::timingInfoDecoder + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setTimingInfoDecoder + input: + - args[0] + input_types: + - defs::timingInfoDecoder + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: timing_info_decoder + function_alias: timing_info_decoder + help: "[swissfel|shine]\n\t[Jungfrau] Advanced Command and only for Swissfel and\ + \ Shine. Sets the bunch id or timing info decoder. Default is swissfel." + infer_action: true + template: true +timinglist: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getTimingModeList + input: [] + input_types: [] + output: + - ToString(t) + require_det_id: false + store_result_in_t: true + command_name: timinglist + function_alias: timinglist + help: "\n\tGets the list of timing modes for this detector." + infer_action: true + template: true +timingsource: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getTimingSource + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - defs::timingSourceType + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setTimingSource + input: + - args[0] + input_types: + - defs::timingSourceType + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: timingsource + function_alias: timingsource + help: "[internal|external]\n\t[Gotthard2] Timing source. Internal is crystal and\ + \ external is system timing. Default is internal." + infer_action: true + template: true +top: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getTop + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - bool + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setTop + input: + - args[0] + input_types: + - bool + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: top + function_alias: top + help: "[0, 1]\n\t[Eiger] Sets half module to top (1), else bottom." + infer_action: true + template: true +transceiverenable: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getTransceiverEnableMask + input: [] + input_types: [] + output: + - OutStringHex(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - uint32_t + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setTransceiverEnableMask + input: + - args[0] + input_types: + - uint32_t + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: transceiverenable + function_alias: transceiverenable + help: "[bitmask]\n\t[Ctb][Xilinx Ctb] Transceiver Enable Mask. Enable for each 4\ + \ Transceiver channel." + infer_action: true + template: true +trigger: + actions: + PUT: + args: + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: true + convert_det_id: true + extra_variables: + - name: block + type: bool + value: 'false' + function: sendSoftwareTrigger + input: + - block + input_types: + - bool + output: + - '"successful"' + require_det_id: false + store_result_in_t: false + command_name: trigger + function_alias: trigger + help: "\n\t[Eiger][Mythen3][Jungfrau][Moench] Sends software trigger signal to detector" + infer_action: true + template: true +triggers: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getNumberOfTriggers + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int64_t + argc: 1 + cast_input: + - true + check_det_id: true + convert_det_id: true + function: setNumberOfTriggers + input: + - args[0] + input_types: + - int64_t + output: + - args.front() + require_det_id: false + store_result_in_t: false + command_name: triggers + function_alias: triggers + help: "[n_triggers]\n\tNumber of triggers per aquire. Set timing mode to use triggers." + infer_action: true + template: true +triggersl: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getNumberOfTriggersLeft + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: triggersl + function_alias: triggersl + help: "\n\t[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number\ + \ of triggers left in acquisition. Only when external trigger used." + infer_action: true + template: true +trimbits: + actions: + GET: + args: + - arg_types: + - special::path + argc: 1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: saveTrimbits + input: + - args[0] + input_types: + - std::string + output: + - args[0] + require_det_id: true + store_result_in_t: false + PUT: + args: + - arg_types: + - special::path + argc: 1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: loadTrimbits + input: + - args[0] + input_types: + - std::string + output: + - args[0] + require_det_id: true + store_result_in_t: false + command_name: trimbits + function_alias: trimbits + help: "[fname]\n\t[Eiger][Mythen3] Put will load the trimbit file to detector. If\ + \ no extension specified, serial number of each module is attached. Get will save\ + \ the trimbits from the detector to file with serial number added to file name." + infer_action: true +trimen: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: [] + argc: -1 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: false + command_name: trimen + function_alias: trimen + help: '' + infer_action: true + is_description: true +trimval: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getAllTrimbits + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setAllTrimbits + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: trimval + function_alias: trimval + help: "[n_trimval]\n\t[Eiger][Mythen3] All trimbits set to this value. Returns -1\ + \ if all trimbits are different values." + infer_action: true + template: true +tsamples: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getNumberOfTransceiverSamples + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setNumberOfTransceiverSamples + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: tsamples + function_alias: tsamples + help: "[n_value]\n\t[Ctb][Xilinx Ctb] Number of transceiver samples expected." + infer_action: true + template: true +txdelay: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: true + convert_det_id: true + function: getTransmissionDelay + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: true + convert_det_id: true + function: setTransmissionDelay + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: false + store_result_in_t: false + command_name: txdelay + function_alias: txdelay + help: "[n_delay]\n\t[Eiger][Jungfrau][Moench][Mythen3] Set transmission delay for\ + \ all modules in the detector using the step size provided.Sets up \n\t[Eiger]\ + \ txdelay_left to (2 * mod_index * n_delay), \n\t[Eiger] txdelay_right to ((2\ + \ * mod_index + 1) * n_delay) and \n\t[Eiger] txdelay_frame to (2 *num_modules\ + \ * n_delay)\n\t[Jungfrau][Moench][Mythen3] txdelay_frame to (num_modules * n_delay)\ + \ for every module." + infer_action: true +txdelay_frame: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getTransmissionDelayFrame + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setTransmissionDelayFrame + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: txdelay_frame + function_alias: txdelay_frame + help: "[n_delay]\n\t[Eiger][Jungfrau][Moench][Mythen3] Transmission delay of first\ + \ udp packet being streamed out of the module.\n\t[Jungfrau][Moench] [0-31] Each\ + \ value represents 1 ms\n\t[Eiger] Additional delay to txdelay_left and txdelay_right.\ + \ Each value represents 10ns. Typical value is 50000.\n\t[Mythen3] [0-16777215]\ + \ Each value represents 8 ns (125 MHz clock), max is 134 ms." + infer_action: true + template: true +txdelay_left: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getTransmissionDelayLeft + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setTransmissionDelayLeft + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: txdelay_left + function_alias: txdelay_left + help: "[n_delay]\n\t[Eiger] Transmission delay of first packet in an image being\ + \ streamed out of the module's left UDP port. Each value represents 10ns. Typical\ + \ value is 50000." + infer_action: true + template: true +txdelay_right: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getTransmissionDelayRight + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setTransmissionDelayRight + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: txdelay_right + function_alias: txdelay_right + help: "[n_delay]\n\t[Eiger] Transmission delay of first packet in an image being\ + \ streamed out of the module's right UDP port. Each value represents 10ns. Typical\ + \ value is 50000." + infer_action: true + template: true +type: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getDetectorType + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: type + function_alias: type + help: "\n\tReturns detector type. Can be Eiger, Jungfrau, Gotthard, Moench, Mythen3,\ + \ Gotthard2, ChipTestBoard, Xilinx_ChipTestBoard" + infer_action: true + template: true +udp_cleardst: + actions: + PUT: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: clearUDPDestinations + input: [] + input_types: [] + output: + - '"successful"' + require_det_id: true + store_result_in_t: false + command_name: udp_cleardst + function_alias: udp_cleardst + help: "\n\tClears udp destination details on the detector." + infer_action: true + template: true +udp_dstip: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: + - std::string + argc: 1 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: false + command_name: udp_dstip + function_alias: udp_dstip + help: '' + infer_action: true + is_description: true +udp_dstip2: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: + - std::string + argc: 1 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: false + command_name: udp_dstip2 + function_alias: udp_dstip2 + help: '' + infer_action: true + is_description: true +udp_dstlist: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: false + convert_det_id: true + exceptions: + - condition: det_id == -1 + message: '"Can execute udp_dstlist only at module level."' + - condition: rx_id < 0 || rx_id >= MAX_UDP_DESTINATION + message: '"Invalid receiver index " + std::to_string(rx_id) + " to set round + robin entry."' + function: getDestinationUDPList + input: + - rx_id + input_types: + - auto + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - std::string + argc: -1 + cast_input: + - false + check_det_id: false + convert_det_id: false + exceptions: + - condition: det_id == -1 + message: '"Can execute udp_dstlist only at module level."' + - condition: rx_id < 0 || rx_id >= MAX_UDP_DESTINATION + message: '"Invalid receiver index " + std::to_string(rx_id) + " to set round + robin entry."' + - condition: args.empty() + message: '"udp_dstlist require at least one argument."' + function: setDestinationUDPList + input: + - getUdpEntry() + input_types: + - auto + output: + - ToString(args) + require_det_id: true + store_result_in_t: false + command_name: udp_dstlist + function_alias: udp_dstlist + help: "[ip=x.x.x.x] [(optional)ip2=x.x.x.x] \n\t\t[mac=xx:xx:xx:xx:xx:xx] [(optional)mac2=xx:xx:xx:xx:xx:xx]\n\ + \t\t[port=value] [(optional)port2=value]\n\t\tThe order of ip, mac and port does\ + \ not matter. entry_value can be >0 only for [Eiger][Jungfrau][Moench][Mythen3][Gotthard2]\ + \ where round robin is implemented. If 'auto' used, then ip is set to ip of rx_hostname." + infer_action: true +udp_dstmac: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getDestinationUDPMAC + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - MacAddr + argc: 1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: setDestinationUDPMAC + input: + - MacAddr(args[0]) + input_types: + - MacAddr + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: udp_dstmac + function_alias: udp_dstmac + help: "[x:x:x:x:x:x]\n\tMac address of the receiver (destination) udp interface.\ + \ Not mandatory to set as udp_dstip retrieves it from slsReceiver process, but\ + \ must be set if you use a custom receiver (not slsReceiver). Use router mac if\ + \ router between detector and receiver." + infer_action: true + template: true +udp_dstmac2: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getDestinationUDPMAC2 + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - MacAddr + argc: 1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: setDestinationUDPMAC2 + input: + - MacAddr(args[0]) + input_types: + - MacAddr + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: udp_dstmac2 + function_alias: udp_dstmac2 + help: "[x:x:x:x:x:x]\n\t[Jungfrau][Moench] Mac address of the receiver (destination)\ + \ udp interface 2. Not mandatory to set as udp_dstip2 retrieves it from slsReceiver\ + \ process but must be set if you use a custom receiver (not slsReceiver). \n\t\ + \ [Jungfrau][Moench] top half or inner interface \n\t [Gotthard2] veto debugging.\ + \ Use router mac if router between detector and receiver." + infer_action: true + template: true +udp_dstport: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getDestinationUDPPort + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - uint16_t + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: false + function: setDestinationUDPPort + input: + - args[0] + input_types: + - uint16_t + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: udp_dstport + function_alias: udp_dstport + help: "[n]\n\tPort number of the receiver (destination) udp interface. Default is\ + \ 50001. \n\tIf multi command, ports for each module is calculated (incremented\ + \ by 1 if no 2nd interface)" + infer_action: true + template: true +udp_dstport2: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getDestinationUDPPort2 + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - uint16_t + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: false + function: setDestinationUDPPort2 + input: + - args[0] + input_types: + - uint16_t + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: udp_dstport2 + function_alias: udp_dstport2 + help: "[n]\n\t[Jungfrau][Moench][Eiger][Gotthard2] Port number of the receiver (destination)\ + \ udp interface 2. Default is 50002. \n\tIf multi command, ports for each module\ + \ is calculated (incremented by 2) \n\t[Jungfrau][Moench] top half or inner interface\ + \ \n\t[Eiger] right half \n\t[Gotthard2] veto debugging" + infer_action: true + template: true +udp_firstdst: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getFirstUDPDestination + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setFirstUDPDestination + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: udp_firstdst + function_alias: udp_firstdst + help: "\n\t[0 - N]\n\twhere N is the max number of udp destinations - 1.\n\t[Jungfrau][Moench][Gotthard2]\ + \ Max number of udp destinations is 32.\n\t[Mythen3] Max number of udp destination\ + \ is 64.\n\t One can set which is the first destination that the detector will\ + \ stream images out from in a round robin fashion. The entry must not have been\ + \ empty. Default: 0" + infer_action: true + template: true +udp_numdst: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getNumberofUDPDestinations + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: udp_numdst + function_alias: udp_numdst + help: "\n\t[Jungfrau][Moench][Eiger][Mythen3][Gotthard2] One can enter upto 32 (64\ + \ for Mythen3) destinations that the detector will stream images out in a round\ + \ robin fashion. This is get only command. Default: 1" + infer_action: true + template: true +udp_reconfigure: + actions: + PUT: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: reconfigureUDPDestination + input: [] + input_types: [] + output: + - '"successful"' + require_det_id: true + store_result_in_t: false + command_name: udp_reconfigure + function_alias: udp_reconfigure + help: "\n\tReconfigures Detector with UDP destination. More for debugging as the\ + \ configuration is done automatically when the detector has sufficient UDP details." + infer_action: true + template: true +udp_srcip: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: + - std::string + argc: 1 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: false + command_name: udp_srcip + function_alias: udp_srcip + help: '' + infer_action: true + is_description: true +udp_srcip2: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: + - std::string + argc: 1 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: false + command_name: udp_srcip2 + function_alias: udp_srcip2 + help: '' + infer_action: true + is_description: true +udp_srcmac: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getSourceUDPMAC + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - MacAddr + argc: 1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: setSourceUDPMAC + input: + - MacAddr(args[0]) + input_types: + - MacAddr + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: udp_srcmac + function_alias: udp_srcmac + help: "[x:x:x:x:x:x]\n\tMac address of the detector (source) udp interface. \n\t\ + [Eiger] Do not set as detector will replace with its own DHCP Mac (1G) or DHCP\ + \ Mac + 1 (10G)." + infer_action: true + template: true +udp_srcmac2: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getSourceUDPMAC2 + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - MacAddr + argc: 1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: setSourceUDPMAC2 + input: + - MacAddr(args[0]) + input_types: + - MacAddr + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: udp_srcmac2 + function_alias: udp_srcmac2 + help: "[x:x:x:x:x:x]\n\t[Jungfrau][Moench] Mac address of the top half or inner\ + \ (source) udp interface. " + infer_action: true + template: true +udp_validate: + actions: + PUT: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: validateUDPConfiguration + input: [] + input_types: [] + output: + - '"successful"' + require_det_id: true + store_result_in_t: false + command_name: udp_validate + function_alias: udp_validate + help: "\n\tValidates that UDP configuration in the detector is valid. If not configured,\ + \ it will throw with error message requesting missing udp information." + infer_action: true + template: true +update: + actions: + PUT: + args: + - arg_types: + - special::path + - special::path + argc: 2 + cast_input: + - false + - false + check_det_id: false + convert_det_id: true + exceptions: + - condition: args[args.size() - 1].find(".pof") == std::string::npos && args[args.size() + - 1].find(".rbf") == std::string::npos + message: '"Programming file must be a pof/rbf file."' + function: updateFirmwareAndServer + input: + - args[0] + - args[1] + input_types: + - std::string + - std::string + output: + - '"successful"' + require_det_id: true + store_result_in_t: false + command_name: update + function_alias: 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" + infer_action: true +updatedetectorserver: + actions: + PUT: + args: + - arg_types: + - special::path + argc: 1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: updateDetectorServer + input: + - args[0] + input_types: + - std::string + output: + - '"successful"' + require_det_id: true + store_result_in_t: false + command_name: updatedetectorserver + function_alias: updatedetectorserver + help: "[server_name with full path]\n\t[Jungfrau][Moench][Eiger][Ctb][Mythen3][Gotthard2]\ + \ Copies detector server via TCP (without tftp). Makes a symbolic link with a\ + \ shorter name (without vx.x.x). Then, detector controller reboots (except Eiger).\n\ + \t[Jungfrau][Moench][Ctb]Also changes respawn server to the link, which is effective\ + \ after a reboot." + infer_action: true +updatekernel: + actions: + PUT: + args: + - arg_types: + - special::path + argc: 1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: updateKernel + input: + - args[0] + input_types: + - std::string + output: + - '"successful"' + require_det_id: true + store_result_in_t: false + command_name: updatekernel + function_alias: updatekernel + help: "[kernel_name with full path]\n\t[Jungfrau][Moench][Ctb][Mythen3][Gotthard2]\ + \ Advanced Command!! You could damage the detector. Please use with caution.\n\ + \tUpdates the kernel image. Then, detector controller reboots with new kernel." + infer_action: true +updatemode: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getUpdateMode + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setUpdateMode + input: + - args[0] + input_types: + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: updatemode + function_alias: updatemode + help: "[0|1]\n\tRestart the detector server in update mode or not. This is useful\ + \ when server-firmware compatibility is at its worst and server cannot start up\ + \ normally" + infer_action: true + template: true +user: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: true + convert_det_id: true + function: getUserDetails + input: [] + input_types: [] + output: + - t + require_det_id: false + store_result_in_t: true + command_name: user + function_alias: user + help: "\n\tUser details from shared memory (hostname, type, PID, User, Date)." + infer_action: true +v_a: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getPower + input: + - defs::V_POWER_A + input_types: + - int + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - int + argc: 1 + cast_input: + - false + - true + check_det_id: false + convert_det_id: true + function: setPower + input: + - defs::V_POWER_A + - args[0] + input_types: + - int + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: v_a + function_alias: v_a + help: "[n_value]\n\t[Ctb][Xilinx Ctb] Power supply a in mV." + infer_action: true + template: true +v_b: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getPower + input: + - defs::V_POWER_B + input_types: + - int + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - int + argc: 1 + cast_input: + - false + - true + check_det_id: false + convert_det_id: true + function: setPower + input: + - defs::V_POWER_B + - args[0] + input_types: + - int + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: v_b + function_alias: v_b + help: "[n_value]\n\t[Ctb][Xilinx Ctb] Power supply b in mV." + infer_action: true + template: true +v_c: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getPower + input: + - defs::V_POWER_C + input_types: + - int + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - int + argc: 1 + cast_input: + - false + - true + check_det_id: false + convert_det_id: true + function: setPower + input: + - defs::V_POWER_C + - args[0] + input_types: + - int + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: v_c + function_alias: v_c + help: "[n_value]\n\t[Ctb][Xilinx Ctb] Power supply c in mV." + infer_action: true + template: true +v_chip: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getPower + input: + - defs::V_POWER_CHIP + input_types: + - int + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - int + argc: 1 + cast_input: + - false + - true + check_det_id: false + convert_det_id: true + function: setPower + input: + - defs::V_POWER_CHIP + - args[0] + input_types: + - int + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: v_chip + function_alias: v_chip + help: "[n_value]\n\t[Ctb] Power supply chip in mV. Do not use it unless you are\ + \ completely sure you will not fry the board." + infer_action: true + template: true +v_d: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getPower + input: + - defs::V_POWER_D + input_types: + - int + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - int + argc: 1 + cast_input: + - false + - true + check_det_id: false + convert_det_id: true + function: setPower + input: + - defs::V_POWER_D + - args[0] + input_types: + - int + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: v_d + function_alias: v_d + help: "[n_value]\n\t[Ctb][Xilinx Ctb] Power supply d in mV." + infer_action: true + template: true +v_io: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getPower + input: + - defs::V_POWER_IO + input_types: + - int + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - int + argc: 1 + cast_input: + - false + - true + check_det_id: false + convert_det_id: true + function: setPower + input: + - defs::V_POWER_IO + - args[0] + input_types: + - int + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: v_io + function_alias: v_io + help: "[n_value]\n\t[Ctb][Xilinx Ctb] Power supply io in mV. Minimum 1200 mV. Must\ + \ be the first power regulator to be set after fpga reset (on-board detector server\ + \ start up)." + infer_action: true + template: true +v_limit: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getPower + input: + - defs::V_LIMIT + input_types: + - int + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - int + argc: 1 + cast_input: + - false + - true + check_det_id: false + convert_det_id: true + function: setPower + input: + - defs::V_LIMIT + - args[0] + input_types: + - int + - int + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: v_limit + function_alias: v_limit + help: "[n_value]\n\t[Ctb][Xilinx Ctb] Soft limit for power supplies (ctb only) and\ + \ DACS in mV." + infer_action: true + template: true +vchip_comp_adc: + actions: + GET: + args: + - arg_types: + - int + - int + argc: 1 + cast_input: + - false + - true + check_det_id: false + convert_det_id: true + function: getOnChipDAC + input: + - defs::VB_COMP_ADC + - args[0] + input_types: + - int + - int + output: + - args[0] + - ''' ''' + - OutStringHex(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - int + - int + argc: 2 + cast_input: + - false + - true + - true + check_det_id: false + convert_det_id: true + function: setOnChipDAC + input: + - defs::VB_COMP_ADC + - args[0] + - args[1] + input_types: + - int + - int + - int + output: + - args[0] + - ''' ''' + - args[1] + require_det_id: true + store_result_in_t: false + command_name: vchip_comp_adc + function_alias: vchip_comp_adc + help: "[chip index 0-9, -1 for all][10 bit hex value] \n\t[Gotthard2] On chip Dac\ + \ for comparator current of ADC." + infer_action: true + template: true +vchip_comp_fe: + actions: + GET: + args: + - arg_types: + - int + - int + argc: 1 + cast_input: + - false + - true + check_det_id: false + convert_det_id: true + function: getOnChipDAC + input: + - defs::VB_COMP_FE + - args[0] + input_types: + - int + - int + output: + - args[0] + - ''' ''' + - OutStringHex(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - int + - int + argc: 2 + cast_input: + - false + - true + - true + check_det_id: false + convert_det_id: true + function: setOnChipDAC + input: + - defs::VB_COMP_FE + - args[0] + - args[1] + input_types: + - int + - int + - int + output: + - args[0] + - ''' ''' + - args[1] + require_det_id: true + store_result_in_t: false + command_name: vchip_comp_fe + function_alias: vchip_comp_fe + help: "[chip index 0-9, -1 for all][10 bit hex value] \n\t[Gotthard2] On chip Dac\ + \ for comparator current of analogue front end." + infer_action: true + template: true +vchip_cs: + actions: + GET: + args: + - arg_types: + - int + - int + argc: 1 + cast_input: + - false + - true + check_det_id: false + convert_det_id: true + function: getOnChipDAC + input: + - defs::VB_CS + - args[0] + input_types: + - int + - int + output: + - args[0] + - ''' ''' + - OutStringHex(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - int + - int + argc: 2 + cast_input: + - false + - true + - true + check_det_id: false + convert_det_id: true + function: setOnChipDAC + input: + - defs::VB_CS + - args[0] + - args[1] + input_types: + - int + - int + - int + output: + - args[0] + - ''' ''' + - args[1] + require_det_id: true + store_result_in_t: false + command_name: vchip_cs + function_alias: vchip_cs + help: "[chip index 0-9, -1 for all][10 bit hex value] \n\t[Gotthard2] On chip Dac\ + \ for current injection into preamplifier." + infer_action: true + template: true +vchip_opa_1st: + actions: + GET: + args: + - arg_types: + - int + - int + argc: 1 + cast_input: + - false + - true + check_det_id: false + convert_det_id: true + function: getOnChipDAC + input: + - defs::VB_OPA_1ST + - args[0] + input_types: + - int + - int + output: + - args[0] + - ''' ''' + - OutStringHex(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - int + - int + argc: 2 + cast_input: + - false + - true + - true + check_det_id: false + convert_det_id: true + function: setOnChipDAC + input: + - defs::VB_OPA_1ST + - args[0] + - args[1] + input_types: + - int + - int + - int + output: + - args[0] + - ''' ''' + - args[1] + require_det_id: true + store_result_in_t: false + command_name: vchip_opa_1st + function_alias: vchip_opa_1st + help: "[chip index 0-9, -1 for all][10 bit hex value] \n\t[Gotthard2] On chip Dac\ + \ for opa current for driving the other DACs in chip." + infer_action: true + template: true +vchip_opa_fd: + actions: + GET: + args: + - arg_types: + - int + - int + argc: 1 + cast_input: + - false + - true + check_det_id: false + convert_det_id: true + function: getOnChipDAC + input: + - defs::VB_OPA_FD + - args[0] + input_types: + - int + - int + output: + - args[0] + - ''' ''' + - OutStringHex(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - int + - int + argc: 2 + cast_input: + - false + - true + - true + check_det_id: false + convert_det_id: true + function: setOnChipDAC + input: + - defs::VB_OPA_FD + - args[0] + - args[1] + input_types: + - int + - int + - int + output: + - args[0] + - ''' ''' + - args[1] + require_det_id: true + store_result_in_t: false + command_name: vchip_opa_fd + function_alias: vchip_opa_fd + help: "[chip index 0-9, -1 for all][10 bit hex value] \n\t[Gotthard2] On chip Dac\ + \ current for CDS opa stage." + infer_action: true + template: true +vchip_ref_comp_fe: + actions: + GET: + args: + - arg_types: + - int + - int + argc: 1 + cast_input: + - false + - true + check_det_id: false + convert_det_id: true + function: getOnChipDAC + input: + - defs::VREF_COMP_FE + - args[0] + input_types: + - int + - int + output: + - args[0] + - ''' ''' + - OutStringHex(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - int + - int + argc: 2 + cast_input: + - false + - true + - true + check_det_id: false + convert_det_id: true + function: setOnChipDAC + input: + - defs::VREF_COMP_FE + - args[0] + - args[1] + input_types: + - int + - int + - int + output: + - args[0] + - ''' ''' + - args[1] + require_det_id: true + store_result_in_t: false + command_name: vchip_ref_comp_fe + function_alias: vchip_ref_comp_fe + help: "[chip index 0-9, -1 for all][10 bit hex value] \n\t[Gotthard2] On chip Dac\ + \ for reference voltage of the comparator of analogue front end." + infer_action: true + template: true +versions: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: true + command_name: versions + function_alias: versions + help: '' + infer_action: true + is_description: true +veto: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getVeto + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - bool + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setVeto + input: + - args[0] + input_types: + - bool + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: veto + function_alias: veto + help: "[0, 1]\n\t[Gotthard2] Enable or disable veto data data from chip. Default\ + \ is 0." + infer_action: true + template: true +vetoalg: + actions: + GET: + args: + - arg_types: + - defs::streamingInterface + argc: 1 + cast_input: + - false + check_det_id: false + convert_det_id: true + exceptions: + - condition: interface == defs::streamingInterface::NONE + message: '"Must specify an interface to set algorithm"' + extra_variables: + - name: interface + type: defs::streamingInterface + value: StringTo(args[0]) + function: getVetoAlgorithm + input: + - interface + input_types: + - defs::streamingInterface + output: + - OutString(t) + - ''' ''' + - ToString(interface) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - defs::vetoAlgorithm + - defs::streamingInterface + argc: 2 + cast_input: + - false + - false + check_det_id: false + convert_det_id: true + exceptions: + - condition: interface == defs::streamingInterface::NONE + message: '"Must specify an interface to set algorithm"' + extra_variables: + - name: alg + type: defs::vetoAlgorithm + value: StringTo(args[0]) + - name: interface + type: defs::streamingInterface + value: StringTo(args[1]) + function: setVetoAlgorithm + input: + - alg + - interface + input_types: + - defs::vetoAlgorithm + - defs::streamingInterface + output: + - ToString(alg) + - ''' ''' + - ToString(interface) + require_det_id: true + store_result_in_t: false + command_name: vetoalg + function_alias: vetoalg + help: "[hits|raw] [lll|10gbe]\n\t[Gotthard2] Set the veto algorithm. Default is\ + \ hits." + infer_action: true +vetofile: + actions: + GET: + args: + - arg_types: [] + argc: -1 + cast_input: [] + check_det_id: false + convert_det_id: true + exceptions: + - condition: 'true' + message: '"Cannot get vetofile. Did you mean vetophoton?"' + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - std::string + argc: 2 + cast_input: + - true + - false + check_det_id: false + convert_det_id: true + function: setVetoFile + input: + - args[0] + - args[1] + input_types: + - int + - std::string + output: + - ToString(args) + require_det_id: true + store_result_in_t: false + command_name: vetofile + function_alias: vetofile + help: "[chip index 0-9, -1 for all] [file name] \n\t[Gotthard2] Set veto reference\ + \ for each 128 channels for specific chip. The file should have 128 rows of gain\ + \ index and 12 bit value in dec" + infer_action: true +vetophoton: + actions: + GET: + args: + - arg_types: + - int + - std::string + argc: 2 + cast_input: + - true + - false + check_det_id: false + convert_det_id: true + function: getVetoPhoton + input: + - args[0] + - args[1] + input_types: + - int + - std::string + output: + - '"saved to file "' + - args[1] + require_det_id: true + store_result_in_t: false + PUT: + args: + - arg_types: + - int + - int + - int + - std::string + argc: 4 + cast_input: + - true + - true + - true + - false + check_det_id: false + convert_det_id: true + function: setVetoPhoton + input: + - args[0] + - args[1] + - args[2] + - args[3] + input_types: + - int + - int + - int + - std::string + output: + - ToString(args) + require_det_id: true + store_result_in_t: false + command_name: vetophoton + function_alias: vetophoton + help: "[ichip] [#photons] [energy in keV] [reference file]\n\t[Gotthard2] Set veto\ + \ reference for 128 channels for chip ichip according to reference file and #photons\ + \ and energy in keV.\n\t[ichip] [output file]\n\t Get gain indices and veto reference\ + \ for 128 channels for chip ichip, saved to file." + infer_action: true +vetoref: + actions: + GET: + args: + - arg_types: [] + argc: -1 + cast_input: [] + check_det_id: false + convert_det_id: true + exceptions: + - condition: 'true' + message: '"Cannot get vetoref. Did you mean vetophoton?"' + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: + - int + - int + argc: 2 + cast_input: + - true + - true + check_det_id: false + convert_det_id: true + function: setVetoReference + input: + - args[0] + - args[1] + input_types: + - int + - int + output: + - ToString(args) + require_det_id: false + store_result_in_t: false + command_name: vetoref + function_alias: vetoref + help: "[gain index] [12 bit value]\n\t[Gotthard2] Set veto reference for all 128\ + \ channels for all chips." + infer_action: true +vetostream: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: [] + argc: -1 + cast_input: [] + check_det_id: false + convert_det_id: true + function: '' + input: [] + input_types: [] + output: [] + require_det_id: false + store_result_in_t: false + command_name: vetostream + function_alias: vetostream + help: '' + infer_action: true + is_description: true +virtual: + actions: + PUT: + args: + - arg_types: + - int + - uint16_t + argc: 2 + cast_input: + - true + - true + check_det_id: true + convert_det_id: true + function: setVirtualDetectorServers + input: + - args[0] + - args[1] + input_types: + - int + - uint16_t + output: + - ToString(args) + require_det_id: false + store_result_in_t: false + command_name: virtual + function_alias: virtualFunction + help: "[n_servers] [starting_port_number]\n\tConnecs to n virtual server at local\ + \ host starting at specific control port. Every virtual server will have a stop\ + \ port (control port + 1)" + infer_action: true +vm_a: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getMeasuredPower + input: + - defs::V_POWER_A + input_types: + - int + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: vm_a + function_alias: vm_a + help: "\n\t[Ctb] Measured voltage of power supply a in mV." + infer_action: true + template: true +vm_b: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getMeasuredPower + input: + - defs::V_POWER_B + input_types: + - int + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: vm_b + function_alias: vm_b + help: "\n\t[Ctb] Measured voltage of power supply b in mV." + infer_action: true + template: true +vm_c: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getMeasuredPower + input: + - defs::V_POWER_C + input_types: + - int + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: vm_c + function_alias: vm_c + help: "\n\t[Ctb] Measured voltage of power supply c in mV." + infer_action: true + template: true +vm_d: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getMeasuredPower + input: + - defs::V_POWER_D + input_types: + - int + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: vm_d + function_alias: vm_d + help: "\n\t[Ctb] Measured voltage of power supply d in mV." + infer_action: true + template: true +vm_io: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: getMeasuredPower + input: + - defs::V_POWER_IO + input_types: + - int + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + command_name: vm_io + function_alias: vm_io + help: "\n\t[Ctb] Measured voltage of power supply io in mV." + infer_action: true + template: true +zmqhwm: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getClientZmqHwm + input: [] + input_types: [] + output: + - t + require_det_id: false + store_result_in_t: true + PUT: + args: + - arg_types: + - int + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: true + function: setClientZmqHwm + input: + - args[0] + input_types: + - int + output: + - det->getClientZmqHwm() + require_det_id: false + store_result_in_t: false + command_name: zmqhwm + function_alias: zmqhwm + help: "[n_limit] \n\tClient's zmq receive high water mark. Default is the zmq library's\ + \ default (1000), can also be set here using -1. \n\tThis is a high number and\ + \ can be set to 2 for gui purposes. \n\tOne must also set the receiver's send\ + \ high water mark to similar value. Final effect is sum of them.\n\t Setting it\ + \ via command line is useful only before zmq enabled (before opening gui)." + infer_action: true +zmqip: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getClientZmqIp + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - IpAddr + argc: 1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: setClientZmqIp + input: + - IpAddr(args[0]) + input_types: + - IpAddr + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: zmqip + function_alias: zmqip + help: "[x.x.x.x]\n\tIp Address to listen to zmq data streamed out from receiver\ + \ or intermediate process. Default connects to receiver zmq Ip Address (from rx_hostname).\ + \ Modified only when using an intermediate process between receiver and client(gui).\ + \ Also restarts client zmq streaming if enabled." + infer_action: true + template: true +zmqport: + actions: + GET: + args: + - arg_types: [] + argc: 0 + cast_input: [] + check_det_id: false + convert_det_id: true + function: getClientZmqPort + input: [] + input_types: [] + output: + - OutString(t) + require_det_id: true + store_result_in_t: true + PUT: + args: + - arg_types: + - uint16_t + argc: 1 + cast_input: + - true + check_det_id: false + convert_det_id: false + function: setClientZmqPort + input: + - args[0] + input_types: + - uint16_t + output: + - args.front() + require_det_id: true + store_result_in_t: false + command_name: zmqport + function_alias: zmqport + help: "[port]\n\tZmq port in client(gui) or intermediate process for data to be\ + \ streamed to from receiver. Default connects to receiver zmq streaming out port\ + \ (30001). Modified only when using an intermediate process between receiver and\ + \ client(gui). Also restarts client zmq streaming if enabled. Must be different\ + \ for every detector (and udp port). Multi command will automatically increment\ + \ for individual modules." + infer_action: true + template: true diff --git a/slsDetectorSoftware/generator/gen_commands.py b/slsDetectorSoftware/generator/gen_commands.py new file mode 100644 index 000000000..cc1aedf09 --- /dev/null +++ b/slsDetectorSoftware/generator/gen_commands.py @@ -0,0 +1,275 @@ +import argparse +import os +import subprocess +from pathlib import Path + +import yaml + +from autocomplete.autocomplete import type_info +from cpp_codegen.codegen import codegen, if_block, for_block, function, else_block +from infer_action.check_infer import check_infer +from autocomplete.autocomplete import type_values + +GEN_PATH = Path(__file__).parent + +COMMANDS_PATH = GEN_PATH / 'extended_commands.yaml' +DEPRECATED_COMMANDS_PATH = GEN_PATH / 'deprecated_commands.yaml' +CPP_INPUT_PATH = GEN_PATH / 'Caller.in.cpp' +HEADER_INPUT_PATH = GEN_PATH / 'Caller.in.h' +CPP_OUTPUT_PATH = GEN_PATH.parent / 'src' / 'Caller.cpp' +HEADER_OUTPUT_PATH = GEN_PATH.parent / 'src' / 'Caller.h' + +INFER_HEADER_INPUT_PATH = GEN_PATH / 'inferAction.in.h' +INFER_CPP_INPUT_PATH = GEN_PATH / 'inferAction.in.cpp' +INFER_HEADER_OUTPUT_PATH = GEN_PATH.parent / 'src' / 'inferAction.h' +INFER_CPP_OUTPUT_PATH = GEN_PATH.parent / 'src' / 'inferAction.cpp' + + +def generate( + commands_path=COMMANDS_PATH, + cpp_input_path=CPP_INPUT_PATH, + header_input_path=HEADER_INPUT_PATH, + cpp_output_path=CPP_OUTPUT_PATH, + header_output_path=HEADER_OUTPUT_PATH, + infer_header_input_path=INFER_HEADER_INPUT_PATH, + infer_cpp_input_path=INFER_CPP_INPUT_PATH, + infer_header_output_path=INFER_HEADER_OUTPUT_PATH, + infer_cpp_output_path=INFER_CPP_OUTPUT_PATH, + +): + commands_config = yaml.unsafe_load(commands_path.open('r')) + deprecated_commands_config = yaml.unsafe_load(DEPRECATED_COMMANDS_PATH.open('r')) + type_dist, non_dist = check_infer(commands=commands_config) + + codegen.open(cpp_output_path) + # write call function + codegen.write_opening(cpp_input_path) + + # iterate over the commands and generate code for each + print(f"[X] found {len(commands_config)} commands") + print('[*] generating code for commands') + for command_name, command in commands_config.items(): + if 'is_description' in command and command['is_description']: + continue + with function('std::string', 'Caller::' + command['function_alias'], [('int', 'action')]) as fn: + codegen.write_line('std::ostringstream os;') + + # print help + codegen.write_line('// print help') + with if_block('action == slsDetectorDefs::HELP_ACTION'): + if command["help"].startswith('code:'): + codegen.write_line(command["help"].strip('code:')) + else: + codegen.write_line(f'os << R"V0G0N({command["help"]} )V0G0N" << std::endl;') + codegen.write_line('return os.str();') + + # check if action and arguments are valid + + codegen.write_line('// check if action and arguments are valid') + first = True + for action, action_params in command['actions'].items(): + + with if_block(f'action == {codegen.actions_dict[action]}', elseif=not first): + + check_argc = True + for arg in action_params['args']: + if arg['argc'] == -1: + check_argc = False + break + # check number of arguments + condition = "1" if check_argc else "0" + + if check_argc: + for arg in action_params['args']: + condition += f' && args.size() != {arg["argc"]}' + + with if_block(condition): + codegen.write_line(f'throw RuntimeError("Wrong number of arguments for action {action}");') + + for arg in action_params['args']: + if not check_argc: + continue + with if_block(f'args.size() == {arg["argc"]}'): + # check argument types + if 'extra_variables' in arg: + for var in arg['extra_variables']: + codegen.write_line(f'{var["type"]} {var["name"]} = {var["value"]};') + + if 'separate_time_units' in arg and arg['separate_time_units']: + codegen.write_line(f'try {{') + # TODO: refactor this repeating code + codegen.write_line(f'std::string tmp_time({arg["separate_time_units"]["input"]});') + codegen.write_line(f'std::string {arg["separate_time_units"]["output"][1]}' + f' = RemoveUnit(tmp_time);') + codegen.write_line(f'auto {arg["separate_time_units"]["output"][0]} = ' + f'StringTo < time::ns > (tmp_time,' + f' {arg["separate_time_units"]["output"][1]});') + codegen.write_line( + f'}} catch (...) {{ throw RuntimeError("Could not convert argument to time::ns");}}') + + elif 'convert_to_time' in arg and arg['convert_to_time']: + codegen.write_line(f'try {{') + + codegen.write_line( + f'StringTo < time::ns > ({", ".join(arg["convert_to_time"]["input"])});') + codegen.write_line( + f'}} catch (...) {{ throw RuntimeError("Could not convert arguments to time::ns");}}') + + for i in range(len(arg['input'])): + if not arg['cast_input'][i]: + continue + codegen.write_line(f'try {{') + codegen.write_line(f'StringTo<{arg["input_types"][i]}>({arg["input"][i]});') + codegen.write_line(f'}} catch (...) {{') + codegen.write_line( + f' throw RuntimeError("Could not convert argument {i} to {arg["input_types"][i]}");') + codegen.write_line(f'}}') + first = False + with else_block(): + codegen.write_line( + f'throw RuntimeError("INTERNAL ERROR: Invalid action: supported actions are {list(command["actions"].keys())}");') + + # generate code for each action + codegen.write_line('// generate code for each action') + for action, action_params in command['actions'].items(): + if 'detectors' in action_params: + codegen.write_line('auto detector_type = det->getDetectorType().squash();') + + with if_block(f'action == {codegen.actions_dict[action]}'): + if 'detectors' in action_params: + first = True + for detector, detector_params in action_params['detectors'].items(): + with if_block(f'detector_type == defs::{detector}', elseif=not first): + codegen.write_arg(detector_params, action, command_name) + + else_block().__enter__() + + if not action_params: + codegen.write_line(f'throw RuntimeError("detector not supported for action: {action}");') + else: + tmp_args = [] + if 'args' in action_params: + tmp_args = action_params['args'] + codegen.write_arg(tmp_args, action, command_name) + + if 'detectors' in action_params: + else_block().__exit__() + + codegen.write_line('return os.str();') + + # close sls namespace + codegen.write_closing() + codegen.close() + print('[X] .cpp code generated') + deprecated_commands = [] + codegen.write_header(header_input_path, header_output_path, commands_config, deprecated_commands_config) + print('[X] header code generated') + + + codegen.write_infer_header(infer_header_input_path, infer_header_output_path, commands_config) #TODO: add deprecated commands + print('[X] infer header code generated') + codegen.open(infer_cpp_output_path) + + codegen.write_infer_cpp(infer_cpp_input_path, infer_cpp_output_path, commands_config, non_dist, type_dist) + codegen.close() + print('[X] infer cpp code generated') + + +if __name__ == '__main__': + parser = argparse.ArgumentParser( + description='generate c++ code for cli commands from the commands.yaml file', + ) + parser.add_argument('-f', '--format', action='store_true', default=False, dest='format', + help='format header and cpp file using clang-format') + parser.add_argument('-p', '--parse', action='store_true', default=False, dest='parse', + help='parse the commands.yaml file into extended_commands.yaml') + parser.add_argument('-c', '--check', action='store_true', default=False, dest='check', + help='check missing commands') + parser.add_argument('-g', '--generate', action='store_true', default=False, dest='generate', help='generate code (C++ or bash if -a is used)') + parser.add_argument('-a', '--autocomplete', action='store_true', default=False, dest='autocomplete', + help='print bash autocomplete values') + cli_args = parser.parse_args() + + if cli_args.autocomplete: + from autocomplete.autocomplete import generate_type_values, generate_bash_autocomplete + if cli_args.generate: + generate_bash_autocomplete() + print('[X] bash autocomplete generated') + generate_bash_autocomplete( + output_path=Path(__file__).parent / 'autocomplete' / 'zsh_autocomplete.sh', + input_path=Path(__file__).parent / 'autocomplete' / 'zsh_autocomplete.in.sh' + ) + print('[X] zsh autocomplete generated') + exit(0) + else: + ret = generate_type_values() + print(ret) + exit(0) + + if cli_args.check: + from commands_parser.commands_parser import command_parser + + commands_config = yaml.unsafe_load(COMMANDS_PATH.open('r')) + + # infer action based on number of arguments and types + type_dist, non_dist = check_infer(commands=commands_config) + + command_parser.verify_format() + command_parser.parse_all_commands() + # generate list of commands found in sls_detector_get + glist_path = GEN_PATH / 'glist' + ret = subprocess.run([f"sls_detector_get list | tail -n +2 | sort > {glist_path.absolute()}"], shell=True, + capture_output=True, check=True) + if ret.stderr != b'': + print('[!] glist generation failed and glist not found') + exit(1) + + if not COMMANDS_PATH.exists(): + print('[!] extended_commands.yaml not found') + exit(1) + detglist = set(command['command_name'] for __, command in commands_config.items()) + detglist.add('free') + detglist.add('list') + + g_path = GEN_PATH / 'glist' + if not g_path.exists(): + print('[!] glist not found') + exit(1) + glist = set(g_path.read_text().split('\n')) + if "" in glist: + glist.remove("") + if "" in detglist: + detglist.remove("") + + not_found = set() + for command in glist: + if command not in detglist: + not_found.add(command) + print() + if len(not_found) > 0: + print(f'[!] found {len(not_found)} missing') + print(f"not_found: {not_found}") + else: + print(f'[X] found no missing commands') + + for command in detglist: + if command not in glist: + print(f'[!] command {command} found in commands.yaml but not found in g list') + + exit(0) + + if cli_args.parse: + from commands_parser.commands_parser import command_parser + + command_parser.verify_format() + command_parser.parse_all_commands() + + if cli_args.generate: + generate() + + if cli_args.format: + files = [CPP_OUTPUT_PATH, HEADER_OUTPUT_PATH, INFER_HEADER_OUTPUT_PATH, INFER_CPP_OUTPUT_PATH] + for file in files: + os.system(f'clang-format -i {file.absolute()}') + #os.system(f'clang-format -i --style="{{Standard: C++11}}" {file.absolute()}') + print('[X] code formatted') diff --git a/slsDetectorSoftware/generator/inferAction.in.cpp b/slsDetectorSoftware/generator/inferAction.in.cpp new file mode 100644 index 000000000..715109075 --- /dev/null +++ b/slsDetectorSoftware/generator/inferAction.in.cpp @@ -0,0 +1,20 @@ +#include "inferAction.h" +#include "sls/sls_detector_defs.h" +namespace sls { + +int InferAction::infer(sls::CmdParser &parser, std::ostream &os) { + args = parser.arguments(); + cmd = parser.command(); + auto it = functions.find(parser.command()); + if (it != functions.end()) { + return ((*this).*(it->second))(); + } else { + throw RuntimeError( + "sls_detector not implemented for command: " + parser.command() + + ". Use sls_detector_get or sls_detector_put."); + } +} + +// THIS COMMENT TO BE REPLACED BY THE ACTUAL CODE (1) - DO NOT REMOVE + +} // namespace sls \ No newline at end of file diff --git a/slsDetectorSoftware/generator/inferAction.in.h b/slsDetectorSoftware/generator/inferAction.in.h new file mode 100644 index 000000000..c9e298009 --- /dev/null +++ b/slsDetectorSoftware/generator/inferAction.in.h @@ -0,0 +1,30 @@ +#include "CmdParser.h" +#include +#include +#include + +namespace sls { +class InferAction { + public: + InferAction() {} + int infer(sls::CmdParser &parser, std::ostream &os = std::cout); + std::vector args; + std::string cmd; + + // generated functions + // THIS COMMENT TO BE REPLACED BY THE ACTUAL CODE (1) - DO NOT REMOVE + // int frames(); + + private: + using FunctionMap = std::map; + FunctionMap functions{ + // generated functions + + // THIS COMMENT TO BE REPLACED BY THE ACTUAL CODE (2) - DO NOT REMOVE + + // {"frames",&InferAction::frames} + + }; +}; + +} // namespace sls \ No newline at end of file diff --git a/slsDetectorSoftware/generator/infer_action/check_infer.py b/slsDetectorSoftware/generator/infer_action/check_infer.py new file mode 100644 index 000000000..fe88eedcc --- /dev/null +++ b/slsDetectorSoftware/generator/infer_action/check_infer.py @@ -0,0 +1,64 @@ +from pathlib import Path + +import argparse +import yaml + + +def check_infer(EXTENDED_COMMANDS_PATH=Path(__file__).parent.parent / "extended_commands.yaml", commands=None): + if commands is None: + # load yaml file + with EXTENDED_COMMANDS_PATH.open('r') as f: + commands = yaml.safe_load(f) + + type_distinguishable = {} + non_distinguishable = {} + + for command_name, command in commands.items(): + # todo: remove this (added for debug) + # if command_name != 'badchannels': + # continue + if len(command["actions"]) == 1: + action = list(command["actions"].items())[0][1] + for arg in action['args']: + if arg['argc'] == -1: + non_distinguishable[(command_name, arg['argc'])] = ([], arg['arg_types']) + continue + + + get_argcs = {} + get_args = command['actions']['GET']['args'] + for arg in get_args: + if arg['argc'] != -1: + get_argcs[arg["argc"]] = arg['arg_types'] + else: + non_distinguishable[(command_name, arg['argc'])] = ([], arg['arg_types']) + put_args = command['actions']['PUT']['args'] + for arg in put_args: + if arg['argc'] == -1: + non_distinguishable[(command_name, arg['argc'])] = ([], arg['arg_types']) + elif arg['argc'] in get_argcs: + if arg['arg_types'] != get_argcs[arg['argc']]: + type_distinguishable[(command_name, arg['argc'])] = (get_argcs[arg['argc']], arg['arg_types']) + else: + non_distinguishable[(command_name, arg['argc'])] = (get_argcs[arg['argc']], arg['arg_types']) + + return type_distinguishable, non_distinguishable + + +if __name__ == "__main__": + argparse = argparse.ArgumentParser() + argparse.add_argument("--print", choices=['all', 'type', 'impossible'], default="all", help="command name") + args = argparse.parse_args() + + type_distinguishable, non_distinguishable = check_infer() + if args.print == 'type' or args.print == 'all': + print("type distinguishable:") + print("command_name: argc get_arg_type put_arg_type\n") + for (command_name, argc), (get_arg_types, put_arg_types) in type_distinguishable.items(): + print(f"{command_name}: {argc} {get_arg_types} {put_arg_types}") + + if args.print == 'impossible' or args.print == 'all': + print("\n\nimpossible to distinguish:") + print("command_name: argc get_arg_type put_arg_type") + for (command_name, argc), (get_arg_types, put_arg_types) in non_distinguishable.items(): + print(f"{command_name}: {argc} {get_arg_types} {put_arg_types}") diff --git a/slsDetectorSoftware/generator/readme.md b/slsDetectorSoftware/generator/readme.md new file mode 100644 index 000000000..2f8db837b --- /dev/null +++ b/slsDetectorSoftware/generator/readme.md @@ -0,0 +1,288 @@ +# Generator +used to generate C++ cli commands. and bash autocompletion scripts. +## Autocomplete + +### Overview + +Looks through the `dump.json` file for the different values of an enum and stores them in the dictionary `type_values`. +```sh +# To print the different values for enums +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). +To use the bash autocompletion the `bash_autocomplete.sh` must be sourced. + +```sh +source bash_autocomplete.sh +# g will give the list of all commands +# p 0: will also give the list of all commands +# g exp will autocomplete to g exptime +# g exptime will return "s ms us ns" +# p timing will return "auto,burst_trigger,gating..." +``` + +**Note:** +The dump.json is the AST of the file `slsDetectorPackage/slsSupportLib/src/ToString.cpp`. + +```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 +# clang version used: 14.0.0-1ubuntu1.1 +``` + +the `dump.json` file produced by clang is not a correct json file because we used the `-ast-dump-filter`. autocomplete.py can be used to fix the format of `dump.json` and produce a new file called `fixed.json` that is json format. +``` +# to convert dump.json into correct json format. +python autocomplete.py -f # produces/updates the file fixed.json +``` + +### Code components + +- `type_values` is a dictionary that contains the different values for commands args. It is populated with enum values that stard with defs:: or slsDetectorDefs:: (eg. defs::burstMode). Also it contains values added manually such as "mv,mV" and those start with special:: +- `generate_type_values` parses the AST file to find the part that contains if statements. and extracts the different possible values for an enum. +- `generate_bash_autocomplete` generates autocompletion scripts for bash or zsh. the difference between zsh and bash scripts can be found in the template files. (bash handles 0: completion differently than zsh more details can be found in the comments of the template files ) +- `fix_json` fixes the file 'autocomplete/dump.json' and outputs a new corrected file in 'autocomplete/fixed.json' + +## Command Parser + +Definitely the most important component of all the generator module. + +command_parser exist to keep the commands.yaml file concise and easy to read and produce a complete version of the commands.yaml for the code generator to work on. + +The goal is that the code generator works on a version of commands.yaml that is easy to iterate over and generate code. +``` +# complete version +some_command: + help: "do this" + infer_action: true + actions: + GET: + args: + - argc: 0 + function: "getCommand" + ... + - argc: 1 + function: "getCommand" + ... + detectors: + MYTHEN3: + - argc: 0 + function: "getCommandMythen" + ... + PUT: + args: + - argc: 2 + function: "setCommand" + ... + - argc: 3 + function: "setCommand" + ... + +``` + +the complete vesion can only have `args` or `detectors` field inside an action (GET or PUT). **Each element in the args array have a different argc**. and in each element in the args array we can find all the information needed to generate the code for that one argc case. for example in the code `if(action == 'GET')` and `if (args.size() == 1)` then we can generate the code for that one case independetly. + + +commands.yaml has a lot on ~inheritance~. examples show best what it is: + +> fields insides an action will be passed to args and detectors + +> the extended args for default actions will be used for detectors + +> any field can be overriden + +``` +resetdacs: + help: "[(optional) hard] ..." + actions: + PUT: + function: resetToDefaultDacs + require_det_id: true + output: [ '"successful"' ] + input_types: [ bool ] + args: + - argc: 1 + arg_types: [ special::hard ] + input: [ '"1"' ] + - argc: 0 + input: [ '"0"' ] + +# this will be converted to + +resetdacs: + actions: + PUT: + args: + - arg_types: + - special::hard + argc: 1 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: resetToDefaultDacs + input: + - '"1"' + input_types: + - bool + output: + - '"successful"' + require_det_id: true + store_result_in_t: false + - arg_types: [] + argc: 0 + cast_input: + - false + check_det_id: false + convert_det_id: true + function: resetToDefaultDacs + input: + - '"0"' + input_types: + - bool + output: + - '"successful"' + require_det_id: true + store_result_in_t: false + command_name: resetdacs + function_alias: resetdacs + help: "[(optional) hard] ..." + infer_action: true + +``` + +command_parser does not have a specific schema for the commands.yaml this is by design so it can be very extensible and future-proof. This also can have problems when there is typos (writing intput instead of input...) + +command_parser first verifies the commands.yaml and checks if there's some obvious problems in it. + +templates found in commands.yaml were taken from the CmdProxy code they were added for debugging purposes when writing the generator. + + +tricky things: +-- +- if input array has n elements and cast_input array is empty. command_parser will fill it with n false values. +- store_result_in_t will be added by default as true to GET action. but as false to PUT action. (unless it is written in the action) +- infer_action by default is true +- commands that have is_description true won't be verified +- function_alias is the name of the function in the c++ code. by default it is the command name. errors came up with the command virtual as virtual is a reserved keyword in c++ +- command_name is the string of the command that will be typed in cli. (frames, exptime, ...). by default it is the command name. pattern is a special keyword in yaml. problems came up with the command pattern +- arg_types is by default input_types unless otherwise specified +- when the parent has specific detector behaviour and the child does not. writing an empty detector section in the action would not inherit any detector specific fields (check exptime1) +- commands can inherit other commands (check exptime1 and exptime2) +- argc: -1 means that the command has an unknown number of arguments + + +### Code Walkthrough +the code is well commented it is well explained in the script + +### Tests +tests for command_parser can be found in `generator/tests/command_parser/` +``` +pip install -r requirements.txt +python -m pytests +``` + +verification is not well tested + + + +## codegen + +Now for C++ code generation. After parsing the commands.yaml file and producing the extended_commands.yaml `gen_commands.py` will iterate over the commands and generate `Caller.h`, `Caller.cpp`, `inferAction.cpp` and `inferAction.h` . + +### infer action + +the generated code will produce 5 new targets: "sls_detector_get sls_detector_put sls_detector_acquire sls_detector_help sls_detector" + +`sls_detector_get` will set the action as GET +`sls_detector_put` will the action as PUT + +`sls_detector` will guess the action depending on the number of arguments + +the codegen module will generate a function for every command that will return the action based on the number of arguments + +```cpp +int InferAction::activate() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} +``` + +the `inferAction` class will be called from `CmdApp.cpp` to infer the action and the command function will be called with the appropriate action. + +some commands have the same number of argument count for both get and put. These commands can be found using the the `check_infer.py` script. in the generated code it will say that "sls_detector is disabled" +```bash +# to see these commands +python infer_action/check_infer.py +``` + +### Caller.cpp code + +in this level we only use the extended_commands.yaml file. +the `generate()` function in `gen_commands.py` will iterate over all of the commands and : +- write the function signature +- write the help +- write c++ code to check the inputs: check argument count and check if we are able to convert the arguments into the required types +- iterate over actions and arguments +- iterate over the detectors and write code for each one of them (if mythen3 ... if eiger ... else default code... ) and call `codegen.write_arg()` to write the argument for a single argument + +codegen.write_arg() +- +write_arg in codegen reads the argument fields and generate c++ code accordingly. + +## fields explanations +- arg_types:[array of types] it is only used for autocompletion no C++ code is dependent on it +- is_description:[boolean] same as above +- template:[boolean] only used in commands.yaml and it won't present in extended_commands.yaml. it is inspired by the CmdProxy.h code +- help:[string] command help +- input:[array of variable names] the input arguments that will be passed to the function +- input_types:[array of types] the types of the input arguments given to the function +- cast_input:[array of boolean] if true it will cast the corresponding input to the type in input_types +- output:[array] outputs that will be printed (eg. ["123", "'a'"] will be os<<123<<'a') +- function: the function that will be called +- function_alias: the name of the function in the c++ code (more on it in tricky things) +- command_name: the string of the command that will be typed in cli. (more on it in tricky things) +- require_det_id: if true it will require a detector id to be passed as the last argument +- check_det_id: if true it will check the detector id and throw an error if it is not valid +- convert_det_id: if true it will convert the detector id to the correct type `std::vector{ det_id }` +- store_result_in_t: if true it will store the result of the function in the variable t (more on it in tricky things) +- infer_action: if true it will infer the action (only if sls_detector is used) +- detectors: the detectors that have specific behaviour +- args: the arguments of the command +- argc: the number of arguments +- extra_variables[array]: each element takes three parameters: value, name, type and creates that variable in the beginning of the argument code +- exceptions[array]: each element takes two parameters: condition, message +- pattern_command: takes three arguments: nGetArgs, nPutArgs and command_name and it will write this code + ```cpp + int level = -1, iArg = 0, nGetArgs = $nGetArgs$, nPutArgs = $nPutArgs$; + GetLevelAndUpdateArgIndex(action, $command_name$, level, iArg, nGetArgs,nPutArgs); + ``` +- separate_time_units: takes three parameters: input, output[0], output[1] each one is a variable name + ```cpp + std::string tmp_time($input$); + std::string $output[1]$ = RemoveUnit(tmp_time); + auto $output[0]$ = StringTo(tmp_time, $output[1]$); + ``` +- convert_to_time: takes three parameters: input[0], input[1], output + ```cpp + auto output = StringTo(input[0], input[1]); + ``` +- ctb_output_list: **maybe it should be removed?** takes 5 parameters: GETFCNLIST, GETFCNNAME, GETFCN, suffix, printable_name + + + + + + + diff --git a/slsDetectorSoftware/generator/requirements.txt b/slsDetectorSoftware/generator/requirements.txt new file mode 100644 index 000000000..049320b14 --- /dev/null +++ b/slsDetectorSoftware/generator/requirements.txt @@ -0,0 +1,6 @@ +coverage==7.3.1 +iniconfig==2.0.0 +packaging==23.1 +pluggy==1.3.0 +pytest==7.4.2 +PyYAML==6.0.1 diff --git a/slsDetectorSoftware/generator/tests/command_parser/data/basic.yaml b/slsDetectorSoftware/generator/tests/command_parser/data/basic.yaml new file mode 100644 index 000000000..b684b39e5 --- /dev/null +++ b/slsDetectorSoftware/generator/tests/command_parser/data/basic.yaml @@ -0,0 +1,16 @@ +basic: + infer_action: false + help: "xx11" + actions: + GET: + function: 'func1' + output: [ OutString(t) ] + args: + - argc: 0 + PUT: + function: 'func2' + output: [ 'args.front()' ] + input: [ 'args[0]' ] + input_types: [ int ] + cast_input: [ true ] + argc: 1 diff --git a/slsDetectorSoftware/generator/tests/command_parser/data/basic_inheritance.yaml b/slsDetectorSoftware/generator/tests/command_parser/data/basic_inheritance.yaml new file mode 100644 index 000000000..cb9365809 --- /dev/null +++ b/slsDetectorSoftware/generator/tests/command_parser/data/basic_inheritance.yaml @@ -0,0 +1,66 @@ +--- +template: + infer_action: false + help: "" + actions: + GET: + function: 'func1' + args: + - argc: 0 + output: [ OutString(t) ] + PUT: + function: 'func2' + output: [ 'args.front()' ] + input: [ 'args[0]' ] + input_types: [ int ] + cast_input: [ true ] + argc: 1 + +basic: + help: "xx11" + inherit_actions: template + actions: + GET: + function: 'x' + argc: 2 + args: + - check_det_id: true + + +template2: + infer_action: false + template: true + help: "" + actions: + GET: + convert_to_time: + input: [ 'args[0]', 'args[1]' ] + output: converted_time + separate_time_units: + input: 'args[0]' + output: [ converted_time, unit ] + function: 'func1' + output: [ OutString(t) ] + args: + - argc: 0 + - argc: 99 + PUT: + function: funcTemplatePUT + args: + - argc: 19 + function: 'func19' + - argc: 91 + +basic2: + inherit_actions: template2 + actions: + GET: + function: 'x' + argc: 2 + args: + - check_det_id: true + input: [ 'args[0]', a,b,c ] + input_types: [ int, int, int, int ] + PUT: + function: 'y' + diff --git a/slsDetectorSoftware/generator/tests/command_parser/data/detectors.yaml b/slsDetectorSoftware/generator/tests/command_parser/data/detectors.yaml new file mode 100644 index 000000000..3e12394eb --- /dev/null +++ b/slsDetectorSoftware/generator/tests/command_parser/data/detectors.yaml @@ -0,0 +1,208 @@ +basic: + infer_action: false + help: "xx11" + actions: + GET: + function: 'func1' + output: [ OutString(t) ] + args: + - argc: 0 + - argc : 1 + output: [ testytest ] + detectors: + MYTHEN3: + function: 'do_mythen3' + CHIPTESTBOARD: + args: + - argc: 55 + output: [ ctbOutput ] + PUT: + detectors: + EIGER: + function: 'do_eiger' + argc: 99 + output: [ eigerOutput ] + + +# classes of tests: +# classes of template tests: has args or has detectors => 4 cases noted (0,0) ... (1,1) +# classes of childs: has args or has detectors => 4 cases noted (0,0) ... (1,1) +# => 16 cases +# example: case_0111: template (0,1) and child (1,1) +#################### exhaustive testing over chosen classes of tests + +template_01: + infer_action: true + help: "vv12" + template: true + + actions: + GET: + detectors: + MYTHEN3: + function: 'do_mythen3' + argc: 99 + CHIPTESTBOARD: + function: 'do_ctb' + argc: 98 + +case_0100: + inherit_actions: template_01 + help: "0100" + +case_0101: + inherit_actions: template_01 + help: "0101" + actions: + GET: + function: 'get_function' + detectors: + MYTHEN3: + function: 'do_mythen23' + argc: 420 + +case_0110: + inherit_actions: template_01 + help: "0110" + actions: + GET: + argc: 111 + function: 'get_function' + +case_0110v2: + inherit_actions: template_01 + help: "0110v2" + actions: + GET: + args: + - argc: 111 + function: 'get_function' + + +case_0111: + inherit_actions: template_01 + help: "0111" + actions: + GET: + args: + - argc: 111 + function: 'get_function' + detectors: + MYTHEN3: + function: 'do_mythen23' + argc: 420 + +##### cases 10** tests +template_10: + template: true + actions: + GET: + args: + - argc: 0 + - argc : 1 + output: [ testytest ] + +case_1000: + inherit_actions: template_10 + help: "1000" + +case_1001: + inherit_actions: template_10 + help: "1001" + actions: + GET: + detectors: + MYTHEN3: + args: + - function: 'do_mythen23' + argc: 420 + - function: 'do_mythen3' + argc: 99 + + + +case_1010: + inherit_actions: template_10 + help: "1010" + actions: + GET: + args: + - argc: 111 + function: 'get_function' + +case_1011: + inherit_actions: template_10 + help: "1011" + actions: + GET: + args: + - argc: 111 + function: 'get_function' + detectors: + MYTHEN3: + function: 'do_mythen23' + +##### cases 11** tests +template_11: + template: true + actions: + GET: + args: + - argc: 0 + - argc : 1 + output: [ testytest ] + detectors: + EIGER: + function: 'do_eiger' + args: + - argc: 99 + output: [ eigerOutput ] + POTATO: + function: 'do_potato' + + +case_1100: + inherit_actions: template_11 + help: "1100" + +case_1101: + inherit_actions: template_11 + help: "1101" + actions: + GET: + detectors: + MYTHEN3: + function: 'do_mythen3' + POTATO: + function: 'do_potato' + args: + - argc: 101 + function: 'potato_function' + - argc: 202 + +case_1110: + inherit_actions: template_11 + help: "1110" + actions: + GET: + argc: 77 + function: 'get_function' + + + +case_1111: + inherit_actions: template_11 + help: "1111" + actions: + GET: + argc: 77 + function: 'get_function' + detectors: + MYTHEN3: + function: 'do_mythen3' + POTATO: + function: 'do_potato' + args: + - argc: 101 + function: 'potato_function' + - argc: 202 \ No newline at end of file diff --git a/slsDetectorSoftware/generator/tests/command_parser/functional_tests/test_commands_parser_basic.py b/slsDetectorSoftware/generator/tests/command_parser/functional_tests/test_commands_parser_basic.py new file mode 100644 index 000000000..53d0e1d0a --- /dev/null +++ b/slsDetectorSoftware/generator/tests/command_parser/functional_tests/test_commands_parser_basic.py @@ -0,0 +1,101 @@ +from pathlib import Path + +import yaml + +from commands_parser.commands_parser import CommandParser + +data_path = Path(__file__).parent.parent / "data" + + +def test_basic_propagation(tmp_path): + output_file = tmp_path / "basic.yaml" + command_parser = CommandParser(commands_file=data_path / "basic.yaml", output_file=output_file) + command_parser.verify_format() + command_parser.parse_all_commands() + + assert output_file.exists() + command = yaml.unsafe_load(output_file.open('r'))['basic'] + assert command['help'] == "xx11" + assert len(command['actions']) == 2 + # test 'GET' action + assert 'args' in command['actions']['GET'] + assert len(command['actions']['GET'].keys()) == 1 # only 'args' key + assert len(command['actions']['GET']['args']) == 1 # only one argument + assert command['actions']['GET']['args'][0]['argc'] == 0 + assert command['actions']['GET']['args'][0]['function'] == 'func1' + assert command['actions']['GET']['args'][0]['output'] == ['OutString(t)'] + assert command['actions']['GET']['args'][0]['input'] == [] + assert command['actions']['GET']['args'][0]['cast_input'] == [] + assert command['actions']['GET']['args'][0]['require_det_id'] is False + # test PUT action + assert 'args' in command['actions']['PUT'] + assert len(command['actions']['PUT'].keys()) == 1 # only 'args' key + assert len(command['actions']['PUT']['args']) == 1 # only one argument + assert command['actions']['PUT']['args'][0]['argc'] == 1 + assert command['actions']['PUT']['args'][0]['function'] == 'func2' + assert command['actions']['PUT']['args'][0]['cast_input'] == [True] + assert command['actions']['PUT']['args'][0]['output'] == ['args.front()'] + assert command['actions']['PUT']['args'][0]['input_types'] == ['int'] + assert command['actions']['PUT']['args'][0]['require_det_id'] is False + + +def test_basic_inheritance(tmp_path): + output_file = tmp_path / "basic_inheritance.yaml" + command_parser = CommandParser(commands_file=data_path / "basic_inheritance.yaml", output_file=output_file) + command_parser.verify_format() + command_parser.parse_all_commands() + assert output_file.exists() + command = yaml.unsafe_load(output_file.open('r'))['basic'] + assert command['help'] == "xx11" + assert command['actions'].keys() == {'GET', 'PUT'} + # test 'GET' action + assert 'args' in command['actions']['GET'] + assert command['actions']['GET'].keys() == {'args'} # only 'args' key + assert len(command['actions']['GET']['args']) == 1 # only one argument + assert command['actions']['GET']['args'][0]['argc'] == 2 + assert command['actions']['GET']['args'][0]['function'] == 'x' + assert command['actions']['GET']['args'][0]['output'] == [] # test overwriting args when they are present in child + assert command['actions']['GET']['args'][0]['input'] == [] + assert command['actions']['GET']['args'][0]['cast_input'] == [] + assert command['actions']['GET']['args'][0]['require_det_id'] is False + # test PUT action + assert 'args' in command['actions']['PUT'] + assert command['actions']['PUT'].keys() == {'args'} # only 'args' key + assert len(command['actions']['PUT']['args']) == 1 # only one argument + assert command['actions']['PUT']['args'][0]['argc'] == 1 + assert command['actions']['PUT']['args'][0]['function'] == 'func2' + assert command['actions']['PUT']['args'][0]['cast_input'] == [True] + assert command['actions']['PUT']['args'][0]['output'] == ['args.front()'] + assert command['actions']['PUT']['args'][0]['input_types'] == ['int'] + assert command['actions']['PUT']['args'][0]['require_det_id'] is False + + +def test_basic_inheritance2(tmp_path): + output_file = tmp_path / "basic_inheritance.yaml" + command_parser = CommandParser(commands_file=data_path / "basic_inheritance.yaml", output_file=output_file) + command_parser.verify_format() + command_parser.parse_all_commands() + assert output_file.exists() + command = yaml.unsafe_load(output_file.open('r'))['basic2'] + # check GET + assert len(command['actions']['GET']['args']) == 1 + assert command['actions']['GET'].keys() == {'args'} + arg = command['actions']['GET']['args'][0] + assert arg['argc'] == 2 + assert arg['output'] == ['OutString(t)'] + # check that length of cast input is equal to length of input_types and input + assert len(arg['input']) == len(arg['input_types']) == len(arg['cast_input']) == 4 + assert arg['function'] == 'x' + assert 'convert_to_time' in arg + assert arg['convert_to_time'].keys() == {'input', 'output'} + assert 'separate_time_units' in arg + assert arg['separate_time_units'].keys() == {'input', 'output'} + + # check PUT + assert command['actions']['PUT'].keys() == {'args'} + assert len(command['actions']['PUT']['args']) == 2 + assert command['actions']['PUT']['args'][0]['argc'] == 19 + assert command['actions']['PUT']['args'][0]['function'] == 'y' + assert command['actions']['PUT']['args'][1]['argc'] == 91 + assert command['actions']['PUT']['args'][1]['function'] == 'y' + diff --git a/slsDetectorSoftware/generator/tests/command_parser/functional_tests/test_commands_parser_detector.py b/slsDetectorSoftware/generator/tests/command_parser/functional_tests/test_commands_parser_detector.py new file mode 100644 index 000000000..cfbff4b9f --- /dev/null +++ b/slsDetectorSoftware/generator/tests/command_parser/functional_tests/test_commands_parser_detector.py @@ -0,0 +1,309 @@ +import json +from pathlib import Path + +import pytest as pytest +import yaml + +from commands_parser.commands_parser import CommandParser + +data_path = Path(__file__).parent.parent / "data" + + +@pytest.fixture() +def detector_file_commands(tmp_path): + output_file = tmp_path / "detectors.yaml" + command_parser = CommandParser(commands_file=data_path / "detectors.yaml", output_file=output_file) + command_parser.verify_format() + + def func(command): + return command_parser.parse_command(command) + + return func + + +def test_basic_propagation(tmp_path, detector_file_commands): + command = detector_file_commands('basic') + + assert command['help'] == "xx11" + + # GET + assert command['actions']['GET'].keys() == {'detectors', 'args'} + assert command['actions']['GET']['detectors'].keys() == {'MYTHEN3', 'CHIPTESTBOARD'} + mythen = command['actions']['GET']['detectors']['MYTHEN3'] + assert len(mythen) == 2 + assert mythen[0]['argc'] == 0 + assert mythen[1]['argc'] == 1 + assert mythen[0]['function'] == mythen[1]['function'] == 'do_mythen3' + assert mythen[0]['output'] == ['OutString(t)'] + assert mythen[1]['output'] == ['testytest'] + + ctb = command['actions']['GET']['detectors']['CHIPTESTBOARD'] + assert len(ctb) == 1 + assert ctb[0]['argc'] == 55 + assert ctb[0]['function'] == 'func1' + + # PUT + assert command['actions']['PUT'].keys() == {'detectors'} + assert command['actions']['PUT']['detectors'].keys() == {'EIGER'} + eiger = command['actions']['PUT']['detectors']['EIGER'] + assert len(eiger) == 1 + assert eiger[0]['argc'] == 99 + assert eiger[0]['function'] == 'do_eiger' + assert eiger[0]['output'] == ['eigerOutput'] + +# 16 test cases for inheritance +# 1st bit: parent has args +# 2nd bit: parent has detectors +# 3rd bit: child has args +# 4th bit: child has detectors +# each test case is a combination of the above bits +# all the possible combinations are tested + +def test_inheritance_0100(tmp_path, detector_file_commands): + command = detector_file_commands('case_0100') + assert command['help'] == "0100" + assert 'actions' in command + assert command['actions'].keys() == {'GET'} + assert command['actions']['GET'].keys() == {'detectors'} + assert command['actions']['GET']['detectors'].keys() == {'MYTHEN3', 'CHIPTESTBOARD'} + mythen = command['actions']['GET']['detectors']['MYTHEN3'] + assert len(mythen) == 1 + assert mythen[0]['argc'] == 99 + assert mythen[0]['function'] == 'do_mythen3' + + +def test_inheritance_0101(tmp_path, detector_file_commands): + command = detector_file_commands('case_0101') + assert command['help'] == "0101" + assert 'actions' in command + assert command['actions'].keys() == {'GET'} + assert command['actions']['GET'].keys() == {'detectors'} + assert command['actions']['GET']['detectors'].keys() == {'MYTHEN3', 'CHIPTESTBOARD'} + mythen = command['actions']['GET']['detectors']['MYTHEN3'] + assert len(mythen) == 1 + assert mythen[0]['argc'] == 420 + assert mythen[0]['function'] == 'do_mythen23' + ctb = command['actions']['GET']['detectors']['CHIPTESTBOARD'] + assert len(ctb) == 1 + assert ctb[0]['argc'] == 98 + assert ctb[0]['function'] == 'do_ctb' + + +def test_inheritance_0110(tmp_path, detector_file_commands): + command = detector_file_commands('case_0110') + assert command['help'] == "0110" + assert 'actions' in command + assert command['actions'].keys() == {'GET'} + assert command['actions']['GET'].keys() == {'args', 'detectors'} + assert command['actions']['GET']['args'][0]['argc'] == 111 + mythen = command['actions']['GET']['detectors']['MYTHEN3'] + assert len(mythen) == 1 + assert mythen[0]['argc'] == 99 + assert mythen[0]['function'] == 'do_mythen3' + ctb = command['actions']['GET']['detectors']['CHIPTESTBOARD'] + assert len(ctb) == 1 + assert ctb[0]['argc'] == 98 + assert ctb[0]['function'] == 'do_ctb' + + +def test_inheritance_0110v2(tmp_path, detector_file_commands): + command = detector_file_commands('case_0110v2') + assert command['help'] == "0110v2" + assert 'actions' in command + assert command['actions'].keys() == {'GET'} + assert command['actions']['GET'].keys() == {'args', 'detectors'} + assert command['actions']['GET']['args'][0]['argc'] == 111 + mythen = command['actions']['GET']['detectors']['MYTHEN3'] + assert len(mythen) == 1 + assert mythen[0]['argc'] == 99 + assert mythen[0]['function'] == 'do_mythen3' + ctb = command['actions']['GET']['detectors']['CHIPTESTBOARD'] + assert len(ctb) == 1 + assert ctb[0]['argc'] == 98 + assert ctb[0]['function'] == 'do_ctb' + + +def test_inheritacnce_0111(tmp_path, detector_file_commands): + command = detector_file_commands('case_0111') + assert command['help'] == "0111" + assert 'actions' in command + assert command['actions'].keys() == {'GET'} + assert command['actions']['GET'].keys() == {'args', 'detectors'} + assert command['actions']['GET']['detectors'].keys() == {'MYTHEN3', 'CHIPTESTBOARD'} + mythen = command['actions']['GET']['detectors']['MYTHEN3'] + assert len(mythen) == 1 + assert command['actions']['GET']['args'][0]['argc'] == 111 + assert len(mythen) == 1 + assert mythen[0]['argc'] == 420 + assert mythen[0]['function'] == 'do_mythen23' + ctb = command['actions']['GET']['detectors']['CHIPTESTBOARD'] + assert len(ctb) == 1 + assert ctb[0]['argc'] == 98 + assert ctb[0]['function'] == 'do_ctb' + + +# cases 1000, 1001, 1010, 1011 +def test_inheritance_1000(tmp_path, detector_file_commands): + command = detector_file_commands('case_1000') + assert command['help'] == "1000" + assert 'actions' in command + assert command['actions'].keys() == {'GET'} + assert command['actions']['GET'].keys() == {'args'} + assert len(command['actions']['GET']['args']) == 2 + assert command['actions']['GET']['args'][0]['argc'] == 0 + assert command['actions']['GET']['args'][0]['output'] == [] + + assert command['actions']['GET']['args'][1]['argc'] == 1 + assert command['actions']['GET']['args'][1]['output'] == ['testytest'] + + +def test_inheritance_1001(tmp_path, detector_file_commands): + command = detector_file_commands('case_1001') + assert command['help'] == "1001" + assert 'actions' in command + assert command['actions'].keys() == {'GET'} + assert command['actions']['GET'].keys() == {'args', 'detectors'} + assert len(command['actions']['GET']['args']) == 2 + assert command['actions']['GET']['args'][0]['argc'] == 0 + assert command['actions']['GET']['args'][0]['output'] == [] + assert command['actions']['GET']['args'][1]['argc'] == 1 + assert command['actions']['GET']['args'][1]['output'] == ['testytest'] + + assert command['actions']['GET']['detectors'].keys() == {'MYTHEN3'} + assert len(command['actions']['GET']['detectors']['MYTHEN3']) == 2 + assert command['actions']['GET']['detectors']['MYTHEN3'][0]['argc'] == 420 + assert command['actions']['GET']['detectors']['MYTHEN3'][0]['function'] == 'do_mythen23' + assert command['actions']['GET']['detectors']['MYTHEN3'][1]['argc'] == 99 + assert command['actions']['GET']['detectors']['MYTHEN3'][1]['function'] == 'do_mythen3' + + +def test_inheritance_1010(tmp_path, detector_file_commands): + command = detector_file_commands('case_1010') + assert command['help'] == "1010" + assert 'actions' in command + assert command['actions'].keys() == {'GET'} + assert command['actions']['GET'].keys() == {'args'} + assert len(command['actions']['GET']['args']) == 1 + assert command['actions']['GET']['args'][0]['argc'] == 111 + assert command['actions']['GET']['args'][0]['function'] == 'get_function' + + +def test_inheritance_1011(tmp_path, detector_file_commands): + command = detector_file_commands('case_1011') + assert command['help'] == "1011" + assert 'actions' in command + assert command['actions'].keys() == {'GET'} + assert command['actions']['GET'].keys() == {'args', 'detectors'} + assert len(command['actions']['GET']['args']) == 1 + assert command['actions']['GET']['args'][0]['argc'] == 111 + assert command['actions']['GET']['args'][0]['function'] == 'get_function' + + assert command['actions']['GET']['detectors'].keys() == {'MYTHEN3'} + assert len(command['actions']['GET']['detectors']['MYTHEN3']) == 1 + assert command['actions']['GET']['detectors']['MYTHEN3'][0]['argc'] == 111 + assert command['actions']['GET']['detectors']['MYTHEN3'][0]['function'] == 'do_mythen23' + + +# cases 1100, 1101, 1110, 1111 + +def test_inheritance_1100(tmp_path, detector_file_commands): + command = detector_file_commands('case_1100') + assert command['help'] == "1100" + assert 'actions' in command + assert command['actions'].keys() == {'GET'} + assert command['actions']['GET'].keys() == {'args', 'detectors'} + assert len(command['actions']['GET']['args']) == 2 + assert command['actions']['GET']['args'][0]['argc'] == 0 + assert command['actions']['GET']['args'][0]['output'] == [] + + assert command['actions']['GET']['args'][1]['argc'] == 1 + assert command['actions']['GET']['args'][1]['output'] == ['testytest'] + + assert command['actions']['GET']['detectors'].keys() == {'EIGER', 'POTATO'} + assert len(command['actions']['GET']['detectors']['EIGER']) == 1 + assert command['actions']['GET']['detectors']['EIGER'][0]['argc'] == 99 + assert command['actions']['GET']['detectors']['EIGER'][0]['function'] == 'do_eiger' + assert command['actions']['GET']['detectors']['EIGER'][0]['output'] == ['eigerOutput'] + + assert len(command['actions']['GET']['detectors']['POTATO']) == 2 + assert command['actions']['GET']['detectors']['POTATO'][0]['argc'] == 0 + assert command['actions']['GET']['detectors']['POTATO'][0]['function'] == 'do_potato' + + +def test_inheritance_1101(tmp_path, detector_file_commands): + command = detector_file_commands('case_1101') + assert command['help'] == "1101" + assert 'actions' in command + assert command['actions'].keys() == {'GET'} + assert command['actions']['GET'].keys() == {'args', 'detectors'} + assert len(command['actions']['GET']['args']) == 2 + assert command['actions']['GET']['args'][0]['argc'] == 0 + assert command['actions']['GET']['args'][0]['output'] == [] + assert command['actions']['GET']['args'][1]['argc'] == 1 + assert command['actions']['GET']['args'][1]['output'] == ['testytest'] + + assert command['actions']['GET']['detectors'].keys() == {'EIGER', 'MYTHEN3', 'POTATO'} + assert len(command['actions']['GET']['detectors']['MYTHEN3']) == 2 + assert command['actions']['GET']['detectors']['MYTHEN3'][0]['argc'] == 0 + assert command['actions']['GET']['detectors']['MYTHEN3'][0]['function'] == 'do_mythen3' + assert command['actions']['GET']['detectors']['MYTHEN3'][1]['argc'] == 1 + assert command['actions']['GET']['detectors']['MYTHEN3'][1]['function'] == 'do_mythen3' + + assert len(command['actions']['GET']['detectors']['EIGER']) == 1 + assert command['actions']['GET']['detectors']['EIGER'][0]['argc'] == 99 + assert command['actions']['GET']['detectors']['EIGER'][0]['function'] == 'do_eiger' + assert command['actions']['GET']['detectors']['EIGER'][0]['output'] == ['eigerOutput'] + + assert len(command['actions']['GET']['detectors']['POTATO']) == 2 + assert command['actions']['GET']['detectors']['POTATO'][0]['argc'] == 101 + assert command['actions']['GET']['detectors']['POTATO'][0]['function'] == 'potato_function' + assert command['actions']['GET']['detectors']['POTATO'][1]['argc'] == 202 + assert command['actions']['GET']['detectors']['POTATO'][1]['function'] == 'do_potato' + + +def test_inheritance_1110(tmp_path, detector_file_commands): + command = detector_file_commands('case_1110') + assert command['help'] == "1110" + assert 'actions' in command + assert command['actions'].keys() == {'GET'} + assert command['actions']['GET'].keys() == {'args', 'detectors'} + assert len(command['actions']['GET']['args']) == 1 + assert command['actions']['GET']['args'][0]['argc'] == 77 + assert command['actions']['GET']['args'][0]['function'] == 'get_function' + + assert command['actions']['GET']['detectors'].keys() == {'EIGER', 'POTATO'} + assert len(command['actions']['GET']['detectors']['EIGER']) == 1 + assert command['actions']['GET']['detectors']['EIGER'][0]['argc'] == 99 + assert command['actions']['GET']['detectors']['EIGER'][0]['function'] == 'do_eiger' + + assert len(command['actions']['GET']['detectors']['POTATO']) == 2 + assert command['actions']['GET']['detectors']['POTATO'][0]['argc'] == 0 + assert command['actions']['GET']['detectors']['POTATO'][0]['function'] == 'do_potato' + assert command['actions']['GET']['detectors']['POTATO'][1]['argc'] == 1 + assert command['actions']['GET']['detectors']['POTATO'][1]['function'] == 'do_potato' + + +def test_inheritance_1111(tmp_path, detector_file_commands): + command = detector_file_commands('case_1111') + assert command['help'] == "1111" + assert 'actions' in command + assert command['actions'].keys() == {'GET'} + assert command['actions']['GET'].keys() == {'args', 'detectors'} + assert len(command['actions']['GET']['args']) == 1 + assert command['actions']['GET']['args'][0]['argc'] == 77 + assert command['actions']['GET']['args'][0]['function'] == 'get_function' + + assert command['actions']['GET']['detectors'].keys() == {'EIGER', 'MYTHEN3', 'POTATO'} + assert len(command['actions']['GET']['detectors']['MYTHEN3']) == 1 + assert command['actions']['GET']['detectors']['MYTHEN3'][0]['argc'] == 77 + assert command['actions']['GET']['detectors']['MYTHEN3'][0]['function'] == 'do_mythen3' + + assert len(command['actions']['GET']['detectors']['EIGER']) == 1 + assert command['actions']['GET']['detectors']['EIGER'][0]['argc'] == 99 + assert command['actions']['GET']['detectors']['EIGER'][0]['function'] == 'do_eiger' + + assert len(command['actions']['GET']['detectors']['POTATO']) == 2 + assert command['actions']['GET']['detectors']['POTATO'][0]['argc'] == 101 + assert command['actions']['GET']['detectors']['POTATO'][0]['function'] == 'potato_function' + assert command['actions']['GET']['detectors']['POTATO'][1]['argc'] == 202 + assert command['actions']['GET']['detectors']['POTATO'][1]['function'] == 'do_potato' diff --git a/slsDetectorSoftware/generator/tests/test_parse_and_generate.py b/slsDetectorSoftware/generator/tests/test_parse_and_generate.py new file mode 100644 index 000000000..333c667b8 --- /dev/null +++ b/slsDetectorSoftware/generator/tests/test_parse_and_generate.py @@ -0,0 +1,29 @@ +from pathlib import Path +from commands_parser.commands_parser import CommandParser +import gen_commands + +data_path = Path(__file__).parent.parent + + +def test_parse_and_generate(tmp_path): + """ + tests that the parse and generate functions work without errors + :param tmp_path: + :return: + """ + output_file = tmp_path / "detectors.yaml" + command_parser = CommandParser(commands_file=data_path / "commands.yaml", output_file=output_file) + command_parser.verify_format() + command_parser.parse_all_commands() + assert output_file.exists() + + GEN_PATH = Path(__file__).parent.parent + gen_commands.generate( + output_file, + GEN_PATH / "Caller.in.cpp", + GEN_PATH / "Caller.in.h", + tmp_path / "Caller.cpp", + tmp_path / "Caller.h", + ) + assert (tmp_path / "Caller.cpp").exists() + assert (tmp_path / "Caller.h").exists() diff --git a/slsDetectorSoftware/generator/very_special_functions.txt b/slsDetectorSoftware/generator/very_special_functions.txt new file mode 100644 index 000000000..63ee9c104 --- /dev/null +++ b/slsDetectorSoftware/generator/very_special_functions.txt @@ -0,0 +1,28 @@ +hostname (find +) +acquire +versions (maybe with few tweaks) +threshold (+++++) +trimen (maybe with few tweaks) +badchannels (somewhat special) +currentsource (special) +dacvalues (can be done with the ctb_output_list) +udp_srcip (could be done if I add condition functionality for logging) +udp_srcip2 (same as above) +udp_dstip (same as above) +udp_dstip2 +rx_hostname (split('+')) +rx_roi (can be done if there;s condition support?) +ratecorr (can be done if there's condition support?) +burstmode (very special) +vetostream +counters +gaincaps (has for loop and condition) +samples (ask Dhanya if it is okay to change the order of calling the ctb functions in PUT) +slowadc (has for loop) +rx_dbitlist (very special) +rx_jsonaddheader (very special) +execcommand (has for loop) +thresholdnotb +# notes +# ReceiverStatus error on put is not done +# ask about burstmode function diff --git a/slsDetectorSoftware/include/sls/Detector.h b/slsDetectorSoftware/include/sls/Detector.h index 7467789aa..04abc8dba 100644 --- a/slsDetectorSoftware/include/sls/Detector.h +++ b/slsDetectorSoftware/include/sls/Detector.h @@ -20,7 +20,7 @@ class IpAddr; // Free function to avoid dependence on class // and avoid the option to free another objects // shm by mistake -void freeSharedMemory(int detectorIndex, int moduleIndex = -1); +void freeSharedMemory(const int detectorIndex = 0, const int moduleIndex = -1); /** * \class Detector @@ -46,9 +46,13 @@ class Detector { Detector(int shm_id = 0); ~Detector(); - /** Free the shared memory of this detector and all modules - belonging to it */ - void freeSharedMemory(); + // Disable copy since SharedMemory object is unique in DetectorImpl + Detector(const Detector &other) = delete; + Detector &operator=(const Detector &other) = delete; + + // Move constructor and assignment operator + Detector(Detector &&other) noexcept; + Detector &operator=(Detector &&other) noexcept; /** Frees shared memory before loading configuration file. Set up once normally */ @@ -71,7 +75,6 @@ class Detector { /** Gets shared memory ID */ int getShmId() const; - /** package git branch */ std::string getPackageVersion() const; std::string getClientVersion() const; @@ -99,7 +102,7 @@ class Detector { Result getReceiverVersion(Positions pos = {}) const; /** Options: EIGER, JUNGFRAU, GOTTHARD, MOENCH, MYTHEN3, GOTTHARD2, - * CHIPTESTBOARD */ + * CHIPTESTBOARD, XILINX_CHIPTESTBOARD */ Result getDetectorType(Positions pos = {}) const; /** Gets the total number of modules in shared memory */ @@ -304,11 +307,11 @@ class Detector { void setNumberOfTriggers(int64_t value); - /** [Gotthard][Jungfrau][Moench][Eiger][CTB][Gotthard2] \n + /** [Gotthard][Jungfrau][Moench][Eiger][CTB][Xilinx CTB][Gotthard2] \n * [Mythen3] use function with gate index **/ Result getExptime(Positions pos = {}) const; - /** [Gotthard][Jungfrau][Moench][Eiger][CTB][Gotthard2] \n + /** [Gotthard][Jungfrau][Moench][Eiger][CTB][Xilinx CTB][Gotthard2] \n * [Mythen3] sets exptime for all gate signals. To specify gate index, use * function with gate index **/ void setExptime(ns t, Positions pos = {}); @@ -317,25 +320,25 @@ class Detector { void setPeriod(ns t, Positions pos = {}); - /** [Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2] */ + /** [Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2][Xilinx CTB] */ Result getDelayAfterTrigger(Positions pos = {}) const; - /** [Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2] */ + /** [Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2][Xilinx CTB] */ void setDelayAfterTrigger(ns value, Positions pos = {}); - /** [Gotthard][Jungfrau][Moench][CTB][Mythen3] + /** [Gotthard][Jungfrau][Moench][CTB][Mythen3][Xilinx CTB] * [Gotthard2] only in continuous auto mode */ Result getNumberOfFramesLeft(Positions pos = {}) const; - /** [Gotthard][Jungfrau][Moench][CTB][Mythen3] + /** [Gotthard][Jungfrau][Moench][CTB][Mythen3][Xilinx CTB] * Only when external trigger used */ Result getNumberOfTriggersLeft(Positions pos = {}) const; - /** [Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2] + /** [Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2][Xilinx CTB] * [Gotthard2] only in continuous mode */ Result getPeriodLeft(Positions pos = {}) const; - /** [Gotthard][Jungfrau][Moench][CTB][Mythen3] + /** [Gotthard][Jungfrau][Moench][CTB][Mythen3][Xilinx CTB] * [Gotthard2] only in continuous mode */ Result getDelayAfterTriggerLeft(Positions pos = {}) const; @@ -344,7 +347,7 @@ class Detector { /** * [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 - * [Jungfrau][Moench][Gotthard][Ctb][Mythen3][Gotthard2] 16 + * [Jungfrau][Moench][Gotthard][CTB][Mythen3][Gotthard2][Xilinx CTB] 16 */ void setDynamicRange(int value); @@ -354,21 +357,21 @@ class Detector { Result getTimingMode(Positions pos = {}) const; /** - * [Gotthard][Jungfrau][Moench][Gotthard][CTB][Gotthard2] Options: - * AUTO_TIMING, TRIGGER_EXPOSURE \n - * [Mythen3] Options: AUTO_TIMING, TRIGGER_EXPOSURE, GATED, TRIGGER_GATED \n - * [Eiger] Options: AUTO_TIMING, TRIGGER_EXPOSURE, GATED, BURST_TRIGGER + * [Gotthard][Jungfrau][Moench][Gotthard][CTB][Gotthard2][Xilinx CTB] + * Options: AUTO_TIMING, TRIGGER_EXPOSURE \n [Mythen3] Options: AUTO_TIMING, + * TRIGGER_EXPOSURE, GATED, TRIGGER_GATED \n [Eiger] Options: AUTO_TIMING, + * TRIGGER_EXPOSURE, GATED, BURST_TRIGGER */ void setTimingMode(defs::timingMode value, Positions pos = {}); /** list of possible timing modes for this detector */ std::vector getTimingModeList() const; - /** [Eiger][Jungfrau][Moench][Gotthard2] */ + /** [Eiger][Jungfrau][Moench][Gotthard2][Mythen3] */ Result getReadoutSpeed(Positions pos = {}) const; /** [Eiger][Jungfrau][Moench][Gotthard2] - * [Jungfrau] Options: FULL_SPEED, HALF_SPEED (Default), + * [Jungfrau][Mythen3] Options: FULL_SPEED, HALF_SPEED (Default), * QUARTER_SPEED \n [Moench] Options: FULL_SPEED (Default) \n [Eiger] * Options: FULL_SPEED (Default), HALF_SPEED, QUARTER_SPEED \n [Gotthard2] * Options: G2_108MHZ (Default), G2_144MHZ \n [Jungfrau][Moench] FULL_SPEED @@ -430,7 +433,8 @@ class Detector { /** [Mythen3][Gotthard2] */ Result getClockPhase(int clkIndex, Positions pos = {}); - /** [Mythen3][Gotthard2] absolute phase shift */ + /** [Mythen3][Gotthard2] absolute phase shift \n + * [Gotthard2] clkIndex: 0-5, [Mythen3] clkIndex 0 only */ void setClockPhase(int clkIndex, int value, Positions pos = {}); /** [Mythen3][Gotthard2] */ @@ -439,13 +443,15 @@ class Detector { /** [Mythen3][Gotthard2] */ Result getClockPhaseinDegrees(int clkIndex, Positions pos = {}); - /** [Mythen3][Gotthard2] */ + /** [Mythen3][Gotthard2] \n + * [Gotthard2] clkIndex: 0-5, [Mythen3] clkIndex 0 only */ void setClockPhaseinDegrees(int clkIndex, int value, Positions pos = {}); /** [Mythen3][Gotthard2] */ Result getClockDivider(int clkIndex, Positions pos = {}); - /** [Mythen3][Gotthard2] Must be greater than 1. */ + /** [Mythen3][Gotthard2] Must be greater than 1. \n + * [Gotthard2] clkIndex: 0-5, [Mythen3] clkIndex 0 only */ void setClockDivider(int clkIndex, int value, Positions pos = {}); Result getHighVoltage(Positions pos = {}) const; @@ -457,16 +463,17 @@ class Detector { */ void setHighVoltage(int value, Positions pos = {}); - /** [Jungfrau][Moench][Mythen3][Gotthard2] */ + /** [Jungfrau][Moench][Mythen3][Gotthard2][Xilinx Ctb] */ Result getPowerChip(Positions pos = {}) const; - /** [Jungfrau][Moench][Mythen3][Gotthard2] Power the chip. \n + /** [Jungfrau][Moench][Mythen3][Gotthard2][Xilinx Ctb] Power the chip. \n * Default is disabled. \n * [Jungfrau][Moench] Default is disabled. Get will return power status. Can * be off if temperature event occured (temperature over temp_threshold with * temp_control enabled. Will configure chip (only chip v1.1)\n * [Mythen3][Gotthard2] Default is 1. If module not connected or wrong - * module, powerchip will fail. + * module, powerchip will fail.\n + * [Xilinx CTB] Default is 0. Also configures chip if powered on. */ void setPowerChip(bool on, Positions pos = {}); @@ -484,7 +491,7 @@ class Detector { /** * (Degrees) - * [Mythen3][Gotthard2] 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 * [Eiger] Options: TEMPERATURE_FPGA, TEMPERATURE_FPGAEXT, TEMPERATURE_10GE, @@ -658,11 +665,13 @@ class Detector { Result> getRxCurrentFrameIndex(Positions pos = {}) const; - /** [Eiger][Jungfrau][Moench][CTB] */ + /** [Eiger][Jungfrau][Moench][CTB][Xilinx CTB][Gotthard2] */ Result getNextFrameNumber(Positions pos = {}) const; - /** [Eiger][Jungfrau][Moench][CTB] Stopping acquisition might result in - * different frame numbers for different modules.*/ + /** [Eiger][Jungfrau][Moench][CTB][Xilinx CTB][Gotthard2] Stopping + * acquisition might result in different frame numbers for different + * modules. So, after stopping, next frame number (max + 1) is set for all + * the modules afterwards.*/ void setNextFrameNumber(uint64_t value, Positions pos = {}); /** [Eiger][Mythen3][Jungfrau][Moench] Sends an internal software trigger to @@ -1004,7 +1013,8 @@ class Detector { Result getFilePath(Positions pos = {}) const; - /** Default is "/"If path does not exist, it will try to create it */ + /** Default is "/". If path does not exist and fwrite enabled, it will try + * to create it at start of acquisition. */ void setFilePath(const std::string &fpath, Positions pos = {}); Result getFileNamePrefix(Positions pos = {}) const; @@ -1025,7 +1035,7 @@ class Detector { Result getFileWrite(Positions pos = {}) const; - /** default enabled */ + /** default disabled */ void setFileWrite(bool value, Positions pos = {}); bool getMasterFileWrite() const; @@ -1103,14 +1113,6 @@ class Detector { */ void setRxZmqPort(uint16_t port, int module_id = -1); - Result getRxZmqIP(Positions pos = {}) const; - - /** Zmq Ip Address from which data is to be streamed out of the receiver. \n - * Also restarts receiver zmq streaming if enabled. \n Default is from - * rx_hostname. \n Modified only when using an intermediate process between - * receiver. */ - void setRxZmqIP(const IpAddr ip, Positions pos = {}); - Result getClientZmqPort(Positions pos = {}) const; /** Port number to listen to zmq data streamed out from receiver or @@ -1376,6 +1378,20 @@ class Detector { void setPedestalMode(const defs::pedestalParameters par, Positions pos = {}); + /** [Jungfrau] */ + Result + getTimingInfoDecoder(Positions pos = {}) const; + + /** [Jungfrau] Advanced Command! */ + void setTimingInfoDecoder(defs::timingInfoDecoder value, + Positions pos = {}); + + /** [Jungfrau] */ + Result getCollectionMode(Positions pos = {}) const; + + /** [Jungfrau] */ + void setCollectionMode(defs::collectionMode value, Positions pos = {}); + ///@} /** @name Gotthard Specific */ @@ -1608,7 +1624,7 @@ class Detector { ///@{ /************************************************** * * - * CTB Specific * + * CTB / Xilinx CTB Specific * * * * ************************************************/ /** [CTB] */ @@ -1638,12 +1654,12 @@ class Detector { /** gets list of slow adc enums */ std::vector getSlowADCList() const; - /** [CTB] */ + /** [CTB][Xilinx CTB] */ Result getPower(defs::dacIndex index, Positions pos = {}) const; /** - * [CTB] mV - * [Ctb] Options: V_LIMIT, V_POWER_A, V_POWER_B, V_POWER_C, + * [CTB][Xilinx CTB] mV + * [Ctb][Xilinx CTB] Options: V_LIMIT, V_POWER_A, V_POWER_B, V_POWER_C, * V_POWER_D, V_POWER_IO, V_POWER_CHIP */ void setPower(defs::dacIndex index, int value, Positions pos = {}); @@ -1669,39 +1685,30 @@ class Detector { "complete 4 bits are enabled */ void setTenGigaADCEnableMask(uint32_t mask, Positions pos = {}); - /** [CTB] */ + /** [CTB][Xilinx CTB] */ Result getTransceiverEnableMask(Positions pos = {}) const; - /** [CTB] */ + /** [CTB][Xilinx CTB] */ void setTransceiverEnableMask(uint32_t mask, Positions pos = {}); - ///@} - - /** @name CTB Specific */ - ///@{ - /************************************************** - * * - * CTB Specific * - * * - * ************************************************/ - /** [CTB] */ Result getNumberOfDigitalSamples(Positions pos = {}) const; /** [CTB] */ void setNumberOfDigitalSamples(int value, Positions pos = {}); - /** [CTB] */ + /** [CTB][Xilinx CTB] */ Result getNumberOfTransceiverSamples(Positions pos = {}) const; - /** [CTB] */ + /** [CTB][Xilinx CTB] */ void setNumberOfTransceiverSamples(int value, Positions pos = {}); - /** [CTB] */ + /** [CTB][Xilinx CTB] */ Result getReadoutMode(Positions pos = {}) const; /** [CTB] Options: ANALOG_ONLY (default), DIGITAL_ONLY, ANALOG_AND_DIGITAL, * TRANSCEIVER_ONLY, DIGITAL_AND_TRANSCEIVER + * [Xilinx CTB] Options: TRANSCEIVER_ONLY (default) */ void setReadoutMode(defs::readoutMode value, Positions pos = {}); @@ -1723,7 +1730,7 @@ class Detector { Result getMeasuredCurrent(defs::dacIndex index, Positions pos = {}) const; - /** [CTB] Options: SLOW_ADC0 - SLOW_ADC7 in uV */ + /** [CTB][Xilinx CTB] Options: SLOW_ADC0 - SLOW_ADC7 in uV */ Result getSlowADC(defs::dacIndex index, Positions pos = {}) const; /** [CTB] */ @@ -1765,81 +1772,95 @@ class Detector { /** [CTB] Default is enabled. */ void setLEDEnable(bool enable, Positions pos = {}); - /** [CTB] */ + /** [CTB][Xilinx CTB] */ void setDacNames(const std::vector names); + /** [CTB][Xilinx CTB] */ std::vector getDacNames() const; + /** [CTB][Xilinx CTB] */ defs::dacIndex getDacIndex(const std::string &name) const; - /** [CTB] */ + /** [CTB][Xilinx CTB] */ void setDacName(const defs::dacIndex i, const std::string &name); - /** [CTB] */ + /** [CTB][Xilinx CTB] */ std::string getDacName(const defs::dacIndex i) const; - /** [CTB] */ + /** [CTB][Xilinx CTB] */ void setAdcNames(const std::vector names); - /** [CTB] */ + /** [CTB][Xilinx CTB] */ std::vector getAdcNames() const; - /** [CTB] */ + /** [CTB][Xilinx CTB] */ int getAdcIndex(const std::string &name) const; - /** [CTB] */ + /** [CTB][Xilinx CTB] */ void setAdcName(const int i, const std::string &name); - /** [CTB] */ + /** [CTB][Xilinx CTB] */ std::string getAdcName(const int i) const; - /** [CTB] */ + /** [CTB][Xilinx CTB] */ void setSignalNames(const std::vector names); - /** [CTB] */ + /** [CTB][Xilinx CTB] */ std::vector getSignalNames() const; - /** [CTB] */ + /** [CTB][Xilinx CTB] */ int getSignalIndex(const std::string &name) const; - /** [CTB] */ + /** [CTB][Xilinx CTB] */ void setSignalName(const int i, const std::string &name); - /** [CTB] */ + /** [CTB][Xilinx CTB] */ std::string getSignalName(const int i) const; - /** [CTB] */ + /** [CTB][Xilinx CTB] */ void setPowerNames(const std::vector names); - /** [CTB] */ + /** [CTB][Xilinx CTB] */ std::vector getPowerNames() const; - /** [CTB] */ + /** [CTB][Xilinx CTB] */ defs::dacIndex getPowerIndex(const std::string &name) const; - /** [CTB] */ + /** [CTB][Xilinx CTB] */ void setPowerName(const defs::dacIndex i, const std::string &name); - /** [CTB] */ + /** [CTB][Xilinx CTB] */ std::string getPowerName(const defs::dacIndex i) const; - /** [CTB] */ + /** [CTB][Xilinx CTB] */ void setSlowADCNames(const std::vector names); - /** [CTB] */ + /** [CTB][Xilinx CTB] */ std::vector getSlowADCNames() const; - /** [CTB] */ + /** [CTB][Xilinx CTB] */ defs::dacIndex getSlowADCIndex(const std::string &name) const; - /** [CTB] */ + /** [CTB][Xilinx CTB] */ void setSlowADCName(const defs::dacIndex i, const std::string &name); - /** [CTB] */ + /** [CTB][Xilinx CTB] */ std::string getSlowADCName(const defs::dacIndex i) const; ///@} + /** @name Xilinx CTB Specific */ + ///@{ + /************************************************** + * * + * Xilinx CTB Specific * + * * + * ************************************************/ + ///@} + + /** [Xilinx Ctb] */ + void configureTransceiver(Positions pos = {}); + /** @name Pattern */ ///@{ /************************************************** @@ -1847,20 +1868,20 @@ class Detector { * Pattern * * * * ************************************************/ - /** [CTB][Mythen3] Gets the pattern file name including path of the last - * pattern uploaded. \n Returns an empty if nothing was uploaded or via a - * server default file*/ + /** [CTB][Mythen3][Xilinx CTB] Gets the pattern file name including path of + * the last pattern uploaded. \n Returns an empty if nothing was uploaded or + * via a server default file*/ Result getPatterFileName(Positions pos = {}) const; - /** [CTB][Mythen3] Loads ASCII pattern file directly to server + /** [CTB][Mythen3][Xilinx CTB] Loads ASCII pattern file directly to server * (instead of executing line by line)*/ void setPattern(const std::string &fname, Positions pos = {}); - /** [CTB][Mythen3] Loads pattern parameters structure directly to - * server */ + /** [CTB][Mythen3][Xilinx CTB] Loads pattern parameters structure directly + * to server */ void setPattern(const Pattern &pat, Positions pos = {}); - /** [CTB][Mythen3] [Ctb][Mythen3] Saves pattern to file + /** [CTB][Mythen3][Xilinx CTB] Saves pattern to file * (ascii). \n [Ctb] Also executes pattern.*/ void savePattern(const std::string &fname); @@ -1873,57 +1894,57 @@ class Detector { /** [CTB] */ void setPatternIOControl(uint64_t word, Positions pos = {}); - /** [CTB][Mythen3] same as executing for ctb */ + /** [CTB][Mythen3][Xilinx CTB] same as executing for ctb */ Result getPatternWord(int addr, Positions pos = {}); - /** [CTB] Caution: If word is -1 reads the addr (same as + /** [CTB][Xilinx CTB] Caution: If word is -1 reads the addr (same as * executing the pattern) * [Mythen3] */ void setPatternWord(int addr, uint64_t word, Positions pos = {}); - /**[CTB][Mythen3] Options: level: -1 (complete pattern) and 0-2 + /**[CTB][Mythen3][Xilinx CTB] Options: level: -1 (complete pattern) and 0-2 * levels * @returns array of start address and stop address */ Result> getPatternLoopAddresses(int level, Positions pos = {}) const; - /** [CTB][Mythen3] Options: level: -1 (complete pattern) and 0-2 + /** [CTB][Mythen3][Xilinx CTB] Options: level: -1 (complete pattern) and 0-2 * levels */ void setPatternLoopAddresses(int level, int start, int stop, Positions pos = {}); - /**[CTB][Mythen3] Options: level: -1 (complete pattern) and 0-2 + /**[CTB][Mythen3][Xilinx CTB] Options: level: -1 (complete pattern) and 0-2 * levels */ Result getPatternLoopCycles(int level, Positions pos = {}) const; - /** [CTB][Mythen3] n: 0-2, level: -1 (complete pattern) and 0-2 + /** [CTB][Mythen3][Xilinx CTB] n: 0-2, level: -1 (complete pattern) and 0-2 * levels */ void setPatternLoopCycles(int level, int n, Positions pos = {}); - /**[CTB][Mythen3] */ + /**[CTB][Mythen3][Xilinx CTB] */ Result getPatternWaitAddr(int level, Positions pos = {}) const; - /** [CTB][Mythen3] Options: level 0-2 */ + /** [CTB][Mythen3][Xilinx CTB] Options: level 0-2 */ void setPatternWaitAddr(int level, int addr, Positions pos = {}); - /** [CTB][Mythen3] */ + /** [CTB][Mythen3][Xilinx CTB] */ Result getPatternWaitTime(int level, Positions pos = {}) const; - /** [CTB][Mythen3] Options: level 0-2 */ + /** [CTB][Mythen3][Xilinx CTB] Options: level 0-2 */ void setPatternWaitTime(int level, uint64_t t, Positions pos = {}); - /** [CTB][Mythen3] */ + /** [CTB][Mythen3][Xilinx CTB] */ Result getPatternMask(Positions pos = {}); - /** [CTB][Mythen3] Selects the bits that will have a pattern mask - * applied to the selected patmask for every pattern. */ + /** [CTB][Mythen3][Xilinx CTB] Selects the bits that will have a pattern + * mask applied to the selected patmask for every pattern. */ void setPatternMask(uint64_t mask, Positions pos = {}); - /** [CTB][Mythen3] */ + /** [CTB][Mythen3][Xilinx CTB] */ Result getPatternBitMask(Positions pos = {}) const; - /** [CTB][Mythen3] Sets the mask applied to every pattern to the + /** [CTB][Mythen3][Xilinx CTB] Sets the mask applied to every pattern to the * selected bits */ void setPatternBitMask(uint64_t mask, Positions pos = {}); @@ -1987,7 +2008,7 @@ class Detector { void programFPGA(const std::string &fname, const bool forceDeleteNormalFile, Positions pos = {}); - /** [Jungfrau][Moench][CTB] Advanced user Function! */ + /** [Jungfrau][Moench][CTB][Xilinx CTB] Advanced user Function! */ void resetFPGA(Positions pos = {}); /** [Jungfrau][Moench][Eiger][Ctb][Mythen3][Gotthard2] Copies detector @@ -2005,8 +2026,8 @@ class Detector { */ void updateKernel(const std::string &fname, Positions pos = {}); - /** [Jungfrau][Moench][Gotthard][CTB][Mythen3][Gotthard2] Advanced user - * Function! */ + /** [Jungfrau][Moench][Gotthard][CTB][Mythen3][Gotthard2][Xilinx CTB] + * Advanced user Function! */ void rebootController(Positions pos = {}); /** @@ -2036,13 +2057,16 @@ class Detector { * Goes to stop server. Hence, can be called while calling blocking * acquire(). \n [Eiger] Address is +0x100 for only left, +0x200 for only * right. */ - void writeRegister(uint32_t addr, uint32_t val, Positions pos = {}); + void writeRegister(uint32_t addr, uint32_t val, bool validate = false, + Positions pos = {}); /** Advanced user Function! */ - void setBit(uint32_t addr, int bitnr, Positions pos = {}); + void setBit(uint32_t addr, int bitnr, bool validate = false, + Positions pos = {}); /** Advanced user Function! */ - void clearBit(uint32_t addr, int bitnr, Positions pos = {}); + void clearBit(uint32_t addr, int bitnr, bool validate = false, + Positions pos = {}); /** Advanced user Function! */ Result getBit(uint32_t addr, int bitnr, Positions pos = {}); @@ -2110,16 +2134,16 @@ class Detector { Result executeCommand(const std::string &value, Positions pos = {}); - /** [Jungfrau][Moench][Mythen3][CTB] + /** [Jungfrau][Moench][Mythen3][CTB][Xilinx CTB] * [Gotthard2] only in continuous mode */ Result getNumberOfFramesFromStart(Positions pos = {}) const; - /** [Jungfrau][Moench][Mythen3][CTB] Get time from detector start - * [Gotthard2] not in burst and auto mode */ + /** [Jungfrau][Moench][Mythen3][CTB][Xilinx CTB] Get time from detector + * start [Gotthard2] not in burst and auto mode */ Result getActualTime(Positions pos = {}) const; - /** [Jungfrau][Moench][Mythen3][CTB] Get timestamp at a frame start - * [Gotthard2] not in burst and auto mode */ + /** [Jungfrau][Moench][Mythen3][CTB][Xilinx CTB] Get timestamp at a frame + * start [Gotthard2] not in burst and auto mode */ Result getMeasurementTime(Positions pos = {}) const; /** get user details from shared memory (hostname, type, PID, User, Date) diff --git a/slsDetectorSoftware/src/Caller.cpp b/slsDetectorSoftware/src/Caller.cpp new file mode 100644 index 000000000..6530bfc54 --- /dev/null +++ b/slsDetectorSoftware/src/Caller.cpp @@ -0,0 +1,18214 @@ +#include "Caller.h" +#include "sls/logger.h" +#include "sls/string_utils.h" +#include + +namespace sls { + +std::string Caller::activate(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0, 1] + [Eiger] 1 is default. 0 deactivates readout and does not send data. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + } + + 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->getActive(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setActive(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::adcclk(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_clk in MHz] + [Ctb] ADC clock frequency in MHz. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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->getADCClock(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setADCClock(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::adcenable(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([bitmask] + [Ctb] ADC Enable Mask for 1Gb Enable for each 32 ADC channel. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to uint32_t"); + } + } + + } + + 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->getADCEnableMask(std::vector{det_id}); + os << OutStringHex(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setADCEnableMask(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::adcenable10g(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([bitmask] + [Ctb] ADC Enable Mask for 10Gb mode for each 32 ADC channel. However, if any of a consecutive 4 bits are enabled, the complete 4 bits are enabled. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to uint32_t"); + } + } + + } + + 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->getTenGigaADCEnableMask(std::vector{det_id}); + os << OutStringHex(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setTenGigaADCEnableMask(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::adcindex(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([name] + [Ctb][Xilinx_Ctb] Get the adc index for the given name. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (1 && args.size() != 1) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + 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() == 1) { + if (det->getDetectorType().squash(defs::GENERIC) != + defs::CHIPTESTBOARD && + det->getDetectorType().squash(defs::GENERIC) != + defs::XILINX_CHIPTESTBOARD) { + throw RuntimeError(cmd + " only allowed for CTB."); + } + if (det_id != -1) { + throw RuntimeError("Cannot execute adcindex at module level"); + } + auto t = det->getAdcIndex(args[0]); + os << static_cast(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::adcinvert(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([bitmask] + [Ctb][Jungfrau][Moench] ADC Inversion Mask. + [Jungfrau][Moench] Inversions on top of the default mask. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to uint32_t"); + } + } + + } + + 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->getADCInvert(std::vector{det_id}); + os << OutStringHex(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setADCInvert(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::adclist(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([adcname1 adcname2 .. adcname32] + [Ctb][Xilinx_Ctb] Set the list of adc names for this board. )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) { + auto det_type = det->getDetectorType().squash(defs::GENERIC); + ; + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + } + + 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 det_type = det->getDetectorType().squash(defs::GENERIC); + ; + if (cmd != "daclist" && det_type != defs::CHIPTESTBOARD && + det_type != defs::XILINX_CHIPTESTBOARD) { + throw RuntimeError(cmd + " only allowed for CTB."); + } + if (det_id != -1) { + throw RuntimeError("Cannot execute adclist at module level"); + } + auto t = det->getAdcNames(); + os << ToString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + auto det_type = det->getDetectorType().squash(defs::GENERIC); + ; + if (cmd != "daclist" && det_type != defs::CHIPTESTBOARD && + det_type != defs::XILINX_CHIPTESTBOARD) { + throw RuntimeError(cmd + " only allowed for CTB."); + } + if (cmd == "daclist" && det_type != defs::CHIPTESTBOARD && + det_type != defs::XILINX_CHIPTESTBOARD) { + throw RuntimeError("This detector already has fixed dac names. " + "Cannot change them."); + } + if (det_id != -1) { + throw RuntimeError("Cannot execute adclist at module level"); + } + det->setAdcNames(args); + os << ToString(args) << '\n'; + } + + return os.str(); +} + +std::string Caller::adcname(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0-31][name] + [Ctb][Xilinx_Ctb] Set the adc at the given position to the given name. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (1 && args.size() != 1) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 2) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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() == 1) { + if (det->getDetectorType().squash(defs::GENERIC) != + defs::CHIPTESTBOARD && + det->getDetectorType().squash(defs::GENERIC) != + defs::XILINX_CHIPTESTBOARD) { + throw RuntimeError(cmd + " only allowed for CTB."); + } + if (det_id != -1) { + throw RuntimeError("Cannot execute adcname at module level"); + } + auto arg0 = StringTo(args[0]); + auto t = det->getAdcName(arg0); + os << args[0] << ' ' << t << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 2) { + if (det->getDetectorType().squash(defs::GENERIC) != + defs::CHIPTESTBOARD && + det->getDetectorType().squash(defs::GENERIC) != + defs::XILINX_CHIPTESTBOARD) { + throw RuntimeError(cmd + " only allowed for CTB."); + } + if (det_id != -1) { + throw RuntimeError("Cannot execute adcname at module level"); + } + auto arg0 = StringTo(args[0]); + det->setAdcName(arg0, args[1]); + os << ToString(args) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::adcphase(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_value] [(optional)deg] + [Jungfrau][Moench][Ctb][Gotthard] 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. + [Ctb] Absolute phase shift. If deg used, then shift in degrees. Changing adcclk also resets adcphase and sets it to previous values. + [Gotthard] Relative phase shift. Cannot get )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) { + auto det_type = det->getDetectorType().squash(defs::GENERIC); + ; + } + + if (args.size() == 1) { + auto det_type = det->getDetectorType().squash(defs::GENERIC); + ; + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + auto det_type = det->getDetectorType().squash(defs::GENERIC); + ; + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + if (args.size() == 2) { + auto det_type = det->getDetectorType().squash(defs::GENERIC); + ; + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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 det_type = det->getDetectorType().squash(defs::GENERIC); + ; + if (det_type == defs::EIGER || det_type == defs::MYTHEN3 || + det_type == defs::GOTTHARD2) { + throw RuntimeError( + "adcphase not implemented for this detector"); + } + auto t = det->getADCPhase(std::vector{det_id}); + os << OutString(t) << '\n'; + } + + if (args.size() == 1) { + auto det_type = det->getDetectorType().squash(defs::GENERIC); + ; + if (det_type == defs::EIGER || det_type == defs::MYTHEN3 || + det_type == defs::GOTTHARD2) { + throw RuntimeError( + "adcphase not implemented for this detector"); + } + if (args[0] != "deg") { + throw RuntimeError("Unknown adcphase argument " + args[0] + + ". Did you mean deg? "); + } + auto t = det->getADCPhaseInDegrees(std::vector{det_id}); + os << OutString(t) << " deg" << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto det_type = det->getDetectorType().squash(defs::GENERIC); + ; + if (det_type == defs::EIGER || det_type == defs::MYTHEN3 || + det_type == defs::GOTTHARD2) { + throw RuntimeError( + "adcphase not implemented for this detector"); + } + auto arg0 = StringTo(args[0]); + det->setADCPhase(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + + if (args.size() == 2) { + auto det_type = det->getDetectorType().squash(defs::GENERIC); + ; + if (det_type == defs::EIGER || det_type == defs::MYTHEN3 || + det_type == defs::GOTTHARD2) { + throw RuntimeError( + "adcphase not implemented for this detector"); + } + if (args[1] != "deg") { + throw RuntimeError("Unknown adcphase 2nd argument " + args[1] + + ". Did you mean deg?"); + } + auto arg0 = StringTo(args[0]); + det->setADCPhaseInDegrees(arg0, std::vector{det_id}); + os << args[0] << ' ' << args[1] << '\n'; + } + } + + return os.str(); +} + +std::string Caller::adcpipeline(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_value] + [Ctb][Moench] Pipeline for ADC clock. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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->getADCPipeline(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setADCPipeline(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::adcreg(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([address] [value] + [Jungfrau][Moench][Ctb][Gotthard] Writes to an adc register in hex. Advanced user Function! )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 2) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to uint32_t"); + } + try { + StringTo(args[1]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to uint32_t"); + } + } + + } + + else { + + throw RuntimeError( + "INTERNAL ERROR: Invalid action: supported actions are ['PUT']"); + } + + // generate code for each action + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 2) { + auto arg0 = StringTo(args[0]); + auto arg1 = StringTo(args[1]); + det->writeAdcRegister(arg0, arg1, std::vector{det_id}); + os << ToString(args) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::adcvpp(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([dac or mV value][(optional unit) mV] + [Ctb] Vpp of ADC. + 0 -> 1V ; 1 -> 1.14V ; 2 -> 1.33V ; 3 -> 1.6V ; 4 -> 2V. + Advanced User function! )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) { + try { + StringTo("0"); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + if (args.size() == 1) { + try { + StringTo("1"); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + try { + StringTo("0"); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to bool"); + } + } + + if (args.size() == 2) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + try { + StringTo("1"); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to bool"); + } + } + + } + + 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 arg0 = StringTo("0"); + auto t = det->getADCVpp(arg0, std::vector{det_id}); + os << OutString(t) << '\n'; + } + + if (args.size() == 1) { + if ((args[0] != "mv") && (args[0] != "mV")) { + throw RuntimeError("Unknown argument " + args[0] + + ". Did you mean mV?"); + } + auto arg0 = StringTo("1"); + auto t = det->getADCVpp(arg0, std::vector{det_id}); + os << OutString(t) << " mV" << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + auto arg1 = StringTo("0"); + det->setADCVpp(arg0, arg1, std::vector{det_id}); + os << args[0] << '\n'; + } + + if (args.size() == 2) { + if ((args[1] != "mv") && (args[1] != "mV")) { + throw RuntimeError("Unknown argument " + args[1] + + ". Did you mean mV?"); + } + auto arg0 = StringTo(args[0]); + auto arg1 = StringTo("1"); + det->setADCVpp(arg0, arg1, std::vector{det_id}); + os << args[0] << " mV" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::apulse(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0, 1] + [Mythen3] Enables or disables analog pulsing. Default is disabled )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + } + + 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->getAnalogPulsing(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setAnalogPulsing(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::asamples(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_samples] + [Ctb] Number of analog samples expected. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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->getNumberOfAnalogSamples(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setNumberOfAnalogSamples(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::autocompdisable(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0, 1] + [Jungfrau] Auto comparator disable mode. By default, the on-chip gain switching is active during the entire exposure.This mode disables the on - chip gain switching comparator automatically after 93.75% (only for chipv1.0) of exposure time (only for longer than 100us). It is possible to set the duration for chipv1.1 using compdisabletime command. + Default is 0 or this mode disabled(comparator enabled throughout). 1 enables mode. 0 disables mode. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + } + + 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->getAutoComparatorDisable(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setAutoComparatorDisable(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::blockingtrigger(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + [Eiger][Jungfrau][Moench] Sends software trigger signal to detector and blocks till the frames are sent out for that trigger. )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) { + bool block = true; + } + + } + + 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) { + bool block = true; + if (det_id != -1) { + throw RuntimeError( + "Cannot execute blockingtrigger at module level"); + } + det->sendSoftwareTrigger(block); + os << "successful" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::burstperiod(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([duration] [(optional unit) ns|us|ms|s] + [Gotthard2] Period between 2 bursts. Only in burst mode and auto timing mode. )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 if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + std::string tmp_time(args[0]); + std::string unit = RemoveUnit(tmp_time); + auto converted_time = StringTo(tmp_time, unit); + } catch (...) { + throw RuntimeError("Could not convert argument to time::ns"); + } + } + + if (args.size() == 2) { + try { + StringTo(args[0], args[1]); + } catch (...) { + throw RuntimeError("Could not convert arguments to time::ns"); + } + } + + } + + 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->getBurstPeriod(std::vector{det_id}); + os << OutString(t) << '\n'; + } + + if (args.size() == 1) { + auto t = det->getBurstPeriod(std::vector{det_id}); + os << OutString(t, args[0]) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + std::string tmp_time(args[0]); + std::string unit = RemoveUnit(tmp_time); + auto converted_time = StringTo(tmp_time, unit); + det->setBurstPeriod(converted_time, std::vector{det_id}); + os << args[0] << '\n'; + } + + if (args.size() == 2) { + auto converted_time = StringTo(args[0], args[1]); + det->setBurstPeriod(converted_time, std::vector{det_id}); + os << args[0] << args[1] << '\n'; + } + } + + return os.str(); +} + +std::string Caller::bursts(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_bursts] + [Gotthard2] Number of bursts per aquire. Only in auto timing mode and burst mode. Use timing command to set timing mode and burstmode command to set burst mode. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int64_t"); + } + } + + } + + 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->getNumberOfBursts(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + if (det_id != -1) { + throw RuntimeError("Cannot execute bursts at module level"); + } + auto arg0 = StringTo(args[0]); + det->setNumberOfBursts(arg0); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::burstsl(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + [Gotthard2] Number of bursts left in acquisition. Only in burst auto mode. )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 { + + 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->getNumberOfBurstsLeft(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::bustest(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + 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. + Advanced User function! )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->executeBusTest(std::vector{det_id}); + os << "successful" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::cdsgain(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0, 1] + [Gotthard2] Enable or disable CDS gain. Default is disabled. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + } + + 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->getCDSGain(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setCDSGain(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::chipversion(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + [Jungfrau] Returns chip version. Can be 1.0 or 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 { + + 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->getChipVersion(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::clearbit(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([reg address in hex] [bit index] + Clears bit in address. + Use --validate to force validation. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 2 && args.size() != 3) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 2) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to uint32_t"); + } + try { + StringTo(args[1]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to int"); + } + try { + StringTo("0"); + } catch (...) { + throw RuntimeError("Could not convert argument 2 to bool"); + } + } + + if (args.size() == 3) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to uint32_t"); + } + try { + StringTo(args[1]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to int"); + } + try { + StringTo("1"); + } catch (...) { + throw RuntimeError("Could not convert argument 2 to bool"); + } + } + + } + + else { + + throw RuntimeError( + "INTERNAL ERROR: Invalid action: supported actions are ['PUT']"); + } + + // generate code for each action + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 2) { + if (StringTo(args[1]) < 0 || StringTo(args[1]) > 31) { + throw RuntimeError("Bit number out of range: " + args[1]); + } + auto arg0 = StringTo(args[0]); + auto arg1 = StringTo(args[1]); + auto arg2 = StringTo("0"); + det->clearBit(arg0, arg1, arg2, std::vector{det_id}); + os << "[" << args[0] << ", " << args[1] << "]" << '\n'; + } + + if (args.size() == 3) { + if (StringTo(args[1]) < 0 || StringTo(args[1]) > 31) { + throw RuntimeError("Bit number out of range: " + args[1]); + } + if (args[2] != "--validate") { + throw RuntimeError( + "Could not scan third argument. Did you mean --validate?"); + } + auto arg0 = StringTo(args[0]); + auto arg1 = StringTo(args[1]); + auto arg2 = StringTo("1"); + det->clearBit(arg0, arg1, arg2, std::vector{det_id}); + os << "[" << args[0] << ", " << args[1] << "]" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::clearbusy(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + If acquisition aborted during acquire command, use this to clear acquiring flag in shared memory before starting next acquisition )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) { + if (det_id != -1) { + throw RuntimeError("Cannot execute clearbusy at module level"); + } + det->clearAcquiringFlag(); + os << "successful" << '\n'; + } + } + + 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{det_id}); + os << "successful" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::clientversion(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Client software version )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 { + + 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->getClientVersion(); + os << t << '\n'; + } + } + + return os.str(); +} + +std::string Caller::clkdiv(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_clock] [n_divider] + [Gotthard2][Mythen3] Clock Divider of clock n_clock. Must be greater than 1. + [Gotthard2] Clock index range: 0-5 + [Mythen3] Clock index range: 0 )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (1 && args.size() != 1) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + if (args.size() == 1) { + defs::detectorType type = + det->getDetectorType().squash(defs::GENERIC); + ; + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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::detectorType type = + det->getDetectorType().squash(defs::GENERIC); + ; + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + try { + StringTo(args[1]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to int"); + } + } + + } + + 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() == 1) { + defs::detectorType type = + det->getDetectorType().squash(defs::GENERIC); + ; + if (type != defs::GOTTHARD2 && type != defs::MYTHEN3) { + throw RuntimeError("clkdiv not implemented for this detector."); + } + auto arg0 = StringTo(args[0]); + auto t = det->getClockDivider(arg0, std::vector{det_id}); + os << args[0] << ' ' << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 2) { + defs::detectorType type = + det->getDetectorType().squash(defs::GENERIC); + ; + if (type != defs::GOTTHARD2 && type != defs::MYTHEN3) { + throw RuntimeError("clkdiv not implemented for this detector."); + } + auto arg0 = StringTo(args[0]); + auto arg1 = StringTo(args[1]); + det->setClockDivider(arg0, arg1, std::vector{det_id}); + os << args[0] << ' ' << args[1] << '\n'; + } + } + + return os.str(); +} + +std::string Caller::clkfreq(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_clock] [freq_in_Hz] + [Gotthard2][Mythen3] Frequency of clock n_clock in Hz. Use clkdiv to set frequency. + [Gotthard2] Clock index range: 0-5 + [Mythen3] Clock index range: 0 )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (1 && args.size() != 1) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + if (args.size() == 1) { + defs::detectorType type = + det->getDetectorType().squash(defs::GENERIC); + ; + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + else { + + throw RuntimeError( + "INTERNAL ERROR: Invalid action: supported actions are ['GET']"); + } + + // generate code for each action + if (action == slsDetectorDefs::GET_ACTION) { + if (args.size() == 1) { + defs::detectorType type = + det->getDetectorType().squash(defs::GENERIC); + ; + if (type != defs::GOTTHARD2 && type != defs::MYTHEN3) { + throw RuntimeError( + "clkfreq not implemented for this detector."); + } + auto arg0 = StringTo(args[0]); + auto t = det->getClockFrequency(arg0, std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::clkphase(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_clock] [phase] [deg (optional)] + [Gotthard2][Mythen3] Phase of clock n_clock. If deg, then phase shift in degrees, else absolute phase shift values.n [Gotthard2] Clock index range: 0-5 + [Mythen3] Clock index range: 0 )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (1 && args.size() != 1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + if (args.size() == 1) { + defs::detectorType type = + det->getDetectorType().squash(defs::GENERIC); + ; + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + if (args.size() == 2) { + defs::detectorType type = + det->getDetectorType().squash(defs::GENERIC); + ; + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 2 && args.size() != 3) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 2) { + defs::detectorType type = + det->getDetectorType().squash(defs::GENERIC); + ; + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + try { + StringTo(args[1]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to int"); + } + } + + if (args.size() == 3) { + defs::detectorType type = + det->getDetectorType().squash(defs::GENERIC); + ; + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + try { + StringTo(args[1]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to int"); + } + } + + } + + 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() == 1) { + defs::detectorType type = + det->getDetectorType().squash(defs::GENERIC); + ; + if (type != defs::GOTTHARD2 && type != defs::MYTHEN3) { + throw RuntimeError( + "clkphase not implemented for this detector."); + } + auto arg0 = StringTo(args[0]); + auto t = det->getClockPhase(arg0, std::vector{det_id}); + os << OutString(t) << '\n'; + } + + if (args.size() == 2) { + defs::detectorType type = + det->getDetectorType().squash(defs::GENERIC); + ; + if (type != defs::GOTTHARD2 && type != defs::MYTHEN3) { + throw RuntimeError( + "clkphase not implemented for this detector."); + } + if (args[1] != "deg") { + throw RuntimeError("Cannot scan argument" + args[1] + + ". Did you mean deg?"); + } + auto arg0 = StringTo(args[0]); + auto t = + det->getClockPhaseinDegrees(arg0, std::vector{det_id}); + os << OutString(t) << " deg" << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 2) { + defs::detectorType type = + det->getDetectorType().squash(defs::GENERIC); + ; + if (type != defs::GOTTHARD2 && type != defs::MYTHEN3) { + throw RuntimeError( + "clkphase not implemented for this detector."); + } + auto arg0 = StringTo(args[0]); + auto arg1 = StringTo(args[1]); + det->setClockPhase(arg0, arg1, std::vector{det_id}); + os << args[1] << '\n'; + } + + if (args.size() == 3) { + defs::detectorType type = + det->getDetectorType().squash(defs::GENERIC); + ; + if (type != defs::GOTTHARD2 && type != defs::MYTHEN3) { + throw RuntimeError( + "clkphase not implemented for this detector."); + } + if (args[2] != "deg") { + throw RuntimeError("Cannot scan argument" + args[2] + + ". Did you mean deg?"); + } + auto arg0 = StringTo(args[0]); + auto arg1 = StringTo(args[1]); + det->setClockPhaseinDegrees(arg0, arg1, std::vector{det_id}); + os << args[1] << " " << args[2] << '\n'; + } + } + + return os.str(); +} + +std::string Caller::collectionmode(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([hole|electron] + [Jungfrau] Sets collection mode to hole or electron. Default is hole. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError( + "Could not convert argument 0 to defs::collectionMode"); + } + } + + } + + 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->getCollectionMode(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setCollectionMode(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::column(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([value] + Set Detector column (udp header) to value. + Gui uses it to rearrange for complete image )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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->getColumn(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setColumn(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::compdisabletime(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([duration] [(optional unit) ns|us|ms|s] + [Jungfrau] Time before end of exposure when comparator is disabled. It is only possible for chipv1.1. )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 if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + std::string tmp_time(args[0]); + std::string unit = RemoveUnit(tmp_time); + auto converted_time = StringTo(tmp_time, unit); + } catch (...) { + throw RuntimeError("Could not convert argument to time::ns"); + } + } + + if (args.size() == 2) { + try { + StringTo(args[0], args[1]); + } catch (...) { + throw RuntimeError("Could not convert arguments to time::ns"); + } + } + + } + + 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->getComparatorDisableTime(std::vector{det_id}); + os << OutString(t) << '\n'; + } + + if (args.size() == 1) { + auto t = det->getComparatorDisableTime(std::vector{det_id}); + os << OutString(t, args[0]) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + std::string tmp_time(args[0]); + std::string unit = RemoveUnit(tmp_time); + auto converted_time = StringTo(tmp_time, unit); + det->setComparatorDisableTime(converted_time, + std::vector{det_id}); + os << args[0] << '\n'; + } + + if (args.size() == 2) { + auto converted_time = StringTo(args[0], args[1]); + det->setComparatorDisableTime(converted_time, + std::vector{det_id}); + os << args[0] << args[1] << '\n'; + } + } + + return os.str(); +} + +std::string Caller::confadc(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([chip index 0-9, -1 for all] [adc index 0-31, -1 for all] [7 bit configuration value in hex] + [Gotthard2] Sets configuration for specific chip and adc, but configures 1 chip (all adcs for that chip) at a time. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + if (args.size() == 2) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + try { + StringTo(args[1]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to int"); + } + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 3) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 3) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + try { + StringTo(args[1]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to int"); + } + try { + StringTo(args[2]); + } catch (...) { + throw RuntimeError("Could not convert argument 2 to int"); + } + } + + } + + 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() == 2) { + auto arg0 = StringTo(args[0]); + auto arg1 = StringTo(args[1]); + auto t = + det->getADCConfiguration(arg0, arg1, std::vector{det_id}); + os << OutStringHex(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 3) { + auto arg0 = StringTo(args[0]); + auto arg1 = StringTo(args[1]); + auto arg2 = StringTo(args[2]); + det->setADCConfiguration(arg0, arg1, arg2, + std::vector{det_id}); + os << '[' << args[0] << ", " << args[1] << ", " + << ToStringHex(StringTo(args[2])) << "]" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::config(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Frees shared memory before loading configuration file. Set up once. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + } + + } + + else { + + throw RuntimeError( + "INTERNAL ERROR: Invalid action: supported actions are ['PUT']"); + } + + // generate code for each action + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + if (det_id != -1) { + throw RuntimeError("Cannot execute config at module level"); + } + det->loadConfig(args[0]); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::configtransceiver(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + [Xilinx Ctb] Waits for transceiver to be aligned. Chip had to be configured (powered on) before this. )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->configureTransceiver(std::vector{det_id}); + os << "successful" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::dac(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + return GetHelpDacWrapper(cmd, args); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (1 && args.size() != 1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + if (args.size() == 1) { + defs::dacIndex dacIndex = + ((det->getDetectorType().squash() == defs::CHIPTESTBOARD || + det->getDetectorType().squash() == + defs::XILINX_CHIPTESTBOARD) && + !is_int(args[0])) + ? det->getDacIndex(args[0]) + : StringTo(args[0]); + try { + StringTo("0"); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to bool"); + } + } + + if (args.size() == 2) { + defs::dacIndex dacIndex = + ((det->getDetectorType().squash() == defs::CHIPTESTBOARD || + det->getDetectorType().squash() == + defs::XILINX_CHIPTESTBOARD) && + !is_int(args[0])) + ? det->getDacIndex(args[0]) + : StringTo(args[0]); + try { + StringTo("1"); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to bool"); + } + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 2 && args.size() != 3) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 2) { + defs::dacIndex dacIndex = + ((det->getDetectorType().squash() == defs::CHIPTESTBOARD || + det->getDetectorType().squash() == + defs::XILINX_CHIPTESTBOARD) && + !is_int(args[0])) + ? det->getDacIndex(args[0]) + : StringTo(args[0]); + try { + StringTo(args[1]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to int"); + } + try { + StringTo("0"); + } catch (...) { + throw RuntimeError("Could not convert argument 2 to bool"); + } + } + + if (args.size() == 3) { + defs::dacIndex dacIndex = + ((det->getDetectorType().squash() == defs::CHIPTESTBOARD || + det->getDetectorType().squash() == + defs::XILINX_CHIPTESTBOARD) && + !is_int(args[0])) + ? det->getDacIndex(args[0]) + : StringTo(args[0]); + try { + StringTo(args[1]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to int"); + } + try { + StringTo("1"); + } catch (...) { + throw RuntimeError("Could not convert argument 2 to bool"); + } + } + + } + + 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() == 1) { + defs::dacIndex dacIndex = + ((det->getDetectorType().squash() == defs::CHIPTESTBOARD || + det->getDetectorType().squash() == + defs::XILINX_CHIPTESTBOARD) && + !is_int(args[0])) + ? det->getDacIndex(args[0]) + : StringTo(args[0]); + if (is_int(args[0]) && + det->getDetectorType().squash() != defs::CHIPTESTBOARD && + det->getDetectorType().squash() != defs::XILINX_CHIPTESTBOARD) { + throw RuntimeError( + "Dac indices can only be used for chip test board. Use " + "daclist to get list of dac names for current detector."); + } + auto arg1 = StringTo("0"); + auto t = det->getDAC(dacIndex, arg1, std::vector{det_id}); + os << args[0] << ' ' << OutString(t) << '\n'; + } + + if (args.size() == 2) { + defs::dacIndex dacIndex = + ((det->getDetectorType().squash() == defs::CHIPTESTBOARD || + det->getDetectorType().squash() == + defs::XILINX_CHIPTESTBOARD) && + !is_int(args[0])) + ? det->getDacIndex(args[0]) + : StringTo(args[0]); + if (is_int(args[0]) && + det->getDetectorType().squash() != defs::CHIPTESTBOARD && + det->getDetectorType().squash() != defs::XILINX_CHIPTESTBOARD) { + throw RuntimeError( + "Dac indices can only be used for chip test board. Use " + "daclist to get list of dac names for current detector."); + } + if (args[1] != "mv" && args[1] != "mV") { + throw RuntimeError("Unknown argument " + args[1] + + ". Did you mean mV?"); + } + auto arg1 = StringTo("1"); + auto t = det->getDAC(dacIndex, arg1, std::vector{det_id}); + os << args[0] << ' ' << OutString(t) << " mV" << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 2) { + defs::dacIndex dacIndex = + ((det->getDetectorType().squash() == defs::CHIPTESTBOARD || + det->getDetectorType().squash() == + defs::XILINX_CHIPTESTBOARD) && + !is_int(args[0])) + ? det->getDacIndex(args[0]) + : StringTo(args[0]); + if (is_int(args[0]) && + det->getDetectorType().squash() != defs::CHIPTESTBOARD && + det->getDetectorType().squash() != defs::XILINX_CHIPTESTBOARD) { + throw RuntimeError( + "Dac indices can only be used for chip test board. Use " + "daclist to get list of dac names for current detector."); + } + auto arg1 = StringTo(args[1]); + auto arg2 = StringTo("0"); + det->setDAC(dacIndex, arg1, arg2, std::vector{det_id}); + os << args[0] << ' ' << args[1] << '\n'; + } + + if (args.size() == 3) { + defs::dacIndex dacIndex = + ((det->getDetectorType().squash() == defs::CHIPTESTBOARD || + det->getDetectorType().squash() == + defs::XILINX_CHIPTESTBOARD) && + !is_int(args[0])) + ? det->getDacIndex(args[0]) + : StringTo(args[0]); + if (is_int(args[0]) && + det->getDetectorType().squash() != defs::CHIPTESTBOARD && + det->getDetectorType().squash() != defs::XILINX_CHIPTESTBOARD) { + throw RuntimeError( + "Dac indices can only be used for chip test board. Use " + "daclist to get list of dac names for current detector."); + } + auto arg1 = StringTo(args[1]); + auto arg2 = StringTo("1"); + det->setDAC(dacIndex, arg1, arg2, std::vector{det_id}); + os << args[0] << ' ' << args[1] << " mV" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::dacindex(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([name] + [Ctb][Xilinx_Ctb] Get the dac index for the given name. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (1 && args.size() != 1) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + if (args.size() == 1) { + defs::dacIndex index = defs::DAC_0; + } + + } + + else { + + throw RuntimeError( + "INTERNAL ERROR: Invalid action: supported actions are ['GET']"); + } + + // generate code for each action + if (action == slsDetectorDefs::GET_ACTION) { + if (args.size() == 1) { + defs::dacIndex index = defs::DAC_0; + if (det->getDetectorType().squash(defs::GENERIC) != + defs::CHIPTESTBOARD && + det->getDetectorType().squash(defs::GENERIC) != + defs::XILINX_CHIPTESTBOARD) { + throw RuntimeError(cmd + " only allowed for CTB."); + } + if (det_id != -1) { + throw RuntimeError("Cannot execute dacindex at module level"); + } + auto t = det->getDacIndex(args[0]); + os << ToString(static_cast(t) - index) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::daclist(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([dacname1 dacname2 .. dacname18] + [Ctb][Xilinx_Ctb] Set the list of dac names for this detector. + [All] Gets the list of dac names for every dac for this detector. )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) { + auto det_type = det->getDetectorType().squash(defs::GENERIC); + ; + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + } + + 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 det_type = det->getDetectorType().squash(defs::GENERIC); + ; + if (cmd != "daclist" && det_type != defs::CHIPTESTBOARD && + det_type != defs::XILINX_CHIPTESTBOARD) { + throw RuntimeError(cmd + " only allowed for CTB."); + } + if (det_id != -1) { + throw RuntimeError("Cannot execute daclist at module level"); + } + auto t = det->getDacNames(); + os << ToString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + auto det_type = det->getDetectorType().squash(defs::GENERIC); + ; + if (cmd != "daclist" && det_type != defs::CHIPTESTBOARD && + det_type != defs::XILINX_CHIPTESTBOARD) { + throw RuntimeError(cmd + " only allowed for CTB."); + } + if (cmd == "daclist" && det_type != defs::CHIPTESTBOARD && + det_type != defs::XILINX_CHIPTESTBOARD) { + throw RuntimeError("This detector already has fixed dac names. " + "Cannot change them."); + } + if (det_id != -1) { + throw RuntimeError("Cannot execute daclist at module level"); + } + det->setDacNames(args); + os << ToString(args) << '\n'; + } + + return os.str(); +} + +std::string Caller::dacname(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0-17][name] + [Ctb][Xilinx_Ctb] Set the dac at the given position to the given name. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (1 && args.size() != 1) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + if (args.size() == 1) { + defs::dacIndex index = defs::DAC_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::dacIndex index = defs::DAC_0; + } + + } + + 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() == 1) { + defs::dacIndex index = defs::DAC_0; + if (det->getDetectorType().squash(defs::GENERIC) != + defs::CHIPTESTBOARD && + det->getDetectorType().squash(defs::GENERIC) != + defs::XILINX_CHIPTESTBOARD) { + throw RuntimeError(cmd + " only allowed for CTB."); + } + if (det_id != -1) { + throw RuntimeError("Cannot execute dacname at module level"); + } + auto t = det->getDacName( + static_cast(StringTo(args[0]) + index)); + os << args[0] << ' ' << t << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 2) { + defs::dacIndex index = defs::DAC_0; + if (det->getDetectorType().squash(defs::GENERIC) != + defs::CHIPTESTBOARD && + det->getDetectorType().squash(defs::GENERIC) != + defs::XILINX_CHIPTESTBOARD) { + throw RuntimeError(cmd + " only allowed for CTB."); + } + if (det_id != -1) { + throw RuntimeError("Cannot execute dacname at module level"); + } + det->setDacName( + static_cast(StringTo(args[0]) + index), + args[1]); + os << ToString(args) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::datastream(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([left|right] [0, 1] + [Eiger] Enables or disables data streaming from left or/and right side of detector for 10 GbE mode. 1 (enabled) by default. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (1 && args.size() != 1) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError( + "Could not convert argument 0 to defs::portPosition"); + } + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 2) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError( + "Could not convert argument 0 to defs::portPosition"); + } + try { + StringTo(args[1]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to bool"); + } + } + + } + + 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() == 1) { + auto arg0 = StringTo(args[0]); + auto t = det->getDataStream(arg0, std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 2) { + auto arg0 = StringTo(args[0]); + auto arg1 = StringTo(args[1]); + det->setDataStream(arg0, arg1, std::vector{det_id}); + os << ToString(args) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::dbitclk(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_clk in MHz] + [Ctb] Clock for latching the digital bits in MHz. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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->getDBITClock(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setDBITClock(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::dbitphase(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_value] [(optional)deg] + [Ctb][Jungfrau] Phase shift of clock to latch digital bits. Absolute phase shift. If deg used, then shift in degrees. + [Ctb]Changing dbitclk also resets dbitphase and sets to previous values. )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) { + auto det_type = det->getDetectorType().squash(defs::GENERIC); + ; + } + + if (args.size() == 1) { + auto det_type = det->getDetectorType().squash(defs::GENERIC); + ; + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + auto det_type = det->getDetectorType().squash(defs::GENERIC); + ; + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + if (args.size() == 2) { + auto det_type = det->getDetectorType().squash(defs::GENERIC); + ; + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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 det_type = det->getDetectorType().squash(defs::GENERIC); + ; + if (det_type == defs::EIGER || det_type == defs::MYTHEN3 || + det_type == defs::GOTTHARD2 || det_type == defs::MOENCH) { + throw RuntimeError( + "dbitphase not implemented for this detector"); + } + auto t = det->getDBITPhase(std::vector{det_id}); + os << OutString(t) << '\n'; + } + + if (args.size() == 1) { + auto det_type = det->getDetectorType().squash(defs::GENERIC); + ; + if (det_type == defs::EIGER || det_type == defs::MYTHEN3 || + det_type == defs::GOTTHARD2 || det_type == defs::MOENCH) { + throw RuntimeError( + "dbitphase not implemented for this detector"); + } + if (args[0] != "deg") { + throw RuntimeError("Unknown dbitphase argument " + args[0] + + ". Did you mean deg? "); + } + auto t = det->getDBITPhaseInDegrees(std::vector{det_id}); + os << OutString(t) << " deg" << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto det_type = det->getDetectorType().squash(defs::GENERIC); + ; + if (det_type == defs::EIGER || det_type == defs::MYTHEN3 || + det_type == defs::GOTTHARD2 || det_type == defs::MOENCH) { + throw RuntimeError( + "dbitphase not implemented for this detector"); + } + auto arg0 = StringTo(args[0]); + det->setDBITPhase(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + + if (args.size() == 2) { + auto det_type = det->getDetectorType().squash(defs::GENERIC); + ; + if (det_type == defs::EIGER || det_type == defs::MYTHEN3 || + det_type == defs::GOTTHARD2 || det_type == defs::MOENCH) { + throw RuntimeError( + "dbitphase not implemented for this detector"); + } + if (args[1] != "deg") { + throw RuntimeError("Unknown dbitphase 2nd argument " + args[1] + + ". Did you mean deg? "); + } + auto arg0 = StringTo(args[0]); + det->setDBITPhaseInDegrees(arg0, std::vector{det_id}); + os << args[0] << ' ' << args[1] << '\n'; + } + } + + return os.str(); +} + +std::string Caller::dbitpipeline(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_value] + [Ctb][Gotthard2] Pipeline of the clock for latching digital bits. + [Gotthard2] Options: 0-7 + [Ctb] Options: 0-255 )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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->getDBITPipeline(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setDBITPipeline(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::defaultdac(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([dac name][value][(optional)setting] + Sets the default for that dac to this value. + [Jungfrau][Moench][Mythen3] When settings is provided, it sets the default value only for that setting )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (1 && args.size() != 1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError( + "Could not convert argument 0 to defs::dacIndex"); + } + } + + if (args.size() == 2) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError( + "Could not convert argument 0 to defs::dacIndex"); + } + try { + StringTo(args[1]); + } catch (...) { + throw RuntimeError( + "Could not convert argument 1 to defs::detectorSettings"); + } + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 2 && args.size() != 3) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 2) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError( + "Could not convert argument 0 to defs::dacIndex"); + } + try { + StringTo(args[1]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to int"); + } + } + + if (args.size() == 3) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError( + "Could not convert argument 0 to defs::dacIndex"); + } + try { + StringTo(args[1]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to int"); + } + try { + StringTo(args[2]); + } catch (...) { + throw RuntimeError( + "Could not convert argument 2 to defs::detectorSettings"); + } + } + + } + + 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() == 1) { + auto arg0 = StringTo(args[0]); + auto t = det->getDefaultDac(arg0, std::vector{det_id}); + os << args[0] << ' ' << OutString(t) << '\n'; + } + + if (args.size() == 2) { + auto arg0 = StringTo(args[0]); + auto arg1 = StringTo(args[1]); + auto t = det->getDefaultDac(arg0, arg1, std::vector{det_id}); + os << args[0] << ' ' << args[1] << ' ' << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 2) { + auto arg0 = StringTo(args[0]); + auto arg1 = StringTo(args[1]); + det->setDefaultDac(arg0, arg1, std::vector{det_id}); + os << args[0] << ' ' << args[1] << '\n'; + } + + if (args.size() == 3) { + auto arg0 = StringTo(args[0]); + auto arg1 = StringTo(args[1]); + auto arg2 = StringTo(args[2]); + det->setDefaultDac(arg0, arg1, arg2, std::vector{det_id}); + os << args[0] << ' ' << args[2] << ' ' << args[1] << '\n'; + } + } + + return os.str(); +} + +std::string Caller::defaultpattern(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + [Mythen3] Loads and runs default pattern in pattern generator. It is to go back to initial settings. )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->loadDefaultPattern(std::vector{det_id}); + os << "successful" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::delay(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([duration] [(optional unit) ns|us|ms|s] + [Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb][Moench][Xilinx Ctb] Delay after trigger )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 if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + std::string tmp_time(args[0]); + std::string unit = RemoveUnit(tmp_time); + auto converted_time = StringTo(tmp_time, unit); + } catch (...) { + throw RuntimeError("Could not convert argument to time::ns"); + } + } + + if (args.size() == 2) { + try { + StringTo(args[0], args[1]); + } catch (...) { + throw RuntimeError("Could not convert arguments to time::ns"); + } + } + + } + + 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->getDelayAfterTrigger(std::vector{det_id}); + os << OutString(t) << '\n'; + } + + if (args.size() == 1) { + auto t = det->getDelayAfterTrigger(std::vector{det_id}); + os << OutString(t, args[0]) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + std::string tmp_time(args[0]); + std::string unit = RemoveUnit(tmp_time); + auto converted_time = StringTo(tmp_time, unit); + det->setDelayAfterTrigger(converted_time, std::vector{det_id}); + os << args[0] << '\n'; + } + + if (args.size() == 2) { + auto converted_time = StringTo(args[0], args[1]); + det->setDelayAfterTrigger(converted_time, std::vector{det_id}); + os << args[0] << args[1] << '\n'; + } + } + + return os.str(); +} + +std::string Caller::delayl(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + [Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Delay Left in Acquisition. + [Gotthard2] only in continuous mode. )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->getDelayAfterTriggerLeft(std::vector{det_id}); + os << OutString(t) << '\n'; + } + + if (args.size() == 1) { + auto t = det->getDelayAfterTriggerLeft(std::vector{det_id}); + os << OutString(t, args[0]) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::detectorserverversion(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + On-board detector server software version )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 { + + 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->getDetectorServerVersion(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::detsize(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([nx] [ny] + Detector size, ie. Number of channels in x and y dim. This is used to calculate module coordinates included in UDP data. + By default, it adds module in y dimension for 2d detectors and in x dimension for 1d detectors packet header. )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) { + } + + } + + 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->getDetectorSize(); + os << t << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 2) { + det->setDetectorSize( + defs::xy(StringTo(args[0]), StringTo(args[1]))); + os << ToString(args) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::diodelay(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0-775] + [Ctb] Delay for diode. Delay is in ps and max of 775 ps. Resolution is 25 ps. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 2) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to uint64_t"); + } + try { + StringTo(args[1]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to int"); + } + } + + } + + else { + + throw RuntimeError( + "INTERNAL ERROR: Invalid action: supported actions are ['PUT']"); + } + + // generate code for each action + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 2) { + auto arg0 = StringTo(args[0]); + auto arg1 = StringTo(args[1]); + det->setDigitalIODelay(arg0, arg1, std::vector{det_id}); + os << ToString(args) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::dpulse(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0, 1] + [Mythen3] Enables or disables digital pulsing. Default is disabled )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + } + + 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->getDigitalPulsing(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setDigitalPulsing(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::dr(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([value] + 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. + [Mythen3] Options: 8, 16, 32 + [Jungfrau][Moench][Gotthard][Ctb][Mythen3][Gotthard2][Xilinx Ctb] 16 )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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->getDynamicRange(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + if (det_id != -1) { + throw RuntimeError("Cannot execute dr at module level"); + } + auto arg0 = StringTo(args[0]); + det->setDynamicRange(arg0); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::drlist(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Gets the list of dynamic ranges for this detector. )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 { + + 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->getDynamicRangeList(); + os << ToString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::dsamples(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_value] + [Ctb] Number of digital samples expected. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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->getNumberOfDigitalSamples(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setNumberOfDigitalSamples(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::exptime(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([duration] [(optional unit) ns|us|ms|s] + [Eiger][Jungfrau][Moench][Gotthard][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" + << 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 if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + std::string tmp_time(args[0]); + std::string unit = RemoveUnit(tmp_time); + auto converted_time = StringTo(tmp_time, unit); + } catch (...) { + throw RuntimeError("Could not convert argument to time::ns"); + } + } + + if (args.size() == 2) { + try { + StringTo(args[0], args[1]); + } catch (...) { + throw RuntimeError("Could not convert arguments to time::ns"); + } + } + + } + + else { + + throw RuntimeError("INTERNAL ERROR: Invalid action: supported actions " + "are ['GET', 'PUT']"); + } + + // generate code for each action + auto detector_type = det->getDetectorType().squash(); + if (action == slsDetectorDefs::GET_ACTION) { + if (detector_type == defs::MYTHEN3) { + if (args.size() == 0) { + auto t = det->getExptimeForAllGates(std::vector{det_id}); + os << OutString(t) << '\n'; + } + + if (args.size() == 1) { + auto t = det->getExptimeForAllGates(std::vector{det_id}); + os << OutString(t, args[0]) << '\n'; + } + + } + + else { + + if (args.size() == 0) { + auto t = det->getExptime(std::vector{det_id}); + os << OutString(t) << '\n'; + } + + if (args.size() == 1) { + auto t = det->getExptime(std::vector{det_id}); + os << OutString(t, args[0]) << '\n'; + } + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + std::string tmp_time(args[0]); + std::string unit = RemoveUnit(tmp_time); + auto converted_time = StringTo(tmp_time, unit); + det->setExptime(converted_time, std::vector{det_id}); + os << args[0] << '\n'; + } + + if (args.size() == 2) { + auto converted_time = StringTo(args[0], args[1]); + det->setExptime(converted_time, std::vector{det_id}); + os << args[0] << args[1] << '\n'; + } + } + + return os.str(); +} + +std::string Caller::exptime1(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_value] + [Mythen3] Exposure time of gate signal 1 in auto and trigger mode (internal gating). )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) { + int gateIndex = 0; + } + + if (args.size() == 1) { + int gateIndex = 0; + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + int gateIndex = 0; + try { + std::string tmp_time(args[0]); + std::string unit = RemoveUnit(tmp_time); + auto converted_time = StringTo(tmp_time, unit); + } catch (...) { + throw RuntimeError("Could not convert argument to time::ns"); + } + } + + if (args.size() == 2) { + int gateIndex = 0; + try { + StringTo(args[0], args[1]); + } catch (...) { + throw RuntimeError("Could not convert arguments to time::ns"); + } + } + + } + + 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) { + int gateIndex = 0; + auto t = det->getExptime(gateIndex, std::vector{det_id}); + os << OutString(t) << '\n'; + } + + if (args.size() == 1) { + int gateIndex = 0; + auto t = det->getExptime(gateIndex, std::vector{det_id}); + os << OutString(t, args[0]) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + int gateIndex = 0; + std::string tmp_time(args[0]); + std::string unit = RemoveUnit(tmp_time); + auto converted_time = StringTo(tmp_time, unit); + det->setExptime(gateIndex, converted_time, + std::vector{det_id}); + os << args[0] << '\n'; + } + + if (args.size() == 2) { + int gateIndex = 0; + auto converted_time = StringTo(args[0], args[1]); + det->setExptime(gateIndex, converted_time, + std::vector{det_id}); + os << args[0] << args[1] << '\n'; + } + } + + return os.str(); +} + +std::string Caller::exptime2(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_value] + [Mythen3] Exposure time of gate signal 2 in auto and trigger mode (internal gating). )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) { + int gateIndex = 1; + } + + if (args.size() == 1) { + int gateIndex = 1; + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + int gateIndex = 1; + try { + std::string tmp_time(args[0]); + std::string unit = RemoveUnit(tmp_time); + auto converted_time = StringTo(tmp_time, unit); + } catch (...) { + throw RuntimeError("Could not convert argument to time::ns"); + } + } + + if (args.size() == 2) { + int gateIndex = 1; + try { + StringTo(args[0], args[1]); + } catch (...) { + throw RuntimeError("Could not convert arguments to time::ns"); + } + } + + } + + 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) { + int gateIndex = 1; + auto t = det->getExptime(gateIndex, std::vector{det_id}); + os << OutString(t) << '\n'; + } + + if (args.size() == 1) { + int gateIndex = 1; + auto t = det->getExptime(gateIndex, std::vector{det_id}); + os << OutString(t, args[0]) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + int gateIndex = 1; + std::string tmp_time(args[0]); + std::string unit = RemoveUnit(tmp_time); + auto converted_time = StringTo(tmp_time, unit); + det->setExptime(gateIndex, converted_time, + std::vector{det_id}); + os << args[0] << '\n'; + } + + if (args.size() == 2) { + int gateIndex = 1; + auto converted_time = StringTo(args[0], args[1]); + det->setExptime(gateIndex, converted_time, + std::vector{det_id}); + os << args[0] << args[1] << '\n'; + } + } + + return os.str(); +} + +std::string Caller::exptime3(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_value] + [Mythen3] Exposure time of gate signal 3 in auto and trigger mode (internal gating). )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) { + int gateIndex = 2; + } + + if (args.size() == 1) { + int gateIndex = 2; + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + int gateIndex = 2; + try { + std::string tmp_time(args[0]); + std::string unit = RemoveUnit(tmp_time); + auto converted_time = StringTo(tmp_time, unit); + } catch (...) { + throw RuntimeError("Could not convert argument to time::ns"); + } + } + + if (args.size() == 2) { + int gateIndex = 2; + try { + StringTo(args[0], args[1]); + } catch (...) { + throw RuntimeError("Could not convert arguments to time::ns"); + } + } + + } + + 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) { + int gateIndex = 2; + auto t = det->getExptime(gateIndex, std::vector{det_id}); + os << OutString(t) << '\n'; + } + + if (args.size() == 1) { + int gateIndex = 2; + auto t = det->getExptime(gateIndex, std::vector{det_id}); + os << OutString(t, args[0]) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + int gateIndex = 2; + std::string tmp_time(args[0]); + std::string unit = RemoveUnit(tmp_time); + auto converted_time = StringTo(tmp_time, unit); + det->setExptime(gateIndex, converted_time, + std::vector{det_id}); + os << args[0] << '\n'; + } + + if (args.size() == 2) { + int gateIndex = 2; + auto converted_time = StringTo(args[0], args[1]); + det->setExptime(gateIndex, converted_time, + std::vector{det_id}); + os << args[0] << args[1] << '\n'; + } + } + + 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{det_id}); + os << OutString(t) << '\n'; + } + + if (args.size() == 1) { + auto t = det->getExptimeLeft(std::vector{det_id}); + os << OutString(t, args[0]) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::extrastoragecells(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0-15] + [Jungfrau] Only for chipv1.0. Number of additional storage cells. Default is 0. For advanced users only. + The #images = #frames x #triggers x (#extrastoragecells + 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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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->getNumberOfAdditionalStorageCells( + std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + if (det_id != -1) { + throw RuntimeError( + "Cannot execute extrastoragecells at module level"); + } + auto arg0 = StringTo(args[0]); + det->setNumberOfAdditionalStorageCells(arg0); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::extsampling(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0, 1] + [Ctb] Enable for external sampling signal for digital data to signal by extsampling src command. For advanced users only. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + } + + 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->getExternalSampling(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setExternalSampling(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::extsamplingsrc(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0-63] + [Ctb] Sampling source signal for digital data. For advanced users only. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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->getExternalSamplingSource(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setExternalSamplingSource(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::extsig(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_signal] [signal_type] + [Gotthard][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] + 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; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (1 && args.size() != 1) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 2) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + try { + StringTo(args[1]); + } catch (...) { + throw RuntimeError( + "Could not convert argument 1 to defs::externalSignalFlag"); + } + } + + } + + 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() == 1) { + auto arg0 = StringTo(args[0]); + auto t = + det->getExternalSignalFlags(arg0, std::vector{det_id}); + os << args[0] << ' ' << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 2) { + auto arg0 = StringTo(args[0]); + auto arg1 = StringTo(args[1]); + det->setExternalSignalFlags(arg0, arg1, std::vector{det_id}); + os << args[0] << ' ' << args[1] << '\n'; + } + } + + return os.str(); +} + +std::string Caller::fformat(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([binary|hdf5] + File format of data file. For HDF5, package must be compiled with HDF5 flags. Default is binary. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError( + "Could not convert argument 0 to defs::fileFormat"); + } + } + + } + + 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->getFileFormat(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setFileFormat(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::filtercells(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0-12] + [Jungfrau] Set Filter Cell. Only for chipv1.1. Advanced user Command )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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->getNumberOfFilterCells(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setNumberOfFilterCells(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::filterresistor(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([value] [Gotthard2][Jungfrau] Set filter resistor. Increasing values for increasing resistance. + [Gotthard2] Options: [0|1|2|3]. Default is 0. + [Jungfrau] Options: [0|1]. Default is 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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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->getFilterResistor(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setFilterResistor(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::findex(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_value] + File or Acquisition index. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to uint64_t"); + } + } + + } + + 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->getAcquisitionIndex(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setAcquisitionIndex(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::firmwaretest(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + [Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Firmware test, ie. reads a read fixed pattern from a register. )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->executeFirmwareTest(std::vector{det_id}); + os << "successful" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::firmwareversion(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Firmware version of detector in format [0xYYMMDD] or an increasing 2 digit number for Eiger. )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 { + + throw RuntimeError( + "INTERNAL ERROR: Invalid action: supported actions are ['GET']"); + } + + // generate code for each action + auto detector_type = det->getDetectorType().squash(); + if (action == slsDetectorDefs::GET_ACTION) { + if (detector_type == defs::EIGER) { + if (args.size() == 0) { + auto t = det->getFirmwareVersion(std::vector{det_id}); + os << OutString(t) << '\n'; + } + + } + + else { + + if (args.size() == 0) { + auto t = det->getFirmwareVersion(std::vector{det_id}); + os << OutStringHex(t) << '\n'; + } + } + } + + return os.str(); +} + +std::string Caller::fliprows(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0, 1] + [Eiger] flips rows paramater sent to slsreceiver to stream as json parameter to flip rows in gui + [Jungfrau][Moench] flips rows in the detector itself. For bottom module and number of interfaces must be set to 2. slsReceiver and slsDetectorGui does not handle. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + } + + 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->getFlipRows(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setFlipRows(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::flowcontrol10g(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0, 1] + [Eiger][Jungfrau][Moench] 10GbE Flow Control. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + } + + 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->getTenGigaFlowControl(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setTenGigaFlowControl(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::fmaster(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0, 1] + Enable or disable receiver master file. Default is 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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + } + + 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) { + if (det_id != -1) { + throw RuntimeError("Cannot execute fmaster at module level"); + } + auto t = det->getMasterFileWrite(); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + if (det_id != -1) { + throw RuntimeError("Cannot execute fmaster at module level"); + } + auto arg0 = StringTo(args[0]); + det->setMasterFileWrite(arg0); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::fname(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([name] + File name prefix for output data file. Default is run. File name: [file name prefix]_d[detector index]_f[sub file index]_[acquisition/file index].raw. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 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->getFileNamePrefix(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + det->setFileNamePrefix(args[0], std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::foverwrite(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0, 1] + Enable or disable file overwriting. Default is 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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + } + + 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->getFileOverWrite(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setFileOverWrite(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::fpath(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([path] + Directory where output data files are written in receiver. Default is '/'. + If path does not exist and fwrite enabled, it will try to create it at start of acquisition. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 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->getFilePath(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + det->setFilePath(args[0], std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::framecounter(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + [Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number of frames from start run control. + [Gotthard2] only in continuous mode. )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 { + + 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->getNumberOfFramesFromStart(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::frames(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_frames] + Number of frames per acquisition. In trigger mode, number of frames per trigger. + Cannot be set in modular level. + In scan mode, number of frames is set to number of steps. + [Gotthard2] Burst mode has a maximum of 2720 frames. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int64_t"); + } + } + + } + + 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->getNumberOfFrames(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + if (det_id != -1) { + throw RuntimeError("Cannot execute frames at module level"); + } + auto arg0 = StringTo(args[0]); + det->setNumberOfFrames(arg0); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::framesl(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + [Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number of frames left in acquisition. + [Gotthard2] only in continuous auto mode. )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 { + + 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->getNumberOfFramesLeft(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::frametime(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([(optional unit) ns|us|ms|s] + [Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Timestamp at a frame start. + [Gotthard2] not in burst and auto mode. )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->getMeasurementTime(std::vector{det_id}); + os << OutString(t) << '\n'; + } + + if (args.size() == 1) { + auto t = det->getMeasurementTime(std::vector{det_id}); + os << OutString(t, args[0]) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::fwrite(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0, 1] + Enable or disable receiver file write. Default is 0. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + } + + 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->getFileWrite(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setFileWrite(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::gainmode(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([dynamic|forceswitchg1|forceswitchg2|fixg1|fixg2|fixg0] + [Jungfrau] Gain mode. + CAUTION: Do not use fixg0 without caution, you can damage the detector!!! )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError( + "Could not convert argument 0 to defs::gainMode"); + } + } + + } + + 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->getGainMode(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setGainMode(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::gappixels(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0, 1] + [Eiger][Jungfrau][Moench] Include Gap pixels in client data call back in Detecor api. Will not be in detector streaming, receiver file or streaming. Default is 0. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + } + + 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) { + if (det_id != -1) { + throw RuntimeError("Cannot execute gappixels at module level"); + } + auto t = det->getGapPixelsinCallback(); + os << t << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + if (det_id != -1) { + throw RuntimeError("Cannot execute gappixels at module level"); + } + auto arg0 = StringTo(args[0]); + det->setGapPixelsinCallback(arg0); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::gatedelay(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([duration] [(optional unit) ns|us|ms|s] + [Mythen3] Gate Delay of all gate signals in auto and trigger mode (internal gating). )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 if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + int gateIndex = -1; + try { + std::string tmp_time(args[0]); + std::string unit = RemoveUnit(tmp_time); + auto converted_time = StringTo(tmp_time, unit); + } catch (...) { + throw RuntimeError("Could not convert argument to time::ns"); + } + } + + if (args.size() == 2) { + int gateIndex = -1; + try { + StringTo(args[0], args[1]); + } catch (...) { + throw RuntimeError("Could not convert arguments to time::ns"); + } + } + + } + + 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->getGateDelayForAllGates(std::vector{det_id}); + os << OutString(t) << '\n'; + } + + if (args.size() == 1) { + auto t = det->getGateDelayForAllGates(std::vector{det_id}); + os << OutString(t, args[0]) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + int gateIndex = -1; + std::string tmp_time(args[0]); + std::string unit = RemoveUnit(tmp_time); + auto converted_time = StringTo(tmp_time, unit); + det->setGateDelay(gateIndex, converted_time, + std::vector{det_id}); + os << args[0] << '\n'; + } + + if (args.size() == 2) { + int gateIndex = -1; + auto converted_time = StringTo(args[0], args[1]); + det->setGateDelay(gateIndex, converted_time, + std::vector{det_id}); + os << args[0] << args[1] << '\n'; + } + } + + return os.str(); +} + +std::string Caller::gatedelay1(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([duration] [(optional unit) ns|us|ms|s] + [Mythen3] Gate Delay of gate signal 1 in auto and trigger mode (internal gating). )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) { + int gateIndex = 0; + } + + if (args.size() == 1) { + int gateIndex = 0; + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + int gateIndex = 0; + try { + std::string tmp_time(args[0]); + std::string unit = RemoveUnit(tmp_time); + auto converted_time = StringTo(tmp_time, unit); + } catch (...) { + throw RuntimeError("Could not convert argument to time::ns"); + } + } + + if (args.size() == 2) { + int gateIndex = 0; + try { + StringTo(args[0], args[1]); + } catch (...) { + throw RuntimeError("Could not convert arguments to time::ns"); + } + } + + } + + 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) { + int gateIndex = 0; + auto t = det->getGateDelay(gateIndex, std::vector{det_id}); + os << OutString(t) << '\n'; + } + + if (args.size() == 1) { + int gateIndex = 0; + auto t = det->getGateDelay(gateIndex, std::vector{det_id}); + os << OutString(t, args[0]) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + int gateIndex = 0; + std::string tmp_time(args[0]); + std::string unit = RemoveUnit(tmp_time); + auto converted_time = StringTo(tmp_time, unit); + det->setGateDelay(gateIndex, converted_time, + std::vector{det_id}); + os << args[0] << '\n'; + } + + if (args.size() == 2) { + int gateIndex = 0; + auto converted_time = StringTo(args[0], args[1]); + det->setGateDelay(gateIndex, converted_time, + std::vector{det_id}); + os << args[0] << args[1] << '\n'; + } + } + + return os.str(); +} + +std::string Caller::gatedelay2(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([duration] [(optional unit) ns|us|ms|s] + [Mythen3] Gate Delay of gate signal 2 in auto and trigger mode (internal gating). )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) { + int gateIndex = 1; + } + + if (args.size() == 1) { + int gateIndex = 1; + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + int gateIndex = 1; + try { + std::string tmp_time(args[0]); + std::string unit = RemoveUnit(tmp_time); + auto converted_time = StringTo(tmp_time, unit); + } catch (...) { + throw RuntimeError("Could not convert argument to time::ns"); + } + } + + if (args.size() == 2) { + int gateIndex = 1; + try { + StringTo(args[0], args[1]); + } catch (...) { + throw RuntimeError("Could not convert arguments to time::ns"); + } + } + + } + + 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) { + int gateIndex = 1; + auto t = det->getGateDelay(gateIndex, std::vector{det_id}); + os << OutString(t) << '\n'; + } + + if (args.size() == 1) { + int gateIndex = 1; + auto t = det->getGateDelay(gateIndex, std::vector{det_id}); + os << OutString(t, args[0]) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + int gateIndex = 1; + std::string tmp_time(args[0]); + std::string unit = RemoveUnit(tmp_time); + auto converted_time = StringTo(tmp_time, unit); + det->setGateDelay(gateIndex, converted_time, + std::vector{det_id}); + os << args[0] << '\n'; + } + + if (args.size() == 2) { + int gateIndex = 1; + auto converted_time = StringTo(args[0], args[1]); + det->setGateDelay(gateIndex, converted_time, + std::vector{det_id}); + os << args[0] << args[1] << '\n'; + } + } + + return os.str(); +} + +std::string Caller::gatedelay3(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([duration] [(optional unit) ns|us|ms|s] + [Mythen3] Gate Delay of gate signal 3 in auto and trigger mode (internal gating). )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) { + int gateIndex = 2; + } + + if (args.size() == 1) { + int gateIndex = 2; + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + int gateIndex = 2; + try { + std::string tmp_time(args[0]); + std::string unit = RemoveUnit(tmp_time); + auto converted_time = StringTo(tmp_time, unit); + } catch (...) { + throw RuntimeError("Could not convert argument to time::ns"); + } + } + + if (args.size() == 2) { + int gateIndex = 2; + try { + StringTo(args[0], args[1]); + } catch (...) { + throw RuntimeError("Could not convert arguments to time::ns"); + } + } + + } + + 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) { + int gateIndex = 2; + auto t = det->getGateDelay(gateIndex, std::vector{det_id}); + os << OutString(t) << '\n'; + } + + if (args.size() == 1) { + int gateIndex = 2; + auto t = det->getGateDelay(gateIndex, std::vector{det_id}); + os << OutString(t, args[0]) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + int gateIndex = 2; + std::string tmp_time(args[0]); + std::string unit = RemoveUnit(tmp_time); + auto converted_time = StringTo(tmp_time, unit); + det->setGateDelay(gateIndex, converted_time, + std::vector{det_id}); + os << args[0] << '\n'; + } + + if (args.size() == 2) { + int gateIndex = 2; + auto converted_time = StringTo(args[0], args[1]); + det->setGateDelay(gateIndex, converted_time, + std::vector{det_id}); + os << args[0] << args[1] << '\n'; + } + } + + return os.str(); +} + +std::string Caller::gates(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_gates] + [Mythen3] Number of external gates in gating or trigger_gating mode (external gating). )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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->getNumberOfGates(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setNumberOfGates(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::getbit(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([reg address in hex] [bit index] + Gets bit in address. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + if (args.size() == 2) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to uint32_t"); + } + try { + StringTo(args[1]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to int"); + } + } + + } + + else { + + throw RuntimeError( + "INTERNAL ERROR: Invalid action: supported actions are ['GET']"); + } + + // generate code for each action + if (action == slsDetectorDefs::GET_ACTION) { + if (args.size() == 2) { + if (StringTo(args[1]) < 0 || StringTo(args[1]) > 31) { + throw RuntimeError("Bit number out of range: " + args[1]); + } + auto arg0 = StringTo(args[0]); + auto arg1 = StringTo(args[1]); + auto t = det->getBit(arg0, arg1, std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::hardwareversion(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Hardware version of detector. + [Eiger] Hardware version of front FPGA on detector. )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 { + + 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->getHardwareVersion(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::highvoltage(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_value] + High voltage to the sensor in Voltage. + [Gotthard] [0|90|110|120|150|180|200] + [Eiger][Mythen3][Gotthard2] 0-200 + [Jungfrau][Moench][Ctb] [0|60-200] )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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->getHighVoltage(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setHighVoltage(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::im_a(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + [Ctb] Measured current of power supply a in mA. )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 { + + 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->getMeasuredCurrent(defs::I_POWER_A, + std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::im_b(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + [Ctb] Measured current of power supply b in mA. )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 { + + 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->getMeasuredCurrent(defs::I_POWER_B, + std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::im_c(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + [Ctb] Measured current of power supply c in mA. )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 { + + 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->getMeasuredCurrent(defs::I_POWER_C, + std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::im_d(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + [Ctb] Measured current of power supply d in mA. )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 { + + 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->getMeasuredCurrent(defs::I_POWER_D, + std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::im_io(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + [Ctb] Measured current of power supply io in mA. )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 { + + 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->getMeasuredCurrent(defs::I_POWER_IO, + std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::imagetest(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + 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" + << 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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + } + + 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->getImageTestMode(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setImageTestMode(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::initialchecks(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0, 1] + [Mythen3][Gotthard2] Enable or disable intial compatibility and other checks at detector start up. It is enabled by default. Must come before 'hostname' command to take effect. Can be used to reprogram fpga when current firmware is incompatible. + Advanced User function! )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + } + + 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) { + if (det_id != -1) { + throw RuntimeError( + "Cannot execute initialchecks at module level"); + } + auto t = det->getInitialChecks(); + os << t << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + if (det_id != -1) { + throw RuntimeError( + "Cannot execute initialchecks at module level"); + } + auto arg0 = StringTo(args[0]); + det->setInitialChecks(arg0); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::inj_ch(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([offset] [increment] + [Gotthard2] Inject channels with current source for calibration. Offset is starting channel that is injected, increment determines succeeding channels to be injected. )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) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + try { + StringTo(args[1]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to int"); + } + } + + } + + 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->getInjectChannel(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 2) { + auto arg0 = StringTo(args[0]); + auto arg1 = StringTo(args[1]); + det->setInjectChannel(arg0, arg1, std::vector{det_id}); + os << ToString(args) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::interpolation(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0, 1] + [Mythen3] Enables or disables interpolation. Default is disabled. Interpolation mode enables all counters and disables vth3. Disabling sets back counter mask and vth3. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + } + + 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->getInterpolation(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setInterpolation(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::interruptsubframe(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0, 1] + [Eiger] 1 interrupts last subframe at required exposure time. 0 will wait for last sub frame to finish exposing. 0 is default. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + } + + 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->getInterruptSubframe(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setInterruptSubframe(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::kernelversion(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Get kernel version on the detector including time and date. )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 { + + 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->getKernelVersion(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::lastclient(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Client IP Address that last communicated with the detector. )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 { + + 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->getLastClientIP(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::led(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0, 1] + [Ctb] Switches on/off all LEDs. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + } + + 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->getLEDEnable(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setLEDEnable(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::lock(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0, 1] + Lock detector to one IP, 1: locks. Default is unlocked )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + } + + 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->getDetectorLock(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setDetectorLock(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::master(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0, 1] + [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" + << 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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + } + + 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->getMaster(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setMaster(arg0, det_id); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::maxadcphaseshift(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + [Jungfrau][Moench][Ctb] Absolute maximum Phase shift of ADC clock. )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 { + + 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->getMaxADCPhaseShift(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::maxclkphaseshift(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_clock] + [Gotthard2][Mythen3] Absolute Maximum Phase shift of clock n_clock.n [Gotthard2] Clock index range: 0-5 + [Mythen3] Clock index range: 0 )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (1 && args.size() != 1) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + if (args.size() == 1) { + defs::detectorType type = + det->getDetectorType().squash(defs::GENERIC); + ; + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + else { + + throw RuntimeError( + "INTERNAL ERROR: Invalid action: supported actions are ['GET']"); + } + + // generate code for each action + if (action == slsDetectorDefs::GET_ACTION) { + if (args.size() == 1) { + defs::detectorType type = + det->getDetectorType().squash(defs::GENERIC); + ; + if (type != defs::GOTTHARD2 && type != defs::MYTHEN3) { + throw RuntimeError( + "maxclkphaseshift not implemented for this detector."); + } + auto arg0 = StringTo(args[0]); + auto t = det->getMaxClockPhaseShift(arg0, std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::maxdbitphaseshift(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + [Ctb][Jungfrau] Absolute maximum Phase shift of of the clock to latch digital bits. )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 { + + 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->getMaxDBITPhaseShift(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::measuredperiod(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([(optional unit) ns|us|ms|s] + [Eiger] Measured frame period between last frame and previous one. Can be measured with minimum 2 frames in an acquisition. )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->getMeasuredPeriod(std::vector{det_id}); + os << OutString(t) << '\n'; + } + + if (args.size() == 1) { + auto t = det->getMeasuredPeriod(std::vector{det_id}); + os << OutString(t, args[0]) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::measuredsubperiod(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([(optional unit) ns|us|ms|s] + [Eiger] Measured sub frame period between last sub frame and previous one. )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->getMeasuredSubFramePeriod(std::vector{det_id}); + os << OutString(t) << '\n'; + } + + if (args.size() == 1) { + auto t = det->getMeasuredSubFramePeriod(std::vector{det_id}); + os << OutString(t, args[0]) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::moduleid(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + [Gotthard2][Eiger][Mythen3][Jungfrau][Moench] 16 bit value (ideally unique) that is streamed out in the UDP header of the detector. Picked up from a file on the module. )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 { + + 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->getModuleId(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::nextframenumber(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_value] + [Eiger][Jungfrau][Moench][Ctb][Xilinx Ctb][Gotthard2] Next frame number. Stopping acquisition might result in different frame numbers for different modules. So, after stopping, next frame number (max + 1) is set for all the modules afterwards. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to uint64_t"); + } + } + + } + + 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->getNextFrameNumber(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setNextFrameNumber(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::nmod(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Number of modules in shared memory. )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 { + + 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->size(); + os << ToString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::numinterfaces(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([1, 2] + [Jungfrau][Moench] Number of udp interfaces to stream data from detector. Default: 1. + Also enables second interface in receiver for listening (Writes a file per interface if writing enabled). + Also restarts client and receiver zmq sockets if zmq streaming enabled. + [Eiger] Only gets with result 2. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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->getNumberofUDPInterfaces(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setNumberofUDPInterfaces(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::overflow(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0, 1] + [Eiger] Enable or disable show overflow flag in 32 bit mode. Default is disabled. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + } + + 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->getOverFlowMode(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setOverFlowMode(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::packageversion(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Package version. )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 { + + 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->getPackageVersion(); + os << t << '\n'; + } + } + + return os.str(); +} + +std::string Caller::parallel(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0, 1] + [Eiger][Mythen3][Gotthard2][Moench] Enable or disable parallel mode. + [Mythen3] If exptime is too short, the acquisition will return ERROR status and take fewer frames than expected. + [Mythen3][Eiger][Moench] Default: Non parallel. + [Gotthard2] Default: Parallel. Non parallel mode works only in continuous mode. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + } + + 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->getParallelMode(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setParallelMode(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::parameters(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Sets detector measurement parameters to those contained in fname. Set up per measurement. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + } + + } + + else { + + throw RuntimeError( + "INTERNAL ERROR: Invalid action: supported actions are ['PUT']"); + } + + // generate code for each action + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + if (det_id != -1) { + throw RuntimeError("Cannot execute parameters at module level"); + } + det->loadParameters(args[0]); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::partialreset(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0, 1] + [Eiger] Sets up detector to do partial or complete reset at start of acquisition. 0 complete reset, 1 partial reset. Default is complete reset. Advanced function! )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + } + + 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->getPartialReset(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setPartialReset(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::patfname(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + [Ctb][Mythen3][Xilinx Ctb] Gets the pattern file name including path of the last pattern uploaded. Returns an empty if nothing was uploaded or via a server default file )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 { + + 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->getPatterFileName(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::patioctrl(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([64 bit mask] + [Ctb] 64 bit mask defining input (0) and output (1) signals. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to uint64_t"); + } + } + + } + + 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->getPatternIOControl(std::vector{det_id}); + os << OutStringHex(t, 16) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setPatternIOControl(arg0, std::vector{det_id}); + os << ToStringHex(arg0, 16) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::patlimits(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([start addr] [stop addr] + [Ctb][Mythen3][Xilinx Ctb] Limits of complete pattern )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + } + + else { + + throw RuntimeError("INTERNAL ERROR: Invalid action: supported actions " + "are ['GET', 'PUT']"); + } + + // generate code for each action + if (action == slsDetectorDefs::GET_ACTION) { + auto arg0 = StringTo("-1"); + auto t = det->getPatternLoopAddresses(arg0, std::vector{det_id}); + os << OutStringHex(t, 4) << '\n'; + } + + if (action == slsDetectorDefs::PUT_ACTION) { + auto arg0 = StringTo("-1"); + auto arg1 = StringTo(args[0]); + auto arg2 = StringTo(args[1]); + det->setPatternLoopAddresses(arg0, arg1, arg2, + std::vector{det_id}); + os << '[' << ToStringHex(arg1, 4) << ", " << ToStringHex(arg2, 4) << ']' + << '\n'; + } + + return os.str(); +} + +std::string Caller::patloop(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0-6] [start addr] [stop addr] + [Ctb][Mythen3][Xilinx Ctb] Limits of the loop level provided. + [Mythen3] Level options: 0-3 only. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + } + + else { + + throw RuntimeError("INTERNAL ERROR: Invalid action: supported actions " + "are ['GET', 'PUT']"); + } + + // generate code for each action + if (action == slsDetectorDefs::GET_ACTION) { + int level = -1, iArg = 0, nGetArgs = 0, nPutArgs = 2; + GetLevelAndUpdateArgIndex(action, "patloop", level, iArg, nGetArgs, + nPutArgs); + auto t = det->getPatternLoopAddresses(level, std::vector{det_id}); + os << level << ' ' << OutStringHex(t, 4) << '\n'; + } + + if (action == slsDetectorDefs::PUT_ACTION) { + int level = -1, iArg = 0, nGetArgs = 0, nPutArgs = 2; + GetLevelAndUpdateArgIndex(action, "patloop", level, iArg, nGetArgs, + nPutArgs); + int start = StringTo(args[iArg++]); + int stop = StringTo(args[iArg++]); + det->setPatternLoopAddresses(level, start, stop, + std::vector{det_id}); + os << level << ' ' << '[' << ToStringHex(start, 4) << ", " + << ToStringHex(stop, 4) << ']' << '\n'; + } + + return os.str(); +} + +std::string Caller::patloop0(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Deprecated command. Use patloop. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + } + + else { + + throw RuntimeError("INTERNAL ERROR: Invalid action: supported actions " + "are ['GET', 'PUT']"); + } + + // generate code for each action + if (action == slsDetectorDefs::GET_ACTION) { + int level = -1, iArg = 0, nGetArgs = 0, nPutArgs = 2; + GetLevelAndUpdateArgIndex(action, "patloop", level, iArg, nGetArgs, + nPutArgs); + auto t = det->getPatternLoopAddresses(level, std::vector{det_id}); + os << OutStringHex(t, 4) << '\n'; + } + + if (action == slsDetectorDefs::PUT_ACTION) { + int level = -1, iArg = 0, nGetArgs = 0, nPutArgs = 2; + GetLevelAndUpdateArgIndex(action, "patloop", level, iArg, nGetArgs, + nPutArgs); + int start = StringTo(args[iArg++]); + int stop = StringTo(args[iArg++]); + det->setPatternLoopAddresses(level, start, stop, + std::vector{det_id}); + os << '[' << ToStringHex(start, 4) << ", " << ToStringHex(stop, 4) + << ']' << '\n'; + } + + return os.str(); +} + +std::string Caller::patloop1(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Deprecated command. Use patloop. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + } + + else { + + throw RuntimeError("INTERNAL ERROR: Invalid action: supported actions " + "are ['GET', 'PUT']"); + } + + // generate code for each action + if (action == slsDetectorDefs::GET_ACTION) { + int level = -1, iArg = 0, nGetArgs = 0, nPutArgs = 2; + GetLevelAndUpdateArgIndex(action, "patloop", level, iArg, nGetArgs, + nPutArgs); + auto t = det->getPatternLoopAddresses(level, std::vector{det_id}); + os << OutStringHex(t, 4) << '\n'; + } + + if (action == slsDetectorDefs::PUT_ACTION) { + int level = -1, iArg = 0, nGetArgs = 0, nPutArgs = 2; + GetLevelAndUpdateArgIndex(action, "patloop", level, iArg, nGetArgs, + nPutArgs); + int start = StringTo(args[iArg++]); + int stop = StringTo(args[iArg++]); + det->setPatternLoopAddresses(level, start, stop, + std::vector{det_id}); + os << '[' << ToStringHex(start, 4) << ", " << ToStringHex(stop, 4) + << ']' << '\n'; + } + + return os.str(); +} + +std::string Caller::patloop2(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Deprecated command. Use patloop. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + } + + else { + + throw RuntimeError("INTERNAL ERROR: Invalid action: supported actions " + "are ['GET', 'PUT']"); + } + + // generate code for each action + if (action == slsDetectorDefs::GET_ACTION) { + int level = -1, iArg = 0, nGetArgs = 0, nPutArgs = 2; + GetLevelAndUpdateArgIndex(action, "patloop", level, iArg, nGetArgs, + nPutArgs); + auto t = det->getPatternLoopAddresses(level, std::vector{det_id}); + os << OutStringHex(t, 4) << '\n'; + } + + if (action == slsDetectorDefs::PUT_ACTION) { + int level = -1, iArg = 0, nGetArgs = 0, nPutArgs = 2; + GetLevelAndUpdateArgIndex(action, "patloop", level, iArg, nGetArgs, + nPutArgs); + int start = StringTo(args[iArg++]); + int stop = StringTo(args[iArg++]); + det->setPatternLoopAddresses(level, start, stop, + std::vector{det_id}); + os << '[' << ToStringHex(start, 4) << ", " << ToStringHex(stop, 4) + << ']' << '\n'; + } + + return os.str(); +} + +std::string Caller::patmask(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([64 bit mask] + [Ctb][Mythen3][Xilinx Ctb] Selects the bits that will have a pattern mask applied to the selected patmask for every pattern. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to uint64_t"); + } + } + + } + + 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->getPatternMask(std::vector{det_id}); + os << OutStringHex(t, 16) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setPatternMask(arg0, std::vector{det_id}); + os << ToStringHex(arg0, 16) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::patnloop(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0-6] [n_cycles] + [Ctb][Mythen3][Xilinx Ctb] Number of cycles of the loop level provided. + [Mythen3] Level options: 0-3 only. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + } + + else { + + throw RuntimeError("INTERNAL ERROR: Invalid action: supported actions " + "are ['GET', 'PUT']"); + } + + // generate code for each action + if (action == slsDetectorDefs::GET_ACTION) { + int level = -1, iArg = 0, nGetArgs = 0, nPutArgs = 1; + GetLevelAndUpdateArgIndex(action, "patnloop", level, iArg, nGetArgs, + nPutArgs); + auto t = det->getPatternLoopCycles(level, std::vector{det_id}); + os << level << ' ' << OutString(t) << '\n'; + } + + if (action == slsDetectorDefs::PUT_ACTION) { + int level = -1, iArg = 0, nGetArgs = 0, nPutArgs = 1; + GetLevelAndUpdateArgIndex(action, "patnloop", level, iArg, nGetArgs, + nPutArgs); + std::string nloops = args[iArg++]; + auto arg1 = StringTo(nloops); + det->setPatternLoopCycles(level, arg1, std::vector{det_id}); + os << level << ' ' << nloops << '\n'; + } + + return os.str(); +} + +std::string Caller::patnloop0(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Deprecated command. Use patnloop. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + } + + else { + + throw RuntimeError("INTERNAL ERROR: Invalid action: supported actions " + "are ['GET', 'PUT']"); + } + + // generate code for each action + if (action == slsDetectorDefs::GET_ACTION) { + int level = -1, iArg = 0, nGetArgs = 0, nPutArgs = 1; + GetLevelAndUpdateArgIndex(action, "patnloop", level, iArg, nGetArgs, + nPutArgs); + auto t = det->getPatternLoopCycles(level, std::vector{det_id}); + os << OutString(t) << '\n'; + } + + if (action == slsDetectorDefs::PUT_ACTION) { + int level = -1, iArg = 0, nGetArgs = 0, nPutArgs = 1; + GetLevelAndUpdateArgIndex(action, "patnloop", level, iArg, nGetArgs, + nPutArgs); + std::string nloops = args[iArg++]; + auto arg1 = StringTo(nloops); + det->setPatternLoopCycles(level, arg1, std::vector{det_id}); + os << nloops << '\n'; + } + + return os.str(); +} + +std::string Caller::patnloop1(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Deprecated command. Use patnloop. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + } + + else { + + throw RuntimeError("INTERNAL ERROR: Invalid action: supported actions " + "are ['GET', 'PUT']"); + } + + // generate code for each action + if (action == slsDetectorDefs::GET_ACTION) { + int level = -1, iArg = 0, nGetArgs = 0, nPutArgs = 1; + GetLevelAndUpdateArgIndex(action, "patnloop", level, iArg, nGetArgs, + nPutArgs); + auto t = det->getPatternLoopCycles(level, std::vector{det_id}); + os << OutString(t) << '\n'; + } + + if (action == slsDetectorDefs::PUT_ACTION) { + int level = -1, iArg = 0, nGetArgs = 0, nPutArgs = 1; + GetLevelAndUpdateArgIndex(action, "patnloop", level, iArg, nGetArgs, + nPutArgs); + std::string nloops = args[iArg++]; + auto arg1 = StringTo(nloops); + det->setPatternLoopCycles(level, arg1, std::vector{det_id}); + os << nloops << '\n'; + } + + return os.str(); +} + +std::string Caller::patnloop2(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Deprecated command. Use patnloop. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + } + + else { + + throw RuntimeError("INTERNAL ERROR: Invalid action: supported actions " + "are ['GET', 'PUT']"); + } + + // generate code for each action + if (action == slsDetectorDefs::GET_ACTION) { + int level = -1, iArg = 0, nGetArgs = 0, nPutArgs = 1; + GetLevelAndUpdateArgIndex(action, "patnloop", level, iArg, nGetArgs, + nPutArgs); + auto t = det->getPatternLoopCycles(level, std::vector{det_id}); + os << OutString(t) << '\n'; + } + + if (action == slsDetectorDefs::PUT_ACTION) { + int level = -1, iArg = 0, nGetArgs = 0, nPutArgs = 1; + GetLevelAndUpdateArgIndex(action, "patnloop", level, iArg, nGetArgs, + nPutArgs); + std::string nloops = args[iArg++]; + auto arg1 = StringTo(nloops); + det->setPatternLoopCycles(level, arg1, std::vector{det_id}); + os << nloops << '\n'; + } + + return os.str(); +} + +std::string Caller::patsetbit(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([64 bit mask] + [Ctb][Mythen3][Xilinx Ctb] Sets the mask applied to every pattern to the selected bits. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to uint64_t"); + } + } + + } + + 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->getPatternBitMask(std::vector{det_id}); + os << OutStringHex(t, 16) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setPatternBitMask(arg0, std::vector{det_id}); + os << ToStringHex(arg0, 16) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::pattern(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([fname] + [Mythen3][Ctb][Xilinx Ctb] Loads ASCII pattern file directly to server (instead of executing line by line) )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + } + + } + + else { + + throw RuntimeError( + "INTERNAL ERROR: Invalid action: supported actions are ['PUT']"); + } + + // generate code for each action + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + det->setPattern(args[0], std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::patternstart(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + [Mythen3] Starts Pattern )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->startPattern(std::vector{det_id}); + os << "successful" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::patwait(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0-6] [addr] + [Ctb][Mythen3][Xilinx Ctb] Wait address for loop level provided. + [Mythen3] Level options: 0-3 only. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + } + + else { + + throw RuntimeError("INTERNAL ERROR: Invalid action: supported actions " + "are ['GET', 'PUT']"); + } + + // generate code for each action + if (action == slsDetectorDefs::GET_ACTION) { + int level = -1, iArg = 0, nGetArgs = 0, nPutArgs = 1; + GetLevelAndUpdateArgIndex(action, "patwait", level, iArg, nGetArgs, + nPutArgs); + auto t = det->getPatternWaitAddr(level, std::vector{det_id}); + os << level << ' ' << OutStringHex(t, 4) << '\n'; + } + + if (action == slsDetectorDefs::PUT_ACTION) { + int level = -1, iArg = 0, nGetArgs = 0, nPutArgs = 1; + GetLevelAndUpdateArgIndex(action, "patwait", level, iArg, nGetArgs, + nPutArgs); + int addr = StringTo(args[iArg++]); + det->setPatternWaitAddr(level, addr, std::vector{det_id}); + os << level << ' ' << ToStringHex(addr, 4) << '\n'; + } + + return os.str(); +} + +std::string Caller::patwait0(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Deprecated command. Use patwait. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + } + + else { + + throw RuntimeError("INTERNAL ERROR: Invalid action: supported actions " + "are ['GET', 'PUT']"); + } + + // generate code for each action + if (action == slsDetectorDefs::GET_ACTION) { + int level = -1, iArg = 0, nGetArgs = 0, nPutArgs = 1; + GetLevelAndUpdateArgIndex(action, "patwait", level, iArg, nGetArgs, + nPutArgs); + auto t = det->getPatternWaitAddr(level, std::vector{det_id}); + os << OutStringHex(t, 4) << '\n'; + } + + if (action == slsDetectorDefs::PUT_ACTION) { + int level = -1, iArg = 0, nGetArgs = 0, nPutArgs = 1; + GetLevelAndUpdateArgIndex(action, "patwait", level, iArg, nGetArgs, + nPutArgs); + int addr = StringTo(args[iArg++]); + det->setPatternWaitAddr(level, addr, std::vector{det_id}); + os << ToStringHex(addr, 4) << '\n'; + } + + return os.str(); +} + +std::string Caller::patwait1(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Deprecated command. Use patwait. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + } + + else { + + throw RuntimeError("INTERNAL ERROR: Invalid action: supported actions " + "are ['GET', 'PUT']"); + } + + // generate code for each action + if (action == slsDetectorDefs::GET_ACTION) { + int level = -1, iArg = 0, nGetArgs = 0, nPutArgs = 1; + GetLevelAndUpdateArgIndex(action, "patwait", level, iArg, nGetArgs, + nPutArgs); + auto t = det->getPatternWaitAddr(level, std::vector{det_id}); + os << OutStringHex(t, 4) << '\n'; + } + + if (action == slsDetectorDefs::PUT_ACTION) { + int level = -1, iArg = 0, nGetArgs = 0, nPutArgs = 1; + GetLevelAndUpdateArgIndex(action, "patwait", level, iArg, nGetArgs, + nPutArgs); + int addr = StringTo(args[iArg++]); + det->setPatternWaitAddr(level, addr, std::vector{det_id}); + os << ToStringHex(addr, 4) << '\n'; + } + + return os.str(); +} + +std::string Caller::patwait2(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Deprecated command. Use patwait. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + } + + else { + + throw RuntimeError("INTERNAL ERROR: Invalid action: supported actions " + "are ['GET', 'PUT']"); + } + + // generate code for each action + if (action == slsDetectorDefs::GET_ACTION) { + int level = -1, iArg = 0, nGetArgs = 0, nPutArgs = 1; + GetLevelAndUpdateArgIndex(action, "patwait", level, iArg, nGetArgs, + nPutArgs); + auto t = det->getPatternWaitAddr(level, std::vector{det_id}); + os << OutStringHex(t, 4) << '\n'; + } + + if (action == slsDetectorDefs::PUT_ACTION) { + int level = -1, iArg = 0, nGetArgs = 0, nPutArgs = 1; + GetLevelAndUpdateArgIndex(action, "patwait", level, iArg, nGetArgs, + nPutArgs); + int addr = StringTo(args[iArg++]); + det->setPatternWaitAddr(level, addr, std::vector{det_id}); + os << ToStringHex(addr, 4) << '\n'; + } + + return os.str(); +} + +std::string Caller::patwaittime(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0-6] [n_clk] + [Ctb][Mythen3][Xilinx Ctb] Wait time in clock cycles for the loop provided. + [Mythen3] Level options: 0-3 only. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + } + + else { + + throw RuntimeError("INTERNAL ERROR: Invalid action: supported actions " + "are ['GET', 'PUT']"); + } + + // generate code for each action + if (action == slsDetectorDefs::GET_ACTION) { + int level = -1, iArg = 0, nGetArgs = 0, nPutArgs = 1; + GetLevelAndUpdateArgIndex(action, "patwaittime", level, iArg, nGetArgs, + nPutArgs); + auto t = det->getPatternWaitTime(level, std::vector{det_id}); + os << level << ' ' << OutString(t) << '\n'; + } + + if (action == slsDetectorDefs::PUT_ACTION) { + int level = -1, iArg = 0, nGetArgs = 0, nPutArgs = 1; + GetLevelAndUpdateArgIndex(action, "patwaittime", level, iArg, nGetArgs, + nPutArgs); + uint64_t waittime = StringTo(args[iArg++]); + det->setPatternWaitTime(level, waittime, std::vector{det_id}); + os << level << ' ' << waittime << '\n'; + } + + return os.str(); +} + +std::string Caller::patwaittime0(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Deprecated command. Use patwaittime. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + } + + else { + + throw RuntimeError("INTERNAL ERROR: Invalid action: supported actions " + "are ['GET', 'PUT']"); + } + + // generate code for each action + if (action == slsDetectorDefs::GET_ACTION) { + int level = -1, iArg = 0, nGetArgs = 0, nPutArgs = 1; + GetLevelAndUpdateArgIndex(action, "patwaittime", level, iArg, nGetArgs, + nPutArgs); + auto t = det->getPatternWaitTime(level, std::vector{det_id}); + os << OutString(t) << '\n'; + } + + if (action == slsDetectorDefs::PUT_ACTION) { + int level = -1, iArg = 0, nGetArgs = 0, nPutArgs = 1; + GetLevelAndUpdateArgIndex(action, "patwaittime", level, iArg, nGetArgs, + nPutArgs); + uint64_t waittime = StringTo(args[iArg++]); + det->setPatternWaitTime(level, waittime, std::vector{det_id}); + os << waittime << '\n'; + } + + return os.str(); +} + +std::string Caller::patwaittime1(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Deprecated command. Use patwaittime. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + } + + else { + + throw RuntimeError("INTERNAL ERROR: Invalid action: supported actions " + "are ['GET', 'PUT']"); + } + + // generate code for each action + if (action == slsDetectorDefs::GET_ACTION) { + int level = -1, iArg = 0, nGetArgs = 0, nPutArgs = 1; + GetLevelAndUpdateArgIndex(action, "patwaittime", level, iArg, nGetArgs, + nPutArgs); + auto t = det->getPatternWaitTime(level, std::vector{det_id}); + os << OutString(t) << '\n'; + } + + if (action == slsDetectorDefs::PUT_ACTION) { + int level = -1, iArg = 0, nGetArgs = 0, nPutArgs = 1; + GetLevelAndUpdateArgIndex(action, "patwaittime", level, iArg, nGetArgs, + nPutArgs); + uint64_t waittime = StringTo(args[iArg++]); + det->setPatternWaitTime(level, waittime, std::vector{det_id}); + os << waittime << '\n'; + } + + return os.str(); +} + +std::string Caller::patwaittime2(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Deprecated command. Use patwaittime. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + } + + else { + + throw RuntimeError("INTERNAL ERROR: Invalid action: supported actions " + "are ['GET', 'PUT']"); + } + + // generate code for each action + if (action == slsDetectorDefs::GET_ACTION) { + int level = -1, iArg = 0, nGetArgs = 0, nPutArgs = 1; + GetLevelAndUpdateArgIndex(action, "patwaittime", level, iArg, nGetArgs, + nPutArgs); + auto t = det->getPatternWaitTime(level, std::vector{det_id}); + os << OutString(t) << '\n'; + } + + if (action == slsDetectorDefs::PUT_ACTION) { + int level = -1, iArg = 0, nGetArgs = 0, nPutArgs = 1; + GetLevelAndUpdateArgIndex(action, "patwaittime", level, iArg, nGetArgs, + nPutArgs); + uint64_t waittime = StringTo(args[iArg++]); + det->setPatternWaitTime(level, waittime, std::vector{det_id}); + os << waittime << '\n'; + } + + return os.str(); +} + +std::string Caller::patword(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([step or address] [64 bit mask] + [Ctb][Mythen3][Xilinx Ctb] 64 bit pattern at address of pattern memory. + [Ctb] read is same as executing pattern )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (1 && args.size() != 1) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 2) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + try { + StringTo(args[1]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to uint64_t"); + } + } + + } + + 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() == 1) { + auto arg0 = StringTo(args[0]); + auto t = det->getPatternWord(arg0, std::vector{det_id}); + os << '[' << ToStringHex(arg0, 4) << ", " << OutStringHex(t, 16) + << "]" << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 2) { + auto arg0 = StringTo(args[0]); + auto arg1 = StringTo(args[1]); + det->setPatternWord(arg0, arg1, std::vector{det_id}); + os << '[' << ToStringHex(arg0, 4) << ", " << ToStringHex(arg1, 16) + << "]" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::pedestalmode(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( [frames] [loops] + [Jungfrau] Enable pedestal mode. + The number of frames or triggers is overwritten by: + (#pedestal_frames x #pedestal_loops x 2). + In auto timing mode or in trigger mode with #frames > 1, + #frames is overwritten and #triggers = 1, + else #triggers is overwritten and #frames = 1. + One cannot set #frames, #triggers or timing mode in pedestal mode (exception thrown). + pedestalmode [0] + [Jungfrau] Disable pedestal mode. + Disabling pedestal mode will set back the normal mode values of #frames and #triggers. )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() != 1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + } + + if (args.size() == 2) { + } + + } + + 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->getPedestalMode(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + if (args[0] != "0") { + throw RuntimeError( + "Unknown argument " + args[0] + + ". Did you mean 0 to disable pedestal mode?"); + } + det->setPedestalMode(defs::pedestalParameters()); + os << ToString(args) << '\n'; + } + + if (args.size() == 2) { + det->setPedestalMode(defs::pedestalParameters( + StringTo(args[0]), StringTo(args[1]))); + os << ToString(args) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::period(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([duration] [(optional unit) ns|us|ms|s] + Period between frames )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 if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + std::string tmp_time(args[0]); + std::string unit = RemoveUnit(tmp_time); + auto converted_time = StringTo(tmp_time, unit); + } catch (...) { + throw RuntimeError("Could not convert argument to time::ns"); + } + } + + if (args.size() == 2) { + try { + StringTo(args[0], args[1]); + } catch (...) { + throw RuntimeError("Could not convert arguments to time::ns"); + } + } + + } + + 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->getPeriod(std::vector{det_id}); + os << OutString(t) << '\n'; + } + + if (args.size() == 1) { + auto t = det->getPeriod(std::vector{det_id}); + os << OutString(t, args[0]) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + std::string tmp_time(args[0]); + std::string unit = RemoveUnit(tmp_time); + auto converted_time = StringTo(tmp_time, unit); + det->setPeriod(converted_time, std::vector{det_id}); + os << args[0] << '\n'; + } + + if (args.size() == 2) { + auto converted_time = StringTo(args[0], args[1]); + det->setPeriod(converted_time, std::vector{det_id}); + os << args[0] << args[1] << '\n'; + } + } + + return os.str(); +} + +std::string Caller::periodl(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + [Gotthard][Jungfrau][Moench][Ctb][Mythen3][Gotthard2][Xilinx Ctb] Period left for current frame. + [Gotthard2] only in continuous mode. )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->getPeriodLeft(std::vector{det_id}); + os << OutString(t) << '\n'; + } + + if (args.size() == 1) { + auto t = det->getPeriodLeft(std::vector{det_id}); + os << OutString(t, args[0]) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::polarity(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([pos|neg] + [Mythen3] Sets negative or positive polarity. Default is positive )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError( + "Could not convert argument 0 to defs::polarity"); + } + } + + } + + 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->getPolarity(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setPolarity(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::port(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n] + Port number of the control server on detector for detector-client tcp interface. Default is 1952. Normally unchanged. Set different ports for virtual servers on same pc. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to uint16_t"); + } + } + + } + + 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->getControlPort(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setControlPort(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::powerchip(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0, 1] + [Jungfrau][Moench][Mythen3][Gotthard2][Xilinx Ctb] Power the chip. + [Jungfrau][Moench] Default is 0. Get will return power status. Can be off if temperature event occured (temperature over temp_threshold with temp_control enabled. Will configure chip (only chip v1.1) + [Mythen3][Gotthard2] Default is 1. If module not connected or wrong module, powerchip will fail. + [Xilinx Ctb] Default is 0. Also configures the chip if powered on. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + } + + 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->getPowerChip(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setPowerChip(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::powerindex(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([name] + [Ctb][Xilinx_Ctb] Get the power index for the given name. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (1 && args.size() != 1) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + if (args.size() == 1) { + defs::dacIndex index = defs::V_POWER_A; + } + + } + + else { + + throw RuntimeError( + "INTERNAL ERROR: Invalid action: supported actions are ['GET']"); + } + + // generate code for each action + if (action == slsDetectorDefs::GET_ACTION) { + if (args.size() == 1) { + defs::dacIndex index = defs::V_POWER_A; + if (det->getDetectorType().squash(defs::GENERIC) != + defs::CHIPTESTBOARD && + det->getDetectorType().squash(defs::GENERIC) != + defs::XILINX_CHIPTESTBOARD) { + throw RuntimeError(cmd + " only allowed for CTB."); + } + if (det_id != -1) { + throw RuntimeError("Cannot execute powerindex at module level"); + } + auto t = det->getPowerIndex(args[0]); + os << ToString(static_cast(t) - index) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::powerlist(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([powername1 powername2 .. powername4] + [Ctb][Xilinx_Ctb] Set the list of power names for this board. )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) { + auto det_type = det->getDetectorType().squash(defs::GENERIC); + ; + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + } + + 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 det_type = det->getDetectorType().squash(defs::GENERIC); + ; + if (cmd != "daclist" && det_type != defs::CHIPTESTBOARD && + det_type != defs::XILINX_CHIPTESTBOARD) { + throw RuntimeError(cmd + " only allowed for CTB."); + } + if (det_id != -1) { + throw RuntimeError("Cannot execute powerlist at module level"); + } + auto t = det->getPowerNames(); + os << ToString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + auto det_type = det->getDetectorType().squash(defs::GENERIC); + ; + if (cmd != "daclist" && det_type != defs::CHIPTESTBOARD && + det_type != defs::XILINX_CHIPTESTBOARD) { + throw RuntimeError(cmd + " only allowed for CTB."); + } + if (cmd == "daclist" && det_type != defs::CHIPTESTBOARD && + det_type != defs::XILINX_CHIPTESTBOARD) { + throw RuntimeError("This detector already has fixed dac names. " + "Cannot change them."); + } + if (det_id != -1) { + throw RuntimeError("Cannot execute powerlist at module level"); + } + det->setPowerNames(args); + os << ToString(args) << '\n'; + } + + return os.str(); +} + +std::string Caller::powername(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0-4][name] + [Ctb][Xilinx_Ctb] Set the power at the given position to the given name. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (1 && args.size() != 1) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + if (args.size() == 1) { + defs::dacIndex index = defs::V_POWER_A; + } + + } + + 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::dacIndex index = defs::V_POWER_A; + } + + } + + 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() == 1) { + defs::dacIndex index = defs::V_POWER_A; + if (det->getDetectorType().squash(defs::GENERIC) != + defs::CHIPTESTBOARD && + det->getDetectorType().squash(defs::GENERIC) != + defs::XILINX_CHIPTESTBOARD) { + throw RuntimeError(cmd + " only allowed for CTB."); + } + if (det_id != -1) { + throw RuntimeError("Cannot execute powername at module level"); + } + auto t = det->getPowerName( + static_cast(StringTo(args[0]) + index)); + os << args[0] << ' ' << t << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 2) { + defs::dacIndex index = defs::V_POWER_A; + if (det->getDetectorType().squash(defs::GENERIC) != + defs::CHIPTESTBOARD && + det->getDetectorType().squash(defs::GENERIC) != + defs::XILINX_CHIPTESTBOARD) { + throw RuntimeError(cmd + " only allowed for CTB."); + } + if (det_id != -1) { + throw RuntimeError("Cannot execute powername at module level"); + } + det->setPowerName( + static_cast(StringTo(args[0]) + index), + args[1]); + os << ToString(args) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::powervalues(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([name] + [Ctb][Xilinx_Ctb] Get values of all powers. )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 { + + throw RuntimeError( + "INTERNAL ERROR: Invalid action: supported actions are ['GET']"); + } + + // generate code for each action + if (action == slsDetectorDefs::GET_ACTION) { + if (args.size() == 0) { + + std::string suffix = " mV"; + auto t = det->getPowerList(); + + auto names = det->getPowerNames(); + auto name_it = names.begin(); + os << '['; + if (t.size() > 0) { + + auto it = t.cbegin(); + os << ToString(*name_it++) << ' '; + os << OutString(det->getPower(*it++, std::vector{det_id})) + << suffix; + while (it != t.cend()) { + os << ", " << ToString(*name_it++) << ' '; + os << OutString( + det->getPower(*it++, std::vector{det_id})) + << suffix; + } + } + + os << "]\n"; + } + } + + return os.str(); +} + +std::string Caller::programfpga(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([fname.pof | fname.rbf (full path)][(opitonal)--force-delete-normal-file] + [Jungfrau][Moench][Ctb] Programs FPGA from pof file (full path). Then, detector controller is rebooted. + Use --force-delete-normal-file argument, if normal file found in device tree, it must be deleted, a new device drive created and programming continued. + [Mythen3][Gotthard2] Programs FPGA from rbf file (full path). Then, detector controller is rebooted. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo("0"); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to bool"); + } + } + + if (args.size() == 2) { + try { + StringTo("1"); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to bool"); + } + } + + } + + else { + + throw RuntimeError( + "INTERNAL ERROR: Invalid action: supported actions are ['PUT']"); + } + + // generate code for each action + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg1 = StringTo("0"); + det->programFPGA(args[0], arg1, std::vector{det_id}); + os << "successful" << '\n'; + } + + if (args.size() == 2) { + if (args[1] != "--force-delete-normal-file") { + throw RuntimeError("Could not scan second argument. Did you " + "mean --force-delete-normal-file?"); + } + auto arg1 = StringTo("1"); + det->programFPGA(args[0], arg1, std::vector{det_id}); + os << "successful" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::pulse(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_times] [x] [y] + [Eiger] Pulse pixel n number of times at coordinates (x, y). Advanced User! )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 3) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 3) { + defs::xy c = + defs::xy(StringTo(args[1]), StringTo(args[2])); + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + else { + + throw RuntimeError( + "INTERNAL ERROR: Invalid action: supported actions are ['PUT']"); + } + + // generate code for each action + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 3) { + defs::xy c = + defs::xy(StringTo(args[1]), StringTo(args[2])); + auto arg0 = StringTo(args[0]); + det->pulsePixel(arg0, c, std::vector{det_id}); + os << ToString(args) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::pulsechip(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_times] + [Eiger] Pulse chip n times. If n is -1, resets to normal mode (reset chip completely at start of acquisition, where partialreset = 0). Advanced User! )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + else { + + throw RuntimeError( + "INTERNAL ERROR: Invalid action: supported actions are ['PUT']"); + } + + // generate code for each action + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->pulseChip(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::pulsenmove(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_times] [x] [y] + [Eiger] Pulse pixel n number of times and moves relatively by (x, y). Advanced User! )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 3) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 3) { + defs::xy c = + defs::xy(StringTo(args[1]), StringTo(args[2])); + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + else { + + throw RuntimeError( + "INTERNAL ERROR: Invalid action: supported actions are ['PUT']"); + } + + // generate code for each action + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 3) { + defs::xy c = + defs::xy(StringTo(args[1]), StringTo(args[2])); + auto arg0 = StringTo(args[0]); + det->pulsePixelNMove(arg0, c, std::vector{det_id}); + os << ToString(args) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::pumpprobe(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0, 1] + [Mythen3] Enables or disables pump probe mode. Default is disabled. Pump probe mode only enables vth2. Disabling sets back to previous value. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + } + + 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->getPumpProbe(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setPumpProbe(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::quad(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0, 1] + [Eiger] Sets detector size to a quad. 0 (disabled) is default. (Specific hardware required). )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + } + + 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->getQuad(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + if (det_id != -1) { + throw RuntimeError("Cannot execute quad at module level"); + } + auto arg0 = StringTo(args[0]); + det->setQuad(arg0); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::readnrows(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + [1-256] + [Eiger] Number of rows to readout per half module starting from the centre. Options: 0 - 256. 256 is default. The permissible values depend on dynamic range and 10Gbe enabled. + [8-512 (multiple of 8)] + [Jungfrau] Number of rows per module starting from the centre. Options: 8 - 512, must be multiples of 8. Default is 512. + [Moench] Number of rows per module starting from the centre. Options:16 - 400, must be multiples of 16. Default is 400. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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->getReadNRows(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setReadNRows(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::readout(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + [Mythen3] Starts detector readout. Status changes to TRANSMITTING and automatically returns to idle at the end of readout. )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) { + if (det_id != -1) { + throw RuntimeError("Cannot execute readout at module level"); + } + det->startDetectorReadout(); + os << "successful" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::readoutspeed(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + [0 or full_speed|1 or half_speed|2 or quarter_speed] + [Eiger][Jungfrau][Moench][Mythen3] Readout speed of chip. + [Eiger][Moench] Default speed is full_speed. + [Jungfrau][Mythen3] Default speed is half_speed. + [Jungfrau] full_speed option only available from v2.0 boards and is recommended to set number of interfaces to 2. Also overwrites adcphase to recommended default. + [144|108] + [Gotthard2] Readout speed of chip in MHz. Default is 108. )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) { + auto det_type = det->getDetectorType().squash(defs::GENERIC); + ; + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + auto det_type = det->getDetectorType().squash(defs::GENERIC); + ; + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError( + "Could not convert argument 0 to defs::speedLevel"); + } + } + + } + + 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 det_type = det->getDetectorType().squash(defs::GENERIC); + ; + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { + throw RuntimeError( + "ReadoutSpeed not implemented. Did you mean runclk?"); + } + auto t = det->getReadoutSpeed(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto det_type = det->getDetectorType().squash(defs::GENERIC); + ; + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { + throw RuntimeError( + "ReadoutSpeed not implemented. Did you mean runclk?"); + } + auto arg0 = StringTo(args[0]); + det->setReadoutSpeed(arg0, std::vector{det_id}); + os << ToString(StringTo(args[0])) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::readoutspeedlist(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + List of readout speed levels implemented for this detector. )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 { + + 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->getReadoutSpeedList(); + os << ToString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::rebootcontroller(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + [Jungfrau][Moench][Ctb][Gotthard][Mythen3][Gotthard2][Xilinx Ctb] Reboot controller of detector. )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->rebootController(std::vector{det_id}); + os << "successful" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::reg(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([address] [32 bit value][(optional)--validate] + [Mythen3][Gotthard2] Reads/writes to a 32 bit register in hex. Advanced Function! + Goes to stop server. Hence, can be called while calling blocking acquire(). + Use --validate to force validation when writing to it. + [Eiger] +0x100 for only left, +0x200 for only right. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (1 && args.size() != 1) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to uint32_t"); + } + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 2 && args.size() != 3) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 2) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to uint32_t"); + } + try { + StringTo(args[1]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to uint32_t"); + } + try { + StringTo("0"); + } catch (...) { + throw RuntimeError("Could not convert argument 2 to bool"); + } + } + + if (args.size() == 3) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to uint32_t"); + } + try { + StringTo(args[1]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to uint32_t"); + } + try { + StringTo("1"); + } catch (...) { + throw RuntimeError("Could not convert argument 2 to bool"); + } + } + + } + + 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() == 1) { + auto arg0 = StringTo(args[0]); + auto t = det->readRegister(arg0, std::vector{det_id}); + os << OutStringHex(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 2) { + auto arg0 = StringTo(args[0]); + auto arg1 = StringTo(args[1]); + auto arg2 = StringTo("0"); + det->writeRegister(arg0, arg1, arg2, std::vector{det_id}); + os << "[" << args[0] << ", " << args[1] << "]" << '\n'; + } + + if (args.size() == 3) { + if (args[2] != "--validate") { + throw RuntimeError( + "Could not scan third argument. Did you mean --validate?"); + } + auto arg0 = StringTo(args[0]); + auto arg1 = StringTo(args[1]); + auto arg2 = StringTo("1"); + det->writeRegister(arg0, arg1, arg2, std::vector{det_id}); + os << "[" << args[0] << ", " << args[1] << "]" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::resetdacs(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + 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" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 1 && args.size() != 0) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + } + + 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() == 1) { + if (args[0] != "hard") { + throw RuntimeError("Unknown argument " + args[0] + + ". Did you mean hard?"); + } + det->resetToDefaultDacs("1", std::vector{det_id}); + os << "successful" << '\n'; + } + + if (args.size() == 0) { + det->resetToDefaultDacs("0", std::vector{det_id}); + os << "successful" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::resetfpga(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + [Jungfrau][Moench][Ctb][Xilinx Ctb] Reset FPGA. )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->resetFPGA(std::vector{det_id}); + os << "successful" << '\n'; + } + } + + 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(args[0]), StringTo(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{det_id}); + os << t << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 2) { + defs::ROI t = + defs::ROI(StringTo(args[0]), StringTo(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::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([analog|digital|analog_digital|transceiver|digital_transceiver] + [Ctb][xilinx Ctb] Readout mode. [Ctb] Default is analog. [Xilinx Ctb] Default is Transceiver (only one implemented so far) )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError( + "Could not convert argument 0 to defs::readoutMode"); + } + } + + } + + 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->getReadoutMode(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setReadoutMode(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::row(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([value] + Set Detector row (udp header) to value. + Gui uses it to rearrange for complete image )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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->getRow(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setRow(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::runclk(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_clk in MHz] + [Ctb] Run clock in MHz. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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->getRUNClock(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setRUNClock(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::runtime(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([(optional unit) ns|us|ms|s] + [Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Time from detector start up. + [Gotthard2] not in burst and auto mode. )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->getActualTime(std::vector{det_id}); + os << OutString(t) << '\n'; + } + + if (args.size() == 1) { + auto t = det->getActualTime(std::vector{det_id}); + os << OutString(t, args[0]) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::rx_arping(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0, 1] + Starts a thread in slsReceiver to arping the interface it is listening to every minute. Useful in 10G mode. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + } + + 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->getRxArping(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setRxArping(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::rx_clearroi(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Resets Region of interest in receiver. Default is all channels/pixels 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) { + if (det_id != -1) { + throw RuntimeError( + "Cannot execute rx_clearroi at module level"); + } + det->clearRxROI(); + os << "successful" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::rx_dbitoffset(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_bytes] + [Ctb] Offset in bytes in digital data to skip in receiver. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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->getRxDbitOffset(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setRxDbitOffset(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::rx_discardpolicy(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([nodiscard (default)|discardempty|discardpartial(fastest)] + Frame discard policy of receiver. nodiscard does not discard frames, discardempty discards empty frames, discardpartial discards partial frames. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError( + "Could not convert argument 0 to defs::frameDiscardPolicy"); + } + } + + } + + 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->getRxFrameDiscardPolicy(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setRxFrameDiscardPolicy(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::rx_fifodepth(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_frames] + Set the number of frames in the receiver fifo depth (buffer between listener and writer threads). )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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->getRxFifoDepth(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setRxFifoDepth(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::rx_frameindex(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Current frame index received for each port in receiver during acquisition. )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 { + + 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->getRxCurrentFrameIndex(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::rx_framescaught(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Number of frames caught by each port in receiver. )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 { + + 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->getFramesCaught(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::rx_framesperfile(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_frames] + Number of frames per file in receiver in an acquisition. Default depends on detector type. 0 is infinite or all frames in single file. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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->getFramesPerFile(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setFramesPerFile(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::rx_jsonpara(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([key1] [value1] + [Receiver] Additional json header parameter streamed out from receiver. If not found in header, the pair is appended. An empty values deletes parameter. Max 20 characters for each key/value. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (1 && args.size() != 1) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + if (args.size() == 1) { + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + } + + if (args.size() == 2) { + } + + } + + 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() == 1) { + auto t = det->getAdditionalJsonParameter(args[0], + std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + det->setAdditionalJsonParameter(args[0], "", + std::vector{det_id}); + os << args[0] << " deleted" << '\n'; + } + + if (args.size() == 2) { + det->setAdditionalJsonParameter(args[0], args[1], + std::vector{det_id}); + os << "{" << args[0] << ": " << args[1] << "}" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::rx_lastclient(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Client IP Address that last communicated with the receiver. )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 { + + 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->getRxLastClientIP(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::rx_lock(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0, 1] + Lock receiver to one client IP, 1 locks, 0 unlocks. Default is unlocked. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + } + + 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->getRxLock(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setRxLock(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::rx_missingpackets(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Number of missing packets for receiver. If negative, they are packets in excess. )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 { + + 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->getNumMissingPackets(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::rx_padding(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0, 1] + Partial frames padding enable in the receiver. Default: enabled. Disabling is fastest. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + } + + 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->getPartialFramesPadding(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setPartialFramesPadding(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::rx_printconfig(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Prints the receiver configuration. )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 { + + 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->printRxConfiguration(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::rx_realudpsocksize(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Actual udp socket buffer size. Double the size of rx_udpsocksize due to kernel bookkeeping. )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 { + + 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->getRxRealUDPSocketBufferSize(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::rx_silent(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0, 1] + Switch on or off receiver text output during acquisition. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + } + + 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->getRxSilentMode(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setRxSilentMode(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::rx_start(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Starts receiver listener for detector data packets and create a data file (if file write 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) { + if (det_id != -1) { + throw RuntimeError("Cannot execute rx_start at module level"); + } + det->startReceiver(); + os << "successful" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::rx_status(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([running, idle, transmitting] + Receiver listener status. )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 (0) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + } + + 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->getReceiverStatus(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (true) { + throw RuntimeError("Cannot put. Did you mean to use command: " + "\"rx_start\" or \"rx_stop\"?"); + } + } + + return os.str(); +} + +std::string Caller::rx_stop(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Stops receiver listener for detector data packets and closes current data file (if file write 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) { + if (det_id != -1) { + throw RuntimeError("Cannot execute rx_stop at module level"); + } + det->stopReceiver(); + os << "successful" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::rx_tcpport(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([port] + TCP port for client-receiver communication. Default is 1954. Must be different if multiple receivers on same pc. Must be first command to set a receiver parameter. Multi command will automatically increment for individual modules. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to uint16_t"); + } + } + + } + + 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->getRxPort(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setRxPort(arg0, det_id); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::rx_threads(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Get kernel thread ids from the receiver in order of [parent, tcp, listener 0, processor 0, streamer 0, listener 1, processor 1, streamer 1, arping]. If no streamer yet or there is no second interface, it gives 0 in its place. )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 { + + 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->getRxThreadIds(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::rx_udpsocksize(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_size] + UDP socket buffer size in receiver. Tune rmem_default and rmem_max accordingly. Max value is INT_MAX/2. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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->getRxUDPSocketBufferSize(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setRxUDPSocketBufferSize(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::rx_version(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Receiver version )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 { + + 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->getReceiverVersion(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::rx_zmqfreq(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([nth frame] + Frequency of frames streamed out from receiver via zmq + Default: 1, Means every frame is streamed out. + If 2, every second frame is streamed out. + If 0, streaming timer is the timeout, after which current frame is sent out. (default timeout is 500 ms). Usually used for gui purposes. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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->getRxZmqFrequency(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setRxZmqFrequency(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::rx_zmqhwm(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_value] + Receiver's zmq send high water mark. Default is the zmq library's default (1000). This is a high number and can be set to 2 for gui purposes. One must also set the client's receive high water mark to similar value. Final effect is sum of them. Also restarts receiver zmq streaming if enabled. Can set to -1 to set default value. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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->getRxZmqHwm(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + if (det_id != -1) { + throw RuntimeError("Cannot execute rx_zmqhwm at module level"); + } + auto arg0 = StringTo(args[0]); + det->setRxZmqHwm(arg0); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::rx_zmqport(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([port] + Zmq port for data to be streamed out of the receiver. Also restarts receiver zmq streaming if enabled. Default is 30001. Modified only when using an intermediate process between receiver and client(gui). Must be different for every detector (and udp port). Multi command will automatically increment for individual modules. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to uint16_t"); + } + } + + } + + 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->getRxZmqPort(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setRxZmqPort(arg0, det_id); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::rx_zmqstartfnum(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([fnum] + The starting frame index to stream out. 0 by default, which streams the first frame in an acquisition, and then depending on the rx zmq frequency/ timer )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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->getRxZmqStartingFrame(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setRxZmqStartingFrame(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::rx_zmqstream(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0, 1] + Enable/ disable data streaming from receiver via zmq (eg. to GUI or to another process for further processing). This creates/ destroys zmq streamer threads in receiver. + Switching to Gui automatically enables data streaming in receiver. + Switching back to command line acquire will require disabling data streaming in receiver for fast applications. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + } + + 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->getRxZmqDataStream(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setRxZmqDataStream(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::savepattern(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + [Ctb][Mythen3][Xilinx Ctb] Saves pattern to file (ascii). + [Ctb] Also executes pattern. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + } + + } + + else { + + throw RuntimeError( + "INTERNAL ERROR: Invalid action: supported actions are ['PUT']"); + } + + // generate code for each action + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + if (det_id != -1) { + throw RuntimeError( + "Cannot execute savepattern at module level"); + } + det->savePattern(args[0]); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::scan(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([dac_name|0|trimbits] [start_val] [stop_val] [step_size] [dac settling time ns|us|ms|s] + Enables/ disables scans for dac and trimbits + Enabling scan sets number of frames to number of steps in receiver. + To cancel scan configuration, set dac to '0', which also sets number of frames to 1. + [Eiger][Mythen3] Use trimbits as dac name for a trimbit scan. )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() != 1 && args.size() != 4 && args.size() != 5) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + } + + if (args.size() == 4) { + } + + if (args.size() == 5) { + try { + std::string tmp_time(args[4]); + std::string unit = RemoveUnit(tmp_time); + auto t = StringTo(tmp_time, unit); + } catch (...) { + throw RuntimeError("Could not convert argument to time::ns"); + } + } + + } + + 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->getScan(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + if (StringTo(args[0]) != 0) { + throw RuntimeError("Unknown argument " + args[0] + + ". Did you mean 0 to disable scan?"); + } + if (det_id != -1) { + throw RuntimeError("Cannot execute scan at module level"); + } + det->setScan(defs::scanParameters()); + os << ToString(args) << '\n'; + } + + if (args.size() == 4) { + if (det_id != -1) { + throw RuntimeError("Cannot execute scan at module level"); + } + det->setScan(defs::scanParameters( + StringTo(args[0]), StringTo(args[1]), + StringTo(args[2]), StringTo(args[3]))); + os << ToString(args) << '\n'; + } + + if (args.size() == 5) { + std::string tmp_time(args[4]); + std::string unit = RemoveUnit(tmp_time); + auto t = StringTo(tmp_time, unit); + if (det_id != -1) { + throw RuntimeError("Cannot execute scan at module level"); + } + det->setScan(defs::scanParameters( + StringTo(args[0]), StringTo(args[1]), + StringTo(args[2]), StringTo(args[3]), t)); + os << ToString(args) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::scanerrmsg(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Gets Scan error message if scan ended in error for non blocking acquisitions. )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 { + + 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->getScanErrorMessage(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::selinterface(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0, 1] + [Jungfrau][Moench] The udp interface to stream data from detector. Effective only when number of interfaces is 1. Default: 0 (outer) )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + } + + 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->getSelectedUDPInterface(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->selectUDPInterface(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::serialnumber(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + [Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb] + Serial number of detector. )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 { + + 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->getSerialNumber(std::vector{det_id}); + os << OutStringHex(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::setbit(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([reg address in hex] [bit index] + Sets bit in address. + Use --validate to force validation. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 2 && args.size() != 3) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 2) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to uint32_t"); + } + try { + StringTo(args[1]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to int"); + } + try { + StringTo("0"); + } catch (...) { + throw RuntimeError("Could not convert argument 2 to bool"); + } + } + + if (args.size() == 3) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to uint32_t"); + } + try { + StringTo(args[1]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to int"); + } + try { + StringTo("1"); + } catch (...) { + throw RuntimeError("Could not convert argument 2 to bool"); + } + } + + } + + else { + + throw RuntimeError( + "INTERNAL ERROR: Invalid action: supported actions are ['PUT']"); + } + + // generate code for each action + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 2) { + if (StringTo(args[1]) < 0 || StringTo(args[1]) > 31) { + throw RuntimeError("Bit number out of range: " + args[1]); + } + auto arg0 = StringTo(args[0]); + auto arg1 = StringTo(args[1]); + auto arg2 = StringTo("0"); + det->setBit(arg0, arg1, arg2, std::vector{det_id}); + os << "[" << args[0] << ", " << args[1] << "]" << '\n'; + } + + if (args.size() == 3) { + if (StringTo(args[1]) < 0 || StringTo(args[1]) > 31) { + throw RuntimeError("Bit number out of range: " + args[1]); + } + if (args[2] != "--validate") { + throw RuntimeError( + "Could not scan third argument. Did you mean --validate?"); + } + auto arg0 = StringTo(args[0]); + auto arg1 = StringTo(args[1]); + auto arg2 = StringTo("1"); + det->setBit(arg0, arg1, arg2, std::vector{det_id}); + os << "[" << args[0] << ", " << args[1] << "]" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::settings(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_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] + Detector Settings + [Jungfrau] - [ gain0 | highgain0] + [Gotthard] - [dynamicgain | highgain | lowgain | mediumgain | veryhighgain] + [Gotthard] Also loads default dacs on to the detector. + [Gotthard2] - [dynamicgain | fixgain1 | fixgain2] + [Mythen3] - [standard | fast | highgain] Also changes vrshaper and vrpreamp. + [Eiger] Use threshold or thresholdnotb. + [Eiger] threshold and settings loaded from file found in settingspath. + [Moench] - [g1_hg | g1_lg | g2_hc_hg | g2_hc_lg | g2_lc_hg | g2_lc_lg | g4_hg | g4_lg] )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError( + "Could not convert argument 0 to defs::detectorSettings"); + } + } + + } + + 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->getSettings(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setSettings(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::settingslist(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + List of settings implemented for this detector. )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 { + + 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->getSettingsList(); + os << ToString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::settingspath(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([path] + [Eiger][Mythen3] Directory where settings files are loaded from/to. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 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->getSettingsPath(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + det->setSettingsPath(args[0], std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::signalindex(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([name] + [Ctb][Xilinx_Ctb] Get the signal index for the given name. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (1 && args.size() != 1) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + 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() == 1) { + if (det->getDetectorType().squash(defs::GENERIC) != + defs::CHIPTESTBOARD && + det->getDetectorType().squash(defs::GENERIC) != + defs::XILINX_CHIPTESTBOARD) { + throw RuntimeError(cmd + " only allowed for CTB."); + } + if (det_id != -1) { + throw RuntimeError( + "Cannot execute signalindex at module level"); + } + auto t = det->getSignalIndex(args[0]); + os << static_cast(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::signallist(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([signalname1 signalname2 .. signalname63] + [Ctb][Xilinx_Ctb] Set the list of signal names for this board. )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) { + auto det_type = det->getDetectorType().squash(defs::GENERIC); + ; + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + } + + 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 det_type = det->getDetectorType().squash(defs::GENERIC); + ; + if (cmd != "daclist" && det_type != defs::CHIPTESTBOARD && + det_type != defs::XILINX_CHIPTESTBOARD) { + throw RuntimeError(cmd + " only allowed for CTB."); + } + if (det_id != -1) { + throw RuntimeError("Cannot execute signallist at module level"); + } + auto t = det->getSignalNames(); + os << ToString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + auto det_type = det->getDetectorType().squash(defs::GENERIC); + ; + if (cmd != "daclist" && det_type != defs::CHIPTESTBOARD && + det_type != defs::XILINX_CHIPTESTBOARD) { + throw RuntimeError(cmd + " only allowed for CTB."); + } + if (cmd == "daclist" && det_type != defs::CHIPTESTBOARD && + det_type != defs::XILINX_CHIPTESTBOARD) { + throw RuntimeError("This detector already has fixed dac names. " + "Cannot change them."); + } + if (det_id != -1) { + throw RuntimeError("Cannot execute signallist at module level"); + } + det->setSignalNames(args); + os << ToString(args) << '\n'; + } + + return os.str(); +} + +std::string Caller::signalname(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0-63][name] + [Ctb][Xilinx_Ctb] Set the signal at the given position to the given name. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (1 && args.size() != 1) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 2) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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() == 1) { + if (det->getDetectorType().squash(defs::GENERIC) != + defs::CHIPTESTBOARD && + det->getDetectorType().squash(defs::GENERIC) != + defs::XILINX_CHIPTESTBOARD) { + throw RuntimeError(cmd + " only allowed for CTB."); + } + if (det_id != -1) { + throw RuntimeError("Cannot execute signalname at module level"); + } + auto arg0 = StringTo(args[0]); + auto t = det->getSignalName(arg0); + os << args[0] << ' ' << t << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 2) { + if (det->getDetectorType().squash(defs::GENERIC) != + defs::CHIPTESTBOARD && + det->getDetectorType().squash(defs::GENERIC) != + defs::XILINX_CHIPTESTBOARD) { + throw RuntimeError(cmd + " only allowed for CTB."); + } + if (det_id != -1) { + throw RuntimeError("Cannot execute signalname at module level"); + } + auto arg0 = StringTo(args[0]); + det->setSignalName(arg0, args[1]); + os << ToString(args) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::slowadcindex(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([name] + [Ctb][Xilinx_Ctb] Get the slowadc index for the given name. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (1 && args.size() != 1) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + if (args.size() == 1) { + defs::dacIndex index = defs::SLOW_ADC0; + } + + } + + else { + + throw RuntimeError( + "INTERNAL ERROR: Invalid action: supported actions are ['GET']"); + } + + // generate code for each action + if (action == slsDetectorDefs::GET_ACTION) { + if (args.size() == 1) { + defs::dacIndex index = defs::SLOW_ADC0; + if (det->getDetectorType().squash(defs::GENERIC) != + defs::CHIPTESTBOARD && + det->getDetectorType().squash(defs::GENERIC) != + defs::XILINX_CHIPTESTBOARD) { + throw RuntimeError(cmd + " only allowed for CTB."); + } + if (det_id != -1) { + throw RuntimeError( + "Cannot execute slowadcindex at module level"); + } + auto t = det->getSlowADCIndex(args[0]); + os << ToString(static_cast(t) - index) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::slowadclist(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([slowadcname1 slowadcname2 .. slowadcname7] + [Ctb][Xilinx_Ctb] Set the list of slowadc names for this board. )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) { + auto det_type = det->getDetectorType().squash(defs::GENERIC); + ; + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + } + + 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 det_type = det->getDetectorType().squash(defs::GENERIC); + ; + if (cmd != "daclist" && det_type != defs::CHIPTESTBOARD && + det_type != defs::XILINX_CHIPTESTBOARD) { + throw RuntimeError(cmd + " only allowed for CTB."); + } + if (det_id != -1) { + throw RuntimeError( + "Cannot execute slowadclist at module level"); + } + auto t = det->getSlowADCNames(); + os << ToString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + auto det_type = det->getDetectorType().squash(defs::GENERIC); + ; + if (cmd != "daclist" && det_type != defs::CHIPTESTBOARD && + det_type != defs::XILINX_CHIPTESTBOARD) { + throw RuntimeError(cmd + " only allowed for CTB."); + } + if (cmd == "daclist" && det_type != defs::CHIPTESTBOARD && + det_type != defs::XILINX_CHIPTESTBOARD) { + throw RuntimeError("This detector already has fixed dac names. " + "Cannot change them."); + } + if (det_id != -1) { + throw RuntimeError("Cannot execute slowadclist at module level"); + } + det->setSlowADCNames(args); + os << ToString(args) << '\n'; + } + + return os.str(); +} + +std::string Caller::slowadcname(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0-7][name] + [Ctb][Xilinx_Ctb] Set the slowadc at the given position to the given name. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (1 && args.size() != 1) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + if (args.size() == 1) { + defs::dacIndex index = defs::SLOW_ADC0; + } + + } + + 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::dacIndex index = defs::SLOW_ADC0; + } + + } + + 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() == 1) { + defs::dacIndex index = defs::SLOW_ADC0; + if (det->getDetectorType().squash(defs::GENERIC) != + defs::CHIPTESTBOARD && + det->getDetectorType().squash(defs::GENERIC) != + defs::XILINX_CHIPTESTBOARD) { + throw RuntimeError(cmd + " only allowed for CTB."); + } + if (det_id != -1) { + throw RuntimeError( + "Cannot execute slowadcname at module level"); + } + auto t = det->getSlowADCName( + static_cast(StringTo(args[0]) + index)); + os << args[0] << ' ' << t << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 2) { + defs::dacIndex index = defs::SLOW_ADC0; + if (det->getDetectorType().squash(defs::GENERIC) != + defs::CHIPTESTBOARD && + det->getDetectorType().squash(defs::GENERIC) != + defs::XILINX_CHIPTESTBOARD) { + throw RuntimeError(cmd + " only allowed for CTB."); + } + if (det_id != -1) { + throw RuntimeError( + "Cannot execute slowadcname at module level"); + } + det->setSlowADCName( + static_cast(StringTo(args[0]) + index), + args[1]); + os << ToString(args) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::slowadcvalues(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([name] + [Ctb][Xilinx_Ctb] Get values of all slow adcs. )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 { + + throw RuntimeError( + "INTERNAL ERROR: Invalid action: supported actions are ['GET']"); + } + + // generate code for each action + if (action == slsDetectorDefs::GET_ACTION) { + if (args.size() == 0) { + + std::string suffix = " uV"; + auto t = det->getSlowADCList(); + + auto names = det->getSlowADCNames(); + auto name_it = names.begin(); + os << '['; + if (t.size() > 0) { + + auto it = t.cbegin(); + os << ToString(*name_it++) << ' '; + os << OutString( + det->getSlowADC(*it++, std::vector{det_id})) + << suffix; + while (it != t.cend()) { + os << ", " << ToString(*name_it++) << ' '; + os << OutString( + det->getSlowADC(*it++, std::vector{det_id})) + << suffix; + } + } + + os << "]\n"; + } + } + + return os.str(); +} + +std::string Caller::start(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Starts detector acquisition. Status changes to RUNNING or WAITING and automatically returns to idle at the end of acquisition. If the acquisition was abruptly stopped, some detectors come back to STOPPED. )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->startDetector(std::vector{det_id}); + os << "successful" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::status(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([running, error, transmitting, finished, waiting, idle] + Detector status. Goes to stop server. )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 (0) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + } + + 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->getDetectorStatus(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (true) { + throw RuntimeError("Cannot put. Did you mean to use command: " + "\"start\" or \"stop\"?"); + } + } + + return os.str(); +} + +std::string Caller::stop(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Abort detector acquisition. Status changes to IDLE or STOPPED. Goes to stop server. )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->stopDetector(std::vector{det_id}); + os << "successful" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::stopport(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n] + Port number of the stop server on detector for detector-client tcp interface. Default is 1953. Normally unchanged. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to uint16_t"); + } + } + + } + + 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->getStopPort(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setStopPort(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::storagecell_delay(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([duration (0-1638375 ns)] [(optional unit) ns|us|ms|s] + [Jungfrau] Additional time delay between 2 consecutive exposures in burst mode (resolution of 25ns). Only applicable for chipv1.0. For advanced users only. )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 if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + std::string tmp_time(args[0]); + std::string unit = RemoveUnit(tmp_time); + auto converted_time = StringTo(tmp_time, unit); + } catch (...) { + throw RuntimeError("Could not convert argument to time::ns"); + } + } + + if (args.size() == 2) { + try { + StringTo(args[0], args[1]); + } catch (...) { + throw RuntimeError("Could not convert arguments to time::ns"); + } + } + + } + + 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->getStorageCellDelay(std::vector{det_id}); + os << OutString(t) << '\n'; + } + + if (args.size() == 1) { + auto t = det->getStorageCellDelay(std::vector{det_id}); + os << OutString(t, args[0]) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + std::string tmp_time(args[0]); + std::string unit = RemoveUnit(tmp_time); + auto converted_time = StringTo(tmp_time, unit); + det->setStorageCellDelay(converted_time, std::vector{det_id}); + os << args[0] << '\n'; + } + + if (args.size() == 2) { + auto converted_time = StringTo(args[0], args[1]); + det->setStorageCellDelay(converted_time, std::vector{det_id}); + os << args[0] << args[1] << '\n'; + } + } + + return os.str(); +} + +std::string Caller::storagecell_start(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0-max] + [Jungfrau] Storage cell that stores the first acquisition of the series. max is 15 (default) for chipv1.0 and 3 (default) for chipv1.1. For advanced users only. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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->getStorageCellStart(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setStorageCellStart(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::subdeadtime(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([duration] [(optional unit) ns|us|ms|s] + [Eiger] Dead time of EIGER subframes in 32 bit mode. Subperiod = subexptime + subdeadtime. )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 if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + std::string tmp_time(args[0]); + std::string unit = RemoveUnit(tmp_time); + auto converted_time = StringTo(tmp_time, unit); + } catch (...) { + throw RuntimeError("Could not convert argument to time::ns"); + } + } + + if (args.size() == 2) { + try { + StringTo(args[0], args[1]); + } catch (...) { + throw RuntimeError("Could not convert arguments to time::ns"); + } + } + + } + + 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->getSubDeadTime(std::vector{det_id}); + os << OutString(t) << '\n'; + } + + if (args.size() == 1) { + auto t = det->getSubDeadTime(std::vector{det_id}); + os << OutString(t, args[0]) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + std::string tmp_time(args[0]); + std::string unit = RemoveUnit(tmp_time); + auto converted_time = StringTo(tmp_time, unit); + det->setSubDeadTime(converted_time, std::vector{det_id}); + os << args[0] << '\n'; + } + + if (args.size() == 2) { + auto converted_time = StringTo(args[0], args[1]); + det->setSubDeadTime(converted_time, std::vector{det_id}); + os << args[0] << args[1] << '\n'; + } + } + + return os.str(); +} + +std::string Caller::subexptime(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([duration] [(optional unit) ns|us|ms|s] + [Eiger] Exposure time of EIGER subframes in 32 bit mode. )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 if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + std::string tmp_time(args[0]); + std::string unit = RemoveUnit(tmp_time); + auto converted_time = StringTo(tmp_time, unit); + } catch (...) { + throw RuntimeError("Could not convert argument to time::ns"); + } + } + + if (args.size() == 2) { + try { + StringTo(args[0], args[1]); + } catch (...) { + throw RuntimeError("Could not convert arguments to time::ns"); + } + } + + } + + 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->getSubExptime(std::vector{det_id}); + os << OutString(t) << '\n'; + } + + if (args.size() == 1) { + auto t = det->getSubExptime(std::vector{det_id}); + os << OutString(t, args[0]) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + std::string tmp_time(args[0]); + std::string unit = RemoveUnit(tmp_time); + auto converted_time = StringTo(tmp_time, unit); + det->setSubExptime(converted_time, std::vector{det_id}); + os << args[0] << '\n'; + } + + if (args.size() == 2) { + auto converted_time = StringTo(args[0], args[1]); + det->setSubExptime(converted_time, std::vector{det_id}); + os << args[0] << args[1] << '\n'; + } + } + + return os.str(); +} + +std::string Caller::sync(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0, 1] + [Jungfrau][Moench] Enables or disables synchronization between modules. Sync mode requires at least one master configured. Also requires flatband cabling between master and slave with termination board. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + } + + 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->getSynchronization(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + if (det_id != -1) { + throw RuntimeError("Cannot execute sync at module level"); + } + auto arg0 = StringTo(args[0]); + det->setSynchronization(arg0); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::syncclk(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_clk in MHz] + [Ctb] Sync clock in MHz. )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 { + + 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->getSYNCClock(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::temp_10ge(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_value] + [Eiger]Temperature close to the 10GbE )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 { + + 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->getTemperature(defs::TEMPERATURE_10GE, + std::vector{det_id}); + os << OutString(t) << " °C" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::temp_adc(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_value] + [Jungfrau][Moench][Gotthard] ADC Temperature )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 { + + 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->getTemperature(defs::TEMPERATURE_ADC, + std::vector{det_id}); + os << OutString(t) << " °C" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::temp_control(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0, 1] + [Jungfrau][Moench] Temperature control enable. Default is 0 (disabled). If temperature crosses threshold temperature and temperature control is enabled, power to chip will be switched off and temperature event occurs. To power on chip again, temperature has to be less than threshold temperature and temperature event has to be cleared. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + } + + 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->getTemperatureControl(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setTemperatureControl(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::temp_dcdc(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_value] + [Eiger]Temperature close to the dc dc converter )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 { + + 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->getTemperature(defs::TEMPERATURE_DCDC, + std::vector{det_id}); + os << OutString(t) << " °C" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::temp_event(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0] + [Jungfrau][Moench] 1, if a temperature event occured. To clear this event, set it to 0. + If temperature crosses threshold temperature and temperature control is enabled, power to chip will be switched off and temperature event occurs. To power on chip again, temperature has to be less than threshold temperature and temperature event has to be cleared. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 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->getTemperatureEvent(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + if (StringTo(args[0]) != 0) { + throw RuntimeError("Unknown argument for temp event: ( " + + args[0] + + " ). Did you mean 0 to reset event?"); + } + det->resetTemperatureEvent(std::vector{det_id}); + os << "cleared" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::temp_fpga(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_value] + [Eiger][Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Xilinx CTB] FPGA Temperature )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 { + + 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->getTemperature(defs::TEMPERATURE_FPGA, + std::vector{det_id}); + os << OutString(t) << " °C" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::temp_fpgaext(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_value] + [Eiger]Temperature close to the FPGA )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 { + + 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->getTemperature(defs::TEMPERATURE_FPGAEXT, + std::vector{det_id}); + os << OutString(t) << " °C" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::temp_fpgafl(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_value] + [Eiger]Temperature of the left front end board fpga. )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 { + + 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->getTemperature(defs::TEMPERATURE_FPGA2, + std::vector{det_id}); + os << OutString(t) << " °C" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::temp_fpgafr(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_value] + [Eiger]Temperature of the right front end board fpga. )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 { + + 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->getTemperature(defs::TEMPERATURE_FPGA3, + std::vector{det_id}); + os << OutString(t) << " °C" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::temp_slowadc(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_value] + [Ctb]Temperature of the slow adc )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 { + + 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->getTemperature(defs::SLOW_ADC_TEMP, + std::vector{det_id}); + os << OutString(t) << " °C" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::temp_sodl(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_value] + [Eiger]Temperature close to the left so-dimm memory )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 { + + 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->getTemperature(defs::TEMPERATURE_SODL, + std::vector{det_id}); + os << OutString(t) << " °C" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::temp_sodr(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_value] + [Eiger]Temperature close to the right so-dimm memory )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 { + + 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->getTemperature(defs::TEMPERATURE_SODR, + std::vector{det_id}); + os << OutString(t) << " °C" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::temp_threshold(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_temp (in degrees)] + [Jungfrau][Moench] Threshold temperature in degrees. If temperature crosses threshold temperature and temperature control is enabled, power to chip will be switched off and temperature event occurs. To power on chip again, temperature has to be less than threshold temperature and temperature event has to be cleared. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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->getThresholdTemperature(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setThresholdTemperature(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::templist(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + List of temperature commands implemented for this detector. )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 { + + 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->getTemperatureList(); + os << ToString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::tempvalues(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Gets the values for every temperature for this detector. )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 { + + throw RuntimeError( + "INTERNAL ERROR: Invalid action: supported actions are ['GET']"); + } + + // generate code for each action + if (action == slsDetectorDefs::GET_ACTION) { + if (args.size() == 0) { + + std::string suffix = " °C"; + auto t = det->getTemperatureList(); + os << '['; + if (t.size() > 0) { + + auto it = t.cbegin(); + os << ToString(*it) << ' '; + os << OutString( + det->getTemperature(*it++, std::vector{det_id})) + << suffix; + while (it != t.cend()) { + os << ", " << ToString(*it) << ' '; + os << OutString(det->getTemperature( + *it++, std::vector{det_id})) + << suffix; + } + } + + os << "]\n"; + } + } + + return os.str(); +} + +std::string Caller::tengiga(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0, 1] + [Eiger][Ctb][Mythen3] 10GbE Enable. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + } + + 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->getTenGiga(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setTenGiga(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::timing(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([auto|trigger|gating|burst_trigger|trigger_gating] + Timing Mode of detector. + [Jungfrau][Moench][Gotthard][Ctb][Gotthard2][Xilinx Ctb] [auto|trigger] + [Mythen3] [auto|trigger|gating|trigger_gating] + [Eiger] [auto|trigger|gating|burst_trigger] )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError( + "Could not convert argument 0 to defs::timingMode"); + } + } + + } + + 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->getTimingMode(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setTimingMode(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::timing_info_decoder(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([swissfel|shine] + [Jungfrau] Advanced Command and only for Swissfel and Shine. Sets the bunch id or timing info decoder. Default is swissfel. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError( + "Could not convert argument 0 to defs::timingInfoDecoder"); + } + } + + } + + 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->getTimingInfoDecoder(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setTimingInfoDecoder(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::timinglist(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Gets the list of timing modes for this detector. )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 { + + 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->getTimingModeList(); + os << ToString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::timingsource(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([internal|external] + [Gotthard2] Timing source. Internal is crystal and external is system timing. Default is internal. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError( + "Could not convert argument 0 to defs::timingSourceType"); + } + } + + } + + 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->getTimingSource(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setTimingSource(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::top(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0, 1] + [Eiger] Sets half module to top (1), else bottom. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + } + + 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->getTop(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setTop(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::transceiverenable(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([bitmask] + [Ctb][Xilinx Ctb] Transceiver Enable Mask. Enable for each 4 Transceiver channel. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to uint32_t"); + } + } + + } + + 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->getTransceiverEnableMask(std::vector{det_id}); + os << OutStringHex(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setTransceiverEnableMask(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::trigger(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + [Eiger][Mythen3][Jungfrau][Moench] Sends software trigger signal to detector )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) { + bool block = false; + } + + } + + 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) { + bool block = false; + if (det_id != -1) { + throw RuntimeError("Cannot execute trigger at module level"); + } + det->sendSoftwareTrigger(block); + os << "successful" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::triggers(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_triggers] + Number of triggers per aquire. Set timing mode to use triggers. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int64_t"); + } + } + + } + + 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->getNumberOfTriggers(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + if (det_id != -1) { + throw RuntimeError("Cannot execute triggers at module level"); + } + auto arg0 = StringTo(args[0]); + det->setNumberOfTriggers(arg0); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::triggersl(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + [Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number of triggers left in acquisition. Only when external trigger used. )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 { + + 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->getNumberOfTriggersLeft(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::trimbits(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([fname] + [Eiger][Mythen3] Put will load the trimbit file to detector. If no extension specified, serial number of each module is attached. Get will save the trimbits from the detector to file with serial number added to file name. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (1 && args.size() != 1) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + if (args.size() == 1) { + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 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() == 1) { + det->saveTrimbits(args[0], std::vector{det_id}); + os << args[0] << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + det->loadTrimbits(args[0], std::vector{det_id}); + os << args[0] << '\n'; + } + } + + return os.str(); +} + +std::string Caller::trimval(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_trimval] + [Eiger][Mythen3] All trimbits set to this value. Returns -1 if all trimbits are different values. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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->getAllTrimbits(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setAllTrimbits(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::tsamples(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_value] + [Ctb][Xilinx Ctb] Number of transceiver samples expected. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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->getNumberOfTransceiverSamples(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setNumberOfTransceiverSamples(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::txdelay(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_delay] + [Eiger][Jungfrau][Moench][Mythen3] Set transmission delay for all modules in the detector using the step size provided.Sets up + [Eiger] txdelay_left to (2 * mod_index * n_delay), + [Eiger] txdelay_right to ((2 * mod_index + 1) * n_delay) and + [Eiger] txdelay_frame to (2 *num_modules * n_delay) + [Jungfrau][Moench][Mythen3] txdelay_frame to (num_modules * n_delay) for every module. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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) { + if (det_id != -1) { + throw RuntimeError("Cannot execute txdelay at module level"); + } + auto t = det->getTransmissionDelay(); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + if (det_id != -1) { + throw RuntimeError("Cannot execute txdelay at module level"); + } + auto arg0 = StringTo(args[0]); + det->setTransmissionDelay(arg0); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::txdelay_frame(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_delay] + [Eiger][Jungfrau][Moench][Mythen3] Transmission delay of first udp packet being streamed out of the module. + [Jungfrau][Moench] [0-31] Each value represents 1 ms + [Eiger] Additional delay to txdelay_left and txdelay_right. Each value represents 10ns. Typical value is 50000. + [Mythen3] [0-16777215] Each value represents 8 ns (125 MHz clock), max is 134 ms. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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->getTransmissionDelayFrame(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setTransmissionDelayFrame(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::txdelay_left(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_delay] + [Eiger] Transmission delay of first packet in an image being streamed out of the module's left UDP port. Each value represents 10ns. Typical value is 50000. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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->getTransmissionDelayLeft(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setTransmissionDelayLeft(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::txdelay_right(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_delay] + [Eiger] Transmission delay of first packet in an image being streamed out of the module's right UDP port. Each value represents 10ns. Typical value is 50000. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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->getTransmissionDelayRight(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setTransmissionDelayRight(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::type(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Returns detector type. Can be Eiger, Jungfrau, Gotthard, Moench, Mythen3, Gotthard2, ChipTestBoard, Xilinx_ChipTestBoard )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 { + + 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->getDetectorType(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::udp_cleardst(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Clears udp destination details on the detector. )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->clearUDPDestinations(std::vector{det_id}); + os << "successful" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::udp_dstlist(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([ip=x.x.x.x] [(optional)ip2=x.x.x.x] + [mac=xx:xx:xx:xx:xx:xx] [(optional)mac2=xx:xx:xx:xx:xx:xx] + [port=value] [(optional)port2=value] + The order of ip, mac and port does not matter. entry_value can be >0 only for [Eiger][Jungfrau][Moench][Mythen3][Gotthard2] where round robin is implemented. If 'auto' used, then ip is set to ip of rx_hostname. )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 (0) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + } + + 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) { + if (det_id == -1) { + throw RuntimeError( + "Can execute udp_dstlist only at module level."); + } + if (rx_id < 0 || rx_id >= MAX_UDP_DESTINATION) { + throw RuntimeError("Invalid receiver index " + + std::to_string(rx_id) + + " to set round robin entry."); + } + auto t = + det->getDestinationUDPList(rx_id, std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (det_id == -1) { + throw RuntimeError("Can execute udp_dstlist only at module level."); + } + if (rx_id < 0 || rx_id >= MAX_UDP_DESTINATION) { + throw RuntimeError("Invalid receiver index " + + std::to_string(rx_id) + + " to set round robin entry."); + } + if (args.empty()) { + throw RuntimeError("udp_dstlist require at least one argument."); + } + det->setDestinationUDPList(getUdpEntry(), det_id); + os << ToString(args) << '\n'; + } + + return os.str(); +} + +std::string Caller::udp_dstmac(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([x:x:x:x:x:x] + Mac address of the receiver (destination) udp interface. Not mandatory to set as udp_dstip retrieves it from slsReceiver process, but must be set if you use a custom receiver (not slsReceiver). Use router mac if router between detector and receiver. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 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->getDestinationUDPMAC(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + det->setDestinationUDPMAC(MacAddr(args[0]), + std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::udp_dstmac2(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([x:x:x:x:x:x] + [Jungfrau][Moench] Mac address of the receiver (destination) udp interface 2. Not mandatory to set as udp_dstip2 retrieves it from slsReceiver process but must be set if you use a custom receiver (not slsReceiver). + [Jungfrau][Moench] top half or inner interface + [Gotthard2] veto debugging. Use router mac if router between detector and receiver. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 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->getDestinationUDPMAC2(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + det->setDestinationUDPMAC2(MacAddr(args[0]), + std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::udp_dstport(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n] + Port number of the receiver (destination) udp interface. Default is 50001. + If multi command, ports for each module is calculated (incremented by 1 if no 2nd interface) )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to uint16_t"); + } + } + + } + + 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->getDestinationUDPPort(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setDestinationUDPPort(arg0, det_id); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::udp_dstport2(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n] + [Jungfrau][Moench][Eiger][Gotthard2] Port number of the receiver (destination) udp interface 2. Default is 50002. + If multi command, ports for each module is calculated (incremented by 2) + [Jungfrau][Moench] top half or inner interface + [Eiger] right half + [Gotthard2] veto debugging )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to uint16_t"); + } + } + + } + + 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->getDestinationUDPPort2(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setDestinationUDPPort2(arg0, det_id); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::udp_firstdst(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + [0 - N] + where N is the max number of udp destinations - 1. + [Jungfrau][Moench][Gotthard2] Max number of udp destinations is 32. + [Mythen3] Max number of udp destination is 64. + One can set which is the first destination that the detector will stream images out from in a round robin fashion. The entry must not have been empty. Default: 0 )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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->getFirstUDPDestination(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setFirstUDPDestination(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::udp_numdst(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + [Jungfrau][Moench][Eiger][Mythen3][Gotthard2] One can enter upto 32 (64 for Mythen3) destinations that the detector will stream images out in a round robin fashion. This is get only command. Default: 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 { + + 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->getNumberofUDPDestinations(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::udp_reconfigure(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Reconfigures Detector with UDP destination. More for debugging as the configuration is done automatically when the detector has sufficient UDP details. )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->reconfigureUDPDestination(std::vector{det_id}); + os << "successful" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::udp_srcmac(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([x:x:x:x:x:x] + Mac address of the detector (source) udp interface. + [Eiger] Do not set as detector will replace with its own DHCP Mac (1G) or DHCP Mac + 1 (10G). )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 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->getSourceUDPMAC(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + det->setSourceUDPMAC(MacAddr(args[0]), std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::udp_srcmac2(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([x:x:x:x:x:x] + [Jungfrau][Moench] Mac address of the top half or inner (source) udp interface. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 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->getSourceUDPMAC2(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + det->setSourceUDPMAC2(MacAddr(args[0]), std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::udp_validate(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + Validates that UDP configuration in the detector is valid. If not configured, it will throw with error message requesting missing udp information. )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->validateUDPConfiguration(std::vector{det_id}); + os << "successful" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::update(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + 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. + [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 + fname is full path of programming file )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 2) { + } + + } + + else { + + throw RuntimeError( + "INTERNAL ERROR: Invalid action: supported actions are ['PUT']"); + } + + // generate code for each action + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 2) { + if (args[args.size() - 1].find(".pof") == std::string::npos && + args[args.size() - 1].find(".rbf") == std::string::npos) { + throw RuntimeError("Programming file must be a pof/rbf file."); + } + det->updateFirmwareAndServer(args[0], args[1], + std::vector{det_id}); + os << "successful" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::updatedetectorserver(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([server_name with full path] + [Jungfrau][Moench][Eiger][Ctb][Mythen3][Gotthard2] Copies detector server via TCP (without tftp). Makes a symbolic link with a shorter name (without vx.x.x). Then, detector controller reboots (except Eiger). + [Jungfrau][Moench][Ctb]Also changes respawn server to the link, which is effective after a reboot. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + } + + } + + else { + + throw RuntimeError( + "INTERNAL ERROR: Invalid action: supported actions are ['PUT']"); + } + + // generate code for each action + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + det->updateDetectorServer(args[0], std::vector{det_id}); + os << "successful" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::updatekernel(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([kernel_name with full path] + [Jungfrau][Moench][Ctb][Mythen3][Gotthard2] Advanced Command!! You could damage the detector. Please use with caution. + Updates the kernel image. Then, detector controller reboots with new kernel. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + } + + } + + else { + + throw RuntimeError( + "INTERNAL ERROR: Invalid action: supported actions are ['PUT']"); + } + + // generate code for each action + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + det->updateKernel(args[0], std::vector{det_id}); + os << "successful" << '\n'; + } + } + + return os.str(); +} + +std::string Caller::updatemode(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0|1] + Restart the detector server in update mode or not. This is useful when server-firmware compatibility is at its worst and server cannot start up normally )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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->getUpdateMode(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setUpdateMode(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::user(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + User details from shared memory (hostname, type, PID, User, Date). )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 { + + throw RuntimeError( + "INTERNAL ERROR: Invalid action: supported actions are ['GET']"); + } + + // generate code for each action + if (action == slsDetectorDefs::GET_ACTION) { + if (args.size() == 0) { + if (det_id != -1) { + throw RuntimeError("Cannot execute user at module level"); + } + auto t = det->getUserDetails(); + os << t << '\n'; + } + } + + return os.str(); +} + +std::string Caller::v_a(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_value] + [Ctb][Xilinx Ctb] Power supply a in mV. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to int"); + } + } + + } + + 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->getPower(defs::V_POWER_A, std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg1 = StringTo(args[0]); + det->setPower(defs::V_POWER_A, arg1, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::v_b(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_value] + [Ctb][Xilinx Ctb] Power supply b in mV. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to int"); + } + } + + } + + 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->getPower(defs::V_POWER_B, std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg1 = StringTo(args[0]); + det->setPower(defs::V_POWER_B, arg1, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::v_c(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_value] + [Ctb][Xilinx Ctb] Power supply c in mV. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to int"); + } + } + + } + + 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->getPower(defs::V_POWER_C, std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg1 = StringTo(args[0]); + det->setPower(defs::V_POWER_C, arg1, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::v_chip(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_value] + [Ctb] Power supply chip in mV. Do not use it unless you are completely sure you will not fry the board. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to int"); + } + } + + } + + 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->getPower(defs::V_POWER_CHIP, std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg1 = StringTo(args[0]); + det->setPower(defs::V_POWER_CHIP, arg1, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::v_d(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_value] + [Ctb][Xilinx Ctb] Power supply d in mV. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to int"); + } + } + + } + + 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->getPower(defs::V_POWER_D, std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg1 = StringTo(args[0]); + det->setPower(defs::V_POWER_D, arg1, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::v_io(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_value] + [Ctb][Xilinx Ctb] Power supply io in mV. Minimum 1200 mV. Must be the first power regulator to be set after fpga reset (on-board detector server start up). )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to int"); + } + } + + } + + 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->getPower(defs::V_POWER_IO, std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg1 = StringTo(args[0]); + det->setPower(defs::V_POWER_IO, arg1, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::v_limit(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_value] + [Ctb][Xilinx Ctb] Soft limit for power supplies (ctb only) and DACS in mV. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to int"); + } + } + + } + + 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->getPower(defs::V_LIMIT, std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg1 = StringTo(args[0]); + det->setPower(defs::V_LIMIT, arg1, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::vchip_comp_adc(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([chip index 0-9, -1 for all][10 bit hex value] + [Gotthard2] On chip Dac for comparator current of ADC. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (1 && args.size() != 1) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to int"); + } + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 2) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to int"); + } + try { + StringTo(args[1]); + } catch (...) { + throw RuntimeError("Could not convert argument 2 to int"); + } + } + + } + + 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() == 1) { + auto arg1 = StringTo(args[0]); + auto t = det->getOnChipDAC(defs::VB_COMP_ADC, arg1, + std::vector{det_id}); + os << args[0] << ' ' << OutStringHex(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 2) { + auto arg1 = StringTo(args[0]); + auto arg2 = StringTo(args[1]); + det->setOnChipDAC(defs::VB_COMP_ADC, arg1, arg2, + std::vector{det_id}); + os << args[0] << ' ' << args[1] << '\n'; + } + } + + return os.str(); +} + +std::string Caller::vchip_comp_fe(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([chip index 0-9, -1 for all][10 bit hex value] + [Gotthard2] On chip Dac for comparator current of analogue front end. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (1 && args.size() != 1) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to int"); + } + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 2) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to int"); + } + try { + StringTo(args[1]); + } catch (...) { + throw RuntimeError("Could not convert argument 2 to int"); + } + } + + } + + 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() == 1) { + auto arg1 = StringTo(args[0]); + auto t = det->getOnChipDAC(defs::VB_COMP_FE, arg1, + std::vector{det_id}); + os << args[0] << ' ' << OutStringHex(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 2) { + auto arg1 = StringTo(args[0]); + auto arg2 = StringTo(args[1]); + det->setOnChipDAC(defs::VB_COMP_FE, arg1, arg2, + std::vector{det_id}); + os << args[0] << ' ' << args[1] << '\n'; + } + } + + return os.str(); +} + +std::string Caller::vchip_cs(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([chip index 0-9, -1 for all][10 bit hex value] + [Gotthard2] On chip Dac for current injection into preamplifier. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (1 && args.size() != 1) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to int"); + } + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 2) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to int"); + } + try { + StringTo(args[1]); + } catch (...) { + throw RuntimeError("Could not convert argument 2 to int"); + } + } + + } + + 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() == 1) { + auto arg1 = StringTo(args[0]); + auto t = + det->getOnChipDAC(defs::VB_CS, arg1, std::vector{det_id}); + os << args[0] << ' ' << OutStringHex(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 2) { + auto arg1 = StringTo(args[0]); + auto arg2 = StringTo(args[1]); + det->setOnChipDAC(defs::VB_CS, arg1, arg2, + std::vector{det_id}); + os << args[0] << ' ' << args[1] << '\n'; + } + } + + return os.str(); +} + +std::string Caller::vchip_opa_1st(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([chip index 0-9, -1 for all][10 bit hex value] + [Gotthard2] On chip Dac for opa current for driving the other DACs in chip. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (1 && args.size() != 1) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to int"); + } + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 2) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to int"); + } + try { + StringTo(args[1]); + } catch (...) { + throw RuntimeError("Could not convert argument 2 to int"); + } + } + + } + + 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() == 1) { + auto arg1 = StringTo(args[0]); + auto t = det->getOnChipDAC(defs::VB_OPA_1ST, arg1, + std::vector{det_id}); + os << args[0] << ' ' << OutStringHex(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 2) { + auto arg1 = StringTo(args[0]); + auto arg2 = StringTo(args[1]); + det->setOnChipDAC(defs::VB_OPA_1ST, arg1, arg2, + std::vector{det_id}); + os << args[0] << ' ' << args[1] << '\n'; + } + } + + return os.str(); +} + +std::string Caller::vchip_opa_fd(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([chip index 0-9, -1 for all][10 bit hex value] + [Gotthard2] On chip Dac current for CDS opa stage. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (1 && args.size() != 1) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to int"); + } + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 2) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to int"); + } + try { + StringTo(args[1]); + } catch (...) { + throw RuntimeError("Could not convert argument 2 to int"); + } + } + + } + + 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() == 1) { + auto arg1 = StringTo(args[0]); + auto t = det->getOnChipDAC(defs::VB_OPA_FD, arg1, + std::vector{det_id}); + os << args[0] << ' ' << OutStringHex(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 2) { + auto arg1 = StringTo(args[0]); + auto arg2 = StringTo(args[1]); + det->setOnChipDAC(defs::VB_OPA_FD, arg1, arg2, + std::vector{det_id}); + os << args[0] << ' ' << args[1] << '\n'; + } + } + + return os.str(); +} + +std::string Caller::vchip_ref_comp_fe(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([chip index 0-9, -1 for all][10 bit hex value] + [Gotthard2] On chip Dac for reference voltage of the comparator of analogue front end. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (1 && args.size() != 1) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to int"); + } + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 2) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to int"); + } + try { + StringTo(args[1]); + } catch (...) { + throw RuntimeError("Could not convert argument 2 to int"); + } + } + + } + + 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() == 1) { + auto arg1 = StringTo(args[0]); + auto t = det->getOnChipDAC(defs::VREF_COMP_FE, arg1, + std::vector{det_id}); + os << args[0] << ' ' << OutStringHex(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 2) { + auto arg1 = StringTo(args[0]); + auto arg2 = StringTo(args[1]); + det->setOnChipDAC(defs::VREF_COMP_FE, arg1, arg2, + std::vector{det_id}); + os << args[0] << ' ' << args[1] << '\n'; + } + } + + return os.str(); +} + +std::string Caller::veto(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([0, 1] + [Gotthard2] Enable or disable veto data data from chip. Default is 0. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to bool"); + } + } + + } + + 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->getVeto(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setVeto(arg0, std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::vetoalg(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([hits|raw] [lll|10gbe] + [Gotthard2] Set the veto algorithm. Default is hits. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (1 && args.size() != 1) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + if (args.size() == 1) { + defs::streamingInterface interface = + StringTo(args[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::vetoAlgorithm alg = StringTo(args[0]); + defs::streamingInterface interface = + StringTo(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() == 1) { + defs::streamingInterface interface = + StringTo(args[0]); + if (interface == defs::streamingInterface::NONE) { + throw RuntimeError( + "Must specify an interface to set algorithm"); + } + auto t = det->getVetoAlgorithm(interface, std::vector{det_id}); + os << OutString(t) << ' ' << ToString(interface) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 2) { + defs::vetoAlgorithm alg = StringTo(args[0]); + defs::streamingInterface interface = + StringTo(args[1]); + if (interface == defs::streamingInterface::NONE) { + throw RuntimeError( + "Must specify an interface to set algorithm"); + } + det->setVetoAlgorithm(alg, interface, std::vector{det_id}); + os << ToString(alg) << ' ' << ToString(interface) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::vetofile(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([chip index 0-9, -1 for all] [file name] + [Gotthard2] Set veto reference for each 128 channels for specific chip. The file should have 128 rows of gain index and 12 bit value in dec )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 2) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + else { + + throw RuntimeError("INTERNAL ERROR: Invalid action: supported actions " + "are ['GET', 'PUT']"); + } + + // generate code for each action + if (action == slsDetectorDefs::GET_ACTION) { + if (true) { + throw RuntimeError("Cannot get vetofile. Did you mean vetophoton?"); + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 2) { + auto arg0 = StringTo(args[0]); + det->setVetoFile(arg0, args[1], std::vector{det_id}); + os << ToString(args) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::vetophoton(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([ichip] [#photons] [energy in keV] [reference file] + [Gotthard2] Set veto reference for 128 channels for chip ichip according to reference file and #photons and energy in keV. + [ichip] [output file] + Get gain indices and veto reference for 128 channels for chip ichip, saved to file. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + if (args.size() == 2) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 4) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 4) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + try { + StringTo(args[1]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to int"); + } + try { + StringTo(args[2]); + } catch (...) { + throw RuntimeError("Could not convert argument 2 to int"); + } + } + + } + + 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() == 2) { + auto arg0 = StringTo(args[0]); + det->getVetoPhoton(arg0, args[1], std::vector{det_id}); + os << "saved to file " << args[1] << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 4) { + auto arg0 = StringTo(args[0]); + auto arg1 = StringTo(args[1]); + auto arg2 = StringTo(args[2]); + det->setVetoPhoton(arg0, arg1, arg2, args[3], + std::vector{det_id}); + os << ToString(args) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::vetoref(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([gain index] [12 bit value] + [Gotthard2] Set veto reference for all 128 channels for all chips. )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::GET_ACTION) { + if (0) { + throw RuntimeError("Wrong number of arguments for action GET"); + } + + } + + else if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 2) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + try { + StringTo(args[1]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to int"); + } + } + + } + + else { + + throw RuntimeError("INTERNAL ERROR: Invalid action: supported actions " + "are ['GET', 'PUT']"); + } + + // generate code for each action + if (action == slsDetectorDefs::GET_ACTION) { + if (true) { + throw RuntimeError("Cannot get vetoref. Did you mean vetophoton?"); + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 2) { + auto arg0 = StringTo(args[0]); + auto arg1 = StringTo(args[1]); + det->setVetoReference(arg0, arg1); + os << ToString(args) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::virtualFunction(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_servers] [starting_port_number] + Connecs to n virtual server at local host starting at specific control port. Every virtual server will have a stop port (control port + 1) )V0G0N" + << std::endl; + return os.str(); + } + + // check if action and arguments are valid + if (action == slsDetectorDefs::PUT_ACTION) { + if (1 && args.size() != 2) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 2) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + try { + StringTo(args[1]); + } catch (...) { + throw RuntimeError("Could not convert argument 1 to uint16_t"); + } + } + + } + + else { + + throw RuntimeError( + "INTERNAL ERROR: Invalid action: supported actions are ['PUT']"); + } + + // generate code for each action + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 2) { + if (det_id != -1) { + throw RuntimeError("Cannot execute virtual at module level"); + } + auto arg0 = StringTo(args[0]); + auto arg1 = StringTo(args[1]); + det->setVirtualDetectorServers(arg0, arg1); + os << ToString(args) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::vm_a(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + [Ctb] Measured voltage of power supply a in mV. )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 { + + 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->getMeasuredPower(defs::V_POWER_A, + std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::vm_b(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + [Ctb] Measured voltage of power supply b in mV. )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 { + + 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->getMeasuredPower(defs::V_POWER_B, + std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::vm_c(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + [Ctb] Measured voltage of power supply c in mV. )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 { + + 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->getMeasuredPower(defs::V_POWER_C, + std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::vm_d(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + [Ctb] Measured voltage of power supply d in mV. )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 { + + 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->getMeasuredPower(defs::V_POWER_D, + std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::vm_io(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N( + [Ctb] Measured voltage of power supply io in mV. )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 { + + 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->getMeasuredPower(defs::V_POWER_IO, + std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + return os.str(); +} + +std::string Caller::zmqhwm(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([n_limit] + Client's zmq receive high water mark. Default is the zmq library's default (1000), can also be set here using -1. + This is a high number and can be set to 2 for gui purposes. + One must also set the receiver's send high water mark to similar value. Final effect is sum of them. + Setting it via command line is useful only before zmq enabled (before opening gui). )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to int"); + } + } + + } + + 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->getClientZmqHwm(); + os << t << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setClientZmqHwm(arg0); + os << det->getClientZmqHwm() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::zmqip(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([x.x.x.x] + Ip Address to listen to zmq data streamed out from receiver or intermediate process. Default connects to receiver zmq Ip Address (from rx_hostname). Modified only when using an intermediate process between receiver and client(gui). Also restarts client zmq streaming if enabled. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 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->getClientZmqIp(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + det->setClientZmqIp(IpAddr(args[0]), std::vector{det_id}); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +std::string Caller::zmqport(int action) { + + std::ostringstream os; + // print help + if (action == slsDetectorDefs::HELP_ACTION) { + os << R"V0G0N([port] + Zmq port in client(gui) or intermediate process for data to be streamed to from receiver. Default connects to receiver zmq streaming out port (30001). Modified only when using an intermediate process between receiver and client(gui). Also restarts client zmq streaming if enabled. Must be different for every detector (and udp port). Multi command will automatically increment for individual modules. )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() != 1) { + throw RuntimeError("Wrong number of arguments for action PUT"); + } + + if (args.size() == 1) { + try { + StringTo(args[0]); + } catch (...) { + throw RuntimeError("Could not convert argument 0 to uint16_t"); + } + } + + } + + 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->getClientZmqPort(std::vector{det_id}); + os << OutString(t) << '\n'; + } + } + + if (action == slsDetectorDefs::PUT_ACTION) { + if (args.size() == 1) { + auto arg0 = StringTo(args[0]); + det->setClientZmqPort(arg0, det_id); + os << args.front() << '\n'; + } + } + + return os.str(); +} + +} // namespace sls \ No newline at end of file diff --git a/slsDetectorSoftware/src/Caller.h b/slsDetectorSoftware/src/Caller.h new file mode 100644 index 000000000..b1f1e58b3 --- /dev/null +++ b/slsDetectorSoftware/src/Caller.h @@ -0,0 +1,890 @@ +// This file is used as input to generate the caller class + +#include "CmdParser.h" +#include "HelpDacs.h" +#include "sls/Detector.h" + +#include +#include +#include +namespace sls { + +class Caller { + public: + Caller(Detector *ptr) : det(ptr) {} + void call(const std::string &command, + const std::vector &arguments, int detector_id, + int action, std::ostream &os = std::cout, int receiver_id = -1); + + IpAddr getDstIpFromAuto(); + IpAddr getSrcIpFromAuto(); + UdpDestination getUdpEntry(); + void GetLevelAndUpdateArgIndex(int action, + std::string levelSeparatedCommand, + int &level, int &iArg, size_t nGetArgs, + size_t nPutArgs); + void WrongNumberOfParameters(size_t expected); + + template std::string OutStringHex(const V &value) { + if (value.equal()) + return ToStringHex(value.front()); + return ToStringHex(value); + } + + template std::string OutStringHex(const V &value, int width) { + if (value.equal()) + return ToStringHex(value.front(), width); + return ToStringHex(value, width); + } + + template std::string OutString(const Result &value) { + if (value.equal()) + return ToString(value.front()); + return ToString(value); + } + + template std::string OutString(const V &value) { + return ToString(value); + } + + template + std::string OutString(const V &value, const std::string &unit) { + if (value.equal()) + return ToString(value.front(), unit); + return ToString(value, unit); + } + + std::vector getAllCommands(); + std::map GetDeprecatedCommands(); + std::string list(int action); + + std::string acquire(int action); + std::string activate(int action); + std::string adcclk(int action); + std::string adcenable(int action); + std::string adcenable10g(int action); + std::string adcindex(int action); + std::string adcinvert(int action); + std::string adclist(int action); + std::string adcname(int action); + std::string adcphase(int action); + std::string adcpipeline(int action); + std::string adcreg(int action); + std::string adcvpp(int action); + std::string apulse(int action); + std::string asamples(int action); + std::string autocompdisable(int action); + std::string badchannels(int action); + std::string blockingtrigger(int action); + std::string burstmode(int action); + std::string burstperiod(int action); + std::string bursts(int action); + std::string burstsl(int action); + std::string bustest(int action); + std::string cdsgain(int action); + std::string chipversion(int action); + std::string clearbit(int action); + std::string clearbusy(int action); + std::string clearroi(int action); + std::string clientversion(int action); + std::string clkdiv(int action); + std::string clkfreq(int action); + std::string clkphase(int action); + std::string collectionmode(int action); + std::string column(int action); + std::string compdisabletime(int action); + std::string confadc(int action); + std::string config(int action); + std::string configtransceiver(int action); + std::string counters(int action); + std::string currentsource(int action); + std::string dac(int action); + std::string dacindex(int action); + std::string daclist(int action); + std::string dacname(int action); + std::string dacvalues(int action); + std::string datastream(int action); + std::string dbitclk(int action); + std::string dbitphase(int action); + std::string dbitpipeline(int action); + std::string defaultdac(int action); + std::string defaultpattern(int action); + std::string delay(int action); + std::string delayl(int action); + std::string detectorserverversion(int action); + std::string detsize(int action); + std::string diodelay(int action); + std::string dpulse(int action); + std::string dr(int action); + std::string drlist(int action); + std::string dsamples(int action); + std::string execcommand(int action); + std::string exptime(int action); + std::string exptime1(int action); + std::string exptime2(int action); + std::string exptime3(int action); + std::string exptimel(int action); + std::string extrastoragecells(int action); + std::string extsampling(int action); + std::string extsamplingsrc(int action); + std::string extsig(int action); + std::string fformat(int action); + std::string filtercells(int action); + std::string filterresistor(int action); + std::string findex(int action); + std::string firmwaretest(int action); + std::string firmwareversion(int action); + std::string fliprows(int action); + std::string flowcontrol10g(int action); + std::string fmaster(int action); + std::string fname(int action); + std::string foverwrite(int action); + std::string fpath(int action); + std::string framecounter(int action); + std::string frames(int action); + std::string framesl(int action); + std::string frametime(int action); + std::string free(int action); + std::string fwrite(int action); + std::string gaincaps(int action); + std::string gainmode(int action); + std::string gappixels(int action); + std::string gatedelay(int action); + std::string gatedelay1(int action); + std::string gatedelay2(int action); + std::string gatedelay3(int action); + std::string gates(int action); + std::string getbit(int action); + std::string hardwareversion(int action); + std::string highvoltage(int action); + std::string hostname(int action); + std::string im_a(int action); + std::string im_b(int action); + std::string im_c(int action); + std::string im_d(int action); + std::string im_io(int action); + std::string imagetest(int action); + std::string initialchecks(int action); + std::string inj_ch(int action); + std::string interpolation(int action); + std::string interruptsubframe(int action); + std::string kernelversion(int action); + std::string lastclient(int action); + std::string led(int action); + std::string lock(int action); + std::string master(int action); + std::string maxadcphaseshift(int action); + std::string maxclkphaseshift(int action); + std::string maxdbitphaseshift(int action); + std::string measuredperiod(int action); + std::string measuredsubperiod(int action); + std::string moduleid(int action); + std::string nextframenumber(int action); + std::string nmod(int action); + std::string numinterfaces(int action); + std::string overflow(int action); + std::string packageversion(int action); + std::string parallel(int action); + std::string parameters(int action); + std::string partialreset(int action); + std::string patfname(int action); + std::string patioctrl(int action); + std::string patlimits(int action); + std::string patloop(int action); + std::string patloop0(int action); + std::string patloop1(int action); + std::string patloop2(int action); + std::string patmask(int action); + std::string patnloop(int action); + std::string patnloop0(int action); + std::string patnloop1(int action); + std::string patnloop2(int action); + std::string patsetbit(int action); + std::string pattern(int action); + std::string patternstart(int action); + std::string patwait(int action); + std::string patwait0(int action); + std::string patwait1(int action); + std::string patwait2(int action); + std::string patwaittime(int action); + std::string patwaittime0(int action); + std::string patwaittime1(int action); + std::string patwaittime2(int action); + std::string patword(int action); + std::string pedestalmode(int action); + std::string period(int action); + std::string periodl(int action); + std::string polarity(int action); + std::string port(int action); + std::string powerchip(int action); + std::string powerindex(int action); + std::string powerlist(int action); + std::string powername(int action); + std::string powervalues(int action); + std::string programfpga(int action); + std::string pulse(int action); + std::string pulsechip(int action); + std::string pulsenmove(int action); + std::string pumpprobe(int action); + std::string quad(int action); + std::string ratecorr(int action); + std::string readnrows(int action); + std::string readout(int action); + std::string readoutspeed(int action); + std::string readoutspeedlist(int action); + std::string rebootcontroller(int action); + std::string reg(int action); + std::string resetdacs(int action); + std::string resetfpga(int action); + std::string roi(int action); + std::string romode(int action); + std::string row(int action); + std::string runclk(int action); + std::string runtime(int action); + std::string rx_arping(int action); + std::string rx_clearroi(int action); + std::string rx_dbitlist(int action); + std::string rx_dbitoffset(int action); + std::string rx_discardpolicy(int action); + std::string rx_fifodepth(int action); + std::string rx_frameindex(int action); + std::string rx_framescaught(int action); + std::string rx_framesperfile(int action); + std::string rx_hostname(int action); + std::string rx_jsonaddheader(int action); + std::string rx_jsonpara(int action); + std::string rx_lastclient(int action); + std::string rx_lock(int action); + std::string rx_missingpackets(int action); + std::string rx_padding(int action); + std::string rx_printconfig(int action); + std::string rx_realudpsocksize(int action); + std::string rx_roi(int action); + std::string rx_silent(int action); + std::string rx_start(int action); + std::string rx_status(int action); + std::string rx_stop(int action); + std::string rx_tcpport(int action); + std::string rx_threads(int action); + std::string rx_udpsocksize(int action); + std::string rx_version(int action); + std::string rx_zmqfreq(int action); + std::string rx_zmqhwm(int action); + std::string rx_zmqip(int action); + std::string rx_zmqport(int action); + std::string rx_zmqstartfnum(int action); + std::string rx_zmqstream(int action); + std::string samples(int action); + std::string savepattern(int action); + std::string scan(int action); + std::string scanerrmsg(int action); + std::string selinterface(int action); + std::string serialnumber(int action); + std::string setbit(int action); + std::string settings(int action); + std::string settingslist(int action); + std::string settingspath(int action); + std::string signalindex(int action); + std::string signallist(int action); + std::string signalname(int action); + std::string sleep(int action); + std::string slowadc(int action); + std::string slowadcindex(int action); + std::string slowadclist(int action); + std::string slowadcname(int action); + std::string slowadcvalues(int action); + std::string start(int action); + std::string status(int action); + std::string stop(int action); + std::string stopport(int action); + std::string storagecell_delay(int action); + std::string storagecell_start(int action); + std::string subdeadtime(int action); + std::string subexptime(int action); + std::string sync(int action); + std::string syncclk(int action); + std::string temp_10ge(int action); + std::string temp_adc(int action); + std::string temp_control(int action); + std::string temp_dcdc(int action); + std::string temp_event(int action); + std::string temp_fpga(int action); + std::string temp_fpgaext(int action); + std::string temp_fpgafl(int action); + std::string temp_fpgafr(int action); + std::string temp_slowadc(int action); + std::string temp_sodl(int action); + std::string temp_sodr(int action); + std::string temp_threshold(int action); + std::string templist(int action); + std::string tempvalues(int action); + std::string tengiga(int action); + std::string threshold(int action); + std::string timing(int action); + std::string timing_info_decoder(int action); + std::string timinglist(int action); + std::string timingsource(int action); + std::string top(int action); + std::string transceiverenable(int action); + std::string trigger(int action); + std::string triggers(int action); + std::string triggersl(int action); + std::string trimbits(int action); + std::string trimen(int action); + std::string trimval(int action); + std::string tsamples(int action); + std::string txdelay(int action); + std::string txdelay_frame(int action); + std::string txdelay_left(int action); + std::string txdelay_right(int action); + std::string type(int action); + std::string udp_cleardst(int action); + std::string udp_dstip(int action); + std::string udp_dstip2(int action); + std::string udp_dstlist(int action); + std::string udp_dstmac(int action); + std::string udp_dstmac2(int action); + std::string udp_dstport(int action); + std::string udp_dstport2(int action); + std::string udp_firstdst(int action); + std::string udp_numdst(int action); + std::string udp_reconfigure(int action); + std::string udp_srcip(int action); + std::string udp_srcip2(int action); + std::string udp_srcmac(int action); + std::string udp_srcmac2(int action); + std::string udp_validate(int action); + std::string update(int action); + std::string updatedetectorserver(int action); + std::string updatekernel(int action); + std::string updatemode(int action); + std::string user(int action); + std::string v_a(int action); + std::string v_b(int action); + std::string v_c(int action); + std::string v_chip(int action); + std::string v_d(int action); + std::string v_io(int action); + std::string v_limit(int action); + std::string vchip_comp_adc(int action); + std::string vchip_comp_fe(int action); + std::string vchip_cs(int action); + std::string vchip_opa_1st(int action); + std::string vchip_opa_fd(int action); + std::string vchip_ref_comp_fe(int action); + std::string versions(int action); + std::string veto(int action); + std::string vetoalg(int action); + std::string vetofile(int action); + std::string vetophoton(int action); + std::string vetoref(int action); + std::string vetostream(int action); + std::string virtualFunction(int action); + std::string vm_a(int action); + std::string vm_b(int action); + std::string vm_c(int action); + std::string vm_d(int action); + std::string vm_io(int action); + std::string zmqhwm(int action); + std::string zmqip(int action); + std::string zmqport(int action); + + std::vector args; + std::string cmd; + Detector *det; + int det_id{-1}; + int rx_id{-1}; + + private: + bool ReplaceIfDeprecated(std::string &command); + using FunctionMap = std::map; + using StringMap = std::map; + Detector *ptr; // pointer to the detector that executes the command + + static void EmptyDataCallBack(detectorData *data, uint64_t frameIndex, + uint32_t subFrameIndex, void *this_pointer); + + FunctionMap functions{ + {"list", &Caller::list}, + + {"acquire", &Caller::acquire}, + {"activate", &Caller::activate}, + {"adcclk", &Caller::adcclk}, + {"adcenable", &Caller::adcenable}, + {"adcenable10g", &Caller::adcenable10g}, + {"adcindex", &Caller::adcindex}, + {"adcinvert", &Caller::adcinvert}, + {"adclist", &Caller::adclist}, + {"adcname", &Caller::adcname}, + {"adcphase", &Caller::adcphase}, + {"adcpipeline", &Caller::adcpipeline}, + {"adcreg", &Caller::adcreg}, + {"adcvpp", &Caller::adcvpp}, + {"apulse", &Caller::apulse}, + {"asamples", &Caller::asamples}, + {"autocompdisable", &Caller::autocompdisable}, + {"badchannels", &Caller::badchannels}, + {"blockingtrigger", &Caller::blockingtrigger}, + {"burstmode", &Caller::burstmode}, + {"burstperiod", &Caller::burstperiod}, + {"bursts", &Caller::bursts}, + {"burstsl", &Caller::burstsl}, + {"bustest", &Caller::bustest}, + {"cdsgain", &Caller::cdsgain}, + {"chipversion", &Caller::chipversion}, + {"clearbit", &Caller::clearbit}, + {"clearbusy", &Caller::clearbusy}, + {"clearroi", &Caller::clearroi}, + {"clientversion", &Caller::clientversion}, + {"clkdiv", &Caller::clkdiv}, + {"clkfreq", &Caller::clkfreq}, + {"clkphase", &Caller::clkphase}, + {"collectionmode", &Caller::collectionmode}, + {"column", &Caller::column}, + {"compdisabletime", &Caller::compdisabletime}, + {"confadc", &Caller::confadc}, + {"config", &Caller::config}, + {"configtransceiver", &Caller::configtransceiver}, + {"counters", &Caller::counters}, + {"currentsource", &Caller::currentsource}, + {"dac", &Caller::dac}, + {"dacindex", &Caller::dacindex}, + {"daclist", &Caller::daclist}, + {"dacname", &Caller::dacname}, + {"dacvalues", &Caller::dacvalues}, + {"datastream", &Caller::datastream}, + {"dbitclk", &Caller::dbitclk}, + {"dbitphase", &Caller::dbitphase}, + {"dbitpipeline", &Caller::dbitpipeline}, + {"defaultdac", &Caller::defaultdac}, + {"defaultpattern", &Caller::defaultpattern}, + {"delay", &Caller::delay}, + {"delayl", &Caller::delayl}, + {"detectorserverversion", &Caller::detectorserverversion}, + {"detsize", &Caller::detsize}, + {"diodelay", &Caller::diodelay}, + {"dpulse", &Caller::dpulse}, + {"dr", &Caller::dr}, + {"drlist", &Caller::drlist}, + {"dsamples", &Caller::dsamples}, + {"execcommand", &Caller::execcommand}, + {"exptime", &Caller::exptime}, + {"exptime1", &Caller::exptime1}, + {"exptime2", &Caller::exptime2}, + {"exptime3", &Caller::exptime3}, + {"exptimel", &Caller::exptimel}, + {"extrastoragecells", &Caller::extrastoragecells}, + {"extsampling", &Caller::extsampling}, + {"extsamplingsrc", &Caller::extsamplingsrc}, + {"extsig", &Caller::extsig}, + {"fformat", &Caller::fformat}, + {"filtercells", &Caller::filtercells}, + {"filterresistor", &Caller::filterresistor}, + {"findex", &Caller::findex}, + {"firmwaretest", &Caller::firmwaretest}, + {"firmwareversion", &Caller::firmwareversion}, + {"fliprows", &Caller::fliprows}, + {"flowcontrol10g", &Caller::flowcontrol10g}, + {"fmaster", &Caller::fmaster}, + {"fname", &Caller::fname}, + {"foverwrite", &Caller::foverwrite}, + {"fpath", &Caller::fpath}, + {"framecounter", &Caller::framecounter}, + {"frames", &Caller::frames}, + {"framesl", &Caller::framesl}, + {"frametime", &Caller::frametime}, + {"free", &Caller::free}, + {"fwrite", &Caller::fwrite}, + {"gaincaps", &Caller::gaincaps}, + {"gainmode", &Caller::gainmode}, + {"gappixels", &Caller::gappixels}, + {"gatedelay", &Caller::gatedelay}, + {"gatedelay1", &Caller::gatedelay1}, + {"gatedelay2", &Caller::gatedelay2}, + {"gatedelay3", &Caller::gatedelay3}, + {"gates", &Caller::gates}, + {"getbit", &Caller::getbit}, + {"hardwareversion", &Caller::hardwareversion}, + {"highvoltage", &Caller::highvoltage}, + {"hostname", &Caller::hostname}, + {"im_a", &Caller::im_a}, + {"im_b", &Caller::im_b}, + {"im_c", &Caller::im_c}, + {"im_d", &Caller::im_d}, + {"im_io", &Caller::im_io}, + {"imagetest", &Caller::imagetest}, + {"initialchecks", &Caller::initialchecks}, + {"inj_ch", &Caller::inj_ch}, + {"interpolation", &Caller::interpolation}, + {"interruptsubframe", &Caller::interruptsubframe}, + {"kernelversion", &Caller::kernelversion}, + {"lastclient", &Caller::lastclient}, + {"led", &Caller::led}, + {"lock", &Caller::lock}, + {"master", &Caller::master}, + {"maxadcphaseshift", &Caller::maxadcphaseshift}, + {"maxclkphaseshift", &Caller::maxclkphaseshift}, + {"maxdbitphaseshift", &Caller::maxdbitphaseshift}, + {"measuredperiod", &Caller::measuredperiod}, + {"measuredsubperiod", &Caller::measuredsubperiod}, + {"moduleid", &Caller::moduleid}, + {"nextframenumber", &Caller::nextframenumber}, + {"nmod", &Caller::nmod}, + {"numinterfaces", &Caller::numinterfaces}, + {"overflow", &Caller::overflow}, + {"packageversion", &Caller::packageversion}, + {"parallel", &Caller::parallel}, + {"parameters", &Caller::parameters}, + {"partialreset", &Caller::partialreset}, + {"patfname", &Caller::patfname}, + {"patioctrl", &Caller::patioctrl}, + {"patlimits", &Caller::patlimits}, + {"patloop", &Caller::patloop}, + {"patloop0", &Caller::patloop0}, + {"patloop1", &Caller::patloop1}, + {"patloop2", &Caller::patloop2}, + {"patmask", &Caller::patmask}, + {"patnloop", &Caller::patnloop}, + {"patnloop0", &Caller::patnloop0}, + {"patnloop1", &Caller::patnloop1}, + {"patnloop2", &Caller::patnloop2}, + {"patsetbit", &Caller::patsetbit}, + {"patternX", &Caller::pattern}, + {"patternstart", &Caller::patternstart}, + {"patwait", &Caller::patwait}, + {"patwait0", &Caller::patwait0}, + {"patwait1", &Caller::patwait1}, + {"patwait2", &Caller::patwait2}, + {"patwaittime", &Caller::patwaittime}, + {"patwaittime0", &Caller::patwaittime0}, + {"patwaittime1", &Caller::patwaittime1}, + {"patwaittime2", &Caller::patwaittime2}, + {"patword", &Caller::patword}, + {"pedestalmode", &Caller::pedestalmode}, + {"period", &Caller::period}, + {"periodl", &Caller::periodl}, + {"polarity", &Caller::polarity}, + {"port", &Caller::port}, + {"powerchip", &Caller::powerchip}, + {"powerindex", &Caller::powerindex}, + {"powerlist", &Caller::powerlist}, + {"powername", &Caller::powername}, + {"powervalues", &Caller::powervalues}, + {"programfpga", &Caller::programfpga}, + {"pulse", &Caller::pulse}, + {"pulsechip", &Caller::pulsechip}, + {"pulsenmove", &Caller::pulsenmove}, + {"pumpprobe", &Caller::pumpprobe}, + {"quad", &Caller::quad}, + {"ratecorr", &Caller::ratecorr}, + {"readnrows", &Caller::readnrows}, + {"readout", &Caller::readout}, + {"readoutspeed", &Caller::readoutspeed}, + {"readoutspeedlist", &Caller::readoutspeedlist}, + {"rebootcontroller", &Caller::rebootcontroller}, + {"reg", &Caller::reg}, + {"resetdacs", &Caller::resetdacs}, + {"resetfpga", &Caller::resetfpga}, + {"roi", &Caller::roi}, + {"romode", &Caller::romode}, + {"row", &Caller::row}, + {"runclk", &Caller::runclk}, + {"runtime", &Caller::runtime}, + {"rx_arping", &Caller::rx_arping}, + {"rx_clearroi", &Caller::rx_clearroi}, + {"rx_dbitlist", &Caller::rx_dbitlist}, + {"rx_dbitoffset", &Caller::rx_dbitoffset}, + {"rx_discardpolicy", &Caller::rx_discardpolicy}, + {"rx_fifodepth", &Caller::rx_fifodepth}, + {"rx_frameindex", &Caller::rx_frameindex}, + {"rx_framescaught", &Caller::rx_framescaught}, + {"rx_framesperfile", &Caller::rx_framesperfile}, + {"rx_hostname", &Caller::rx_hostname}, + {"rx_jsonaddheader", &Caller::rx_jsonaddheader}, + {"rx_jsonpara", &Caller::rx_jsonpara}, + {"rx_lastclient", &Caller::rx_lastclient}, + {"rx_lock", &Caller::rx_lock}, + {"rx_missingpackets", &Caller::rx_missingpackets}, + {"rx_padding", &Caller::rx_padding}, + {"rx_printconfig", &Caller::rx_printconfig}, + {"rx_realudpsocksize", &Caller::rx_realudpsocksize}, + {"rx_roi", &Caller::rx_roi}, + {"rx_silent", &Caller::rx_silent}, + {"rx_start", &Caller::rx_start}, + {"rx_status", &Caller::rx_status}, + {"rx_stop", &Caller::rx_stop}, + {"rx_tcpport", &Caller::rx_tcpport}, + {"rx_threads", &Caller::rx_threads}, + {"rx_udpsocksize", &Caller::rx_udpsocksize}, + {"rx_version", &Caller::rx_version}, + {"rx_zmqfreq", &Caller::rx_zmqfreq}, + {"rx_zmqhwm", &Caller::rx_zmqhwm}, + {"rx_zmqip", &Caller::rx_zmqip}, + {"rx_zmqport", &Caller::rx_zmqport}, + {"rx_zmqstartfnum", &Caller::rx_zmqstartfnum}, + {"rx_zmqstream", &Caller::rx_zmqstream}, + {"samples", &Caller::samples}, + {"savepattern", &Caller::savepattern}, + {"scan", &Caller::scan}, + {"scanerrmsg", &Caller::scanerrmsg}, + {"selinterface", &Caller::selinterface}, + {"serialnumber", &Caller::serialnumber}, + {"setbit", &Caller::setbit}, + {"settings", &Caller::settings}, + {"settingslist", &Caller::settingslist}, + {"settingspath", &Caller::settingspath}, + {"signalindex", &Caller::signalindex}, + {"signallist", &Caller::signallist}, + {"signalname", &Caller::signalname}, + {"sleep", &Caller::sleep}, + {"slowadc", &Caller::slowadc}, + {"slowadcindex", &Caller::slowadcindex}, + {"slowadclist", &Caller::slowadclist}, + {"slowadcname", &Caller::slowadcname}, + {"slowadcvalues", &Caller::slowadcvalues}, + {"start", &Caller::start}, + {"status", &Caller::status}, + {"stop", &Caller::stop}, + {"stopport", &Caller::stopport}, + {"storagecell_delay", &Caller::storagecell_delay}, + {"storagecell_start", &Caller::storagecell_start}, + {"subdeadtime", &Caller::subdeadtime}, + {"subexptime", &Caller::subexptime}, + {"sync", &Caller::sync}, + {"syncclk", &Caller::syncclk}, + {"temp_10ge", &Caller::temp_10ge}, + {"temp_adc", &Caller::temp_adc}, + {"temp_control", &Caller::temp_control}, + {"temp_dcdc", &Caller::temp_dcdc}, + {"temp_event", &Caller::temp_event}, + {"temp_fpga", &Caller::temp_fpga}, + {"temp_fpgaext", &Caller::temp_fpgaext}, + {"temp_fpgafl", &Caller::temp_fpgafl}, + {"temp_fpgafr", &Caller::temp_fpgafr}, + {"temp_slowadc", &Caller::temp_slowadc}, + {"temp_sodl", &Caller::temp_sodl}, + {"temp_sodr", &Caller::temp_sodr}, + {"temp_threshold", &Caller::temp_threshold}, + {"templist", &Caller::templist}, + {"tempvalues", &Caller::tempvalues}, + {"tengiga", &Caller::tengiga}, + {"threshold", &Caller::threshold}, + {"thresholdnotb", &Caller::threshold}, + {"timing", &Caller::timing}, + {"timing_info_decoder", &Caller::timing_info_decoder}, + {"timinglist", &Caller::timinglist}, + {"timingsource", &Caller::timingsource}, + {"top", &Caller::top}, + {"transceiverenable", &Caller::transceiverenable}, + {"trigger", &Caller::trigger}, + {"triggers", &Caller::triggers}, + {"triggersl", &Caller::triggersl}, + {"trimbits", &Caller::trimbits}, + {"trimen", &Caller::trimen}, + {"trimval", &Caller::trimval}, + {"tsamples", &Caller::tsamples}, + {"txdelay", &Caller::txdelay}, + {"txdelay_frame", &Caller::txdelay_frame}, + {"txdelay_left", &Caller::txdelay_left}, + {"txdelay_right", &Caller::txdelay_right}, + {"type", &Caller::type}, + {"udp_cleardst", &Caller::udp_cleardst}, + {"udp_dstip", &Caller::udp_dstip}, + {"udp_dstip2", &Caller::udp_dstip2}, + {"udp_dstlist", &Caller::udp_dstlist}, + {"udp_dstmac", &Caller::udp_dstmac}, + {"udp_dstmac2", &Caller::udp_dstmac2}, + {"udp_dstport", &Caller::udp_dstport}, + {"udp_dstport2", &Caller::udp_dstport2}, + {"udp_firstdst", &Caller::udp_firstdst}, + {"udp_numdst", &Caller::udp_numdst}, + {"udp_reconfigure", &Caller::udp_reconfigure}, + {"udp_srcip", &Caller::udp_srcip}, + {"udp_srcip2", &Caller::udp_srcip2}, + {"udp_srcmac", &Caller::udp_srcmac}, + {"udp_srcmac2", &Caller::udp_srcmac2}, + {"udp_validate", &Caller::udp_validate}, + {"update", &Caller::update}, + {"updatedetectorserver", &Caller::updatedetectorserver}, + {"updatekernel", &Caller::updatekernel}, + {"updatemode", &Caller::updatemode}, + {"user", &Caller::user}, + {"v_a", &Caller::v_a}, + {"v_b", &Caller::v_b}, + {"v_c", &Caller::v_c}, + {"v_chip", &Caller::v_chip}, + {"v_d", &Caller::v_d}, + {"v_io", &Caller::v_io}, + {"v_limit", &Caller::v_limit}, + {"vchip_comp_adc", &Caller::vchip_comp_adc}, + {"vchip_comp_fe", &Caller::vchip_comp_fe}, + {"vchip_cs", &Caller::vchip_cs}, + {"vchip_opa_1st", &Caller::vchip_opa_1st}, + {"vchip_opa_fd", &Caller::vchip_opa_fd}, + {"vchip_ref_comp_fe", &Caller::vchip_ref_comp_fe}, + {"versions", &Caller::versions}, + {"veto", &Caller::veto}, + {"vetoalg", &Caller::vetoalg}, + {"vetofile", &Caller::vetofile}, + {"vetophoton", &Caller::vetophoton}, + {"vetoref", &Caller::vetoref}, + {"vetostream", &Caller::vetostream}, + {"virtual", &Caller::virtualFunction}, + {"vm_a", &Caller::vm_a}, + {"vm_b", &Caller::vm_b}, + {"vm_c", &Caller::vm_c}, + {"vm_d", &Caller::vm_d}, + {"vm_io", &Caller::vm_io}, + {"zmqhwm", &Caller::zmqhwm}, + {"zmqip", &Caller::zmqip}, + {"zmqport", &Caller::zmqport} + + }; + + StringMap deprecated_functions{ + + {"detectorversion", "firmwareversion"}, + {"softwareversion", "detectorserverversion"}, + {"receiverversion", "rx_version"}, + {"detectornumber", "serialnumber"}, + {"thisversion", "clientversion"}, + {"detsizechan", "detsize"}, + {"trimdir", "settingspath"}, + {"settingsdir", "settingspath"}, + {"flippeddatax", "fliprows"}, + {"cycles", "triggers"}, + {"cyclesl", "triggersl"}, + {"clkdivider", "readoutspeed"}, + {"speed", "readoutspeed"}, + {"vhighvoltage", "highvoltage"}, + {"digitest", "imagetest"}, + {"filter", "filterresistor"}, + {"readnlines", "readnrows"}, + {"vtr", "vtrim"}, + {"vrf", "vrpreamp"}, + {"vrs", "vrshaper"}, + {"vcall", "vcal"}, + {"vis", "vishaper"}, + {"vshaper", "vrshaper"}, + {"vpreamp", "vrpreamp"}, + {"vshaperneg", "vrshaper_n"}, + {"viinsh", "vishaper"}, + {"vpl", "vcal_n"}, + {"vph", "vcal_p"}, + {"vthreshold", "dac"}, + {"vsvp", "dac"}, + {"vsvn", "dac"}, + {"vtrim", "dac"}, + {"vrpreamp", "dac"}, + {"vrshaper", "dac"}, + {"vtgstv", "dac"}, + {"vcmp_ll", "dac"}, + {"vcmp_lr", "dac"}, + {"vcal", "dac"}, + {"vcmp_rl", "dac"}, + {"vcmp_rr", "dac"}, + {"rxb_rb", "dac"}, + {"rxb_lb", "dac"}, + {"vcp", "dac"}, + {"vcn", "dac"}, + {"vishaper", "dac"}, + {"iodelay", "dac"}, + {"vref_ds", "dac"}, + {"vcascn_pb", "dac"}, + {"vcascp_pb", "dac"}, + {"vout_cm", "dac"}, + {"vcasc_out", "dac"}, + {"vin_cm", "dac"}, + {"vref_comp", "dac"}, + {"ib_test_c", "dac"}, + {"vrshaper_n", "dac"}, + {"vipre", "dac"}, + {"vdcsh", "dac"}, + {"vth1", "dac"}, + {"vth2", "dac"}, + {"vth3", "dac"}, + {"vcal_n", "dac"}, + {"vcal_p", "dac"}, + {"vcassh", "dac"}, + {"vcas", "dac"}, + {"vicin", "dac"}, + {"vipre_out", "dac"}, + {"vref_h_adc", "dac"}, + {"vb_comp_fe", "dac"}, + {"vb_comp_adc", "dac"}, + {"vcom_cds", "dac"}, + {"vref_rstore", "dac"}, + {"vb_opa_1st", "dac"}, + {"vref_comp_fe", "dac"}, + {"vcom_adc1", "dac"}, + {"vref_prech", "dac"}, + {"vref_l_adc", "dac"}, + {"vref_cds", "dac"}, + {"vb_cs", "dac"}, + {"vb_opa_fd", "dac"}, + {"vcom_adc2", "dac"}, + {"vb_ds", "dac"}, + {"vb_comp", "dac"}, + {"vb_pixbuf", "dac"}, + {"vin_com", "dac"}, + {"vdd_prot", "dac"}, + {"vbp_colbuf", "dac"}, + {"vb_sda", "dac"}, + {"vcasc_sfp", "dac"}, + {"vipre_cds", "dac"}, + {"ibias_sfp", "dac"}, + {"defaultdacs", "resetdacs"}, + {"busy", "clearbusy"}, + {"receiver", "rx_status"}, + {"framescaught", "rx_framescaught"}, + {"startingfnum", "nextframenumber"}, + {"detectorip", "udp_srcip"}, + {"detectorip2", "udp_srcip2"}, + {"detectormac", "udp_srcmac"}, + {"detectormac2", "udp_srcmac2"}, + {"rx_udpip", "udp_dstip"}, + {"rx_udpip2", "udp_dstip2"}, + {"rx_udpmac", "udp_dstmac"}, + {"rx_udpmac2", "udp_dstmac2"}, + {"rx_udpport", "udp_dstport"}, + {"rx_udpport2", "udp_dstport2"}, + {"flowcontrol_10g", "flowcontrol10g"}, + {"txndelay_frame", "txdelay_frame"}, + {"txndelay_left", "txdelay_left"}, + {"txndelay_right", "txdelay_right"}, + {"r_silent", "rx_silent"}, + {"r_discardpolicy", "rx_discardpolicy"}, + {"r_padding", "rx_padding"}, + {"r_lock", "rx_lock"}, + {"r_lastclient", "rx_lastclient"}, + {"fileformat", "fformat"}, + {"outdir", "fpath"}, + {"index", "findex"}, + {"enablefwrite", "fwrite"}, + {"masterfile", "fmaster"}, + {"overwrite", "foverwrite"}, + {"r_framesperfile", "rx_framesperfile"}, + {"r_readfreq", "rx_zmqfreq"}, + {"rx_readfreq", "rx_zmqfreq"}, + {"rx_datastream", "rx_zmqstream"}, + {"resmat", "partialreset"}, + {"storagecells", "extrastoragecells"}, + {"auto_comp_disable", "autocompdisable"}, + {"comp_disable_time", "compdisabletime"}, + {"adc", "slowadc"}, + {"flags", "romode"}, + {"i_a", "im_a"}, + {"i_b", "im_b"}, + {"i_c", "im_c"}, + {"i_d", "im_d"}, + {"i_io", "im_io"}, + {"copydetectorserver", "updatedetectorserver"}, + {"nframes", "framecounter"}, + {"now", "runtime"}, + {"timestamp", "frametime"}, + {"frameindex", "rx_frameindex"}, + + }; +}; + +} // namespace sls \ No newline at end of file diff --git a/slsDetectorSoftware/src/CallerSpecial.cpp b/slsDetectorSoftware/src/CallerSpecial.cpp new file mode 100644 index 000000000..fc0a2bfa3 --- /dev/null +++ b/slsDetectorSoftware/src/CallerSpecial.cpp @@ -0,0 +1,1277 @@ +#include "Caller.h" +#include "sls/ZmqSocket.h" +#include "sls/bit_utils.h" +#include "sls/file_utils.h" +#include "sls/logger.h" +#include "sls/string_utils.h" +#include +#include +namespace sls { +// some helper functions to print + +std::vector Caller::getAllCommands() { + std::vector ret; + for (auto it : functions) + ret.push_back(it.first); + return ret; +} + +std::map Caller::GetDeprecatedCommands() { + return deprecated_functions; +} + +void Caller::call(const std::string &command, + const std::vector &arguments, int detector_id, + int action, std::ostream &os, int receiver_id) { + cmd = command; + args = arguments; // copy args before replacing + std::string temp; + while (temp != cmd) { + temp = cmd; + ReplaceIfDeprecated(cmd); + } + + det_id = detector_id; + rx_id = receiver_id; + auto it = functions.find(cmd); + if (it != functions.end()) { + auto ret = ((*this).*(it->second))(action); + os << cmd << ' ' << ret; + } else { + throw RuntimeError(cmd + + " Unknown command, use list to list all commands"); + } +} + +bool Caller::ReplaceIfDeprecated(std::string &command) { + auto d_it = deprecated_functions.find(command); + if (d_it != deprecated_functions.end()) { + + // insert old command into arguments (for dacs) + if (d_it->second == "dac") { + args.insert(args.begin(), command); + LOG(logWARNING) + << command + << " is deprecated and will be removed. Please migrate to: " + << d_it->second << " " << command; + } else { + LOG(logWARNING) + << command + << " is deprecated and will be removed. Please migrate to: " + << d_it->second; + } + command = d_it->second; + return true; + } + return false; +} + +std::string Caller::list(int action) { + if (action == defs::HELP_ACTION) { + return "[deprecated(optional)]\n\tlists all available commands, list " + "deprecated - list deprecated commands\n"; + } + if (args.empty()) { + std::string ret = "free\n"; + for (auto &f : functions) { + ret += f.first + "\n"; + } + return ret; + } else if (args.size() == 1) { + if (args[0] == "deprecated") { + std::ostringstream os; + os << "The following " << deprecated_functions.size() + << " commands are deprecated\n"; + const size_t field_width = 20; + for (const auto &it : deprecated_functions) { + os << std::right << std::setw(field_width) << it.first << " -> " + << it.second << '\n'; + } + return os.str(); + } else { + throw RuntimeError( + "Could not decode argument. Possible options: deprecated"); + } + } else { + WrongNumberOfParameters(0); + return ""; + } +} + +/* Network Configuration (Detector<->Receiver) */ + +IpAddr Caller::getDstIpFromAuto() { + std::string rxHostname = + det->getRxHostname(std::vector{det_id}).squash("none"); + // Hostname could be ip try to decode otherwise look up the hostname + auto val = IpAddr{rxHostname}; + if (val == 0) { + val = HostnameToIp(rxHostname.c_str()); + } + return val; +} + +IpAddr Caller::getSrcIpFromAuto() { + if (det->getDetectorType().squash() == defs::GOTTHARD) { + throw RuntimeError( + "Cannot use 'auto' for udp_srcip for GotthardI Detector."); + } + std::string hostname = + det->getHostname(std::vector{det_id}).squash("none"); + // Hostname could be ip try to decode otherwise look up the hostname + auto val = IpAddr{hostname}; + if (val == 0) { + val = HostnameToIp(hostname.c_str()); + } + return val; +} + +UdpDestination Caller::getUdpEntry() { + UdpDestination udpDestination{}; + udpDestination.entry = rx_id; + + for (auto it : args) { + size_t pos = it.find('='); + std::string key = it.substr(0, pos); + std::string value = it.substr(pos + 1); + if (key == "ip") { + if (value == "auto") { + auto val = getDstIpFromAuto(); + LOG(logINFO) << "Setting udp_dstip of detector " << det_id + << " to " << val; + udpDestination.ip = val; + } else { + udpDestination.ip = IpAddr(value); + } + } else if (key == "ip2") { + if (value == "auto") { + auto val = getDstIpFromAuto(); + LOG(logINFO) << "Setting udp_dstip2 of detector " << det_id + << " to " << val; + udpDestination.ip2 = val; + } else { + udpDestination.ip2 = IpAddr(value); + } + } else if (key == "mac") { + udpDestination.mac = MacAddr(value); + } else if (key == "mac2") { + udpDestination.mac2 = MacAddr(value); + } else if (key == "port") { + udpDestination.port = StringTo(value); + } else if (key == "port2") { + udpDestination.port2 = StringTo(value); + } + } + return udpDestination; +} +void Caller::WrongNumberOfParameters(size_t expected) { + if (expected == 0) { + throw RuntimeError("Command " + cmd + + " expected no parameter/s but got " + + std::to_string(args.size()) + "\n"); + } + throw RuntimeError("Command " + cmd + " expected (or >=) " + + std::to_string(expected) + " parameter/s but got " + + std::to_string(args.size()) + "\n"); +} + +void Caller::GetLevelAndUpdateArgIndex(int action, + std::string levelSeparatedCommand, + int &level, int &iArg, size_t nGetArgs, + size_t nPutArgs) { + if (cmd == levelSeparatedCommand) { + ++nGetArgs; + ++nPutArgs; + } else { + LOG(logWARNING) << "This command is deprecated and will be removed. " + "Please migrate to " + << levelSeparatedCommand; + } + if (action == defs::GET_ACTION && args.size() != nGetArgs) { + WrongNumberOfParameters(nGetArgs); + } else if (action == defs::PUT_ACTION && args.size() != nPutArgs) { + WrongNumberOfParameters(nPutArgs); + } + if (cmd == levelSeparatedCommand) { + level = StringTo(args[iArg++]); + } else { + level = cmd[cmd.find_first_of("012")] - '0'; + } +} + +std::string Caller::free(int action) { + // This function is purely for help, actual functionality is in the caller + return "free\n\tFree detector shared memory\n"; +} + +std::string Caller::hostname(int action) { + std::ostringstream os; + if (action == defs::HELP_ACTION) { + os << "\n\tFrees shared memory and sets hostname (or IP address) of " + "all modules concatenated by +.\n\t Virtual servers can already " + "use the port in hostname separated by ':' and ports incremented " + "by 2 to accomodate the stop server as well." + << '\n'; + } else if (action == defs::GET_ACTION) { + if (!args.empty()) { + WrongNumberOfParameters(0); + } + auto t = det->getHostname(std::vector{det_id}); + os << OutString(t) << '\n'; + } else if (action == defs::PUT_ACTION) { + if (args.empty()) { + WrongNumberOfParameters(1); + } + if (det_id != -1) { + throw RuntimeError("Cannot execute this at module level"); + } + // only args[0], but many hostames concatenated with + + if (args[0].find('+') != std::string::npos) { + auto t = split(args[0], '+'); + det->setHostname(t); + os << ToString(t) << '\n'; + } + // either hostnames separated by space, or single hostname + else { + det->setHostname(args); + os << ToString(args) << '\n'; + } + } else { + throw RuntimeError("Unknown action"); + } + return os.str(); +} + +void Caller::EmptyDataCallBack(detectorData *data, uint64_t frameIndex, + uint32_t subFrameIndex, void *this_pointer) { + LOG(logDEBUG) << "EmptyDataCallBack to start up zmq sockets"; +} + +std::string Caller::acquire(int action) { + std::ostringstream os; + if (action == defs::HELP_ACTION) { + os << "\n\tAcquire the number of frames set up.\n\tBlocking command, " + "where control server is blocked and cannot accept other " + "commands until acquisition is done. \n\t- sets acquiring " + "flag\n\t- starts the receiver listener (if enabled)\n\t- starts " + "detector acquisition for number of frames set\n\t- monitors " + "detector status from running to idle\n\t- stops the receiver " + "listener (if enabled)\n\t- increments file index if file write " + "enabled\n\t- resets acquiring flag" + << '\n'; + } else { + if (det->empty()) { + throw RuntimeError("This shared memory has no detectors added."); + } + if (det_id >= 0) { + throw RuntimeError("Individual detectors not allowed for readout."); + } + if (action == defs::READOUT_ZMQ_ACTION) { + det->registerDataCallback(&(EmptyDataCallBack), this); + } + det->acquire(); + + if (det->getUseReceiverFlag().squash(false)) { + os << "\nAcquired "; + os << det->getFramesCaught() << '\n'; + } + } + return os.str(); +} +std::string Caller::versions(int action) { + std::ostringstream os; + if (action == defs::HELP_ACTION) { + os << "\n\tPrint all versions and detector type" << '\n'; + } else if (action == defs::GET_ACTION) { + if (!args.empty()) { + WrongNumberOfParameters(0); + } + + std::string vType = "Unknown"; + std::string vFirmware = "Unknown"; + std::string vServer = "Unknown"; + std::string vKernel = "Unknown"; + std::string vHardware = "Unknown"; + bool eiger = false; + std::string vBebFirmware = "Unknown"; + std::string vFeblFirmware = "Unknown"; + std::string vFebrFirmware = "Unknown"; + bool receiver = false; + std::string vReceiver = "Unknown"; + + std::string vRelease = det->getPackageVersion(); + std::string vClient = det->getClientVersion(); + + if (det->size() != 0) { + // shared memory has detectors + vType = OutString(det->getDetectorType()); + eiger = (det->getDetectorType().squash() == defs::EIGER); + receiver = det->getUseReceiverFlag().squash(false); + if (receiver) { + // cannot connect to receiver + try { + vReceiver = OutString( + det->getReceiverVersion(std::vector{det_id})); + } catch (const std::exception &e) { + } + } + // cannot connect to Detector + try { + auto firmwareVersion = + det->getFirmwareVersion(std::vector{det_id}); + vFirmware = OutStringHex(firmwareVersion); + vServer = OutString( + det->getDetectorServerVersion(std::vector{det_id})); + vKernel = OutString( + det->getKernelVersion({std::vector{det_id}})); + vHardware = OutString( + det->getHardwareVersion(std::vector{det_id})); + if (eiger) { + vBebFirmware = OutString(firmwareVersion); + vFeblFirmware = OutString(det->getFrontEndFirmwareVersion( + defs::FRONT_LEFT, std::vector{det_id})); + vFebrFirmware = OutString(det->getFrontEndFirmwareVersion( + defs::FRONT_RIGHT, std::vector{det_id})); + } + } catch (const std::exception &e) { + } + } + + os << "\nType : " << vType + << "\nRelease : " << vRelease + << "\nClient : " << vClient; + if (eiger) { + os << "\nFirmware (Beb) : " << vBebFirmware + << "\nFirmware (Febl) : " << vFeblFirmware + << "\nFirmware (Febr) : " << vFebrFirmware; + } else { + os << "\nFirmware : " << vFirmware; + } + os << "\nServer : " << vServer + << "\nKernel : " << vKernel + << "\nHardware : " << vHardware; + if (receiver) + os << "\nReceiver : " << vReceiver; + os << std::dec << '\n'; + + } else if (action == defs::PUT_ACTION) { + throw RuntimeError("cannot put"); + } else { + throw RuntimeError("Unknown action"); + } + return os.str(); +} +std::string Caller::threshold(int action) { + std::ostringstream os; + if (action == defs::HELP_ACTION) { + os << "[eV] [(optinal settings)" + "\n\t[Eiger][Mythen3] Threshold in eV. It loads trim files from " + "settingspath."; + if (cmd == "thresholdnotb") { + os << "Trimbits are not loaded."; + } + os << "\n\t" << cmd + << " [eV1] [eV2] [eV3] [(optional settings)]" + "\n\t[Mythen3] Threshold in eV for each counter. It loads trim " + "files from settingspath. An energy of -1 will pick up values " + " from detector."; + if (cmd == "thresholdnotb") { + os << "Trimbits are not loaded."; + } + os << '\n'; + } else if (action == defs::GET_ACTION) { + if (cmd == "thresholdnotb") { + throw RuntimeError("cannot get"); + } + if (!args.empty()) { + WrongNumberOfParameters(0); + } + defs::detectorType type = det->getDetectorType().squash(); + if (type == defs::EIGER) { + auto t = det->getThresholdEnergy(std::vector{det_id}); + os << OutString(t) << '\n'; + } else if (type == defs::MYTHEN3) { + auto t = det->getAllThresholdEnergy(std::vector{det_id}); + os << OutString(t) << '\n'; + } else { + throw RuntimeError("Not implemented for this detector\n"); + } + } else if (action == defs::PUT_ACTION) { + defs::detectorType type = det->getDetectorType().squash(); + if (type == defs::EIGER && args.size() != 1 && args.size() != 2) { + WrongNumberOfParameters(1); + } + if (type == defs::MYTHEN3 && (args.size() < 1 || args.size() > 4)) { + WrongNumberOfParameters(1); + } + + bool trimbits = (cmd == "thresholdnotb") ? false : true; + std::array energy = {StringTo(args[0]), 0, 0}; + energy[1] = energy[0]; + energy[2] = energy[0]; + defs::detectorSettings sett = defs::STANDARD; + + // check if argument has settings or get it + if (args.size() == 2 || args.size() == 4) { + sett = StringTo(args[args.size() - 1]); + } else { + sett = det->getSettings(std::vector{det_id}) + .tsquash("Inconsistent settings between detectors"); + } + + // get other threshold values + if (args.size() > 2) { + energy[1] = StringTo(args[1]); + energy[2] = StringTo(args[2]); + } + switch (type) { + case defs::EIGER: + det->setThresholdEnergy(energy[0], sett, trimbits, + std::vector{det_id}); + break; + case defs::MYTHEN3: + det->setThresholdEnergy(energy, sett, trimbits, + std::vector{det_id}); + break; + default: + throw RuntimeError("Not implemented for this detector\n"); + } + os << ToString(args) << '\n'; + } else { + throw RuntimeError("Unknown action"); + } + return os.str(); +} + +std::string Caller::trimen(int action) { + std::ostringstream os; + if (action == defs::HELP_ACTION) { + os << "[trim_ev1] [trim_Ev2 (optional)] [trim_ev3 (optional)] " + "...\n\t[Eiger][Mythen3] list of trim energies, where " + "corresponding default trim files exist in corresponding trim " + "folders." + << '\n'; + } else if (action == defs::GET_ACTION) { + if (!args.empty()) { + WrongNumberOfParameters(0); + } + auto t = det->getTrimEnergies(std::vector{det_id}); + os << OutString(t) << '\n'; + } else if (action == defs::PUT_ACTION) { + std::vector t(args.size()); + if (!args.empty()) { + for (size_t i = 0; i < t.size(); ++i) { + t[i] = StringTo(args[i]); + } + } + det->setTrimEnergies(t, std::vector{det_id}); + os << ToString(args) << '\n'; + } else { + throw RuntimeError("Unknown action"); + } + return os.str(); +} +std::string Caller::badchannels(int action) { + std::ostringstream os; + if (action == defs::HELP_ACTION) { + os << "[fname|none|0]\n\t[Gotthard2][Mythen3] Sets the bad channels " + "(from file of bad channel numbers) to be masked out. None or 0 " + "unsets all the badchannels.\n\t[Mythen3] Also does trimming" + << '\n'; + } else if (action == defs::GET_ACTION) { + if (args.size() != 1) { + WrongNumberOfParameters(1); + } + det->getBadChannels(args[0], std::vector{det_id}); + os << "successfully retrieved" << '\n'; + } else if (action == defs::PUT_ACTION) { + bool parse = false; + if (args.size() == 0) { + WrongNumberOfParameters(1); + } else if (args.size() == 1) { + if (args[0] == "none" || args[0] == "0") { + det->setBadChannels(std::vector{}, + std::vector{det_id}); + } else if (args[0].find(".") != std::string::npos) { + det->setBadChannels(args[0], std::vector{det_id}); + } else { + parse = true; + } + } + // parse multi args or single one with range or single value + if (parse || args.size() > 1) { + // get channels + auto list = getChannelsFromStringList(args); + det->setBadChannels(list, std::vector{det_id}); + } + os << "successfully loaded" << '\n'; + } else { + throw RuntimeError("Unknown action"); + } + return os.str(); +} +std::string Caller::udp_srcip(int action) { + std::ostringstream os; + if (action == defs::HELP_ACTION) { + os << "[x.x.x.x] or auto\n\tIp address of the detector (source) udp " + "interface. Must be same subnet as destination udp " + "ip.\n\t[Eiger] Set only for 10G. For 1G, detector will replace " + "with its own DHCP IP address. \n\tOne can also set this to " + "'auto' for 1 GbE data and virtual detectors. It will set to IP " + "of detector. Not available for GotthardI" + << '\n'; + } else if (action == defs::GET_ACTION) { + auto t = det->getSourceUDPIP(std::vector{det_id}); + if (!args.empty()) { + WrongNumberOfParameters(0); + } + os << OutString(t) << '\n'; + } else if (action == defs::PUT_ACTION) { + if (args.size() != 1) { + WrongNumberOfParameters(1); + } + IpAddr val; + if (args[0] == "auto") { + val = getSrcIpFromAuto(); + LOG(logINFO) << "Setting udp_srcip of detector " << det_id << " to " + << val; + } else { + val = IpAddr(args[0]); + } + det->setSourceUDPIP(val, std::vector{det_id}); + os << val << '\n'; + + } else { + throw RuntimeError("Unknown action"); + } + return os.str(); +} +std::string Caller::udp_srcip2(int action) { + std::ostringstream os; + if (action == defs::HELP_ACTION) { + os << "[x.x.x.x] or auto\n\t[Jungfrau][Moench][Gotthard2] Ip address " + "of the " + "detector (source) udp interface 2. Must be same subnet as " + "destination udp ip2.\n\t [Jungfrau][Moench] top half or inner " + "interface\n\t [Gotthard2] veto debugging. \n\tOne can also set " + "this to 'auto' for 1 GbE data and virtual detectors. It will " + "set to IP of detector." + << '\n'; + } else if (action == defs::GET_ACTION) { + auto t = det->getSourceUDPIP2(std::vector{det_id}); + if (!args.empty()) { + WrongNumberOfParameters(0); + } + os << OutString(t) << '\n'; + } else if (action == defs::PUT_ACTION) { + if (args.size() != 1) { + WrongNumberOfParameters(1); + } + IpAddr val; + if (args[0] == "auto") { + val = getSrcIpFromAuto(); + LOG(logINFO) << "Setting udp_srcip2 of detector " << det_id + << " to " << val; + } else { + val = IpAddr(args[0]); + } + det->setSourceUDPIP2(val, std::vector{det_id}); + os << val << '\n'; + + } else { + throw RuntimeError("Unknown action"); + } + return os.str(); +} +std::string Caller::udp_dstip(int action) { + std::ostringstream os; + if (action == defs::HELP_ACTION) { + os << "[x.x.x.x] or auto\n\tIp address of the receiver (destination) " + "udp interface. If 'auto' used, then ip is set to ip of " + "rx_hostname." + << '\n'; + } else if (action == defs::GET_ACTION) { + auto t = det->getDestinationUDPIP(std::vector{det_id}); + if (!args.empty()) { + WrongNumberOfParameters(0); + } + os << OutString(t) << '\n'; + } else if (action == defs::PUT_ACTION) { + if (args.size() != 1) { + WrongNumberOfParameters(1); + } + if (args[0] == "auto") { + auto val = getDstIpFromAuto(); + LOG(logINFO) << "Setting udp_dstip of detector " << det_id << " to " + << val; + det->setDestinationUDPIP(val, std::vector{det_id}); + os << val << '\n'; + } else { + auto val = IpAddr(args[0]); + det->setDestinationUDPIP(val, std::vector{det_id}); + os << args.front() << '\n'; + } + } else { + throw RuntimeError("Unknown action"); + } + return os.str(); +} +std::string Caller::udp_dstip2(int action) { + std::ostringstream os; + if (action == defs::HELP_ACTION) { + os << "[x.x.x.x] or auto\n\t[Jungfrau][Moench][Gotthard2] Ip address " + "of the " + "receiver (destination) udp interface 2. If 'auto' used, then ip " + "is set to ip of rx_hostname.\n\t[Jungfrau][Moench] bottom half " + "\n\t[Gotthard2] veto debugging. " + << '\n'; + } else if (action == defs::GET_ACTION) { + auto t = det->getDestinationUDPIP2(std::vector{det_id}); + if (!args.empty()) { + WrongNumberOfParameters(0); + } + os << OutString(t) << '\n'; + } else if (action == defs::PUT_ACTION) { + if (args.size() != 1) { + WrongNumberOfParameters(1); + } + if (args[0] == "auto") { + auto val = getDstIpFromAuto(); + LOG(logINFO) << "Setting udp_dstip2 of detector " << det_id + << " to " << val; + det->setDestinationUDPIP2(val, std::vector{det_id}); + os << val << '\n'; + } else { + auto val = IpAddr(args[0]); + det->setDestinationUDPIP2(val, std::vector{det_id}); + os << args.front() << '\n'; + } + } else { + throw RuntimeError("Unknown action"); + } + return os.str(); +} +std::string Caller::rx_hostname(int action) { + std::ostringstream os; + if (action == defs::HELP_ACTION) { + os << "[hostname or ip address]\n\t" + "[hostname or ip address]:[tcp port]\n\t" + "[hostname1]:[tcp_port1]+[hostname2]:[tcp_port2]+\n\t" + "Receiver hostname or IP. If port included, then the receiver " + "tcp port.\n\t" + "Used for TCP control communication between client and receiver " + "to configure receiver. Also updates receiver with detector " + "parameters. Also resets any prior receiver property (not on " + "detector). " + << '\n'; + } else if (action == defs::GET_ACTION) { + if (!args.empty()) { + WrongNumberOfParameters(0); + } + auto t = det->getRxHostname(std::vector{det_id}); + os << OutString(t) << '\n'; + } else if (action == defs::PUT_ACTION) { + if (args.size() < 1) { + WrongNumberOfParameters(1); + } + // multiple arguments + if (args.size() > 1) { + // multiple in mulitple + if (args[0].find('+') != std::string::npos) { + throw RuntimeError( + "Cannot add multiple receivers at module level"); + } + if (det_id != -1) { + throw RuntimeError( + "Cannot add multiple receivers at module level"); + } + det->setRxHostname(args); + os << ToString(args) << '\n'; + } + // single argument + else { + // multiple receivers concatenated with + + if (args[0].find('+') != std::string::npos) { + if (det_id != -1) { + throw RuntimeError( + "Cannot add multiple receivers at module level"); + } + auto t = split(args[0], '+'); + det->setRxHostname(t); + os << ToString(t) << '\n'; + } + // single receiver + else { + det->setRxHostname(args[0], std::vector{det_id}); + os << ToString(args) << '\n'; + } + } + } else { + throw RuntimeError("Unknown action"); + } + return os.str(); +} +std::string Caller::rx_zmqip(int action) { + std::string helpMessage = + "\n\t[deprecated] The receiver zmq socket (publisher) will " + "listen to all interfaces ('tcp://0.0.0.0:[port]'to all interfaces " + "(from v9.0.0). This command does nothing and will be removed " + "(from v10.0.0). This change makes no difference to the user.\n"; + std::ostringstream os; + if (action == defs::HELP_ACTION) { + os << helpMessage << '\n'; + } else if (action == defs::GET_ACTION) { + os << ZMQ_PUBLISHER_IP << '\n'; + } else if (action == defs::PUT_ACTION) { + LOG(logWARNING) << helpMessage << '\n'; + os << ZMQ_PUBLISHER_IP << '\n'; + } else { + throw RuntimeError("Unknown action"); + } + return os.str(); +} +std::string Caller::rx_roi(int action) { + std::ostringstream os; + if (action == defs::HELP_ACTION) { + os << "[xmin] [xmax] [ymin] [ymax]\n\tRegion of interest in " + "receiver.\n\tOnly allowed at multi module level and without gap " + "pixels." + << '\n'; + } else if (action == defs::GET_ACTION) { + if (!args.empty()) { + WrongNumberOfParameters(0); + } + if (det_id == -1) { + auto t = det->getRxROI(); + os << t << '\n'; + } else { + auto t = det->getIndividualRxROIs(std::vector{det_id}); + os << t << '\n'; + } + } else if (action == defs::PUT_ACTION) { + defs::ROI t; + // 2 or 4 arguments + if (args.size() != 2 && args.size() != 4) { + WrongNumberOfParameters(2); + } + if (args.size() == 2 || args.size() == 4) { + t.xmin = StringTo(args[0]); + t.xmax = StringTo(args[1]); + } + if (args.size() == 4) { + t.ymin = StringTo(args[2]); + t.ymax = StringTo(args[3]); + } + // only multi level + if (det_id != -1) { + throw RuntimeError("Cannot execute receiver ROI at module level"); + } + det->setRxROI(t); + os << t << '\n'; + } else { + throw RuntimeError("Unknown action"); + } + return os.str(); +} +std::string Caller::ratecorr(int action) { + std::ostringstream os; + if (action == defs::HELP_ACTION) { + os << "[n_rate (in ns)]\n\t[Eiger] Dead time correction constant in " + "ns. -1 will set to default tau of settings from trimbit file. 0 " + "will unset rate correction." + << '\n'; + } else if (action == defs::GET_ACTION) { + if (!args.empty()) { + WrongNumberOfParameters(0); + } + auto t = det->getRateCorrection(std::vector{det_id}); + os << OutString(t) << '\n'; + } else if (action == defs::PUT_ACTION) { + if (args.size() != 1) { + WrongNumberOfParameters(1); + } + int tau = StringTo(args[0]); + if (tau == -1) { + det->setDefaultRateCorrection(std::vector{det_id}); + auto t = det->getRateCorrection(std::vector{det_id}); + os << OutString(t) << '\n'; + } else { + auto t = StringTo(args[0], "ns"); + det->setRateCorrection(t, std::vector{det_id}); + os << args.front() << "ns\n"; + } + } else { + throw RuntimeError("Unknown action"); + } + return os.str(); +} +std::string Caller::burstmode(int action) { + std::ostringstream os; + if (action == defs::HELP_ACTION) { + os << "[burst_internal or 0, burst_external or 1, cw_internal or 2, " + "cw_external or 3]\n\t[Gotthard2] Default is burst_internal " + "type. Also changes clkdiv 2, 3, 4" + << '\n'; + } else { + if (action == defs::GET_ACTION) { + if (!args.empty()) { + WrongNumberOfParameters(0); + } + auto t = det->getBurstMode(std::vector{det_id}); + os << OutString(t) << '\n'; + } else if (action == defs::PUT_ACTION) { + if (args.size() != 1) { + WrongNumberOfParameters(1); + } + defs::burstMode t; + try { + int ival = StringTo(args[0]); + switch (ival) { + case 0: + t = defs::BURST_INTERNAL; + break; + case 1: + t = defs::BURST_EXTERNAL; + break; + case 2: + t = defs::CONTINUOUS_INTERNAL; + break; + case 3: + t = defs::CONTINUOUS_EXTERNAL; + break; + default: + throw RuntimeError("Unknown burst mode " + args[0]); + } + } catch (...) { + t = StringTo(args[0]); + } + det->setBurstMode(t, std::vector{det_id}); + os << ToString(t) << '\n'; // no args to convert 0,1,2 as well + } else { + throw RuntimeError("Unknown action"); + } + } + return os.str(); +} +std::string Caller::vetostream(int action) { + std::ostringstream os; + if (action == defs::HELP_ACTION) { + os << "[none|lll|10gbe|...]\n\t[Gotthard2] Enable or disable the 2 " + "veto streaming interfaces available. Can include more than one " + "interface. \n\tDefault: none. lll (low latency link) is the " + "default interface to work with. \n\t10GbE is for debugging and " + "also enables second interface in receiver for listening to veto " + "packets (writes a separate file if writing enabled). Also " + "restarts client and receiver zmq sockets if zmq streaming " + "enabled." + << '\n'; + } else if (action == defs::GET_ACTION) { + if (!args.empty()) { + WrongNumberOfParameters(0); + } + auto t = det->getVetoStream(std::vector{det_id}); + os << OutString(t) << '\n'; + } else if (action == defs::PUT_ACTION) { + if (args.empty()) { + WrongNumberOfParameters(1); + } + defs::streamingInterface interface = defs::streamingInterface::NONE; + for (const auto &arg : args) { + if (arg == "none") { + if (args.size() > 1) { + throw RuntimeError( + std::string( + "cannot have other arguments with 'none'. args: ") + + ToString(args)); + } + break; + } + interface = interface | (StringTo(arg)); + } + det->setVetoStream(interface, std::vector{det_id}); + os << ToString(interface) << '\n'; + } else { + throw RuntimeError("Unknown action"); + } + return os.str(); +} +std::string Caller::counters(int action) { + std::ostringstream os; + if (action == defs::HELP_ACTION) { + os << "[i0] [i1] [i2]... \n\t[Mythen3] List of counters indices " + "enabled. Each element in list can be 0 - 2 and must be non " + "repetitive. Enabling counters sets vth dacs to remembered " + "values and disabling sets them to disabled values." + << '\n'; + } else if (action == defs::GET_ACTION) { + if (!args.empty()) { + WrongNumberOfParameters(0); + } + auto mask = det->getCounterMask(std::vector{det_id}).squash(-1); + os << ToString(getSetBits(mask)) << '\n'; + } else if (action == defs::PUT_ACTION) { + if (args.empty()) { + WrongNumberOfParameters(1); + } + if (std::any_of(args.cbegin(), args.cend(), [](std::string s) { + return (StringTo(s) < 0 || StringTo(s) > 2); + })) { + throw RuntimeError("Invalid counter indices list. Example: 0 1 2"); + } + // convert vector to counter enable mask + uint32_t mask = 0; + for (size_t i = 0; i < args.size(); ++i) { + int val = StringTo(args[i]); + // already enabled earlier + if (mask & (1 << val)) { + std::ostringstream oss; + oss << "Duplicate counter values (" << val << ") in arguments"; + throw RuntimeError(oss.str()); + } + mask |= (1 << val); + } + det->setCounterMask(mask, std::vector{det_id}); + os << ToString(args) << '\n'; + } else { + throw RuntimeError("Unknown action"); + } + return os.str(); +} +std::string Caller::samples(int action) { + std::ostringstream os; + if (action == defs::HELP_ACTION) { + os << "[n_samples]\n\t[Ctb][Xilinx_Ctb] Number of samples (analog, " + "digitial and " + "transceiver) expected.\n" + << '\n'; + } else if (action == defs::GET_ACTION) { + if (!args.empty()) { + WrongNumberOfParameters(0); + } + auto a = det->getNumberOfAnalogSamples(std::vector{det_id}); + // get also digital samples for ctb and compare with analog + auto det_type = det->getDetectorType().squash(defs::GENERIC); + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { + auto d = det->getNumberOfDigitalSamples(std::vector{det_id}); + auto t = + det->getNumberOfTransceiverSamples(std::vector{det_id}); + int as = a.squash(-1); + int ds = d.squash(-1); + int ts = t.squash(-1); + if (as == -1 || ds == -1 || ts == -1 || as != ds || + as != ts) { // check if a == d? + throw RuntimeError( + "Different samples. Use asamples, dsamples or tsamples."); + } + } + os << OutString(a) << '\n'; + } else if (action == defs::PUT_ACTION) { + if (args.size() != 1) { + WrongNumberOfParameters(1); + } + det->setNumberOfAnalogSamples(StringTo(args[0]), + std::vector{det_id}); + // set also digital samples for ctb + auto det_type = det->getDetectorType().squash(defs::GENERIC); + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { + det->setNumberOfDigitalSamples(StringTo(args[0]), + std::vector{det_id}); + det->setNumberOfTransceiverSamples(StringTo(args[0]), + std::vector{det_id}); + } + os << args.front() << '\n'; + } else { + throw RuntimeError("Unknown action"); + } + return os.str(); +} +std::string Caller::slowadc(int action) { + std::ostringstream os; + if (action == defs::HELP_ACTION) { + os << "[n_channel (0-7 for channel]\n\t[Ctb] Slow " + "ADC channel in mV" + << '\n'; + } else if (action == defs::GET_ACTION) { + if (args.size() != 1) { + WrongNumberOfParameters(0); + } + int nchan = StringTo(args[0]); + if (nchan < 0 || nchan > 7) { + throw RuntimeError("Unknown adc argument " + args[0]); + } + auto t = det->getSlowADC( + static_cast(nchan + defs::SLOW_ADC0), + std::vector{det_id}); + Result result(t.size()); + for (unsigned int i = 0; i < t.size(); ++i) { + result[i] = t[i] / 1000.00; + } + os << OutString(result) << " mV\n"; + + } else if (action == defs::PUT_ACTION) { + throw RuntimeError("cannot put"); + } else { + throw RuntimeError("Unknown action"); + } + return os.str(); +} +std::string Caller::rx_dbitlist(int action) { + std::ostringstream os; + if (action == defs::HELP_ACTION) { + os << "[all] or [i0] [i1] [i2]... \n\t[Ctb] List of digital signal " + "bits read out. If all is used instead of a list, all digital " + "bits (64) enabled. Each element in list can be 0 - 63 and must " + "be non repetitive." + << '\n'; + } else if (action == defs::GET_ACTION) { + if (!args.empty()) { + WrongNumberOfParameters(0); + } + auto t = det->getRxDbitList(std::vector{det_id}); + os << OutString(t) << '\n'; + } else if (action == defs::PUT_ACTION) { + if (args.empty()) { + WrongNumberOfParameters(1); + } + std::vector t; + if (args[0] == "all") { + t.resize(64); + for (unsigned int i = 0; i < 64; ++i) { + t[i] = i; + } + } else { + unsigned int ntrim = args.size(); + t.resize(ntrim); + for (unsigned int i = 0; i < ntrim; ++i) { + t[i] = StringTo(args[i]); + } + } + det->setRxDbitList(t, std::vector{det_id}); + os << ToString(args) << '\n'; + } else { + throw RuntimeError("Unknown action"); + } + return os.str(); +} +std::string Caller::rx_jsonaddheader(int action) { + std::ostringstream os; + if (action == defs::HELP_ACTION) { + os << "[key1] [value1] [key2] [value2]...[keyn] [valuen]\n\tAdditional " + "json header to be streamed out from receiver via zmq. Default " + "is empty. Max 20 characters for each key/value. Use only if to " + "be processed by an intermediate user process listening to " + "receiver zmq packets. Empty value deletes header. " + << '\n'; + } else if (action == defs::GET_ACTION) { + if (!args.empty()) { + WrongNumberOfParameters(0); + } + auto t = det->getAdditionalJsonHeader(std::vector{det_id}); + os << OutString(t) << '\n'; + } else if (action == defs::PUT_ACTION) { + // arguments can be empty + std::map json; + for (size_t i = 0; i < args.size(); i = i + 2) { + // last value is empty + if (i + 1 >= args.size()) { + json[args[i]] = ""; + } else { + json[args[i]] = args[i + 1]; + } + } + det->setAdditionalJsonHeader(json, std::vector{det_id}); + os << ToString(json) << '\n'; + } else { + throw RuntimeError("Unknown action"); + } + return os.str(); +} +std::string Caller::execcommand(int action) { + std::ostringstream os; + if (action == defs::HELP_ACTION) { + os << "[command]\n\tExecutes command on detector server console." + << '\n'; + } else if (action == defs::GET_ACTION) { + throw RuntimeError("Cannot get."); + } else if (action == defs::PUT_ACTION) { + std::string command; + for (auto &i : args) { + command += (i + ' '); + } + auto t = det->executeCommand(command, std::vector{det_id}); + os << OutString(t) << '\n'; + } else { + throw RuntimeError("Unknown action"); + } + return os.str(); +} +std::string Caller::dacvalues(int action) { + std::ostringstream os; + if (action == defs::HELP_ACTION) { + os << "[(optional unit) mV] \n\tGets the values for every " + "dac for this detector." + << '\n'; + } else if (action == defs::GET_ACTION) { + bool mv = false; + if (args.size() == 1) { + if ((args[0] != "mv") && (args[0] != "mV")) { + throw RuntimeError("Unknown argument " + args[0] + + ". Did you mean mV?"); + } + mv = true; + } else if (args.size() > 1) { + WrongNumberOfParameters(1); + } + auto t = det->getDacList(); + auto names = det->getDacNames(); + auto name_it = names.begin(); + os << '['; + auto it = t.cbegin(); + os << ToString(*name_it++) << ' '; + os << OutString(det->getDAC(*it++, mv, std::vector{det_id})) + << (!args.empty() ? " mV" : ""); + while (it != t.cend()) { + os << ", " << ToString(*name_it++) << ' '; + os << OutString(det->getDAC(*it++, mv, std::vector{det_id})) + << (!args.empty() ? " mV" : ""); + } + os << "]\n"; + } else if (action == defs::PUT_ACTION) { + throw RuntimeError("Cannot put"); + } else { + throw RuntimeError("Unknown action"); + } + return os.str(); +} +std::string Caller::currentsource(int action) { + std::ostringstream os; + if (action == defs::HELP_ACTION) { + os << "\n\t[0|1]\n\t\t[Gotthard2] Enable or disable current source. " + "Default " + "is disabled.\n\t[0|1] [fix|nofix] [select source] [(only for " + "chipv1.1)normal|low]\n\t\t[Jungfrau] Disable or enable current " + "source with some parameters. The select source is 0-63 for " + "chipv1.0 and a 64 bit mask for chipv1.1. To disable, one needs " + "only one argument '0'." + << '\n'; + } else if (action == defs::GET_ACTION) { + if (args.size() != 0) { + WrongNumberOfParameters(0); + } + auto t = det->getCurrentSource(std::vector{det_id}); + os << OutString(t) << '\n'; + } else if (action == defs::PUT_ACTION) { + if (args.size() == 1) { + det->setCurrentSource( + defs::currentSrcParameters(StringTo(args[0]))); + } else if (args.size() >= 3) { + // scan fix + bool fix = false; + if (args[1] == "fix") { + fix = true; + } else if (args[1] == "nofix") { + fix = false; + } else { + throw RuntimeError("Invalid argument: " + args[1] + + ". Did you mean fix or nofix?"); + } + if (args.size() == 3) { + det->setCurrentSource(defs::currentSrcParameters( + fix, StringTo(args[2]))); + } else if (args.size() == 4) { + bool normalCurrent = false; + if (args[3] == "normal") { + normalCurrent = true; + } else if (args[3] == "low") { + normalCurrent = false; + } else { + throw RuntimeError("Invalid argument: " + args[3] + + ". Did you mean normal or low?"); + } + det->setCurrentSource(defs::currentSrcParameters( + fix, StringTo(args[2]), normalCurrent)); + } else { + throw RuntimeError( + "Invalid number of parareters for this command."); + } + } else { + throw RuntimeError( + "Invalid number of parareters for this command."); + } + os << ToString(args) << '\n'; + } else { + throw RuntimeError("Unknown action"); + } + return os.str(); +} +std::string Caller::gaincaps(int action) { + std::ostringstream os; + if (action == defs::HELP_ACTION) { + os << "[cap1, cap2, ...]\n\t[Mythen3] gain, options: C10pre, C15sh, " + "C30sh, C50sh, C225ACsh, C15pre" + << '\n'; + } else if (action == defs::GET_ACTION) { + if (!args.empty()) + WrongNumberOfParameters(0); + + auto tmp = det->getGainCaps(); + Result csr; + for (auto val : tmp) { + if (val) + csr.push_back(static_cast(val)); + } + + os << OutString(csr) << '\n'; + } else if (action == defs::PUT_ACTION) { + if (args.size() < 1) { + WrongNumberOfParameters(1); + } + int caps = 0; + for (const auto &arg : args) { + if (arg != "0") + caps |= StringTo(arg); + } + + det->setGainCaps(caps); + os << OutString(args) << '\n'; + } else { + throw RuntimeError("Unknown action"); + } + return os.str(); +} +std::string Caller::sleep(int action) { + std::ostringstream os; + if (action == defs::HELP_ACTION) { + os << "[duration] [(optional unit) ns|us|ms|s]\n\tSleep for duration. " + "Mainly for config files for firmware developers." + "Default unit is s." + << '\n'; + } else if (action == defs::GET_ACTION) { + throw RuntimeError("Cannot get."); + } else if (action == defs::PUT_ACTION) { + if (args.size() != 1 && args.size() != 2) { + WrongNumberOfParameters(1); + } + time::ns converted_time{0}; + try { + if (args.size() == 1) { + std::string tmp_time(args[0]); + std::string unit = RemoveUnit(tmp_time); + converted_time = StringTo(tmp_time, unit); + } else { + converted_time = StringTo(args[0], args[1]); + } + } catch (...) { + throw RuntimeError("Could not convert argument to time::ns"); + } + std::this_thread::sleep_for(converted_time); + os << "for " << ToString(converted_time) << " completed" << '\n'; + } else { + throw RuntimeError("Unknown action"); + } + return os.str(); +} + +} // namespace sls \ No newline at end of file diff --git a/slsDetectorSoftware/src/CmdLineApp.cpp b/slsDetectorSoftware/src/CmdApp.cpp similarity index 70% rename from slsDetectorSoftware/src/CmdLineApp.cpp rename to slsDetectorSoftware/src/CmdApp.cpp index 9f75e4dfd..facb584a8 100644 --- a/slsDetectorSoftware/src/CmdLineApp.cpp +++ b/slsDetectorSoftware/src/CmdApp.cpp @@ -1,22 +1,12 @@ -// SPDX-License-Identifier: LGPL-3.0-or-other -// Copyright (C) 2021 Contributors to the SLS Detector Package - -/* -This file is used to generate the command line binaries -(sls_detector_get/put/acquire/help). By defines in CMake -we get the different files. - -*/ -#include "sls/Detector.h" - +#include "Caller.h" #include "CmdParser.h" -#include "CmdProxy.h" -#include "sls/sls_detector_defs.h" +#include "inferAction.h" +#include "sls/Detector.h" +#include "sls/logger.h" #include "sls/versionAPI.h" -#include //strcmp + #include int main(int argc, char *argv[]) { - // To genereate sepereate binaries for put, get, acquire and help #ifdef PUT int action = slsDetectorDefs::PUT_ACTION; @@ -37,6 +27,9 @@ int main(int argc, char *argv[]) { #ifdef HELP int action = slsDetectorDefs::HELP_ACTION; #endif +#ifdef INFER + int action = -1; +#endif // Check for --version in the arguments for (int i = 1; i < argc; ++i) { @@ -49,7 +42,6 @@ int main(int argc, char *argv[]) { sls::CmdParser parser; parser.Parse(argc, argv); - // If we called sls_detector_acquire, add the acquire command if (action == slsDetectorDefs::READOUT_ACTION || action == slsDetectorDefs::READOUT_ZMQ_ACTION) parser.setCommand("acquire"); @@ -57,7 +49,6 @@ int main(int argc, char *argv[]) { if (parser.isHelp()) action = slsDetectorDefs::HELP_ACTION; else { - // Free shared memory should work also without a detector // if we have an option for verify in the detector constructor // we could avoid this but clutter the code @@ -70,22 +61,30 @@ int main(int argc, char *argv[]) { } } - // prevent mem size check if (parser.command() == "config" && action == slsDetectorDefs::PUT_ACTION) { sls::freeSharedMemory(parser.multi_id()); } + sls::InferAction inferAction = sls::InferAction(); + try { - std::unique_ptr det{nullptr}; - if (action != slsDetectorDefs::HELP_ACTION) { - det = sls::make_unique(parser.multi_id()); + if (action == -1) { + action = inferAction.infer(parser); + std::string actionString = + (action == slsDetectorDefs::GET_ACTION) ? "GET" : "PUT"; + std::cout << "inferred action: " << actionString << std::endl; } - sls::CmdProxy proxy(det.get()); - proxy.Call(parser.command(), parser.arguments(), parser.detector_id(), - action, std::cout, parser.receiver_id()); - } catch (const sls::RuntimeError &e) { + + std::unique_ptr d{nullptr}; + if (action != slsDetectorDefs::HELP_ACTION) { + d = sls::make_unique(parser.multi_id()); + } + sls::Caller c(d.get()); + + c.call(parser.command(), parser.arguments(), parser.detector_id(), + action, std::cout, parser.receiver_id()); + } catch (sls::RuntimeError &e) { exit(EXIT_FAILURE); } - exit(EXIT_SUCCESS); } \ No newline at end of file diff --git a/slsDetectorSoftware/src/CmdParser.h b/slsDetectorSoftware/src/CmdParser.h index 47a1703ea..701b95a45 100644 --- a/slsDetectorSoftware/src/CmdParser.h +++ b/slsDetectorSoftware/src/CmdParser.h @@ -20,7 +20,6 @@ reason that the header file is not exposed. #include namespace sls { - class CmdParser { public: void Parse(int argc, const char *const argv[]); diff --git a/slsDetectorSoftware/src/CmdProxy.cpp b/slsDetectorSoftware/src/CmdProxy.cpp deleted file mode 100644 index 64688245c..000000000 --- a/slsDetectorSoftware/src/CmdProxy.cpp +++ /dev/null @@ -1,3439 +0,0 @@ - -// SPDX-License-Identifier: LGPL-3.0-or-other -// Copyright (C) 2021 Contributors to the SLS Detector Package -#include "CmdProxy.h" -#include "HelpDacs.h" -#include "sls/TimeHelper.h" -#include "sls/ToString.h" -#include "sls/bit_utils.h" -#include "sls/container_utils.h" -#include "sls/file_utils.h" -#include "sls/logger.h" -#include "sls/sls_detector_defs.h" - -#include -#include -#include -#include - -namespace sls { - -using defs = slsDetectorDefs; - -std::ostream &operator<<(std::ostream &os, - const std::vector &vec) { - if (!vec.empty()) { - auto it = vec.begin(); - os << *it++; - while (it != vec.end()) - os << ' ' << *it++; - } - return os; -} - -void CmdProxy::Call(const std::string &command, - const std::vector &arguments, int detector_id, - int action, std::ostream &os, int receiver_id) { - cmd = command; - args = arguments; - det_id = detector_id; - rx_id = receiver_id; - - std::string temp; - while (temp != cmd) { - temp = cmd; - ReplaceIfDepreciated(cmd); - } - - auto it = functions.find(cmd); - if (it != functions.end()) { - os << ((*this).*(it->second))(action); - } else { - throw RuntimeError(cmd + - " Unknown command, use list to list all commands"); - } -} - -bool CmdProxy::ReplaceIfDepreciated(std::string &command) { - auto d_it = depreciated_functions.find(command); - if (d_it != depreciated_functions.end()) { - LOG(logWARNING) - << command - << " is deprecated and will be removed. Please migrate to: " - << d_it->second; - // insert old command into arguments (for dacs) - if (d_it->second == "dac") { - args.insert(args.begin(), command); - } - command = d_it->second; - return true; - } - return false; -} - -std::vector CmdProxy::GetProxyCommands() { - std::vector commands; - for (const auto &it : functions) - commands.emplace_back(it.first); - std::sort(begin(commands), end(commands)); - return commands; -} - -std::map CmdProxy::GetDepreciatedCommands() { - return depreciated_functions; -} - -void CmdProxy::WrongNumberOfParameters(size_t expected) { - if (expected == 0) { - throw RuntimeError("Command " + cmd + - " expected no parameter/s but got " + - std::to_string(args.size()) + "\n"); - } - throw RuntimeError("Command " + cmd + " expected (or >=) " + - std::to_string(expected) + " parameter/s but got " + - std::to_string(args.size()) + "\n"); -} - -/************************************************ - * * - * COMMANDS * - * * - ************************************************/ - -std::string CmdProxy::ListCommands(int action) { - if (action == defs::HELP_ACTION) - return "list\n\tlists all available commands, list deprecated - " - "list deprecated commands\n"; - - if (args.empty()) { - auto commands = GetProxyCommands(); - std::cout << "These " << commands.size() << " commands are available\n"; - for (auto &c : commands) - std::cout << c << '\n'; - return ""; - } else if (args.size() == 1) { - if (args[0] == "deprecated") { - std::cout << "The following " << depreciated_functions.size() - << " commands are deprecated\n"; - const size_t field_width = 20; - for (const auto &it : depreciated_functions) { - std::cout << std::right << std::setw(field_width) << it.first - << " -> " << it.second << '\n'; - } - return ""; - } else if (args[0] == "migrated") { - std::cout << "The following " << functions.size() - << " commands have been migrated to the new API\n"; - for (const auto &it : functions) { - std::cout << it.first << '\n'; - } - return ""; - } else { - throw RuntimeError( - "Could not decode argument. Possible options: deprecated"); - } - } else { - WrongNumberOfParameters(1); - return ""; - } -} - -/* configuration */ - -std::string CmdProxy::Hostname(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "\n\tFrees shared memory and sets hostname (or IP address) of " - "all modules concatenated by +.\n\t Virtual servers can already " - "use the port in hostname separated by ':' and ports incremented " - "by 2 to accomodate the stop server as well." - << '\n'; - } else if (action == defs::GET_ACTION) { - if (!args.empty()) { - WrongNumberOfParameters(0); - } - auto t = det->getHostname(std::vector{det_id}); - os << OutString(t) << '\n'; - } else if (action == defs::PUT_ACTION) { - if (args.empty()) { - WrongNumberOfParameters(1); - } - if (det_id != -1) { - throw RuntimeError("Cannot execute this at module level"); - } - // only args[0], but many hostames concatenated with + - if (args[0].find('+') != std::string::npos) { - auto t = split(args[0], '+'); - det->setHostname(t); - os << ToString(t) << '\n'; - } - // either hostnames separated by space, or single hostname - else { - det->setHostname(args); - os << ToString(args) << '\n'; - } - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::VirtualServer(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[n_servers] [starting_port_number]\n\tConnecs to n virtual " - "server at local host starting at specific control port. Every " - "virtual server will have a stop port (control port + 1)" - << '\n'; - } else if (action == defs::GET_ACTION) { - throw RuntimeError("cannot get"); - } else if (action == defs::PUT_ACTION) { - if (args.size() != 2) { - WrongNumberOfParameters(2); - } - if (det_id != -1) { - throw RuntimeError("Cannot execute this at module level"); - } - det->setVirtualDetectorServers(StringTo(args[0]), - StringTo(args[1])); - os << ToString(args); - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -void CmdProxy::EmptyDataCallBack(detectorData *data, uint64_t frameIndex, - uint32_t subFrameIndex, void *this_pointer) { - LOG(logDEBUG) << "EmptyDataCallBack to start up zmq sockets"; -} - -std::string CmdProxy::Acquire(int action) { - std::ostringstream os; - if (action == defs::HELP_ACTION) { - os << cmd - << "\n\tAcquire the number of frames set up.\n\tBlocking command, " - "where control server is blocked and cannot accept other " - "commands until acquisition is done. \n\t- sets acquiring " - "flag\n\t- starts the receiver listener (if enabled)\n\t- starts " - "detector acquisition for number of frames set\n\t- monitors " - "detector status from running to idle\n\t- stops the receiver " - "listener (if enabled)\n\t- increments file index if file write " - "enabled\n\t- resets acquiring flag" - << '\n'; - } else { - if (det->empty()) { - throw RuntimeError("This shared memory has no detectors added."); - } - if (det_id >= 0) { - throw RuntimeError("Individual detectors not allowed for readout."); - } - - if (action == defs::READOUT_ZMQ_ACTION) { - det->registerDataCallback(&(EmptyDataCallBack), this); - } - det->acquire(); - - if (det->getUseReceiverFlag().squash(false)) { - os << "\nAcquired "; - os << det->getFramesCaught() << '\n'; - } - } - return os.str(); -} - -std::string CmdProxy::Free(int action) { - // This function is purely for help, actual functionality is in the caller - return "free\n\tFree detector shared memory\n"; -} - -std::string CmdProxy::FirmwareVersion(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "\n\tFimware version of detector in format [0xYYMMDD] or an " - "increasing 2 digit number for Eiger." - << '\n'; - } else if (action == defs::GET_ACTION) { - if (!args.empty()) { - WrongNumberOfParameters(0); - } - auto t = det->getFirmwareVersion(std::vector{det_id}); - if (det->getDetectorType().squash() == defs::EIGER) { - os << OutString(t) << '\n'; - } else { - os << OutStringHex(t) << '\n'; - } - } else if (action == defs::PUT_ACTION) { - throw RuntimeError("cannot put"); - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::Versions(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "\n\tPrint all versions and detector type" << '\n'; - } else if (action == defs::GET_ACTION) { - if (!args.empty()) { - WrongNumberOfParameters(0); - } - bool eiger = (det->getDetectorType().squash() == defs::EIGER); - auto t = det->getFirmwareVersion(std::vector{det_id}); - os << "\nType : " << OutString(det->getDetectorType()) - << "\nRelease : " << det->getPackageVersion() << std::hex - << "\nClient : " << det->getClientVersion(); - - if (eiger) { - os << "\nFirmware (Beb) : " - << OutString(det->getFirmwareVersion(std::vector{det_id})); - os << "\nFirmware (Febl) : " - << OutString(det->getFrontEndFirmwareVersion( - defs::FRONT_LEFT, std::vector{det_id})); - os << "\nFirmware (Febr) : " - << OutString(det->getFrontEndFirmwareVersion( - defs::FRONT_RIGHT, std::vector{det_id})); - } else { - os << "\nFirmware : " - << OutStringHex( - det->getFirmwareVersion(std::vector{det_id})); - } - - os << "\nServer : " - << OutString(det->getDetectorServerVersion(std::vector{det_id})) - << "\nKernel : " - << OutString(det->getKernelVersion({std::vector{det_id}})) - << "\nHardware : " - << OutString(det->getHardwareVersion(std::vector{det_id})); - - if (det->getUseReceiverFlag().squash(true)) { - os << "\nReceiver : " - << OutString(det->getReceiverVersion(std::vector{det_id})); - } - os << std::dec << '\n'; - } else if (action == defs::PUT_ACTION) { - throw RuntimeError("cannot put"); - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::PackageVersion(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "\n\tPackage version (git branch)." << '\n'; - } else if (action == defs::GET_ACTION) { - if (!args.empty()) { - WrongNumberOfParameters(0); - } - os << det->getPackageVersion() << '\n'; - } else if (action == defs::PUT_ACTION) { - throw RuntimeError("cannot put"); - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::ClientVersion(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "\n\tClient software version" << '\n'; - } else if (action == defs::GET_ACTION) { - if (!args.empty()) { - WrongNumberOfParameters(0); - } - os << det->getClientVersion() << '\n'; - } else if (action == defs::PUT_ACTION) { - throw RuntimeError("cannot put"); - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::DetectorSize(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[nx] [ny]\n\tDetector size, ie. Number of channels in x and y " - "dim. This is used to calculate module coordinates included in " - "UDP data. \n\tBy default, it adds module in y dimension for 2d " - "detectors and in x dimension for 1d detectors packet header." - << '\n'; - } else if (action == defs::GET_ACTION) { - if (!args.empty()) { - WrongNumberOfParameters(0); - } - auto t = det->getDetectorSize(); - os << t << '\n'; - } else if (action == defs::PUT_ACTION) { - if (args.size() != 2) { - WrongNumberOfParameters(2); - } - defs::xy t; - t.x = StringTo(args[0]); - t.y = StringTo(args[1]); - det->setDetectorSize(t); - os << ToString(args) << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::Threshold(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[eV] [(optinal settings)" - "\n\t[Eiger][Mythen3] Threshold in eV. It loads trim files from " - "settingspath."; - if (cmd == "thresholdnotb") { - os << "Trimbits are not loaded."; - } - os << "\n\nthreshold [eV1] [eV2] [eV3] [(optional settings)]" - "\n\t[Mythen3] Threshold in eV for each counter. It loads trim " - "files from settingspath. An energy of -1 will pick up values " - " from detector."; - if (cmd == "thresholdnotb") { - os << "Trimbits are not loaded."; - } - os << '\n'; - } else if (action == defs::GET_ACTION) { - if (cmd == "thresholdnotb") { - throw RuntimeError("cannot get"); - } - if (!args.empty()) { - WrongNumberOfParameters(0); - } - defs::detectorType type = det->getDetectorType().squash(); - if (type == defs::EIGER) { - auto t = det->getThresholdEnergy(std::vector{det_id}); - os << OutString(t) << '\n'; - } else if (type == defs::MYTHEN3) { - auto t = det->getAllThresholdEnergy(std::vector{det_id}); - os << OutString(t) << '\n'; - } else { - throw RuntimeError("Not implemented for this detector\n"); - } - } else if (action == defs::PUT_ACTION) { - defs::detectorType type = det->getDetectorType().squash(); - if (type == defs::EIGER && args.size() != 1 && args.size() != 2) { - WrongNumberOfParameters(1); - } - if (type == defs::MYTHEN3 && (args.size() < 1 || args.size() > 4)) { - WrongNumberOfParameters(1); - } - - bool trimbits = (cmd == "thresholdnotb") ? false : true; - std::array energy = {StringTo(args[0]), 0, 0}; - energy[1] = energy[0]; - energy[2] = energy[0]; - defs::detectorSettings sett = defs::STANDARD; - - // check if argument has settings or get it - if (args.size() == 2 || args.size() == 4) { - sett = StringTo(args[args.size() - 1]); - } else { - sett = det->getSettings(std::vector{det_id}) - .tsquash("Inconsistent settings between detectors"); - } - - // get other threshold values - if (args.size() > 2) { - energy[1] = StringTo(args[1]); - energy[2] = StringTo(args[2]); - } - switch (type) { - case defs::EIGER: - det->setThresholdEnergy(energy[0], sett, trimbits, - std::vector{det_id}); - break; - case defs::MYTHEN3: - det->setThresholdEnergy(energy, sett, trimbits, - std::vector{det_id}); - break; - default: - throw RuntimeError("Not implemented for this detector\n"); - } - os << ToString(args) << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::Trimbits(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[fname]\n\t[Eiger][Mythen3] Put will load the trimbit file to " - "detector. If no extension specified, serial number of each " - "module is attached. Get will save the trimbits from the " - "detector to file with serial number added to file name." - << '\n'; - } else if (action == defs::GET_ACTION) { - if (args.size() != 1) { - WrongNumberOfParameters(1); - } - det->saveTrimbits(args[0], std::vector{det_id}); - os << args << '\n'; - } else if (action == defs::PUT_ACTION) { - if (args.size() != 1) { - WrongNumberOfParameters(1); - } - det->loadTrimbits(args[0], std::vector{det_id}); - os << args << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::TrimEnergies(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[trim_ev1] [trim_Ev2 (optional)] [trim_ev3 (optional)] " - "...\n\t[Eiger][Mythen3] Number of trim energies and list of " - "trim " - "energies, where corresponding default trim files exist in " - "corresponding trim folders." - << '\n'; - } else if (action == defs::GET_ACTION) { - if (!args.empty()) { - WrongNumberOfParameters(0); - } - auto t = det->getTrimEnergies(std::vector{det_id}); - os << OutString(t) << '\n'; - } else if (action == defs::PUT_ACTION) { - std::vector t(args.size()); - if (!args.empty()) { - for (size_t i = 0; i < t.size(); ++i) { - t[i] = StringTo(args[i]); - } - } - det->setTrimEnergies(t, std::vector{det_id}); - os << ToString(args) << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::GapPixels(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[0, 1]\n\t[Eiger][Jungfrau][Moench] Include Gap pixels in " - "client data " - "call back in Detecor api. Will not be in detector streaming, " - "receiver file or streaming. Default is 0. " - << '\n'; - } else if (action == defs::GET_ACTION) { - if (det_id != -1) { - throw RuntimeError("Cannot get gap pixels at module level"); - } - if (!args.empty()) { - WrongNumberOfParameters(0); - } - auto t = det->getGapPixelsinCallback(); - os << t << '\n'; - } else if (action == defs::PUT_ACTION) { - if (det_id != -1) { - throw RuntimeError("Cannot add gap pixels at module level"); - } - if (args.size() != 1) { - WrongNumberOfParameters(1); - } - det->setGapPixelsinCallback(StringTo(args[0])); - os << args.front() << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::BadChannels(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[fname|none|0]\n\t[Gotthard2][Mythen3] Sets the bad channels " - "(from file of bad channel numbers) to be masked out. None or 0 " - "unsets all the badchannels.\n\t[Mythen3] Also does trimming" - << '\n'; - } else if (action == defs::GET_ACTION) { - if (args.size() != 1) { - WrongNumberOfParameters(1); - } - det->getBadChannels(args[0], std::vector{det_id}); - os << "successfully retrieved" << '\n'; - } else if (action == defs::PUT_ACTION) { - bool parse = false; - if (args.size() == 0) { - WrongNumberOfParameters(1); - } else if (args.size() == 1) { - if (args[0] == "none" || args[0] == "0") { - det->setBadChannels(std::vector{}, - std::vector{det_id}); - } else if (args[0].find(".") != std::string::npos) { - det->setBadChannels(args[0], std::vector{det_id}); - } else { - parse = true; - } - } - // parse multi args or single one with range or single value - if (parse || args.size() > 1) { - // get channels - auto list = getChannelsFromStringList(args); - det->setBadChannels(list, std::vector{det_id}); - } - os << "successfully loaded" << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -/* acquisition parameters */ - -std::string CmdProxy::Exptime(int action) { - int gateIndex = -1; - if (cmd == "exptime") { - gateIndex = -1; - } else if (cmd == "exptime1") { - gateIndex = 0; - } else if (cmd == "exptime2") { - gateIndex = 1; - } else if (cmd == "exptime3") { - gateIndex = 2; - } else { - throw RuntimeError("Unknown command, use list to list all commands"); - } - - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - if (cmd == "exptime") { - os << "[duration] [(optional unit) " - "ns|us|ms|s]\n\t[Eiger][Jungfrau][Moench][Gotthard][" - "Gotthard2][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." - << '\n'; - } else if (cmd == "exptime1") { - os << "[n_value]\n\t[Mythen3] Exposure time of gate signal 1 in " - "auto and trigger mode (internal gating)." - << '\n'; - } else if (cmd == "exptime2") { - os << "[n_value]\n\t[Mythen3] Exposure time of gate signal 2 in " - "auto and trigger mode (internal gating)." - << '\n'; - } else { - os << "[n_value]\n\t[Mythen3] Exposure time of gate signal 3 in " - "auto and trigger mode (internal gating)." - << '\n'; - } - } else if (action == defs::GET_ACTION) { - if (args.size() > 1) { - WrongNumberOfParameters(1); - } - // vector of exptimes - if (gateIndex == -1 && - det->getDetectorType().squash() == defs::MYTHEN3) { - auto t = det->getExptimeForAllGates(std::vector{det_id}); - if (args.empty()) { - os << OutString(t) << '\n'; - } else if (args.size() == 1) { - os << OutString(t, args[0]) << '\n'; - } - } - // single exptime - else { - Result t; - if (gateIndex == -1) { - t = det->getExptime(std::vector{det_id}); - } else { - t = det->getExptime(gateIndex, std::vector{det_id}); - } - if (args.empty()) { - os << OutString(t) << '\n'; - } else if (args.size() == 1) { - os << OutString(t, args[0]) << '\n'; - } - } - } else if (action == defs::PUT_ACTION) { - defs::detectorType type = det->getDetectorType().squash(); - if (args.size() == 1) { - std::string time_str(args[0]); - std::string unit = RemoveUnit(time_str); - auto t = StringTo(time_str, unit); - if (type == defs::MYTHEN3) { - det->setExptime(gateIndex, t, std::vector{det_id}); - } else { - det->setExptime(t, std::vector{det_id}); - } - } else if (args.size() == 2) { - auto t = StringTo(args[0], args[1]); - if (type == defs::MYTHEN3) { - det->setExptime(gateIndex, t, std::vector{det_id}); - } else { - det->setExptime(t, std::vector{det_id}); - } - } else { - WrongNumberOfParameters(2); - } - /* TODO: os << args << '\n'; (doesnt work for vectors in .h)*/ - if (args.size() > 1) { - os << args[0] << args[1] << '\n'; - } else { - os << args[0] << '\n'; - } - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::ReadoutSpeed(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "\n\t[0 or full_speed|1 or half_speed|2 or " - "quarter_speed]\n\t\t[Eiger][Jungfrau][Moench] Readout speed of " - "chip.\n\t\t[Eiger][Moench] Default speed is " - "full_speed.\n\t\t[Jungfrau] Default speed is half_speed. " - "full_speed option only available from v2.0 boards and is " - "recommended to set number of interfaces to 2. Also overwrites " - "adcphase to recommended default.\n\t [144|108]\n\t\t[Gotthard2] " - "Readout speed of chip in MHz. Default is 108." - << '\n'; - } else { - defs::detectorType type = det->getDetectorType().squash(); - if (type == defs::CHIPTESTBOARD) { - throw RuntimeError( - "ReadoutSpeed not implemented. Did you mean runclk?"); - } - if (action == defs::GET_ACTION) { - if (!args.empty()) { - WrongNumberOfParameters(0); - } - auto t = det->getReadoutSpeed(std::vector{det_id}); - os << OutString(t) << '\n'; - } else if (action == defs::PUT_ACTION) { - if (args.size() != 1) { - WrongNumberOfParameters(1); - } - defs::speedLevel t = StringTo(args[0]); - det->setReadoutSpeed(t, std::vector{det_id}); - os << ToString(t) << '\n'; // no args to convert 0,1,2 as well - } else { - throw RuntimeError("Unknown action"); - } - } - return os.str(); -} - -std::string CmdProxy::Adcphase(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[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" - << '\n'; - } else { - auto det_type = det->getDetectorType().squash(defs::GENERIC); - if (det_type == defs::EIGER || det_type == defs::MYTHEN3 || - det_type == defs::GOTTHARD2) { - throw RuntimeError("adcphase not implemented for this detector"); - } - if (action == defs::GET_ACTION) { - Result t; - if (args.empty()) { - t = det->getADCPhase(std::vector{det_id}); - os << OutString(t) << '\n'; - } else if (args.size() == 1) { - if (args[0] != "deg") { - throw RuntimeError("Unknown adcphase argument " + - args[0] + ". Did you mean deg? "); - } - t = det->getADCPhaseInDegrees(std::vector{det_id}); - os << OutString(t) << " deg\n"; - } else { - WrongNumberOfParameters(0); - } - } else if (action == defs::PUT_ACTION) { - if (args.size() == 1) { - det->setADCPhase(StringTo(args[0]), - std::vector{det_id}); - os << args.front() << '\n'; - } else if (args.size() == 2) { - if (args[1] != "deg") { - throw RuntimeError("Unknown adcphase 2nd argument " + - args[1] + ". Did you mean deg?"); - } - det->setADCPhaseInDegrees(StringTo(args[0]), - std::vector{det_id}); - os << args[0] << " " << args[1] << '\n'; - } else { - WrongNumberOfParameters(1); - } - } else { - throw RuntimeError("Unknown action"); - } - } - return os.str(); -} - -std::string CmdProxy::Dbitphase(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[n_value] [(optional)deg]\n\t[Ctb][Jungfrau] Phase shift of " - "clock to latch digital bits. Absolute phase shift. If deg used, " - "then shift in degrees. \n\t[Ctb]Changing dbitclk also resets " - "dbitphase and sets to previous values." - << '\n'; - } else { - auto det_type = det->getDetectorType().squash(defs::GENERIC); - if (det_type == defs::EIGER || det_type == defs::MYTHEN3 || - det_type == defs::GOTTHARD2 || det_type == defs::MOENCH) { - throw RuntimeError("dbitphase not implemented for this detector"); - } - if (action == defs::GET_ACTION) { - Result t; - if (args.empty()) { - t = det->getDBITPhase(std::vector{det_id}); - os << OutString(t) << '\n'; - } else if (args.size() == 1) { - if (args[0] != "deg") { - throw RuntimeError("Unknown dbitphase argument " + args[0] + - ". Did you mean deg? "); - } - t = det->getDBITPhaseInDegrees(std::vector{det_id}); - os << OutString(t) << " deg\n"; - } else { - WrongNumberOfParameters(0); - } - } else if (action == defs::PUT_ACTION) { - if (args.size() == 1) { - det->setDBITPhase(StringTo(args[0]), - std::vector{det_id}); - os << args.front() << '\n'; - } else if (args.size() == 2) { - if (args[1] != "deg") { - throw RuntimeError("Unknown dbitphase 2nd argument " + - args[1] + ". Did you mean deg? "); - } - det->setDBITPhaseInDegrees(StringTo(args[0]), - std::vector{det_id}); - os << args[0] << " " << args[1] << '\n'; - } else { - WrongNumberOfParameters(1); - } - } else { - throw RuntimeError("Unknown action"); - } - } - return os.str(); -} - -std::string CmdProxy::ClockFrequency(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[n_clock (0-5)] [freq_in_Hz]\n\t[Gotthard2][Mythen3] Frequency " - "of clock n_clock in Hz. Use clkdiv to set frequency." - << '\n'; - } else { - defs::detectorType type = det->getDetectorType().squash(defs::GENERIC); - if (type != defs::GOTTHARD2 && type != defs::MYTHEN3) { - throw RuntimeError("clkfreq not implemented for this detector."); - } - if (action == defs::GET_ACTION) { - if (args.size() != 1) { - WrongNumberOfParameters(1); - } - auto t = det->getClockFrequency(StringTo(args[0]), - std::vector{det_id}); - os << OutString(t) << '\n'; - } else if (action == defs::PUT_ACTION) { - throw RuntimeError("cannot put"); - } else { - throw RuntimeError("Unknown action"); - } - } - return os.str(); -} - -std::string CmdProxy::ClockPhase(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[n_clock (0-5)] [phase] [deg " - "(optional)]\n\t[Gotthard2][Mythen3] Phase of clock n_clock. If " - "deg, then phase shift in degrees, else absolute phase shift " - "values." - << '\n'; - } else { - defs::detectorType type = det->getDetectorType().squash(defs::GENERIC); - if (type != defs::GOTTHARD2 && type != defs::MYTHEN3) { - throw RuntimeError("clkphase not implemented for this detector."); - } - if (action == defs::GET_ACTION) { - if (args.size() == 1) { - auto t = det->getClockPhase(StringTo(args[0]), - std::vector{det_id}); - os << OutString(t) << '\n'; - } else if (args.size() == 2) { - if (args[1] != "deg") { - throw RuntimeError("Cannot scan argument" + args[1] + - ". Did you mean deg?"); - } - auto t = det->getClockPhaseinDegrees(StringTo(args[0]), - {det_id}); - os << OutString(t) << " deg\n"; - } else { - WrongNumberOfParameters(1); - } - } else if (action == defs::PUT_ACTION) { - if (args.size() == 2) { - det->setClockPhase(StringTo(args[0]), - StringTo(args[1]), - std::vector{det_id}); - os << args[1] << '\n'; - } else if (args.size() == 3) { - if (args[2] != "deg") { - throw RuntimeError("Cannot scan argument" + args[2] + - ". Did you mean deg?"); - } - det->setClockPhaseinDegrees(StringTo(args[0]), - StringTo(args[1]), - std::vector{det_id}); - os << args[1] << " " << args[2] << '\n'; - } else { - WrongNumberOfParameters(1); - } - } else { - throw RuntimeError("Unknown action"); - } - } - return os.str(); -} - -std::string CmdProxy::MaxClockPhaseShift(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[n_clock (0-5)]\n\t[Gotthard2][Mythen3] Absolute Maximum Phase " - "shift of clock n_clock." - << '\n'; - } else { - defs::detectorType type = det->getDetectorType().squash(defs::GENERIC); - if (type != defs::GOTTHARD2 && type != defs::MYTHEN3) { - throw RuntimeError( - "maxclkphaseshift not implemented for this detector."); - } - if (action == defs::GET_ACTION) { - if (args.size() != 1) { - WrongNumberOfParameters(1); - } - auto t = det->getMaxClockPhaseShift(StringTo(args[0]), - std::vector{det_id}); - os << OutString(t) << '\n'; - } else if (action == defs::PUT_ACTION) { - throw RuntimeError("Cannot put"); - } else { - throw RuntimeError("Unknown action"); - } - } - return os.str(); -} - -std::string CmdProxy::ClockDivider(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[n_clock (0-5)] [n_divider]\n\t[Gotthard2][Mythen3] Clock " - "Divider of clock n_clock. Must be greater than 1." - << '\n'; - } else { - defs::detectorType type = det->getDetectorType().squash(defs::GENERIC); - if (type != defs::GOTTHARD2 && type != defs::MYTHEN3) { - throw RuntimeError("clkdiv not implemented for this detector."); - } - if (action == defs::GET_ACTION) { - if (args.size() != 1) { - WrongNumberOfParameters(1); - } - auto t = det->getClockDivider(StringTo(args[0]), - std::vector{det_id}); - os << OutString(t) << '\n'; - } else if (action == defs::PUT_ACTION) { - if (args.size() != 2) { - WrongNumberOfParameters(2); - } - det->setClockDivider(StringTo(args[0]), StringTo(args[1]), - {det_id}); - os << args[1] << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - } - return os.str(); -} - -std::string CmdProxy::ExternalSignal(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[n_signal] [signal_type] 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." - << '\n'; - } else if (action == defs::GET_ACTION) { - if (args.size() != 1) { - WrongNumberOfParameters(1); - } - auto t = det->getExternalSignalFlags(StringTo(args[0]), - std::vector{det_id}); - os << args[0] << " " << OutString(t) << '\n'; - } else if (action == defs::PUT_ACTION) { - if (args.size() != 2) { - WrongNumberOfParameters(2); - } - det->setExternalSignalFlags( - StringTo(args[0]), - StringTo(args[1]), - std::vector{det_id}); - os << args[0] << " " << args[1] << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::CurrentSource(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "\n\t[0|1]\n\t\t[Gotthard2] Enable or disable current source. " - "Default " - "is disabled.\n\t[0|1] [fix|nofix] [select source] [(only for " - "chipv1.1)normal|low]\n\t\t[Jungfrau] Disable or enable current " - "source with some parameters. The select source is 0-63 for " - "chipv1.0 and a 64 bit mask for chipv1.1. To disable, one needs " - "only one argument '0'." - << '\n'; - } else if (action == defs::GET_ACTION) { - if (args.size() != 0) { - WrongNumberOfParameters(0); - } - auto t = det->getCurrentSource(std::vector{det_id}); - os << OutString(t) << '\n'; - } else if (action == defs::PUT_ACTION) { - if (args.size() == 1) { - det->setCurrentSource( - defs::currentSrcParameters(StringTo(args[0]))); - } else if (args.size() >= 3) { - // scan fix - bool fix = false; - if (args[1] == "fix") { - fix = true; - } else if (args[1] == "nofix") { - fix = false; - } else { - throw RuntimeError("Invalid argument: " + args[1] + - ". Did you mean fix or nofix?"); - } - if (args.size() == 3) { - det->setCurrentSource(defs::currentSrcParameters( - fix, StringTo(args[2]))); - } else if (args.size() == 4) { - bool normalCurrent = false; - if (args[3] == "normal") { - normalCurrent = true; - } else if (args[3] == "low") { - normalCurrent = false; - } else { - throw RuntimeError("Invalid argument: " + args[3] + - ". Did you mean normal or low?"); - } - det->setCurrentSource(defs::currentSrcParameters( - fix, StringTo(args[2]), normalCurrent)); - } else { - throw RuntimeError( - "Invalid number of parareters for this command."); - } - } else { - throw RuntimeError( - "Invalid number of parareters for this command."); - } - os << ToString(args) << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -/** temperature */ -std::string CmdProxy::TemperatureValues(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "\n\tGets the values for every temperature for this detector." - << '\n'; - } else if (action == defs::GET_ACTION) { - if (args.size() != 0) { - WrongNumberOfParameters(0); - } - auto t = det->getTemperatureList(); - os << '['; - if (t.size() > 0) { - auto it = t.cbegin(); - os << ToString(*it) << ' '; - os << OutString( - det->getTemperature(*it++, std::vector{det_id})) - << " °C"; - while (it != t.cend()) { - os << ", " << ToString(*it) << ' '; - os << OutString( - det->getTemperature(*it++, std::vector{det_id})) - << " °C"; - } - } - os << "]\n"; - } else if (action == defs::PUT_ACTION) { - throw RuntimeError("Cannot put"); - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -/* list */ - -/* dacs */ -std::string CmdProxy::Dac(int action) { - std::ostringstream os; - os << cmd << ' '; - - if (action == defs::HELP_ACTION) { - if (args.size() == 0) { - os << GetHelpDac(std::to_string(0)) << '\n'; - } else { - os << args[0] << ' ' << GetHelpDac(args[0]) << '\n'; - } - return os.str(); - } - - auto type = det->getDetectorType().squash(); - - // dac indices only for ctb - if (args.size() > 0 && action != defs::HELP_ACTION) { - if (is_int(args[0]) && type != defs::CHIPTESTBOARD) { - throw RuntimeError( - "Dac indices can only be used for chip test board. Use daclist " - "to get list of dac names for current detector."); - } - } - - if (action == defs::GET_ACTION) { - if (args.empty()) - WrongNumberOfParameters(1); // This prints slightly wrong - - defs::dacIndex dacIndex{}; - // TODO! Remove if - if (type == defs::CHIPTESTBOARD && !is_int(args[0])) { - dacIndex = det->getDacIndex(args[0]); - } else { - dacIndex = StringTo(args[0]); - } - - bool mV = false; - - if (args.size() == 2) { - if ((args[1] != "mv") && (args[1] != "mV")) { - throw RuntimeError("Unknown argument " + args[1] + - ". Did you mean mV?"); - } - mV = true; - } else if (args.size() > 2) { - WrongNumberOfParameters(1); - } - auto t = det->getDAC(dacIndex, mV, std::vector{det_id}); - os << args[0] << ' ' << OutString(t) << (mV ? " mV\n" : "\n"); - } else if (action == defs::PUT_ACTION) { - if (args.empty()) - WrongNumberOfParameters(1); // This prints slightly wrong - - defs::dacIndex dacIndex{}; - if (type == defs::CHIPTESTBOARD && !is_int(args[0])) - dacIndex = det->getDacIndex(args[0]); - else - dacIndex = StringTo(args[0]); - bool mV = false; - if (args.size() == 3) { - if ((args[2] != "mv") && (args[2] != "mV")) { - throw RuntimeError("Unknown argument " + args[2] + - ". Did you mean mV?"); - } - mV = true; - } else if (args.size() > 3 || args.size() < 2) { - WrongNumberOfParameters(2); - } - det->setDAC(dacIndex, StringTo(args[1]), mV, - std::vector{det_id}); - os << args[0] << ' ' << args[1] << (mV ? " mV\n" : "\n"); - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::DacValues(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[(optional unit) mV] \n\tGets the values for every " - "dac for this detector." - << '\n'; - } else if (action == defs::GET_ACTION) { - bool mv = false; - if (args.size() == 1) { - if ((args[0] != "mv") && (args[0] != "mV")) { - throw RuntimeError("Unknown argument " + args[0] + - ". Did you mean mV?"); - } - mv = true; - } else if (args.size() > 1) { - WrongNumberOfParameters(1); - } - auto t = det->getDacList(); - auto names = det->getDacNames(); - auto name_it = names.begin(); - os << '['; - auto it = t.cbegin(); - os << ToString(*name_it++) << ' '; - os << OutString(det->getDAC(*it++, mv, std::vector{det_id})) - << (!args.empty() ? " mV" : ""); - while (it != t.cend()) { - os << ", " << ToString(*name_it++) << ' '; - os << OutString(det->getDAC(*it++, mv, std::vector{det_id})) - << (!args.empty() ? " mV" : ""); - } - os << "]\n"; - } else if (action == defs::PUT_ACTION) { - throw RuntimeError("Cannot put"); - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::ResetDacs(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[(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." - << '\n'; - } else if (action == defs::GET_ACTION) { - throw RuntimeError("Cannot get"); - } else if (action == defs::PUT_ACTION) { - bool hardReset = false; - if (args.size() == 1) { - if (args[0] != "hard") { - throw RuntimeError("Unknown argument " + args[0] + - ". Did you mean hard?"); - } - hardReset = true; - } else if (args.size() > 1) { - WrongNumberOfParameters(1); - } - det->resetToDefaultDacs(hardReset, std::vector{det_id}); - os << "successful\n"; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::DefaultDac(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[dac name][value][(optional)setting]\n\tSets the default for " - "that dac to this value.\n\t[Jungfrau][Moench][Mythen3] When " - "settings is " - "provided, it sets the default value only for that setting" - << '\n'; - } else if (action == defs::GET_ACTION) { - if (args.size() < 1) { - WrongNumberOfParameters(1); - } - // optional settings - if (args.size() == 2) { - auto t = det->getDefaultDac( - StringTo(args[0]), - StringTo(args[1]), - std::vector{det_id}); - os << args[0] << ' ' << args[1] << ' ' << OutString(t) << '\n'; - } else { - auto t = det->getDefaultDac(StringTo(args[0]), - std::vector{det_id}); - os << args[0] << ' ' << OutString(t) << '\n'; - } - } else if (action == defs::PUT_ACTION) { - if (args.size() < 2) { - WrongNumberOfParameters(2); - } - // optional settings - if (args.size() == 3) { - det->setDefaultDac( - StringTo(args[0]), StringTo(args[1]), - StringTo(args[2]), - std::vector{det_id}); - os << args[0] << ' ' << args[2] << ' ' << args[1] << '\n'; - } else { - det->setDefaultDac(StringTo(args[0]), - StringTo(args[1])); - os << args[0] << ' ' << args[1] << '\n'; - } - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} -/* acquisition */ - -std::string CmdProxy::ReceiverStatus(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "running, idle, transmitting]\n\tReceiver listener status." - << '\n'; - } else if (action == defs::GET_ACTION) { - if (!args.empty()) { - WrongNumberOfParameters(0); - } - auto t = det->getReceiverStatus(std::vector{det_id}); - os << OutString(t) << '\n'; - } else if (action == defs::PUT_ACTION) { - throw RuntimeError( - "Cannot put. Did you mean to use command 'rx_start' or 'rx_stop'?"); - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::DetectorStatus(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[running, error, transmitting, finished, waiting, " - "idle]\n\tDetector status. Goes to stop server. " - << '\n'; - } else if (action == defs::GET_ACTION) { - if (!args.empty()) { - WrongNumberOfParameters(0); - } - auto t = det->getDetectorStatus(std::vector{det_id}); - os << OutString(t) << '\n'; - } else if (action == defs::PUT_ACTION) { - throw RuntimeError( - "Cannot put. Did you mean to use command 'start' or 'stop'?"); - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::Scan(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[dac_name|0|trimbits] [start_val] [stop_val] " - "[step_size] [dac settling time ns|us|ms|s]\n\tEnables/ disables " - "scans for dac and trimbits \n\tEnabling scan sets number of " - "frames to number of steps in receiver. \n\tTo cancel scan " - "configuration, set dac to '0', which also sets number of frames " - "to 1. \n\t[Eiger][Mythen3] Use trimbits as dac name for a " - "trimbit scan." - << '\n'; - } else if (action == defs::GET_ACTION) { - if (args.size() != 0) { - WrongNumberOfParameters(0); - } - auto t = det->getScan(); - os << OutString(t) << '\n'; - } else if (action == defs::PUT_ACTION) { - if (det_id != -1) { - throw RuntimeError("Cannot configure scan at module level"); - } - // disable - if (args.size() == 1) { - if (StringTo(args[0]) != 0) { - throw RuntimeError("Did you mean '0' to disable?"); - } - det->setScan(defs::scanParameters()); - } - // enable without settling time - else if (args.size() == 4) { - det->setScan(defs::scanParameters( - StringTo(args[0]), StringTo(args[1]), - StringTo(args[2]), StringTo(args[3]))); - } - // enable with all parameters - else if (args.size() == 5) { - std::string time_str(args[4]); - std::string unit = RemoveUnit(time_str); - auto t = StringTo(time_str, unit); - det->setScan(defs::scanParameters( - StringTo(args[0]), StringTo(args[1]), - StringTo(args[2]), StringTo(args[3]), t)); - } else { - WrongNumberOfParameters(4); - } - os << ToString(args) << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::Trigger(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - if (cmd == "trigger") { - os << "\n\t[Eiger][Mythen3][Jungfrau][Moench] Sends software " - "trigger " - "signal to detector"; - } else if (cmd == "blockingtrigger") { - os << "\n\t[Eiger][Jungfrau][Moench] Sends software trigger signal " - "to " - "detector and blocks till the frames are sent out for that " - "trigger."; - } else { - throw RuntimeError("unknown command " + cmd); - } - os << '\n'; - } else if (action == slsDetectorDefs::GET_ACTION) { - throw RuntimeError("Cannot get"); - } else if (action == slsDetectorDefs::PUT_ACTION) { - if (det_id != -1) { - throw RuntimeError("Cannot execute this at module level"); - } - if (!args.empty()) { - WrongNumberOfParameters(0); - } - bool block = false; - if (cmd == "blockingtrigger") { - block = true; - } - det->sendSoftwareTrigger(block); - os << "successful\n"; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -/* Network Configuration (Detector<->Receiver) */ - -IpAddr CmdProxy::getDstIpFromAuto() { - std::string rxHostname = - det->getRxHostname(std::vector{det_id}).squash("none"); - // Hostname could be ip try to decode otherwise look up the hostname - auto val = IpAddr{rxHostname}; - if (val == 0) { - val = HostnameToIp(rxHostname.c_str()); - } - return val; -} - -IpAddr CmdProxy::getSrcIpFromAuto() { - if (det->getDetectorType().squash() == defs::GOTTHARD) { - throw RuntimeError( - "Cannot use 'auto' for udp_srcip for GotthardI Detector."); - } - std::string hostname = - det->getHostname(std::vector{det_id}).squash("none"); - // Hostname could be ip try to decode otherwise look up the hostname - auto val = IpAddr{hostname}; - if (val == 0) { - val = HostnameToIp(hostname.c_str()); - } - return val; -} - -UdpDestination CmdProxy::getUdpEntry() { - UdpDestination udpDestination{}; - udpDestination.entry = rx_id; - - for (auto it : args) { - size_t pos = it.find('='); - std::string key = it.substr(0, pos); - std::string value = it.substr(pos + 1); - if (key == "ip") { - if (value == "auto") { - auto val = getDstIpFromAuto(); - LOG(logINFO) << "Setting udp_dstip of detector " << det_id - << " to " << val; - udpDestination.ip = val; - } else { - udpDestination.ip = IpAddr(value); - } - } else if (key == "ip2") { - if (value == "auto") { - auto val = getDstIpFromAuto(); - LOG(logINFO) << "Setting udp_dstip2 of detector " << det_id - << " to " << val; - udpDestination.ip2 = val; - } else { - udpDestination.ip2 = IpAddr(value); - } - } else if (key == "mac") { - udpDestination.mac = MacAddr(value); - } else if (key == "mac2") { - udpDestination.mac2 = MacAddr(value); - } else if (key == "port") { - udpDestination.port = StringTo(value); - } else if (key == "port2") { - udpDestination.port2 = StringTo(value); - } - } - return udpDestination; -} - -std::string CmdProxy::UDPDestinationList(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[ip=x.x.x.x] [(optional)ip2=x.x.x.x] " - "\n\t[mac=xx:xx:xx:xx:xx:xx] " - "[(optional)mac2=xx:xx:xx:xx:xx:xx]\n\t[port=value] " - "[(optional)port2=value\n\tThe order of ip, mac and port does " - "not matter. entry_value can be >0 only for " - "[Eiger][Jungfrau][Moench][Mythen3][Gotthard2] where round robin " - "is " - "implemented. If 'auto' used, then ip is set to ip of " - "rx_hostname." - << '\n'; - } else if (action == defs::GET_ACTION) { - if (!args.empty()) { - WrongNumberOfParameters(0); - } - if (det_id == -1) { - throw RuntimeError("udp_dstlist must be at module level."); - } - if (rx_id < 0 || rx_id >= MAX_UDP_DESTINATION) { - throw RuntimeError(std::string("Invalid receiver index ") + - std::to_string(rx_id) + - std::string(" to set round robin entry.")); - } - auto t = det->getDestinationUDPList(rx_id, std::vector{det_id}); - os << OutString(t) << '\n'; - } else if (action == defs::PUT_ACTION) { - if (args.empty()) { - WrongNumberOfParameters(1); - } - if (det_id == -1) { - throw RuntimeError("udp_dstlist must be at module level."); - } - if (rx_id < 0 || rx_id >= MAX_UDP_DESTINATION) { - throw RuntimeError( - "Invalid receiver index to set round robin entry."); - } - auto t = getUdpEntry(); - det->setDestinationUDPList(t, det_id); - os << ToString(args) << std::endl; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::UDPSourceIP(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[x.x.x.x] or auto\n\tIp address of the detector (source) udp " - "interface. Must be same subnet as destination udp " - "ip.\n\t[Eiger] Set only for 10G. For 1G, detector will replace " - "with its own DHCP IP address. \n\tOne can also set this to " - "'auto' for 1 GbE data and virtual detectors. It will set to IP " - "of detector. Not available for GotthardI" - << '\n'; - } else if (action == defs::GET_ACTION) { - auto t = det->getSourceUDPIP(std::vector{det_id}); - if (!args.empty()) { - WrongNumberOfParameters(0); - } - os << OutString(t) << '\n'; - } else if (action == defs::PUT_ACTION) { - if (args.size() != 1) { - WrongNumberOfParameters(1); - } - IpAddr val; - if (args[0] == "auto") { - val = getSrcIpFromAuto(); - LOG(logINFO) << "Setting udp_srcip of detector " << det_id << " to " - << val; - } else { - val = IpAddr(args[0]); - } - det->setSourceUDPIP(val, std::vector{det_id}); - os << val << '\n'; - - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::UDPSourceIP2(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[x.x.x.x] or auto\n\t[Jungfrau][Moench][Gotthard2] Ip address " - "of the " - "detector (source) udp interface 2. Must be same subnet as " - "destination udp ip2.\n\t [Jungfrau][Moench] top half or inner " - "interface\n\t [Gotthard2] veto debugging. \n\tOne can also set " - "this to 'auto' for 1 GbE data and virtual detectors. It will " - "set to IP of detector." - << '\n'; - } else if (action == defs::GET_ACTION) { - auto t = det->getSourceUDPIP2(std::vector{det_id}); - if (!args.empty()) { - WrongNumberOfParameters(0); - } - os << OutString(t) << '\n'; - } else if (action == defs::PUT_ACTION) { - if (args.size() != 1) { - WrongNumberOfParameters(1); - } - IpAddr val; - if (args[0] == "auto") { - val = getSrcIpFromAuto(); - LOG(logINFO) << "Setting udp_srcip2 of detector " << det_id - << " to " << val; - } else { - val = IpAddr(args[0]); - } - det->setSourceUDPIP2(val, std::vector{det_id}); - os << val << '\n'; - - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::UDPDestinationIP(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[x.x.x.x] or auto\n\tIp address of the receiver (destination) " - "udp interface. If 'auto' used, then ip is set to ip of " - "rx_hostname." - << '\n'; - } else if (action == defs::GET_ACTION) { - auto t = det->getDestinationUDPIP(std::vector{det_id}); - if (!args.empty()) { - WrongNumberOfParameters(0); - } - os << OutString(t) << '\n'; - } else if (action == defs::PUT_ACTION) { - if (args.size() != 1) { - WrongNumberOfParameters(1); - } - if (args[0] == "auto") { - auto val = getDstIpFromAuto(); - LOG(logINFO) << "Setting udp_dstip of detector " << det_id << " to " - << val; - det->setDestinationUDPIP(val, std::vector{det_id}); - os << val << '\n'; - } else { - auto val = IpAddr(args[0]); - det->setDestinationUDPIP(val, std::vector{det_id}); - os << args.front() << '\n'; - } - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::UDPDestinationIP2(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[x.x.x.x] or auto\n\t[Jungfrau][Moench][Gotthard2] Ip address " - "of the " - "receiver (destination) udp interface 2. If 'auto' used, then ip " - "is set to ip of rx_hostname.\n\t[Jungfrau][Moench] bottom half " - "\n\t[Gotthard2] veto debugging. " - << '\n'; - } else if (action == defs::GET_ACTION) { - auto t = det->getDestinationUDPIP2(std::vector{det_id}); - if (!args.empty()) { - WrongNumberOfParameters(0); - } - os << OutString(t) << '\n'; - } else if (action == defs::PUT_ACTION) { - if (args.size() != 1) { - WrongNumberOfParameters(1); - } - if (args[0] == "auto") { - auto val = getDstIpFromAuto(); - LOG(logINFO) << "Setting udp_dstip2 of detector " << det_id - << " to " << val; - det->setDestinationUDPIP2(val, std::vector{det_id}); - os << val << '\n'; - } else { - auto val = IpAddr(args[0]); - det->setDestinationUDPIP2(val, std::vector{det_id}); - os << args.front() << '\n'; - } - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::TransmissionDelay(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[n_delay]\n\t[Eiger][Jungfrau][Moench][Mythen3] Set " - "transmission delay " - "for all modules in the detector using the step size " - "provided.Sets up \n\t\t[Eiger] txdelay_left to (2 * mod_index * " - "n_delay), \n\t\t[Eiger] txdelay_right to ((2 * mod_index + 1) * " - "n_delay) and \n\t\t[Eiger] txdelay_frame to (2 *num_modules * " - "n_delay) \n\t\t[Jungfrau][Moench][Mythen3] txdelay_frame to " - "(num_modules * n_delay) \nfor every module." - << '\n'; - } else if (action == defs::GET_ACTION) { - if (det_id != -1) { - throw RuntimeError("Cannot execute this at module level"); - } - if (args.size() != 0) { - WrongNumberOfParameters(0); - } - auto t = det->getTransmissionDelay(); - os << OutString(t) << '\n'; - } else if (action == defs::PUT_ACTION) { - if (det_id != -1) { - throw RuntimeError("Cannot execute this at module level"); - } - if (args.size() != 1) { - WrongNumberOfParameters(1); - } - det->setTransmissionDelay(StringTo(args[0])); - os << args.front() << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -/* Receiver Config */ -std::string CmdProxy::ReceiverHostname(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[hostname or ip address]\n\t" - "[hostname or ip address]:[tcp port]\n\t" - "[hostname1]:[tcp_port1]+[hostname2]:[tcp_port2]+\n\t" - "Receiver hostname or IP. If port included, then the receiver " - "tcp port.\n\t" - "Used for TCP control communication between client and receiver " - "to configure receiver. Also updates receiver with detector " - "parameters. Also resets any prior receiver property (not on " - "detector). " - << '\n'; - } else if (action == defs::GET_ACTION) { - if (!args.empty()) { - WrongNumberOfParameters(0); - } - auto t = det->getRxHostname(std::vector{det_id}); - os << OutString(t) << '\n'; - } else if (action == defs::PUT_ACTION) { - if (args.size() < 1) { - WrongNumberOfParameters(1); - } - // multiple arguments - if (args.size() > 1) { - // multiple in mulitple - if (args[0].find('+') != std::string::npos) { - throw RuntimeError( - "Cannot add multiple receivers at module level"); - } - if (det_id != -1) { - throw RuntimeError( - "Cannot add multiple receivers at module level"); - } - det->setRxHostname(args); - os << ToString(args) << '\n'; - } - // single argument - else { - // multiple receivers concatenated with + - if (args[0].find('+') != std::string::npos) { - if (det_id != -1) { - throw RuntimeError( - "Cannot add multiple receivers at module level"); - } - auto t = split(args[0], '+'); - det->setRxHostname(t); - os << ToString(t) << '\n'; - } - // single receiver - else { - det->setRxHostname(args[0], std::vector{det_id}); - os << ToString(args) << '\n'; - } - } - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::Rx_ROI(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[xmin] [xmax] [ymin] [ymax]\n\tRegion of interest in " - "receiver.\n\tOnly allowed at multi module level and without gap " - "pixels." - << '\n'; - } else if (action == defs::GET_ACTION) { - if (!args.empty()) { - WrongNumberOfParameters(0); - } - if (det_id == -1) { - auto t = det->getRxROI(); - os << t << '\n'; - } else { - auto t = det->getIndividualRxROIs(std::vector{det_id}); - os << t << '\n'; - } - } else if (action == defs::PUT_ACTION) { - defs::ROI t; - // 2 or 4 arguments - if (args.size() != 2 && args.size() != 4) { - WrongNumberOfParameters(2); - } - if (args.size() == 2 || args.size() == 4) { - t.xmin = StringTo(args[0]); - t.xmax = StringTo(args[1]); - } - if (args.size() == 4) { - t.ymin = StringTo(args[2]); - t.ymax = StringTo(args[3]); - } - // only multi level - if (det_id != -1) { - throw RuntimeError("Cannot execute receiver ROI at module level"); - } - det->setRxROI(t); - os << t << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -/* File */ - -/* ZMQ Streaming Parameters (Receiver<->Client) */ - -std::string CmdProxy::ZMQHWM(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[n_limit] \n\tClient's zmq receive high water mark. Default is " - "the zmq library's default (1000), can also be set here using " - "-1. \n\tThis is a high number and can be set to 2 for gui " - "purposes. \n\tOne must also set the receiver's send high water " - "mark to similar value. Final effect is sum of them.\n\t Setting " - "it via command line is useful only before zmq enabled (before " - "opening gui)." - << '\n'; - } else if (action == defs::GET_ACTION) { - if (!args.empty()) { - WrongNumberOfParameters(0); - } - auto t = det->getClientZmqHwm(); - os << t << '\n'; - } else if (action == defs::PUT_ACTION) { - if (args.size() != 1) { - WrongNumberOfParameters(1); - } - int t = StringTo(args[0]); - det->setClientZmqHwm(t); - os << det->getClientZmqHwm() << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -/* Eiger Specific */ - -std::string CmdProxy::RateCorrection(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[n_rate (in ns)]\n\t[Eiger] Dead time correction constant in " - "ns. -1 will set to default tau of settings from trimbit file. 0 " - "will unset rate correction." - << '\n'; - } else if (action == defs::GET_ACTION) { - if (!args.empty()) { - WrongNumberOfParameters(0); - } - auto t = det->getRateCorrection(std::vector{det_id}); - os << OutString(t) << '\n'; - } else if (action == defs::PUT_ACTION) { - if (args.size() != 1) { - WrongNumberOfParameters(1); - } - int tau = StringTo(args[0]); - if (tau == -1) { - det->setDefaultRateCorrection(std::vector{det_id}); - auto t = det->getRateCorrection(std::vector{det_id}); - os << OutString(t) << '\n'; - } else { - auto t = StringTo(args[0], "ns"); - det->setRateCorrection(t, std::vector{det_id}); - os << args.front() << "ns\n"; - } - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::PulsePixel(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[n_times] [x] [y]\n\t[Eiger] Pulse pixel n number of times at " - "coordinates (x, y). Advanced User!" - << '\n'; - } else if (action == defs::GET_ACTION) { - throw RuntimeError("cannot get"); - } else if (action == defs::PUT_ACTION) { - if (args.size() != 3) { - WrongNumberOfParameters(3); - } - int n = StringTo(args[0]); - defs::xy c; - c.x = StringTo(args[1]); - c.y = StringTo(args[2]); - det->pulsePixel(n, c, std::vector{det_id}); - os << ToString(args) << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::PulsePixelAndMove(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[n_times] [x] [y]\n\t[Eiger] Pulse pixel n number of times and " - "moves relatively by (x, y). Advanced User!" - << '\n'; - } else if (action == defs::GET_ACTION) { - throw RuntimeError("cannot get"); - } else if (action == defs::PUT_ACTION) { - if (args.size() != 3) { - WrongNumberOfParameters(3); - } - int n = StringTo(args[0]); - defs::xy c; - c.x = StringTo(args[1]); - c.y = StringTo(args[2]); - det->pulsePixelNMove(n, c, std::vector{det_id}); - os << ToString(args) << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::PulseChip(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[n_times] \n\t[Eiger] Pulse chip n times. If n is -1, resets to " - "normal mode (reset chip completely at start of acquisition, " - "where partialreset = 0). Advanced User!" - << '\n'; - } else if (action == defs::GET_ACTION) { - throw RuntimeError("cannot get"); - } else if (action == defs::PUT_ACTION) { - if (args.size() != 1) { - WrongNumberOfParameters(1); - } - det->pulseChip(StringTo(args[0]), std::vector{det_id}); - os << args.front() << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::Quad(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[0, 1]\n\t[Eiger] Sets detector size to a quad. 0 (disabled) is " - "default. (Specific hardware required)." - << '\n'; - } else if (action == defs::GET_ACTION) { - if (!args.empty()) { - WrongNumberOfParameters(0); - } - auto t = det->getQuad(std::vector{det_id}); - os << OutString(t) << '\n'; - } else if (action == defs::PUT_ACTION) { - if (det_id != -1) { - throw RuntimeError("Cannot execute quad at module level"); - } - if (args.size() != 1) { - WrongNumberOfParameters(1); - } - det->setQuad(StringTo(args[0])); - os << args.front() << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::DataStream(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[left|right] [0, 1]\n\t[Eiger] Enables or disables data " - "streaming from left or/and right side of detector for 10 GbE " - "mode. " - "1 (enabled) " - "by default." - << '\n'; - } else if (action == defs::GET_ACTION) { - if (args.size() != 1) { - WrongNumberOfParameters(1); - } - auto t = det->getDataStream(StringTo(args[0]), - std::vector{det_id}); - os << OutString(t) << '\n'; - } else if (action == defs::PUT_ACTION) { - if (args.size() != 2) { - WrongNumberOfParameters(2); - } - det->setDataStream(StringTo(args[0]), - StringTo(args[1]), std::vector{det_id}); - os << args << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -/* Jungfrau Specific */ - -std::string CmdProxy::TemperatureEvent(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[0]\n\t[Jungfrau][Moench] 1, if a temperature event occured. To " - "clear " - "this event, set it to 0.\n\tIf temperature crosses threshold " - "temperature and temperature control is enabled, power to chip " - "will be switched off and temperature event occurs. To power on " - "chip again, temperature has to be less than threshold " - "temperature and temperature event has to be cleared." - << '\n'; - } else if (action == defs::GET_ACTION) { - if (!args.empty()) { - WrongNumberOfParameters(0); - } - auto t = det->getTemperatureEvent(std::vector{det_id}); - os << OutString(t) << '\n'; - } else if (action == defs::PUT_ACTION) { - if (args.size() != 1) { - WrongNumberOfParameters(1); - } - if (StringTo(args[0]) != 0) { - throw RuntimeError("Unknown argument for temp event. Did you " - "mean 0 to reset event?"); - } - det->resetTemperatureEvent(std::vector{det_id}); - os << "cleared" << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::PedestalMode(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << " [frames] [loops]\n\t\t[Jungfrau] " - "Enable pedestal mode. \n\t\tThe number of frames or triggers is " - "overwritten by: \n\t\t(#pedestal_frames x #pedestal_loops x 2). " - "\n\t\tIn auto timing mode or in trigger mode with #frames > 1, " - "\n\t\t#frames is overwritten and #triggers = 1, \n\t\telse " - "#triggers is overwritten and #frames = 1. \n\t\tOne cannot set " - "#frames, #triggers or timing mode in pedestal mode (exception " - "thrown).\n\n"; - os << cmd - << " [0]\n\t\t[Jungfrau] Disable pedestal " - "mode.\n\t\tDisabling pedestal mode will set back the normal " - "mode values of #frames and #triggers." - << '\n'; - } else if (action == defs::GET_ACTION) { - if (args.size() != 0) { - WrongNumberOfParameters(0); - } - auto t = det->getPedestalMode(std::vector{det_id}); - os << OutString(t) << '\n'; - } else if (action == defs::PUT_ACTION) { - // disable - if (args.size() == 1) { - if (args[0] != "0") { - throw RuntimeError( - "Unknown argument " + args[0] + - ". Did you mean '0' to disable pedestal mode?"); - } - det->setPedestalMode(defs::pedestalParameters()); - } - // enable - else if (args.size() == 2) { - uint8_t frames = StringTo(args[0]); - uint16_t loops = StringTo(args[1]); - det->setPedestalMode(defs::pedestalParameters(frames, loops)); - } else { - throw RuntimeError( - "Invalid number of parareters for this command."); - } - os << ToString(args) << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -/* Gotthard Specific */ - -std::string CmdProxy::ROI(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[xmin] [xmax] \n\t[Gotthard] Region of interest in detector.\n\t" - "Options: 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). " - << '\n'; - } else if (action == defs::GET_ACTION) { - if (!args.empty()) { - WrongNumberOfParameters(0); - } - auto t = det->getROI(std::vector{det_id}); - os << t << '\n'; - } else if (action == defs::PUT_ACTION) { - if (det_id == -1 && det->size() > 1) { - throw RuntimeError("Cannot execute ROI at multi module level"); - } - if (args.size() != 2) { - WrongNumberOfParameters(2); - } - defs::ROI t(StringTo(args[0]), StringTo(args[1])); - det->setROI(t, det_id); - os << t << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -/* Gotthard2 Specific */ - -std::string CmdProxy::InjectChannel(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[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." - << '\n'; - } else if (action == defs::GET_ACTION) { - if (!args.empty()) { - WrongNumberOfParameters(0); - } - auto t = det->getInjectChannel(std::vector{det_id}); - os << OutString(t) << '\n'; - } else if (action == defs::PUT_ACTION) { - if (args.size() != 2) { - WrongNumberOfParameters(2); - } - det->setInjectChannel(StringTo(args[0]), StringTo(args[1]), - {det_id}); - os << ToString(args) << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::VetoPhoton(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[ichip] [#photons] [energy in keV] [reference " - "file]\n\t[Gotthard2] Set veto reference for 128 channels for " - "chip ichip according to reference file and #photons and energy " - "in keV.\n[ichip] [output file]\n\t Get gain indices and veto " - "reference for 128 channels for chip ichip, saved to file." - << '\n'; - } else if (action == defs::GET_ACTION) { - if (args.size() != 2) { - WrongNumberOfParameters(2); - } - det->getVetoPhoton(StringTo(args[0]), args[1], - std::vector{det_id}); - os << "saved to file " << args[1] << '\n'; - } else if (action == defs::PUT_ACTION) { - if (args.size() != 4) { - WrongNumberOfParameters(4); - } - det->setVetoPhoton(StringTo(args[0]), StringTo(args[1]), - StringTo(args[2]), args[3], - std::vector{det_id}); - os << ToString(args) << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::VetoReference(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[gain index] [12 bit value] \n\t[Gotthard2] Set veto " - "reference for all 128 channels for all chips." - << '\n'; - } else if (action == defs::GET_ACTION) { - throw RuntimeError("cannot get vetoref. Did you mean vetophoton?"); - } else if (action == defs::PUT_ACTION) { - if (args.size() != 2) { - WrongNumberOfParameters(2); - } - det->setVetoReference(StringTo(args[0]), StringTo(args[1]), - {det_id}); - os << ToString(args) << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::VetoFile(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[chip index 0-10, -1 for all] [file name] \n\t[Gotthard2] Set " - "veto reference for each 128 channels for specific chip. The " - "file should have 128 rows of gain index and 12 bit value in dec" - << '\n'; - } else if (action == defs::GET_ACTION) { - throw RuntimeError("cannot get vetofile. Did you mean vetophoton?"); - } else if (action == defs::PUT_ACTION) { - if (args.size() != 2) { - WrongNumberOfParameters(2); - } - det->setVetoFile(StringTo(args[0]), args[1], - std::vector{det_id}); - os << ToString(args) << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::BurstMode(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[burst_internal or 0, burst_external or 1, cw_internal or 2, " - "cw_external or 3]\n\t[Gotthard2] Default is burst_internal " - "type. Also changes clkdiv 2, 3, 4" - << '\n'; - } else { - if (action == defs::GET_ACTION) { - if (!args.empty()) { - WrongNumberOfParameters(0); - } - auto t = det->getBurstMode(std::vector{det_id}); - os << OutString(t) << '\n'; - } else if (action == defs::PUT_ACTION) { - if (args.size() != 1) { - WrongNumberOfParameters(1); - } - defs::burstMode t; - try { - int ival = StringTo(args[0]); - switch (ival) { - case 0: - t = defs::BURST_INTERNAL; - break; - case 1: - t = defs::BURST_EXTERNAL; - break; - case 2: - t = defs::CONTINUOUS_INTERNAL; - break; - case 3: - t = defs::CONTINUOUS_EXTERNAL; - break; - default: - throw RuntimeError("Unknown burst mode " + args[0]); - } - } catch (...) { - t = StringTo(args[0]); - } - det->setBurstMode(t, std::vector{det_id}); - os << ToString(t) << '\n'; // no args to convert 0,1,2 as well - } else { - throw RuntimeError("Unknown action"); - } - } - return os.str(); -} - -std::string CmdProxy::VetoStreaming(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[none|lll|10gbe|...]\n\t[Gotthard2] Enable or disable the 2 " - "veto streaming interfaces available. Can include more than one " - "interface. \n\tDefault: none. lll (low latency link) is the " - "default interface to work with. \n\t10GbE is for debugging and " - "also enables second interface in receiver for listening to veto " - "packets (writes a separate file if writing enabled). Also " - "restarts client and receiver zmq sockets if zmq streaming " - "enabled." - << '\n'; - } else if (action == defs::GET_ACTION) { - if (!args.empty()) { - WrongNumberOfParameters(0); - } - auto t = det->getVetoStream(std::vector{det_id}); - os << OutString(t) << '\n'; - } else if (action == defs::PUT_ACTION) { - if (args.empty()) { - WrongNumberOfParameters(1); - } - defs::streamingInterface interface = defs::streamingInterface::NONE; - for (const auto &arg : args) { - if (arg == "none") { - if (args.size() > 1) { - throw RuntimeError( - std::string( - "cannot have other arguments with 'none'. args: ") + - ToString(args)); - } - break; - } - interface = interface | (StringTo(arg)); - } - det->setVetoStream(interface, std::vector{det_id}); - os << ToString(interface) << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::VetoAlgorithm(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[hits|raw] [lll|10gbe]\n\t[Gotthard2] Set the veto " - "algorithm. Default is hits." - << '\n'; - } else if (action == defs::GET_ACTION) { - if (args.size() != 1) { - WrongNumberOfParameters(1); - } - defs::streamingInterface interface = - StringTo(args[0]); - if (interface == defs::streamingInterface::NONE) { - throw RuntimeError("Must specify an interface to set algorithm"); - } - auto t = det->getVetoAlgorithm(interface, std::vector{det_id}); - os << OutString(t) << ' ' << ToString(interface) << '\n'; - } else if (action == defs::PUT_ACTION) { - if (args.size() != 2) { - WrongNumberOfParameters(2); - } - defs::vetoAlgorithm alg = StringTo(args[0]); - defs::streamingInterface interface = - StringTo(args[1]); - if (interface == defs::streamingInterface::NONE) { - throw RuntimeError("Must specify an interface to set algorithm"); - } - det->setVetoAlgorithm(alg, interface, std::vector{det_id}); - os << ToString(alg) << ' ' << ToString(interface) << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::ConfigureADC(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[chip index 0-9, -1 for all] [adc index 0-31, -1 for all] [7 " - "bit configuration value in hex]\n\t[Gotthard2] Sets " - "configuration for specific chip and adc, but configures 1 chip " - "(all adcs for that chip) at a time." - << '\n'; - } else if (action == defs::GET_ACTION) { - if (args.size() != 2) { - WrongNumberOfParameters(2); - } - auto t = det->getADCConfiguration(StringTo(args[0]), - StringTo(args[1]), - std::vector{det_id}); - os << OutStringHex(t) << '\n'; - } else if (action == defs::PUT_ACTION) { - if (args.size() != 3) { - WrongNumberOfParameters(3); - } - int value = StringTo(args[2]); - det->setADCConfiguration(StringTo(args[0]), StringTo(args[1]), - value, std::vector{det_id}); - os << '[' << args[0] << ", " << args[1] << ", " << ToStringHex(value) - << "]\n"; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -/* Mythen3 Specific */ - -std::string CmdProxy::Counters(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[i0] [i1] [i2]... \n\t[Mythen3] List of counters indices " - "enabled. Each element in list can be 0 - 2 and must be non " - "repetitive. Enabling counters sets vth dacs to remembered " - "values and disabling sets them to disabled values." - << '\n'; - } else if (action == defs::GET_ACTION) { - if (!args.empty()) { - WrongNumberOfParameters(0); - } - auto mask = det->getCounterMask(std::vector{det_id}).squash(-1); - os << ToString(getSetBits(mask)) << '\n'; - } else if (action == defs::PUT_ACTION) { - if (args.empty()) { - WrongNumberOfParameters(1); - } - if (std::any_of(args.cbegin(), args.cend(), [](std::string s) { - return (StringTo(s) < 0 || StringTo(s) > 2); - })) { - throw RuntimeError("Invalid counter indices list. Example: 0 1 2"); - } - // convert vector to counter enable mask - uint32_t mask = 0; - for (size_t i = 0; i < args.size(); ++i) { - int val = StringTo(args[i]); - // already enabled earlier - if (mask & (1 << val)) { - std::ostringstream oss; - oss << "Duplicate counter values (" << val << ") in arguments"; - throw RuntimeError(oss.str()); - } - mask |= (1 << val); - } - det->setCounterMask(mask, std::vector{det_id}); - os << ToString(args) << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::GateDelay(int action) { - int gateIndex = -1; - if (cmd == "gatedelay") { - gateIndex = -1; - } else if (cmd == "gatedelay1") { - gateIndex = 0; - } else if (cmd == "gatedelay2") { - gateIndex = 1; - } else if (cmd == "gatedelay3") { - gateIndex = 2; - } else { - throw RuntimeError("Unknown command, use list to list all commands"); - } - - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - if (cmd == "gatedelay") { - os << "[duration] [(optional unit) ns|us|ms|s]\n\t[Mythen3] Gate " - "Delay of all gate signals in auto and trigger mode " - "(internal gating)." - << '\n'; - } else if (cmd == "gatedelay1") { - os << "[n_value]\n\t[Mythen3] Gate Delay of gate signal 1 in auto " - "and trigger mode (internal gating)." - << '\n'; - } else if (cmd == "gatedelay2") { - os << "[n_value]\n\t[Mythen3] Gate Delay of gate signal 2 in auto " - "and trigger mode (internal gating)." - << '\n'; - } else { - os << "[n_value]\n\t[Mythen3] Gate Delay of gate signal 3 in auto " - "and trigger mode (internal gating)." - << '\n'; - } - } else if (action == defs::GET_ACTION) { - if (args.size() > 1) { - WrongNumberOfParameters(1); - } - // vector of gate delays - if (gateIndex == -1) { - auto t = det->getGateDelayForAllGates(std::vector{det_id}); - if (args.empty()) { - os << OutString(t) << '\n'; - } else if (args.size() == 1) { - os << OutString(t, args[0]) << '\n'; - } - } - // single gate delay - else { - auto t = det->getGateDelay(gateIndex, std::vector{det_id}); - if (args.empty()) { - os << OutString(t) << '\n'; - } else if (args.size() == 1) { - os << OutString(t, args[0]) << '\n'; - } - } - } else if (action == defs::PUT_ACTION) { - if (args.size() == 1) { - std::string time_str(args[0]); - std::string unit = RemoveUnit(time_str); - auto t = StringTo(time_str, unit); - det->setGateDelay(gateIndex, t, std::vector{det_id}); - } else if (args.size() == 2) { - auto t = StringTo(args[0], args[1]); - det->setGateDelay(gateIndex, t, std::vector{det_id}); - } else { - WrongNumberOfParameters(2); - } - /* TODO: os << args << '\n'; (doesnt work for vectors in .h)*/ - if (args.size() > 1) { - os << args[0] << args[1] << '\n'; - } else { - os << args[0] << '\n'; - } - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::GainCaps(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[cap1, cap2, ...]\n\t[Mythen3] gain, options: C10pre, C15sh, " - "C30sh, C50sh, C225ACsh, C15pre" - << '\n'; - } else if (action == defs::GET_ACTION) { - if (!args.empty()) - WrongNumberOfParameters(0); - - auto tmp = det->getGainCaps(); - Result csr; - for (auto val : tmp) { - if (val) - csr.push_back(static_cast(val)); - } - - os << OutString(csr) << '\n'; - } else if (action == defs::PUT_ACTION) { - if (args.size() < 1) { - WrongNumberOfParameters(1); - } - int caps = 0; - for (const auto &arg : args) { - if (arg != "0") - caps |= StringTo(arg); - } - - det->setGainCaps(caps); - os << OutString(args) << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -/* CTB Specific */ - -std::string CmdProxy::Samples(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[n_samples]\n\t[CTB] Number of samples (analog, digitial and " - "transceiver) expected.\n" - << '\n'; - } else if (action == defs::GET_ACTION) { - if (!args.empty()) { - WrongNumberOfParameters(0); - } - auto a = det->getNumberOfAnalogSamples(std::vector{det_id}); - // get also digital samples for ctb and compare with analog - if (det->getDetectorType().squash() == defs::CHIPTESTBOARD) { - auto d = det->getNumberOfDigitalSamples(std::vector{det_id}); - auto t = - det->getNumberOfTransceiverSamples(std::vector{det_id}); - int as = a.squash(-1); - int ds = d.squash(-1); - int ts = t.squash(-1); - if (as == -1 || ds == -1 || ts == -1 || as != ds || - as != ts) { // check if a == d? - throw RuntimeError( - "Different samples. Use asamples, dsamples or tsamples."); - } - } - os << OutString(a) << '\n'; - } else if (action == defs::PUT_ACTION) { - if (args.size() != 1) { - WrongNumberOfParameters(1); - } - det->setNumberOfAnalogSamples(StringTo(args[0]), - std::vector{det_id}); - // set also digital samples for ctb - if (det->getDetectorType().squash() == defs::CHIPTESTBOARD) { - det->setNumberOfDigitalSamples(StringTo(args[0]), - std::vector{det_id}); - det->setNumberOfTransceiverSamples(StringTo(args[0]), - std::vector{det_id}); - } - os << args.front() << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -/* CTB Specific */ -std::string CmdProxy::AdcVpp(int action) { - std::ostringstream os; - os << cmd << ' '; - - if (action == defs::HELP_ACTION) { - os << "[dac or mV value][(optional unit) mV] \n\t[Ctb] Vpp of " - "ADC.\n\t 0 -> 1V ; 1 -> 1.14V ; 2 -> 1.33V ; 3 -> 1.6V ; 4 -> " - "2V. \n\tAdvanced User function!\n" - << '\n'; - return os.str(); - } - - if (action == defs::GET_ACTION) { - bool mV = false; - - if (args.size() == 1) { - if ((args[0] != "mv") && (args[0] != "mV")) { - throw RuntimeError("Unknown argument " + args[0] + - ". Did you mean mV?"); - } - mV = true; - } else if (args.size() > 1) { - WrongNumberOfParameters(1); - } - auto t = det->getADCVpp(mV, std::vector{det_id}); - os << OutString(t) << (mV ? " mV\n" : "\n"); - } else if (action == defs::PUT_ACTION) { - bool mV = false; - if (args.size() == 2) { - if ((args[1] != "mv") && (args[1] != "mV")) { - throw RuntimeError("Unknown argument " + args[1] + - ". Did you mean mV?"); - } - mV = true; - } else if (args.size() > 2 || args.size() < 1) { - WrongNumberOfParameters(1); - } - det->setADCVpp(StringTo(args[0]), mV, std::vector{det_id}); - os << args[0] << (mV ? " mV\n" : "\n"); - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::SlowADC(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[n_channel (0-7 for channel]\n\t[Ctb] Slow " - "ADC channel in mV" - << '\n'; - } else if (action == defs::GET_ACTION) { - if (args.size() != 1) { - WrongNumberOfParameters(0); - } - int nchan = StringTo(args[0]); - if (nchan < 0 || nchan > 7) { - throw RuntimeError("Unknown adc argument " + args[0]); - } - auto t = det->getSlowADC( - static_cast(nchan + defs::SLOW_ADC0), - std::vector{det_id}); - Result result(t.size()); - for (unsigned int i = 0; i < t.size(); ++i) { - result[i] = t[i] / 1000.00; - } - os << OutString(result) << " mV\n"; - - } else if (action == defs::PUT_ACTION) { - throw RuntimeError("cannot put"); - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::ReceiverDbitList(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[all] or [i0] [i1] [i2]... \n\t[Ctb] List of digital signal " - "bits read out. If all is used instead of a list, all digital " - "bits (64) enabled. Each element in list can be 0 - 63 and must " - "be non repetitive." - << '\n'; - } else if (action == defs::GET_ACTION) { - if (!args.empty()) { - WrongNumberOfParameters(0); - } - auto t = det->getRxDbitList(std::vector{det_id}); - os << OutString(t) << '\n'; - } else if (action == defs::PUT_ACTION) { - if (args.empty()) { - WrongNumberOfParameters(1); - } - std::vector t; - if (args[0] == "all") { - t.resize(64); - for (unsigned int i = 0; i < 64; ++i) { - t[i] = i; - } - } else { - unsigned int ntrim = args.size(); - t.resize(ntrim); - for (unsigned int i = 0; i < ntrim; ++i) { - t[i] = StringTo(args[i]); - } - } - det->setRxDbitList(t, std::vector{det_id}); - os << ToString(args) << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::DigitalIODelay(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[64 bit bitmask] [0-775]\n\t[Ctb] Delay for digital IO pins " - "selected by the bitmask. Delay is in ps and max of 775 ps. " - "Resolution is 25 ps." - << '\n'; - } else if (action == defs::GET_ACTION) { - throw RuntimeError("Cannot get"); - } else if (action == defs::PUT_ACTION) { - if (args.size() != 2) { - WrongNumberOfParameters(2); - } - det->setDigitalIODelay(StringTo(args[0]), - StringTo(args[1]), - std::vector{det_id}); - os << ToString(args) << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -/* Pattern */ - -std::string CmdProxy::Pattern(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[fname]\n\t[Mythen3][Ctb] Loads ASCII pattern file " - "directly to server (instead of executing line by line)" - << '\n'; - } else if (action == defs::GET_ACTION) { - throw RuntimeError("Cannot get"); - } else if (action == defs::PUT_ACTION) { - if (args.size() != 1) { - WrongNumberOfParameters(1); - } - det->setPattern(args[0], std::vector{det_id}); - os << args.front() << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::PatternWord(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[step or address] [64 bit mask]\n\t[Ctb][Mythen3] 64 " - "bit pattern at address of pattern memory.\n\t[Ctb] read " - "is same as executing pattern" - << '\n'; - } else if (action == defs::GET_ACTION) { - if (args.size() != 1) { - WrongNumberOfParameters(1); - } - int addr = StringTo(args[0]); - auto t = det->getPatternWord(addr, std::vector{det_id}); - os << '[' << ToStringHex(addr, 4) << ", " << OutStringHex(t, 16) - << "]\n"; - } else if (action == defs::PUT_ACTION) { - if (args.size() != 2) { - WrongNumberOfParameters(2); - } - int addr = StringTo(args[0]); - uint64_t word = StringTo(args[1]); - det->setPatternWord(addr, word, std::vector{det_id}); - os << '[' << ToStringHex(addr, 4) << ", " << ToStringHex(word, 16) - << "]\n"; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -void CmdProxy::GetLevelAndUpdateArgIndex(int action, - std::string levelSeparatedCommand, - int &level, int &iArg, size_t nGetArgs, - size_t nPutArgs) { - if (cmd == levelSeparatedCommand) { - ++nGetArgs; - ++nPutArgs; - } else { - LOG(logWARNING) << "This command is deprecated and will be removed. " - "Please migrate to " - << levelSeparatedCommand; - } - if (action == defs::GET_ACTION && args.size() != nGetArgs) { - WrongNumberOfParameters(nGetArgs); - } else if (action == defs::PUT_ACTION && args.size() != nPutArgs) { - WrongNumberOfParameters(nPutArgs); - } - if (cmd == levelSeparatedCommand) { - level = StringTo(args[iArg++]); - } else { - level = cmd[cmd.find_first_of("012")] - '0'; - } -} - -std::string CmdProxy::PatternLoopAddresses(int action) { - if (cmd != "patlimits" && cmd != "patloop0" && cmd != "patloop1" && - cmd != "patloop2" && cmd != "patloop") { - throw RuntimeError("Unknown command, use list to list all commands"); - } - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - if (cmd == "patlimits") { - os << "[start addr] [stop addr] \n\t[Ctb][Mythen3] Limits " - "of complete pattern." - << '\n'; - } else if (cmd == "patloop") { - os << "[0-6] [start addr] [stop addr] \n\t[Ctb][Mythen3] " - "Limits of the loop level provided." - << "\n\t[Mythen3] Level options: 0-3 only." << '\n'; - } else { - os << "Depreciated command. Use patloop." << '\n'; - } - } else { - int level = -1, iArg = 0, nGetArgs = 0, nPutArgs = 2; - if (cmd != "patlimits") { - GetLevelAndUpdateArgIndex(action, "patloop", level, iArg, nGetArgs, - nPutArgs); - if (cmd != "patloop0" && cmd != "patloop1" && cmd != "patloop2") - os << level << ' '; - } - if (action == defs::GET_ACTION) { - auto t = - det->getPatternLoopAddresses(level, std::vector{det_id}); - os << OutStringHex(t, 4) << '\n'; - } else if (action == defs::PUT_ACTION) { - int start = StringTo(args[iArg++]); - int stop = StringTo(args[iArg++]); - det->setPatternLoopAddresses(level, start, stop, - std::vector{det_id}); - os << '[' << ToStringHex(start, 4) << ", " << ToStringHex(stop, 4) - << "]\n"; - } else { - throw RuntimeError("Unknown action"); - } - } - return os.str(); -} - -std::string CmdProxy::PatternLoopCycles(int action) { - if (cmd != "patnloop0" && cmd != "patnloop1" && cmd != "patnloop2" && - cmd != "patnloop") { - throw RuntimeError("Unknown command, use list to list all commands"); - } - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - if (cmd == "patnloop") { - os << "[0-6] [n_cycles] \n\t[Ctb][Mythen3] Number of " - "cycles of " - "the loop level provided." - << "\n\t[Mythen3] Level options: 0-3 only." << '\n'; - } else { - os << "Depreciated command. Use patnloop." << '\n'; - } - } else { - int level = -1, iArg = 0, nGetArgs = 0, nPutArgs = 1; - GetLevelAndUpdateArgIndex(action, "patnloop", level, iArg, nGetArgs, - nPutArgs); - if (cmd != "patnloop0" && cmd != "patnloop1" && cmd != "patnloop2") - os << level << ' '; - if (action == defs::GET_ACTION) { - auto t = det->getPatternLoopCycles(level, std::vector{det_id}); - os << OutString(t) << '\n'; - } else if (action == defs::PUT_ACTION) { - int nloops = StringTo(args[iArg++]); - det->setPatternLoopCycles(level, nloops, std::vector{det_id}); - os << nloops << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - } - return os.str(); -} - -std::string CmdProxy::PatternWaitAddress(int action) { - if (cmd != "patwait0" && cmd != "patwait1" && cmd != "patwait2" && - cmd != "patwait") { - throw RuntimeError("Unknown command, use list to list all commands"); - } - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - if (cmd == "patwait") { - os << "[0-6] [addr] \n\t[Ctb][Mythen3] Wait address for " - "loop level provided." - << "\n\t[Mythen3] Level options: 0-3 only."; - } else { - os << "Depreciated command. Use patwait."; - } - os << '\n'; - } else { - int level = -1, iArg = 0, nGetArgs = 0, nPutArgs = 1; - GetLevelAndUpdateArgIndex(action, "patwait", level, iArg, nGetArgs, - nPutArgs); - if (cmd != "patwait0" && cmd != "patwait1" && cmd != "patwait2") - os << level << ' '; - if (action == defs::GET_ACTION) { - auto t = det->getPatternWaitAddr(level, std::vector{det_id}); - os << OutStringHex(t, 4) << '\n'; - } else if (action == defs::PUT_ACTION) { - int addr = StringTo(args[iArg++]); - det->setPatternWaitAddr(level, addr, std::vector{det_id}); - os << ToStringHex(addr, 4) << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - } - return os.str(); -} - -std::string CmdProxy::PatternWaitTime(int action) { - if (cmd != "patwaittime0" && cmd != "patwaittime1" && - cmd != "patwaittime2" && cmd != "patwaittime") { - throw RuntimeError("Unknown command, use list to list all commands"); - } - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - if (cmd == "patwaittime") { - os << "[0-6] [n_clk] \n\t[Ctb][Mythen3] Wait time in clock " - "cycles for the loop provided." - << "\n\t[Mythen3] Level options: 0-3 only." << '\n'; - } else { - os << "Depreciated command. Use patwaittime." << '\n'; - } - } else { - int level = -1, iArg = 0, nGetArgs = 0, nPutArgs = 1; - GetLevelAndUpdateArgIndex(action, "patwaittime", level, iArg, nGetArgs, - nPutArgs); - if (cmd != "patwaittime0" && cmd != "patwaittime1" && - cmd != "patwaittime2") - os << level << ' '; - if (action == defs::GET_ACTION) { - auto t = det->getPatternWaitTime(level, std::vector{det_id}); - os << OutString(t) << '\n'; - } else if (action == defs::PUT_ACTION) { - uint64_t waittime = StringTo(args[iArg++]); - det->setPatternWaitTime(level, waittime, {det_id}); - os << waittime << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - } - return os.str(); -} - -/* Advanced */ - -std::string CmdProxy::AdditionalJsonHeader(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[key1] [value1] [key2] [value2]...[keyn] [valuen]\n\tAdditional " - "json header to be streamed out from receiver via zmq. Default " - "is empty. Max 20 characters for each key/value. Use only if to " - "be processed by an intermediate user process listening to " - "receiver zmq packets. Empty value deletes header. " - << '\n'; - } else if (action == defs::GET_ACTION) { - if (!args.empty()) { - WrongNumberOfParameters(0); - } - auto t = det->getAdditionalJsonHeader(std::vector{det_id}); - os << OutString(t) << '\n'; - } else if (action == defs::PUT_ACTION) { - // arguments can be empty - std::map json; - for (size_t i = 0; i < args.size(); i = i + 2) { - // last value is empty - if (i + 1 >= args.size()) { - json[args[i]] = ""; - } else { - json[args[i]] = args[i + 1]; - } - } - det->setAdditionalJsonHeader(json, std::vector{det_id}); - os << ToString(json) << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::JsonParameter(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[key1] [value1]\n\tAdditional json header parameter streamed " - "out from receiver. If not found in header, the pair is " - "appended. An empty values deletes parameter. Max 20 characters " - "for each key/value." - << '\n'; - } else if (action == defs::GET_ACTION) { - if (args.size() != 1) { - WrongNumberOfParameters(1); - } - auto t = - det->getAdditionalJsonParameter(args[0], std::vector{det_id}); - os << OutString(t) << '\n'; - } else if (action == defs::PUT_ACTION) { - switch (args.size()) { - case 1: - det->setAdditionalJsonParameter(args[0], "", - std::vector{det_id}); - break; - case 2: - det->setAdditionalJsonParameter(args[0], args[1], - std::vector{det_id}); - break; - default: - WrongNumberOfParameters(1); - } - if (args.size() == 1) { - os << args[0] << " deleted" << '\n'; - } else { - os << "{" << args[0] << ": " << args[1] << "}" << '\n'; - } - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::ProgramFpga(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[fname.pof | fname.rbf (full " - "path)][(opitonal)--force-delete-normal-file]\n\t[Jungfrau][" - "Moench][Ctb] " - "Programs FPGA from pof file (full path). Then, detector " - "controller is rebooted. \n\t\tUse --force-delete-normal-file " - "argument, if normal file found in device tree, it must be " - "deleted, a new device drive created and programming " - "continued.\n\t[Mythen3][Gotthard2] Programs FPGA from rbf file " - "(full path). Then, detector controller is rebooted." - << '\n'; - } else if (action == defs::GET_ACTION) { - throw RuntimeError("Cannot get"); - } else if (action == defs::PUT_ACTION) { - bool forceDeteleNormalFile = false; - if (args.size() == 2) { - if (args[1] != "--force-delete-normal-file") { - throw RuntimeError("Could not scan second argument. Did you " - "mean --force-delete-normal-file?"); - } - forceDeteleNormalFile = true; - } else if (args.size() != 1) { - WrongNumberOfParameters(1); - } - det->programFPGA(args[0], forceDeteleNormalFile, - std::vector{det_id}); - os << "successful\n"; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::UpdateDetectorServer(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[server_name with full " - "path]\n\t[Jungfrau][Moench][Eiger][Ctb][Mythen3][Gotthard2] " - "Copies detector server via TCP (without tftp). Makes a symbolic " - "link with a shorter name (without vx.x.x). Then, detector " - "controller reboots (except " - "Eiger).\n\t[Jungfrau][Moench][Ctb]Also changes respawn server " - "to the link, which is effective after a reboot." - << '\n'; - } else if (action == defs::GET_ACTION) { - throw RuntimeError("Cannot get"); - } else if (action == defs::PUT_ACTION) { - if (args.size() != 1) { - WrongNumberOfParameters(1); - } - det->updateDetectorServer(args[0], std::vector{det_id}); - os << "successful\n"; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::UpdateKernel(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[kernel_name with full " - "path]\n\t[Jungfrau][Moench][Ctb][Mythen3][Gotthard2] Advanced " - "Command!! You could damage the detector. Please use with " - "caution.\n\tUpdates the kernel image. Then, detector controller " - "reboots with new kernel." - << '\n'; - } else if (action == defs::GET_ACTION) { - throw RuntimeError("Cannot get"); - } else if (action == defs::PUT_ACTION) { - if (args.size() != 1) { - WrongNumberOfParameters(1); - } - det->updateKernel(args[0], std::vector{det_id}); - os << "successful\n"; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::UpdateFirmwareAndDetectorServer(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "\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" - << '\n'; - } else if (action == defs::GET_ACTION) { - throw RuntimeError("Cannot get"); - } else if (action == defs::PUT_ACTION) { - if (args.size() != 2) { - WrongNumberOfParameters(2); - } - int fpos = args.size() - 1; - if (args[fpos].find(".pof") == std::string::npos && - args[fpos].find(".rbf") == std::string::npos) { - throw RuntimeError("Programming file must be a pof/rbf file."); - } - det->updateFirmwareAndServer(args[0], args[1], - std::vector{det_id}); - os << "successful\n"; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::Register(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[address] [32 bit value]\n\tReads/writes to a 32 bit register " - "in hex. Advanced Function!\n\tGoes to stop server. Hence, can " - "be called while calling blocking acquire(). \n\t[Eiger] +0x100 " - "for only left, +0x200 for only right." - << '\n'; - } else if (action == defs::GET_ACTION) { - if (args.size() != 1) { - WrongNumberOfParameters(1); - } - auto t = det->readRegister(StringTo(args[0]), - std::vector{det_id}); - os << OutStringHex(t) << '\n'; - } else if (action == defs::PUT_ACTION) { - if (args.size() != 2) { - WrongNumberOfParameters(2); - } - det->writeRegister(StringTo(args[0]), - StringTo(args[1]), - std::vector{det_id}); - os << ToString(args) << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::AdcRegister(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[address] [value]\n\t[Jungfrau][Moench][Ctb][Gotthard] Writes " - "to an adc register in hex. Advanced user Function!" - << '\n'; - } else if (action == defs::GET_ACTION) { - throw RuntimeError("Cannot get."); - } else if (action == defs::PUT_ACTION) { - if (args.size() != 2) { - WrongNumberOfParameters(2); - } - det->writeAdcRegister(StringTo(args[0]), - StringTo(args[1]), - std::vector{det_id}); - os << ToString(args) << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::BitOperations(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - if (cmd == "setbit") { - os << "[reg address in hex] [bit index]\n\tSets bit in address." - << '\n'; - } else if (cmd == "clearbit") { - os << "[reg address in hex] [bit index]\n\tClears bit in address." - << '\n'; - } else if (cmd == "getbit") { - os << "[reg address in hex] [bit index]\n\tGets bit in address." - << '\n'; - } else { - throw RuntimeError( - "Unknown command, use list to list all commands"); - } - } else { - if (cmd != "setbit" && cmd != "clearbit" && cmd != "getbit") { - throw RuntimeError( - "Unknown command, use list to list all commands"); - } - if (args.size() != 2) { - WrongNumberOfParameters(2); - } - auto addr = StringTo(args[0]); - auto bitnr = StringTo(args[1]); - if (bitnr < 0 || bitnr > 31) { - return std::string("Bit number out of range") + - std::to_string(bitnr); - } - if (action == defs::GET_ACTION) { - if (cmd == "setbit" || cmd == "clearbit") { - throw RuntimeError("Cannot get"); - } - auto t = det->getBit(addr, bitnr, std::vector{det_id}); - os << OutString(t) << '\n'; - } else if (action == defs::PUT_ACTION) { - if (cmd == "getbit") { - throw RuntimeError("Cannot put"); - } - if (cmd == "setbit") { - det->setBit(addr, bitnr, std::vector{det_id}); - } else if (cmd == "clearbit") { - det->clearBit(addr, bitnr, std::vector{det_id}); - } - os << ToString(args) << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - } - return os.str(); -} - -std::string CmdProxy::InitialChecks(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[0, 1]\n\tEnable or disable intial compatibility and other " - "checks at detector start up. It is enabled by default. Must " - "come before 'hostname' command to take effect. Can be used to " - "reprogram fpga when current firmware is " - "incompatible.\n\tAdvanced User function!" - << '\n'; - } else if (action == defs::GET_ACTION) { - if (det_id != -1) { - throw RuntimeError( - "Cannot enable/disable initial checks at module level"); - } - if (!args.empty()) { - WrongNumberOfParameters(0); - } - auto t = det->getInitialChecks(); - os << t << '\n'; - } else if (action == defs::PUT_ACTION) { - if (det_id != -1) { - throw RuntimeError( - "Cannot get initial checks enable at module level"); - } - if (args.size() != 1) { - WrongNumberOfParameters(1); - } - det->setInitialChecks(StringTo(args[0])); - os << args.front() << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -/* Insignificant */ - -std::string CmdProxy::ExecuteCommand(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "[command]\n\tExecutes command on detector server console." - << '\n'; - } else if (action == defs::GET_ACTION) { - throw RuntimeError("Cannot get."); - } else if (action == defs::PUT_ACTION) { - std::string command; - for (auto &i : args) { - command += (i + ' '); - } - auto t = det->executeCommand(command, std::vector{det_id}); - os << OutString(t) << '\n'; - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -std::string CmdProxy::UserDetails(int action) { - std::ostringstream os; - os << cmd << ' '; - if (action == defs::HELP_ACTION) { - os << "\n\tUser details from shared memory (hostname, type, PID, User, " - "Date)." - << '\n'; - } else if (action == defs::GET_ACTION) { - if (det_id != -1) { - throw RuntimeError("Cannot execute this at module level"); - } - if (!args.empty()) { - WrongNumberOfParameters(0); - } - auto t = det->getUserDetails(); - os << t << '\n'; - } else if (action == defs::PUT_ACTION) { - throw RuntimeError("Cannot put."); - } else { - throw RuntimeError("Unknown action"); - } - return os.str(); -} - -} // namespace sls diff --git a/slsDetectorSoftware/src/CmdProxy.h b/slsDetectorSoftware/src/CmdProxy.h deleted file mode 100644 index d58c9dce2..000000000 --- a/slsDetectorSoftware/src/CmdProxy.h +++ /dev/null @@ -1,2658 +0,0 @@ -// SPDX-License-Identifier: LGPL-3.0-or-other -// Copyright (C) 2021 Contributors to the SLS Detector Package -#pragma once - -#include "sls/Detector.h" -#include "sls/Result.h" -#include "sls/network_utils.h" -#include "sls/sls_detector_exceptions.h" -#include -#include -#include -#include - -namespace sls { - -/** Macro to make an integer command. - * CMDNAME name of the function that does the command - * GETFCN Detector function to get - * SETFCN Detector function to set - * CONV Function to convert from string to the correct integer type - * HLPSTR Help string for --help and docs - */ - -#define TIME_COMMAND(CMDNAME, GETFCN, SETFCN, HLPSTR) \ - std::string CMDNAME(const int action) { \ - std::ostringstream os; \ - os << cmd << ' '; \ - if (action == slsDetectorDefs::HELP_ACTION) \ - os << HLPSTR << '\n'; \ - else if (action == slsDetectorDefs::GET_ACTION) { \ - auto t = det->GETFCN(std::vector{det_id}); \ - if (args.empty()) { \ - os << OutString(t) << '\n'; \ - } else if (args.size() == 1) { \ - os << OutString(t, args[0]) << '\n'; \ - } else { \ - WrongNumberOfParameters(1); \ - } \ - } else if (action == slsDetectorDefs::PUT_ACTION) { \ - if (args.size() == 1) { \ - std::string time_str(args[0]); \ - std::string unit = RemoveUnit(time_str); \ - auto t = StringTo(time_str, unit); \ - det->SETFCN(t, std::vector{det_id}); \ - } else if (args.size() == 2) { \ - auto t = StringTo(args[0], args[1]); \ - det->SETFCN(t, std::vector{det_id}); \ - } else { \ - WrongNumberOfParameters(2); \ - } \ - /* TODO: os << args << '\n'; (doesnt work for vectors in .h)*/ \ - if (args.size() > 1) { \ - os << args[0] << args[1] << '\n'; \ - } else { \ - os << args[0] << '\n'; \ - } \ - } else { \ - throw RuntimeError("Unknown action"); \ - } \ - return os.str(); \ - } - -/** time get only */ -#define TIME_GET_COMMAND(CMDNAME, GETFCN, HLPSTR) \ - std::string CMDNAME(const int action) { \ - std::ostringstream os; \ - os << cmd << ' '; \ - if (action == slsDetectorDefs::HELP_ACTION) \ - os << HLPSTR << '\n'; \ - else if (action == slsDetectorDefs::GET_ACTION) { \ - auto t = det->GETFCN(std::vector{det_id}); \ - if (args.empty()) { \ - os << OutString(t) << '\n'; \ - } else if (args.size() == 1) { \ - os << OutString(t, args[0]) << '\n'; \ - } else { \ - WrongNumberOfParameters(1); \ - } \ - } else if (action == slsDetectorDefs::PUT_ACTION) { \ - throw RuntimeError("cannot put"); \ - } else { \ - throw RuntimeError("Unknown action"); \ - } \ - return os.str(); \ - } - -/** string */ -#define STRING_COMMAND(CMDNAME, GETFCN, SETFCN, HLPSTR) \ - std::string CMDNAME(const int action) { \ - std::ostringstream os; \ - os << cmd << ' '; \ - if (action == slsDetectorDefs::HELP_ACTION) \ - os << HLPSTR << '\n'; \ - else if (action == slsDetectorDefs::GET_ACTION) { \ - if (!args.empty()) { \ - WrongNumberOfParameters(0); \ - } \ - auto t = det->GETFCN(std::vector{det_id}); \ - os << OutString(t) << '\n'; \ - } else if (action == slsDetectorDefs::PUT_ACTION) { \ - if (args.size() != 1) { \ - WrongNumberOfParameters(1); \ - } \ - det->SETFCN(args[0], std::vector{det_id}); \ - os << args.front() << '\n'; \ - } else { \ - throw RuntimeError("Unknown action"); \ - } \ - return os.str(); \ - } - -/** int or enum hex with 16 bit width (64 bit)*/ -#define INTEGER_COMMAND_HEX_WIDTH16(CMDNAME, GETFCN, SETFCN, CONV, HLPSTR) \ - std::string CMDNAME(const int action) { \ - std::ostringstream os; \ - os << cmd << ' '; \ - if (action == slsDetectorDefs::HELP_ACTION) \ - os << HLPSTR << '\n'; \ - else if (action == slsDetectorDefs::GET_ACTION) { \ - if (!args.empty()) { \ - WrongNumberOfParameters(0); \ - } \ - auto t = det->GETFCN(std::vector{det_id}); \ - os << OutStringHex(t, 16) << '\n'; \ - } else if (action == slsDetectorDefs::PUT_ACTION) { \ - if (args.size() != 1) { \ - WrongNumberOfParameters(1); \ - } \ - auto val = CONV(args[0]); \ - det->SETFCN(val, std::vector{det_id}); \ - os << ToStringHex(val, 16) << '\n'; \ - } else { \ - throw RuntimeError("Unknown action"); \ - } \ - return os.str(); \ - } - -/** int or enum hex */ -#define INTEGER_COMMAND_HEX(CMDNAME, GETFCN, SETFCN, CONV, HLPSTR) \ - std::string CMDNAME(const int action) { \ - std::ostringstream os; \ - os << cmd << ' '; \ - if (action == slsDetectorDefs::HELP_ACTION) \ - os << HLPSTR << '\n'; \ - else if (action == slsDetectorDefs::GET_ACTION) { \ - if (!args.empty()) { \ - WrongNumberOfParameters(0); \ - } \ - auto t = det->GETFCN(std::vector{det_id}); \ - os << OutStringHex(t) << '\n'; \ - } else if (action == slsDetectorDefs::PUT_ACTION) { \ - if (args.size() != 1) { \ - WrongNumberOfParameters(1); \ - } \ - auto val = CONV(args[0]); \ - det->SETFCN(val, std::vector{det_id}); \ - os << args.front() << '\n'; \ - } else { \ - throw RuntimeError("Unknown action"); \ - } \ - return os.str(); \ - } - -/** int or enum */ -#define INTEGER_COMMAND_VEC_ID(CMDNAME, GETFCN, SETFCN, CONV, HLPSTR) \ - std::string CMDNAME(const int action) { \ - std::ostringstream os; \ - os << cmd << ' '; \ - if (action == slsDetectorDefs::HELP_ACTION) \ - os << HLPSTR << '\n'; \ - else if (action == slsDetectorDefs::GET_ACTION) { \ - if (!args.empty()) { \ - WrongNumberOfParameters(0); \ - } \ - auto t = det->GETFCN(std::vector{det_id}); \ - os << OutString(t) << '\n'; \ - } else if (action == slsDetectorDefs::PUT_ACTION) { \ - if (args.size() != 1) { \ - WrongNumberOfParameters(1); \ - } \ - auto val = CONV(args[0]); \ - det->SETFCN(val, std::vector{det_id}); \ - os << args.front() << '\n'; \ - } else { \ - throw RuntimeError("Unknown action"); \ - } \ - return os.str(); \ - } - -#define INTEGER_COMMAND_VEC_ID_GET(CMDNAME, GETFCN, SETFCN, CONV, HLPSTR) \ - std::string CMDNAME(const int action) { \ - std::ostringstream os; \ - os << cmd << ' '; \ - if (action == slsDetectorDefs::HELP_ACTION) \ - os << HLPSTR << '\n'; \ - else if (action == slsDetectorDefs::GET_ACTION) { \ - if (!args.empty()) { \ - WrongNumberOfParameters(0); \ - } \ - auto t = det->GETFCN(std::vector{det_id}); \ - os << OutString(t) << '\n'; \ - } else if (action == slsDetectorDefs::PUT_ACTION) { \ - if (args.size() != 1) { \ - WrongNumberOfParameters(1); \ - } \ - auto val = CONV(args[0]); \ - det->SETFCN(val, det_id); \ - os << args.front() << '\n'; \ - } else { \ - throw RuntimeError("Unknown action"); \ - } \ - return os.str(); \ - } - -/** int or enum */ -#define INTEGER_COMMAND_SINGLE_ID(CMDNAME, GETFCN, SETFCN, CONV, HLPSTR) \ - std::string CMDNAME(const int action) { \ - std::ostringstream os; \ - os << cmd << ' '; \ - if (action == slsDetectorDefs::HELP_ACTION) \ - os << HLPSTR << '\n'; \ - else if (action == slsDetectorDefs::GET_ACTION) { \ - if (!args.empty()) { \ - WrongNumberOfParameters(0); \ - } \ - auto t = det->GETFCN(det_id); \ - os << OutString(t) << '\n'; \ - } else if (action == slsDetectorDefs::PUT_ACTION) { \ - if (args.size() != 1) { \ - WrongNumberOfParameters(1); \ - } \ - auto val = CONV(args[0]); \ - det->SETFCN(val, det_id); \ - os << args.front() << '\n'; \ - } else { \ - throw RuntimeError("Unknown action"); \ - } \ - return os.str(); \ - } - -/** int, set no id, get id */ -#define INTEGER_COMMAND_SET_NOID_GET_ID(CMDNAME, GETFCN, SETFCN, CONV, HLPSTR) \ - std::string CMDNAME(const int action) { \ - std::ostringstream os; \ - os << cmd << ' '; \ - if (action == slsDetectorDefs::HELP_ACTION) \ - os << HLPSTR << '\n'; \ - else if (action == slsDetectorDefs::GET_ACTION) { \ - if (!args.empty()) { \ - WrongNumberOfParameters(0); \ - } \ - auto t = det->GETFCN(std::vector{det_id}); \ - os << OutString(t) << '\n'; \ - } else if (action == slsDetectorDefs::PUT_ACTION) { \ - if (det_id != -1) { \ - throw RuntimeError("Cannot execute this at module level"); \ - } \ - if (args.size() != 1) { \ - WrongNumberOfParameters(1); \ - } \ - auto val = CONV(args[0]); \ - det->SETFCN(val); \ - os << args.front() << '\n'; \ - } else { \ - throw RuntimeError("Unknown action"); \ - } \ - return os.str(); \ - } - -/** int, no id */ -#define INTEGER_COMMAND_NOID(CMDNAME, GETFCN, SETFCN, CONV, HLPSTR) \ - std::string CMDNAME(const int action) { \ - std::ostringstream os; \ - os << cmd << ' '; \ - if (det_id != -1) { \ - throw RuntimeError("Cannot execute this at module level"); \ - } \ - if (action == slsDetectorDefs::HELP_ACTION) \ - os << HLPSTR << '\n'; \ - else if (action == slsDetectorDefs::GET_ACTION) { \ - if (!args.empty()) { \ - WrongNumberOfParameters(0); \ - } \ - auto t = det->GETFCN(); \ - os << OutString(t) << '\n'; \ - } else if (action == slsDetectorDefs::PUT_ACTION) { \ - if (args.size() != 1) { \ - WrongNumberOfParameters(1); \ - } \ - auto val = CONV(args[0]); \ - det->SETFCN(val); \ - os << args.front() << '\n'; \ - } else { \ - throw RuntimeError("Unknown action"); \ - } \ - return os.str(); \ - } - -/** int with index */ -#define INTEGER_IND_COMMAND(CMDNAME, GETFCN, SETFCN, CONV, INDEX, HLPSTR) \ - std::string CMDNAME(const int action) { \ - std::ostringstream os; \ - os << cmd << ' '; \ - if (action == slsDetectorDefs::HELP_ACTION) \ - os << HLPSTR << '\n'; \ - else if (action == slsDetectorDefs::GET_ACTION) { \ - if (!args.empty()) { \ - WrongNumberOfParameters(0); \ - } \ - auto t = det->GETFCN(INDEX, std::vector{det_id}); \ - os << OutString(t) << '\n'; \ - } else if (action == slsDetectorDefs::PUT_ACTION) { \ - if (args.size() != 1) { \ - WrongNumberOfParameters(1); \ - } \ - auto val = CONV(args[0]); \ - det->SETFCN(INDEX, val, std::vector{det_id}); \ - os << args.front() << '\n'; \ - } else { \ - throw RuntimeError("Unknown action"); \ - } \ - return os.str(); \ - } - -/** int with user index */ -#define INTEGER_USER_IND_COMMAND(CMDNAME, GETFCN, SETFCN, CONV, INDEX, HLPSTR) \ - std::string CMDNAME(const int action) { \ - std::ostringstream os; \ - os << cmd << ' '; \ - if (action == slsDetectorDefs::HELP_ACTION) \ - os << HLPSTR << '\n'; \ - else if (action == slsDetectorDefs::GET_ACTION) { \ - if (args.size() != 1) { \ - WrongNumberOfParameters(1); \ - } \ - auto t = det->GETFCN(INDEX, StringTo(args[0]), \ - std::vector{det_id}); \ - os << args[0] << ' ' << OutStringHex(t) << '\n'; \ - } else if (action == slsDetectorDefs::PUT_ACTION) { \ - if (args.size() != 2) { \ - WrongNumberOfParameters(2); \ - } \ - auto val = CONV(args[1]); \ - det->SETFCN(INDEX, StringTo(args[0]), val, \ - std::vector{det_id}); \ - os << args[0] << ' ' << args[1] << '\n'; \ - } else { \ - throw RuntimeError("Unknown action"); \ - } \ - return os.str(); \ - } - -/** set only, no arguments, no id */ -#define EXECUTE_SET_COMMAND_NOID(CMDNAME, SETFCN, HLPSTR) \ - std::string CMDNAME(const int action) { \ - std::ostringstream os; \ - os << cmd << ' '; \ - if (det_id != -1) { \ - throw RuntimeError("Cannot execute this at module level"); \ - } \ - if (action == slsDetectorDefs::HELP_ACTION) \ - os << HLPSTR << '\n'; \ - else if (action == slsDetectorDefs::GET_ACTION) { \ - throw RuntimeError("Cannot get"); \ - } else if (action == slsDetectorDefs::PUT_ACTION) { \ - if (!args.empty()) { \ - WrongNumberOfParameters(0); \ - } \ - det->SETFCN(); \ - os << "successful\n"; \ - } else { \ - throw RuntimeError("Unknown action"); \ - } \ - return os.str(); \ - } - -/** set only, no arguments */ -#define EXECUTE_SET_COMMAND(CMDNAME, SETFCN, HLPSTR) \ - std::string CMDNAME(const int action) { \ - std::ostringstream os; \ - os << cmd << ' '; \ - if (action == slsDetectorDefs::HELP_ACTION) \ - os << HLPSTR << '\n'; \ - else if (action == slsDetectorDefs::GET_ACTION) { \ - throw RuntimeError("Cannot get"); \ - } else if (action == slsDetectorDefs::PUT_ACTION) { \ - if (!args.empty()) { \ - WrongNumberOfParameters(0); \ - } \ - det->SETFCN(std::vector{det_id}); \ - os << "successful\n"; \ - } else { \ - throw RuntimeError("Unknown action"); \ - } \ - return os.str(); \ - } - -/** set only, 1 argument, no id */ -#define EXECUTE_SET_COMMAND_NOID_1ARG(CMDNAME, SETFCN, HLPSTR) \ - std::string CMDNAME(const int action) { \ - std::ostringstream os; \ - os << cmd << ' '; \ - if (det_id != -1) { \ - throw RuntimeError("Cannot execute this at module level"); \ - } \ - if (action == slsDetectorDefs::HELP_ACTION) \ - os << HLPSTR << '\n'; \ - else if (action == slsDetectorDefs::GET_ACTION) { \ - throw RuntimeError("Cannot get"); \ - } else if (action == slsDetectorDefs::PUT_ACTION) { \ - if (args.size() != 1) { \ - WrongNumberOfParameters(1); \ - } \ - det->SETFCN(args[0]); \ - os << args.front() << '\n'; \ - } else { \ - throw RuntimeError("Unknown action"); \ - } \ - return os.str(); \ - } - -/** set only, 1 argument */ -#define EXECUTE_SET_COMMAND_1ARG(CMDNAME, SETFCN, HLPSTR) \ - std::string CMDNAME(const int action) { \ - std::ostringstream os; \ - os << cmd << ' '; \ - if (action == slsDetectorDefs::HELP_ACTION) \ - os << HLPSTR << '\n'; \ - else if (action == slsDetectorDefs::GET_ACTION) { \ - throw RuntimeError("Cannot get"); \ - } else if (action == slsDetectorDefs::PUT_ACTION) { \ - if (args.size() != 1) { \ - WrongNumberOfParameters(1); \ - } \ - det->SETFCN(args[0], std::vector{det_id}); \ - os << args.front() << '\n'; \ - } else { \ - throw RuntimeError("Unknown action"); \ - } \ - return os.str(); \ - } - -/** get only */ -#define GET_COMMAND(CMDNAME, GETFCN, HLPSTR) \ - std::string CMDNAME(const int action) { \ - std::ostringstream os; \ - os << cmd << ' '; \ - if (action == slsDetectorDefs::HELP_ACTION) \ - os << HLPSTR << '\n'; \ - else if (action == slsDetectorDefs::GET_ACTION) { \ - if (!args.empty()) { \ - WrongNumberOfParameters(0); \ - } \ - auto t = det->GETFCN(std::vector{det_id}); \ - os << OutString(t) << '\n'; \ - } else if (action == slsDetectorDefs::PUT_ACTION) { \ - throw RuntimeError("Cannot put"); \ - } else { \ - throw RuntimeError("Unknown action"); \ - } \ - return os.str(); \ - } - -/** get only no id (vector, not result) */ -#define GET_COMMAND_NOID(CMDNAME, GETFCN, HLPSTR) \ - std::string CMDNAME(const int action) { \ - std::ostringstream os; \ - os << cmd << ' '; \ - if (action == slsDetectorDefs::HELP_ACTION) \ - os << HLPSTR << '\n'; \ - else if (action == slsDetectorDefs::GET_ACTION) { \ - if (!args.empty()) { \ - WrongNumberOfParameters(0); \ - } \ - auto t = det->GETFCN(); \ - os << ToString(t) << '\n'; \ - } else if (action == slsDetectorDefs::PUT_ACTION) { \ - throw RuntimeError("Cannot put"); \ - } else { \ - throw RuntimeError("Unknown action"); \ - } \ - return os.str(); \ - } - -/** get only hex*/ -#define GET_COMMAND_HEX(CMDNAME, GETFCN, HLPSTR) \ - std::string CMDNAME(const int action) { \ - std::ostringstream os; \ - os << cmd << ' '; \ - if (action == slsDetectorDefs::HELP_ACTION) \ - os << HLPSTR << '\n'; \ - else if (action == slsDetectorDefs::GET_ACTION) { \ - if (!args.empty()) { \ - WrongNumberOfParameters(0); \ - } \ - auto t = det->GETFCN(std::vector{det_id}); \ - os << OutStringHex(t) << '\n'; \ - } else if (action == slsDetectorDefs::PUT_ACTION) { \ - throw RuntimeError("Cannot put"); \ - } else { \ - throw RuntimeError("Unknown action"); \ - } \ - return os.str(); \ - } - -#define GET_IND_COMMAND(CMDNAME, GETFCN, VAL, APPEND, HLPSTR) \ - std::string CMDNAME(const int action) { \ - std::ostringstream os; \ - os << cmd << ' '; \ - if (action == slsDetectorDefs::HELP_ACTION) \ - os << HLPSTR << '\n'; \ - else if (action == slsDetectorDefs::GET_ACTION) { \ - if (!args.empty()) { \ - WrongNumberOfParameters(0); \ - } \ - auto t = det->GETFCN(VAL, std::vector{det_id}); \ - os << OutString(t) << APPEND << '\n'; \ - } else if (action == slsDetectorDefs::PUT_ACTION) { \ - throw RuntimeError("Cannot put"); \ - } else { \ - throw RuntimeError("Unknown action"); \ - } \ - return os.str(); \ - } - -#define CTB_NAMED_LIST(CMDNAME, GETFCN, SETFCN, HLPSTR) \ - std::string CMDNAME(const int action) { \ - std::ostringstream os; \ - os << cmd << ' '; \ - if (action == slsDetectorDefs::HELP_ACTION) { \ - os << HLPSTR << '\n'; \ - return os.str(); \ - } \ - if (cmd != "daclist" && \ - det->getDetectorType().squash() != defs::CHIPTESTBOARD) { \ - throw RuntimeError(cmd + " only allowed for CTB."); \ - } \ - if (det_id != -1) { \ - throw RuntimeError("Cannot configure " + cmd + \ - " at module level"); \ - } \ - if (action == slsDetectorDefs::GET_ACTION) { \ - if (!args.empty()) { \ - WrongNumberOfParameters(0); \ - } \ - auto t = det->GETFCN(); \ - os << ToString(t) << '\n'; \ - } else if (action == slsDetectorDefs::PUT_ACTION) { \ - if (cmd == "daclist" && \ - det->getDetectorType().squash() != defs::CHIPTESTBOARD) { \ - throw RuntimeError("This detector already has fixed dac " \ - "names. Cannot change them."); \ - } \ - det->SETFCN(args); \ - os << ToString(args) << '\n'; \ - } else { \ - throw RuntimeError("Unknown action"); \ - } \ - return os.str(); \ - } - -#define CTB_VALUES(CMDNAME, GETFCN, GETFCNLIST, GETFCNNAME, HLPSTR) \ - std::string CMDNAME(const int action) { \ - std::ostringstream os; \ - os << cmd << ' '; \ - if (action == slsDetectorDefs::HELP_ACTION) { \ - os << HLPSTR << '\n'; \ - return os.str(); \ - } \ - if (action == slsDetectorDefs::GET_ACTION) { \ - if (!args.empty()) { \ - WrongNumberOfParameters(0); \ - } \ - std::string suffix = " mV"; \ - auto t = det->GETFCNLIST(); \ - auto names = det->GETFCNNAME(); \ - auto name_it = names.begin(); \ - os << '['; \ - auto it = t.cbegin(); \ - os << ToString(*name_it++) << ' '; \ - os << OutString(det->GETFCN(*it++, std::vector{det_id})) \ - << suffix; \ - while (it != t.cend()) { \ - os << ", " << ToString(*name_it++) << ' '; \ - os << OutString(det->GETFCN(*it++, std::vector{det_id})) \ - << suffix; \ - } \ - os << "]\n"; \ - } else if (action == slsDetectorDefs::PUT_ACTION) { \ - throw RuntimeError("Cannot put"); \ - } else { \ - throw RuntimeError("Unknown action"); \ - } \ - return os.str(); \ - } - -#define CTB_SINGLE_DACNAME(CMDNAME, GETFCN, SETFCN, STARTINDEX, HLPSTR) \ - std::string CMDNAME(const int action) { \ - std::ostringstream os; \ - os << cmd << ' '; \ - if (action == slsDetectorDefs::HELP_ACTION) { \ - os << HLPSTR << '\n'; \ - return os.str(); \ - } \ - if (det->getDetectorType().squash() != defs::CHIPTESTBOARD) { \ - throw RuntimeError(cmd + " only allowed for CTB."); \ - } \ - if (det_id != -1) { \ - throw RuntimeError("Cannot configure " + cmd + \ - " at module level"); \ - } \ - defs::dacIndex index = defs::DAC_0; \ - if (args.size() > 0) { \ - index = static_cast(StringTo(args[0]) + \ - STARTINDEX); \ - } \ - if (action == slsDetectorDefs::GET_ACTION) { \ - if (args.size() != 1) { \ - WrongNumberOfParameters(1); \ - } \ - auto t = det->GETFCN(index); \ - os << args[0] << ' ' << t << '\n'; \ - } else if (action == slsDetectorDefs::PUT_ACTION) { \ - if (args.size() != 2) { \ - WrongNumberOfParameters(2); \ - } \ - det->SETFCN(index, args[1]); \ - os << ToString(args) << '\n'; \ - } else { \ - throw RuntimeError("Unknown action"); \ - } \ - return os.str(); \ - } - -#define CTB_GET_DACINDEX(CMDNAME, GETFCN, STARTINDEX, HLPSTR) \ - std::string CMDNAME(const int action) { \ - std::ostringstream os; \ - os << cmd << ' '; \ - if (action == slsDetectorDefs::HELP_ACTION) { \ - os << HLPSTR << '\n'; \ - return os.str(); \ - } \ - if (det->getDetectorType().squash() != defs::CHIPTESTBOARD) { \ - throw RuntimeError(cmd + " only allowed for CTB."); \ - } \ - if (det_id != -1) { \ - throw RuntimeError("Cannot configure " + cmd + \ - " at module level"); \ - } \ - if (action == slsDetectorDefs::GET_ACTION) { \ - if (args.size() != 1) { \ - WrongNumberOfParameters(1); \ - } \ - auto t = det->GETFCN(args[0]); \ - os << ToString(static_cast(t) - STARTINDEX) << '\n'; \ - } else if (action == slsDetectorDefs::PUT_ACTION) { \ - throw RuntimeError("Cannot put"); \ - } else { \ - throw RuntimeError("Unknown action"); \ - } \ - return os.str(); \ - } - -#define CTB_SINGLE_NAME(CMDNAME, GETFCN, SETFCN, HLPSTR) \ - std::string CMDNAME(const int action) { \ - std::ostringstream os; \ - os << cmd << ' '; \ - if (action == slsDetectorDefs::HELP_ACTION) { \ - os << HLPSTR << '\n'; \ - return os.str(); \ - } \ - if (det->getDetectorType().squash() != defs::CHIPTESTBOARD) { \ - throw RuntimeError(cmd + " only allowed for CTB."); \ - } \ - if (det_id != -1) { \ - throw RuntimeError("Cannot configure " + cmd + \ - " at module level"); \ - } \ - if (action == slsDetectorDefs::GET_ACTION) { \ - if (args.size() != 1) { \ - WrongNumberOfParameters(1); \ - } \ - auto t = det->GETFCN(StringTo(args[0])); \ - os << args[0] << ' ' << t << '\n'; \ - } else if (action == slsDetectorDefs::PUT_ACTION) { \ - if (args.size() != 2) { \ - WrongNumberOfParameters(2); \ - } \ - det->SETFCN(StringTo(args[0]), args[1]); \ - os << ToString(args) << '\n'; \ - } else { \ - throw RuntimeError("Unknown action"); \ - } \ - return os.str(); \ - } - -#define CTB_GET_INDEX(CMDNAME, GETFCN, HLPSTR) \ - std::string CMDNAME(const int action) { \ - std::ostringstream os; \ - os << cmd << ' '; \ - if (action == slsDetectorDefs::HELP_ACTION) { \ - os << HLPSTR << '\n'; \ - return os.str(); \ - } \ - if (det->getDetectorType().squash() != defs::CHIPTESTBOARD) { \ - throw RuntimeError(cmd + " only allowed for CTB."); \ - } \ - if (det_id != -1) { \ - throw RuntimeError("Cannot configure " + cmd + \ - " at module level"); \ - } \ - if (action == slsDetectorDefs::GET_ACTION) { \ - if (args.size() != 1) { \ - WrongNumberOfParameters(1); \ - } \ - auto t = det->GETFCN(args[0]); \ - os << ToString(static_cast(t)) << '\n'; \ - } else if (action == slsDetectorDefs::PUT_ACTION) { \ - throw RuntimeError("Cannot put"); \ - } else { \ - throw RuntimeError("Unknown action"); \ - } \ - return os.str(); \ - } - -class CmdProxy { - public: - explicit CmdProxy(Detector *ptr) : det(ptr) {} - - void Call(const std::string &command, - const std::vector &arguments, int detector_id = -1, - int action = -1, std::ostream &os = std::cout, - int receiver_id = -1); - - bool ReplaceIfDepreciated(std::string &command); - size_t GetFunctionMapSize() const noexcept { return functions.size(); }; - std::vector GetProxyCommands(); - std::map GetDepreciatedCommands(); - - private: - Detector *det; - std::string cmd; - std::vector args; - int det_id{-1}; - int rx_id{-1}; - - template std::string OutStringHex(const V &value) { - if (value.equal()) - return ToStringHex(value.front()); - return ToStringHex(value); - } - - template std::string OutStringHex(const V &value, int width) { - if (value.equal()) - return ToStringHex(value.front(), width); - return ToStringHex(value, width); - } - - template std::string OutString(const Result &value) { - if (value.equal()) - return ToString(value.front()); - return ToString(value); - } - - template std::string OutString(const V &value) { - return ToString(value); - } - - template - std::string OutString(const V &value, const std::string &unit) { - if (value.equal()) - return ToString(value.front(), unit); - return ToString(value, unit); - } - - using FunctionMap = std::map; - using StringMap = std::map; - - StringMap depreciated_functions{ - /* configuration */ - {"detectorversion", "firmwareversion"}, - {"softwareversion", "detectorserverversion"}, - {"receiverversion", "rx_version"}, - {"detectornumber", "serialnumber"}, - {"thisversion", "clientversion"}, - {"detsizechan", "detsize"}, - {"trimdir", "settingspath"}, - {"settingsdir", "settingspath"}, - {"flippeddatax", "fliprows"}, - - /* acquisition parameters */ - {"cycles", "triggers"}, - {"cyclesl", "triggersl"}, - {"clkdivider", "readoutspeed"}, - {"speed", "readoutspeed"}, - {"vhighvoltage", "highvoltage"}, - {"digitest", "imagetest"}, - {"filter", "filterresistor"}, - {"readnlines", "readnrows"}, - - /** temperature */ - - /** super old dacs */ - {"vtr", "vtrim"}, - {"vrf", "vrpreamp"}, - {"vrs", "vrshaper"}, - {"vcall", "vcal"}, - {"vis", "vishaper"}, - {"vshaper", "vrshaper"}, - {"vpreamp", "vrpreamp"}, - {"vshaperneg", "vrshaper_n"}, - {"viinsh", "vishaper"}, - {"vpl", "vcal_n"}, - {"vph", "vcal_p"}, - /** dacs */ - {"vthreshold", "dac"}, - {"vsvp", "dac"}, - {"vsvn", "dac"}, - {"vtrim", "dac"}, - {"vrpreamp", "dac"}, - {"vrshaper", "dac"}, - {"vtgstv", "dac"}, - {"vcmp_ll", "dac"}, - {"vcmp_lr", "dac"}, - {"vcal", "dac"}, - {"vcmp_rl", "dac"}, - {"vcmp_rr", "dac"}, - {"rxb_rb", "dac"}, - {"rxb_lb", "dac"}, - {"vcp", "dac"}, - {"vcn", "dac"}, - {"vishaper", "dac"}, - {"iodelay", "dac"}, - {"vref_ds", "dac"}, - {"vcascn_pb", "dac"}, - {"vcascp_pb", "dac"}, - {"vout_cm", "dac"}, - {"vcasc_out", "dac"}, - {"vin_cm", "dac"}, - {"vref_comp", "dac"}, - {"ib_test_c", "dac"}, - {"vrshaper_n", "dac"}, - {"vipre", "dac"}, - {"vdcsh", "dac"}, - {"vth1", "dac"}, - {"vth2", "dac"}, - {"vth3", "dac"}, - {"vcal_n", "dac"}, - {"vcal_p", "dac"}, - {"vcassh", "dac"}, - {"vcas", "dac"}, - {"vicin", "dac"}, - {"vipre_out", "dac"}, - {"vref_h_adc", "dac"}, - {"vb_comp_fe", "dac"}, - {"vb_comp_adc", "dac"}, - {"vcom_cds", "dac"}, - {"vref_rstore", "dac"}, - {"vb_opa_1st", "dac"}, - {"vref_comp_fe", "dac"}, - {"vcom_adc1", "dac"}, - {"vref_prech", "dac"}, - {"vref_l_adc", "dac"}, - {"vref_cds", "dac"}, - {"vb_cs", "dac"}, - {"vb_opa_fd", "dac"}, - {"vcom_adc2", "dac"}, - {"vb_ds", "dac"}, - {"vb_comp", "dac"}, - {"vb_pixbuf", "dac"}, - {"vin_com", "dac"}, - {"vdd_prot", "dac"}, - {"vbp_colbuf", "dac"}, - {"vb_sda", "dac"}, - {"vcasc_sfp", "dac"}, - {"vipre_cds", "dac"}, - {"ibias_sfp", "dac"}, - - {"defaultdacs", "resetdacs"}, - - /* acquisition */ - {"busy", "clearbusy"}, - {"receiver", "rx_status"}, - {"framescaught", "rx_framescaught"}, - {"startingfnum", "nextframenumber"}, - - /* Network Configuration (Detector<->Receiver) */ - {"detectorip", "udp_srcip"}, - {"detectorip2", "udp_srcip2"}, - {"detectormac", "udp_srcmac"}, - {"detectormac2", "udp_srcmac2"}, - {"rx_udpip", "udp_dstip"}, - {"rx_udpip2", "udp_dstip2"}, - {"rx_udpmac", "udp_dstmac"}, - {"rx_udpmac2", "udp_dstmac2"}, - {"rx_udpport", "udp_dstport"}, - {"rx_udpport2", "udp_dstport2"}, - {"flowcontrol_10g", "flowcontrol10g"}, - {"txndelay_frame", "txdelay_frame"}, - {"txndelay_left", "txdelay_left"}, - {"txndelay_right", "txdelay_right"}, - - /* Receiver Config */ - {"r_silent", "rx_silent"}, - {"r_discardpolicy", "rx_discardpolicy"}, - {"r_padding", "rx_padding"}, - {"r_lock", "rx_lock"}, - {"r_lastclient", "rx_lastclient"}, - - /* File */ - {"fileformat", "fformat"}, - {"outdir", "fpath"}, - {"index", "findex"}, - {"enablefwrite", "fwrite"}, - {"masterfile", "fmaster"}, - {"overwrite", "foverwrite"}, - {"r_framesperfile", "rx_framesperfile"}, - - /* ZMQ Streaming Parameters (Receiver<->Client) */ - {"r_readfreq", "rx_zmqfreq"}, - {"rx_readfreq", "rx_zmqfreq"}, - {"rx_datastream", "rx_zmqstream"}, - - /* Eiger Specific */ - {"resmat", "partialreset"}, - - /* Jungfrau Specific */ - {"storagecells", "extrastoragecells"}, - {"auto_comp_disable", "autocompdisable"}, - {"comp_disable_time", "compdisabletime"}, - - /* Gotthard Specific */ - /* Gotthard2 Specific */ - /* Mythen3 Specific */ - /* CTB Specific */ - {"adc", "slowadc"}, - {"flags", "romode"}, - {"i_a", "im_a"}, - {"i_b", "im_b"}, - {"i_c", "im_c"}, - {"i_d", "im_d"}, - {"i_io", "im_io"}, - - /* Pattern */ - /* Moench */ - - /* Advanced */ - {"copydetectorserver", "updatedetectorserver"}, - - /* Insignificant */ - {"nframes", "framecounter"}, - {"now", "runtime"}, - {"timestamp", "frametime"}, - {"frameindex", "rx_frameindex"} - - }; - - // Initialize maps for translating name and function - FunctionMap functions{ - {"list", &CmdProxy::ListCommands}, - - /* configuration */ - {"config", &CmdProxy::config}, - {"free", &CmdProxy::Free}, - {"parameters", &CmdProxy::parameters}, - {"hostname", &CmdProxy::Hostname}, - {"virtual", &CmdProxy::VirtualServer}, - {"versions", &CmdProxy::Versions}, - {"packageversion", &CmdProxy::PackageVersion}, - {"clientversion", &CmdProxy::ClientVersion}, - {"firmwareversion", &CmdProxy::FirmwareVersion}, - {"hardwareversion", &CmdProxy::hardwareversion}, - {"detectorserverversion", &CmdProxy::detectorserverversion}, - {"kernelversion", &CmdProxy::kernelversion}, - {"rx_version", &CmdProxy::rx_version}, - {"serialnumber", &CmdProxy::serialnumber}, - {"moduleid", &CmdProxy::moduleid}, - {"type", &CmdProxy::type}, - {"nmod", &CmdProxy::nmod}, - {"detsize", &CmdProxy::DetectorSize}, - {"settingslist", &CmdProxy::settingslist}, - {"settings", &CmdProxy::settings}, - {"threshold", &CmdProxy::Threshold}, - {"thresholdnotb", &CmdProxy::Threshold}, - {"settingspath", &CmdProxy::settingspath}, - {"trimbits", &CmdProxy::Trimbits}, - {"trimval", &CmdProxy::trimval}, - {"trimen", &CmdProxy::TrimEnergies}, - {"gappixels", &CmdProxy::GapPixels}, - {"fliprows", &CmdProxy::fliprows}, - {"master", &CmdProxy::master}, - {"sync", &CmdProxy::sync}, - {"badchannels", &CmdProxy::BadChannels}, - {"row", &CmdProxy::row}, - {"column", &CmdProxy::column}, - - /* acquisition parameters */ - {"acquire", &CmdProxy::Acquire}, - {"frames", &CmdProxy::frames}, - {"triggers", &CmdProxy::triggers}, - {"exptime", &CmdProxy::Exptime}, - {"period", &CmdProxy::period}, - {"delay", &CmdProxy::delay}, - {"framesl", &CmdProxy::framesl}, - {"triggersl", &CmdProxy::triggersl}, - {"delayl", &CmdProxy::delayl}, - {"periodl", &CmdProxy::periodl}, - {"dr", &CmdProxy::dr}, - {"drlist", &CmdProxy::drlist}, - {"timing", &CmdProxy::timing}, - {"timinglist", &CmdProxy::timinglist}, - {"readoutspeed", &CmdProxy::ReadoutSpeed}, - {"readoutspeedlist", &CmdProxy::readoutspeedlist}, - {"adcphase", &CmdProxy::Adcphase}, - {"maxadcphaseshift", &CmdProxy::maxadcphaseshift}, - {"dbitphase", &CmdProxy::Dbitphase}, - {"maxdbitphaseshift", &CmdProxy::maxdbitphaseshift}, - {"clkfreq", &CmdProxy::ClockFrequency}, - {"clkphase", &CmdProxy::ClockPhase}, - {"maxclkphaseshift", &CmdProxy::MaxClockPhaseShift}, - {"clkdiv", &CmdProxy::ClockDivider}, - {"highvoltage", &CmdProxy::highvoltage}, - {"powerchip", &CmdProxy::powerchip}, - {"imagetest", &CmdProxy::imagetest}, - {"extsig", &CmdProxy::ExternalSignal}, - {"parallel", &CmdProxy::parallel}, - {"filterresistor", &CmdProxy::filterresistor}, - {"currentsource", &CmdProxy::CurrentSource}, - {"dbitpipeline", &CmdProxy::dbitpipeline}, - {"readnrows", &CmdProxy::readnrows}, - - /** temperature */ - {"templist", &CmdProxy::templist}, - {"tempvalues", &CmdProxy::TemperatureValues}, - {"temp_adc", &CmdProxy::temp_adc}, - {"temp_fpga", &CmdProxy::temp_fpga}, - {"temp_fpgaext", &CmdProxy::temp_fpgaext}, - {"temp_10ge", &CmdProxy::temp_10ge}, - {"temp_dcdc", &CmdProxy::temp_dcdc}, - {"temp_sodl", &CmdProxy::temp_sodl}, - {"temp_sodr", &CmdProxy::temp_sodr}, - {"temp_fpgafl", &CmdProxy::temp_fpgafl}, - {"temp_fpgafr", &CmdProxy::temp_fpgafr}, - {"temp_slowadc", &CmdProxy::temp_slowadc}, - - /* lists */ - {"daclist", &CmdProxy::daclist}, - {"dacname", &CmdProxy::dacname}, - {"dacindex", &CmdProxy::dacindex}, - {"adclist", &CmdProxy::adclist}, - {"adcname", &CmdProxy::adcname}, - {"adcindex", &CmdProxy::adcindex}, - {"signallist", &CmdProxy::signallist}, - {"signalname", &CmdProxy::signalname}, - {"signalindex", &CmdProxy::signalindex}, - {"powerlist", &CmdProxy::powerlist}, - {"powername", &CmdProxy::powername}, - {"powerindex", &CmdProxy::powerindex}, - {"powervalues", &CmdProxy::powervalues}, - {"slowadclist", &CmdProxy::slowadclist}, - {"slowadcname", &CmdProxy::slowadcname}, - {"slowadcindex", &CmdProxy::slowadcindex}, - {"slowadcvalues", &CmdProxy::slowadcvalues}, - - /* dacs */ - {"dac", &CmdProxy::Dac}, - {"dacvalues", &CmdProxy::DacValues}, - {"resetdacs", &CmdProxy::ResetDacs}, - {"defaultdac", &CmdProxy::DefaultDac}, - - /* on chip dacs */ - {"vchip_comp_fe", &CmdProxy::vchip_comp_fe}, - {"vchip_opa_1st", &CmdProxy::vchip_opa_1st}, - {"vchip_opa_fd", &CmdProxy::vchip_opa_fd}, - {"vchip_comp_adc", &CmdProxy::vchip_comp_adc}, - {"vchip_ref_comp_fe", &CmdProxy::vchip_ref_comp_fe}, - {"vchip_cs", &CmdProxy::vchip_cs}, - - /* acquisition */ - {"clearbusy", &CmdProxy::clearbusy}, - {"rx_start", &CmdProxy::rx_start}, - {"rx_stop", &CmdProxy::rx_stop}, - {"start", &CmdProxy::start}, - {"readout", &CmdProxy::readout}, - {"stop", &CmdProxy::stop}, - {"rx_status", &CmdProxy::ReceiverStatus}, - {"status", &CmdProxy::DetectorStatus}, - {"rx_framescaught", &CmdProxy::rx_framescaught}, - {"rx_missingpackets", &CmdProxy::rx_missingpackets}, - {"rx_frameindex", &CmdProxy::rx_frameindex}, - {"nextframenumber", &CmdProxy::nextframenumber}, - {"trigger", &CmdProxy::Trigger}, - {"scan", &CmdProxy::Scan}, - {"scanerrmsg", &CmdProxy::scanerrmsg}, - - /* Network Configuration (Detector<->Receiver) */ - {"numinterfaces", &CmdProxy::numinterfaces}, - {"selinterface", &CmdProxy::selinterface}, - {"udp_dstlist", &CmdProxy::UDPDestinationList}, - {"udp_numdst", &CmdProxy::udp_numdst}, - {"udp_cleardst", &CmdProxy::udp_cleardst}, - {"udp_firstdst", &CmdProxy::udp_firstdst}, - {"udp_srcip", &CmdProxy::UDPSourceIP}, - {"udp_srcip2", &CmdProxy::UDPSourceIP2}, - {"udp_dstip", &CmdProxy::UDPDestinationIP}, - {"udp_dstip2", &CmdProxy::UDPDestinationIP2}, - {"udp_srcmac", &CmdProxy::udp_srcmac}, - {"udp_srcmac2", &CmdProxy::udp_srcmac2}, - {"udp_dstmac", &CmdProxy::udp_dstmac}, - {"udp_dstmac2", &CmdProxy::udp_dstmac2}, - {"udp_dstport", &CmdProxy::udp_dstport}, - {"udp_dstport2", &CmdProxy::udp_dstport2}, - {"udp_reconfigure", &CmdProxy::udp_reconfigure}, - {"udp_validate", &CmdProxy::udp_validate}, - {"rx_printconfig", &CmdProxy::rx_printconfig}, - {"tengiga", &CmdProxy::tengiga}, - {"flowcontrol10g", &CmdProxy::flowcontrol10g}, - {"txdelay_frame", &CmdProxy::txdelay_frame}, - {"txdelay_left", &CmdProxy::txdelay_left}, - {"txdelay_right", &CmdProxy::txdelay_right}, - {"txdelay", &CmdProxy::TransmissionDelay}, - - /* Receiver Config */ - {"rx_hostname", &CmdProxy::ReceiverHostname}, - {"rx_tcpport", &CmdProxy::rx_tcpport}, - {"rx_fifodepth", &CmdProxy::rx_fifodepth}, - {"rx_silent", &CmdProxy::rx_silent}, - {"rx_discardpolicy", &CmdProxy::rx_discardpolicy}, - {"rx_padding", &CmdProxy::rx_padding}, - {"rx_udpsocksize", &CmdProxy::rx_udpsocksize}, - {"rx_realudpsocksize", &CmdProxy::rx_realudpsocksize}, - {"rx_lock", &CmdProxy::rx_lock}, - {"rx_lastclient", &CmdProxy::rx_lastclient}, - {"rx_threads", &CmdProxy::rx_threads}, - {"rx_arping", &CmdProxy::rx_arping}, - {"rx_roi", &CmdProxy::Rx_ROI}, - {"rx_clearroi", &CmdProxy::rx_clearroi}, - - /* File */ - {"fformat", &CmdProxy::fformat}, - {"fpath", &CmdProxy::fpath}, - {"fname", &CmdProxy::fname}, - {"findex", &CmdProxy::findex}, - {"fwrite", &CmdProxy::fwrite}, - {"fmaster", &CmdProxy::fmaster}, - {"foverwrite", &CmdProxy::foverwrite}, - {"rx_framesperfile", &CmdProxy::rx_framesperfile}, - - /* ZMQ Streaming Parameters (Receiver<->Client) */ - {"rx_zmqstream", &CmdProxy::rx_zmqstream}, - {"rx_zmqfreq", &CmdProxy::rx_zmqfreq}, - {"rx_zmqstartfnum", &CmdProxy::rx_zmqstartfnum}, - {"rx_zmqport", &CmdProxy::rx_zmqport}, - {"zmqport", &CmdProxy::zmqport}, - {"rx_zmqip", &CmdProxy::rx_zmqip}, - {"zmqip", &CmdProxy::zmqip}, - {"zmqhwm", &CmdProxy::ZMQHWM}, - {"rx_zmqhwm", &CmdProxy::rx_zmqhwm}, - - /* Eiger Specific */ - {"blockingtrigger", &CmdProxy::Trigger}, - {"subexptime", &CmdProxy::subexptime}, - {"subdeadtime", &CmdProxy::subdeadtime}, - {"overflow", &CmdProxy::overflow}, - {"ratecorr", &CmdProxy::RateCorrection}, - {"interruptsubframe", &CmdProxy::interruptsubframe}, - {"measuredperiod", &CmdProxy::measuredperiod}, - {"measuredsubperiod", &CmdProxy::measuredsubperiod}, - {"activate", &CmdProxy::activate}, - {"partialreset", &CmdProxy::partialreset}, - {"pulse", &CmdProxy::PulsePixel}, - {"pulsenmove", &CmdProxy::PulsePixelAndMove}, - {"pulsechip", &CmdProxy::PulseChip}, - {"quad", &CmdProxy::Quad}, - {"datastream", &CmdProxy::DataStream}, - {"top", &CmdProxy::top}, - - /* Jungfrau Specific */ - {"chipversion", &CmdProxy::chipversion}, - {"temp_threshold", &CmdProxy::temp_threshold}, - {"temp_control", &CmdProxy::temp_control}, - {"temp_event", &CmdProxy::TemperatureEvent}, - {"autocompdisable", &CmdProxy::autocompdisable}, - {"compdisabletime", &CmdProxy::compdisabletime}, - {"extrastoragecells", &CmdProxy::extrastoragecells}, - {"storagecell_start", &CmdProxy::storagecell_start}, - {"storagecell_delay", &CmdProxy::storagecell_delay}, - {"gainmode", &CmdProxy::gainmode}, - {"filtercells", &CmdProxy::filtercells}, - {"pedestalmode", &CmdProxy::PedestalMode}, - - /* Gotthard Specific */ - {"roi", &CmdProxy::ROI}, - {"clearroi", &CmdProxy::clearroi}, - {"exptimel", &CmdProxy::exptimel}, - - /* Gotthard2 Specific */ - {"bursts", &CmdProxy::bursts}, - {"burstperiod", &CmdProxy::burstperiod}, - {"burstsl", &CmdProxy::burstsl}, - {"inj_ch", &CmdProxy::InjectChannel}, - {"vetophoton", &CmdProxy::VetoPhoton}, - {"vetoref", &CmdProxy::VetoReference}, - {"vetofile", &CmdProxy::VetoFile}, - {"burstmode", &CmdProxy::BurstMode}, - {"cdsgain", &CmdProxy::cdsgain}, - {"timingsource", &CmdProxy::timingsource}, - {"veto", &CmdProxy::veto}, - {"vetostream", &CmdProxy::VetoStreaming}, - {"vetoalg", &CmdProxy::VetoAlgorithm}, - {"confadc", &CmdProxy::ConfigureADC}, - - /* Mythen3 Specific */ - {"counters", &CmdProxy::Counters}, - {"gates", &CmdProxy::gates}, - {"exptime1", &CmdProxy::Exptime}, - {"exptime2", &CmdProxy::Exptime}, - {"exptime3", &CmdProxy::Exptime}, - {"gatedelay", &CmdProxy::GateDelay}, - {"gatedelay1", &CmdProxy::GateDelay}, - {"gatedelay2", &CmdProxy::GateDelay}, - {"gatedelay3", &CmdProxy::GateDelay}, - {"gaincaps", &CmdProxy::GainCaps}, - {"polarity", &CmdProxy::polarity}, - {"interpolation", &CmdProxy::interpolation}, - {"pumpprobe", &CmdProxy::pumpprobe}, - {"apulse", &CmdProxy::apulse}, - {"dpulse", &CmdProxy::dpulse}, - - /* CTB Specific */ - {"samples", &CmdProxy::Samples}, - {"asamples", &CmdProxy::asamples}, - {"adcclk", &CmdProxy::adcclk}, - {"runclk", &CmdProxy::runclk}, - {"syncclk", &CmdProxy::syncclk}, - {"v_limit", &CmdProxy::v_limit}, - {"adcenable", &CmdProxy::adcenable}, - {"adcenable10g", &CmdProxy::adcenable10g}, - {"transceiverenable", &CmdProxy::transceiverenable}, - {"dsamples", &CmdProxy::dsamples}, - {"tsamples", &CmdProxy::tsamples}, - {"romode", &CmdProxy::romode}, - {"dbitclk", &CmdProxy::dbitclk}, - {"adcvpp", &CmdProxy::AdcVpp}, - {"v_a", &CmdProxy::v_a}, - {"v_b", &CmdProxy::v_b}, - {"v_c", &CmdProxy::v_c}, - {"v_d", &CmdProxy::v_d}, - {"v_io", &CmdProxy::v_io}, - {"v_chip", &CmdProxy::v_chip}, - {"vm_a", &CmdProxy::vm_a}, - {"vm_b", &CmdProxy::vm_b}, - {"vm_c", &CmdProxy::vm_c}, - {"vm_d", &CmdProxy::vm_d}, - {"vm_io", &CmdProxy::vm_io}, - {"im_a", &CmdProxy::im_a}, - {"im_b", &CmdProxy::im_b}, - {"im_c", &CmdProxy::im_c}, - {"im_d", &CmdProxy::im_d}, - {"im_io", &CmdProxy::im_io}, - {"slowadc", &CmdProxy::SlowADC}, - {"extsampling", &CmdProxy::extsampling}, - {"extsamplingsrc", &CmdProxy::extsamplingsrc}, - {"rx_dbitlist", &CmdProxy::ReceiverDbitList}, - {"rx_dbitoffset", &CmdProxy::rx_dbitoffset}, - {"diodelay", &CmdProxy::DigitalIODelay}, - {"led", &CmdProxy::led}, - - /* Pattern */ - {"pattern", &CmdProxy::Pattern}, - {"patfname", &CmdProxy::patfname}, - {"savepattern", &CmdProxy::savepattern}, - {"defaultpattern", &CmdProxy::defaultpattern}, - {"patioctrl", &CmdProxy::patioctrl}, - {"patword", &CmdProxy::PatternWord}, - {"patlimits", &CmdProxy::PatternLoopAddresses}, - {"patloop", &CmdProxy::PatternLoopAddresses}, - {"patloop0", &CmdProxy::PatternLoopAddresses}, - {"patloop1", &CmdProxy::PatternLoopAddresses}, - {"patloop2", &CmdProxy::PatternLoopAddresses}, - {"patnloop", &CmdProxy::PatternLoopCycles}, - {"patnloop0", &CmdProxy::PatternLoopCycles}, - {"patnloop1", &CmdProxy::PatternLoopCycles}, - {"patnloop2", &CmdProxy::PatternLoopCycles}, - {"patwait", &CmdProxy::PatternWaitAddress}, - {"patwait0", &CmdProxy::PatternWaitAddress}, - {"patwait1", &CmdProxy::PatternWaitAddress}, - {"patwait2", &CmdProxy::PatternWaitAddress}, - {"patwaittime", &CmdProxy::PatternWaitTime}, - {"patwaittime0", &CmdProxy::PatternWaitTime}, - {"patwaittime1", &CmdProxy::PatternWaitTime}, - {"patwaittime2", &CmdProxy::PatternWaitTime}, - {"patmask", &CmdProxy::patmask}, - {"patsetbit", &CmdProxy::patsetbit}, - {"patternstart", &CmdProxy::patternstart}, - - /* Moench */ - - /* Advanced */ - {"adcpipeline", &CmdProxy::adcpipeline}, - {"rx_jsonaddheader", &CmdProxy::AdditionalJsonHeader}, - {"rx_jsonpara", &CmdProxy::JsonParameter}, - {"programfpga", &CmdProxy::ProgramFpga}, - {"resetfpga", &CmdProxy::resetfpga}, - {"updatedetectorserver", &CmdProxy::UpdateDetectorServer}, - {"updatekernel", &CmdProxy::UpdateKernel}, - {"rebootcontroller", &CmdProxy::rebootcontroller}, - {"update", &CmdProxy::UpdateFirmwareAndDetectorServer}, - {"updatemode", &CmdProxy::updatemode}, - {"reg", &CmdProxy::Register}, - {"adcreg", &CmdProxy::AdcRegister}, - {"setbit", &CmdProxy::BitOperations}, - {"clearbit", &CmdProxy::BitOperations}, - {"getbit", &CmdProxy::BitOperations}, - {"firmwaretest", &CmdProxy::firmwaretest}, - {"bustest", &CmdProxy::bustest}, - {"initialchecks", &CmdProxy::InitialChecks}, - {"adcinvert", &CmdProxy::adcinvert}, - - /* Insignificant */ - {"port", &CmdProxy::port}, - {"stopport", &CmdProxy::stopport}, - {"lock", &CmdProxy::lock}, - {"lastclient", &CmdProxy::lastclient}, - {"execcommand", &CmdProxy::ExecuteCommand}, - {"framecounter", &CmdProxy::framecounter}, - {"runtime", &CmdProxy::runtime}, - {"frametime", &CmdProxy::frametime}, - {"user", &CmdProxy::UserDetails} - - }; - - void WrongNumberOfParameters(size_t expected); - - /* Commands */ - std::string ListCommands(int action); - /* configuration */ - std::string Free(int action); - // std::string config2(int action); - std::string Hostname(int action); - std::string VirtualServer(int action); - std::string FirmwareVersion(int action); - std::string Versions(int action); - std::string PackageVersion(int action); - std::string ClientVersion(int action); - std::string DetectorSize(int action); - std::string Threshold(int action); - std::string Trimbits(int action); - std::string TrimEnergies(int action); - std::string GapPixels(int action); - std::string BadChannels(int action); - /* acquisition parameters */ - static void EmptyDataCallBack(detectorData *data, uint64_t frameIndex, - uint32_t subFrameIndex, void *this_pointer); - std::string Acquire(int action); - std::string Exptime(int action); - std::string ReadoutSpeed(int action); - std::string Adcphase(int action); - std::string Dbitphase(int action); - std::string ClockFrequency(int action); - std::string ClockPhase(int action); - std::string MaxClockPhaseShift(int action); - std::string ClockDivider(int action); - std::string ExternalSignal(int action); - std::string CurrentSource(int action); - /** temperature */ - std::string TemperatureValues(int action); - /* list */ - /* dacs */ - std::string Dac(int action); - std::string DacValues(int action); - std::string ResetDacs(int action); - std::string DefaultDac(int action); - /* acquisition */ - std::string ReceiverStatus(int action); - std::string DetectorStatus(int action); - std::string RxMissingPackets(int action); - std::string Scan(int action); - std::string Trigger(int action); - /* Network Configuration (Detector<->Receiver) */ - IpAddr getDstIpFromAuto(); - IpAddr getSrcIpFromAuto(); - UdpDestination getUdpEntry(); - std::string UDPDestinationList(int action); - std::string UDPSourceIP(int action); - std::string UDPSourceIP2(int action); - std::string UDPDestinationIP(int action); - std::string UDPDestinationIP2(int action); - std::string TransmissionDelay(int action); - /* Receiver Config */ - std::string ReceiverHostname(int action); - std::string Rx_ROI(int action); - /* File */ - /* ZMQ Streaming Parameters (Receiver<->Client) */ - std::string ZMQHWM(int action); - /* Eiger Specific */ - std::string RateCorrection(int action); - std::string PulsePixel(int action); - std::string PulsePixelAndMove(int action); - std::string PulseChip(int action); - std::string Quad(int action); - std::string DataStream(int action); - /* Jungfrau Specific */ - std::string TemperatureEvent(int action); - std::string PedestalMode(int action); - /* Gotthard Specific */ - std::string ROI(int action); - /* Gotthard2 Specific */ - std::string InjectChannel(int action); - std::string VetoPhoton(int action); - std::string VetoReference(int action); - std::string VetoFile(int action); - std::string BurstMode(int action); - std::string VetoStreaming(int action); - std::string VetoAlgorithm(int action); - std::string ConfigureADC(int action); - /* Mythen3 Specific */ - std::string Counters(int action); - std::string GateDelay(int action); - std::string GainCaps(int action); - /* CTB/ Moench Specific */ - std::string Samples(int action); - /* CTB Specific */ - std::string AdcVpp(int action); - std::string SlowADC(int action); - std::string ReceiverDbitList(int action); - std::string DigitalIODelay(int action); - /* Pattern */ - std::string Pattern(int action); - std::string PatternWord(int action); - void GetLevelAndUpdateArgIndex(int action, - std::string levelSeparatedCommand, - int &level, int &iArg, size_t nGetArgs, - size_t nPutArgs); - std::string PatternLoopAddresses(int action); - std::string PatternLoopCycles(int action); - std::string PatternWaitAddress(int action); - std::string PatternWaitTime(int action); - /* Moench */ - std::string AdditionalJsonHeader(int action); - std::string JsonParameter(int action); - /* Advanced */ - std::string ProgramFpga(int action); - std::string UpdateDetectorServer(int action); - std::string UpdateKernel(int action); - std::string UpdateFirmwareAndDetectorServer(int action); - std::string Register(int action); - std::string AdcRegister(int action); - std::string BitOperations(int action); - std::string InitialChecks(int action); - /* Insignificant */ - std::string ExecuteCommand(int action); - std::string UserDetails(int action); - - /* configuration */ - EXECUTE_SET_COMMAND_NOID_1ARG( - config, loadConfig, - "[fname]\n\tFrees shared memory before loading configuration file. " - "Set up once."); - - EXECUTE_SET_COMMAND_NOID_1ARG(parameters, loadParameters, - "[fname]\n\tSets detector measurement " - "parameters to those contained in " - "fname. Set up per measurement."); - - GET_COMMAND(detectorserverversion, getDetectorServerVersion, - "\n\tOn-board detector server software version"); - - GET_COMMAND(hardwareversion, getHardwareVersion, - "\n\t[Jungfrau][Gotthard2][Myhten3][Gotthard][Ctb][Moench] " - "Hardware version of detector. \n\t[Eiger] Hardware version of " - "front FPGA on detector."); - - GET_COMMAND( - kernelversion, getKernelVersion, - "\n\tGet kernel version on the detector including time and date."); - - GET_COMMAND(rx_version, getReceiverVersion, "\n\tReceiver version"); - - GET_COMMAND_HEX(serialnumber, getSerialNumber, - "\n\t[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][CTB]" - "Serial number of detector."); - - GET_COMMAND( - moduleid, getModuleId, - "\n\t[Gotthard2][Eiger][Mythen3][Jungfrau][Moench] 16 bit value " - "(ideally unique) that is streamed out in the UDP header of " - "the detector. Picked up from a file on the module."); - - GET_COMMAND(type, getDetectorType, - "\n\tReturns detector type. Can be Eiger, Jungfrau, Gotthard, " - "Moench, Mythen3, Gotthard2, ChipTestBoard"); - - GET_COMMAND_NOID(nmod, size, "\n\tNumber of modules in shared memory."); - - GET_COMMAND_NOID(settingslist, getSettingsList, - "\n\tList of settings implemented for this detector."); - - INTEGER_COMMAND_VEC_ID( - settings, getSettings, setSettings, - StringTo, - "[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]"); - - STRING_COMMAND(settingspath, getSettingsPath, setSettingsPath, - "[path]\n\t[Eiger][Mythen3] Directory where settings files " - "are loaded from/to."); - - INTEGER_COMMAND_VEC_ID( - trimval, getAllTrimbits, setAllTrimbits, StringTo, - "[n_trimval]\n\t[Eiger][Mythen3] All trimbits set to this " - "value. Returns -1 if all trimbits are different values."); - - INTEGER_COMMAND_VEC_ID( - fliprows, getFlipRows, setFlipRows, StringTo, - "[0, 1]\n\t[Eiger] flips rows paramater sent to slsreceiver " - "to stream as json parameter to flip rows in gui " - "\n\t[Jungfrau][Moench] flips " - "rows in the detector itself. For bottom module and number of " - "interfaces must be set to 2. slsReceiver and slsDetectorGui " - "does not handle."); - - INTEGER_COMMAND_VEC_ID_GET(master, getMaster, setMaster, StringTo, - "[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."); - - INTEGER_COMMAND_SET_NOID_GET_ID( - sync, getSynchronization, setSynchronization, StringTo, - "[0, 1]\n\t[Jungfrau][Moench] Enables or disables " - "synchronization between modules. Sync mode requires at least one " - "master configured. Also requires flatband cabling between master and " - "slave with termination board."); - - INTEGER_COMMAND_VEC_ID(row, getRow, setRow, StringTo, - "[value]\n\tSet Detector row (udp header) to value. " - "\n\tGui uses it to rearrange for complete image"); - - INTEGER_COMMAND_VEC_ID( - column, getColumn, setColumn, StringTo, - "[value]\n\tSet Detector column (udp header) to value. \n\tGui uses it " - "to rearrange for complete image"); - - /* acquisition parameters */ - - INTEGER_COMMAND_SET_NOID_GET_ID( - frames, getNumberOfFrames, setNumberOfFrames, StringTo, - "[n_frames]\n\tNumber of frames per acquisition. In " - "trigger mode, number of frames per trigger. \n\tCannot be set in " - "modular level. \n\tIn scan mode, number of frames is set to " - "number of steps.\n\t[Gotthard2] Burst mode has a maximum of 2720 " - "frames."); - - INTEGER_COMMAND_SET_NOID_GET_ID( - triggers, getNumberOfTriggers, setNumberOfTriggers, StringTo, - "[n_triggers]\n\tNumber of triggers per aquire. Set " - "timing mode to use triggers."); - - TIME_COMMAND( - period, getPeriod, setPeriod, - "[duration] [(optional unit) ns|us|ms|s]\n\tPeriod between frames"); - - TIME_COMMAND(delay, getDelayAfterTrigger, setDelayAfterTrigger, - "[duration] [(optional unit) " - "ns|us|ms|s]\n\t[Jungfrau][Moench][Gotthard][Mythen3][" - "Gotthard2][Ctb][Moench] Delay after trigger"); - - GET_COMMAND(framesl, getNumberOfFramesLeft, - "\n\t[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][CTB] " - "Number of frames left in acquisition." - "\n\t[Gotthard2] only in continuous auto mode."); - - GET_COMMAND(triggersl, getNumberOfTriggersLeft, - "\n\t[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][CTB] " - "Number of triggers left in acquisition. Only when external " - "trigger used."); - - TIME_GET_COMMAND(delayl, getDelayAfterTriggerLeft, - "\n\t[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][CTB]" - " DelayLeft Delay Left in Acquisition." - "\n\t[Gotthard2] only in continuous mode."); - - TIME_GET_COMMAND(periodl, getPeriodLeft, - "\n\t[Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2]" - " Period left for current frame." - "\n\t[Gotthard2] only in continuous mode."); - - INTEGER_COMMAND_SET_NOID_GET_ID( - dr, getDynamicRange, setDynamicRange, StringTo, - "[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] 16"); - - GET_COMMAND_NOID(drlist, getDynamicRangeList, - "\n\tGets the list of dynamic ranges for this detector."); - - INTEGER_COMMAND_VEC_ID( - timing, getTimingMode, setTimingMode, - StringTo, - "[auto|trigger|gating|burst_trigger]\n\tTiming Mode of " - "detector.\n\t[Jungfrau][Moench][Gotthard][Ctb][Gotthard2] " - "[auto|trigger]\n\t[Mythen3] " - "[auto|trigger|gating|trigger_gating]\n\t[Eiger] " - "[auto|trigger|gating|burst_trigger]"); - - GET_COMMAND_NOID(timinglist, getTimingModeList, - "\n\tGets the list of timing modes for this detector."); - - GET_COMMAND_NOID( - readoutspeedlist, getReadoutSpeedList, - "\n\tList of readout speed levels implemented for this detector."); - - GET_COMMAND(maxadcphaseshift, getMaxADCPhaseShift, - "\n\t[Jungfrau][Moench][CTB] Absolute maximum Phase shift of " - "ADC clock."); - - GET_COMMAND(maxdbitphaseshift, getMaxDBITPhaseShift, - "\n\t[CTB][Jungfrau] Absolute maximum Phase shift of of the " - "clock to latch digital bits."); - - INTEGER_COMMAND_VEC_ID(highvoltage, getHighVoltage, setHighVoltage, - StringTo, - "[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]"); - - INTEGER_COMMAND_VEC_ID( - powerchip, getPowerChip, setPowerChip, StringTo, - "[0, 1]\n\t[Jungfrau][Moench][Mythen3][Gotthard2] Power " - "the chip. \n\t[Jungfrau][Moench] Default is 0. Get " - "will return power status. Can be off if temperature event occured " - "(temperature over temp_threshold with temp_control " - "enabled. Will configure chip (only chip v1.1)\n\t[Mythen3][Gotthard2] " - "Default is 1. If module not connected or wrong module, powerchip will " - "fail."); - - INTEGER_COMMAND_VEC_ID( - imagetest, getImageTestMode, setImageTestMode, StringTo, - "[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."); - - INTEGER_COMMAND_VEC_ID( - parallel, getParallelMode, setParallelMode, StringTo, - "[0, 1]\n\t[Eiger][Mythen3][Gotthard2][Moench] Enable or disable " - "parallel " - "mode.\n\t[Mythen3] If exptime is too short, the " - "acquisition will return ERROR status and take fewer " - "frames than expected.\n\t[Mythen3][Eiger][Moench] Default: Non " - "parallel.\n\t[Gotthard2] Default: Parallel. Non parallel mode works " - "only in continuous mode."); - - INTEGER_COMMAND_VEC_ID( - filterresistor, getFilterResistor, setFilterResistor, StringTo, - "[value] [Gotthard2][Jungfrau] Set filter resistor. Increasing " - "values for increasing resistance.\n\t[Gotthard2] Options: " - "[0|1|2|3]. Default is 0.\n\t[Jungfrau] Options: [0|1]. Default is 1."); - - INTEGER_COMMAND_VEC_ID(dbitpipeline, getDBITPipeline, setDBITPipeline, - StringTo, - "[n_value]\n\t[Ctb][Gotthard2] Pipeline of the " - "clock for latching digital bits.\n\t[Gotthard2] " - "Options: 0-7\n\t[CTB] Options: 0-255"); - - INTEGER_COMMAND_VEC_ID( - readnrows, getReadNRows, setReadNRows, StringTo, - "\n\t[1-256]\n\t\t[Eiger] Number of rows to readout per half " - "module starting from the centre. Options: 0 - 256. 256 is default. " - "The permissible values depend on dynamic range and 10Gbe " - "enabled.\n\t[8-512 (multiple of 8)]\n\t\t[Jungfrau] Number of rows " - "per module starting from the centre. Options: 8 - 512, must be " - "multiples of 8. Default is 512.\n\t\t[Moench] Number of rows per " - "module starting from the centre. Options:16 - 400, must be multiples " - "of 16. Default is 400."); - - /** temperature */ - GET_COMMAND_NOID( - templist, getTemperatureList, - "\n\tList of temperature commands implemented for this detector."); - - GET_IND_COMMAND( - temp_adc, getTemperature, slsDetectorDefs::TEMPERATURE_ADC, " °C", - "[n_value]\n\t[Jungfrau][Moench][Gotthard] ADC Temperature"); - - GET_IND_COMMAND(temp_fpga, getTemperature, - slsDetectorDefs::TEMPERATURE_FPGA, " °C", - "[n_value]\n\t[Eiger][Jungfrau][Moench][Gotthard][Mythen3][" - "Gotthard2] FPGA Temperature"); - - GET_IND_COMMAND(temp_fpgaext, getTemperature, - slsDetectorDefs::TEMPERATURE_FPGAEXT, " °C", - "[n_value]\n\t[Eiger]Temperature close to the FPGA"); - - GET_IND_COMMAND(temp_10ge, getTemperature, - slsDetectorDefs::TEMPERATURE_10GE, " °C", - "[n_value]\n\t[Eiger]Temperature close to the 10GbE"); - - GET_IND_COMMAND( - temp_dcdc, getTemperature, slsDetectorDefs::TEMPERATURE_DCDC, " °C", - "[n_value]\n\t[Eiger]Temperature close to the dc dc converter"); - - GET_IND_COMMAND( - temp_sodl, getTemperature, slsDetectorDefs::TEMPERATURE_SODL, " °C", - "[n_value]\n\t[Eiger]Temperature close to the left so-dimm memory"); - - GET_IND_COMMAND(temp_sodr, getTemperature, - slsDetectorDefs::TEMPERATURE_SODR, " °C", - "[n_value]\n\t[Eiger]Temperature close to the right " - "so-dimm memory"); - - GET_IND_COMMAND(temp_fpgafl, getTemperature, - slsDetectorDefs::TEMPERATURE_FPGA2, " °C", - "[n_value]\n\t[Eiger]Temperature of the left front end " - "board fpga."); - - GET_IND_COMMAND(temp_fpgafr, getTemperature, - slsDetectorDefs::TEMPERATURE_FPGA3, " °C", - "[n_value]\n\t[Eiger]Temperature of the left front end " - "board fpga."); - - GET_IND_COMMAND(temp_slowadc, getTemperature, - slsDetectorDefs::SLOW_ADC_TEMP, " °C", - "[n_value]\n\t[Ctb]Temperature of the slow adc"); - - /* lists */ - CTB_NAMED_LIST(daclist, getDacNames, setDacNames, - "[dacname1 dacname2 .. dacname18] \n\t\t[ChipTestBoard] Set " - "the list of dac names for this detector.\n\t\t[All] Gets " - "the list of dac names for every dac for this detector."); - - CTB_SINGLE_DACNAME(dacname, getDacName, setDacName, defs::DAC_0, - "\n\t[0-17][name] \n\t\t[ChipTestBoard] Set " - "the dac at the given position to the given name."); - - CTB_GET_DACINDEX(dacindex, getDacIndex, defs::DAC_0, - "\n\t[name] \n\t\t[ChipTestBoard] Get " - "the dac index for the given name."); - - CTB_NAMED_LIST(adclist, getAdcNames, setAdcNames, - "[adcname1 adcname2 .. adcname32] \n\t\t[ChipTestBoard] Set " - "the list of adc names for this board."); - - CTB_SINGLE_NAME(adcname, getAdcName, setAdcName, - "[0-31][name] \n\t\t[ChipTestBoard] Set " - "the adc at the given position to the given name."); - - CTB_GET_INDEX(adcindex, getAdcIndex, - "[name] \n\t\t[ChipTestBoard] Get " - "the adc index for the given name."); - - CTB_NAMED_LIST(signallist, getSignalNames, setSignalNames, - "[signalname1 signalname2 .. signalname63] " - "\n\t\t[ChipTestBoard] Set " - "the list of signal names for this board."); - - CTB_SINGLE_NAME(signalname, getSignalName, setSignalName, - "[0-63][name] \n\t\t[ChipTestBoard] Set " - "the signal at the given position to the given name."); - - CTB_GET_INDEX(signalindex, getSignalIndex, - "[name] \n\t\t[ChipTestBoard] Get " - "the signal index for the given name."); - - CTB_NAMED_LIST(powerlist, getPowerNames, setPowerNames, - "[powername1 powername2 .. powername4] " - "\n\t\t[ChipTestBoard] Set " - "the list of power names for this board."); - - CTB_SINGLE_DACNAME(powername, getPowerName, setPowerName, defs::V_POWER_A, - "[0-4][name] \n\t\t[ChipTestBoard] Set " - "the power at the given position to the given name."); - - CTB_GET_DACINDEX(powerindex, getPowerIndex, defs::V_POWER_A, - "[name] \n\t\t[ChipTestBoard] Get " - "the power index for the given name."); - - CTB_VALUES(powervalues, getPower, getPowerList, getPowerNames, - "[name] \n\t\t[ChipTestBoard] Get values of all powers."); - - CTB_VALUES(slowadcvalues, getSlowADC, getSlowADCList, getSlowADCNames, - "[name] \n\t\t[ChipTestBoard] Get values of all slow adcs."); - - CTB_NAMED_LIST( - slowadclist, getSlowADCNames, setSlowADCNames, - "[slowadcname1 slowadcname2 .. slowadcname7] " - "\n\t\t[ChipTestBoard] Set the list of slowadc names for this board."); - - CTB_SINGLE_DACNAME(slowadcname, getSlowADCName, setSlowADCName, - defs::SLOW_ADC0, - "[0-7][name] \n\t\t[ChipTestBoard] Set " - "the slowadc at the given position to the given name."); - - CTB_GET_DACINDEX(slowadcindex, getSlowADCIndex, defs::SLOW_ADC0, - "[name] \n\t\t[ChipTestBoard] Get " - "the slowadc index for the given name."); - - /* dacs */ - - /* on chip dacs */ - INTEGER_USER_IND_COMMAND( - vchip_comp_fe, getOnChipDAC, setOnChipDAC, StringTo, - defs::VB_COMP_FE, - "[chip index 0-10, -1 for all][10 bit hex value] \n\t[Gotthard2] " - "On chip Dac for comparator current of analogue front end."); - - INTEGER_USER_IND_COMMAND( - vchip_opa_1st, getOnChipDAC, setOnChipDAC, StringTo, - defs::VB_OPA_1ST, - "[chip index 0-10, -1 for all][10 bit hex value] \n\t[Gotthard2] " - "On " - "chip Dac for opa current for driving the other DACs in chip."); - - INTEGER_USER_IND_COMMAND(vchip_opa_fd, getOnChipDAC, setOnChipDAC, - StringTo, defs::VB_OPA_FD, - "[chip index 0-10, -1 for all][10 bit hex " - "value] \n\t[Gotthard2] On " - "chip Dac current for CDS opa stage."); - - INTEGER_USER_IND_COMMAND(vchip_comp_adc, getOnChipDAC, setOnChipDAC, - StringTo, defs::VB_COMP_ADC, - "[chip index 0-10, -1 for all][10 bit hex " - "value] \n\t[Gotthard2] On " - "chip Dac for comparator current of ADC."); - - INTEGER_USER_IND_COMMAND(vchip_ref_comp_fe, getOnChipDAC, setOnChipDAC, - StringTo, defs::VREF_COMP_FE, - "[chip index 0-10, -1 for all][10 bit hex " - "value] \n\t[Gotthard2] On " - "chip Dac for reference voltage of the " - "comparator of analogue front " - "end."); - - INTEGER_USER_IND_COMMAND( - vchip_cs, getOnChipDAC, setOnChipDAC, StringTo, defs::VB_CS, - "[chip index 0-10, -1 for all][10 bit hex value] \n\t[Gotthard2] " - "On chip Dac for current injection into preamplifier."); - - /* acquisition */ - - EXECUTE_SET_COMMAND_NOID( - clearbusy, clearAcquiringFlag, - "\n\tIf acquisition aborted during acquire command, use this to " - "clear acquiring flag in shared memory before starting next " - "acquisition"); - - EXECUTE_SET_COMMAND_NOID(rx_start, startReceiver, - "\n\tStarts receiver listener for detector " - "data packets and create a " - "data file (if file write enabled)."); - - EXECUTE_SET_COMMAND_NOID( - rx_stop, stopReceiver, - "\n\tStops receiver listener for detector data packets and closes " - "current data file (if file write enabled)."); - - EXECUTE_SET_COMMAND( - start, startDetector, - "\n\tStarts detector acquisition. Status changes to RUNNING or " - "WAITING and automatically returns to idle at the end of acquisition. " - "If the acquisition was abruptly stopped, some detectors come back to " - "STOPPED."); - - EXECUTE_SET_COMMAND_NOID( - readout, startDetectorReadout, - "\n\t[Mythen3] Starts detector readout. Status changes to " - "TRANSMITTING and automatically returns to idle at the end of " - "readout."); - - EXECUTE_SET_COMMAND(stop, stopDetector, - "\n\tAbort detector acquisition. Status changes " - "to IDLE or STOPPED. Goes to stop server."); - - GET_COMMAND(rx_framescaught, getFramesCaught, - "\n\tNumber of frames caught by each port in receiver."); - - GET_COMMAND(rx_missingpackets, getNumMissingPackets, - "\n\tNumber of missing packets for each port in receiver. If " - "negative, they are packets in excess. "); - - GET_COMMAND(rx_frameindex, getRxCurrentFrameIndex, - "\n\tCurrent frame index received for each port in receiver " - "during acquisition."); - - INTEGER_COMMAND_VEC_ID( - nextframenumber, getNextFrameNumber, setNextFrameNumber, - StringTo, - "[n_value]\n\t[Eiger][Jungfrau][Moench][CTB] Next frame number. " - "Stopping acquisition might result in different frame numbers for " - "different modules."); - - GET_COMMAND(scanerrmsg, getScanErrorMessage, - "\n\tGets Scan error message if scan ended in error for non " - "blocking acquisitions."); - - /* Network Configuration (Detector<->Receiver) */ - - INTEGER_COMMAND_VEC_ID( - numinterfaces, getNumberofUDPInterfaces, setNumberofUDPInterfaces, - StringTo, - "[1, 2]\n\t[Jungfrau][Moench] Number of udp interfaces to stream " - "data from detector. Default: 1.\n\tAlso enables second interface " - "in receiver for listening (Writes a file per interface if writing " - "enabled).\n\tAlso restarts client and receiver zmq sockets if zmq " - "streaming enabled.\n\t[Eiger] Only gets with result 2."); - - INTEGER_COMMAND_VEC_ID(selinterface, getSelectedUDPInterface, - selectUDPInterface, StringTo, - "[0, 1]\n\t[Jungfrau][Moench] The udp interface " - "to stream data from detector. Effective only when " - "number of interfaces is 1. Default: 0 (outer)"); - - GET_COMMAND( - udp_numdst, getNumberofUDPDestinations, - "\n\t[Jungfrau][Moench][Eiger][Mythen3][Gotthard2] One can enter " - "upto 32 (64 for Mythen3) destinations that the detector will stream " - "images out in a round robin fashion. This is get only command. " - "Default: 1"); - - EXECUTE_SET_COMMAND(udp_cleardst, clearUDPDestinations, - "\n\tClears udp destination details on the detector."); - - INTEGER_COMMAND_VEC_ID( - udp_firstdst, getFirstUDPDestination, setFirstUDPDestination, - StringTo, - "\n[0 - 31 (or number of udp " - "destinations)]\n\t[Jungfrau][Moench][Gotthard2]\n[0-63]\n\t[" - "Mythen3]\n\n\t One can set which is the first destination that the " - "detector will stream images out from in a round robin fashion. The " - "entry must not have been empty. Default: 0"); - - INTEGER_COMMAND_VEC_ID( - udp_srcmac, getSourceUDPMAC, setSourceUDPMAC, MacAddr, - "[x:x:x:x:x:x]\n\tMac address of the detector (source) udp " - "interface. \n\t[Eiger] Do not set as detector will replace with " - "its own DHCP Mac (1G) or DHCP Mac + 1 (10G)."); - - INTEGER_COMMAND_VEC_ID( - udp_srcmac2, getSourceUDPMAC2, setSourceUDPMAC2, MacAddr, - "[x:x:x:x:x:x]\n\t[Jungfrau][Moench] Mac address of the top " - "half or inner (source) udp interface. "); - - INTEGER_COMMAND_VEC_ID( - udp_dstmac, getDestinationUDPMAC, setDestinationUDPMAC, MacAddr, - "[x:x:x:x:x:x]\n\tMac address of the receiver (destination) udp " - "interface. Not mandatory to set as udp_dstip retrieves it from " - "slsReceiver process, but must be set if you use a custom receiver " - "(not slsReceiver). Use router mac if router between detector and " - "receiver."); - - INTEGER_COMMAND_VEC_ID( - udp_dstmac2, getDestinationUDPMAC2, setDestinationUDPMAC2, MacAddr, - "[x:x:x:x:x:x]\n\t[Jungfrau][Moench] Mac address of the receiver " - "(destination) udp interface 2. Not mandatory to set as udp_dstip2 " - "retrieves it from slsReceiver process but must be set if you use a " - "custom receiver (not slsReceiver). \n\t [Jungfrau][Moench] top half " - "or inner interface \n\t [Gotthard2] veto debugging. Use router mac if " - "router between detector and receiver."); - - INTEGER_COMMAND_VEC_ID_GET( - udp_dstport, getDestinationUDPPort, setDestinationUDPPort, - StringTo, - "[n]\n\tPort number of the receiver (destination) udp " - "interface. Default is 50001. \n\tIf multi command, ports for each " - "module is calculated (incremented by 1 if no 2nd interface)"); - - INTEGER_COMMAND_VEC_ID_GET( - udp_dstport2, getDestinationUDPPort2, setDestinationUDPPort2, - StringTo, - "[n]\n\t[Jungfrau][Moench][Eiger][Gotthard2] Port number of the " - "receiver (destination) udp interface 2. Default is 50002. " - "\n\tIf multi command, ports for each module is calculated " - "(incremented by 2) \n\t[Jungfrau][Moench] top half or inner " - "interface \n\t[Eiger] right half \n\t[Gotthard2] veto debugging"); - - EXECUTE_SET_COMMAND( - udp_reconfigure, reconfigureUDPDestination, - "\n\tReconfigures Detector with UDP destination. More for " - "debugging as the configuration is done automatically when the " - "detector has sufficient UDP details."); - - EXECUTE_SET_COMMAND( - udp_validate, validateUDPConfiguration, - "\n\tValidates that UDP configuration in the detector is " - "valid. If not configured, it will throw with error message " - "requesting missing udp information."); - - GET_COMMAND(rx_printconfig, printRxConfiguration, - "\n\tPrints the receiver configuration."); - - INTEGER_COMMAND_VEC_ID(tengiga, getTenGiga, setTenGiga, StringTo, - "[0, 1]\n\t[Eiger][Ctb][Mythen3] 10GbE Enable."); - - INTEGER_COMMAND_VEC_ID( - flowcontrol10g, getTenGigaFlowControl, setTenGigaFlowControl, - StringTo, - "[0, 1]\n\t[Eiger][Jungfrau][Moench] 10GbE Flow Control."); - - INTEGER_COMMAND_VEC_ID( - txdelay_frame, getTransmissionDelayFrame, setTransmissionDelayFrame, - StringTo, - "[n_delay]\n\t[Eiger][Jungfrau][Moench][Mythen3] Transmission " - "delay of first udp packet being streamed out of the " - "module.\n\t[Jungfrau][Moench] [0-31] Each value represents 1 " - "ms\n\t[Eiger] Additional delay to txdelay_left and txdelay_right. " - "Each value represents 10ns. Typical value is 50000.\n\t[Mythen3] " - "[0-16777215] Each value represents 8 ns (125 MHz clock), max is 134 " - "ms."); - - INTEGER_COMMAND_VEC_ID( - txdelay_left, getTransmissionDelayLeft, setTransmissionDelayLeft, - StringTo, - "[n_delay]\n\t[Eiger] Transmission delay of first packet in an " - "image being streamed out of the module's left UDP port. Each value " - "represents 10ns. Typical value is 50000."); - - INTEGER_COMMAND_VEC_ID( - txdelay_right, getTransmissionDelayRight, setTransmissionDelayRight, - StringTo, - "[n_delay]\n\t[Eiger] Transmission delay of first packet in an " - "image being streamed out of the module's right UDP port. Each value " - "represents 10ns. Typical value is 50000."); - - /* Receiver Config */ - - INTEGER_COMMAND_VEC_ID_GET( - rx_tcpport, getRxPort, setRxPort, StringTo, - "[port]\n\tTCP port for client-receiver communication. Default is " - "1954. Must be different if multiple receivers on same pc. Must be " - "first command to set a receiver parameter. Multi command will " - "automatically increment for individual modules."); - - INTEGER_COMMAND_VEC_ID( - rx_fifodepth, getRxFifoDepth, setRxFifoDepth, StringTo, - "[n_frames]\n\tSet the number of frames in the receiver " - "fifo depth (buffer between listener and writer threads)."); - - INTEGER_COMMAND_VEC_ID(rx_silent, getRxSilentMode, setRxSilentMode, - StringTo, - "[0, 1]\n\tSwitch on or off receiver text " - "output during acquisition."); - - INTEGER_COMMAND_VEC_ID( - rx_discardpolicy, getRxFrameDiscardPolicy, setRxFrameDiscardPolicy, - StringTo, - "[nodiscard (default)|discardempty|discardpartial(fastest)]\n\tFrame " - "discard policy of receiver. nodiscard does not discard frames, " - "discardempty discards empty frames, discardpartial discards partial " - "frames."); - - INTEGER_COMMAND_VEC_ID(rx_padding, getPartialFramesPadding, - setPartialFramesPadding, StringTo, - "[0, 1]\n\tPartial frames padding enable in the " - "receiver. Default: enabled. Disabling is fastest."); - - INTEGER_COMMAND_VEC_ID(rx_udpsocksize, getRxUDPSocketBufferSize, - setRxUDPSocketBufferSize, StringTo, - "[n_size]\n\tUDP socket buffer size in " - "receiver. Tune rmem_default and rmem_max " - "accordingly. Max value is INT_MAX/2."); - - GET_COMMAND(rx_realudpsocksize, getRxRealUDPSocketBufferSize, - "\n\tActual udp socket buffer size. Double the size of " - "rx_udpsocksize due to kernel bookkeeping."); - - INTEGER_COMMAND_VEC_ID(rx_lock, getRxLock, setRxLock, StringTo, - "[0, 1]\n\tLock receiver to one client IP, 1 locks, " - "0 unlocks. Default is unlocked."); - - GET_COMMAND( - rx_lastclient, getRxLastClientIP, - "\n\tClient IP Address that last communicated with the receiver."); - - GET_COMMAND( - rx_threads, getRxThreadIds, - "\n\tGet kernel thread ids from the receiver in order of [parent, " - "tcp, listener 0, processor 0, streamer 0, listener 1, processor 1, " - "streamer 1, arping]. If no streamer yet or there is no second " - "interface, it gives 0 in its place."); - - INTEGER_COMMAND_VEC_ID( - rx_arping, getRxArping, setRxArping, StringTo, - "[0, 1]\n\tStarts a thread in slsReceiver to arping " - "the interface it is listening to every minute. Useful in 10G mode."); - - EXECUTE_SET_COMMAND_NOID(rx_clearroi, clearRxROI, - "Resets Region of interest in receiver. Default " - "is all channels/pixels enabled."); - - /* File */ - - INTEGER_COMMAND_VEC_ID( - fformat, getFileFormat, setFileFormat, - StringTo, - "[binary|hdf5]\n\tFile format of data file. For " - "HDF5, package must be compiled with HDF5 flags. Default is binary."); - - STRING_COMMAND(fpath, getFilePath, setFilePath, - "[path]\n\tDirectory where output data files are written in " - "receiver. Default is '/'. \n\tIf path does not exist, it " - "will try to create it."); - - STRING_COMMAND(fname, getFileNamePrefix, setFileNamePrefix, - "[name]\n\tFile name prefix for output data file. Default " - "is run. File name: [file name prefix]_d[detector " - "index]_f[sub file index]_[acquisition/file index].raw."); - - INTEGER_COMMAND_VEC_ID(findex, getAcquisitionIndex, setAcquisitionIndex, - StringTo, - "[n_value]\n\tFile or Acquisition index."); - - INTEGER_COMMAND_VEC_ID( - fwrite, getFileWrite, setFileWrite, StringTo, - "[0, 1]\n\tEnable or disable receiver file write. Default is 1."); - - INTEGER_COMMAND_NOID( - fmaster, getMasterFileWrite, setMasterFileWrite, StringTo, - "[0, 1]\n\tEnable or disable receiver master file. Default is 1."); - - INTEGER_COMMAND_VEC_ID( - foverwrite, getFileOverWrite, setFileOverWrite, StringTo, - "[0, 1]\n\tEnable or disable file overwriting. Default is 1."); - - INTEGER_COMMAND_VEC_ID( - rx_framesperfile, getFramesPerFile, setFramesPerFile, StringTo, - "[n_frames]\n\tNumber of frames per file in receiver in an " - "acquisition. Default depends on detector type. 0 is infinite or " - "all " - "frames in single file."); - - /* ZMQ Streaming Parameters (Receiver<->Client) */ - - INTEGER_COMMAND_VEC_ID( - rx_zmqstream, getRxZmqDataStream, setRxZmqDataStream, StringTo, - "[0, 1]\n\tEnable/ disable data streaming from receiver via zmq " - "(eg. to GUI or to another process for further processing). This " - "creates/ destroys zmq streamer threads in receiver. \n\tSwitching to " - "Gui automatically enables data streaming in receiver. \n\tSwitching " - "back to command line acquire will require disabling data streaming in " - "receiver for fast applications. "); - - INTEGER_COMMAND_VEC_ID( - rx_zmqfreq, getRxZmqFrequency, setRxZmqFrequency, StringTo, - "[nth frame]\n\tFrequency of frames streamed out from receiver via " - "zmq\n\tDefault: 1, Means every frame is streamed out. \n\tIf 2, " - "every second frame is streamed out. \n\tIf 0, streaming timer is the " - "timeout, after which current frame is sent out. (default timeout is " - "500 ms). Usually used for gui purposes."); - - INTEGER_COMMAND_VEC_ID( - rx_zmqstartfnum, getRxZmqStartingFrame, setRxZmqStartingFrame, - StringTo, - "[fnum]\n\tThe starting frame index to stream out. 0 by " - "default, which streams the first frame in an acquisition, " - "and then depending on the rx zmq frequency/ timer"); - - INTEGER_COMMAND_VEC_ID_GET( - rx_zmqport, getRxZmqPort, setRxZmqPort, StringTo, - "[port]\n\tZmq port for data to be streamed out of the receiver. " - "Also restarts receiver zmq streaming if enabled. Default is 30001. " - "Modified only when using an intermediate process between receiver and " - "client(gui). Must be different for every detector (and udp port). " - "Multi command will automatically increment for individual modules."); - - INTEGER_COMMAND_VEC_ID_GET( - zmqport, getClientZmqPort, setClientZmqPort, StringTo, - "[port]\n\tZmq port in client(gui) or intermediate process for " - "data to be streamed to from receiver. Default connects to receiver " - "zmq streaming out port (30001). Modified only when using an " - "intermediate process between receiver and client(gui). Also restarts " - "client zmq streaming if enabled. Must be different for every detector " - "(and udp port). Multi command will automatically increment for " - "individual modules."); - - INTEGER_COMMAND_VEC_ID( - rx_zmqip, getRxZmqIP, setRxZmqIP, IpAddr, - "[x.x.x.x]\n\tZmq Ip Address from which data is to be streamed out " - "of the receiver. Also restarts receiver zmq streaming if enabled. " - "Default is from rx_hostname. Modified only when using an intermediate " - "process between receiver."); - - INTEGER_COMMAND_VEC_ID( - zmqip, getClientZmqIp, setClientZmqIp, IpAddr, - "[x.x.x.x]\n\tIp Address to listen to zmq data streamed out from " - "receiver or intermediate process. Default connects to receiver zmq Ip " - "Address (from rx_hostname). Modified only when using an intermediate " - "process between receiver and client(gui). Also restarts client zmq " - "streaming if enabled."); - - INTEGER_COMMAND_SET_NOID_GET_ID( - rx_zmqhwm, getRxZmqHwm, setRxZmqHwm, StringTo, - "[n_value]\n\tReceiver's zmq send high water mark. Default is the " - "zmq library's default (1000). This is a high number and can be set to " - "2 for gui purposes. One must also set the client's receive high water " - "mark to similar value. Final effect is sum of them. Also restarts " - "receiver zmq streaming if enabled. Can set to -1 to set default " - "value."); - - /* Eiger Specific */ - - TIME_COMMAND(subexptime, getSubExptime, setSubExptime, - "[duration] [(optional unit) ns|us|ms|s]\n\t[Eiger] Exposure " - "time of EIGER subframes in 32 bit mode."); - - TIME_COMMAND(subdeadtime, getSubDeadTime, setSubDeadTime, - "[duration] [(optional unit) ns|us|ms|s]\n\t[Eiger] Dead time " - "of EIGER subframes in 32 bit mode. Subperiod = subexptime + " - "subdeadtime."); - - INTEGER_COMMAND_VEC_ID( - overflow, getOverFlowMode, setOverFlowMode, StringTo, - "[0, 1]\n\t[Eiger] Enable or disable show overflow flag in " - "32 bit mode. Default is disabled."); - - INTEGER_COMMAND_VEC_ID( - interruptsubframe, getInterruptSubframe, setInterruptSubframe, - StringTo, - "[0, 1]\n\t[Eiger] 1 interrupts last subframe at required " - "exposure time. 0 will wait for last sub frame to finish " - "exposing. 0 is default."); - - TIME_GET_COMMAND(measuredperiod, getMeasuredPeriod, - "[(optional unit) ns|us|ms|s]\n\t[Eiger] Measured frame " - "period between last frame and previous one. Can be " - "measured with minimum 2 frames in an acquisition."); - - TIME_GET_COMMAND(measuredsubperiod, getMeasuredSubFramePeriod, - "[(optional unit) ns|us|ms|s]\n\t[Eiger] Measured sub " - "frame period between last sub frame and previous one."); - - INTEGER_COMMAND_VEC_ID(activate, getActive, setActive, StringTo, - "[0, 1] \n\t[Eiger] 1 is default. 0 deactivates " - "readout and does not send data."); - - INTEGER_COMMAND_VEC_ID( - partialreset, getPartialReset, setPartialReset, StringTo, - "[0, 1]\n\t[Eiger] Sets up detector to do " - "partial or complete reset at start of acquisition. 0 complete reset, " - "1 partial reset. Default is complete reset. Advanced function!"); - - INTEGER_COMMAND_VEC_ID( - top, getTop, setTop, StringTo, - "[0, 1]\n\t[Eiger] Sets half module to top (1), else bottom."); - - /* Jungfrau Specific */ - - GET_COMMAND(chipversion, getChipVersion, - "\n\t[Jungfrau] Returns chip version. Can be 1.0 or 1.1"); - - INTEGER_COMMAND_VEC_ID( - temp_threshold, getThresholdTemperature, setThresholdTemperature, - StringTo, - "[n_temp (in degrees)]\n\t[Jungfrau][Moench] Threshold temperature " - "in degrees. If temperature crosses threshold temperature and " - "temperature control is enabled, power to chip will be switched off " - "and temperature event occurs. To power on chip again, temperature has " - "to be less than threshold temperature and temperature event has to be " - "cleared."); - - INTEGER_COMMAND_VEC_ID( - temp_control, getTemperatureControl, setTemperatureControl, - StringTo, - "[0, 1]\n\t[Jungfrau][Moench] Temperature control enable. Default " - "is 0 (disabled). If temperature crosses threshold temperature and " - "temperature control is enabled, power to chip will be switched off " - "and temperature event occurs. To power on chip again, temperature has " - "to be less than threshold temperature and temperature event has to be " - "cleared."); - - INTEGER_COMMAND_VEC_ID( - autocompdisable, getAutoComparatorDisable, setAutoComparatorDisable, - StringTo, - "[0, 1]\n\t[Jungfrau] Auto comparator disable mode. By " - "default, the on-chip gain switching is active during the entire " - "exposure.This mode disables the on - chip gain switching " - "comparator automatically after 93.75% (only for chipv1.0) of exposure " - "time (only for longer than 100us). It is possible to set the duration " - "for chipv1.1 using compdisabletime command.\n\tDefault is 0 or this " - "mode disabled(comparator enabled throughout). 1 enables mode. 0 " - "disables mode. "); - - TIME_COMMAND(compdisabletime, getComparatorDisableTime, - setComparatorDisableTime, - "[duration] [(optional unit) ns|us|ms|s]\n\t[Jungfrau] Time " - "before end of exposure when comparator is disabled. It is " - "only possible for chipv1.1."); - - INTEGER_COMMAND_SET_NOID_GET_ID( - extrastoragecells, getNumberOfAdditionalStorageCells, - setNumberOfAdditionalStorageCells, StringTo, - "[0-15]\n\t[Jungfrau] Only for chipv1.0. Number of additional " - "storage cells. Default is 0. For advanced users only. \n\tThe #images " - "= #frames x #triggers x (#extrastoragecells + 1)."); - - INTEGER_COMMAND_VEC_ID( - storagecell_start, getStorageCellStart, setStorageCellStart, - StringTo, - "[0-max]\n\t[Jungfrau] Storage cell that stores " - "the first acquisition of the series. max is 15 (default) for chipv1.0 " - "and 3 (default) for chipv1.1. For advanced users only."); - - TIME_COMMAND(storagecell_delay, getStorageCellDelay, setStorageCellDelay, - "[duration (0-1638375 ns)] [(optional unit) " - "ns|us|ms|s]\n\t[Jungfrau] Additional time delay between 2 " - "consecutive exposures in burst mode (resolution of 25ns). " - "Only applicable for chipv1.0. For advanced users only."); - - INTEGER_COMMAND_VEC_ID( - gainmode, getGainMode, setGainMode, StringTo, - "[dynamicgain|forceswitchg1|forceswitchg2|fixg1|fixg2|fixg0]\n\t[" - "Jungfrau] Gain mode.\n\tCAUTION: Do not use fixg0 without " - "caution, you can damage the detector!!!"); - - INTEGER_COMMAND_VEC_ID(filtercells, getNumberOfFilterCells, - setNumberOfFilterCells, StringTo, - "[0-12]\n\t[Jungfrau] Set Filter Cell. Only for " - "chipv1.1. Advanced user Command"); - - /* Gotthard Specific */ - TIME_GET_COMMAND(exptimel, getExptimeLeft, - "[(optional unit) ns|us|ms|s]\n\t[Gotthard] Exposure time " - "left for current frame. "); - - EXECUTE_SET_COMMAND(clearroi, clearROI, - "[Gotthard] Resets Region of interest in detector. All " - "channels enabled. Default is all channels enabled."); - - /* Gotthard2 Specific */ - INTEGER_COMMAND_SET_NOID_GET_ID( - bursts, getNumberOfBursts, setNumberOfBursts, StringTo, - "[n_bursts]\n\t[Gotthard2] Number of bursts per aquire. Only in auto " - "timing mode and burst mode. Use timing command to set timing mode and " - "burstmode command to set burst mode."); - - TIME_COMMAND(burstperiod, getBurstPeriod, setBurstPeriod, - "[duration] [(optional unit) ns|us|ms|s]\n\t[Gotthard2] " - "Period between 2 bursts. Only in burst mode and auto " - "timing mode."); - - GET_COMMAND(burstsl, getNumberOfBurstsLeft, - "\n\t[Gotthard2] Number of bursts left in acquisition. Only in " - "burst auto mode."); - - INTEGER_COMMAND_VEC_ID( - cdsgain, getCDSGain, setCDSGain, StringTo, - "[0, 1]\n\t[Gotthard2] Enable or disable CDS gain. Default " - "is disabled."); - - INTEGER_COMMAND_VEC_ID( - timingsource, getTimingSource, setTimingSource, - StringTo, - "[internal|external]\n\t[Gotthard2] Timing source. Internal is " - "crystal and external is system timing. Default is internal."); - - INTEGER_COMMAND_VEC_ID(veto, getVeto, setVeto, StringTo, - "[0, 1]\n\t[Gotthard2] Enable or disable veto data " - "data from chip. Default is 0."); - - /* Mythen3 Specific */ - - INTEGER_COMMAND_VEC_ID( - gates, getNumberOfGates, setNumberOfGates, StringTo, - "[n_gates]\n\t[Mythen3] Number of external gates in gating " - "or trigger_gating mode (external gating)."); - - INTEGER_COMMAND_VEC_ID(polarity, getPolarity, setPolarity, - StringTo, - "[pos|neg]\n\t[Mythen3] Sets negative or positive " - "polarity. Default is positive"); - - INTEGER_COMMAND_VEC_ID(interpolation, getInterpolation, setInterpolation, - StringTo, - "[0, 1]\n\t[Mythen3] Enables or disables " - "interpolation. Default is disabled. Interpolation " - "mode enables all counters and disables vth3. " - "Disabling sets back counter mask and vth3."); - - INTEGER_COMMAND_VEC_ID( - pumpprobe, getPumpProbe, setPumpProbe, StringTo, - "[0, 1]\n\t[Mythen3] Enables or disables pump probe " - "mode. Default is disabled. Pump probe mode only enables vth2. " - "Disabling sets back to previous value."); - - INTEGER_COMMAND_VEC_ID(apulse, getAnalogPulsing, setAnalogPulsing, - StringTo, - "[0, 1]\n\t[Mythen3] Enables or disables analog " - "pulsing. Default is disabled"); - - INTEGER_COMMAND_VEC_ID(dpulse, getDigitalPulsing, setDigitalPulsing, - StringTo, - "[0, 1]\n\t[Mythen3] Enables or disables digital " - "pulsing. Default is disabled"); - - /* CTB/ Moench Specific */ - - INTEGER_COMMAND_VEC_ID( - asamples, getNumberOfAnalogSamples, setNumberOfAnalogSamples, - StringTo, - "[n_samples]\n\t[CTB] Number of analog samples expected."); - - INTEGER_COMMAND_VEC_ID( - adcclk, getADCClock, setADCClock, StringTo, - "[n_clk in MHz]\n\t[Ctb] ADC clock frequency in MHz."); - - INTEGER_COMMAND_VEC_ID(runclk, getRUNClock, setRUNClock, StringTo, - "[n_clk in MHz]\n\t[Ctb] Run clock in MHz."); - - GET_COMMAND(syncclk, getSYNCClock, - "[n_clk in MHz]\n\t[Ctb] Sync clock in MHz."); - - INTEGER_IND_COMMAND(v_limit, getPower, setPower, StringTo, - defs::V_LIMIT, - "[n_value]\n\t[Ctb] Soft limit for power " - "supplies (ctb only) and DACS in mV."); - - INTEGER_COMMAND_HEX(adcenable, getADCEnableMask, setADCEnableMask, - StringTo, - "[bitmask]\n\t[Ctb] ADC Enable Mask for 1Gb " - "Enable for each 32 ADC channel."); - - INTEGER_COMMAND_HEX( - adcenable10g, getTenGigaADCEnableMask, setTenGigaADCEnableMask, - StringTo, - "[bitmask]\n\t[Ctb] ADC Enable Mask for 10Gb mode for each 32 " - "ADC channel. However, if any of a consecutive 4 bits are enabled, " - "the complete 4 bits are enabled."); - - INTEGER_COMMAND_HEX(transceiverenable, getTransceiverEnableMask, - setTransceiverEnableMask, StringTo, - "[bitmask]\n\t[Ctb] Transceiver Enable Mask. Enable " - "for each 4 Transceiver channel."); - - INTEGER_COMMAND_VEC_ID( - dsamples, getNumberOfDigitalSamples, setNumberOfDigitalSamples, - StringTo, - "[n_value]\n\t[CTB] Number of digital samples expected."); - - INTEGER_COMMAND_VEC_ID( - tsamples, getNumberOfTransceiverSamples, setNumberOfTransceiverSamples, - StringTo, - "[n_value]\n\t[CTB] Number of transceiver samples expected."); - - INTEGER_COMMAND_VEC_ID( - romode, getReadoutMode, setReadoutMode, - StringTo, - "[analog|digital|analog_digital|transceiver|digital_transceiver]\n\t[" - "CTB] Readout mode. Default is analog."); - - INTEGER_COMMAND_VEC_ID(dbitclk, getDBITClock, setDBITClock, StringTo, - "[n_clk in MHz]\n\t[Ctb] Clock for latching the " - "digital bits in MHz."); - - INTEGER_IND_COMMAND(v_a, getPower, setPower, StringTo, defs::V_POWER_A, - "[n_value]\n\t[Ctb] Power supply a in mV."); - - INTEGER_IND_COMMAND(v_b, getPower, setPower, StringTo, defs::V_POWER_B, - "[n_value]\n\t[Ctb] Power supply b in mV."); - - INTEGER_IND_COMMAND(v_c, getPower, setPower, StringTo, defs::V_POWER_C, - "[n_value]\n\t[Ctb] Power supply c in mV."); - - INTEGER_IND_COMMAND(v_d, getPower, setPower, StringTo, defs::V_POWER_D, - "[n_value]\n\t[Ctb] Power supply d in mV."); - - INTEGER_IND_COMMAND( - v_io, getPower, setPower, StringTo, defs::V_POWER_IO, - "[n_value]\n\t[Ctb] Power supply io in mV. Minimum 1200 mV. Must " - "be the first power regulator to be set after fpga reset (on-board " - "detector server start up)."); - - INTEGER_IND_COMMAND( - v_chip, getPower, setPower, StringTo, defs::V_POWER_CHIP, - "[n_value]\n\t[Ctb] Power supply chip in mV. Do not use it " - "unless " - "you are completely sure you will not fry the board."); - - GET_IND_COMMAND(vm_a, getMeasuredPower, defs::V_POWER_A, "", - "\n\t[Ctb] Measured voltage of power supply a in mV."); - - GET_IND_COMMAND(vm_b, getMeasuredPower, defs::V_POWER_B, "", - "\n\t[Ctb] Measured voltage of power supply b in mV."); - - GET_IND_COMMAND(vm_c, getMeasuredPower, defs::V_POWER_C, "", - "\n\t[Ctb] Measured voltage of power supply c in mV."); - - GET_IND_COMMAND(vm_d, getMeasuredPower, defs::V_POWER_D, "", - "\n\t[Ctb] Measured voltage of power supply d in mV."); - - GET_IND_COMMAND(vm_io, getMeasuredPower, defs::V_POWER_IO, "", - "\n\t[Ctb] Measured voltage of power supply io in mV."); - - GET_IND_COMMAND(im_a, getMeasuredCurrent, defs::I_POWER_A, "", - "\n\t[Ctb] Measured current of power supply a in mA."); - - GET_IND_COMMAND(im_b, getMeasuredCurrent, defs::I_POWER_B, "", - "\n\t[Ctb] Measured current of power supply b in mA."); - - GET_IND_COMMAND(im_c, getMeasuredCurrent, defs::I_POWER_C, "", - "\n\t[Ctb] Measured current of power supply c in mA."); - - GET_IND_COMMAND(im_d, getMeasuredCurrent, defs::I_POWER_D, "", - "\n\t[Ctb] Measured current of power supply d in mA."); - - GET_IND_COMMAND(im_io, getMeasuredCurrent, defs::I_POWER_IO, "", - "\n\t[Ctb] Measured current of power supply io in mA."); - - INTEGER_COMMAND_VEC_ID( - extsampling, getExternalSampling, setExternalSampling, StringTo, - "[0, 1]\n\t[Ctb] Enable for external sampling signal for digital " - "data to signal by extsampling src command. For advanced users only."); - - INTEGER_COMMAND_VEC_ID( - extsamplingsrc, getExternalSamplingSource, setExternalSamplingSource, - StringTo, - "[0-63]\n\t[Ctb] Sampling source signal for digital data. " - "For advanced users only."); - - INTEGER_COMMAND_VEC_ID( - rx_dbitoffset, getRxDbitOffset, setRxDbitOffset, StringTo, - "[n_bytes]\n\t[Ctb] Offset in bytes in digital data to " - "skip in receiver."); - - INTEGER_COMMAND_VEC_ID(led, getLEDEnable, setLEDEnable, StringTo, - "[0, 1]\n\t[Ctb] Switches on/off all LEDs."); - - /* Pattern */ - - GET_COMMAND(patfname, getPatterFileName, - "\n\t[Ctb][Mythen3] Gets the pattern file name including " - "path of the last pattern uploaded. Returns an empty if " - "nothing was uploaded or via a server default file"); - - EXECUTE_SET_COMMAND_NOID_1ARG( - savepattern, savePattern, - "[fname]\n\t[Ctb][Mythen3] Saves pattern to file (ascii). " - "\n\t[Ctb] Also executes pattern."); - - EXECUTE_SET_COMMAND( - defaultpattern, loadDefaultPattern, - "\n\t[Mythen3] Loads and runs default pattern in pattern " - "generator. It is to go back to initial settings."); - - INTEGER_COMMAND_HEX_WIDTH16(patioctrl, getPatternIOControl, - setPatternIOControl, StringTo, - "[64 bit mask]\n\t[Ctb] 64 bit mask " - "defining input (0) and output (1) signals."); - - INTEGER_COMMAND_HEX_WIDTH16( - patmask, getPatternMask, setPatternMask, StringTo, - "[64 bit mask]\n\t[Ctb][Mythen3] Selects the bits that will " - "have a pattern mask applied to the selected patmask for every " - "pattern."); - - INTEGER_COMMAND_HEX_WIDTH16( - patsetbit, getPatternBitMask, setPatternBitMask, StringTo, - "[64 bit mask]\n\t[Ctb][Mythen3] Sets the mask applied to " - "every pattern to the selected bits."); - - EXECUTE_SET_COMMAND(patternstart, startPattern, - "\n\t[Mythen3] Starts Pattern"); - - /* Moench */ - /* Advanced */ - - INTEGER_COMMAND_VEC_ID( - adcpipeline, getADCPipeline, setADCPipeline, StringTo, - "[n_value]\n\t[Ctb][Moench] Pipeline for ADC clock."); - - EXECUTE_SET_COMMAND(resetfpga, resetFPGA, - "\n\t[Jungfrau][Moench][Ctb] Reset FPGA."); - - EXECUTE_SET_COMMAND(rebootcontroller, rebootController, - "\n\t[Jungfrau][Moench][Ctb][Gotthard][Mythen3][" - "Gotthard2] Reboot controller of detector."); - - INTEGER_COMMAND_VEC_ID( - updatemode, getUpdateMode, setUpdateMode, StringTo, - "[0|1]\n\tRestart the detector server in update " - "mode or not. This is useful when server-firmware compatibility is at " - "its worst and server cannot start up normally"); - - EXECUTE_SET_COMMAND( - firmwaretest, executeFirmwareTest, - "\n\t[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb] " - "Firmware test, ie. reads a read fixed pattern from a register."); - - EXECUTE_SET_COMMAND( - bustest, executeBusTest, - "\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!"); - - INTEGER_COMMAND_HEX( - adcinvert, getADCInvert, setADCInvert, StringTo, - "[bitmask]\n\t[Ctb][Jungfrau][Moench] ADC Inversion " - "Mask.\n\t[Jungfrau][Moench] Inversions on top of the default mask."); - - /* Insignificant */ - - INTEGER_COMMAND_VEC_ID( - port, getControlPort, setControlPort, StringTo, - "[n]\n\tPort number of the control server on detector for " - "detector-client tcp interface. Default is 1952. Normally unchanged. " - "Set different ports for virtual servers on same pc."); - - INTEGER_COMMAND_VEC_ID( - stopport, getStopPort, setStopPort, StringTo, - "[n]\n\tPort number of the stop server on detector for detector-client " - "tcp interface. Default is 1953. Normally unchanged."); - - INTEGER_COMMAND_VEC_ID( - lock, getDetectorLock, setDetectorLock, StringTo, - "[0, 1]\n\tLock detector to one IP, 1: locks. Default is unlocked"); - - GET_COMMAND( - lastclient, getLastClientIP, - "\n\tClient IP Address that last communicated with the detector."); - - GET_COMMAND( - framecounter, getNumberOfFramesFromStart, - "\n\t[Jungfrau][Moench][Mythen3][Gotthard2][CTB] Number of frames from " - "start run control.\n\t[Gotthard2] only in continuous mode."); - - TIME_GET_COMMAND(runtime, getActualTime, - "[(optional unit) " - "ns|us|ms|s]\n\t[Jungfrau][Moench][Mythen3][Gotthard2][" - "CTB] Time from detector start up.\n\t[Gotthard2] not in " - "burst and auto mode."); - - TIME_GET_COMMAND(frametime, getMeasurementTime, - "[(optional unit) " - "ns|us|ms|s]\n\t[Jungfrau][Moench][Mythen3][Gotthard2][" - "CTB] Timestamp at a frame start.\n\t[Gotthard2] not in " - "burst and auto mode."); -}; - -} // namespace sls diff --git a/slsDetectorSoftware/src/Detector.cpp b/slsDetectorSoftware/src/Detector.cpp index 4ac8f2d44..b2d24bf1e 100644 --- a/slsDetectorSoftware/src/Detector.cpp +++ b/slsDetectorSoftware/src/Detector.cpp @@ -3,8 +3,8 @@ #include "sls/Detector.h" #include "sls/detectorData.h" +#include "Caller.h" #include "CmdParser.h" -#include "CmdProxy.h" #include "CtbConfig.h" #include "DetectorImpl.h" #include "Module.h" @@ -23,7 +23,7 @@ namespace sls { -void freeSharedMemory(int detectorIndex, int moduleIndex) { +void freeSharedMemory(const int detectorIndex, const int moduleIndex) { // single module if (moduleIndex >= 0) { @@ -34,10 +34,10 @@ void freeSharedMemory(int detectorIndex, int moduleIndex) { return; } - // detector - multi module - get number of detectors from shm - SharedMemory detectorShm(detectorIndex, -1); int numDetectors = 0; + // detector - multi module - get number of detectors from shm + SharedMemory detectorShm(detectorIndex, -1); if (detectorShm.exists()) { detectorShm.openSharedMemory(false); numDetectors = detectorShm()->totalNumberOfModules; @@ -58,15 +58,19 @@ void freeSharedMemory(int detectorIndex, int moduleIndex) { using defs = slsDetectorDefs; Detector::Detector(int shm_id) : pimpl(make_unique(shm_id)) {} - Detector::~Detector() = default; +// Move constructor +Detector::Detector(Detector &&other) noexcept = default; + +// Move assignment operator +Detector &Detector::operator=(Detector &&other) noexcept = default; + // Configuration -void Detector::freeSharedMemory() { pimpl->freeSharedMemory(); } void Detector::loadConfig(const std::string &fname) { int shm_id = getShmId(); - freeSharedMemory(); + freeSharedMemory(shm_id); pimpl = make_unique(shm_id); LOG(logINFO) << "Loading configuration file: " << fname; loadParameters(fname); @@ -91,12 +95,12 @@ void Detector::loadParameters(const std::string &fname) { } void Detector::loadParameters(const std::vector ¶meters) { - CmdProxy proxy(this); + Caller caller(this); CmdParser parser; for (const auto ¤t_line : parameters) { parser.Parse(current_line); - proxy.Call(parser.command(), parser.arguments(), parser.detector_id(), - defs::PUT_ACTION, std::cout, parser.receiver_id()); + caller.call(parser.command(), parser.arguments(), parser.detector_id(), + defs::PUT_ACTION, std::cout, parser.receiver_id()); } } @@ -105,18 +109,35 @@ Result Detector::getHostname(Positions pos) const { } void Detector::setHostname(const std::vector &hostname) { + if (pimpl->hasModulesInSharedMemory()) { + LOG(logWARNING) << "There are already module(s) in shared memory." + "Freeing Shared memory now."; + auto numChannels = getDetectorSize(); + auto initialChecks = getInitialChecks(); + freeSharedMemory(getShmId()); + pimpl = make_unique(getShmId()); + setDetectorSize(numChannels); + setInitialChecks(initialChecks); + } pimpl->setHostname(hostname); } void Detector::setVirtualDetectorServers(int numServers, uint16_t startingPort) { validatePortRange(startingPort, numServers * 2); - pimpl->setVirtualDetectorServers(numServers, startingPort); + + std::vector hostnames; + for (int i = 0; i < numServers; ++i) { + // * 2 is for control and stop port + hostnames.push_back(std::string("localhost:") + + std::to_string(startingPort + i * 2)); + } + setHostname(hostnames); } int Detector::getShmId() const { return pimpl->getDetectorIndex(); } -std::string Detector::getPackageVersion() const { return RELEASE; } +std::string Detector::getPackageVersion() const { return SLS_DET_VERSION; } std::string Detector::getClientVersion() const { Version v(APILIB); @@ -208,6 +229,7 @@ std::vector Detector::getSettingsList() const { defs::G2_LOWCAP_HIGHGAIN, defs::G2_LOWCAP_LOWGAIN, defs::G4_HIGHGAIN, defs::G4_LOWGAIN}; case defs::CHIPTESTBOARD: + case defs::XILINX_CHIPTESTBOARD: throw RuntimeError("Settings not implemented for this detector"); default: throw RuntimeError("Unknown detector type"); @@ -532,6 +554,7 @@ std::vector Detector::getReadoutSpeedList() const { case defs::EIGER: case defs::JUNGFRAU: case defs::MOENCH: + case defs::MYTHEN3: return std::vector{defs::FULL_SPEED, defs::HALF_SPEED, defs::QUARTER_SPEED}; case defs::GOTTHARD2: @@ -666,6 +689,7 @@ std::vector Detector::getTemperatureList() const { defs::TEMPERATURE_FPGA2, defs::TEMPERATURE_FPGA3}; case defs::MYTHEN3: case defs::GOTTHARD2: + case defs::XILINX_CHIPTESTBOARD: return std::vector{defs::TEMPERATURE_FPGA}; default: return std::vector{}; @@ -696,6 +720,7 @@ Result Detector::getTemperature(defs::dacIndex index, case defs::MOENCH: case defs::MYTHEN3: case defs::GOTTHARD2: + case defs::XILINX_CHIPTESTBOARD: for (auto &it : res) { it /= 1000; } @@ -743,6 +768,7 @@ std::vector Detector::getDacList() const { defs::VBP_COLBUF, defs::VIPRE, defs::VIN_CM, defs::VB_SDA, defs::VCASC_SFP, defs::VOUT_CM, defs::VIPRE_CDS, defs::IBIAS_SFP}; case defs::CHIPTESTBOARD: + case defs::XILINX_CHIPTESTBOARD: for (int i = 0; i != 18; ++i) { retval.push_back(static_cast(i)); } @@ -905,7 +931,9 @@ void Detector::stopDetector(Positions pos) { case defs::EIGER: case defs::JUNGFRAU: case defs::MOENCH: - case defs::CHIPTESTBOARD: { + case defs::CHIPTESTBOARD: + case defs::XILINX_CHIPTESTBOARD: + case defs::GOTTHARD2: { auto res = getNextFrameNumber(pos); if (!res.equal()) { uint64_t maxVal = 0; @@ -1478,19 +1506,6 @@ void Detector::setRxZmqPort(uint16_t port, int module_id) { } } -Result Detector::getRxZmqIP(Positions pos) const { - return pimpl->Parallel(&Module::getReceiverStreamingIP, pos); -} - -void Detector::setRxZmqIP(const IpAddr ip, Positions pos) { - bool previouslyReceiverStreaming = getRxZmqDataStream(pos).squash(false); - pimpl->Parallel(&Module::setReceiverStreamingIP, pos, ip); - if (previouslyReceiverStreaming) { - setRxZmqDataStream(false, pos); - setRxZmqDataStream(true, pos); - } -} - Result Detector::getClientZmqPort(Positions pos) const { return pimpl->Parallel(&Module::getClientStreamingPort, pos); } @@ -1779,6 +1794,24 @@ void Detector::setPedestalMode(const defs::pedestalParameters par, pimpl->Parallel(&Module::setPedestalMode, pos, par); } +Result +Detector::getTimingInfoDecoder(Positions pos) const { + return pimpl->Parallel(&Module::getTimingInfoDecoder, pos); +} + +void Detector::setTimingInfoDecoder(defs::timingInfoDecoder value, + Positions pos) { + pimpl->Parallel(&Module::setTimingInfoDecoder, pos, value); +} + +Result Detector::getCollectionMode(Positions pos) const { + return pimpl->Parallel(&Module::getCollectionMode, pos); +} + +void Detector::setCollectionMode(defs::collectionMode value, Positions pos) { + pimpl->Parallel(&Module::setCollectionMode, pos, value); +} + // Gotthard Specific Result Detector::getROI(Positions pos) const { @@ -2079,7 +2112,9 @@ Result Detector::getSYNCClock(Positions pos) const { } std::vector Detector::getPowerList() const { - if (getDetectorType().squash() != defs::CHIPTESTBOARD) { + auto dettype = getDetectorType().squash(); + if (dettype != defs::CHIPTESTBOARD && + dettype != defs::XILINX_CHIPTESTBOARD) { throw RuntimeError("Power list not implemented for this detector"); } return std::vector{defs::V_POWER_A, defs::V_POWER_B, @@ -2088,7 +2123,9 @@ std::vector Detector::getPowerList() const { } std::vector Detector::getSlowADCList() const { - if (getDetectorType().squash() != defs::CHIPTESTBOARD) { + auto dettype = getDetectorType().squash(); + if (dettype != defs::CHIPTESTBOARD && + dettype != defs::XILINX_CHIPTESTBOARD) { throw RuntimeError("Slow ADC list not implemented for this detector"); } return std::vector{ @@ -2277,7 +2314,8 @@ void Detector::setLEDEnable(bool enable, Positions pos) { } void Detector::setDacNames(const std::vector names) { - if (getDetectorType().squash() != defs::CHIPTESTBOARD) + auto dettype = getDetectorType().squash(); + if (dettype != defs::CHIPTESTBOARD && dettype != defs::XILINX_CHIPTESTBOARD) throw RuntimeError("Named dacs only for CTB"); pimpl->setCtbDacNames(names); } @@ -2285,7 +2323,7 @@ void Detector::setDacNames(const std::vector names) { std::vector Detector::getDacNames() const { std::vector names; auto type = getDetectorType().squash(); - if (type == defs::CHIPTESTBOARD) + if (type == defs::CHIPTESTBOARD || type == defs::XILINX_CHIPTESTBOARD) return pimpl->getCtbDacNames(); for (const auto &index : getDacList()) @@ -2295,7 +2333,7 @@ std::vector Detector::getDacNames() const { defs::dacIndex Detector::getDacIndex(const std::string &name) const { auto type = getDetectorType().squash(); - if (type == defs::CHIPTESTBOARD) { + if (type == defs::CHIPTESTBOARD || type == defs::XILINX_CHIPTESTBOARD) { auto names = getDacNames(); auto it = std::find(names.begin(), names.end(), name); if (it == names.end()) @@ -2306,32 +2344,36 @@ defs::dacIndex Detector::getDacIndex(const std::string &name) const { } void Detector::setDacName(const defs::dacIndex i, const std::string &name) { - if (getDetectorType().squash() != defs::CHIPTESTBOARD) + auto dettype = getDetectorType().squash(); + if (dettype != defs::CHIPTESTBOARD && dettype != defs::XILINX_CHIPTESTBOARD) throw RuntimeError("Named dacs only for CTB"); pimpl->setCtbDacName(i, name); } std::string Detector::getDacName(const defs::dacIndex i) const { - auto type = getDetectorType().squash(); - if (type == defs::CHIPTESTBOARD) + auto dettype = getDetectorType().squash(); + if (dettype == defs::CHIPTESTBOARD || dettype == defs::XILINX_CHIPTESTBOARD) return pimpl->getCtbDacName(i); return ToString(i); } void Detector::setAdcNames(const std::vector names) { - if (getDetectorType().squash() != defs::CHIPTESTBOARD) + auto dettype = getDetectorType().squash(); + if (dettype != defs::CHIPTESTBOARD && dettype != defs::XILINX_CHIPTESTBOARD) throw RuntimeError("Named adcs only for CTB"); pimpl->setCtbAdcNames(names); } std::vector Detector::getAdcNames() const { - if (getDetectorType().squash() != defs::CHIPTESTBOARD) + auto dettype = getDetectorType().squash(); + if (dettype != defs::CHIPTESTBOARD && dettype != defs::XILINX_CHIPTESTBOARD) throw RuntimeError("Named adcs only for CTB"); return pimpl->getCtbAdcNames(); } int Detector::getAdcIndex(const std::string &name) const { - if (getDetectorType().squash() != defs::CHIPTESTBOARD) + auto dettype = getDetectorType().squash(); + if (dettype != defs::CHIPTESTBOARD && dettype != defs::XILINX_CHIPTESTBOARD) throw RuntimeError("Named adcs only for CTB"); auto names = getAdcNames(); auto it = std::find(names.begin(), names.end(), name); @@ -2341,31 +2383,36 @@ int Detector::getAdcIndex(const std::string &name) const { } void Detector::setAdcName(const int index, const std::string &name) { - if (getDetectorType().squash() != defs::CHIPTESTBOARD) + auto dettype = getDetectorType().squash(); + if (dettype != defs::CHIPTESTBOARD && dettype != defs::XILINX_CHIPTESTBOARD) throw RuntimeError("Named adcs only for CTB"); pimpl->setCtbAdcName(index, name); } std::string Detector::getAdcName(const int i) const { - if (getDetectorType().squash() != defs::CHIPTESTBOARD) + auto dettype = getDetectorType().squash(); + if (dettype != defs::CHIPTESTBOARD && dettype != defs::XILINX_CHIPTESTBOARD) throw RuntimeError("Named adcs only for CTB"); return pimpl->getCtbAdcName(i); } void Detector::setSignalNames(const std::vector names) { - if (getDetectorType().squash() != defs::CHIPTESTBOARD) + auto dettype = getDetectorType().squash(); + if (dettype != defs::CHIPTESTBOARD && dettype != defs::XILINX_CHIPTESTBOARD) throw RuntimeError("Named signals only for CTB"); pimpl->setCtbSignalNames(names); } std::vector Detector::getSignalNames() const { - if (getDetectorType().squash() != defs::CHIPTESTBOARD) + auto dettype = getDetectorType().squash(); + if (dettype != defs::CHIPTESTBOARD && dettype != defs::XILINX_CHIPTESTBOARD) throw RuntimeError("Named signals only for CTB"); return pimpl->getCtbSignalNames(); } int Detector::getSignalIndex(const std::string &name) const { - if (getDetectorType().squash() != defs::CHIPTESTBOARD) + auto dettype = getDetectorType().squash(); + if (dettype != defs::CHIPTESTBOARD && dettype != defs::XILINX_CHIPTESTBOARD) throw RuntimeError("Named signals only for CTB"); auto names = getSignalNames(); auto it = std::find(names.begin(), names.end(), name); @@ -2375,31 +2422,37 @@ int Detector::getSignalIndex(const std::string &name) const { } void Detector::setSignalName(const int index, const std::string &name) { - if (getDetectorType().squash() != defs::CHIPTESTBOARD) + auto dettype = getDetectorType().squash(); + if (dettype != defs::CHIPTESTBOARD && dettype != defs::XILINX_CHIPTESTBOARD) throw RuntimeError("Named signals only for CTB"); pimpl->setCtbSignalName(index, name); } std::string Detector::getSignalName(const int i) const { - if (getDetectorType().squash() != defs::CHIPTESTBOARD) + auto dettype = getDetectorType().squash(); + if (dettype != defs::CHIPTESTBOARD && dettype != defs::XILINX_CHIPTESTBOARD) throw RuntimeError("Named signals only for CTB"); return pimpl->getCtbSignalName(i); } void Detector::setPowerNames(const std::vector names) { - if (getDetectorType().squash() != defs::CHIPTESTBOARD) + auto dettype = getDetectorType().squash(); + if (getDetectorType().squash() != defs::CHIPTESTBOARD && + dettype != defs::XILINX_CHIPTESTBOARD) throw RuntimeError("Named powers only for CTB"); pimpl->setCtbPowerNames(names); } std::vector Detector::getPowerNames() const { - if (getDetectorType().squash() != defs::CHIPTESTBOARD) + auto dettype = getDetectorType().squash(); + if (dettype != defs::CHIPTESTBOARD && dettype != defs::XILINX_CHIPTESTBOARD) throw RuntimeError("Named powers only for CTB"); return pimpl->getCtbPowerNames(); } defs::dacIndex Detector::getPowerIndex(const std::string &name) const { - if (getDetectorType().squash() != defs::CHIPTESTBOARD) + auto dettype = getDetectorType().squash(); + if (dettype != defs::CHIPTESTBOARD && dettype != defs::XILINX_CHIPTESTBOARD) throw RuntimeError("Named powers only for CTB"); auto names = getPowerNames(); auto it = std::find(names.begin(), names.end(), name); @@ -2410,31 +2463,36 @@ defs::dacIndex Detector::getPowerIndex(const std::string &name) const { void Detector::setPowerName(const defs::dacIndex index, const std::string &name) { - if (getDetectorType().squash() != defs::CHIPTESTBOARD) + auto dettype = getDetectorType().squash(); + if (dettype != defs::CHIPTESTBOARD && dettype != defs::XILINX_CHIPTESTBOARD) throw RuntimeError("Named powers only for CTB"); pimpl->setCtbPowerName(index, name); } std::string Detector::getPowerName(const defs::dacIndex i) const { - if (getDetectorType().squash() != defs::CHIPTESTBOARD) + auto dettype = getDetectorType().squash(); + if (dettype != defs::CHIPTESTBOARD && dettype != defs::XILINX_CHIPTESTBOARD) throw RuntimeError("Named powers only for CTB"); return pimpl->getCtbPowerName(i); } void Detector::setSlowADCNames(const std::vector names) { - if (getDetectorType().squash() != defs::CHIPTESTBOARD) + auto dettype = getDetectorType().squash(); + if (dettype != defs::CHIPTESTBOARD && dettype != defs::XILINX_CHIPTESTBOARD) throw RuntimeError("Named SlowADCs only for CTB"); pimpl->setCtbSlowADCNames(names); } std::vector Detector::getSlowADCNames() const { - if (getDetectorType().squash() != defs::CHIPTESTBOARD) + auto dettype = getDetectorType().squash(); + if (dettype != defs::CHIPTESTBOARD && dettype != defs::XILINX_CHIPTESTBOARD) throw RuntimeError("Named SlowADCs only for CTB"); return pimpl->getCtbSlowADCNames(); } defs::dacIndex Detector::getSlowADCIndex(const std::string &name) const { - if (getDetectorType().squash() != defs::CHIPTESTBOARD) + auto dettype = getDetectorType().squash(); + if (dettype != defs::CHIPTESTBOARD && dettype != defs::XILINX_CHIPTESTBOARD) throw RuntimeError("Named SlowADCs only for CTB"); auto names = getSlowADCNames(); auto it = std::find(names.begin(), names.end(), name); @@ -2445,17 +2503,25 @@ defs::dacIndex Detector::getSlowADCIndex(const std::string &name) const { void Detector::setSlowADCName(const defs::dacIndex index, const std::string &name) { - if (getDetectorType().squash() != defs::CHIPTESTBOARD) + auto dettype = getDetectorType().squash(); + if (dettype != defs::CHIPTESTBOARD && dettype != defs::XILINX_CHIPTESTBOARD) throw RuntimeError("Named SlowADCs only for CTB"); pimpl->setCtbSlowADCName(index, name); } std::string Detector::getSlowADCName(const defs::dacIndex i) const { - if (getDetectorType().squash() != defs::CHIPTESTBOARD) + auto dettype = getDetectorType().squash(); + if (dettype != defs::CHIPTESTBOARD && dettype != defs::XILINX_CHIPTESTBOARD) throw RuntimeError("Named SlowADCs only for CTB"); return pimpl->getCtbSlowADCName(i); } +// Xilinx Ctb Specific + +void Detector::configureTransceiver(Positions pos) { + pimpl->Parallel(&Module::configureTransceiver, pos); +} + // Pattern Result Detector::getPatterFileName(Positions pos) const { @@ -2648,16 +2714,18 @@ Result Detector::readRegister(uint32_t addr, Positions pos) const { return pimpl->Parallel(&Module::readRegister, pos, addr); } -void Detector::writeRegister(uint32_t addr, uint32_t val, Positions pos) { - pimpl->Parallel(&Module::writeRegister, pos, addr, val); +void Detector::writeRegister(uint32_t addr, uint32_t val, bool validate, + Positions pos) { + pimpl->Parallel(&Module::writeRegister, pos, addr, val, validate); } -void Detector::setBit(uint32_t addr, int bitnr, Positions pos) { - pimpl->Parallel(&Module::setBit, pos, addr, bitnr); +void Detector::setBit(uint32_t addr, int bitnr, bool validate, Positions pos) { + pimpl->Parallel(&Module::setBit, pos, addr, bitnr, validate); } -void Detector::clearBit(uint32_t addr, int bitnr, Positions pos) { - pimpl->Parallel(&Module::clearBit, pos, addr, bitnr); +void Detector::clearBit(uint32_t addr, int bitnr, bool validate, + Positions pos) { + pimpl->Parallel(&Module::clearBit, pos, addr, bitnr, validate); } Result Detector::getBit(uint32_t addr, int bitnr, Positions pos) { diff --git a/slsDetectorSoftware/src/DetectorImpl.cpp b/slsDetectorSoftware/src/DetectorImpl.cpp index 294af361b..750e83983 100644 --- a/slsDetectorSoftware/src/DetectorImpl.cpp +++ b/slsDetectorSoftware/src/DetectorImpl.cpp @@ -37,8 +37,6 @@ DetectorImpl::DetectorImpl(int detector_index, bool verify, bool update) setupDetector(verify, update); } -DetectorImpl::~DetectorImpl() = default; - void DetectorImpl::setupDetector(bool verify, bool update) { initSharedMemory(verify); initializeMembers(verify); @@ -59,51 +57,6 @@ void DetectorImpl::setAcquiringFlag(bool flag) { shm()->acquiringFlag = flag; } int DetectorImpl::getDetectorIndex() const { return detectorIndex; } -void DetectorImpl::freeSharedMemory(int detectorIndex, int detPos) { - // single - if (detPos >= 0) { - SharedMemory moduleShm(detectorIndex, detPos); - if (moduleShm.exists()) { - moduleShm.removeSharedMemory(); - } - return; - } - - // multi - get number of modules from shm - SharedMemory detectorShm(detectorIndex, -1); - int numModules = 0; - - if (detectorShm.exists()) { - detectorShm.openSharedMemory(false); - numModules = detectorShm()->totalNumberOfModules; - detectorShm.removeSharedMemory(); - } - - for (int i = 0; i < numModules; ++i) { - SharedMemory moduleShm(detectorIndex, i); - moduleShm.removeSharedMemory(); - } - - SharedMemory ctbShm(detectorIndex, -1, CtbConfig::shm_tag()); - if (ctbShm.exists()) - ctbShm.removeSharedMemory(); -} - -void DetectorImpl::freeSharedMemory() { - zmqSocket.clear(); - for (auto &module : modules) { - module->freeSharedMemory(); - } - modules.clear(); - - // clear detector shm - shm.removeSharedMemory(); - client_downstream = false; - - if (ctb_shm.exists()) - ctb_shm.removeSharedMemory(); -} - std::string DetectorImpl::getUserDetails() { if (modules.empty()) { return std::string("none"); @@ -242,24 +195,11 @@ std::string DetectorImpl::exec(const char *cmd) { return result; } -void DetectorImpl::setVirtualDetectorServers(const int numdet, - const uint16_t port) { - std::vector hostnames; - for (int i = 0; i < numdet; ++i) { - // * 2 is for control and stop port - hostnames.push_back(std::string("localhost:") + - std::to_string(port + i * 2)); - } - setHostname(hostnames); +bool DetectorImpl::hasModulesInSharedMemory() { + return (shm.exists() && shm()->totalNumberOfModules > 0); } void DetectorImpl::setHostname(const std::vector &name) { - // do not free always to allow the previous detsize/ initialchecks command - if (shm.exists() && shm()->totalNumberOfModules != 0) { - LOG(logWARNING) << "There are already module(s) in shared memory." - "Freeing Shared memory now."; - freeSharedMemory(); - } // could be called after freeing shm from API if (!shm.exists()) { setupDetector(); @@ -272,7 +212,8 @@ void DetectorImpl::setHostname(const std::vector &name) { // Here we know the detector type and can add ctb shared memory // if needed, CTB dac names are only on detector level - if (shm()->detType == defs::CHIPTESTBOARD) { + if (shm()->detType == defs::CHIPTESTBOARD || + shm()->detType == defs::XILINX_CHIPTESTBOARD) { if (ctb_shm.exists()) ctb_shm.openSharedMemory(true); else @@ -291,8 +232,8 @@ void DetectorImpl::addModule(const std::string &name) { // gotthard cannot have more than 2 modules (50um=1, 25um=2 if ((type == GOTTHARD || type == GOTTHARD2) && modules.size() > 2) { - freeSharedMemory(); - throw RuntimeError("Gotthard cannot have more than 2 modules"); + throw RuntimeError("Gotthard cannot have more than 2 modules. Please " + "free the shared memory and start again."); } auto pos = modules.size(); @@ -336,7 +277,19 @@ void DetectorImpl::updateDetectorSize() { if (detSizeX > 1 && detSizeX <= maxChanX) { maxChanX = detSizeX; } + if (maxChanX < modSize.x) { + std::stringstream os; + os << "The max det size in x dim (" << maxChanX + << ") is less than the module size in x dim (" << modSize.x + << "). Probably using shared memory of a different detector " + "type. Please free and try again."; + throw RuntimeError(os.str()); + } nModx = maxChanX / modSize.x; + if (nModx == 0) { + throw RuntimeError( + "number of modules in x dimension is 0. Unable to proceed."); + } nMody = size() / nModx; if ((maxChanX % modSize.x) > 0) { ++nMody; @@ -350,7 +303,18 @@ void DetectorImpl::updateDetectorSize() { if (detSizeY > 1 && detSizeY <= maxChanY) { maxChanY = detSizeY; } + if (maxChanY < modSize.y) { + std::stringstream os; + os << "The max det size in y dim (" << maxChanY + << ") is less than the module size in y dim (" << modSize.y + << "). Probably using shared memory of a different detector " + "type. Please free and try again."; + throw RuntimeError(os.str()); + } nMody = maxChanY / modSize.y; + if (nMody == 0) + throw RuntimeError( + "number of modules in y dimension is 0. Unable to proceed."); nModx = size() / nMody; if ((maxChanY % modSize.y) > 0) { ++nModx; @@ -389,7 +353,8 @@ slsDetectorDefs::xy DetectorImpl::getNumberOfChannels() const { } void DetectorImpl::setNumberOfChannels(const slsDetectorDefs::xy c) { - if (size() > 1) { + // detsize is set before hostname + if (size() >= 1) { throw RuntimeError( "Set the number of channels before setting hostname."); } @@ -615,7 +580,7 @@ void DetectorImpl::readFrameFromReceiver() { memset(multiframe.get(), 0xFF, multisize); } - completeImage = (numZmqRunning == (int)zmqSocket.size()); + completeImage = true; // get each frame for (unsigned int isocket = 0; isocket < zmqSocket.size(); ++isocket) { @@ -632,7 +597,6 @@ void DetectorImpl::readFrameFromReceiver() { // parse error, version error or end of acquisition for // socket runningList[isocket] = false; - completeImage = false; --numZmqRunning; continue; } @@ -711,7 +675,8 @@ void DetectorImpl::readFrameFromReceiver() { uint32_t yoffset = coordY * nPixelsY; uint32_t singledetrowoffset = nPixelsX * bytesPerPixel; uint32_t rowoffset = nX * singledetrowoffset; - if (shm()->detType == CHIPTESTBOARD) { + if (shm()->detType == CHIPTESTBOARD || + shm()->detType == defs::XILINX_CHIPTESTBOARD) { singledetrowoffset = size; } LOG(logDEBUG1) @@ -1382,7 +1347,7 @@ void DetectorImpl::stopDetector(Positions pos) { void DetectorImpl::printProgress(double progress) { // spaces for python printout - std::cout << " " << std::fixed << std::setprecision(2) << std::setw(6) + std::cout << " " << std::fixed << std::setprecision(2) << std::setw(10) << progress << " \%"; std::cout << '\r' << std::flush; } @@ -1744,7 +1709,8 @@ void DetectorImpl::verifyUniqueHost( } defs::ROI DetectorImpl::getRxROI() const { - if (shm()->detType == CHIPTESTBOARD) { + if (shm()->detType == CHIPTESTBOARD || + shm()->detType == defs::XILINX_CHIPTESTBOARD) { throw RuntimeError("RxRoi not implemented for this Detector"); } if (modules.size() == 0) { @@ -1819,7 +1785,8 @@ defs::ROI DetectorImpl::getRxROI() const { } void DetectorImpl::setRxROI(const defs::ROI arg) { - if (shm()->detType == CHIPTESTBOARD) { + if (shm()->detType == CHIPTESTBOARD || + shm()->detType == defs::XILINX_CHIPTESTBOARD) { throw RuntimeError("RxRoi not implemented for this Detector"); } if (modules.size() == 0) { diff --git a/slsDetectorSoftware/src/DetectorImpl.h b/slsDetectorSoftware/src/DetectorImpl.h index a4484c243..424330043 100644 --- a/slsDetectorSoftware/src/DetectorImpl.h +++ b/slsDetectorSoftware/src/DetectorImpl.h @@ -5,6 +5,7 @@ #include "CtbConfig.h" #include "SharedMemory.h" #include "sls/Result.h" +#include "sls/ZmqSocket.h" #include "sls/logger.h" #include "sls/sls_detector_defs.h" @@ -19,7 +20,6 @@ namespace sls { -class ZmqSocket; class detectorData; class Module; @@ -79,11 +79,6 @@ class DetectorImpl : public virtual slsDetectorDefs { explicit DetectorImpl(int detector_index = 0, bool verify = true, bool update = true); - /** - * Destructor - */ - virtual ~DetectorImpl(); - template struct NonDeduced { using type = CT; }; template Result Parallel(RT (Module::*somefunc)(CT...), @@ -198,14 +193,6 @@ class DetectorImpl : public virtual slsDetectorDefs { /** return detector index in shared memory */ int getDetectorIndex() const; - /** Free specific shared memory from the command line without creating - * object */ - static void freeSharedMemory(int detectorIndex, int detPos = -1); - - /** Free all modules from current multi Id shared memory and delete members - */ - void freeSharedMemory(); - /** Get user details of shared memory */ std::string getUserDetails(); @@ -215,12 +202,7 @@ class DetectorImpl : public virtual slsDetectorDefs { * default enabled */ void setInitialChecks(const bool value); - /** - * Connect to Virtual Detector Servers at local host - * @param numdet number of modules - * @param port starting port number - */ - void setVirtualDetectorServers(const int numdet, const uint16_t port); + bool hasModulesInSharedMemory(); /** Sets the hostname of all sls modules in shared memory and updates * local cache */ @@ -452,7 +434,7 @@ class DetectorImpl : public virtual slsDetectorDefs { /** data streaming (down stream) enabled in client (zmq sckets created) */ bool client_downstream{false}; std::vector> zmqSocket; - volatile int numZmqRunning{0}; + std::atomic numZmqRunning{0}; /** mutex to synchronize main and data processing threads */ mutable std::mutex mp; diff --git a/slsDetectorSoftware/src/HelpDacs.cpp b/slsDetectorSoftware/src/HelpDacs.cpp new file mode 100644 index 000000000..3a2c0504c --- /dev/null +++ b/slsDetectorSoftware/src/HelpDacs.cpp @@ -0,0 +1,319 @@ +// SPDX-License-Identifier: LGPL-3.0-or-other +// Copyright (C) 2021 Contributors to the SLS Detector Package +#include "sls/sls_detector_defs.h" +#include "sls/string_utils.h" +#include + +namespace sls { + +std::string GetHelpDac(std::string dac) { + if (sls::is_int(dac)) { + return std::string("[dac name] [dac or mV value] [(optional unit) mV] " + "\n\t[Ctb] Use dac index for dac name."); + } + if (dac == "vthreshold") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Eiger][Mythen3] " + "Detector threshold voltage for single photon counters.\n\t[Eiger] " + "Sets vcmp_ll, vcmp_lr, vcmp_rl, vcmp_rr and vcp to the same " + "value. \n\t[Mythen3] Sets vth1, vth2 and vth3 to the same value " + "for enabled counters."); + } + if (dac == "vsvp") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Eiger] Dac for ?? "); + } + if (dac == "vsvn") { + return std::string("[dac or mV value][(optional unit) mV] \n\t[Eiger] " + "Dac for ?? \n\t[Mythen3] voltage to define " + "feedback resistance of the first shaper"); + } + if (dac == "vtrim") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Eiger] Dac for ?? " + "\n\t[Mythen3] Dac for the voltage defining the trim bit size."); + } + if (dac == "vrpreamp") { + return std::string("[dac or mV value][(optional unit) mV] \n\t[Eiger] " + "Dac for ?? \n\t[Mythen3] voltage to define the " + "preamplifier feedback resistance."); + } + if (dac == "vrshaper") { + return std::string("[dac or mV value][(optional unit) mV] \n\t[Eiger] " + "Dac for ?? \n\t[Mythen3] voltage to define " + "feedback resistance of the first shaper"); + } + if (dac == "vtgstv") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Eiger] Dac for ??"); + } + if (dac == "vcmp_ll") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Eiger] Dac for ??"); + } + if (dac == "vcmp_lr") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Eiger] Dac for ??"); + } + if (dac == "vcal") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Eiger] Dac for ??"); + } + if (dac == "vcmp_rl") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Eiger] Dac for ??"); + } + if (dac == "vcmp_rr") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Eiger] Dac for ??"); + } + if (dac == "rxb_rb") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Eiger] Dac for ??"); + } + if (dac == "rxb_lb") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Eiger] Dac for ??"); + } + if (dac == "vcp") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Eiger] Dac for ??"); + } + if (dac == "vcn") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Eiger] Dac for ??"); + } + if (dac == "vishaper") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Eiger] Dac for ??"); + } + if (dac == "iodelay") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Eiger] Dac for ??"); + } + if (dac == "vref_ds") { + return std::string("[dac or mV value][(optional unit) mV] " + "\n\t[Gotthard][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") { + return std::string("[dac or mV value][(optional unit) mV] " + "\n\t[Gotthard] Dac for ??\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") { + return std::string("[dac or mV value][(optional unit) mV] " + "\n\t[Gotthard] Dac for ??\n\t[Moench] Dac for 2"); + } + if (dac == "vref_comp") { + return std::string("[dac or mV value][(optional unit) mV] " + "\n\t[Gotthard][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") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Mythen3] voltage to " + "define feedback resistance of the second shaper."); + } + if (dac == "vipre") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Mythen3] Dac for the " + "preamplifier's input transistor current.\n\t[Moench] Dac for 1"); + } + if (dac == "vdcsh") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Mythen3] Dac for the " + "reference (DC) voltage for the shaper."); + } + if (dac == "vth1") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Mythen3] Dac for first " + "detector threshold voltage. Overwrites even if counter disabled."); + } + if (dac == "vth2") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Mythen3] Dac for " + "second detector threshold voltage. Overwrites even if counter " + "disabled."); + } + if (dac == "vth3") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Mythen3] Dac for third " + "detector threshold voltage. Overwrites even if counter disabled."); + } + if (dac == "vcal_n") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Mythen3] Dac for the " + "low voltage for analog pulsing."); + } + if (dac == "vcal_p") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Mythen3] Dac for the " + "high voltage for analog pulsing."); + } + if (dac == "vcassh") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Mythen3] Dac for the " + "shaper's cascode voltage."); + } + if (dac == "vcas") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Mythen3] Dac for the " + "preamplifier's cascode voltage."); + } + if (dac == "vicin") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Mythen3] Dac for the " + "bias current for the comparator."); + } + if (dac == "vipre_out") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Mythen3] Dac for " + "preamplifier's output transistor current."); + } + if (dac == "vref_h_adc") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Gotthard2] Dac for " + "reference voltage high of ADC."); + } + if (dac == "vb_comp_fe") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Gotthard2] Dac for " + "comparator current of analogue front end."); + } + if (dac == "vb_comp_adc") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Gotthard2] Dac for " + "comparator current of ADC."); + } + if (dac == "vcom_cds") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Gotthard2] Dac for " + "common mode voltage of CDS stage."); + } + if (dac == "vref_rstore") { + return std::string("[dac or mV value][(optional unit) mV] " + "\n\t[Gotthard2] Dac for reference charging voltage " + "of temparory storage cell in high gain."); + } + if (dac == "vb_opa_1st") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Gotthard2] dac dac for " + "opa current for driving the other DACs in chip."); + } + if (dac == "vref_comp_fe") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Gotthard2] Dac for " + "reference voltage of the comparator of analogue front end."); + } + if (dac == "vcom_adc1") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Gotthard2] Dac for " + "common mode voltage of ADC DAC bank 1."); + } + if (dac == "vref_prech") { + return std::string( + "[dac or mV value][(optional unit) mV] " + "\n\t[Gotthard2][Jungfrau] " + "Dac for reference votlage for precharing the preamplifier."); + } + if (dac == "vref_l_adc") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Gotthard2] Dac for " + "reference voltage low for ADC."); + } + if (dac == "vref_cds") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Gotthard2] Dac for " + "reference voltage of CDS applied to the temporary storage cell in " + "medium and low gain."); + } + if (dac == "vb_cs") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Gotthard2] Dac for " + "current injection into preamplifier."); + } + if (dac == "vb_opa_fd") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Gotthard2] Dac for " + "current for CDS opa stage."); + } + if (dac == "vcom_adc2") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Gotthard2] Dac for " + "common mode voltage of ADC DAC bank 2."); + } + if (dac == "vb_ds") { + return std::string("[dac or mV value][(optional unit) mV] " + "\n\t[Jungfrau] Dac for ??"); + } + if (dac == "vb_comp") { + return std::string("[dac or mV value][(optional unit) mV] " + "\n\t[Jungfrau] Dac for ??"); + } + if (dac == "vb_pixbuf") { + return std::string("[dac or mV value][(optional unit) mV] " + "\n\t[Jungfrau] Dac for ??"); + } + if (dac == "vin_com") { + return std::string("[dac or mV value][(optional unit) mV] " + "\n\t[Jungfrau] Dac for ??"); + } + if (dac == "vdd_prot") { + return std::string("[dac or mV value][(optional unit) mV] " + "\n\t[Jungfrau] Dac for ??"); + } + if (dac == "vbp_colbuf") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Moench] Dac for 0"); + } + if (dac == "vb_sda") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Moench] Dac for 3"); + } + if (dac == "vcasc_sfp") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Moench] Dac for 4"); + } + if (dac == "vipre_cds") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Moench] Dac for 6"); + } + if (dac == "ibias_sfp") { + return std::string( + "[dac or mV value][(optional unit) mV] \n\t[Moench] Dac for 7"); + } + + // clang-format off + if (dac == "vtgstv") { return std::string(""); } + // clang-format on + + throw sls::RuntimeError("Unknown dac command"); +} + +std::string GetHelpDacWrapper(const std::string &cmd, + const std::vector &args) { + std::ostringstream os; + os << cmd << ' '; + if (args.size() == 0) { + os << GetHelpDac(std::to_string(0)) << '\n'; + } else { + os << args[0] << ' ' << GetHelpDac(args[0]) << '\n'; + } + return os.str(); +} + +} // namespace sls diff --git a/slsDetectorSoftware/src/HelpDacs.h b/slsDetectorSoftware/src/HelpDacs.h index 75c87710e..4c2c8cd9e 100644 --- a/slsDetectorSoftware/src/HelpDacs.h +++ b/slsDetectorSoftware/src/HelpDacs.h @@ -1,305 +1,13 @@ // SPDX-License-Identifier: LGPL-3.0-or-other // Copyright (C) 2021 Contributors to the SLS Detector Package -#include "sls/string_utils.h" +#include +#include namespace sls { -std::string GetHelpDac(std::string dac) { - if (sls::is_int(dac)) { - return std::string("[dac name] [dac or mV value] [(optional unit) mV] " - "\n\t[Ctb] Use dac index for dac name."); - } - if (dac == "vthreshold") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Eiger][Mythen3] " - "Detector threshold voltage for single photon counters.\n\t[Eiger] " - "Sets vcmp_ll, vcmp_lr, vcmp_rl, vcmp_rr and vcp to the same " - "value. \n\t[Mythen3] Sets vth1, vth2 and vth3 to the same value " - "for enabled counters."); - } - if (dac == "vsvp") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Eiger] Dac for ?? "); - } - if (dac == "vsvn") { - return std::string("[dac or mV value][(optional unit) mV] \n\t[Eiger] " - "Dac for ?? \n\t[Mythen3] voltage to define " - "feedback resistance of the first shaper"); - } - if (dac == "vtrim") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Eiger] Dac for ?? " - "\n\t[Mythen3] Dac for the voltage defining the trim bit size."); - } - if (dac == "vrpreamp") { - return std::string("[dac or mV value][(optional unit) mV] \n\t[Eiger] " - "Dac for ?? \n\t[Mythen3] voltage to define the " - "preamplifier feedback resistance."); - } - if (dac == "vrshaper") { - return std::string("[dac or mV value][(optional unit) mV] \n\t[Eiger] " - "Dac for ?? \n\t[Mythen3] voltage to define " - "feedback resistance of the first shaper"); - } - if (dac == "vtgstv") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Eiger] Dac for ??"); - } - if (dac == "vcmp_ll") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Eiger] Dac for ??"); - } - if (dac == "vcmp_lr") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Eiger] Dac for ??"); - } - if (dac == "vcal") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Eiger] Dac for ??"); - } - if (dac == "vcmp_rl") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Eiger] Dac for ??"); - } - if (dac == "vcmp_rr") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Eiger] Dac for ??"); - } - if (dac == "rxb_rb") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Eiger] Dac for ??"); - } - if (dac == "rxb_lb") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Eiger] Dac for ??"); - } - if (dac == "vcp") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Eiger] Dac for ??"); - } - if (dac == "vcn") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Eiger] Dac for ??"); - } - if (dac == "vishaper") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Eiger] Dac for ??"); - } - if (dac == "iodelay") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Eiger] Dac for ??"); - } - if (dac == "vref_ds") { - return std::string("[dac or mV value][(optional unit) mV] " - "\n\t[Gotthard][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") { - return std::string("[dac or mV value][(optional unit) mV] " - "\n\t[Gotthard] Dac for ??\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") { - return std::string("[dac or mV value][(optional unit) mV] " - "\n\t[Gotthard] Dac for ??\n\t[Moench] Dac for 2"); - } - if (dac == "vref_comp") { - return std::string("[dac or mV value][(optional unit) mV] " - "\n\t[Gotthard][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") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Mythen3] voltage to " - "define feedback resistance of the second shaper."); - } - if (dac == "vipre") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Mythen3] Dac for the " - "preamplifier's input transistor current.\n\t[Moench] Dac for 1"); - } - if (dac == "vdcsh") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Mythen3] Dac for the " - "reference (DC) voltage for the shaper."); - } - if (dac == "vth1") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Mythen3] Dac for first " - "detector threshold voltage. Overwrites even if counter disabled."); - } - if (dac == "vth2") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Mythen3] Dac for " - "second detector threshold voltage. Overwrites even if counter " - "disabled."); - } - if (dac == "vth3") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Mythen3] Dac for third " - "detector threshold voltage. Overwrites even if counter disabled."); - } - if (dac == "vcal_n") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Mythen3] Dac for the " - "low voltage for analog pulsing."); - } - if (dac == "vcal_p") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Mythen3] Dac for the " - "high voltage for analog pulsing."); - } - if (dac == "vcassh") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Mythen3] Dac for the " - "shaper's cascode voltage."); - } - if (dac == "vcas") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Mythen3] Dac for the " - "preamplifier's cascode voltage."); - } - if (dac == "vicin") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Mythen3] Dac for the " - "bias current for the comparator."); - } - if (dac == "vipre_out") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Mythen3] Dac for " - "preamplifier's output transistor current."); - } - if (dac == "vref_h_adc") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Gotthard2] Dac for " - "reference voltage high of ADC."); - } - if (dac == "vb_comp_fe") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Gotthard2] Dac for " - "comparator current of analogue front end."); - } - if (dac == "vb_comp_adc") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Gotthard2] Dac for " - "comparator current of ADC."); - } - if (dac == "vcom_cds") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Gotthard2] Dac for " - "common mode voltage of CDS stage."); - } - if (dac == "vref_rstore") { - return std::string("[dac or mV value][(optional unit) mV] " - "\n\t[Gotthard2] Dac for reference charging voltage " - "of temparory storage cell in high gain."); - } - if (dac == "vb_opa_1st") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Gotthard2] dac dac for " - "opa current for driving the other DACs in chip."); - } - if (dac == "vref_comp_fe") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Gotthard2] Dac for " - "reference voltage of the comparator of analogue front end."); - } - if (dac == "vcom_adc1") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Gotthard2] Dac for " - "common mode voltage of ADC DAC bank 1."); - } - if (dac == "vref_prech") { - return std::string( - "[dac or mV value][(optional unit) mV] " - "\n\t[Gotthard2][Jungfrau] " - "Dac for reference votlage for precharing the preamplifier."); - } - if (dac == "vref_l_adc") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Gotthard2] Dac for " - "reference voltage low for ADC."); - } - if (dac == "vref_cds") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Gotthard2] Dac for " - "reference voltage of CDS applied to the temporary storage cell in " - "medium and low gain."); - } - if (dac == "vb_cs") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Gotthard2] Dac for " - "current injection into preamplifier."); - } - if (dac == "vb_opa_fd") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Gotthard2] Dac for " - "current for CDS opa stage."); - } - if (dac == "vcom_adc2") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Gotthard2] Dac for " - "common mode voltage of ADC DAC bank 2."); - } - if (dac == "vb_ds") { - return std::string("[dac or mV value][(optional unit) mV] " - "\n\t[Jungfrau] Dac for ??"); - } - if (dac == "vb_comp") { - return std::string("[dac or mV value][(optional unit) mV] " - "\n\t[Jungfrau] Dac for ??"); - } - if (dac == "vb_pixbuf") { - return std::string("[dac or mV value][(optional unit) mV] " - "\n\t[Jungfrau] Dac for ??"); - } - if (dac == "vin_com") { - return std::string("[dac or mV value][(optional unit) mV] " - "\n\t[Jungfrau] Dac for ??"); - } - if (dac == "vdd_prot") { - return std::string("[dac or mV value][(optional unit) mV] " - "\n\t[Jungfrau] Dac for ??"); - } - if (dac == "vbp_colbuf") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Moench] Dac for 0"); - } - if (dac == "vb_sda") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Moench] Dac for 3"); - } - if (dac == "vcasc_sfp") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Moench] Dac for 4"); - } - if (dac == "vipre_cds") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Moench] Dac for 6"); - } - if (dac == "ibias_sfp") { - return std::string( - "[dac or mV value][(optional unit) mV] \n\t[Moench] Dac for 7"); - } +std::string GetHelpDac(std::string dac); - // clang-format off - if (dac == "vtgstv") { return std::string(""); } - // clang-format on - - throw sls::RuntimeError("Unknown dac command"); -} +std::string GetHelpDacWrapper(const std::string &cmd, + const std::vector &args); } // namespace sls diff --git a/slsDetectorSoftware/src/Module.cpp b/slsDetectorSoftware/src/Module.cpp index 075d6f739..fc85109c2 100644 --- a/slsDetectorSoftware/src/Module.cpp +++ b/slsDetectorSoftware/src/Module.cpp @@ -53,14 +53,6 @@ Module::Module(int det_id, int module_index, bool verify) initSharedMemory(type, det_id, verify); } -Module::~Module() = default; - -void Module::freeSharedMemory() { - if (shm.exists()) { - shm.removeSharedMemory(); - } -} - bool Module::isFixedPatternSharedMemoryCompatible() const { return (shm()->shmversion >= MODULE_SHMAPIVERSION); } @@ -169,6 +161,7 @@ Module::getTypeFromDetector(const std::string &hostname, uint16_t cport) { LOG(logDEBUG1) << "Getting Module type "; ClientSocket socket("Detector", hostname, cport); socket.Send(F_GET_DETECTOR_TYPE); + socket.setFnum(F_GET_DETECTOR_TYPE); if (socket.Receive() == FAIL) { throw RuntimeError("Detector (" + hostname + ", " + std::to_string(cport) + @@ -184,7 +177,8 @@ slsDetectorDefs::detectorType Module::getDetectorType() const { } void Module::updateNumberOfChannels() { - if (shm()->detType == CHIPTESTBOARD) { + if (shm()->detType == CHIPTESTBOARD || + shm()->detType == XILINX_CHIPTESTBOARD) { std::array retvals{}; sendToDetector(F_GET_NUM_CHANNELS, nullptr, retvals); shm()->nChan.x = retvals[0]; @@ -562,6 +556,7 @@ void Module::setSynchronization(const bool value) { std::vector Module::getBadChannels() const { auto client = DetectorSocket(shm()->hostname, shm()->controlPort); client.Send(F_GET_BAD_CHANNELS); + client.setFnum(F_GET_BAD_CHANNELS); if (client.Receive() == FAIL) { throw DetectorError("Detector " + std::to_string(moduleIndex) + " returned error: " + client.readErrorMessage()); @@ -583,6 +578,7 @@ void Module::setBadChannels(std::vector list) { LOG(logDEBUG1) << "Sending bad channels to detector, nch:" << nch; auto client = DetectorSocket(shm()->hostname, shm()->controlPort); client.Send(F_SET_BAD_CHANNELS); + client.setFnum(F_SET_BAD_CHANNELS); client.Send(nch); if (nch > 0) { client.Send(list); @@ -973,6 +969,7 @@ std::vector Module::getFramesCaughtByReceiver() const { if (shm()->useReceiverFlag) { auto client = ReceiverSocket(shm()->rxHostname, shm()->rxTCPPort); client.Send(F_GET_RECEIVER_FRAMES_CAUGHT); + client.setFnum(F_GET_RECEIVER_FRAMES_CAUGHT); if (client.Receive() == FAIL) { throw ReceiverError( "Receiver " + std::to_string(moduleIndex) + @@ -995,6 +992,7 @@ std::vector Module::getNumMissingPackets() const { if (shm()->useReceiverFlag) { auto client = ReceiverSocket(shm()->rxHostname, shm()->rxTCPPort); client.Send(F_GET_NUM_MISSING_PACKETS); + client.setFnum(F_GET_NUM_MISSING_PACKETS); if (client.Receive() == FAIL) { throw ReceiverError( "Receiver " + std::to_string(moduleIndex) + @@ -1017,6 +1015,7 @@ std::vector Module::getReceiverCurrentFrameIndex() const { if (shm()->useReceiverFlag) { auto client = ReceiverSocket(shm()->rxHostname, shm()->rxTCPPort); client.Send(F_GET_RECEIVER_FRAME_INDEX); + client.setFnum(F_GET_RECEIVER_FRAME_INDEX); if (client.Receive() == FAIL) { throw ReceiverError( "Receiver " + std::to_string(moduleIndex) + @@ -1428,8 +1427,8 @@ void Module::setReceiverHostname(const std::string &hostname, shm()->numUDPInterfaces = retval.udpInterfaces; - // to use rx_hostname if empty and also update client zmqip - updateReceiverStreamingIP(); + // to use rx_hostname if empty + updateClientStreamingIP(); } uint16_t Module::getReceiverPort() const { return shm()->rxTCPPort; } @@ -1655,21 +1654,6 @@ void Module::setReceiverStreamingPort(uint16_t port) { sendToReceiver(F_SET_RECEIVER_STREAMING_PORT, port, nullptr); } -IpAddr Module::getReceiverStreamingIP() const { - return sendToReceiver(F_GET_RECEIVER_STREAMING_SRC_IP); -} - -void Module::setReceiverStreamingIP(const IpAddr ip) { - if (ip == 0) { - throw RuntimeError("Invalid receiver zmq ip address"); - } - // if client zmqip is empty, update it - if (shm()->zmqip == 0) { - shm()->zmqip = ip; - } - sendToReceiver(F_SET_RECEIVER_STREAMING_SRC_IP, ip, nullptr); -} - uint16_t Module::getClientStreamingPort() const { return shm()->zmqport; } void Module::setClientStreamingPort(uint16_t port) { shm()->zmqport = port; } @@ -1748,6 +1732,7 @@ void Module::sendReceiverRateCorrections(const std::vector &t) { << ']'; auto receiver = ReceiverSocket(shm()->rxHostname, shm()->rxTCPPort); receiver.Send(F_SET_RECEIVER_RATE_CORRECT); + receiver.setFnum(F_SET_RECEIVER_RATE_CORRECT); receiver.Send(static_cast(t.size())); receiver.Send(t); if (receiver.Receive() == FAIL) { @@ -1954,6 +1939,22 @@ void Module::setPedestalMode(const defs::pedestalParameters par) { } } +defs::timingInfoDecoder Module::getTimingInfoDecoder() const { + return sendToDetector(F_GET_TIMING_INFO_DECODER); +} + +void Module::setTimingInfoDecoder(const defs::timingInfoDecoder value) { + sendToDetector(F_SET_TIMING_INFO_DECODER, static_cast(value), nullptr); +} + +defs::collectionMode Module::getCollectionMode() const { + return sendToDetector(F_GET_COLLECTION_MODE); +} + +void Module::setCollectionMode(const defs::collectionMode value) { + sendToDetector(F_SET_COLLECTION_MODE, static_cast(value), nullptr); +} + // Gotthard Specific slsDetectorDefs::ROI Module::getROI() const { @@ -2028,6 +2029,7 @@ void Module::sendVetoPhoton(const int chipIndex, const int args[]{chipIndex, nch}; auto client = DetectorSocket(shm()->hostname, shm()->controlPort); client.Send(F_SET_VETO_PHOTON); + client.setFnum(F_SET_VETO_PHOTON); client.Send(args); client.Send(gainIndices); client.Send(values); @@ -2042,6 +2044,7 @@ void Module::getVetoPhoton(const int chipIndex, LOG(logDEBUG1) << "Getting veto photon [" << chipIndex << "]\n"; auto client = DetectorSocket(shm()->hostname, shm()->controlPort); client.Send(F_GET_VETO_PHOTON); + client.setFnum(F_GET_VETO_PHOTON); client.Send(chipIndex); if (client.Receive() == FAIL) { throw DetectorError("Detector " + std::to_string(moduleIndex) + @@ -2461,7 +2464,8 @@ void Module::setReadoutMode(const slsDetectorDefs::readoutMode mode) { sendToDetector(F_SET_READOUT_MODE, arg, nullptr); sendToDetectorStop(F_SET_READOUT_MODE, arg, nullptr); // update #nchan, as it depends on #samples, adcmask, - if (shm()->detType == CHIPTESTBOARD) { + if (shm()->detType == CHIPTESTBOARD || + shm()->detType == XILINX_CHIPTESTBOARD) { updateNumberOfChannels(); } if (shm()->useReceiverFlag) { @@ -2529,6 +2533,13 @@ void Module::setLEDEnable(bool enable) { sendToDetector(F_LED, static_cast(enable)); } +// Xilinx Ctb Specific +void Module::configureTransceiver() { + sendToDetector(F_CONFIG_TRANSCEIVER); + LOG(logINFO) << "Module " << moduleIndex << " (" << shm()->hostname + << "): Transceiver configured successfully!"; +} + // Pattern std::string Module::getPatterFileName() const { char retval[MAX_STR_LENGTH]{}; @@ -2539,6 +2550,7 @@ std::string Module::getPatterFileName() const { void Module::setPattern(const Pattern &pat, const std::string &fname) { auto client = DetectorSocket(shm()->hostname, shm()->controlPort); client.Send(F_SET_PATTERN); + client.setFnum(F_SET_PATTERN); client.Send(pat.data(), pat.size()); char args[MAX_STR_LENGTH]{}; strcpy_safe(args, fname.c_str()); @@ -2649,6 +2661,7 @@ std::map Module::getAdditionalJsonHeader() const { } auto client = ReceiverSocket(shm()->rxHostname, shm()->rxTCPPort); client.Send(F_GET_ADDITIONAL_JSON_HEADER); + client.setFnum(F_GET_ADDITIONAL_JSON_HEADER); if (client.Receive() == FAIL) { throw ReceiverError("Receiver " + std::to_string(moduleIndex) + " returned error: " + client.readErrorMessage()); @@ -2694,6 +2707,7 @@ void Module::setAdditionalJsonHeader( << ToString(jsonHeader); auto client = ReceiverSocket(shm()->rxHostname, shm()->rxTCPPort); client.Send(F_SET_ADDITIONAL_JSON_HEADER); + client.setFnum(F_SET_ADDITIONAL_JSON_HEADER); client.Send(size); if (size > 0) client.Send(&buff[0], buff.size()); @@ -2817,18 +2831,20 @@ uint32_t Module::readRegister(uint32_t addr) const { return sendToDetectorStop(F_READ_REGISTER, addr); } -uint32_t Module::writeRegister(uint32_t addr, uint32_t val) { - uint32_t args[]{addr, val}; - return sendToDetectorStop(F_WRITE_REGISTER, args); +void Module::writeRegister(uint32_t addr, uint32_t val, bool validate) { + uint32_t args[]{addr, val, static_cast(validate)}; + return sendToDetectorStop(F_WRITE_REGISTER, args, nullptr); } -void Module::setBit(uint32_t addr, int n) { - uint32_t args[2] = {addr, static_cast(n)}; +void Module::setBit(uint32_t addr, int n, bool validate) { + uint32_t args[] = {addr, static_cast(n), + static_cast(validate)}; sendToDetectorStop(F_SET_BIT, args, nullptr); } -void Module::clearBit(uint32_t addr, int n) { - uint32_t args[2] = {addr, static_cast(n)}; +void Module::clearBit(uint32_t addr, int n, bool validate) { + uint32_t args[] = {addr, static_cast(n), + static_cast(validate)}; sendToDetectorStop(F_CLEAR_BIT, args, nullptr); } @@ -2887,6 +2903,7 @@ std::string Module::executeCommand(const std::string &cmd) { << "): Sending command " << cmd; auto client = DetectorSocket(shm()->hostname, shm()->controlPort); client.Send(F_EXEC_COMMAND); + client.setFnum(F_EXEC_COMMAND); client.Send(arg); if (client.Receive() == FAIL) { std::cout << '\n'; @@ -3413,6 +3430,8 @@ const std::string Module::getDetectorAPI() const { return APIMYTHEN3; case GOTTHARD2: return APIGOTTHARD2; + case XILINX_CHIPTESTBOARD: + return APIXILINXCTB; default: throw NotImplementedError( "Detector type not implemented to get Detector API"); @@ -3497,6 +3516,7 @@ void Module::setModule(sls_detector_module &module, bool trimbits) { } auto client = DetectorSocket(shm()->hostname, shm()->controlPort); client.Send(F_SET_MODULE); + client.setFnum(F_SET_MODULE); sendModule(&module, client); if (client.Receive() == FAIL) { throw DetectorError("Module " + std::to_string(moduleIndex) + @@ -3509,6 +3529,7 @@ sls_detector_module Module::getModule() { sls_detector_module module(shm()->detType); auto client = DetectorSocket(shm()->hostname, shm()->controlPort); client.Send(F_GET_MODULE); + client.setFnum(F_GET_MODULE); if (client.Receive() == FAIL) { throw DetectorError("Module " + std::to_string(moduleIndex) + " returned error: " + client.readErrorMessage()); @@ -3601,18 +3622,19 @@ void Module::receiveModule(sls_detector_module *myMod, ClientSocket &client) { LOG(level) << myMod->nchan << " chans received"; } -void Module::updateReceiverStreamingIP() { - auto ip = getReceiverStreamingIP(); +void Module::updateClientStreamingIP() { + auto ip = getClientStreamingIP(); if (ip == 0) { // Hostname could be ip try to decode otherwise look up the hostname ip = IpAddr{shm()->rxHostname}; if (ip == 0) { ip = HostnameToIp(shm()->rxHostname); } - LOG(logINFO) << "Setting default receiver " << moduleIndex - << " streaming zmq ip to " << ip; + LOG(logINFO) << "Setting default module " << moduleIndex + << " zmq ip to " << ip; + + setClientStreamingIP(ip); } - setReceiverStreamingIP(ip); } void Module::updateRateCorrection() { diff --git a/slsDetectorSoftware/src/Module.h b/slsDetectorSoftware/src/Module.h index 4c3d5a97f..aa6f02f1a 100644 --- a/slsDetectorSoftware/src/Module.h +++ b/slsDetectorSoftware/src/Module.h @@ -75,12 +75,6 @@ class Module : public virtual slsDetectorDefs { verify is if shared memory version matches existing one */ explicit Module(int det_id = 0, int module_index = 0, bool verify = true); - virtual ~Module(); - - /** Frees shared memory and deletes shared memory structure - Safe to call only if detector shm also deleted or its numberOfModules is - updated */ - void freeSharedMemory(); bool isFixedPatternSharedMemoryCompatible() const; std::string getHostname() const; @@ -351,8 +345,6 @@ class Module : public virtual slsDetectorDefs { void setReceiverStreamingStartingFrame(int fnum); uint16_t getReceiverStreamingPort() const; void setReceiverStreamingPort(uint16_t port); - IpAddr getReceiverStreamingIP() const; - void setReceiverStreamingIP(const IpAddr ip); uint16_t getClientStreamingPort() const; void setClientStreamingPort(uint16_t port); IpAddr getClientStreamingIP() const; @@ -421,6 +413,10 @@ class Module : public virtual slsDetectorDefs { void setNumberOfFilterCells(int value); defs::pedestalParameters getPedestalMode() const; void setPedestalMode(defs::pedestalParameters par); + defs::timingInfoDecoder getTimingInfoDecoder() const; + void setTimingInfoDecoder(const defs::timingInfoDecoder enable); + defs::collectionMode getCollectionMode() const; + void setCollectionMode(const defs::collectionMode enable); /************************************************** * * @@ -528,6 +524,13 @@ class Module : public virtual slsDetectorDefs { bool getLEDEnable() const; void setLEDEnable(bool enable); + /************************************************** + * * + * Xilinx Ctb Specific * + * * + * ************************************************/ + void configureTransceiver(); + /************************************************** * * * Pattern * @@ -584,9 +587,9 @@ class Module : public virtual slsDetectorDefs { bool getUpdateMode() const; void setUpdateMode(const bool updatemode); uint32_t readRegister(uint32_t addr) const; - uint32_t writeRegister(uint32_t addr, uint32_t val); - void setBit(uint32_t addr, int n); - void clearBit(uint32_t addr, int n); + void writeRegister(uint32_t addr, uint32_t val, bool validate); + void setBit(uint32_t addr, int n, bool validate); + void clearBit(uint32_t addr, int n, bool validate); int getBit(uint32_t addr, int n); void executeFirmwareTest(); void executeBusTest(); @@ -759,7 +762,7 @@ class Module : public virtual slsDetectorDefs { sls_detector_module getModule(); void sendModule(sls_detector_module *myMod, ClientSocket &client); void receiveModule(sls_detector_module *myMod, ClientSocket &client); - void updateReceiverStreamingIP(); + void updateClientStreamingIP(); void updateRateCorrection(); /** Template function to do linear interpolation between two points (Eiger diff --git a/slsDetectorSoftware/src/Pattern.cpp b/slsDetectorSoftware/src/Pattern.cpp index 67b6d120b..3b7049b60 100644 --- a/slsDetectorSoftware/src/Pattern.cpp +++ b/slsDetectorSoftware/src/Pattern.cpp @@ -149,7 +149,7 @@ void Pattern::load(const std::string &fname) { level = StringTo(args[iArg++]); } else { LOG(logWARNING) - << "Depreciated command. Please use patloop next time."; + << "Deprecated command. Please use patloop next time."; if (nargs != 2) { throw RuntimeError("Invalid arguments for " + ToString(args)); @@ -174,7 +174,7 @@ void Pattern::load(const std::string &fname) { } level = StringTo(args[iArg++]); } else { - LOG(logWARNING) << "Depreciated command. Please use " + LOG(logWARNING) << "Deprecated command. Please use " "patnloop next time."; if (nargs != 1) { throw RuntimeError("Invalid arguments for " + @@ -198,7 +198,7 @@ void Pattern::load(const std::string &fname) { level = StringTo(args[iArg++]); } else { LOG(logWARNING) - << "Depreciated command. Please use patwait next time."; + << "Deprecated command. Please use patwait next time."; if (nargs != 1) { throw RuntimeError("Invalid arguments for " + ToString(args)); @@ -220,7 +220,7 @@ void Pattern::load(const std::string &fname) { } level = StringTo(args[iArg++]); } else { - LOG(logWARNING) << "Depreciated command. Please use " + LOG(logWARNING) << "Deprecated command. Please use " "patwaittime next time."; if (nargs != 1) { throw RuntimeError("Invalid arguments for " + diff --git a/slsDetectorSoftware/src/inferAction.cpp b/slsDetectorSoftware/src/inferAction.cpp new file mode 100644 index 000000000..4b46f6bde --- /dev/null +++ b/slsDetectorSoftware/src/inferAction.cpp @@ -0,0 +1,4684 @@ +#include "inferAction.h" + +#include "sls/sls_detector_defs.h" + +namespace sls { + +int InferAction::infer(sls::CmdParser &parser, std::ostream &os) { + + args = parser.arguments(); + + cmd = parser.command(); + + auto it = functions.find(parser.command()); + + if (it != functions.end()) { + + return ((*this).*(it->second))(); + + } else { + + throw RuntimeError( + + "sls_detector not implemented for command: " + parser.command() + + + ". Use sls_detector_get or sls_detector_put."); + } +} + +int InferAction::acquire() { + + if (args.size() == 0) { + throw RuntimeError( + "sls_detector is disabled for command: acquire with number of " + "arguments 0. Use sls_detector_get or sls_detector_put"); + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::activate() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::adcclk() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::adcenable() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::adcenable10g() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::adcindex() { + + if (args.size() == 1) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::adcinvert() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::adclist() { + + throw RuntimeError("sls_detector is disabled for command: adclist. Use " + "sls_detector_get or sls_detector_put"); +} + +int InferAction::adcname() { + + if (args.size() == 1) { + 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::adcphase() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + throw RuntimeError( + "sls_detector is disabled for command: adcphase with number of " + "arguments 1. Use sls_detector_get or sls_detector_put"); + } + + if (args.size() == 2) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::adcpipeline() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::adcreg() { + + if (args.size() == 2) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::adcvpp() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + throw RuntimeError( + "sls_detector is disabled for command: adcvpp with number of " + "arguments 1. Use sls_detector_get or sls_detector_put"); + } + + if (args.size() == 2) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::apulse() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::asamples() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::autocompdisable() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::badchannels() { + + throw RuntimeError("sls_detector is disabled for command: badchannels. Use " + "sls_detector_get or sls_detector_put"); +} + +int InferAction::blockingtrigger() { + + if (args.size() == 0) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::burstmode() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::burstperiod() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + throw RuntimeError( + "sls_detector is disabled for command: burstperiod with number of " + "arguments 1. Use sls_detector_get or sls_detector_put"); + } + + if (args.size() == 2) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::bursts() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::burstsl() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::bustest() { + + if (args.size() == 0) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::cdsgain() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::chipversion() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::clearbit() { + + if (args.size() == 2) { + return slsDetectorDefs::PUT_ACTION; + } + + if (args.size() == 3) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::clearbusy() { + + if (args.size() == 0) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +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() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::clkdiv() { + + if (args.size() == 1) { + 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::clkfreq() { + + if (args.size() == 1) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::clkphase() { + + if (args.size() == 1) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 2) { + throw RuntimeError( + "sls_detector is disabled for command: clkphase with number of " + "arguments 2. Use sls_detector_get or sls_detector_put"); + } + + if (args.size() == 3) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::collectionmode() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::column() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::compdisabletime() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + throw RuntimeError( + "sls_detector is disabled for command: compdisabletime with number " + "of arguments 1. Use sls_detector_get or sls_detector_put"); + } + + if (args.size() == 2) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::confadc() { + + if (args.size() == 2) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 3) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::config() { + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::configtransceiver() { + + if (args.size() == 0) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::counters() { + + throw RuntimeError("sls_detector is disabled for command: counters. Use " + "sls_detector_get or sls_detector_put"); +} + +int InferAction::currentsource() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + if (args.size() == 3) { + return slsDetectorDefs::PUT_ACTION; + } + + if (args.size() == 4) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::dac() { + + if (args.size() == 1) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 2) { + throw RuntimeError( + "sls_detector is disabled for command: dac with number of " + "arguments 2. Use sls_detector_get or sls_detector_put"); + } + + if (args.size() == 3) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::dacindex() { + + if (args.size() == 1) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::daclist() { + + throw RuntimeError("sls_detector is disabled for command: daclist. Use " + "sls_detector_get or sls_detector_put"); +} + +int InferAction::dacname() { + + if (args.size() == 1) { + 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::dacvalues() { + + 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::datastream() { + + if (args.size() == 1) { + 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::dbitclk() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::dbitphase() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + throw RuntimeError( + "sls_detector is disabled for command: dbitphase with number of " + "arguments 1. Use sls_detector_get or sls_detector_put"); + } + + if (args.size() == 2) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::dbitpipeline() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::defaultdac() { + + if (args.size() == 1) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 2) { + throw RuntimeError( + "sls_detector is disabled for command: defaultdac with number of " + "arguments 2. Use sls_detector_get or sls_detector_put"); + } + + if (args.size() == 3) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::defaultpattern() { + + if (args.size() == 0) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::delay() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + throw RuntimeError( + "sls_detector is disabled for command: delay with number of " + "arguments 1. Use sls_detector_get or sls_detector_put"); + } + + if (args.size() == 2) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::delayl() { + + 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::detectorserverversion() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::detsize() { + + 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::diodelay() { + + if (args.size() == 2) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::dpulse() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::dr() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::drlist() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::dsamples() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::execcommand() { + + throw RuntimeError("sls_detector is disabled for command: execcommand. Use " + "sls_detector_get or sls_detector_put"); +} + +int InferAction::exptime() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + throw RuntimeError( + "sls_detector is disabled for command: exptime with number of " + "arguments 1. Use sls_detector_get or sls_detector_put"); + } + + if (args.size() == 2) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::exptime1() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + throw RuntimeError( + "sls_detector is disabled for command: exptime1 with number of " + "arguments 1. Use sls_detector_get or sls_detector_put"); + } + + if (args.size() == 2) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::exptime2() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + throw RuntimeError( + "sls_detector is disabled for command: exptime2 with number of " + "arguments 1. Use sls_detector_get or sls_detector_put"); + } + + if (args.size() == 2) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::exptime3() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + throw RuntimeError( + "sls_detector is disabled for command: exptime3 with number of " + "arguments 1. Use sls_detector_get or sls_detector_put"); + } + + if (args.size() == 2) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +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() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::extsampling() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::extsamplingsrc() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::extsig() { + + if (args.size() == 1) { + 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::fformat() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::filtercells() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::filterresistor() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::findex() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::firmwaretest() { + + if (args.size() == 0) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::firmwareversion() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::fliprows() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::flowcontrol10g() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::fmaster() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::fname() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::foverwrite() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::fpath() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::framecounter() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::frames() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::framesl() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::frametime() { + + 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::free() { + + if (args.size() == 0) { + throw RuntimeError( + "sls_detector is disabled for command: free with number of " + "arguments 0. Use sls_detector_get or sls_detector_put"); + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::fwrite() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::gaincaps() { + + throw RuntimeError("sls_detector is disabled for command: gaincaps. Use " + "sls_detector_get or sls_detector_put"); +} + +int InferAction::gainmode() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::gappixels() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::gatedelay() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + throw RuntimeError( + "sls_detector is disabled for command: gatedelay with number of " + "arguments 1. Use sls_detector_get or sls_detector_put"); + } + + if (args.size() == 2) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::gatedelay1() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + throw RuntimeError( + "sls_detector is disabled for command: gatedelay1 with number of " + "arguments 1. Use sls_detector_get or sls_detector_put"); + } + + if (args.size() == 2) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::gatedelay2() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + throw RuntimeError( + "sls_detector is disabled for command: gatedelay2 with number of " + "arguments 1. Use sls_detector_get or sls_detector_put"); + } + + if (args.size() == 2) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::gatedelay3() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + throw RuntimeError( + "sls_detector is disabled for command: gatedelay3 with number of " + "arguments 1. Use sls_detector_get or sls_detector_put"); + } + + if (args.size() == 2) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::gates() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::getbit() { + + if (args.size() == 2) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::hardwareversion() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::highvoltage() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::hostname() { + + throw RuntimeError("sls_detector is disabled for command: hostname. Use " + "sls_detector_get or sls_detector_put"); +} + +int InferAction::im_a() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::im_b() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::im_c() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::im_d() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::im_io() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::imagetest() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::initialchecks() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::inj_ch() { + + 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::interpolation() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::interruptsubframe() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::kernelversion() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::lastclient() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::led() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::lock() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::master() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::maxadcphaseshift() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::maxclkphaseshift() { + + if (args.size() == 1) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::maxdbitphaseshift() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::measuredperiod() { + + 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::measuredsubperiod() { + + 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::moduleid() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::nextframenumber() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::nmod() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::numinterfaces() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::overflow() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::packageversion() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::parallel() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::parameters() { + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::partialreset() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::patfname() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::patioctrl() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::patlimits() { + + throw RuntimeError("sls_detector is disabled for command: patlimits. Use " + "sls_detector_get or sls_detector_put"); +} + +int InferAction::patloop() { + + throw RuntimeError("sls_detector is disabled for command: patloop. Use " + "sls_detector_get or sls_detector_put"); +} + +int InferAction::patloop0() { + + throw RuntimeError("sls_detector is disabled for command: patloop0. Use " + "sls_detector_get or sls_detector_put"); +} + +int InferAction::patloop1() { + + throw RuntimeError("sls_detector is disabled for command: patloop1. Use " + "sls_detector_get or sls_detector_put"); +} + +int InferAction::patloop2() { + + throw RuntimeError("sls_detector is disabled for command: patloop2. Use " + "sls_detector_get or sls_detector_put"); +} + +int InferAction::patmask() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::patnloop() { + + throw RuntimeError("sls_detector is disabled for command: patnloop. Use " + "sls_detector_get or sls_detector_put"); +} + +int InferAction::patnloop0() { + + throw RuntimeError("sls_detector is disabled for command: patnloop0. Use " + "sls_detector_get or sls_detector_put"); +} + +int InferAction::patnloop1() { + + throw RuntimeError("sls_detector is disabled for command: patnloop1. Use " + "sls_detector_get or sls_detector_put"); +} + +int InferAction::patnloop2() { + + throw RuntimeError("sls_detector is disabled for command: patnloop2. Use " + "sls_detector_get or sls_detector_put"); +} + +int InferAction::patsetbit() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::pattern() { + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::patternstart() { + + if (args.size() == 0) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::patwait() { + + throw RuntimeError("sls_detector is disabled for command: patwait. Use " + "sls_detector_get or sls_detector_put"); +} + +int InferAction::patwait0() { + + throw RuntimeError("sls_detector is disabled for command: patwait0. Use " + "sls_detector_get or sls_detector_put"); +} + +int InferAction::patwait1() { + + throw RuntimeError("sls_detector is disabled for command: patwait1. Use " + "sls_detector_get or sls_detector_put"); +} + +int InferAction::patwait2() { + + throw RuntimeError("sls_detector is disabled for command: patwait2. Use " + "sls_detector_get or sls_detector_put"); +} + +int InferAction::patwaittime() { + + throw RuntimeError("sls_detector is disabled for command: patwaittime. Use " + "sls_detector_get or sls_detector_put"); +} + +int InferAction::patwaittime0() { + + throw RuntimeError("sls_detector is disabled for command: patwaittime0. " + "Use sls_detector_get or sls_detector_put"); +} + +int InferAction::patwaittime1() { + + throw RuntimeError("sls_detector is disabled for command: patwaittime1. " + "Use sls_detector_get or sls_detector_put"); +} + +int InferAction::patwaittime2() { + + throw RuntimeError("sls_detector is disabled for command: patwaittime2. " + "Use sls_detector_get or sls_detector_put"); +} + +int InferAction::patword() { + + if (args.size() == 1) { + 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::pedestalmode() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + if (args.size() == 2) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::period() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + throw RuntimeError( + "sls_detector is disabled for command: period with number of " + "arguments 1. Use sls_detector_get or sls_detector_put"); + } + + if (args.size() == 2) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::periodl() { + + 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::polarity() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::port() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::powerchip() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::powerindex() { + + if (args.size() == 1) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::powerlist() { + + throw RuntimeError("sls_detector is disabled for command: powerlist. Use " + "sls_detector_get or sls_detector_put"); +} + +int InferAction::powername() { + + if (args.size() == 1) { + 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::powervalues() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::programfpga() { + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + if (args.size() == 2) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::pulse() { + + if (args.size() == 3) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::pulsechip() { + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::pulsenmove() { + + if (args.size() == 3) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::pumpprobe() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::quad() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::ratecorr() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::readnrows() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::readout() { + + if (args.size() == 0) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::readoutspeed() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::readoutspeedlist() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::rebootcontroller() { + + if (args.size() == 0) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::reg() { + + if (args.size() == 1) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 2) { + return slsDetectorDefs::PUT_ACTION; + } + + if (args.size() == 3) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::resetdacs() { + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + if (args.size() == 0) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::resetfpga() { + + if (args.size() == 0) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +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() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::row() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::runclk() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::runtime() { + + 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::rx_arping() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::rx_clearroi() { + + if (args.size() == 0) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::rx_dbitlist() { + + throw RuntimeError("sls_detector is disabled for command: rx_dbitlist. Use " + "sls_detector_get or sls_detector_put"); +} + +int InferAction::rx_dbitoffset() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::rx_discardpolicy() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::rx_fifodepth() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::rx_frameindex() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::rx_framescaught() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::rx_framesperfile() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::rx_hostname() { + + throw RuntimeError("sls_detector is disabled for command: rx_hostname. Use " + "sls_detector_get or sls_detector_put"); +} + +int InferAction::rx_jsonaddheader() { + + throw RuntimeError( + "sls_detector is disabled for command: rx_jsonaddheader. Use " + "sls_detector_get or sls_detector_put"); +} + +int InferAction::rx_jsonpara() { + + if (args.size() == 1) { + throw RuntimeError( + "sls_detector is disabled for command: rx_jsonpara with number of " + "arguments 1. Use sls_detector_get or sls_detector_put"); + } + + if (args.size() == 2) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::rx_lastclient() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::rx_lock() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::rx_missingpackets() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::rx_padding() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::rx_printconfig() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::rx_realudpsocksize() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::rx_roi() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 2) { + return slsDetectorDefs::PUT_ACTION; + } + + if (args.size() == 4) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::rx_silent() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::rx_start() { + + if (args.size() == 0) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::rx_status() { + + throw RuntimeError("sls_detector is disabled for command: rx_status. Use " + "sls_detector_get or sls_detector_put"); +} + +int InferAction::rx_stop() { + + if (args.size() == 0) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::rx_tcpport() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::rx_threads() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::rx_udpsocksize() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::rx_version() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::rx_zmqfreq() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::rx_zmqhwm() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::rx_zmqip() { + + throw RuntimeError("sls_detector is disabled for command: rx_zmqip. Use " + "sls_detector_get or sls_detector_put"); +} + +int InferAction::rx_zmqport() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::rx_zmqstartfnum() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::rx_zmqstream() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::samples() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::savepattern() { + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::scan() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + if (args.size() == 4) { + return slsDetectorDefs::PUT_ACTION; + } + + if (args.size() == 5) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::scanerrmsg() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::selinterface() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::serialnumber() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::setbit() { + + if (args.size() == 2) { + return slsDetectorDefs::PUT_ACTION; + } + + if (args.size() == 3) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::settings() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::settingslist() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::settingspath() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::signalindex() { + + if (args.size() == 1) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::signallist() { + + throw RuntimeError("sls_detector is disabled for command: signallist. Use " + "sls_detector_get or sls_detector_put"); +} + +int InferAction::signalname() { + + if (args.size() == 1) { + 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::sleep() { + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + if (args.size() == 2) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::slowadc() { + + if (args.size() == 1) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::slowadcindex() { + + if (args.size() == 1) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::slowadclist() { + + throw RuntimeError("sls_detector is disabled for command: slowadclist. Use " + "sls_detector_get or sls_detector_put"); +} + +int InferAction::slowadcname() { + + if (args.size() == 1) { + 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::slowadcvalues() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::start() { + + if (args.size() == 0) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::status() { + + throw RuntimeError("sls_detector is disabled for command: status. Use " + "sls_detector_get or sls_detector_put"); +} + +int InferAction::stop() { + + if (args.size() == 0) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::stopport() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::storagecell_delay() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + throw RuntimeError( + "sls_detector is disabled for command: storagecell_delay with " + "number of arguments 1. Use sls_detector_get or sls_detector_put"); + } + + if (args.size() == 2) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::storagecell_start() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::subdeadtime() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + throw RuntimeError( + "sls_detector is disabled for command: subdeadtime with number of " + "arguments 1. Use sls_detector_get or sls_detector_put"); + } + + if (args.size() == 2) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::subexptime() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + throw RuntimeError( + "sls_detector is disabled for command: subexptime with number of " + "arguments 1. Use sls_detector_get or sls_detector_put"); + } + + if (args.size() == 2) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::sync() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::syncclk() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::temp_10ge() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::temp_adc() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::temp_control() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::temp_dcdc() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::temp_event() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::temp_fpga() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::temp_fpgaext() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::temp_fpgafl() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::temp_fpgafr() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::temp_slowadc() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::temp_sodl() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::temp_sodr() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::temp_threshold() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::templist() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::tempvalues() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::tengiga() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::threshold() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + if (args.size() == 2) { + return slsDetectorDefs::PUT_ACTION; + } + + if (args.size() == 3) { + return slsDetectorDefs::PUT_ACTION; + } + + if (args.size() == 4) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::timing() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::timing_info_decoder() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::timinglist() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::timingsource() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::top() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::transceiverenable() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::trigger() { + + if (args.size() == 0) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::triggers() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::triggersl() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::trimbits() { + + if (args.size() == 1) { + throw RuntimeError( + "sls_detector is disabled for command: trimbits with number of " + "arguments 1. Use sls_detector_get or sls_detector_put"); + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::trimen() { + + throw RuntimeError("sls_detector is disabled for command: trimen. Use " + "sls_detector_get or sls_detector_put"); +} + +int InferAction::trimval() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::tsamples() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::txdelay() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::txdelay_frame() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::txdelay_left() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::txdelay_right() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::type() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::udp_cleardst() { + + if (args.size() == 0) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::udp_dstip() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::udp_dstip2() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::udp_dstlist() { + + throw RuntimeError("sls_detector is disabled for command: udp_dstlist. Use " + "sls_detector_get or sls_detector_put"); +} + +int InferAction::udp_dstmac() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::udp_dstmac2() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::udp_dstport() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::udp_dstport2() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::udp_firstdst() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::udp_numdst() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::udp_reconfigure() { + + if (args.size() == 0) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::udp_srcip() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::udp_srcip2() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::udp_srcmac() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::udp_srcmac2() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::udp_validate() { + + if (args.size() == 0) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::update() { + + if (args.size() == 2) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::updatedetectorserver() { + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::updatekernel() { + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::updatemode() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::user() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::v_a() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::v_b() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::v_c() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::v_chip() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::v_d() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::v_io() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::v_limit() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::vchip_comp_adc() { + + if (args.size() == 1) { + 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::vchip_comp_fe() { + + if (args.size() == 1) { + 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::vchip_cs() { + + if (args.size() == 1) { + 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::vchip_opa_1st() { + + if (args.size() == 1) { + 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::vchip_opa_fd() { + + if (args.size() == 1) { + 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::vchip_ref_comp_fe() { + + if (args.size() == 1) { + 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::versions() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::veto() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::vetoalg() { + + if (args.size() == 1) { + 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::vetofile() { + + throw RuntimeError("sls_detector is disabled for command: vetofile. Use " + "sls_detector_get or sls_detector_put"); +} + +int InferAction::vetophoton() { + + if (args.size() == 2) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 4) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::vetoref() { + + throw RuntimeError("sls_detector is disabled for command: vetoref. Use " + "sls_detector_get or sls_detector_put"); +} + +int InferAction::vetostream() { + + throw RuntimeError("sls_detector is disabled for command: vetostream. Use " + "sls_detector_get or sls_detector_put"); +} + +int InferAction::virtualFunction() { + + if (args.size() == 2) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::vm_a() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::vm_b() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::vm_c() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::vm_d() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::vm_io() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::zmqhwm() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::zmqip() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +int InferAction::zmqport() { + + if (args.size() == 0) { + return slsDetectorDefs::GET_ACTION; + } + + if (args.size() == 1) { + return slsDetectorDefs::PUT_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } +} + +} // namespace sls diff --git a/slsDetectorSoftware/src/inferAction.h b/slsDetectorSoftware/src/inferAction.h new file mode 100644 index 000000000..dc44bf83f --- /dev/null +++ b/slsDetectorSoftware/src/inferAction.h @@ -0,0 +1,689 @@ +#include "CmdParser.h" +#include +#include +#include + +namespace sls { +class InferAction { + public: + InferAction() {} + int infer(sls::CmdParser &parser, std::ostream &os = std::cout); + std::vector args; + std::string cmd; + + // generated functions + int acquire(); + int activate(); + int adcclk(); + int adcenable(); + int adcenable10g(); + int adcindex(); + int adcinvert(); + int adclist(); + int adcname(); + int adcphase(); + int adcpipeline(); + int adcreg(); + int adcvpp(); + int apulse(); + int asamples(); + int autocompdisable(); + int badchannels(); + int blockingtrigger(); + int burstmode(); + int burstperiod(); + int bursts(); + int burstsl(); + int bustest(); + int cdsgain(); + int chipversion(); + int clearbit(); + int clearbusy(); + int clearroi(); + int clientversion(); + int clkdiv(); + int clkfreq(); + int clkphase(); + int collectionmode(); + int column(); + int compdisabletime(); + int confadc(); + int config(); + int configtransceiver(); + int counters(); + int currentsource(); + int dac(); + int dacindex(); + int daclist(); + int dacname(); + int dacvalues(); + int datastream(); + int dbitclk(); + int dbitphase(); + int dbitpipeline(); + int defaultdac(); + int defaultpattern(); + int delay(); + int delayl(); + int detectorserverversion(); + int detsize(); + int diodelay(); + int dpulse(); + int dr(); + int drlist(); + int dsamples(); + int execcommand(); + int exptime(); + int exptime1(); + int exptime2(); + int exptime3(); + int exptimel(); + int extrastoragecells(); + int extsampling(); + int extsamplingsrc(); + int extsig(); + int fformat(); + int filtercells(); + int filterresistor(); + int findex(); + int firmwaretest(); + int firmwareversion(); + int fliprows(); + int flowcontrol10g(); + int fmaster(); + int fname(); + int foverwrite(); + int fpath(); + int framecounter(); + int frames(); + int framesl(); + int frametime(); + int free(); + int fwrite(); + int gaincaps(); + int gainmode(); + int gappixels(); + int gatedelay(); + int gatedelay1(); + int gatedelay2(); + int gatedelay3(); + int gates(); + int getbit(); + int hardwareversion(); + int highvoltage(); + int hostname(); + int im_a(); + int im_b(); + int im_c(); + int im_d(); + int im_io(); + int imagetest(); + int initialchecks(); + int inj_ch(); + int interpolation(); + int interruptsubframe(); + int kernelversion(); + int lastclient(); + int led(); + int lock(); + int master(); + int maxadcphaseshift(); + int maxclkphaseshift(); + int maxdbitphaseshift(); + int measuredperiod(); + int measuredsubperiod(); + int moduleid(); + int nextframenumber(); + int nmod(); + int numinterfaces(); + int overflow(); + int packageversion(); + int parallel(); + int parameters(); + int partialreset(); + int patfname(); + int patioctrl(); + int patlimits(); + int patloop(); + int patloop0(); + int patloop1(); + int patloop2(); + int patmask(); + int patnloop(); + int patnloop0(); + int patnloop1(); + int patnloop2(); + int patsetbit(); + int pattern(); + int patternstart(); + int patwait(); + int patwait0(); + int patwait1(); + int patwait2(); + int patwaittime(); + int patwaittime0(); + int patwaittime1(); + int patwaittime2(); + int patword(); + int pedestalmode(); + int period(); + int periodl(); + int polarity(); + int port(); + int powerchip(); + int powerindex(); + int powerlist(); + int powername(); + int powervalues(); + int programfpga(); + int pulse(); + int pulsechip(); + int pulsenmove(); + int pumpprobe(); + int quad(); + int ratecorr(); + int readnrows(); + int readout(); + int readoutspeed(); + int readoutspeedlist(); + int rebootcontroller(); + int reg(); + int resetdacs(); + int resetfpga(); + int roi(); + int romode(); + int row(); + int runclk(); + int runtime(); + int rx_arping(); + int rx_clearroi(); + int rx_dbitlist(); + int rx_dbitoffset(); + int rx_discardpolicy(); + int rx_fifodepth(); + int rx_frameindex(); + int rx_framescaught(); + int rx_framesperfile(); + int rx_hostname(); + int rx_jsonaddheader(); + int rx_jsonpara(); + int rx_lastclient(); + int rx_lock(); + int rx_missingpackets(); + int rx_padding(); + int rx_printconfig(); + int rx_realudpsocksize(); + int rx_roi(); + int rx_silent(); + int rx_start(); + int rx_status(); + int rx_stop(); + int rx_tcpport(); + int rx_threads(); + int rx_udpsocksize(); + int rx_version(); + int rx_zmqfreq(); + int rx_zmqhwm(); + int rx_zmqip(); + int rx_zmqport(); + int rx_zmqstartfnum(); + int rx_zmqstream(); + int samples(); + int savepattern(); + int scan(); + int scanerrmsg(); + int selinterface(); + int serialnumber(); + int setbit(); + int settings(); + int settingslist(); + int settingspath(); + int signalindex(); + int signallist(); + int signalname(); + int sleep(); + int slowadc(); + int slowadcindex(); + int slowadclist(); + int slowadcname(); + int slowadcvalues(); + int start(); + int status(); + int stop(); + int stopport(); + int storagecell_delay(); + int storagecell_start(); + int subdeadtime(); + int subexptime(); + int sync(); + int syncclk(); + int temp_10ge(); + int temp_adc(); + int temp_control(); + int temp_dcdc(); + int temp_event(); + int temp_fpga(); + int temp_fpgaext(); + int temp_fpgafl(); + int temp_fpgafr(); + int temp_slowadc(); + int temp_sodl(); + int temp_sodr(); + int temp_threshold(); + int templist(); + int tempvalues(); + int tengiga(); + int threshold(); + int timing(); + int timing_info_decoder(); + int timinglist(); + int timingsource(); + int top(); + int transceiverenable(); + int trigger(); + int triggers(); + int triggersl(); + int trimbits(); + int trimen(); + int trimval(); + int tsamples(); + int txdelay(); + int txdelay_frame(); + int txdelay_left(); + int txdelay_right(); + int type(); + int udp_cleardst(); + int udp_dstip(); + int udp_dstip2(); + int udp_dstlist(); + int udp_dstmac(); + int udp_dstmac2(); + int udp_dstport(); + int udp_dstport2(); + int udp_firstdst(); + int udp_numdst(); + int udp_reconfigure(); + int udp_srcip(); + int udp_srcip2(); + int udp_srcmac(); + int udp_srcmac2(); + int udp_validate(); + int update(); + int updatedetectorserver(); + int updatekernel(); + int updatemode(); + int user(); + int v_a(); + int v_b(); + int v_c(); + int v_chip(); + int v_d(); + int v_io(); + int v_limit(); + int vchip_comp_adc(); + int vchip_comp_fe(); + int vchip_cs(); + int vchip_opa_1st(); + int vchip_opa_fd(); + int vchip_ref_comp_fe(); + int versions(); + int veto(); + int vetoalg(); + int vetofile(); + int vetophoton(); + int vetoref(); + int vetostream(); + int virtualFunction(); + int vm_a(); + int vm_b(); + int vm_c(); + int vm_d(); + int vm_io(); + int zmqhwm(); + int zmqip(); + int zmqport(); + // int frames(); + + private: + using FunctionMap = std::map; + FunctionMap functions{ + // generated functions + + {"acquire", &InferAction::acquire}, + {"activate", &InferAction::activate}, + {"adcclk", &InferAction::adcclk}, + {"adcenable", &InferAction::adcenable}, + {"adcenable10g", &InferAction::adcenable10g}, + {"adcindex", &InferAction::adcindex}, + {"adcinvert", &InferAction::adcinvert}, + {"adclist", &InferAction::adclist}, + {"adcname", &InferAction::adcname}, + {"adcphase", &InferAction::adcphase}, + {"adcpipeline", &InferAction::adcpipeline}, + {"adcreg", &InferAction::adcreg}, + {"adcvpp", &InferAction::adcvpp}, + {"apulse", &InferAction::apulse}, + {"asamples", &InferAction::asamples}, + {"autocompdisable", &InferAction::autocompdisable}, + {"badchannels", &InferAction::badchannels}, + {"blockingtrigger", &InferAction::blockingtrigger}, + {"burstmode", &InferAction::burstmode}, + {"burstperiod", &InferAction::burstperiod}, + {"bursts", &InferAction::bursts}, + {"burstsl", &InferAction::burstsl}, + {"bustest", &InferAction::bustest}, + {"cdsgain", &InferAction::cdsgain}, + {"chipversion", &InferAction::chipversion}, + {"clearbit", &InferAction::clearbit}, + {"clearbusy", &InferAction::clearbusy}, + {"clearroi", &InferAction::clearroi}, + {"clientversion", &InferAction::clientversion}, + {"clkdiv", &InferAction::clkdiv}, + {"clkfreq", &InferAction::clkfreq}, + {"clkphase", &InferAction::clkphase}, + {"collectionmode", &InferAction::collectionmode}, + {"column", &InferAction::column}, + {"compdisabletime", &InferAction::compdisabletime}, + {"confadc", &InferAction::confadc}, + {"config", &InferAction::config}, + {"configtransceiver", &InferAction::configtransceiver}, + {"counters", &InferAction::counters}, + {"currentsource", &InferAction::currentsource}, + {"dac", &InferAction::dac}, + {"dacindex", &InferAction::dacindex}, + {"daclist", &InferAction::daclist}, + {"dacname", &InferAction::dacname}, + {"dacvalues", &InferAction::dacvalues}, + {"datastream", &InferAction::datastream}, + {"dbitclk", &InferAction::dbitclk}, + {"dbitphase", &InferAction::dbitphase}, + {"dbitpipeline", &InferAction::dbitpipeline}, + {"defaultdac", &InferAction::defaultdac}, + {"defaultpattern", &InferAction::defaultpattern}, + {"delay", &InferAction::delay}, + {"delayl", &InferAction::delayl}, + {"detectorserverversion", &InferAction::detectorserverversion}, + {"detsize", &InferAction::detsize}, + {"diodelay", &InferAction::diodelay}, + {"dpulse", &InferAction::dpulse}, + {"dr", &InferAction::dr}, + {"drlist", &InferAction::drlist}, + {"dsamples", &InferAction::dsamples}, + {"execcommand", &InferAction::execcommand}, + {"exptime", &InferAction::exptime}, + {"exptime1", &InferAction::exptime1}, + {"exptime2", &InferAction::exptime2}, + {"exptime3", &InferAction::exptime3}, + {"exptimel", &InferAction::exptimel}, + {"extrastoragecells", &InferAction::extrastoragecells}, + {"extsampling", &InferAction::extsampling}, + {"extsamplingsrc", &InferAction::extsamplingsrc}, + {"extsig", &InferAction::extsig}, + {"fformat", &InferAction::fformat}, + {"filtercells", &InferAction::filtercells}, + {"filterresistor", &InferAction::filterresistor}, + {"findex", &InferAction::findex}, + {"firmwaretest", &InferAction::firmwaretest}, + {"firmwareversion", &InferAction::firmwareversion}, + {"fliprows", &InferAction::fliprows}, + {"flowcontrol10g", &InferAction::flowcontrol10g}, + {"fmaster", &InferAction::fmaster}, + {"fname", &InferAction::fname}, + {"foverwrite", &InferAction::foverwrite}, + {"fpath", &InferAction::fpath}, + {"framecounter", &InferAction::framecounter}, + {"frames", &InferAction::frames}, + {"framesl", &InferAction::framesl}, + {"frametime", &InferAction::frametime}, + {"free", &InferAction::free}, + {"fwrite", &InferAction::fwrite}, + {"gaincaps", &InferAction::gaincaps}, + {"gainmode", &InferAction::gainmode}, + {"gappixels", &InferAction::gappixels}, + {"gatedelay", &InferAction::gatedelay}, + {"gatedelay1", &InferAction::gatedelay1}, + {"gatedelay2", &InferAction::gatedelay2}, + {"gatedelay3", &InferAction::gatedelay3}, + {"gates", &InferAction::gates}, + {"getbit", &InferAction::getbit}, + {"hardwareversion", &InferAction::hardwareversion}, + {"highvoltage", &InferAction::highvoltage}, + {"hostname", &InferAction::hostname}, + {"im_a", &InferAction::im_a}, + {"im_b", &InferAction::im_b}, + {"im_c", &InferAction::im_c}, + {"im_d", &InferAction::im_d}, + {"im_io", &InferAction::im_io}, + {"imagetest", &InferAction::imagetest}, + {"initialchecks", &InferAction::initialchecks}, + {"inj_ch", &InferAction::inj_ch}, + {"interpolation", &InferAction::interpolation}, + {"interruptsubframe", &InferAction::interruptsubframe}, + {"kernelversion", &InferAction::kernelversion}, + {"lastclient", &InferAction::lastclient}, + {"led", &InferAction::led}, + {"lock", &InferAction::lock}, + {"master", &InferAction::master}, + {"maxadcphaseshift", &InferAction::maxadcphaseshift}, + {"maxclkphaseshift", &InferAction::maxclkphaseshift}, + {"maxdbitphaseshift", &InferAction::maxdbitphaseshift}, + {"measuredperiod", &InferAction::measuredperiod}, + {"measuredsubperiod", &InferAction::measuredsubperiod}, + {"moduleid", &InferAction::moduleid}, + {"nextframenumber", &InferAction::nextframenumber}, + {"nmod", &InferAction::nmod}, + {"numinterfaces", &InferAction::numinterfaces}, + {"overflow", &InferAction::overflow}, + {"packageversion", &InferAction::packageversion}, + {"parallel", &InferAction::parallel}, + {"parameters", &InferAction::parameters}, + {"partialreset", &InferAction::partialreset}, + {"patfname", &InferAction::patfname}, + {"patioctrl", &InferAction::patioctrl}, + {"patlimits", &InferAction::patlimits}, + {"patloop", &InferAction::patloop}, + {"patloop0", &InferAction::patloop0}, + {"patloop1", &InferAction::patloop1}, + {"patloop2", &InferAction::patloop2}, + {"patmask", &InferAction::patmask}, + {"patnloop", &InferAction::patnloop}, + {"patnloop0", &InferAction::patnloop0}, + {"patnloop1", &InferAction::patnloop1}, + {"patnloop2", &InferAction::patnloop2}, + {"patsetbit", &InferAction::patsetbit}, + {"patternX", &InferAction::pattern}, + {"patternstart", &InferAction::patternstart}, + {"patwait", &InferAction::patwait}, + {"patwait0", &InferAction::patwait0}, + {"patwait1", &InferAction::patwait1}, + {"patwait2", &InferAction::patwait2}, + {"patwaittime", &InferAction::patwaittime}, + {"patwaittime0", &InferAction::patwaittime0}, + {"patwaittime1", &InferAction::patwaittime1}, + {"patwaittime2", &InferAction::patwaittime2}, + {"patword", &InferAction::patword}, + {"pedestalmode", &InferAction::pedestalmode}, + {"period", &InferAction::period}, + {"periodl", &InferAction::periodl}, + {"polarity", &InferAction::polarity}, + {"port", &InferAction::port}, + {"powerchip", &InferAction::powerchip}, + {"powerindex", &InferAction::powerindex}, + {"powerlist", &InferAction::powerlist}, + {"powername", &InferAction::powername}, + {"powervalues", &InferAction::powervalues}, + {"programfpga", &InferAction::programfpga}, + {"pulse", &InferAction::pulse}, + {"pulsechip", &InferAction::pulsechip}, + {"pulsenmove", &InferAction::pulsenmove}, + {"pumpprobe", &InferAction::pumpprobe}, + {"quad", &InferAction::quad}, + {"ratecorr", &InferAction::ratecorr}, + {"readnrows", &InferAction::readnrows}, + {"readout", &InferAction::readout}, + {"readoutspeed", &InferAction::readoutspeed}, + {"readoutspeedlist", &InferAction::readoutspeedlist}, + {"rebootcontroller", &InferAction::rebootcontroller}, + {"reg", &InferAction::reg}, + {"resetdacs", &InferAction::resetdacs}, + {"resetfpga", &InferAction::resetfpga}, + {"roi", &InferAction::roi}, + {"romode", &InferAction::romode}, + {"row", &InferAction::row}, + {"runclk", &InferAction::runclk}, + {"runtime", &InferAction::runtime}, + {"rx_arping", &InferAction::rx_arping}, + {"rx_clearroi", &InferAction::rx_clearroi}, + {"rx_dbitlist", &InferAction::rx_dbitlist}, + {"rx_dbitoffset", &InferAction::rx_dbitoffset}, + {"rx_discardpolicy", &InferAction::rx_discardpolicy}, + {"rx_fifodepth", &InferAction::rx_fifodepth}, + {"rx_frameindex", &InferAction::rx_frameindex}, + {"rx_framescaught", &InferAction::rx_framescaught}, + {"rx_framesperfile", &InferAction::rx_framesperfile}, + {"rx_hostname", &InferAction::rx_hostname}, + {"rx_jsonaddheader", &InferAction::rx_jsonaddheader}, + {"rx_jsonpara", &InferAction::rx_jsonpara}, + {"rx_lastclient", &InferAction::rx_lastclient}, + {"rx_lock", &InferAction::rx_lock}, + {"rx_missingpackets", &InferAction::rx_missingpackets}, + {"rx_padding", &InferAction::rx_padding}, + {"rx_printconfig", &InferAction::rx_printconfig}, + {"rx_realudpsocksize", &InferAction::rx_realudpsocksize}, + {"rx_roi", &InferAction::rx_roi}, + {"rx_silent", &InferAction::rx_silent}, + {"rx_start", &InferAction::rx_start}, + {"rx_status", &InferAction::rx_status}, + {"rx_stop", &InferAction::rx_stop}, + {"rx_tcpport", &InferAction::rx_tcpport}, + {"rx_threads", &InferAction::rx_threads}, + {"rx_udpsocksize", &InferAction::rx_udpsocksize}, + {"rx_version", &InferAction::rx_version}, + {"rx_zmqfreq", &InferAction::rx_zmqfreq}, + {"rx_zmqhwm", &InferAction::rx_zmqhwm}, + {"rx_zmqip", &InferAction::rx_zmqip}, + {"rx_zmqport", &InferAction::rx_zmqport}, + {"rx_zmqstartfnum", &InferAction::rx_zmqstartfnum}, + {"rx_zmqstream", &InferAction::rx_zmqstream}, + {"samples", &InferAction::samples}, + {"savepattern", &InferAction::savepattern}, + {"scan", &InferAction::scan}, + {"scanerrmsg", &InferAction::scanerrmsg}, + {"selinterface", &InferAction::selinterface}, + {"serialnumber", &InferAction::serialnumber}, + {"setbit", &InferAction::setbit}, + {"settings", &InferAction::settings}, + {"settingslist", &InferAction::settingslist}, + {"settingspath", &InferAction::settingspath}, + {"signalindex", &InferAction::signalindex}, + {"signallist", &InferAction::signallist}, + {"signalname", &InferAction::signalname}, + {"sleep", &InferAction::sleep}, + {"slowadc", &InferAction::slowadc}, + {"slowadcindex", &InferAction::slowadcindex}, + {"slowadclist", &InferAction::slowadclist}, + {"slowadcname", &InferAction::slowadcname}, + {"slowadcvalues", &InferAction::slowadcvalues}, + {"start", &InferAction::start}, + {"status", &InferAction::status}, + {"stop", &InferAction::stop}, + {"stopport", &InferAction::stopport}, + {"storagecell_delay", &InferAction::storagecell_delay}, + {"storagecell_start", &InferAction::storagecell_start}, + {"subdeadtime", &InferAction::subdeadtime}, + {"subexptime", &InferAction::subexptime}, + {"sync", &InferAction::sync}, + {"syncclk", &InferAction::syncclk}, + {"temp_10ge", &InferAction::temp_10ge}, + {"temp_adc", &InferAction::temp_adc}, + {"temp_control", &InferAction::temp_control}, + {"temp_dcdc", &InferAction::temp_dcdc}, + {"temp_event", &InferAction::temp_event}, + {"temp_fpga", &InferAction::temp_fpga}, + {"temp_fpgaext", &InferAction::temp_fpgaext}, + {"temp_fpgafl", &InferAction::temp_fpgafl}, + {"temp_fpgafr", &InferAction::temp_fpgafr}, + {"temp_slowadc", &InferAction::temp_slowadc}, + {"temp_sodl", &InferAction::temp_sodl}, + {"temp_sodr", &InferAction::temp_sodr}, + {"temp_threshold", &InferAction::temp_threshold}, + {"templist", &InferAction::templist}, + {"tempvalues", &InferAction::tempvalues}, + {"tengiga", &InferAction::tengiga}, + {"threshold", &InferAction::threshold}, + {"thresholdnotb", &InferAction::threshold}, + {"timing", &InferAction::timing}, + {"timing_info_decoder", &InferAction::timing_info_decoder}, + {"timinglist", &InferAction::timinglist}, + {"timingsource", &InferAction::timingsource}, + {"top", &InferAction::top}, + {"transceiverenable", &InferAction::transceiverenable}, + {"trigger", &InferAction::trigger}, + {"triggers", &InferAction::triggers}, + {"triggersl", &InferAction::triggersl}, + {"trimbits", &InferAction::trimbits}, + {"trimen", &InferAction::trimen}, + {"trimval", &InferAction::trimval}, + {"tsamples", &InferAction::tsamples}, + {"txdelay", &InferAction::txdelay}, + {"txdelay_frame", &InferAction::txdelay_frame}, + {"txdelay_left", &InferAction::txdelay_left}, + {"txdelay_right", &InferAction::txdelay_right}, + {"type", &InferAction::type}, + {"udp_cleardst", &InferAction::udp_cleardst}, + {"udp_dstip", &InferAction::udp_dstip}, + {"udp_dstip2", &InferAction::udp_dstip2}, + {"udp_dstlist", &InferAction::udp_dstlist}, + {"udp_dstmac", &InferAction::udp_dstmac}, + {"udp_dstmac2", &InferAction::udp_dstmac2}, + {"udp_dstport", &InferAction::udp_dstport}, + {"udp_dstport2", &InferAction::udp_dstport2}, + {"udp_firstdst", &InferAction::udp_firstdst}, + {"udp_numdst", &InferAction::udp_numdst}, + {"udp_reconfigure", &InferAction::udp_reconfigure}, + {"udp_srcip", &InferAction::udp_srcip}, + {"udp_srcip2", &InferAction::udp_srcip2}, + {"udp_srcmac", &InferAction::udp_srcmac}, + {"udp_srcmac2", &InferAction::udp_srcmac2}, + {"udp_validate", &InferAction::udp_validate}, + {"update", &InferAction::update}, + {"updatedetectorserver", &InferAction::updatedetectorserver}, + {"updatekernel", &InferAction::updatekernel}, + {"updatemode", &InferAction::updatemode}, + {"user", &InferAction::user}, + {"v_a", &InferAction::v_a}, + {"v_b", &InferAction::v_b}, + {"v_c", &InferAction::v_c}, + {"v_chip", &InferAction::v_chip}, + {"v_d", &InferAction::v_d}, + {"v_io", &InferAction::v_io}, + {"v_limit", &InferAction::v_limit}, + {"vchip_comp_adc", &InferAction::vchip_comp_adc}, + {"vchip_comp_fe", &InferAction::vchip_comp_fe}, + {"vchip_cs", &InferAction::vchip_cs}, + {"vchip_opa_1st", &InferAction::vchip_opa_1st}, + {"vchip_opa_fd", &InferAction::vchip_opa_fd}, + {"vchip_ref_comp_fe", &InferAction::vchip_ref_comp_fe}, + {"versions", &InferAction::versions}, + {"veto", &InferAction::veto}, + {"vetoalg", &InferAction::vetoalg}, + {"vetofile", &InferAction::vetofile}, + {"vetophoton", &InferAction::vetophoton}, + {"vetoref", &InferAction::vetoref}, + {"vetostream", &InferAction::vetostream}, + {"virtual", &InferAction::virtualFunction}, + {"vm_a", &InferAction::vm_a}, + {"vm_b", &InferAction::vm_b}, + {"vm_c", &InferAction::vm_c}, + {"vm_d", &InferAction::vm_d}, + {"vm_io", &InferAction::vm_io}, + {"zmqhwm", &InferAction::zmqhwm}, + {"zmqip", &InferAction::zmqip}, + {"zmqport", &InferAction::zmqport} + + // {"frames",&InferAction::frames} + + }; +}; + +} // namespace sls \ No newline at end of file diff --git a/slsDetectorSoftware/tests/CMakeLists.txt b/slsDetectorSoftware/tests/CMakeLists.txt index 14a522639..521deec4d 100755 --- a/slsDetectorSoftware/tests/CMakeLists.txt +++ b/slsDetectorSoftware/tests/CMakeLists.txt @@ -1,29 +1,39 @@ # SPDX-License-Identifier: LGPL-3.0-or-other # Copyright (C) 2021 Contributors to the SLS Detector Package + + target_sources(tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/test-SharedMemory.cpp ${CMAKE_CURRENT_SOURCE_DIR}/test-slsDetector.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test-CmdProxy.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test-CmdProxy-rx.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test-CmdProxy-pattern.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test-CmdProxy-eiger.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test-CmdProxy-jungfrau.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test-CmdProxy-mythen3.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test-CmdProxy-gotthard2.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test-CmdProxy-gotthard.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test-CmdProxy-chiptestboard.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test-CmdProxy-moench.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test-CmdProxy-global.cpp + + ${CMAKE_CURRENT_SOURCE_DIR}/Caller/test-Caller.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/Caller/test-Caller-rx.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/Caller/test-Caller-pattern.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/Caller/test-Caller-eiger.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-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-xilinx-chiptestboard.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/Caller/test-Caller-moench.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/Caller/test-Caller-global.cpp + + ${CMAKE_CURRENT_SOURCE_DIR}/test-Result.cpp ${CMAKE_CURRENT_SOURCE_DIR}/test-CmdParser.cpp ${CMAKE_CURRENT_SOURCE_DIR}/test-Module.cpp ${CMAKE_CURRENT_SOURCE_DIR}/test-Pattern.cpp ${CMAKE_CURRENT_SOURCE_DIR}/test-CtbConfig.cpp + + + ) target_include_directories(tests PUBLIC "$" + "$" PRIVATE ${SLS_INTERNAL_RAPIDJSON_DIR} ) \ No newline at end of file diff --git a/slsDetectorSoftware/tests/test-CmdProxy-chiptestboard.cpp b/slsDetectorSoftware/tests/Caller/test-Caller-chiptestboard.cpp similarity index 50% rename from slsDetectorSoftware/tests/test-CmdProxy-chiptestboard.cpp rename to slsDetectorSoftware/tests/Caller/test-Caller-chiptestboard.cpp index 314b48e60..fbb11128d 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy-chiptestboard.cpp +++ b/slsDetectorSoftware/tests/Caller/test-Caller-chiptestboard.cpp @@ -1,6 +1,6 @@ // SPDX-License-Identifier: LGPL-3.0-or-other // Copyright (C) 2021 Contributors to the SLS Detector Package -#include "CmdProxy.h" +#include "Caller.h" #include "catch.hpp" #include "sls/Detector.h" #include "sls/sls_detector_defs.h" @@ -9,7 +9,7 @@ #include "sls/Result.h" #include "sls/ToString.h" #include "sls/versionAPI.h" -#include "test-CmdProxy-global.h" +#include "test-Caller-global.h" #include "tests/globals.h" namespace sls { @@ -19,74 +19,77 @@ using test::PUT; /* dacs */ -TEST_CASE("dacname", "[.cmd]") { +TEST_CASE("dacname", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { defs::dacIndex ind = static_cast(2); std::string str_dac_index = "2"; auto prev = det.getDacName(ind); // 1 arg throw - REQUIRE_THROWS(proxy.Call("dacname", {"2", "3", "bname"}, -1, PUT)); + REQUIRE_THROWS(caller.call("dacname", {"2", "3", "bname"}, -1, PUT)); // invalid index - REQUIRE_THROWS(proxy.Call("dacname", {"18", "bname"}, -1, PUT)); + REQUIRE_THROWS(caller.call("dacname", {"18", "bname"}, -1, PUT)); { std::ostringstream oss; REQUIRE_NOTHROW( - proxy.Call("dacname", {str_dac_index, "bname"}, -1, PUT, oss)); + caller.call("dacname", {str_dac_index, "bname"}, -1, PUT, oss)); } { std::ostringstream oss; REQUIRE_NOTHROW( - proxy.Call("dacname", {str_dac_index}, -1, GET, oss)); + caller.call("dacname", {str_dac_index}, -1, GET, oss)); REQUIRE(oss.str() == std::string("dacname ") + str_dac_index + " bname\n"); } det.setDacName(ind, prev); } else { - REQUIRE_THROWS(proxy.Call("dacname", {"2", "b"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("dacname", {"2"}, -1, GET)); + REQUIRE_THROWS(caller.call("dacname", {"2", "b"}, -1, PUT)); + REQUIRE_THROWS(caller.call("dacname", {"2"}, -1, GET)); } } -TEST_CASE("dacindex", "[.cmd]") { +TEST_CASE("dacindex", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { defs::dacIndex ind = static_cast(2); std::string str_dac_index = "2"; // 1 arg throw - REQUIRE_THROWS(proxy.Call("dacindex", {"2", "2"}, -1, PUT)); + REQUIRE_THROWS(caller.call("dacindex", {"2", "2"}, -1, PUT)); // invalid index - REQUIRE_THROWS(proxy.Call("dacindex", {"18"}, -1, PUT)); + REQUIRE_THROWS(caller.call("dacindex", {"18"}, -1, PUT)); auto dacname = det.getDacName(ind); { std::ostringstream oss; - REQUIRE_NOTHROW(proxy.Call("dacindex", {dacname}, -1, GET, oss)); + REQUIRE_NOTHROW(caller.call("dacindex", {dacname}, -1, GET, oss)); REQUIRE(oss.str() == std::string("dacindex ") + str_dac_index + '\n'); } } else { - REQUIRE_THROWS(proxy.Call("dacindex", {"2"}, -1, GET)); + REQUIRE_THROWS(caller.call("dacindex", {"2"}, -1, GET)); } } -TEST_CASE("adclist", "[.cmd]") { +TEST_CASE("adclist", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { auto prev = det.getAdcNames(); - REQUIRE_THROWS(proxy.Call("adclist", {"a", "s", "d"}, -1, PUT)); + REQUIRE_THROWS(caller.call("adclist", {"a", "s", "d"}, -1, PUT)); std::vector names; for (int iarg = 0; iarg != 32; ++iarg) { @@ -94,90 +97,93 @@ TEST_CASE("adclist", "[.cmd]") { } { std::ostringstream oss; - REQUIRE_NOTHROW(proxy.Call("adclist", names, -1, PUT, oss)); + REQUIRE_NOTHROW(caller.call("adclist", names, -1, PUT, oss)); } { std::ostringstream oss; - REQUIRE_NOTHROW(proxy.Call("adclist", {}, -1, GET, oss)); + REQUIRE_NOTHROW(caller.call("adclist", {}, -1, GET, oss)); REQUIRE(oss.str() == std::string("adclist ") + ToString(names) + '\n'); } det.setAdcNames(prev); } else { - REQUIRE_THROWS(proxy.Call("adclist", {"a", "b"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("adclist", {}, -1, GET)); + REQUIRE_THROWS(caller.call("adclist", {"a", "b"}, -1, PUT)); + REQUIRE_THROWS(caller.call("adclist", {}, -1, GET)); } } -TEST_CASE("adcname", "[.cmd]") { +TEST_CASE("adcname", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { int ind = 2; std::string str_adc_index = "2"; auto prev = det.getAdcName(ind); // 1 arg throw - REQUIRE_THROWS(proxy.Call("adcname", {"2", "3", "bname"}, -1, PUT)); + REQUIRE_THROWS(caller.call("adcname", {"2", "3", "bname"}, -1, PUT)); // invalid index - REQUIRE_THROWS(proxy.Call("adcname", {"32", "bname"}, -1, PUT)); + REQUIRE_THROWS(caller.call("adcname", {"32", "bname"}, -1, PUT)); { std::ostringstream oss; REQUIRE_NOTHROW( - proxy.Call("adcname", {str_adc_index, "bname"}, -1, PUT, oss)); + caller.call("adcname", {str_adc_index, "bname"}, -1, PUT, oss)); } { std::ostringstream oss; REQUIRE_NOTHROW( - proxy.Call("adcname", {str_adc_index}, -1, GET, oss)); + caller.call("adcname", {str_adc_index}, -1, GET, oss)); REQUIRE(oss.str() == std::string("adcname ") + str_adc_index + " bname\n"); } det.setAdcName(ind, prev); } else { - REQUIRE_THROWS(proxy.Call("adcname", {"2", "b"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("adcname", {"2"}, -1, GET)); + REQUIRE_THROWS(caller.call("adcname", {"2", "b"}, -1, PUT)); + REQUIRE_THROWS(caller.call("adcname", {"2"}, -1, GET)); } } -TEST_CASE("adcindex", "[.cmd]") { +TEST_CASE("adcindex", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { int ind = 2; std::string str_adc_index = "2"; // 1 arg throw - REQUIRE_THROWS(proxy.Call("adcindex", {"2", "2"}, -1, PUT)); + REQUIRE_THROWS(caller.call("adcindex", {"2", "2"}, -1, PUT)); // invalid index - REQUIRE_THROWS(proxy.Call("adcindex", {"32"}, -1, PUT)); + REQUIRE_THROWS(caller.call("adcindex", {"32"}, -1, PUT)); auto adcname = det.getAdcName(ind); { std::ostringstream oss; - REQUIRE_NOTHROW(proxy.Call("adcindex", {adcname}, -1, GET, oss)); + REQUIRE_NOTHROW(caller.call("adcindex", {adcname}, -1, GET, oss)); REQUIRE(oss.str() == std::string("adcindex ") + str_adc_index + '\n'); } } else { - REQUIRE_THROWS(proxy.Call("adcindex", {"2"}, -1, GET)); + REQUIRE_THROWS(caller.call("adcindex", {"2"}, -1, GET)); } } -TEST_CASE("signallist", "[.cmd]") { +TEST_CASE("signallist", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { auto prev = det.getSignalNames(); - REQUIRE_THROWS(proxy.Call("signallist", {"a", "s", "d"}, -1, PUT)); + REQUIRE_THROWS(caller.call("signallist", {"a", "s", "d"}, -1, PUT)); std::vector names; for (int iarg = 0; iarg != 64; ++iarg) { @@ -185,91 +191,94 @@ TEST_CASE("signallist", "[.cmd]") { } { std::ostringstream oss; - REQUIRE_NOTHROW(proxy.Call("signallist", names, -1, PUT, oss)); + REQUIRE_NOTHROW(caller.call("signallist", names, -1, PUT, oss)); } { std::ostringstream oss; - REQUIRE_NOTHROW(proxy.Call("signallist", {}, -1, GET, oss)); + REQUIRE_NOTHROW(caller.call("signallist", {}, -1, GET, oss)); REQUIRE(oss.str() == std::string("signallist ") + ToString(names) + '\n'); } det.setSignalNames(prev); } else { - REQUIRE_THROWS(proxy.Call("signallist", {"a", "b"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("signallist", {}, -1, GET)); + REQUIRE_THROWS(caller.call("signallist", {"a", "b"}, -1, PUT)); + REQUIRE_THROWS(caller.call("signallist", {}, -1, GET)); } } -TEST_CASE("signalname", "[.cmd]") { +TEST_CASE("signalname", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { int ind = 2; std::string str_signal_index = "2"; auto prev = det.getSignalName(ind); // 1 arg throw - REQUIRE_THROWS(proxy.Call("signalname", {"2", "3", "bname"}, -1, PUT)); + REQUIRE_THROWS(caller.call("signalname", {"2", "3", "bname"}, -1, PUT)); // invalid index - REQUIRE_THROWS(proxy.Call("signalname", {"64", "bname"}, -1, PUT)); + REQUIRE_THROWS(caller.call("signalname", {"64", "bname"}, -1, PUT)); { std::ostringstream oss; - REQUIRE_NOTHROW(proxy.Call( + REQUIRE_NOTHROW(caller.call( "signalname", {str_signal_index, "bname"}, -1, PUT, oss)); } { std::ostringstream oss; REQUIRE_NOTHROW( - proxy.Call("signalname", {str_signal_index}, -1, GET, oss)); + caller.call("signalname", {str_signal_index}, -1, GET, oss)); REQUIRE(oss.str() == std::string("signalname ") + str_signal_index + " bname\n"); } det.setSignalName(ind, prev); } else { - REQUIRE_THROWS(proxy.Call("signalname", {"2", "b"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("signalname", {"2"}, -1, GET)); + REQUIRE_THROWS(caller.call("signalname", {"2", "b"}, -1, PUT)); + REQUIRE_THROWS(caller.call("signalname", {"2"}, -1, GET)); } } -TEST_CASE("signalindex", "[.cmd]") { +TEST_CASE("signalindex", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { int ind = 2; std::string str_signal_index = "2"; // 1 arg throw - REQUIRE_THROWS(proxy.Call("signalindex", {"2", "2"}, -1, PUT)); + REQUIRE_THROWS(caller.call("signalindex", {"2", "2"}, -1, PUT)); // invalid index - REQUIRE_THROWS(proxy.Call("signalindex", {"64"}, -1, PUT)); + REQUIRE_THROWS(caller.call("signalindex", {"64"}, -1, PUT)); auto signalname = det.getSignalName(ind); { std::ostringstream oss; REQUIRE_NOTHROW( - proxy.Call("signalindex", {signalname}, -1, GET, oss)); + caller.call("signalindex", {signalname}, -1, GET, oss)); REQUIRE(oss.str() == std::string("signalindex ") + str_signal_index + '\n'); } } else { - REQUIRE_THROWS(proxy.Call("signalindex", {"2"}, -1, GET)); + REQUIRE_THROWS(caller.call("signalindex", {"2"}, -1, GET)); } } -TEST_CASE("powerlist", "[.cmd]") { +TEST_CASE("powerlist", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { auto prev = det.getPowerNames(); - REQUIRE_THROWS(proxy.Call("powerlist", {"a", "s", "d"}, -1, PUT)); + REQUIRE_THROWS(caller.call("powerlist", {"a", "s", "d"}, -1, PUT)); std::vector names; for (int iarg = 0; iarg != 5; ++iarg) { @@ -277,119 +286,120 @@ TEST_CASE("powerlist", "[.cmd]") { } { std::ostringstream oss; - REQUIRE_NOTHROW(proxy.Call("powerlist", names, -1, PUT, oss)); + REQUIRE_NOTHROW(caller.call("powerlist", names, -1, PUT, oss)); } { std::ostringstream oss; - REQUIRE_NOTHROW(proxy.Call("powerlist", {}, -1, GET, oss)); + REQUIRE_NOTHROW(caller.call("powerlist", {}, -1, GET, oss)); REQUIRE(oss.str() == std::string("powerlist ") + ToString(names) + '\n'); } det.setPowerNames(prev); } else { - REQUIRE_THROWS(proxy.Call("powerlist", {"a", "b"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("powerlist", {}, -1, GET)); + REQUIRE_THROWS(caller.call("powerlist", {"a", "b"}, -1, PUT)); + REQUIRE_THROWS(caller.call("powerlist", {}, -1, GET)); } } -TEST_CASE("powername", "[.cmd]") { +TEST_CASE("powername", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { defs::dacIndex ind = static_cast(2 + defs::V_POWER_A); std::string str_power_index = "2"; auto prev = det.getPowerName(ind); // 1 arg throw - REQUIRE_THROWS(proxy.Call("powername", {"2", "3", "bname"}, -1, PUT)); + REQUIRE_THROWS(caller.call("powername", {"2", "3", "bname"}, -1, PUT)); // invalid index - REQUIRE_THROWS(proxy.Call("powername", {"5", "bname"}, -1, PUT)); + REQUIRE_THROWS(caller.call("powername", {"5", "bname"}, -1, PUT)); { std::ostringstream oss; - REQUIRE_NOTHROW(proxy.Call("powername", {str_power_index, "bname"}, - -1, PUT, oss)); + REQUIRE_NOTHROW(caller.call("powername", {str_power_index, "bname"}, + -1, PUT, oss)); } { std::ostringstream oss; REQUIRE_NOTHROW( - proxy.Call("powername", {str_power_index}, -1, GET, oss)); + caller.call("powername", {str_power_index}, -1, GET, oss)); REQUIRE(oss.str() == std::string("powername ") + str_power_index + " bname\n"); } det.setPowerName(ind, prev); } else { - REQUIRE_THROWS(proxy.Call("powername", {"2", "b"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("powername", {"2"}, -1, GET)); + REQUIRE_THROWS(caller.call("powername", {"2", "b"}, -1, PUT)); + REQUIRE_THROWS(caller.call("powername", {"2"}, -1, GET)); } } -TEST_CASE("powerindex", "[.cmd]") { +TEST_CASE("powerindex", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { defs::dacIndex ind = static_cast(2 + defs::V_POWER_A); std::string str_power_index = "2"; // 1 arg throw - REQUIRE_THROWS(proxy.Call("powerindex", {"2", "2"}, -1, PUT)); + REQUIRE_THROWS(caller.call("powerindex", {"2", "2"}, -1, PUT)); // invalid index - REQUIRE_THROWS(proxy.Call("powerindex", {"5"}, -1, PUT)); + REQUIRE_THROWS(caller.call("powerindex", {"5"}, -1, PUT)); auto powername = det.getPowerName(ind); { std::ostringstream oss; REQUIRE_NOTHROW( - proxy.Call("powerindex", {powername}, -1, GET, oss)); + caller.call("powerindex", {powername}, -1, GET, oss)); REQUIRE(oss.str() == std::string("powerindex ") + str_power_index + '\n'); } } else { - REQUIRE_THROWS(proxy.Call("powerindex", {"2"}, -1, GET)); + REQUIRE_THROWS(caller.call("powerindex", {"2"}, -1, GET)); } } -TEST_CASE("powervalues", "[.cmd]") { +TEST_CASE("powervalues", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); - + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - - if (det_type == defs::CHIPTESTBOARD) { - REQUIRE_NOTHROW(proxy.Call("powervalues", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("powervalues", {}, -1, PUT)); + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { + REQUIRE_NOTHROW(caller.call("powervalues", {}, -1, GET)); + REQUIRE_THROWS(caller.call("powervalues", {}, -1, PUT)); } else { - REQUIRE_THROWS(proxy.Call("powervalues", {}, -1, GET)); + REQUIRE_THROWS(caller.call("powervalues", {}, -1, GET)); } } -TEST_CASE("slowadcvalues", "[.cmd]") { +TEST_CASE("slowadcvalues", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); - + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - - if (det_type == defs::CHIPTESTBOARD) { - REQUIRE_NOTHROW(proxy.Call("slowadcvalues", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("slowadcvalues", {}, -1, PUT)); + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { + REQUIRE_NOTHROW(caller.call("slowadcvalues", {}, -1, GET)); + REQUIRE_THROWS(caller.call("slowadcvalues", {}, -1, PUT)); } else { - REQUIRE_THROWS(proxy.Call("slowadcvalues", {}, -1, GET)); + REQUIRE_THROWS(caller.call("slowadcvalues", {}, -1, GET)); } } -TEST_CASE("slowadclist", "[.cmd]") { +TEST_CASE("slowadclist", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { auto prev = det.getSlowADCNames(); - REQUIRE_THROWS(proxy.Call("slowadclist", {"a", "s", "d"}, -1, PUT)); + REQUIRE_THROWS(caller.call("slowadclist", {"a", "s", "d"}, -1, PUT)); std::vector names; for (int iarg = 0; iarg != 8; ++iarg) { @@ -397,296 +407,299 @@ TEST_CASE("slowadclist", "[.cmd]") { } { std::ostringstream oss; - REQUIRE_NOTHROW(proxy.Call("slowadclist", names, -1, PUT, oss)); + REQUIRE_NOTHROW(caller.call("slowadclist", names, -1, PUT, oss)); } { std::ostringstream oss; - REQUIRE_NOTHROW(proxy.Call("slowadclist", {}, -1, GET, oss)); + REQUIRE_NOTHROW(caller.call("slowadclist", {}, -1, GET, oss)); REQUIRE(oss.str() == std::string("slowadclist ") + ToString(names) + '\n'); } det.setSlowADCNames(prev); } else { - REQUIRE_THROWS(proxy.Call("slowadclist", {"a", "b"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("slowadclist", {}, -1, GET)); + REQUIRE_THROWS(caller.call("slowadclist", {"a", "b"}, -1, PUT)); + REQUIRE_THROWS(caller.call("slowadclist", {}, -1, GET)); } } -TEST_CASE("slowadcname", "[.cmd]") { +TEST_CASE("slowadcname", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { defs::dacIndex ind = static_cast(2 + defs::SLOW_ADC0); std::string str_slowadc_index = "2"; auto prev = det.getSlowADCName(ind); // 1 arg throw - REQUIRE_THROWS(proxy.Call("slowadcname", {"2", "3", "bname"}, -1, PUT)); + REQUIRE_THROWS( + caller.call("slowadcname", {"2", "3", "bname"}, -1, PUT)); // invalid index - REQUIRE_THROWS(proxy.Call("slowadcname", {"8", "bname"}, -1, PUT)); + REQUIRE_THROWS(caller.call("slowadcname", {"8", "bname"}, -1, PUT)); { std::ostringstream oss; - REQUIRE_NOTHROW(proxy.Call( + REQUIRE_NOTHROW(caller.call( "slowadcname", {str_slowadc_index, "bname"}, -1, PUT, oss)); } { std::ostringstream oss; REQUIRE_NOTHROW( - proxy.Call("slowadcname", {str_slowadc_index}, -1, GET, oss)); + caller.call("slowadcname", {str_slowadc_index}, -1, GET, oss)); REQUIRE(oss.str() == std::string("slowadcname ") + str_slowadc_index + " bname\n"); } det.setSlowADCName(ind, prev); } else { - REQUIRE_THROWS(proxy.Call("slowadcname", {"2", "b"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("slowadcname", {"2"}, -1, GET)); + REQUIRE_THROWS(caller.call("slowadcname", {"2", "b"}, -1, PUT)); + REQUIRE_THROWS(caller.call("slowadcname", {"2"}, -1, GET)); } } -TEST_CASE("slowadcindex", "[.cmd]") { +TEST_CASE("slowadcindex", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { defs::dacIndex ind = static_cast(2 + defs::SLOW_ADC0); std::string str_slowadc_index = "2"; // 1 arg throw - REQUIRE_THROWS(proxy.Call("slowadcindex", {"2", "2"}, -1, PUT)); + REQUIRE_THROWS(caller.call("slowadcindex", {"2", "2"}, -1, PUT)); // invalid index - REQUIRE_THROWS(proxy.Call("slowadcindex", {"8"}, -1, PUT)); + REQUIRE_THROWS(caller.call("slowadcindex", {"8"}, -1, PUT)); auto slowadcname = det.getSlowADCName(ind); { std::ostringstream oss; REQUIRE_NOTHROW( - proxy.Call("slowadcindex", {slowadcname}, -1, GET, oss)); + caller.call("slowadcindex", {slowadcname}, -1, GET, oss)); REQUIRE(oss.str() == std::string("slowadcindex ") + str_slowadc_index + '\n'); } } else { - REQUIRE_THROWS(proxy.Call("slowadcindex", {"2"}, -1, GET)); + REQUIRE_THROWS(caller.call("slowadcindex", {"2"}, -1, GET)); } } /* dacs */ -TEST_CASE("dac", "[.cmd][.dacs]") { +TEST_CASE("dac", "[.cmdcall][.dacs]") { // dac 0 to dac 17 Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { for (int i = 0; i < 18; ++i) { SECTION("dac " + std::to_string(i)) { - test_dac(static_cast(i), "dac", 0); + test_dac_caller(static_cast(i), "dac", 0); } } + // eiger - // REQUIRE_THROWS(proxy.Call("dac", {"vthreshold"}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("dac", {"vsvp"}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("dac", {"vsvn"}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("dac", {"vtrim"}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("dac", {"vrpreamp"}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("dac", {"vrshaper"}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("dac", {"vtgstv"}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("dac", {"vcmp_ll"}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("dac", {"vcmp_lr"}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("dac", {"vcal"}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("dac", {"vcmp_rl"}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("dac", {"vcmp_rr"}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("dac", {"rxb_rb"}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("dac", {"rxb_lb"}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("dac", {"vcp"}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("dac", {"vcn"}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("dac", {"vishaper"}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("dac", {"iodelay"}, -1, GET)); + // 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(proxy.Call("dac", {"vb_comp"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vdd_prot"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vin_com"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vref_prech"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vb_pixbuf"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vb_ds"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vref_ds"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vref_comp"}, -1, GET)); + 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)); // gotthard - REQUIRE_THROWS(proxy.Call("dac", {"vref_ds"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcascn_pb"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcascp_pb"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vout_cm"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcasc_out"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vin_cm"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vref_comp"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"ib_test_c"}, -1, GET)); + 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 - REQUIRE_THROWS(proxy.Call("dac", {"vrpreamp"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vrshaper"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vrshaper_n"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vipre"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vishaper"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vdcsh"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vth1"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vth2"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vth3"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcal_n"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcal_p"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vtrim"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcassh"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcas"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vicin"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vipre_out"}, -1, GET)); + 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(proxy.Call("dac", {"vref_h_Signal"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vb_comp_fe"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vb_comp_adc"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcom_cds"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vref_rstore"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vb_opa_1st"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vref_comp_fe"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcom_adc1"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vref_l_adc"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vref_cds"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vb_cs"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vb_opa_fd"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcom_adc2"}, -1, GET)); + REQUIRE_THROWS(caller.call("dac", {"vref_h_Signal"}, -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)); } } -TEST_CASE("adcvpp", "[.cmd]") { +TEST_CASE("adcvpp", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::CHIPTESTBOARD) { auto prev_val = det.getADCVpp(false); { std::ostringstream oss; - proxy.Call("adcvpp", {"1"}, -1, PUT, oss); + caller.call("adcvpp", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "adcvpp 1\n"); } { std::ostringstream oss; - proxy.Call("adcvpp", {"1140", "mv"}, -1, PUT, oss); + caller.call("adcvpp", {"1140", "mv"}, -1, PUT, oss); REQUIRE(oss.str() == "adcvpp 1140 mV\n"); } { std::ostringstream oss; - proxy.Call("adcvpp", {"mv"}, -1, GET, oss); + caller.call("adcvpp", {"mv"}, -1, GET, oss); REQUIRE(oss.str() == "adcvpp 1140 mV\n"); } for (int i = 0; i != det.size(); ++i) { det.setADCVpp(prev_val[i], false, {i}); } } else { - REQUIRE_THROWS(proxy.Call("adcvpp", {}, -1, GET)); + REQUIRE_THROWS(caller.call("adcvpp", {}, -1, GET)); } } /* CTB Specific */ -TEST_CASE("samples", "[.cmd]") { +TEST_CASE("samples", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { auto prev_asamples = det.getNumberOfAnalogSamples(); - Result prev_dsamples = 0; - if (det_type == defs::CHIPTESTBOARD) { - prev_dsamples = det.getNumberOfDigitalSamples(); - } + auto prev_dsamples = det.getNumberOfDigitalSamples(); { std::ostringstream oss; - proxy.Call("samples", {"25"}, -1, PUT, oss); + caller.call("samples", {"25"}, -1, PUT, oss); REQUIRE(oss.str() == "samples 25\n"); } { std::ostringstream oss; - proxy.Call("samples", {"450"}, -1, PUT, oss); + caller.call("samples", {"450"}, -1, PUT, oss); REQUIRE(oss.str() == "samples 450\n"); } { std::ostringstream oss; - proxy.Call("samples", {}, -1, GET, oss); + caller.call("samples", {}, -1, GET, oss); REQUIRE(oss.str() == "samples 450\n"); } { std::ostringstream oss; - proxy.Call("asamples", {}, -1, GET, oss); + caller.call("asamples", {}, -1, GET, oss); REQUIRE(oss.str() == "asamples 450\n"); } - if (det_type == defs::CHIPTESTBOARD) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { std::ostringstream oss; - proxy.Call("dsamples", {}, -1, GET, oss); + caller.call("dsamples", {}, -1, GET, oss); REQUIRE(oss.str() == "dsamples 450\n"); } for (int i = 0; i != det.size(); ++i) { det.setNumberOfAnalogSamples(prev_asamples[i], {i}); - if (det_type == defs::CHIPTESTBOARD) { - det.setNumberOfDigitalSamples(prev_dsamples[i], {i}); - } + det.setNumberOfDigitalSamples(prev_dsamples[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("samples", {}, -1, GET)); + REQUIRE_THROWS(caller.call("samples", {}, -1, GET)); } } -TEST_CASE("asamples", "[.cmd]") { +TEST_CASE("asamples", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { auto prev_val = det.getNumberOfAnalogSamples(); { std::ostringstream oss; - proxy.Call("asamples", {"25"}, -1, PUT, oss); + caller.call("asamples", {"25"}, -1, PUT, oss); REQUIRE(oss.str() == "asamples 25\n"); } { std::ostringstream oss; - proxy.Call("asamples", {"450"}, -1, PUT, oss); + caller.call("asamples", {"450"}, -1, PUT, oss); REQUIRE(oss.str() == "asamples 450\n"); } { std::ostringstream oss; - proxy.Call("asamples", {}, -1, GET, oss); + caller.call("asamples", {}, -1, GET, oss); REQUIRE(oss.str() == "asamples 450\n"); } for (int i = 0; i != det.size(); ++i) { det.setNumberOfAnalogSamples(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("asamples", {}, -1, GET)); + REQUIRE_THROWS(caller.call("asamples", {}, -1, GET)); } } -TEST_CASE("adcclk", "[.cmd]") { +TEST_CASE("adcclk", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::CHIPTESTBOARD) { auto prev_val = det.getADCClock(); { std::ostringstream oss; - proxy.Call("adcclk", {"20"}, -1, PUT, oss); + caller.call("adcclk", {"20"}, -1, PUT, oss); REQUIRE(oss.str() == "adcclk 20\n"); } { std::ostringstream oss; - proxy.Call("adcclk", {"10"}, -1, PUT, oss); + caller.call("adcclk", {"10"}, -1, PUT, oss); REQUIRE(oss.str() == "adcclk 10\n"); } { std::ostringstream oss; - proxy.Call("adcclk", {}, -1, GET, oss); + caller.call("adcclk", {}, -1, GET, oss); REQUIRE(oss.str() == "adcclk 10\n"); } for (int i = 0; i != det.size(); ++i) { @@ -694,30 +707,30 @@ TEST_CASE("adcclk", "[.cmd]") { } } else { // clock index might work - // REQUIRE_THROWS(proxy.Call("adcclk", {}, -1, GET)); + // REQUIRE_THROWS(caller.call("adcclk", {}, -1, GET)); } } -TEST_CASE("runclk", "[.cmd]") { +TEST_CASE("runclk", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::CHIPTESTBOARD) { auto prev_val = det.getRUNClock(); { std::ostringstream oss; - proxy.Call("runclk", {"20"}, -1, PUT, oss); + caller.call("runclk", {"20"}, -1, PUT, oss); REQUIRE(oss.str() == "runclk 20\n"); } { std::ostringstream oss; - proxy.Call("runclk", {"10"}, -1, PUT, oss); + caller.call("runclk", {"10"}, -1, PUT, oss); REQUIRE(oss.str() == "runclk 10\n"); } { std::ostringstream oss; - proxy.Call("runclk", {}, -1, GET, oss); + caller.call("runclk", {}, -1, GET, oss); REQUIRE(oss.str() == "runclk 10\n"); } for (int i = 0; i != det.size(); ++i) { @@ -725,47 +738,48 @@ TEST_CASE("runclk", "[.cmd]") { } } else { // clock index might work - // REQUIRE_THROWS(proxy.Call("runclk", {}, -1, GET)); + // REQUIRE_THROWS(caller.call("runclk", {}, -1, GET)); } } -TEST_CASE("syncclk", "[.cmd]") { +TEST_CASE("syncclk", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::CHIPTESTBOARD) { - REQUIRE_NOTHROW(proxy.Call("syncclk", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("syncclk", {}, -1, GET)); } else { // clock index might work - // REQUIRE_THROWS(proxy.Call("syncclk", {}, -1, GET)); + // REQUIRE_THROWS(caller.call("syncclk", {}, -1, GET)); } } -TEST_CASE("v_limit", "[.cmd]") { +TEST_CASE("v_limit", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { auto prev_val = det.getPower(defs::V_LIMIT); { std::ostringstream oss; - proxy.Call("v_limit", {"1500"}, -1, PUT, oss); + caller.call("v_limit", {"1500"}, -1, PUT, oss); REQUIRE(oss.str() == "v_limit 1500\n"); } { std::ostringstream oss; - proxy.Call("v_limit", {"0"}, -1, PUT, oss); + caller.call("v_limit", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "v_limit 0\n"); } { std::ostringstream oss; - proxy.Call("v_limit", {"0"}, -1, PUT, oss); + caller.call("v_limit", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "v_limit 0\n"); } { std::ostringstream oss; - proxy.Call("v_limit", {}, -1, GET, oss); + caller.call("v_limit", {}, -1, GET, oss); REQUIRE(oss.str() == "v_limit 0\n"); } for (int i = 0; i != det.size(); ++i) { @@ -775,167 +789,172 @@ TEST_CASE("v_limit", "[.cmd]") { det.setPower(defs::V_LIMIT, prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("v_limit", {}, -1, GET)); + REQUIRE_THROWS(caller.call("v_limit", {}, -1, GET)); } } -TEST_CASE("adcenable", "[.cmd]") { +TEST_CASE("adcenable", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::CHIPTESTBOARD) { auto prev_val = det.getADCEnableMask(); { std::ostringstream oss; - proxy.Call("adcenable", {"0x8d0aa0d8"}, -1, PUT, oss); + caller.call("adcenable", {"0x8d0aa0d8"}, -1, PUT, oss); REQUIRE(oss.str() == "adcenable 0x8d0aa0d8\n"); } { std::ostringstream oss; - proxy.Call("adcenable", {"0xffffffff"}, -1, PUT, oss); + caller.call("adcenable", {"0xffffffff"}, -1, PUT, oss); REQUIRE(oss.str() == "adcenable 0xffffffff\n"); } { std::ostringstream oss; - proxy.Call("adcenable", {}, -1, GET, oss); + caller.call("adcenable", {}, -1, GET, oss); REQUIRE(oss.str() == "adcenable 0xffffffff\n"); } for (int i = 0; i != det.size(); ++i) { det.setADCEnableMask(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("adcenable", {}, -1, GET)); + REQUIRE_THROWS(caller.call("adcenable", {}, -1, GET)); } } -TEST_CASE("adcenable10g", "[.cmd]") { +TEST_CASE("adcenable10g", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { auto prev_val = det.getTenGigaADCEnableMask(); { std::ostringstream oss; - proxy.Call("adcenable10g", {"0xff0000ff"}, -1, PUT, oss); + caller.call("adcenable10g", {"0xff0000ff"}, -1, PUT, oss); REQUIRE(oss.str() == "adcenable10g 0xff0000ff\n"); } { std::ostringstream oss; - proxy.Call("adcenable10g", {"0xffffffff"}, -1, PUT, oss); + caller.call("adcenable10g", {"0xffffffff"}, -1, PUT, oss); REQUIRE(oss.str() == "adcenable10g 0xffffffff\n"); } { std::ostringstream oss; - proxy.Call("adcenable10g", {}, -1, GET, oss); + caller.call("adcenable10g", {}, -1, GET, oss); REQUIRE(oss.str() == "adcenable10g 0xffffffff\n"); } for (int i = 0; i != det.size(); ++i) { det.setTenGigaADCEnableMask(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("adcenable10g", {}, -1, GET)); + REQUIRE_THROWS(caller.call("adcenable10g", {}, -1, GET)); } } -TEST_CASE("transceiverenable", "[.cmd]") { +TEST_CASE("transceiverenable", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { auto prev_val = det.getTransceiverEnableMask(); { std::ostringstream oss; - proxy.Call("transceiverenable", {"0x3"}, -1, PUT, oss); + caller.call("transceiverenable", {"0x3"}, -1, PUT, oss); REQUIRE(oss.str() == "transceiverenable 0x3\n"); } { std::ostringstream oss; - proxy.Call("transceiverenable", {"0xf"}, -1, PUT, oss); + caller.call("transceiverenable", {"0xf"}, -1, PUT, oss); REQUIRE(oss.str() == "transceiverenable 0xf\n"); } { std::ostringstream oss; - proxy.Call("transceiverenable", {}, -1, GET, oss); + caller.call("transceiverenable", {}, -1, GET, oss); REQUIRE(oss.str() == "transceiverenable 0xf\n"); } for (int i = 0; i != det.size(); ++i) { det.setTransceiverEnableMask(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("transceiverenable", {}, -1, GET)); + REQUIRE_THROWS(caller.call("transceiverenable", {}, -1, GET)); } } /* CTB Specific */ -TEST_CASE("dsamples", "[.cmd]") { +TEST_CASE("dsamples", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { auto prev_val = det.getNumberOfDigitalSamples(); { std::ostringstream oss; - proxy.Call("dsamples", {"1"}, -1, PUT, oss); + caller.call("dsamples", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "dsamples 1\n"); } { std::ostringstream oss; - proxy.Call("dsamples", {"450"}, -1, PUT, oss); + caller.call("dsamples", {"450"}, -1, PUT, oss); REQUIRE(oss.str() == "dsamples 450\n"); } { std::ostringstream oss; - proxy.Call("dsamples", {}, -1, GET, oss); + caller.call("dsamples", {}, -1, GET, oss); REQUIRE(oss.str() == "dsamples 450\n"); } for (int i = 0; i != det.size(); ++i) { det.setNumberOfDigitalSamples(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("dsamples", {}, -1, GET)); + REQUIRE_THROWS(caller.call("dsamples", {}, -1, GET)); } } -TEST_CASE("tsamples", "[.cmd]") { +TEST_CASE("tsamples", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { auto prev_val = det.getNumberOfTransceiverSamples(); { std::ostringstream oss; - proxy.Call("tsamples", {"1"}, -1, PUT, oss); + caller.call("tsamples", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "tsamples 1\n"); } { std::ostringstream oss; - proxy.Call("tsamples", {"450"}, -1, PUT, oss); + caller.call("tsamples", {"450"}, -1, PUT, oss); REQUIRE(oss.str() == "tsamples 450\n"); } { std::ostringstream oss; - proxy.Call("tsamples", {}, -1, GET, oss); + caller.call("tsamples", {}, -1, GET, oss); REQUIRE(oss.str() == "tsamples 450\n"); } for (int i = 0; i != det.size(); ++i) { det.setNumberOfTransceiverSamples(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("tsamples", {}, -1, GET)); + REQUIRE_THROWS(caller.call("tsamples", {}, -1, GET)); } } -TEST_CASE("romode", "[.cmd]") { +TEST_CASE("romode", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { auto prev_romode = det.getReadoutMode(); auto prev_asamples = det.getNumberOfAnalogSamples(); auto prev_dsamples = det.getNumberOfDigitalSamples(); @@ -945,32 +964,32 @@ TEST_CASE("romode", "[.cmd]") { det.setNumberOfTransceiverSamples(5000); { std::ostringstream oss; - proxy.Call("romode", {"digital"}, -1, PUT, oss); + caller.call("romode", {"digital"}, -1, PUT, oss); REQUIRE(oss.str() == "romode digital\n"); } { std::ostringstream oss; - proxy.Call("romode", {"analog_digital"}, -1, PUT, oss); + caller.call("romode", {"analog_digital"}, -1, PUT, oss); REQUIRE(oss.str() == "romode analog_digital\n"); } { std::ostringstream oss; - proxy.Call("romode", {"analog"}, -1, PUT, oss); + caller.call("romode", {"analog"}, -1, PUT, oss); REQUIRE(oss.str() == "romode analog\n"); } { std::ostringstream oss; - proxy.Call("romode", {}, -1, GET, oss); + caller.call("romode", {}, -1, GET, oss); REQUIRE(oss.str() == "romode analog\n"); } { std::ostringstream oss; - proxy.Call("romode", {"transceiver"}, -1, PUT, oss); + caller.call("romode", {"transceiver"}, -1, PUT, oss); REQUIRE(oss.str() == "romode transceiver\n"); } { std::ostringstream oss; - proxy.Call("romode", {"digital_transceiver"}, -1, PUT, oss); + caller.call("romode", {"digital_transceiver"}, -1, PUT, oss); REQUIRE(oss.str() == "romode digital_transceiver\n"); } for (int i = 0; i != det.size(); ++i) { @@ -980,30 +999,30 @@ TEST_CASE("romode", "[.cmd]") { det.setNumberOfTransceiverSamples(prev_tsamples[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("romode", {}, -1, GET)); + REQUIRE_THROWS(caller.call("romode", {}, -1, GET)); } } -TEST_CASE("dbitclk", "[.cmd]") { +TEST_CASE("dbitclk", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::CHIPTESTBOARD) { auto prev_val = det.getRUNClock(); { std::ostringstream oss; - proxy.Call("dbitclk", {"20"}, -1, PUT, oss); + caller.call("dbitclk", {"20"}, -1, PUT, oss); REQUIRE(oss.str() == "dbitclk 20\n"); } { std::ostringstream oss; - proxy.Call("dbitclk", {"10"}, -1, PUT, oss); + caller.call("dbitclk", {"10"}, -1, PUT, oss); REQUIRE(oss.str() == "dbitclk 10\n"); } { std::ostringstream oss; - proxy.Call("dbitclk", {}, -1, GET, oss); + caller.call("dbitclk", {}, -1, GET, oss); REQUIRE(oss.str() == "dbitclk 10\n"); } for (int i = 0; i != det.size(); ++i) { @@ -1011,353 +1030,360 @@ TEST_CASE("dbitclk", "[.cmd]") { } } else { // clock index might work - // REQUIRE_THROWS(proxy.Call("dbitclk", {}, -1, GET)); + // REQUIRE_THROWS(caller.call("dbitclk", {}, -1, GET)); } } -TEST_CASE("v_a", "[.cmd]") { +TEST_CASE("v_a", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { auto prev_val = det.getPower(defs::V_POWER_A); { std::ostringstream oss1, oss2; - proxy.Call("v_a", {"700"}, -1, PUT, oss1); - REQUIRE(oss1.str() == "v_a 700\n"); - proxy.Call("v_a", {}, -1, GET, oss2); - REQUIRE(oss2.str() == "v_a 700\n"); + caller.call("v_a", {"1200"}, -1, PUT, oss1); + REQUIRE(oss1.str() == "v_a 1200\n"); + caller.call("v_a", {}, -1, GET, oss2); + REQUIRE(oss2.str() == "v_a 1200\n"); } for (int i = 0; i != det.size(); ++i) { det.setPower(defs::V_POWER_A, prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("v_a", {}, -1, GET)); + REQUIRE_THROWS(caller.call("v_a", {}, -1, GET)); } } -TEST_CASE("v_b", "[.cmd]") { +TEST_CASE("v_b", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { auto prev_val = det.getPower(defs::V_POWER_B); { std::ostringstream oss1, oss2; - proxy.Call("v_b", {"700"}, -1, PUT, oss1); - REQUIRE(oss1.str() == "v_b 700\n"); - proxy.Call("v_b", {}, -1, GET, oss2); - REQUIRE(oss2.str() == "v_b 700\n"); + caller.call("v_b", {"1200"}, -1, PUT, oss1); + REQUIRE(oss1.str() == "v_b 1200\n"); + caller.call("v_b", {}, -1, GET, oss2); + REQUIRE(oss2.str() == "v_b 1200\n"); } for (int i = 0; i != det.size(); ++i) { det.setPower(defs::V_POWER_B, prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("v_b", {}, -1, GET)); + REQUIRE_THROWS(caller.call("v_b", {}, -1, GET)); } } -TEST_CASE("v_c", "[.cmd]") { +TEST_CASE("v_c", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { auto prev_val = det.getPower(defs::V_POWER_C); { std::ostringstream oss1, oss2; - proxy.Call("v_c", {"700"}, -1, PUT, oss1); - REQUIRE(oss1.str() == "v_c 700\n"); - proxy.Call("v_c", {}, -1, GET, oss2); - REQUIRE(oss2.str() == "v_c 700\n"); + caller.call("v_c", {"1200"}, -1, PUT, oss1); + REQUIRE(oss1.str() == "v_c 1200\n"); + caller.call("v_c", {}, -1, GET, oss2); + REQUIRE(oss2.str() == "v_c 1200\n"); } for (int i = 0; i != det.size(); ++i) { det.setPower(defs::V_POWER_C, prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("v_c", {}, -1, GET)); + REQUIRE_THROWS(caller.call("v_c", {}, -1, GET)); } } -TEST_CASE("v_d", "[.cmd]") { +TEST_CASE("v_d", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { auto prev_val = det.getPower(defs::V_POWER_D); { std::ostringstream oss1, oss2; - proxy.Call("v_d", {"700"}, -1, PUT, oss1); - REQUIRE(oss1.str() == "v_d 700\n"); - proxy.Call("v_d", {}, -1, GET, oss2); - REQUIRE(oss2.str() == "v_d 700\n"); + caller.call("v_d", {"1200"}, -1, PUT, oss1); + REQUIRE(oss1.str() == "v_d 1200\n"); + caller.call("v_d", {}, -1, GET, oss2); + REQUIRE(oss2.str() == "v_d 1200\n"); } for (int i = 0; i != det.size(); ++i) { det.setPower(defs::V_POWER_D, prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("v_d", {}, -1, GET)); + REQUIRE_THROWS(caller.call("v_d", {}, -1, GET)); } } -TEST_CASE("v_io", "[.cmd]") { +TEST_CASE("v_io", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); + auto det_type = det.getDetectorType().squash(); + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { + // better not to play with setting it + REQUIRE_NOTHROW(caller.call("v_io", {}, -1, GET)); + } else { + REQUIRE_THROWS(caller.call("v_io", {}, -1, GET)); + } +} + +TEST_CASE("v_chip", "[.cmdcall]") { + Detector det; + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::CHIPTESTBOARD) { // better not to play with setting it - REQUIRE_NOTHROW(proxy.Call("v_io", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("v_chip", {}, -1, GET)); } else { - REQUIRE_THROWS(proxy.Call("v_io", {}, -1, GET)); + REQUIRE_THROWS(caller.call("v_chip", {}, -1, GET)); } } -TEST_CASE("v_chip", "[.cmd]") { +TEST_CASE("vm_a", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::CHIPTESTBOARD) { - // better not to play with setting it - REQUIRE_NOTHROW(proxy.Call("v_chip", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("vm_a", {}, -1, GET)); } else { - REQUIRE_THROWS(proxy.Call("v_chip", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vm_a", {}, -1, GET)); } } -TEST_CASE("vm_a", "[.cmd]") { +TEST_CASE("vm_b", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::CHIPTESTBOARD) { - REQUIRE_NOTHROW(proxy.Call("vm_a", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("vm_b", {}, -1, GET)); } else { - REQUIRE_THROWS(proxy.Call("vm_a", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vm_b", {}, -1, GET)); } } -TEST_CASE("vm_b", "[.cmd]") { +TEST_CASE("vm_c", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::CHIPTESTBOARD) { - REQUIRE_NOTHROW(proxy.Call("vm_b", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("vm_c", {}, -1, GET)); } else { - REQUIRE_THROWS(proxy.Call("vm_b", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vm_c", {}, -1, GET)); } } -TEST_CASE("vm_c", "[.cmd]") { +TEST_CASE("vm_d", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::CHIPTESTBOARD) { - REQUIRE_NOTHROW(proxy.Call("vm_c", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("vm_d", {}, -1, GET)); } else { - REQUIRE_THROWS(proxy.Call("vm_c", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vm_d", {}, -1, GET)); } } -TEST_CASE("vm_d", "[.cmd]") { +TEST_CASE("vm_io", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::CHIPTESTBOARD) { - REQUIRE_NOTHROW(proxy.Call("vm_d", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("vm_io", {}, -1, GET)); } else { - REQUIRE_THROWS(proxy.Call("vm_d", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vm_io", {}, -1, GET)); } } -TEST_CASE("vm_io", "[.cmd]") { +TEST_CASE("im_a", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::CHIPTESTBOARD) { - REQUIRE_NOTHROW(proxy.Call("vm_io", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("im_a", {}, -1, GET)); } else { - REQUIRE_THROWS(proxy.Call("vm_io", {}, -1, GET)); + REQUIRE_THROWS(caller.call("im_a", {}, -1, GET)); } } -TEST_CASE("im_a", "[.cmd]") { +TEST_CASE("im_b", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::CHIPTESTBOARD) { - REQUIRE_NOTHROW(proxy.Call("im_a", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("im_b", {}, -1, GET)); } else { - REQUIRE_THROWS(proxy.Call("im_a", {}, -1, GET)); + REQUIRE_THROWS(caller.call("im_b", {}, -1, GET)); } } -TEST_CASE("im_b", "[.cmd]") { +TEST_CASE("im_c", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::CHIPTESTBOARD) { - REQUIRE_NOTHROW(proxy.Call("im_b", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("im_c", {}, -1, GET)); } else { - REQUIRE_THROWS(proxy.Call("im_b", {}, -1, GET)); + REQUIRE_THROWS(caller.call("im_c", {}, -1, GET)); } } -TEST_CASE("im_c", "[.cmd]") { +TEST_CASE("im_d", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::CHIPTESTBOARD) { - REQUIRE_NOTHROW(proxy.Call("im_c", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("im_d", {}, -1, GET)); } else { - REQUIRE_THROWS(proxy.Call("im_c", {}, -1, GET)); + REQUIRE_THROWS(caller.call("im_d", {}, -1, GET)); } } -TEST_CASE("im_d", "[.cmd]") { +TEST_CASE("im_io", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::CHIPTESTBOARD) { - REQUIRE_NOTHROW(proxy.Call("im_d", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("im_io", {}, -1, GET)); } else { - REQUIRE_THROWS(proxy.Call("im_d", {}, -1, GET)); + REQUIRE_THROWS(caller.call("im_io", {}, -1, GET)); } } -TEST_CASE("im_io", "[.cmd]") { +TEST_CASE("slowadc", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD) { - REQUIRE_NOTHROW(proxy.Call("im_io", {}, -1, GET)); - } else { - REQUIRE_THROWS(proxy.Call("im_io", {}, -1, GET)); - } -} - -TEST_CASE("adc", "[.cmd]") { - Detector det; - CmdProxy proxy(&det); - auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { for (int i = 0; i <= 7; ++i) { - REQUIRE_NOTHROW(proxy.Call("adc", {std::to_string(i)}, -1, GET)); - REQUIRE_THROWS(proxy.Call("adc", {"0"}, -1, PUT)); + REQUIRE_NOTHROW( + caller.call("slowadc", {std::to_string(i)}, -1, GET)); + REQUIRE_THROWS(caller.call("slowadc", {"0"}, -1, PUT)); } } else { - REQUIRE_THROWS(proxy.Call("adc", {"0"}, -1, GET)); + REQUIRE_THROWS(caller.call("slowadc", {"0"}, -1, GET)); } } -TEST_CASE("extsampling", "[.cmd]") { +TEST_CASE("extsampling", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::CHIPTESTBOARD) { auto prev_val = det.getExternalSampling(); { std::ostringstream oss; - proxy.Call("extsampling", {"1"}, -1, PUT, oss); + caller.call("extsampling", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "extsampling 1\n"); } { std::ostringstream oss; - proxy.Call("extsampling", {"0"}, -1, PUT, oss); + caller.call("extsampling", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "extsampling 0\n"); } { std::ostringstream oss; - proxy.Call("extsampling", {}, -1, GET, oss); + caller.call("extsampling", {}, -1, GET, oss); REQUIRE(oss.str() == "extsampling 0\n"); } for (int i = 0; i != det.size(); ++i) { det.setExternalSampling(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("extsampling", {}, -1, GET)); + REQUIRE_THROWS(caller.call("extsampling", {}, -1, GET)); } } -TEST_CASE("extsamplingsrc", "[.cmd]") { +TEST_CASE("extsamplingsrc", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::CHIPTESTBOARD) { auto prev_val = det.getExternalSamplingSource(); { std::ostringstream oss; - proxy.Call("extsamplingsrc", {"63"}, -1, PUT, oss); + caller.call("extsamplingsrc", {"63"}, -1, PUT, oss); REQUIRE(oss.str() == "extsamplingsrc 63\n"); } { std::ostringstream oss; - proxy.Call("extsamplingsrc", {"0"}, -1, PUT, oss); + caller.call("extsamplingsrc", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "extsamplingsrc 0\n"); } { std::ostringstream oss; - proxy.Call("extsamplingsrc", {}, -1, GET, oss); + caller.call("extsamplingsrc", {}, -1, GET, oss); REQUIRE(oss.str() == "extsamplingsrc 0\n"); } - REQUIRE_THROWS(proxy.Call("extsamplingsrc", {"64"}, -1, PUT)); + REQUIRE_THROWS(caller.call("extsamplingsrc", {"64"}, -1, PUT)); for (int i = 0; i != det.size(); ++i) { det.setExternalSamplingSource(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("extsamplingsrc", {}, -1, GET)); + REQUIRE_THROWS(caller.call("extsamplingsrc", {}, -1, GET)); } } -TEST_CASE("diodelay", "[.cmd]") { +TEST_CASE("diodelay", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::CHIPTESTBOARD) { { std::ostringstream oss; - proxy.Call("diodelay", {"0x01010", "0"}, -1, PUT, oss); + caller.call("diodelay", {"0x01010", "0"}, -1, PUT, oss); REQUIRE(oss.str() == "diodelay [0x01010, 0]\n"); } { std::ostringstream oss; - proxy.Call("diodelay", {"0x01010", "775"}, -1, PUT, oss); + caller.call("diodelay", {"0x01010", "775"}, -1, PUT, oss); REQUIRE(oss.str() == "diodelay [0x01010, 775]\n"); } - REQUIRE_THROWS(proxy.Call("diodelay", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("diodelay", {"0x01010", "776"}, -1, GET)); + REQUIRE_THROWS(caller.call("diodelay", {}, -1, GET)); + REQUIRE_THROWS(caller.call("diodelay", {"0x01010", "776"}, -1, GET)); } else { - REQUIRE_THROWS(proxy.Call("diodelay", {"0x01010", "775"}, -1, PUT)); + REQUIRE_THROWS(caller.call("diodelay", {"0x01010", "775"}, -1, PUT)); } } -TEST_CASE("led", "[.cmd]") { +TEST_CASE("led", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::CHIPTESTBOARD) { auto prev_val = det.getLEDEnable(); { std::ostringstream oss; - proxy.Call("led", {"1"}, -1, PUT, oss); + caller.call("led", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "led 1\n"); } { std::ostringstream oss; - proxy.Call("led", {"0"}, -1, PUT, oss); + caller.call("led", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "led 0\n"); } { std::ostringstream oss; - proxy.Call("led", {}, -1, GET, oss); + caller.call("led", {}, -1, GET, oss); REQUIRE(oss.str() == "led 0\n"); } for (int i = 0; i != det.size(); ++i) { det.setLEDEnable(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("led", {}, -1, GET)); + REQUIRE_THROWS(caller.call("led", {}, -1, GET)); } } diff --git a/slsDetectorSoftware/tests/test-CmdProxy-eiger.cpp b/slsDetectorSoftware/tests/Caller/test-Caller-eiger.cpp similarity index 53% rename from slsDetectorSoftware/tests/test-CmdProxy-eiger.cpp rename to slsDetectorSoftware/tests/Caller/test-Caller-eiger.cpp index ebab79135..70a9a8446 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy-eiger.cpp +++ b/slsDetectorSoftware/tests/Caller/test-Caller-eiger.cpp @@ -1,6 +1,6 @@ // SPDX-License-Identifier: LGPL-3.0-or-other // Copyright (C) 2021 Contributors to the SLS Detector Package -#include "CmdProxy.h" +#include "Caller.h" #include "catch.hpp" #include "sls/Detector.h" #include "sls/sls_detector_defs.h" @@ -9,7 +9,7 @@ #include #include "sls/versionAPI.h" -#include "test-CmdProxy-global.h" +#include "test-Caller-global.h" #include "tests/globals.h" namespace sls { @@ -19,137 +19,143 @@ using test::PUT; /** temperature */ -TEST_CASE("temp_fpgaext", "[.cmd]") { +TEST_CASE("temp_fpgaext", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER) { - REQUIRE_NOTHROW(proxy.Call("temp_fpgaext", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("temp_fpgaext", {}, -1, GET)); std::ostringstream oss; - REQUIRE_NOTHROW(proxy.Call("temp_fpgaext", {}, 0, GET, oss)); + REQUIRE_NOTHROW(caller.call("temp_fpgaext", {}, 0, GET, oss)); std::string s = (oss.str()).erase(0, strlen("temp_fpgaext ")); REQUIRE(std::stoi(s) != -1); } else { - REQUIRE_THROWS(proxy.Call("temp_fpgaext", {}, -1, GET)); + REQUIRE_THROWS(caller.call("temp_fpgaext", {}, -1, GET)); } } -TEST_CASE("temp_10ge", "[.cmd]") { +TEST_CASE("temp_10ge", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER) { - REQUIRE_NOTHROW(proxy.Call("temp_10ge", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("temp_10ge", {}, -1, GET)); std::ostringstream oss; - REQUIRE_NOTHROW(proxy.Call("temp_10ge", {}, 0, GET, oss)); + REQUIRE_NOTHROW(caller.call("temp_10ge", {}, 0, GET, oss)); std::string s = (oss.str()).erase(0, strlen("temp_10ge ")); REQUIRE(std::stoi(s) != -1); } else { - REQUIRE_THROWS(proxy.Call("temp_10ge", {}, -1, GET)); + REQUIRE_THROWS(caller.call("temp_10ge", {}, -1, GET)); } } -TEST_CASE("temp_dcdc", "[.cmd]") { +TEST_CASE("temp_dcdc", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER) { - REQUIRE_NOTHROW(proxy.Call("temp_dcdc", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("temp_dcdc", {}, -1, GET)); std::ostringstream oss; - REQUIRE_NOTHROW(proxy.Call("temp_dcdc", {}, 0, GET, oss)); + REQUIRE_NOTHROW(caller.call("temp_dcdc", {}, 0, GET, oss)); std::string s = (oss.str()).erase(0, strlen("temp_dcdc ")); REQUIRE(std::stoi(s) != -1); } else { - REQUIRE_THROWS(proxy.Call("temp_dcdc", {}, -1, GET)); + REQUIRE_THROWS(caller.call("temp_dcdc", {}, -1, GET)); } } -TEST_CASE("temp_sodl", "[.cmd]") { +TEST_CASE("temp_sodl", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER) { - REQUIRE_NOTHROW(proxy.Call("temp_sodl", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("temp_sodl", {}, -1, GET)); std::ostringstream oss; - REQUIRE_NOTHROW(proxy.Call("temp_sodl", {}, 0, GET, oss)); + REQUIRE_NOTHROW(caller.call("temp_sodl", {}, 0, GET, oss)); std::string s = (oss.str()).erase(0, strlen("temp_sodl ")); REQUIRE(std::stoi(s) != -1); } else { - REQUIRE_THROWS(proxy.Call("temp_sodl", {}, -1, GET)); + REQUIRE_THROWS(caller.call("temp_sodl", {}, -1, GET)); } } -TEST_CASE("temp_sodr", "[.cmd]") { +TEST_CASE("temp_sodr", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER) { - REQUIRE_NOTHROW(proxy.Call("temp_sodr", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("temp_sodr", {}, -1, GET)); std::ostringstream oss; - REQUIRE_NOTHROW(proxy.Call("temp_sodr", {}, 0, GET, oss)); + REQUIRE_NOTHROW(caller.call("temp_sodr", {}, 0, GET, oss)); std::string s = (oss.str()).erase(0, strlen("temp_sodr ")); REQUIRE(std::stoi(s) != -1); } else { - REQUIRE_THROWS(proxy.Call("temp_sodr", {}, -1, GET)); + REQUIRE_THROWS(caller.call("temp_sodr", {}, -1, GET)); } } -TEST_CASE("temp_fpgafl", "[.cmd]") { +TEST_CASE("temp_fpgafl", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER) { - REQUIRE_NOTHROW(proxy.Call("temp_fpgafl", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("temp_fpgafl", {}, -1, GET)); std::ostringstream oss; - REQUIRE_NOTHROW(proxy.Call("temp_fpgafl", {}, 0, GET, oss)); + REQUIRE_NOTHROW(caller.call("temp_fpgafl", {}, 0, GET, oss)); std::string s = (oss.str()).erase(0, strlen("temp_fpgafl ")); REQUIRE(std::stoi(s) != -1); } else { - REQUIRE_THROWS(proxy.Call("temp_fpgafl", {}, -1, GET)); + REQUIRE_THROWS(caller.call("temp_fpgafl", {}, -1, GET)); } } -TEST_CASE("temp_fpgafr", "[.cmd]") { +TEST_CASE("temp_fpgafr", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER) { - REQUIRE_NOTHROW(proxy.Call("temp_fpgafr", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("temp_fpgafr", {}, -1, GET)); std::ostringstream oss; - REQUIRE_NOTHROW(proxy.Call("temp_fpgafr", {}, 0, GET, oss)); + REQUIRE_NOTHROW(caller.call("temp_fpgafr", {}, 0, GET, oss)); std::string s = (oss.str()).erase(0, strlen("temp_fpgafr ")); REQUIRE(std::stoi(s) != -1); } else { - REQUIRE_THROWS(proxy.Call("temp_fpgafr", {}, -1, GET)); + REQUIRE_THROWS(caller.call("temp_fpgafr", {}, -1, GET)); } } /* dacs */ -TEST_CASE("Setting and reading back EIGER dacs", "[.cmd][.dacs]") { +TEST_CASE("Setting and reading back EIGER dacs", "[.cmdcall][.dacs]") { // vsvp, vtr, vrf, vrs, vsvn, vtgstv, vcmp_ll, vcmp_lr, vcal, vcmp_rl, // rxb_rb, rxb_lb, vcmp_rr, vcp, vcn, vis, vthreshold Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER) { - SECTION("vsvp") { test_dac(defs::VSVP, "vsvp", 5); } - SECTION("vtrim") { test_dac(defs::VTRIM, "vtrim", 1200); } - SECTION("vrpreamp") { test_dac(defs::VRPREAMP, "vrpreamp", 1500); } - SECTION("vrshaper") { test_dac(defs::VRSHAPER, "vrshaper", 1510); } - SECTION("vsvn") { test_dac(defs::VSVN, "vsvn", 3800); } - SECTION("vtgstv") { test_dac(defs::VTGSTV, "vtgstv", 2550); } - SECTION("vcmp_ll") { test_dac(defs::VCMP_LL, "vcmp_ll", 1400); } - SECTION("vcmp_lr") { test_dac(defs::VCMP_LR, "vcmp_lr", 1400); } - SECTION("vcal") { test_dac(defs::VCAL, "vcal", 1400); } - SECTION("vcmp_rl") { test_dac(defs::VCMP_RL, "vcmp_rl", 1400); } - SECTION("rxb_rb") { test_dac(defs::RXB_RB, "rxb_rb", 1400); } - SECTION("rxb_lb") { test_dac(defs::RXB_LB, "rxb_lb", 1400); } - SECTION("vcmp_rr") { test_dac(defs::VCMP_RR, "vcmp_rr", 1400); } - SECTION("vcp") { test_dac(defs::VCP, "vcp", 1400); } - SECTION("vcn") { test_dac(defs::VCN, "vcn", 1400); } - SECTION("vishaper") { test_dac(defs::VISHAPER, "vishaper", 1400); } - SECTION("iodelay") { test_dac(defs::IO_DELAY, "iodelay", 1400); } + SECTION("vsvp") { test_dac_caller(defs::VSVP, "vsvp", 5); } + SECTION("vtrim") { test_dac_caller(defs::VTRIM, "vtrim", 1200); } + SECTION("vrpreamp") { + test_dac_caller(defs::VRPREAMP, "vrpreamp", 1500); + } + SECTION("vrshaper") { + test_dac_caller(defs::VRSHAPER, "vrshaper", 1510); + } + SECTION("vsvn") { test_dac_caller(defs::VSVN, "vsvn", 3800); } + SECTION("vtgstv") { test_dac_caller(defs::VTGSTV, "vtgstv", 2550); } + SECTION("vcmp_ll") { test_dac_caller(defs::VCMP_LL, "vcmp_ll", 1400); } + SECTION("vcmp_lr") { test_dac_caller(defs::VCMP_LR, "vcmp_lr", 1400); } + SECTION("vcal") { test_dac_caller(defs::VCAL, "vcal", 1400); } + SECTION("vcmp_rl") { test_dac_caller(defs::VCMP_RL, "vcmp_rl", 1400); } + SECTION("rxb_rb") { test_dac_caller(defs::RXB_RB, "rxb_rb", 1400); } + SECTION("rxb_lb") { test_dac_caller(defs::RXB_LB, "rxb_lb", 1400); } + SECTION("vcmp_rr") { test_dac_caller(defs::VCMP_RR, "vcmp_rr", 1400); } + SECTION("vcp") { test_dac_caller(defs::VCP, "vcp", 1400); } + SECTION("vcn") { test_dac_caller(defs::VCN, "vcn", 1400); } + SECTION("vishaper") { + test_dac_caller(defs::VISHAPER, "vishaper", 1400); + } + SECTION("iodelay") { test_dac_caller(defs::IO_DELAY, "iodelay", 1400); } SECTION("vthreshold") { // Read out individual vcmp to be able to reset after // the test is done @@ -161,12 +167,12 @@ TEST_CASE("Setting and reading back EIGER dacs", "[.cmd][.dacs]") { { std::ostringstream oss; - proxy.Call("vthreshold", {"1234"}, -1, PUT, oss); + caller.call("dac", {"vthreshold", "1234"}, -1, PUT, oss); REQUIRE(oss.str() == "dac vthreshold 1234\n"); } { std::ostringstream oss; - proxy.Call("vthreshold", {}, -1, GET, oss); + caller.call("dac", {"vthreshold"}, -1, GET, oss); REQUIRE(oss.str() == "dac vthreshold 1234\n"); } @@ -180,54 +186,54 @@ TEST_CASE("Setting and reading back EIGER dacs", "[.cmd][.dacs]") { } } // gotthard - REQUIRE_THROWS(proxy.Call("vref_ds", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcascn_pb", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcascp_pb", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vout_cm", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcasc_out", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vin_cm", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_comp", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("ib_test_c", {}, -1, GET)); + 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 - // REQUIRE_THROWS(proxy.Call("vrpreamp", {}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("vrshaper", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vrshaper_n", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vipre", {}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("vishaper", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vdcsh", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vth1", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vth2", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vth3", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcal_n", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcal_p", {}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("vtrim", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcassh", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcas", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vicin", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vipre_out", {}, -1, GET)); + // REQUIRE_THROWS(caller.call("vrpreamp", {}, -1, GET)); + // REQUIRE_THROWS(caller.call("vrshaper", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vrshaper_n", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vipre", {}, -1, GET)); + // REQUIRE_THROWS(caller.call("vishaper", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vdcsh", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vth1", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vth2", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vth3", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vcal_n", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vcal_p", {}, -1, GET)); + // REQUIRE_THROWS(caller.call("vtrim", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vcassh", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vcas", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vicin", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vipre_out", {}, -1, GET)); // gotthard2 - REQUIRE_THROWS(proxy.Call("vref_h_adc", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_comp_fe", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_comp_adc", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcom_cds", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_rstore", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_opa_1st", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_comp_fe", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcom_adc1", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_l_adc", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_cds", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_cs", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_opa_fd", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcom_adc2", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vref_h_adc", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vb_comp_fe", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vb_comp_adc", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vcom_cds", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vref_rstore", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vb_opa_1st", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vref_comp_fe", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vcom_adc1", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vref_l_adc", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vref_cds", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vb_cs", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vb_opa_fd", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vcom_adc2", {}, -1, GET)); // jungfrau - REQUIRE_THROWS(proxy.Call("vb_comp", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vdd_prot", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vin_com", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_prech", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_pixbuf", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_ds", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_ds", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_comp", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vb_comp", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vdd_prot", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vin_com", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vref_prech", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vb_pixbuf", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vb_ds", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vref_ds", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vref_comp", {}, -1, GET)); } } @@ -235,116 +241,116 @@ TEST_CASE("Setting and reading back EIGER dacs", "[.cmd][.dacs]") { /* Network Configuration (Detector<->Receiver) */ -TEST_CASE("txdelay_left", "[.cmd]") { +TEST_CASE("txdelay_left", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER) { auto prev_val = det.getTransmissionDelayLeft(); { std::ostringstream oss1, oss2; - proxy.Call("txdelay_left", {"5000"}, -1, PUT, oss1); + caller.call("txdelay_left", {"5000"}, -1, PUT, oss1); REQUIRE(oss1.str() == "txdelay_left 5000\n"); - proxy.Call("txdelay_left", {}, -1, GET, oss2); + caller.call("txdelay_left", {}, -1, GET, oss2); REQUIRE(oss2.str() == "txdelay_left 5000\n"); } for (int i = 0; i != det.size(); ++i) { det.setTransmissionDelayLeft(prev_val[i]); } } else { - REQUIRE_THROWS(proxy.Call("txdelay_left", {}, -1, GET)); + REQUIRE_THROWS(caller.call("txdelay_left", {}, -1, GET)); } } -TEST_CASE("txdelay_right", "[.cmd]") { +TEST_CASE("txdelay_right", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER) { auto prev_val = det.getTransmissionDelayRight(); { std::ostringstream oss1, oss2; - proxy.Call("txdelay_right", {"5000"}, -1, PUT, oss1); + caller.call("txdelay_right", {"5000"}, -1, PUT, oss1); REQUIRE(oss1.str() == "txdelay_right 5000\n"); - proxy.Call("txdelay_right", {}, -1, GET, oss2); + caller.call("txdelay_right", {}, -1, GET, oss2); REQUIRE(oss2.str() == "txdelay_right 5000\n"); } for (int i = 0; i != det.size(); ++i) { det.setTransmissionDelayRight(prev_val[i]); } } else { - REQUIRE_THROWS(proxy.Call("txdelay_right", {}, -1, GET)); + REQUIRE_THROWS(caller.call("txdelay_right", {}, -1, GET)); } } /* Eiger Specific */ -TEST_CASE("subexptime", "[.cmd]") { +TEST_CASE("subexptime", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER) { auto time = det.getSubExptime(); std::ostringstream oss1, oss2; - proxy.Call("subexptime", {"2.5us"}, -1, PUT, oss1); + caller.call("subexptime", {"2.5us"}, -1, PUT, oss1); REQUIRE(oss1.str() == "subexptime 2.5us\n"); - proxy.Call("subexptime", {}, -1, GET, oss2); + caller.call("subexptime", {}, -1, GET, oss2); REQUIRE(oss2.str() == "subexptime 2.5us\n"); for (int i = 0; i != det.size(); ++i) { det.setSubExptime(time[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("subexptime", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("subexptime", {"2.13"}, -1, PUT)); + REQUIRE_THROWS(caller.call("subexptime", {}, -1, GET)); + REQUIRE_THROWS(caller.call("subexptime", {"2.13"}, -1, PUT)); } } -TEST_CASE("subdeadtime", "[.cmd]") { +TEST_CASE("subdeadtime", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER) { auto time = det.getSubDeadTime(); std::ostringstream oss1, oss2; - proxy.Call("subdeadtime", {"500us"}, -1, PUT, oss1); + caller.call("subdeadtime", {"500us"}, -1, PUT, oss1); REQUIRE(oss1.str() == "subdeadtime 500us\n"); - proxy.Call("subdeadtime", {}, -1, GET, oss2); + caller.call("subdeadtime", {}, -1, GET, oss2); REQUIRE(oss2.str() == "subdeadtime 500us\n"); for (int i = 0; i != det.size(); ++i) { det.setSubDeadTime(time[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("subdeadtime", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("subdeadtime", {"2.13"}, -1, PUT)); + REQUIRE_THROWS(caller.call("subdeadtime", {}, -1, GET)); + REQUIRE_THROWS(caller.call("subdeadtime", {"2.13"}, -1, PUT)); } } -TEST_CASE("overflow", "[.cmd]") { +TEST_CASE("overflow", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER) { auto previous = det.getOverFlowMode(); std::ostringstream oss1, oss2, oss3; - proxy.Call("overflow", {"1"}, -1, PUT, oss1); + caller.call("overflow", {"1"}, -1, PUT, oss1); REQUIRE(oss1.str() == "overflow 1\n"); - proxy.Call("overflow", {}, -1, GET, oss2); + caller.call("overflow", {}, -1, GET, oss2); REQUIRE(oss2.str() == "overflow 1\n"); - proxy.Call("overflow", {"0"}, -1, PUT, oss3); + caller.call("overflow", {"0"}, -1, PUT, oss3); REQUIRE(oss3.str() == "overflow 0\n"); for (int i = 0; i != det.size(); ++i) { det.setOverFlowMode(previous[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("overflow", {}, -1, GET)); + REQUIRE_THROWS(caller.call("overflow", {}, -1, GET)); } } -TEST_CASE("ratecorr", "[.cmd]") { +TEST_CASE("ratecorr", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER) { auto prev_dr = det.getDynamicRange().tsquash("inconsistent dr to test"); @@ -352,19 +358,19 @@ TEST_CASE("ratecorr", "[.cmd]") { det.setDynamicRange(16); { std::ostringstream oss; - proxy.Call("ratecorr", {"120"}, -1, PUT, oss); + caller.call("ratecorr", {"120"}, -1, PUT, oss); REQUIRE(oss.str() == "ratecorr 120ns\n"); } { std::ostringstream oss; - proxy.Call("ratecorr", {}, -1, GET, oss); + caller.call("ratecorr", {}, -1, GET, oss); REQUIRE(oss.str() == "ratecorr 120ns\n"); } // may fail if default settings not loaded - // REQUIRE_NOTHROW(proxy.Call("ratecorr", {"-1"}, -1, PUT)); + // REQUIRE_NOTHROW(caller.call("ratecorr", {"-1"}, -1, PUT)); { std::ostringstream oss; - proxy.Call("ratecorr", {"0"}, -1, PUT, oss); + caller.call("ratecorr", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "ratecorr 0ns\n"); } for (int i = 0; i != det.size(); ++i) { @@ -372,37 +378,37 @@ TEST_CASE("ratecorr", "[.cmd]") { } det.setDynamicRange(prev_dr); } else { - REQUIRE_THROWS(proxy.Call("ratecorr", {}, -1, GET)); + REQUIRE_THROWS(caller.call("ratecorr", {}, -1, GET)); } } -TEST_CASE("interruptsubframe", "[.cmd]") { +TEST_CASE("interruptsubframe", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER) { auto prev_val = det.getInterruptSubframe(); std::ostringstream oss1, oss2, oss3; - proxy.Call("interruptsubframe", {"1"}, -1, PUT, oss1); + caller.call("interruptsubframe", {"1"}, -1, PUT, oss1); REQUIRE(oss1.str() == "interruptsubframe 1\n"); - proxy.Call("interruptsubframe", {}, -1, GET, oss2); + caller.call("interruptsubframe", {}, -1, GET, oss2); REQUIRE(oss2.str() == "interruptsubframe 1\n"); - proxy.Call("interruptsubframe", {"0"}, -1, PUT, oss3); + caller.call("interruptsubframe", {"0"}, -1, PUT, oss3); REQUIRE(oss3.str() == "interruptsubframe 0\n"); for (int i = 0; i != det.size(); ++i) { det.setInterruptSubframe(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("interruptsubframe", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("interruptsubframe", {"1"}, -1, PUT)); + REQUIRE_THROWS(caller.call("interruptsubframe", {}, -1, GET)); + REQUIRE_THROWS(caller.call("interruptsubframe", {"1"}, -1, PUT)); } } -TEST_CASE("measuredperiod", "[.cmd]") { +TEST_CASE("measuredperiod", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER) { auto prev_frames = det.getNumberOfFrames().tsquash( @@ -416,7 +422,7 @@ TEST_CASE("measuredperiod", "[.cmd]") { det.startDetector(); std::this_thread::sleep_for(std::chrono::seconds(3)); std::ostringstream oss; - proxy.Call("measuredperiod", {}, -1, GET, oss); + caller.call("measuredperiod", {}, -1, GET, oss); std::string st = oss.str(); std::string s; if (st.find('[') != std::string::npos) { @@ -433,13 +439,13 @@ TEST_CASE("measuredperiod", "[.cmd]") { det.setNumberOfFrames(prev_frames); det.setTimingMode(prev_timing); } else { - REQUIRE_THROWS(proxy.Call("measuredperiod", {}, -1, GET)); + REQUIRE_THROWS(caller.call("measuredperiod", {}, -1, GET)); } } -TEST_CASE("measuredsubperiod", "[.cmd]") { +TEST_CASE("measuredsubperiod", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER) { auto prev_frames = det.getNumberOfFrames().tsquash( @@ -455,7 +461,7 @@ TEST_CASE("measuredsubperiod", "[.cmd]") { det.startDetector(); std::this_thread::sleep_for(std::chrono::seconds(3)); std::ostringstream oss; - proxy.Call("measuredsubperiod", {}, -1, GET, oss); + caller.call("measuredsubperiod", {}, -1, GET, oss); std::string st = oss.str(); std::string s; if (st.find('[') != std::string::npos) { @@ -473,29 +479,29 @@ TEST_CASE("measuredsubperiod", "[.cmd]") { det.setTimingMode(prev_timing); det.setDynamicRange(prev_dr); } else { - REQUIRE_THROWS(proxy.Call("measuredsubperiod", {}, -1, GET)); + REQUIRE_THROWS(caller.call("measuredsubperiod", {}, -1, GET)); } } -TEST_CASE("activate", "[.cmd]") { +TEST_CASE("activate", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER) { auto prev_val = det.getActive(); { std::ostringstream oss; - proxy.Call("activate", {"1"}, -1, PUT, oss); + caller.call("activate", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "activate 1\n"); } { std::ostringstream oss; - proxy.Call("activate", {}, -1, GET, oss); + caller.call("activate", {}, -1, GET, oss); REQUIRE(oss.str() == "activate 1\n"); } { std::ostringstream oss; - proxy.Call("activate", {"0"}, -1, PUT, oss); + caller.call("activate", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "activate 0\n"); } for (int i = 0; i != det.size(); ++i) { @@ -503,137 +509,137 @@ TEST_CASE("activate", "[.cmd]") { } } else { - REQUIRE_THROWS(proxy.Call("activate", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("activate", {"1"}, -1, PUT)); + REQUIRE_THROWS(caller.call("activate", {}, -1, GET)); + REQUIRE_THROWS(caller.call("activate", {"1"}, -1, PUT)); } } -TEST_CASE("partialreset", "[.cmd]") { +TEST_CASE("partialreset", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER) { auto prev_val = det.getPartialReset(); std::ostringstream oss1, oss2, oss3; - proxy.Call("partialreset", {"1"}, -1, PUT, oss1); + caller.call("partialreset", {"1"}, -1, PUT, oss1); REQUIRE(oss1.str() == "partialreset 1\n"); - proxy.Call("partialreset", {}, -1, GET, oss2); + caller.call("partialreset", {}, -1, GET, oss2); REQUIRE(oss2.str() == "partialreset 1\n"); - proxy.Call("partialreset", {"0"}, -1, PUT, oss3); + caller.call("partialreset", {"0"}, -1, PUT, oss3); REQUIRE(oss3.str() == "partialreset 0\n"); for (int i = 0; i != det.size(); ++i) { det.setPartialReset(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("partialreset", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("partialreset", {"1"}, -1, PUT)); + REQUIRE_THROWS(caller.call("partialreset", {}, -1, GET)); + REQUIRE_THROWS(caller.call("partialreset", {"1"}, -1, PUT)); } } -TEST_CASE("pulse", "[.cmd]") { +TEST_CASE("pulse", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER) { - REQUIRE_THROWS(proxy.Call("pulse", {}, -1, GET)); + REQUIRE_THROWS(caller.call("pulse", {}, -1, GET)); std::ostringstream oss; - proxy.Call("pulse", {"1", "1", "5"}, -1, PUT, oss); + caller.call("pulse", {"1", "1", "5"}, -1, PUT, oss); REQUIRE(oss.str() == "pulse [1, 1, 5]\n"); } else { - REQUIRE_THROWS(proxy.Call("pulse", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("pulse", {"1", "1", "5"}, -1, PUT)); + REQUIRE_THROWS(caller.call("pulse", {}, -1, GET)); + REQUIRE_THROWS(caller.call("pulse", {"1", "1", "5"}, -1, PUT)); } } -TEST_CASE("pulsenmove", "[.cmd]") { +TEST_CASE("pulsenmove", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER) { - REQUIRE_THROWS(proxy.Call("pulsenmove", {}, -1, GET)); + REQUIRE_THROWS(caller.call("pulsenmove", {}, -1, GET)); std::ostringstream oss; - proxy.Call("pulsenmove", {"1", "1", "5"}, -1, PUT, oss); + caller.call("pulsenmove", {"1", "1", "5"}, -1, PUT, oss); REQUIRE(oss.str() == "pulsenmove [1, 1, 5]\n"); } else { - REQUIRE_THROWS(proxy.Call("pulsenmove", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("pulsenmove", {"1", "1", "5"}, -1, PUT)); + REQUIRE_THROWS(caller.call("pulsenmove", {}, -1, GET)); + REQUIRE_THROWS(caller.call("pulsenmove", {"1", "1", "5"}, -1, PUT)); } } -TEST_CASE("pulsechip", "[.cmd]") { +TEST_CASE("pulsechip", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER) { - REQUIRE_THROWS(proxy.Call("pulsechip", {}, -1, GET)); + REQUIRE_THROWS(caller.call("pulsechip", {}, -1, GET)); std::ostringstream oss; - proxy.Call("pulsechip", {"1"}, -1, PUT, oss); + caller.call("pulsechip", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "pulsechip 1\n"); } else { - REQUIRE_THROWS(proxy.Call("pulsechip", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("pulsechip", {"1"}, -1, PUT)); + REQUIRE_THROWS(caller.call("pulsechip", {}, -1, GET)); + REQUIRE_THROWS(caller.call("pulsechip", {"1"}, -1, PUT)); } } -TEST_CASE("quad", "[.cmd]") { +TEST_CASE("quad", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER) { auto prev_val = det.getQuad().tsquash("inconsistent quad to test"); // Quad only works with a single half module EIGER std::ostringstream oss; - proxy.Call("quad", {}, -1, GET, oss); + caller.call("quad", {}, -1, GET, oss); REQUIRE(oss.str() == "quad 0\n"); det.setQuad(prev_val); } else { - REQUIRE_THROWS(proxy.Call("quad", {}, -1, GET)); + REQUIRE_THROWS(caller.call("quad", {}, -1, GET)); } } -TEST_CASE("datastream", "[.cmd]") { +TEST_CASE("datastream", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER) { auto prev_val_left = det.getDataStream(defs::LEFT); auto prev_val_right = det.getDataStream(defs::RIGHT); // no "left" or "right" - REQUIRE_THROWS(proxy.Call("datastream", {"1"}, -1, PUT)); + REQUIRE_THROWS(caller.call("datastream", {"1"}, -1, PUT)); { std::ostringstream oss; - proxy.Call("datastream", {"left", "0"}, -1, PUT, oss); - REQUIRE(oss.str() == "datastream left 0\n"); + caller.call("datastream", {"left", "0"}, -1, PUT, oss); + REQUIRE(oss.str() == "datastream [left, 0]\n"); } { std::ostringstream oss; - proxy.Call("datastream", {"right", "0"}, -1, PUT, oss); - REQUIRE(oss.str() == "datastream right 0\n"); + caller.call("datastream", {"right", "0"}, -1, PUT, oss); + REQUIRE(oss.str() == "datastream [right, 0]\n"); } { std::ostringstream oss; - proxy.Call("datastream", {"left", "1"}, -1, PUT, oss); - REQUIRE(oss.str() == "datastream left 1\n"); + caller.call("datastream", {"left", "1"}, -1, PUT, oss); + REQUIRE(oss.str() == "datastream [left, 1]\n"); } { std::ostringstream oss; - proxy.Call("datastream", {"right", "1"}, -1, PUT, oss); - REQUIRE(oss.str() == "datastream right 1\n"); + caller.call("datastream", {"right", "1"}, -1, PUT, oss); + REQUIRE(oss.str() == "datastream [right, 1]\n"); } for (int i = 0; i != det.size(); ++i) { det.setDataStream(defs::LEFT, prev_val_left[i], {i}); det.setDataStream(defs::RIGHT, prev_val_right[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("datastream", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("datastream", {"1"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("datastream", {"left", "1"}, -1, PUT)); + REQUIRE_THROWS(caller.call("datastream", {}, -1, GET)); + REQUIRE_THROWS(caller.call("datastream", {"1"}, -1, PUT)); + REQUIRE_THROWS(caller.call("datastream", {"left", "1"}, -1, PUT)); } } -TEST_CASE("top", "[.cmd]") { +TEST_CASE("top", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER) { auto prev_val = det.getTop(); @@ -643,19 +649,19 @@ TEST_CASE("top", "[.cmd]") { } for (int i = 0; i != numModulesTested; ++i) { std::ostringstream oss1, oss2, oss3; - proxy.Call("top", {"1"}, i, PUT, oss1); + caller.call("top", {"1"}, i, PUT, oss1); REQUIRE(oss1.str() == "top 1\n"); - proxy.Call("top", {}, i, GET, oss2); + caller.call("top", {}, i, GET, oss2); REQUIRE(oss2.str() == "top 1\n"); - proxy.Call("top", {"0"}, i, PUT, oss3); + caller.call("top", {"0"}, i, PUT, oss3); REQUIRE(oss3.str() == "top 0\n"); } for (int i = 0; i != det.size(); ++i) { det.setTop(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("top", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("top", {"1"}, -1, PUT)); + REQUIRE_THROWS(caller.call("top", {}, -1, GET)); + REQUIRE_THROWS(caller.call("top", {"1"}, -1, PUT)); } } diff --git a/slsDetectorSoftware/tests/test-CmdProxy-global.cpp b/slsDetectorSoftware/tests/Caller/test-Caller-global.cpp similarity index 65% rename from slsDetectorSoftware/tests/test-CmdProxy-global.cpp rename to slsDetectorSoftware/tests/Caller/test-Caller-global.cpp index fd92bc162..7900f3340 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy-global.cpp +++ b/slsDetectorSoftware/tests/Caller/test-Caller-global.cpp @@ -1,7 +1,7 @@ // SPDX-License-Identifier: LGPL-3.0-or-other // Copyright (C) 2021 Contributors to the SLS Detector Package -#include "test-CmdProxy-global.h" -#include "CmdProxy.h" +#include "test-Caller-global.h" +#include "Caller.h" #include "catch.hpp" #include "sls/Detector.h" #include "tests/globals.h" @@ -10,12 +10,11 @@ namespace sls { using test::GET; using test::PUT; - -void test_valid_port(const std::string &command, - const std::vector &arguments, int detector_id, - int action) { +void test_valid_port_caller(const std::string &command, + const std::vector &arguments, + int detector_id, int action) { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); std::vector arg(arguments); if (arg.empty()) @@ -25,33 +24,34 @@ void test_valid_port(const std::string &command, for (int i = 0; i != 3; ++i) { int port_number = test_values[i]; arg[arg.size() - 1] = std::to_string(port_number); - REQUIRE_THROWS(proxy.Call(command, arg, detector_id, action)); + REQUIRE_THROWS(caller.call(command, arg, detector_id, action)); /*REQUIRE_THROWS_WITH(proxy.Call(command, arguments, detector_id, action), "Invalid port range. Must be between 1 - 65535.");*/ } } -void test_dac(defs::dacIndex index, const std::string &dacname, int dacvalue) { +void test_dac_caller(defs::dacIndex index, const std::string &dacname, + int dacvalue) { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); std::ostringstream oss_set, oss_get; auto dacstr = std::to_string(dacvalue); auto previous = det.getDAC(index, false); // chip test board if (dacname == "dac") { auto dacIndexstr = std::to_string(static_cast(index)); - proxy.Call(dacname, {dacIndexstr, dacstr}, -1, PUT, oss_set); + caller.call(dacname, {dacIndexstr, dacstr}, -1, PUT, oss_set); REQUIRE(oss_set.str() == dacname + " " + dacIndexstr + " " + dacstr + "\n"); - proxy.Call(dacname, {dacIndexstr}, -1, GET, oss_get); + caller.call(dacname, {dacIndexstr}, -1, GET, oss_get); REQUIRE(oss_get.str() == dacname + " " + dacIndexstr + " " + dacstr + "\n"); } // other detectors else { - proxy.Call("dac", {dacname, dacstr}, -1, PUT, oss_set); + caller.call("dac", {dacname, dacstr}, -1, PUT, oss_set); REQUIRE(oss_set.str() == "dac " + dacname + " " + dacstr + "\n"); - proxy.Call("dac", {dacname}, -1, GET, oss_get); + caller.call("dac", {dacname}, -1, GET, oss_get); REQUIRE(oss_get.str() == "dac " + dacname + " " + dacstr + "\n"); } // Reset all dacs to previous value @@ -60,25 +60,25 @@ void test_dac(defs::dacIndex index, const std::string &dacname, int dacvalue) { } } -void test_onchip_dac(defs::dacIndex index, const std::string &dacname, - int dacvalue) { +void test_onchip_dac_caller(defs::dacIndex index, const std::string &dacname, + int dacvalue) { Detector det; - CmdProxy proxy(&det); - REQUIRE_THROWS(proxy.Call(dacname, {}, -1, GET)); + Caller caller(&det); + REQUIRE_THROWS(caller.call(dacname, {}, -1, GET)); REQUIRE_THROWS( - proxy.Call(dacname, {"10", "0x0"}, -1, PUT)); // chip index (-1 to 9) + caller.call(dacname, {"10", "0x0"}, -1, PUT)); // chip index (-1 to 9) REQUIRE_THROWS( - proxy.Call(dacname, {"-1", "0x400"}, -1, PUT)); // max val is 0x3ff + caller.call(dacname, {"-1", "0x400"}, -1, PUT)); // max val is 0x3ff int chipIndex = -1; // for now, it is -1 only auto prev_val = det.getOnChipDAC(index, chipIndex); auto dacValueStr = ToStringHex(dacvalue); auto chipIndexStr = std::to_string(chipIndex); std::ostringstream oss_set, oss_get; - proxy.Call(dacname, {chipIndexStr, dacValueStr}, -1, PUT, oss_set); + caller.call(dacname, {chipIndexStr, dacValueStr}, -1, PUT, oss_set); REQUIRE(oss_set.str() == dacname + " " + chipIndexStr + " " + dacValueStr + "\n"); - proxy.Call(dacname, {chipIndexStr}, -1, GET, oss_get); + caller.call(dacname, {chipIndexStr}, -1, GET, oss_get); REQUIRE(oss_get.str() == dacname + " " + chipIndexStr + " " + dacValueStr + "\n"); diff --git a/slsDetectorSoftware/tests/Caller/test-Caller-global.h b/slsDetectorSoftware/tests/Caller/test-Caller-global.h new file mode 100644 index 000000000..98fa46860 --- /dev/null +++ b/slsDetectorSoftware/tests/Caller/test-Caller-global.h @@ -0,0 +1,16 @@ +// 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" + +namespace sls { +void test_valid_port_caller(const std::string &command, + const std::vector &arguments, + int detector_id, int action); + +void test_dac_caller(slsDetectorDefs::dacIndex index, + const std::string &dacname, int dacvalue); +void test_onchip_dac_caller(slsDetectorDefs::dacIndex index, + const std::string &dacname, int dacvalue); + +} // namespace sls diff --git a/slsDetectorSoftware/tests/Caller/test-Caller-gotthard.cpp b/slsDetectorSoftware/tests/Caller/test-Caller-gotthard.cpp new file mode 100644 index 000000000..9eaa5db73 --- /dev/null +++ b/slsDetectorSoftware/tests/Caller/test-Caller-gotthard.cpp @@ -0,0 +1,174 @@ +// 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 + +#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 diff --git a/slsDetectorSoftware/tests/test-CmdProxy-gotthard2.cpp b/slsDetectorSoftware/tests/Caller/test-Caller-gotthard2.cpp similarity index 51% rename from slsDetectorSoftware/tests/test-CmdProxy-gotthard2.cpp rename to slsDetectorSoftware/tests/Caller/test-Caller-gotthard2.cpp index 4cc88d954..54bba5ce2 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy-gotthard2.cpp +++ b/slsDetectorSoftware/tests/Caller/test-Caller-gotthard2.cpp @@ -1,6 +1,6 @@ // SPDX-License-Identifier: LGPL-3.0-or-other // Copyright (C) 2021 Contributors to the SLS Detector Package -#include "CmdProxy.h" +#include "Caller.h" #include "catch.hpp" #include "sls/Detector.h" #include "sls/sls_detector_defs.h" @@ -9,7 +9,7 @@ #include "sls/Result.h" #include "sls/ToString.h" #include "sls/versionAPI.h" -#include "test-CmdProxy-global.h" +#include "test-Caller-global.h" #include "tests/globals.h" namespace sls { @@ -18,21 +18,21 @@ using test::GET; using test::PUT; // time specific measurements for gotthard2 -TEST_CASE("timegotthard2", "[.cmd]") { +TEST_CASE("timegotthard2", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::GOTTHARD2) { // exptime auto prev_val = det.getExptime(); { std::ostringstream oss; - proxy.Call("exptime", {"220ns"}, -1, PUT, oss); + caller.call("exptime", {"220ns"}, -1, PUT, oss); REQUIRE(oss.str() == "exptime 220ns\n"); } { std::ostringstream oss; - proxy.Call("exptime", {}, -1, GET, oss); + caller.call("exptime", {}, -1, GET, oss); REQUIRE(oss.str() == "exptime 221ns\n"); } for (int i = 0; i != det.size(); ++i) { @@ -42,12 +42,12 @@ TEST_CASE("timegotthard2", "[.cmd]") { prev_val = det.getBurstPeriod(); { std::ostringstream oss; - proxy.Call("burstperiod", {"220ns"}, -1, PUT, oss); + caller.call("burstperiod", {"220ns"}, -1, PUT, oss); REQUIRE(oss.str() == "burstperiod 220ns\n"); } { std::ostringstream oss; - proxy.Call("burstperiod", {}, -1, GET, oss); + caller.call("burstperiod", {}, -1, GET, oss); REQUIRE(oss.str() == "burstperiod 221ns\n"); } for (int i = 0; i != det.size(); ++i) { @@ -57,12 +57,12 @@ TEST_CASE("timegotthard2", "[.cmd]") { prev_val = det.getDelayAfterTrigger(); { std::ostringstream oss; - proxy.Call("delay", {"220ns"}, -1, PUT, oss); + caller.call("delay", {"220ns"}, -1, PUT, oss); REQUIRE(oss.str() == "delay 220ns\n"); } { std::ostringstream oss; - proxy.Call("delay", {}, -1, GET, oss); + caller.call("delay", {}, -1, GET, oss); REQUIRE(oss.str() == "delay 221ns\n"); } for (int i = 0; i != det.size(); ++i) { @@ -74,28 +74,28 @@ TEST_CASE("timegotthard2", "[.cmd]") { prev_val = det.getPeriod(); { std::ostringstream oss; - proxy.Call("period", {"220ns"}, -1, PUT, oss); + caller.call("period", {"220ns"}, -1, PUT, oss); REQUIRE(oss.str() == "period 220ns\n"); } { std::ostringstream oss; - proxy.Call("period", {}, -1, GET, oss); + caller.call("period", {}, -1, GET, oss); REQUIRE(oss.str() == "period 221ns\n"); } for (int i = 0; i != det.size(); ++i) { det.setPeriod(prev_val[i], {i}); } // period in continuous mode - det.setBurstMode(defs::CONTINUOUS_INTERNAL, {}); + det.setBurstMode(defs::CONTINUOUS_EXTERNAL, {}); prev_val = det.getPeriod(); { std::ostringstream oss; - proxy.Call("period", {"220ns"}, -1, PUT, oss); + caller.call("period", {"220ns"}, -1, PUT, oss); REQUIRE(oss.str() == "period 220ns\n"); } { std::ostringstream oss; - proxy.Call("period", {}, -1, GET, oss); + caller.call("period", {}, -1, GET, oss); REQUIRE(oss.str() == "period 221ns\n"); } for (int i = 0; i != det.size(); ++i) { @@ -106,180 +106,199 @@ TEST_CASE("timegotthard2", "[.cmd]") { } /* dacs */ -TEST_CASE("Setting and reading back GOTTHARD2 dacs", "[.cmd][.dacs]") { +TEST_CASE("Setting and reading back GOTTHARD2 dacs", "[.cmdcall][.dacs]") { // vref_h_adc, vb_comp_fe, vb_comp_adc, vcom_cds, // vref_restore, vb_opa_1st, vref_comp_fe, vcom_adc1, // vref_prech, vref_l_adc, vref_cds, vb_cs, // vb_opa_fd, vcom_adc2 Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::GOTTHARD2) { SECTION("vref_h_adc") { - test_dac(defs::VREF_H_ADC, "vref_h_adc", 2099); + test_dac_caller(defs::VREF_H_ADC, "vref_h_adc", 2099); + } + SECTION("vb_comp_fe") { + test_dac_caller(defs::VB_COMP_FE, "vb_comp_fe", 0); } - SECTION("vb_comp_fe") { test_dac(defs::VB_COMP_FE, "vb_comp_fe", 0); } SECTION("vb_comp_adc") { - test_dac(defs::VB_COMP_ADC, "vb_comp_adc", 0); + test_dac_caller(defs::VB_COMP_ADC, "vb_comp_adc", 0); + } + SECTION("vcom_cds") { + test_dac_caller(defs::VCOM_CDS, "vcom_cds", 1400); } - SECTION("vcom_cds") { test_dac(defs::VCOM_CDS, "vcom_cds", 1400); } SECTION("vref_rstore") { - test_dac(defs::VREF_RSTORE, "vref_rstore", 640); + test_dac_caller(defs::VREF_RSTORE, "vref_rstore", 640); + } + SECTION("vb_opa_1st") { + test_dac_caller(defs::VB_OPA_1ST, "vb_opa_1st", 0); } - SECTION("vb_opa_1st") { test_dac(defs::VB_OPA_1ST, "vb_opa_1st", 0); } SECTION("vref_comp_fe") { - test_dac(defs::VREF_COMP_FE, "vref_comp_fe", 0); + test_dac_caller(defs::VREF_COMP_FE, "vref_comp_fe", 0); + } + SECTION("vcom_adc1") { + test_dac_caller(defs::VCOM_ADC1, "vcom_adc1", 1400); } - SECTION("vcom_adc1") { test_dac(defs::VCOM_ADC1, "vcom_adc1", 1400); } SECTION("vref_prech") { - test_dac(defs::VREF_PRECH, "vref_prech", 1720); + test_dac_caller(defs::VREF_PRECH, "vref_prech", 1720); + } + SECTION("vref_l_adc") { + test_dac_caller(defs::VREF_L_ADC, "vref_l_adc", 700); + } + SECTION("vref_cds") { + test_dac_caller(defs::VREF_CDS, "vref_cds", 1200); + } + SECTION("vb_cs") { test_dac_caller(defs::VB_CS, "vb_cs", 2799); } + SECTION("vb_opa_fd") { + test_dac_caller(defs::VB_OPA_FD, "vb_opa_fd", 0); + } + SECTION("vcom_adc2") { + test_dac_caller(defs::VCOM_ADC2, "vcom_adc2", 1400); } - SECTION("vref_l_adc") { test_dac(defs::VREF_L_ADC, "vref_l_adc", 700); } - SECTION("vref_cds") { test_dac(defs::VREF_CDS, "vref_cds", 1200); } - SECTION("vb_cs") { test_dac(defs::VB_CS, "vb_cs", 2799); } - SECTION("vb_opa_fd") { test_dac(defs::VB_OPA_FD, "vb_opa_fd", 0); } - SECTION("vcom_adc2") { test_dac(defs::VCOM_ADC2, "vcom_adc2", 1400); } // eiger - REQUIRE_THROWS(proxy.Call("dac", {"vthreshold"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vsvp"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vsvn"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vtrim"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vrpreamp"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vrshaper"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vtgstv"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcmp_ll"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcmp_lr"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcal"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcmp_rl"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcmp_rr"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"rxb_rb"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"rxb_lb"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcp"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcn"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vishaper"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"iodelay"}, -1, GET)); + 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)); // gotthard - REQUIRE_THROWS(proxy.Call("dac", {"vref_ds"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcascn_pb"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcascp_pb"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vout_cm"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcasc_out"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vin_cm"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vref_comp"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"ib_test_c"}, -1, GET)); + 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)); // jungfrau - REQUIRE_THROWS(proxy.Call("dac", {"vb_comp"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vdd_prot"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vin_com"}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("dac", {"vref_prech"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vb_pixbuf"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vb_ds"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vref_ds"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vref_comp"}, -1, GET)); + 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(proxy.Call("dac", {"vrpreamp"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vrshaper"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vrshaper_n"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vipre"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vishaper"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vdcsh"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vth1"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vth2"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vth3"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcal_n"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcal_p"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vtrim"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcassh"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcas"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vicin"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vipre_out"}, -1, GET)); + 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)); } } /* on chip dacs */ -TEST_CASE("vchip_comp_fe", "[.cmd][.onchipdacs]") { +TEST_CASE("vchip_comp_fe", "[.cmdcall][.onchipdacs]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::GOTTHARD2) { SECTION("vchip_comp_fe") { - test_onchip_dac(defs::VB_COMP_FE, "vchip_comp_fe", 0x137); + test_onchip_dac_caller(defs::VB_COMP_FE, "vchip_comp_fe", 0x137); } } else { - REQUIRE_THROWS(proxy.Call("vchip_comp_fe", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vchip_comp_fe", {}, -1, GET)); } } -TEST_CASE("vchip_opa_1st", "[.cmd][.onchipdacs]") { +TEST_CASE("vchip_opa_1st", "[.cmdcall][.onchipdacs]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::GOTTHARD2) { SECTION("vchip_opa_1st") { - test_onchip_dac(defs::VB_OPA_1ST, "vchip_opa_1st", 0x000); + test_onchip_dac_caller(defs::VB_OPA_1ST, "vchip_opa_1st", 0x000); } } else { - REQUIRE_THROWS(proxy.Call("vchip_opa_1st", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vchip_opa_1st", {}, -1, GET)); } } -TEST_CASE("vchip_opa_fd", "[.cmd][.onchipdacs]") { +TEST_CASE("vchip_opa_fd", "[.cmdcall][.onchipdacs]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::GOTTHARD2) { SECTION("vchip_opa_fd") { - test_onchip_dac(defs::VB_OPA_FD, "vchip_opa_fd", 0x134); + test_onchip_dac_caller(defs::VB_OPA_FD, "vchip_opa_fd", 0x134); } } else { - REQUIRE_THROWS(proxy.Call("vchip_opa_fd", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vchip_opa_fd", {}, -1, GET)); } } -TEST_CASE("vchip_comp_adc", "[.cmd][.onchipdacs]") { +TEST_CASE("vchip_comp_adc", "[.cmdcall][.onchipdacs]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::GOTTHARD2) { SECTION("vchip_comp_adc") { - test_onchip_dac(defs::VB_COMP_ADC, "vchip_comp_adc", 0x3FF); + test_onchip_dac_caller(defs::VB_COMP_ADC, "vchip_comp_adc", 0x3FF); } } else { - REQUIRE_THROWS(proxy.Call("vchip_comp_adc", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vchip_comp_adc", {}, -1, GET)); } } -TEST_CASE("vchip_ref_comp_fe", "[.cmd][.onchipdacs]") { +TEST_CASE("vchip_ref_comp_fe", "[.cmdcall][.onchipdacs]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::GOTTHARD2) { SECTION("vchip_ref_comp_fe") { - test_onchip_dac(defs::VREF_COMP_FE, "vchip_ref_comp_fe", 0x100); + test_onchip_dac_caller(defs::VREF_COMP_FE, "vchip_ref_comp_fe", + 0x100); } } else { - REQUIRE_THROWS(proxy.Call("vchip_ref_comp_fe", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vchip_ref_comp_fe", {}, -1, GET)); } } -TEST_CASE("vchip_cs", "[.cmd][.onchipdacs]") { +TEST_CASE("vchip_cs", "[.cmdcall][.onchipdacs]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::GOTTHARD2) { - SECTION("vchip_cs") { test_onchip_dac(defs::VB_CS, "vchip_cs", 0x0D0); } + SECTION("vchip_cs") { + test_onchip_dac_caller(defs::VB_CS, "vchip_cs", 0x0D0); + } } else { - REQUIRE_THROWS(proxy.Call("vchip_cs", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vchip_cs", {}, -1, GET)); } } /* Gotthard2 Specific */ -TEST_CASE("bursts", "[.cmd]") { +TEST_CASE("bursts", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::GOTTHARD2) { auto prev_burst = @@ -295,47 +314,47 @@ TEST_CASE("bursts", "[.cmd]") { det.setTimingMode(defs::AUTO_TIMING); { std::ostringstream oss; - proxy.Call("bursts", {"3"}, -1, PUT, oss); + caller.call("bursts", {"3"}, -1, PUT, oss); REQUIRE(oss.str() == "bursts 3\n"); } { std::ostringstream oss; - proxy.Call("bursts", {}, -1, GET, oss); + caller.call("bursts", {}, -1, GET, oss); REQUIRE(oss.str() == "bursts 3\n"); } - REQUIRE_THROWS(proxy.Call("bursts", {"0"}, -1, PUT)); + REQUIRE_THROWS(caller.call("bursts", {"0"}, -1, PUT)); // trigger mode: reg set to 1, but bursts must be same det.setTimingMode(defs::TRIGGER_EXPOSURE); { std::ostringstream oss; - proxy.Call("bursts", {}, -1, GET, oss); + caller.call("bursts", {}, -1, GET, oss); REQUIRE(oss.str() == "bursts 3\n"); } det.setTimingMode(defs::AUTO_TIMING); { std::ostringstream oss; - proxy.Call("bursts", {}, -1, GET, oss); + caller.call("bursts", {}, -1, GET, oss); REQUIRE(oss.str() == "bursts 3\n"); } // continuous mode: reg set to #frames, // but bursts should return same value - det.setBurstMode(defs::CONTINUOUS_INTERNAL); + det.setBurstMode(defs::CONTINUOUS_EXTERNAL); det.setNumberOfFrames(2); { std::ostringstream oss; - proxy.Call("bursts", {}, -1, GET, oss); + caller.call("bursts", {}, -1, GET, oss); REQUIRE(oss.str() == "bursts 3\n"); } det.setTimingMode(defs::TRIGGER_EXPOSURE); { std::ostringstream oss; - proxy.Call("bursts", {}, -1, GET, oss); + caller.call("bursts", {}, -1, GET, oss); REQUIRE(oss.str() == "bursts 3\n"); } det.setBurstMode(defs::BURST_INTERNAL); { std::ostringstream oss; - proxy.Call("bursts", {}, -1, GET, oss); + caller.call("bursts", {}, -1, GET, oss); REQUIRE(oss.str() == "bursts 3\n"); } // set to previous values @@ -347,122 +366,122 @@ TEST_CASE("bursts", "[.cmd]") { det.setBurstMode(prev_burstMode[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("bursts", {}, -1, GET)); + REQUIRE_THROWS(caller.call("bursts", {}, -1, GET)); } } -TEST_CASE("burstperiod", "[.cmd]") { +TEST_CASE("burstperiod", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::GOTTHARD2) { auto previous = det.getBurstPeriod(); std::ostringstream oss_set, oss_get; - proxy.Call("burstperiod", {"30ms"}, -1, PUT, oss_set); + caller.call("burstperiod", {"30ms"}, -1, PUT, oss_set); REQUIRE(oss_set.str() == "burstperiod 30ms\n"); - proxy.Call("burstperiod", {}, -1, GET, oss_get); + caller.call("burstperiod", {}, -1, GET, oss_get); REQUIRE(oss_get.str() == "burstperiod 30ms\n"); // Reset to previous value for (int i = 0; i != det.size(); ++i) { det.setBurstPeriod(previous[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("burstperiod", {}, -1, GET)); + REQUIRE_THROWS(caller.call("burstperiod", {}, -1, GET)); } } -TEST_CASE("burstsl", "[.cmd]") { +TEST_CASE("burstsl", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::GOTTHARD2) { - REQUIRE_NOTHROW(proxy.Call("burstsl", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("burstsl", {}, -1, GET)); } else { - REQUIRE_THROWS(proxy.Call("burstsl", {}, -1, GET)); + REQUIRE_THROWS(caller.call("burstsl", {}, -1, GET)); } } -TEST_CASE("inj_ch", "[.cmd]") { +TEST_CASE("inj_ch", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::GOTTHARD2) { REQUIRE_THROWS( - proxy.Call("inj_ch", {"-1", "1"}, -1, PUT)); // invalid offset + caller.call("inj_ch", {"-1", "1"}, -1, PUT)); // invalid offset REQUIRE_THROWS( - proxy.Call("inj_ch", {"0", "0"}, -1, PUT)); // invalid increment + caller.call("inj_ch", {"0", "0"}, -1, PUT)); // invalid increment { std::ostringstream oss; - proxy.Call("inj_ch", {"0", "1"}, -1, PUT, oss); + caller.call("inj_ch", {"0", "1"}, -1, PUT, oss); REQUIRE(oss.str() == "inj_ch [0, 1]\n"); } { std::ostringstream oss; - proxy.Call("inj_ch", {}, -1, GET, oss); + caller.call("inj_ch", {}, -1, GET, oss); REQUIRE(oss.str() == "inj_ch [0, 1]\n"); } } else { - REQUIRE_THROWS(proxy.Call("inj_ch", {}, -1, GET)); + REQUIRE_THROWS(caller.call("inj_ch", {}, -1, GET)); } } -TEST_CASE("vetophoton", "[.cmd]") { +TEST_CASE("vetophoton", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::GOTTHARD2) { - REQUIRE_THROWS(proxy.Call("vetophoton", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vetophoton", {"-1"}, -1, GET)); + REQUIRE_THROWS(caller.call("vetophoton", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vetophoton", {"-1"}, -1, GET)); REQUIRE_NOTHROW( - proxy.Call("vetophoton", {"-1", "/tmp/bla.txt"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vetophoton", {"12", "1", "39950"}, -1, - PUT)); // invalid chip index - REQUIRE_THROWS(proxy.Call("vetophoton", {"-1", "0"}, -1, - PUT)); // invalid photon number - REQUIRE_THROWS(proxy.Call("vetophoton", {"-1", "1", "39950"}, -1, - PUT)); // invald file + caller.call("vetophoton", {"-1", "/tmp/bla.txt"}, -1, GET)); + REQUIRE_THROWS(caller.call("vetophoton", {"12", "1", "39950"}, -1, + PUT)); // invalid chip index + REQUIRE_THROWS(caller.call("vetophoton", {"-1", "0"}, -1, + PUT)); // invalid photon number + REQUIRE_THROWS(caller.call("vetophoton", {"-1", "1", "39950"}, -1, + PUT)); // invald file } else { REQUIRE_THROWS( - proxy.Call("vetophoton", {"-1", "/tmp/bla.txt"}, -1, GET)); + caller.call("vetophoton", {"-1", "/tmp/bla.txt"}, -1, GET)); } } -TEST_CASE("vetoref", "[.cmd]") { +TEST_CASE("vetoref", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::GOTTHARD2) { - REQUIRE_THROWS(proxy.Call("vetoref", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vetoref", {"3", "0x3ff"}, -1, - PUT)); // invalid chip index - REQUIRE_NOTHROW(proxy.Call("vetoref", {"1", "0x010"}, -1, PUT)); + REQUIRE_THROWS(caller.call("vetoref", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vetoref", {"3", "0x3ff"}, -1, + PUT)); // invalid chip index + REQUIRE_NOTHROW(caller.call("vetoref", {"1", "0x010"}, -1, PUT)); } else { - REQUIRE_THROWS(proxy.Call("vetoref", {"3", "0x0"}, -1, PUT)); + REQUIRE_THROWS(caller.call("vetoref", {"3", "0x0"}, -1, PUT)); } } -TEST_CASE("vetofile", "[.cmd]") { +TEST_CASE("vetofile", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::GOTTHARD2) { - REQUIRE_THROWS(proxy.Call("vetofile", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vetofile", {"12", "/tmp/bla.txt"}, -1, - PUT)); // invalid chip index + REQUIRE_THROWS(caller.call("vetofile", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vetofile", {"12", "/tmp/bla.txt"}, -1, + PUT)); // invalid chip index } else { - REQUIRE_THROWS(proxy.Call("vetofile", {"-1"}, -1, GET)); + REQUIRE_THROWS(caller.call("vetofile", {"-1"}, -1, GET)); } } -TEST_CASE("burstmode", "[.cmd]") { +TEST_CASE("burstmode", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::GOTTHARD2) { @@ -470,166 +489,166 @@ TEST_CASE("burstmode", "[.cmd]") { auto burststr = ToString(burst); { std::ostringstream oss; - proxy.Call("burstmode", {"burst_internal"}, -1, PUT, oss); + caller.call("burstmode", {"burst_internal"}, -1, PUT, oss); REQUIRE(oss.str() == "burstmode burst_internal\n"); } { std::ostringstream oss; - proxy.Call("burstmode", {"cw_internal"}, -1, PUT, oss); - REQUIRE(oss.str() == "burstmode cw_internal\n"); + caller.call("burstmode", {"cw_external"}, -1, PUT, oss); + REQUIRE(oss.str() == "burstmode cw_external\n"); } { std::ostringstream oss; - proxy.Call("burstmode", {}, -1, GET, oss); - REQUIRE(oss.str() == "burstmode cw_internal\n"); + caller.call("burstmode", {}, -1, GET, oss); + REQUIRE(oss.str() == "burstmode cw_external\n"); } for (int i = 0; i != det.size(); ++i) { det.setBurstMode(burst[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("burstmode", {}, -1, GET)); + REQUIRE_THROWS(caller.call("burstmode", {}, -1, GET)); } } -TEST_CASE("cdsgain", "[.cmd]") { +TEST_CASE("cdsgain", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::GOTTHARD2) { auto prev_val = det.getCDSGain(); { std::ostringstream oss; - proxy.Call("cdsgain", {"1"}, -1, PUT, oss); + caller.call("cdsgain", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "cdsgain 1\n"); } { std::ostringstream oss; - proxy.Call("cdsgain", {"0"}, -1, PUT, oss); + caller.call("cdsgain", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "cdsgain 0\n"); } { std::ostringstream oss; - proxy.Call("cdsgain", {}, -1, GET, oss); + caller.call("cdsgain", {}, -1, GET, oss); REQUIRE(oss.str() == "cdsgain 0\n"); } for (int i = 0; i != det.size(); ++i) { det.setCDSGain(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("cdsgain", {}, -1, GET)); + REQUIRE_THROWS(caller.call("cdsgain", {}, -1, GET)); } } -TEST_CASE("timingsource", "[.cmd]") { +TEST_CASE("timingsource", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::GOTTHARD2) { auto prev_val = det.getTimingSource(); /* { until its activated in fpga std::ostringstream oss; - proxy.Call("timingsource", {"external"}, -1, PUT, oss); + caller.call("timingsource", {"external"}, -1, PUT, oss); REQUIRE(oss.str() == "timingsource external\n"); }*/ { std::ostringstream oss; - proxy.Call("timingsource", {"internal"}, -1, PUT, oss); + caller.call("timingsource", {"internal"}, -1, PUT, oss); REQUIRE(oss.str() == "timingsource internal\n"); } { std::ostringstream oss; - proxy.Call("timingsource", {}, -1, GET, oss); + caller.call("timingsource", {}, -1, GET, oss); REQUIRE(oss.str() == "timingsource internal\n"); } for (int i = 0; i != det.size(); ++i) { det.setTimingSource(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("timingsource", {}, -1, GET)); + REQUIRE_THROWS(caller.call("timingsource", {}, -1, GET)); } } -TEST_CASE("veto", "[.cmd]") { +TEST_CASE("veto", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::GOTTHARD2) { auto prev_val = det.getVeto(); { std::ostringstream oss; - proxy.Call("veto", {"1"}, -1, PUT, oss); + caller.call("veto", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "veto 1\n"); } { std::ostringstream oss; - proxy.Call("veto", {"0"}, -1, PUT, oss); + caller.call("veto", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "veto 0\n"); } { std::ostringstream oss; - proxy.Call("veto", {}, -1, GET, oss); + caller.call("veto", {}, -1, GET, oss); REQUIRE(oss.str() == "veto 0\n"); } for (int i = 0; i != det.size(); ++i) { det.setVeto(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("veto", {}, -1, GET)); + REQUIRE_THROWS(caller.call("veto", {}, -1, GET)); } } -TEST_CASE("vetostream", "[.cmd]") { +TEST_CASE("vetostream", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::GOTTHARD2) { auto prev_val = det.getVetoStream().tsquash("inconsistent veto stream to test"); { std::ostringstream oss; - proxy.Call("vetostream", {"none"}, -1, PUT, oss); + caller.call("vetostream", {"none"}, -1, PUT, oss); REQUIRE(oss.str() == "vetostream none\n"); } { std::ostringstream oss; - proxy.Call("vetostream", {}, -1, GET, oss); + caller.call("vetostream", {}, -1, GET, oss); REQUIRE(oss.str() == "vetostream none\n"); } { std::ostringstream oss; - proxy.Call("vetostream", {"lll"}, -1, PUT, oss); + caller.call("vetostream", {"lll"}, -1, PUT, oss); REQUIRE(oss.str() == "vetostream lll\n"); } { std::ostringstream oss; - proxy.Call("vetostream", {}, -1, GET, oss); + caller.call("vetostream", {}, -1, GET, oss); REQUIRE(oss.str() == "vetostream lll\n"); } { std::ostringstream oss; - proxy.Call("vetostream", {"lll", "10gbe"}, -1, PUT, oss); + caller.call("vetostream", {"lll", "10gbe"}, -1, PUT, oss); REQUIRE(oss.str() == "vetostream lll, 10gbe\n"); } { std::ostringstream oss; - proxy.Call("vetostream", {}, -1, GET, oss); + caller.call("vetostream", {}, -1, GET, oss); REQUIRE(oss.str() == "vetostream lll, 10gbe\n"); } - REQUIRE_THROWS(proxy.Call("vetostream", {"lll", "none"}, -1, PUT)); + REQUIRE_THROWS(caller.call("vetostream", {"lll", "none"}, -1, PUT)); det.setVetoStream(prev_val); } else { - REQUIRE_THROWS(proxy.Call("vetostream", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vetostream", {"none"}, -1, PUT)); + REQUIRE_THROWS(caller.call("vetostream", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vetostream", {"none"}, -1, PUT)); } - REQUIRE_THROWS(proxy.Call("vetostream", {"dfgd"}, -1, GET)); + REQUIRE_THROWS(caller.call("vetostream", {"dfgd"}, -1, GET)); } -TEST_CASE("vetoalg", "[.cmd]") { +TEST_CASE("vetoalg", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::GOTTHARD2) { auto prev_val_lll = @@ -638,37 +657,37 @@ TEST_CASE("vetoalg", "[.cmd]") { det.getVetoAlgorithm(defs::streamingInterface::ETHERNET_10GB); { std::ostringstream oss; - proxy.Call("vetoalg", {"hits", "lll"}, -1, PUT, oss); + caller.call("vetoalg", {"hits", "lll"}, -1, PUT, oss); REQUIRE(oss.str() == "vetoalg hits lll\n"); } { std::ostringstream oss; - proxy.Call("vetoalg", {"lll"}, -1, GET, oss); + caller.call("vetoalg", {"lll"}, -1, GET, oss); REQUIRE(oss.str() == "vetoalg hits lll\n"); } { std::ostringstream oss; - proxy.Call("vetoalg", {"hits", "10gbe"}, -1, PUT, oss); + caller.call("vetoalg", {"hits", "10gbe"}, -1, PUT, oss); REQUIRE(oss.str() == "vetoalg hits 10gbe\n"); } { std::ostringstream oss; - proxy.Call("vetoalg", {"10gbe"}, -1, GET, oss); + caller.call("vetoalg", {"10gbe"}, -1, GET, oss); REQUIRE(oss.str() == "vetoalg hits 10gbe\n"); } { std::ostringstream oss; - proxy.Call("vetoalg", {"raw", "lll"}, -1, PUT, oss); + caller.call("vetoalg", {"raw", "lll"}, -1, PUT, oss); REQUIRE(oss.str() == "vetoalg raw lll\n"); } { std::ostringstream oss; - proxy.Call("vetoalg", {"raw", "10gbe"}, -1, PUT, oss); + caller.call("vetoalg", {"raw", "10gbe"}, -1, PUT, oss); REQUIRE(oss.str() == "vetoalg raw 10gbe\n"); } REQUIRE_THROWS( - proxy.Call("vetoalg", {"default", "lll", "10gbe"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("vetoalg", {"hits", "none"}, -1, PUT)); + caller.call("vetoalg", {"default", "lll", "10gbe"}, -1, PUT)); + REQUIRE_THROWS(caller.call("vetoalg", {"hits", "none"}, -1, PUT)); for (int i = 0; i != det.size(); ++i) { det.setVetoAlgorithm(prev_val_lll[i], defs::streamingInterface::LOW_LATENCY_LINK, @@ -677,15 +696,15 @@ TEST_CASE("vetoalg", "[.cmd]") { defs::streamingInterface::ETHERNET_10GB, {i}); } } else { - REQUIRE_THROWS(proxy.Call("vetoalg", {"lll"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vetoalg", {"none"}, -1, PUT)); + REQUIRE_THROWS(caller.call("vetoalg", {"lll"}, -1, GET)); + REQUIRE_THROWS(caller.call("vetoalg", {"none"}, -1, PUT)); } - REQUIRE_THROWS(proxy.Call("vetoalg", {"dfgd"}, -1, GET)); + REQUIRE_THROWS(caller.call("vetoalg", {"dfgd"}, -1, GET)); } -TEST_CASE("confadc", "[.cmd]") { +TEST_CASE("confadc", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::GOTTHARD2) { @@ -703,20 +722,20 @@ TEST_CASE("confadc", "[.cmd]") { } } - REQUIRE_THROWS(proxy.Call("confadc", {"11", "2", "0x7f"}, -1, - PUT)); // invalid chip index - REQUIRE_THROWS(proxy.Call("confadc", {"-1", "32", "0x7f"}, -1, - PUT)); // invalid adc index - REQUIRE_THROWS(proxy.Call("confadc", {"-1", "10", "0x80"}, -1, - PUT)); // invalid value + REQUIRE_THROWS(caller.call("confadc", {"11", "2", "0x7f"}, -1, + PUT)); // invalid chip index + REQUIRE_THROWS(caller.call("confadc", {"-1", "32", "0x7f"}, -1, + PUT)); // invalid adc index + REQUIRE_THROWS(caller.call("confadc", {"-1", "10", "0x80"}, -1, + PUT)); // invalid value { std::ostringstream oss; - proxy.Call("confadc", {"-1", "-1", "0x11"}, -1, PUT, oss); + caller.call("confadc", {"-1", "-1", "0x11"}, -1, PUT, oss); REQUIRE(oss.str() == "confadc [-1, -1, 0x11]\n"); } { std::ostringstream oss; - proxy.Call("confadc", {"2", "3"}, -1, GET, oss); + caller.call("confadc", {"2", "3"}, -1, GET, oss); REQUIRE(oss.str() == "confadc 0x11\n"); } @@ -728,7 +747,7 @@ TEST_CASE("confadc", "[.cmd]") { } } } else { - REQUIRE_THROWS(proxy.Call("confadc", {}, -1, GET)); + REQUIRE_THROWS(caller.call("confadc", {}, -1, GET)); } } diff --git a/slsDetectorSoftware/tests/test-CmdProxy-jungfrau.cpp b/slsDetectorSoftware/tests/Caller/test-Caller-jungfrau.cpp similarity index 53% rename from slsDetectorSoftware/tests/test-CmdProxy-jungfrau.cpp rename to slsDetectorSoftware/tests/Caller/test-Caller-jungfrau.cpp index 27b652f4d..e63f99144 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy-jungfrau.cpp +++ b/slsDetectorSoftware/tests/Caller/test-Caller-jungfrau.cpp @@ -1,13 +1,13 @@ // SPDX-License-Identifier: LGPL-3.0-or-other // Copyright (C) 2021 Contributors to the SLS Detector Package -#include "CmdProxy.h" +#include "Caller.h" #include "catch.hpp" #include "sls/Detector.h" #include "sls/sls_detector_defs.h" #include #include "sls/versionAPI.h" -#include "test-CmdProxy-global.h" +#include "test-Caller-global.h" #include "tests/globals.h" namespace sls { @@ -17,275 +17,281 @@ using test::PUT; /* dacs */ -TEST_CASE("Setting and reading back Jungfrau dacs", "[.cmd][.dacs]") { +TEST_CASE("Setting and reading back Jungfrau dacs", "[.cmdcall][.dacs]") { // vb_comp, vdd_prot, vin_com, vref_prech, vb_pixbuf, vb_ds, vref_ds, // vref_comp Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU) { - SECTION("vb_comp") { test_dac(defs::VB_COMP, "vb_comp", 1220); } - SECTION("vdd_prot") { test_dac(defs::VDD_PROT, "vdd_prot", 3000); } - SECTION("vin_com") { test_dac(defs::VIN_COM, "vin_com", 1053); } - SECTION("vref_prech") { - test_dac(defs::VREF_PRECH, "vref_prech", 1450); + SECTION("vb_comp") { test_dac_caller(defs::VB_COMP, "vb_comp", 1220); } + SECTION("vdd_prot") { + test_dac_caller(defs::VDD_PROT, "vdd_prot", 3000); + } + SECTION("vin_com") { test_dac_caller(defs::VIN_COM, "vin_com", 1053); } + SECTION("vref_prech") { + test_dac_caller(defs::VREF_PRECH, "vref_prech", 1450); + } + SECTION("vb_pixbuf") { + test_dac_caller(defs::VB_PIXBUF, "vb_pixbuf", 750); + } + SECTION("vb_ds") { test_dac_caller(defs::VB_DS, "vb_ds", 1000); } + SECTION("vref_ds") { test_dac_caller(defs::VREF_DS, "vref_ds", 480); } + SECTION("vref_comp") { + test_dac_caller(defs::VREF_COMP, "vref_comp", 420); } - SECTION("vb_pixbuf") { test_dac(defs::VB_PIXBUF, "vb_pixbuf", 750); } - SECTION("vb_ds") { test_dac(defs::VB_DS, "vb_ds", 1000); } - SECTION("vref_ds") { test_dac(defs::VREF_DS, "vref_ds", 480); } - SECTION("vref_comp") { test_dac(defs::VREF_COMP, "vref_comp", 420); } // eiger - REQUIRE_THROWS(proxy.Call("vthreshold", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vsvp", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vsvn", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vtrim", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vrpreamp", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vrshaper", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vtgstv", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcmp_ll", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcmp_lr", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcal", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcmp_rl", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcmp_rr", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("rxb_rb", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("rxb_lb", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcp", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcn", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vishaper", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("iodelay", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vthreshold", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vsvp", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vsvn", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vtrim", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vrpreamp", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vrshaper", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vtgstv", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vcmp_ll", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vcmp_lr", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vcal", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vcmp_rl", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vcmp_rr", {}, -1, GET)); + REQUIRE_THROWS(caller.call("rxb_rb", {}, -1, GET)); + REQUIRE_THROWS(caller.call("rxb_lb", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vcp", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vcn", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vishaper", {}, -1, GET)); + REQUIRE_THROWS(caller.call("iodelay", {}, -1, GET)); // gotthard - // REQUIRE_THROWS(proxy.Call("vref_ds", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcascn_pb", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcascp_pb", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vout_cm", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcasc_out", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vin_cm", {}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("vref_comp", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("ib_test_c", {}, -1, GET)); + // 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 - REQUIRE_THROWS(proxy.Call("vrpreamp", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vrshaper", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vrshaper_n", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vipre", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vishaper", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vdcsh", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vth1", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vth2", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vth3", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcal_n", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcal_p", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vtrim", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcassh", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcas", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vicin", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vipre_out", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vrpreamp", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vrshaper", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vrshaper_n", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vipre", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vishaper", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vdcsh", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vth1", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vth2", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vth3", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vcal_n", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vcal_p", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vtrim", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vcassh", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vcas", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vicin", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vipre_out", {}, -1, GET)); // gotthard2 - REQUIRE_THROWS(proxy.Call("vref_h_adc", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_comp_fe", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_comp_adc", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcom_cds", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_rstore", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_opa_1st", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_comp_fe", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcom_adc1", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_l_adc", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_cds", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_cs", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_opa_fd", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcom_adc2", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vref_h_adc", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vb_comp_fe", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vb_comp_adc", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vcom_cds", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vref_rstore", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vb_opa_1st", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vref_comp_fe", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vcom_adc1", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vref_l_adc", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vref_cds", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vb_cs", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vb_opa_fd", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vcom_adc2", {}, -1, GET)); } } /* Network Configuration (Detector<->Receiver) */ -TEST_CASE("selinterface", "[.cmd]") { +TEST_CASE("selinterface", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH) { auto prev_val = det.getSelectedUDPInterface().tsquash( "inconsistent selected interface to test"); { std::ostringstream oss; - proxy.Call("selinterface", {"1"}, -1, PUT, oss); + caller.call("selinterface", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "selinterface 1\n"); } { std::ostringstream oss; - proxy.Call("selinterface", {"0"}, -1, PUT, oss); + caller.call("selinterface", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "selinterface 0\n"); } { std::ostringstream oss; - proxy.Call("selinterface", {}, -1, GET, oss); + caller.call("selinterface", {}, -1, GET, oss); REQUIRE(oss.str() == "selinterface 0\n"); } det.selectUDPInterface(prev_val); - REQUIRE_THROWS(proxy.Call("selinterface", {"2"}, -1, PUT)); + REQUIRE_THROWS(caller.call("selinterface", {"2"}, -1, PUT)); } else { - REQUIRE_THROWS(proxy.Call("selinterface", {}, -1, GET)); + REQUIRE_THROWS(caller.call("selinterface", {}, -1, GET)); } } /* Jungfrau/moench Specific */ -TEST_CASE("temp_threshold", "[.cmd]") { +TEST_CASE("temp_threshold", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH) { auto prev_val = det.getThresholdTemperature(); { std::ostringstream oss; - proxy.Call("temp_threshold", {"65"}, -1, PUT, oss); + caller.call("temp_threshold", {"65"}, -1, PUT, oss); REQUIRE(oss.str() == "temp_threshold 65\n"); } { std::ostringstream oss; - proxy.Call("temp_threshold", {"70"}, -1, PUT, oss); + caller.call("temp_threshold", {"70"}, -1, PUT, oss); REQUIRE(oss.str() == "temp_threshold 70\n"); } { std::ostringstream oss; - proxy.Call("temp_threshold", {}, -1, GET, oss); + caller.call("temp_threshold", {}, -1, GET, oss); REQUIRE(oss.str() == "temp_threshold 70\n"); } for (int i = 0; i != det.size(); ++i) { det.setThresholdTemperature(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("temp_threshold", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("temp_threshold", {"70"}, -1, PUT)); + REQUIRE_THROWS(caller.call("temp_threshold", {}, -1, GET)); + REQUIRE_THROWS(caller.call("temp_threshold", {"70"}, -1, PUT)); } } -TEST_CASE("chipversion", "[.cmd]") { +TEST_CASE("chipversion", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU) { - REQUIRE_NOTHROW(proxy.Call("chipversion", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("chipversion", {}, -1, GET)); } else { - REQUIRE_THROWS(proxy.Call("chipversion", {}, -1, GET)); + REQUIRE_THROWS(caller.call("chipversion", {}, -1, GET)); } - REQUIRE_THROWS(proxy.Call("chipversion", {"0"}, -1, PUT)); + REQUIRE_THROWS(caller.call("chipversion", {"0"}, -1, PUT)); } -TEST_CASE("temp_control", "[.cmd]") { +TEST_CASE("temp_control", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH) { auto prev_val = det.getTemperatureControl(); { std::ostringstream oss; - proxy.Call("temp_control", {"0"}, -1, PUT, oss); + caller.call("temp_control", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "temp_control 0\n"); } { std::ostringstream oss; - proxy.Call("temp_control", {"1"}, -1, PUT, oss); + caller.call("temp_control", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "temp_control 1\n"); } { std::ostringstream oss; - proxy.Call("temp_control", {}, -1, GET, oss); + caller.call("temp_control", {}, -1, GET, oss); REQUIRE(oss.str() == "temp_control 1\n"); } for (int i = 0; i != det.size(); ++i) { det.setTemperatureControl(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("temp_control", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("temp_control", {"0"}, -1, PUT)); + REQUIRE_THROWS(caller.call("temp_control", {}, -1, GET)); + REQUIRE_THROWS(caller.call("temp_control", {"0"}, -1, PUT)); } } -TEST_CASE("temp_event", "[.cmd]") { +TEST_CASE("temp_event", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH) { { std::ostringstream oss; - proxy.Call("temp_event", {"0"}, -1, PUT, oss); + caller.call("temp_event", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "temp_event cleared\n"); } { std::ostringstream oss; - proxy.Call("temp_event", {}, -1, GET, oss); + caller.call("temp_event", {}, -1, GET, oss); REQUIRE(oss.str() == "temp_event 0\n"); } } else { - REQUIRE_THROWS(proxy.Call("temp_event", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("temp_event", {"0"}, -1, PUT)); + REQUIRE_THROWS(caller.call("temp_event", {}, -1, GET)); + REQUIRE_THROWS(caller.call("temp_event", {"0"}, -1, PUT)); } } -TEST_CASE("autocompdisable", "[.cmd]") { +TEST_CASE("autocompdisable", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU) { auto prev_val = det.getAutoComparatorDisable(); { std::ostringstream oss; - proxy.Call("autocompdisable", {"0"}, -1, PUT, oss); + caller.call("autocompdisable", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "autocompdisable 0\n"); } { std::ostringstream oss; - proxy.Call("autocompdisable", {"1"}, -1, PUT, oss); + caller.call("autocompdisable", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "autocompdisable 1\n"); } { std::ostringstream oss; - proxy.Call("autocompdisable", {}, -1, GET, oss); + caller.call("autocompdisable", {}, -1, GET, oss); REQUIRE(oss.str() == "autocompdisable 1\n"); } for (int i = 0; i != det.size(); ++i) { det.setAutoComparatorDisable(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("autocompdisable", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("autocompdisable", {"0"}, -1, PUT)); + REQUIRE_THROWS(caller.call("autocompdisable", {}, -1, GET)); + REQUIRE_THROWS(caller.call("autocompdisable", {"0"}, -1, PUT)); } } -TEST_CASE("compdisabletime", "[.cmd]") { +TEST_CASE("compdisabletime", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU && det.getChipVersion().squash() * 10 == 11) { auto prev_val = det.getComparatorDisableTime(); { std::ostringstream oss; - proxy.Call("compdisabletime", {"125ns"}, -1, PUT, oss); + caller.call("compdisabletime", {"125ns"}, -1, PUT, oss); REQUIRE(oss.str() == "compdisabletime 125ns\n"); } { std::ostringstream oss; - proxy.Call("compdisabletime", {}, -1, GET, oss); + caller.call("compdisabletime", {}, -1, GET, oss); REQUIRE(oss.str() == "compdisabletime 125ns\n"); } { std::ostringstream oss; - proxy.Call("compdisabletime", {"0"}, -1, PUT, oss); + caller.call("compdisabletime", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "compdisabletime 0\n"); } for (int i = 0; i != det.size(); ++i) { det.setComparatorDisableTime(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("compdisabletime", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("compdisabletime", {"0"}, -1, PUT)); + REQUIRE_THROWS(caller.call("compdisabletime", {}, -1, GET)); + REQUIRE_THROWS(caller.call("compdisabletime", {"0"}, -1, PUT)); } } -TEST_CASE("extrastoragecells", "[.cmd]") { +TEST_CASE("extrastoragecells", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU) { // chip version 1.0 @@ -294,86 +300,86 @@ TEST_CASE("extrastoragecells", "[.cmd]") { "inconsistent #additional storage cells to test"); { std::ostringstream oss; - proxy.Call("extrastoragecells", {"1"}, -1, PUT, oss); + caller.call("extrastoragecells", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "extrastoragecells 1\n"); } { std::ostringstream oss; - proxy.Call("extrastoragecells", {"15"}, -1, PUT, oss); + caller.call("extrastoragecells", {"15"}, -1, PUT, oss); REQUIRE(oss.str() == "extrastoragecells 15\n"); } { std::ostringstream oss; - proxy.Call("extrastoragecells", {"0"}, -1, PUT, oss); + caller.call("extrastoragecells", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "extrastoragecells 0\n"); } { std::ostringstream oss; - proxy.Call("extrastoragecells", {}, -1, GET, oss); + caller.call("extrastoragecells", {}, -1, GET, oss); REQUIRE(oss.str() == "extrastoragecells 0\n"); } - REQUIRE_THROWS(proxy.Call("extrastoragecells", {"16"}, -1, PUT)); + REQUIRE_THROWS(caller.call("extrastoragecells", {"16"}, -1, PUT)); det.setNumberOfAdditionalStorageCells(prev_val); } // chip version 1.1 else { // cannot set number of addl. storage cells - REQUIRE_THROWS(proxy.Call("extrastoragecells", {"1"}, -1, PUT)); + REQUIRE_THROWS(caller.call("extrastoragecells", {"1"}, -1, PUT)); } } else { - REQUIRE_THROWS(proxy.Call("extrastoragecells", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("extrastoragecells", {"0"}, -1, PUT)); + REQUIRE_THROWS(caller.call("extrastoragecells", {}, -1, GET)); + REQUIRE_THROWS(caller.call("extrastoragecells", {"0"}, -1, PUT)); } } -TEST_CASE("storagecell_start", "[.cmd]") { +TEST_CASE("storagecell_start", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU) { auto prev_val = det.getStorageCellStart(); { std::ostringstream oss; - proxy.Call("storagecell_start", {"1"}, -1, PUT, oss); + caller.call("storagecell_start", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "storagecell_start 1\n"); } // chip version 1.0 if (det.getChipVersion().squash() * 10 == 10) { std::ostringstream oss; - proxy.Call("storagecell_start", {"15"}, -1, PUT, oss); + caller.call("storagecell_start", {"15"}, -1, PUT, oss); REQUIRE(oss.str() == "storagecell_start 15\n"); } // chip version 1.1 else { // max is 3 - REQUIRE_THROWS(proxy.Call("storagecell_start", {"15"}, -1, PUT)); + REQUIRE_THROWS(caller.call("storagecell_start", {"15"}, -1, PUT)); std::ostringstream oss; - proxy.Call("storagecell_start", {"3"}, -1, PUT, oss); + caller.call("storagecell_start", {"3"}, -1, PUT, oss); REQUIRE(oss.str() == "storagecell_start 3\n"); } { std::ostringstream oss; - proxy.Call("storagecell_start", {"0"}, -1, PUT, oss); + caller.call("storagecell_start", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "storagecell_start 0\n"); } { std::ostringstream oss; - proxy.Call("storagecell_start", {}, -1, GET, oss); + caller.call("storagecell_start", {}, -1, GET, oss); REQUIRE(oss.str() == "storagecell_start 0\n"); } - REQUIRE_THROWS(proxy.Call("storagecell_start", {"16"}, -1, PUT)); + REQUIRE_THROWS(caller.call("storagecell_start", {"16"}, -1, PUT)); for (int i = 0; i != det.size(); ++i) { det.setStorageCellStart(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("storagecell_start", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("storagecell_start", {"0"}, -1, PUT)); + REQUIRE_THROWS(caller.call("storagecell_start", {}, -1, GET)); + REQUIRE_THROWS(caller.call("storagecell_start", {"0"}, -1, PUT)); } } -TEST_CASE("storagecell_delay", "[.cmd]") { +TEST_CASE("storagecell_delay", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU) { // chip version 1.0 @@ -381,21 +387,21 @@ TEST_CASE("storagecell_delay", "[.cmd]") { auto prev_val = det.getStorageCellDelay(); { std::ostringstream oss; - proxy.Call("storagecell_delay", {"1.62ms"}, -1, PUT, oss); + caller.call("storagecell_delay", {"1.62ms"}, -1, PUT, oss); REQUIRE(oss.str() == "storagecell_delay 1.62ms\n"); } { std::ostringstream oss; - proxy.Call("storagecell_delay", {}, -1, GET, oss); + caller.call("storagecell_delay", {}, -1, GET, oss); REQUIRE(oss.str() == "storagecell_delay 1.62ms\n"); } { std::ostringstream oss; - proxy.Call("storagecell_delay", {"0"}, -1, PUT, oss); + caller.call("storagecell_delay", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "storagecell_delay 0\n"); } REQUIRE_THROWS( - proxy.Call("storagecell_delay", {"1638376ns"}, -1, PUT)); + caller.call("storagecell_delay", {"1638376ns"}, -1, PUT)); for (int i = 0; i != det.size(); ++i) { det.setStorageCellDelay(prev_val[i], {i}); } @@ -404,66 +410,66 @@ TEST_CASE("storagecell_delay", "[.cmd]") { else { // cannot set storage cell delay REQUIRE_THROWS( - proxy.Call("storagecell_delay", {"1.62ms"}, -1, PUT)); + caller.call("storagecell_delay", {"1.62ms"}, -1, PUT)); } } else { - REQUIRE_THROWS(proxy.Call("storagecell_delay", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("storagecell_delay", {"0"}, -1, PUT)); + REQUIRE_THROWS(caller.call("storagecell_delay", {}, -1, GET)); + REQUIRE_THROWS(caller.call("storagecell_delay", {"0"}, -1, PUT)); } } -TEST_CASE("gainmode", "[.cmd]") { +TEST_CASE("gainmode", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU) { auto prev_val = det.getGainMode(); { std::ostringstream oss; - proxy.Call("gainmode", {"forceswitchg1"}, -1, PUT, oss); + caller.call("gainmode", {"forceswitchg1"}, -1, PUT, oss); REQUIRE(oss.str() == "gainmode forceswitchg1\n"); } { std::ostringstream oss; - proxy.Call("gainmode", {}, -1, GET, oss); + caller.call("gainmode", {}, -1, GET, oss); REQUIRE(oss.str() == "gainmode forceswitchg1\n"); } { std::ostringstream oss; - proxy.Call("gainmode", {"dynamic"}, -1, PUT, oss); + caller.call("gainmode", {"dynamic"}, -1, PUT, oss); REQUIRE(oss.str() == "gainmode dynamic\n"); } { std::ostringstream oss; - proxy.Call("gainmode", {"forceswitchg2"}, -1, PUT, oss); + caller.call("gainmode", {"forceswitchg2"}, -1, PUT, oss); REQUIRE(oss.str() == "gainmode forceswitchg2\n"); } { std::ostringstream oss; - proxy.Call("gainmode", {"fixg1"}, -1, PUT, oss); + caller.call("gainmode", {"fixg1"}, -1, PUT, oss); REQUIRE(oss.str() == "gainmode fixg1\n"); } { std::ostringstream oss; - proxy.Call("gainmode", {"fixg2"}, -1, PUT, oss); + caller.call("gainmode", {"fixg2"}, -1, PUT, oss); REQUIRE(oss.str() == "gainmode fixg2\n"); } { std::ostringstream oss; - proxy.Call("gainmode", {"fixg0"}, -1, PUT, oss); + caller.call("gainmode", {"fixg0"}, -1, PUT, oss); REQUIRE(oss.str() == "gainmode fixg0\n"); } for (int i = 0; i != det.size(); ++i) { det.setGainMode(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("gainmode", {}, -1, GET)); + REQUIRE_THROWS(caller.call("gainmode", {}, -1, GET)); } } -TEST_CASE("filtercells", "[.cmd]") { +TEST_CASE("filtercells", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU) { // chip version 1.1 @@ -471,25 +477,25 @@ TEST_CASE("filtercells", "[.cmd]") { auto prev_val = det.getNumberOfFilterCells(); { std::ostringstream oss; - proxy.Call("filtercells", {"1"}, -1, PUT, oss); + caller.call("filtercells", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "filtercells 1\n"); } { std::ostringstream oss; - proxy.Call("filtercells", {"12"}, -1, PUT, oss); + caller.call("filtercells", {"12"}, -1, PUT, oss); REQUIRE(oss.str() == "filtercells 12\n"); } { std::ostringstream oss; - proxy.Call("filtercells", {"0"}, -1, PUT, oss); + caller.call("filtercells", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "filtercells 0\n"); } { std::ostringstream oss; - proxy.Call("filtercells", {}, -1, GET, oss); + caller.call("filtercells", {}, -1, GET, oss); REQUIRE(oss.str() == "filtercells 0\n"); } - REQUIRE_THROWS(proxy.Call("filtercells", {"13"}, -1, PUT)); + REQUIRE_THROWS(caller.call("filtercells", {"13"}, -1, PUT)); for (int i = 0; i != det.size(); ++i) { det.setNumberOfFilterCells(prev_val[i], {i}); } @@ -497,18 +503,17 @@ TEST_CASE("filtercells", "[.cmd]") { // chip version 1.0 else { // cannot set/get filter cell - REQUIRE_THROWS(proxy.Call("filtercells", {"1"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("filtercells", {}, -1, GET)); + REQUIRE_THROWS(caller.call("filtercells", {"1"}, -1, PUT)); + REQUIRE_THROWS(caller.call("filtercells", {}, -1, GET)); } } else { - REQUIRE_THROWS(proxy.Call("filtercells", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("filtercells", {"0"}, -1, PUT)); + REQUIRE_THROWS(caller.call("filtercells", {}, -1, GET)); + REQUIRE_THROWS(caller.call("filtercells", {"0"}, -1, PUT)); } } - -TEST_CASE("pedestalmode", "[.cmd]") { +TEST_CASE("pedestalmode", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU) { auto prev_val = det.getPedestalMode(); @@ -519,80 +524,81 @@ TEST_CASE("pedestalmode", "[.cmd]") { auto prev_timingmode = det.getTimingMode().tsquash("Inconsistent timing mode to test"); - REQUIRE_NOTHROW(proxy.Call("pedestalmode", {}, 0, GET)); - REQUIRE_NOTHROW(proxy.Call("pedestalmode", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("pedestalmode", {"0"}, -1, GET)); + REQUIRE_NOTHROW(caller.call("pedestalmode", {}, 0, GET)); + REQUIRE_NOTHROW(caller.call("pedestalmode", {}, -1, GET)); + REQUIRE_THROWS(caller.call("pedestalmode", {"0"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("pedestalmode", {"256", "10"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("pedestalmode", {"-1", "10"}, 0, PUT)); - REQUIRE_THROWS(proxy.Call("pedestalmode", {"20", "65536"}, 0, PUT)); - REQUIRE_THROWS(proxy.Call("pedestalmode", {"20", "-1"}, 0, PUT)); + REQUIRE_THROWS(caller.call("pedestalmode", {"256", "10"}, -1, PUT)); + REQUIRE_THROWS(caller.call("pedestalmode", {"-1", "10"}, 0, PUT)); + REQUIRE_THROWS(caller.call("pedestalmode", {"20", "1000"}, 0, PUT)); + REQUIRE_THROWS(caller.call("pedestalmode", {"2000", "100"}, 0, PUT)); + REQUIRE_THROWS(caller.call("pedestalmode", {"20", "-1"}, 0, PUT)); { std::ostringstream oss; - proxy.Call("pedestalmode", {"30", "1000"}, -1, PUT, oss); - REQUIRE(oss.str() == "pedestalmode [30, 1000]\n"); + caller.call("pedestalmode", {"30", "100"}, -1, PUT, oss); + REQUIRE(oss.str() == "pedestalmode [30, 100]\n"); } // cannot change any of these in pedestal mode - REQUIRE_THROWS_WITH(proxy.Call("frames", {"200"}, -1, PUT), + REQUIRE_THROWS_WITH(caller.call("frames", {"200"}, -1, PUT), "Detector returned: Cannot set frames in pedestal " "mode. It is overwritten anyway.\n"); - REQUIRE_THROWS_WITH(proxy.Call("triggers", {"200"}, -1, PUT), + REQUIRE_THROWS_WITH(caller.call("triggers", {"200"}, -1, PUT), "Detector returned: Cannot set triggers in " "pedestal mode. It is overwritten anyway.\n"); REQUIRE_THROWS_WITH( - proxy.Call("timing", {"auto"}, -1, PUT), + caller.call("timing", {"auto"}, -1, PUT), "Detector returned: Cannot set timing mode in pedestal mode. " "Switch off pedestal mode to change timing mode.\n"); REQUIRE_THROWS_WITH( - proxy.Call("scan", {"vb_comp", "500", "1500", "10"}, -1, PUT), + caller.call("scan", {"vb_comp", "500", "1500", "10"}, -1, PUT), "Detector returned: Cannot set scan when in pedestal mode.\n"); REQUIRE_THROWS_WITH( - proxy.Call("scan", {"0"}, -1, PUT), + caller.call("scan", {"0"}, -1, PUT), "Detector returned: Cannot set scan when in pedestal mode.\n"); // should not throw to get these values though - REQUIRE_NOTHROW(proxy.Call("frames", {}, -1, GET)); - REQUIRE_NOTHROW(proxy.Call("triggers", {}, -1, GET)); - REQUIRE_NOTHROW(proxy.Call("timing", {}, -1, GET)); - REQUIRE_NOTHROW(proxy.Call("scan", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("frames", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("triggers", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("timing", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("scan", {}, -1, GET)); { std::ostringstream oss; - proxy.Call("pedestalmode", {"50", "500"}, -1, PUT, oss); - REQUIRE(oss.str() == "pedestalmode [50, 500]\n"); + caller.call("pedestalmode", {"50", "100"}, -1, PUT, oss); + REQUIRE(oss.str() == "pedestalmode [50, 100]\n"); } { std::ostringstream oss; - proxy.Call("pedestalmode", {}, -1, GET, oss); - REQUIRE(oss.str() == "pedestalmode [enabled, 50, 500]\n"); + caller.call("pedestalmode", {}, -1, GET, oss); + REQUIRE(oss.str() == "pedestalmode [enabled, 50, 100]\n"); } { auto pedemode = det.getPedestalMode().tsquash( "Inconsistent pedestal mode to test"); REQUIRE(pedemode.enable == true); REQUIRE(pedemode.frames == 50); - REQUIRE(pedemode.loops == 500); + REQUIRE(pedemode.loops == 100); } { std::ostringstream oss; - proxy.Call("pedestalmode", {"0"}, -1, PUT, oss); + caller.call("pedestalmode", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "pedestalmode [0]\n"); } { std::ostringstream oss; - proxy.Call("pedestalmode", {}, -1, GET, oss); + caller.call("pedestalmode", {}, -1, GET, oss); REQUIRE(oss.str() == "pedestalmode [disabled]\n"); } uint8_t pedestalFrames = 50; - uint16_t pedestalLoops = 1000; + uint16_t pedestalLoops = 100; int64_t expNumFrames = pedestalFrames * pedestalLoops * 2; auto origFrames = det.getNumberOfFrames().squash(-1); auto origTriggers = det.getNumberOfTriggers().squash(-1); // auto mode det.setTimingMode(defs::AUTO_TIMING); - REQUIRE_NOTHROW(proxy.Call( + REQUIRE_NOTHROW(caller.call( "pedestalmode", {std::to_string(pedestalFrames), std::to_string(pedestalLoops)}, -1, PUT)); @@ -602,7 +608,7 @@ TEST_CASE("pedestalmode", "[.cmd]") { REQUIRE(numTriggers == 1); // pedestal mode off - REQUIRE_NOTHROW(proxy.Call("pedestalmode", {"0"}, -1, PUT)); + REQUIRE_NOTHROW(caller.call("pedestalmode", {"0"}, -1, PUT)); numTriggers = det.getNumberOfTriggers().squash(-1); numFrames = det.getNumberOfFrames().squash(-1); REQUIRE(numFrames == origFrames); @@ -612,7 +618,7 @@ TEST_CASE("pedestalmode", "[.cmd]") { REQUIRE_NOTHROW(det.setTimingMode(defs::TRIGGER_EXPOSURE)); origFrames = 5; REQUIRE_NOTHROW(det.setNumberOfFrames(origFrames)); - REQUIRE_NOTHROW(proxy.Call( + REQUIRE_NOTHROW(caller.call( "pedestalmode", {std::to_string(pedestalFrames), std::to_string(pedestalLoops)}, -1, PUT)); @@ -622,7 +628,7 @@ TEST_CASE("pedestalmode", "[.cmd]") { REQUIRE(numTriggers == 1); // pedestal mode off - REQUIRE_NOTHROW(proxy.Call("pedestalmode", {"0"}, -1, PUT)); + REQUIRE_NOTHROW(caller.call("pedestalmode", {"0"}, -1, PUT)); numTriggers = det.getNumberOfTriggers().squash(-1); numFrames = det.getNumberOfFrames().squash(-1); REQUIRE(numFrames == origFrames); @@ -633,7 +639,7 @@ TEST_CASE("pedestalmode", "[.cmd]") { REQUIRE_NOTHROW(det.setNumberOfFrames(origFrames)); origTriggers = 10; REQUIRE_NOTHROW(det.setNumberOfTriggers(origTriggers)); - REQUIRE_NOTHROW(proxy.Call( + REQUIRE_NOTHROW(caller.call( "pedestalmode", {std::to_string(pedestalFrames), std::to_string(pedestalLoops)}, -1, PUT)); @@ -643,7 +649,7 @@ TEST_CASE("pedestalmode", "[.cmd]") { REQUIRE(numTriggers == expNumFrames); // pedestal mode off - REQUIRE_NOTHROW(proxy.Call("pedestalmode", {"0"}, -1, PUT)); + REQUIRE_NOTHROW(caller.call("pedestalmode", {"0"}, -1, PUT)); numTriggers = det.getNumberOfTriggers().squash(-1); numFrames = det.getNumberOfFrames().squash(-1); REQUIRE(numFrames == origFrames); @@ -656,26 +662,82 @@ TEST_CASE("pedestalmode", "[.cmd]") { det.setPedestalMode(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("pedestalmode", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("pedestalmode", {"0"}, -1, PUT)); + REQUIRE_THROWS(caller.call("pedestalmode", {}, -1, GET)); + REQUIRE_THROWS(caller.call("pedestalmode", {"0"}, -1, PUT)); } } -TEST_CASE("sync", "[.cmd]") { +TEST_CASE("timing_info_decoder", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); + if (det.getDetectorType().squash() == defs::JUNGFRAU) { + auto prev_val = det.getTimingInfoDecoder(); + /*{ + std::ostringstream oss; + caller.call("timing_info_decoder", {"shine"}, -1, PUT, oss); + REQUIRE(oss.str() == "timing_info_decoder shine\n"); + }*/ + { + std::ostringstream oss; + caller.call("timing_info_decoder", {"swissfel"}, -1, PUT, oss); + REQUIRE(oss.str() == "timing_info_decoder swissfel\n"); + } + { + std::ostringstream oss; + caller.call("timing_info_decoder", {}, -1, GET, oss); + REQUIRE(oss.str() == "timing_info_decoder swissfel\n"); + } + for (int i = 0; i != det.size(); ++i) { + det.setTimingInfoDecoder(prev_val[i], {i}); + } + } else { + REQUIRE_THROWS(caller.call("timing_info_decoder", {}, -1, GET)); + } +} + +TEST_CASE("collectionmode", "[.cmdcall]") { + Detector det; + Caller caller(&det); + if (det.getDetectorType().squash() == defs::JUNGFRAU) { + auto prev_val = det.getCollectionMode(); + { + std::ostringstream oss; + caller.call("collectionmode", {"electron"}, -1, PUT, oss); + REQUIRE(oss.str() == "collectionmode electron\n"); + } + { + std::ostringstream oss; + caller.call("collectionmode", {"hole"}, -1, PUT, oss); + REQUIRE(oss.str() == "collectionmode hole\n"); + } + { + std::ostringstream oss; + caller.call("collectionmode", {}, -1, GET, oss); + REQUIRE(oss.str() == "collectionmode hole\n"); + } + for (int i = 0; i != det.size(); ++i) { + det.setCollectionMode(prev_val[i], {i}); + } + } else { + REQUIRE_THROWS(caller.call("collectionmode", {}, -1, GET)); + } +} + +TEST_CASE("sync", "[.cmdcall]") { + Detector det; + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH) { auto prev_val = det.getSynchronization().tsquash( "inconsistent synchronization to test"); { std::ostringstream oss; - proxy.Call("sync", {"0"}, -1, PUT, oss); + caller.call("sync", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "sync 0\n"); } { std::ostringstream oss; - proxy.Call("sync", {"1"}, -1, PUT, oss); + caller.call("sync", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "sync 1\n"); } // setting to master or slave when synced @@ -689,10 +751,10 @@ TEST_CASE("sync", "[.cmd]") { break; } } - proxy.Call("master", {"1"}, 0, PUT); - proxy.Call("master", {"0"}, 0, PUT); + caller.call("master", {"1"}, 0, PUT); + caller.call("master", {"0"}, 0, PUT); std::ostringstream oss; - proxy.Call("status", {}, -1, GET, oss); + caller.call("status", {}, -1, GET, oss); REQUIRE(oss.str() != "status running\n"); // set all to slaves, and then master for (int i = 0; i != det.size(); ++i) { @@ -702,7 +764,7 @@ TEST_CASE("sync", "[.cmd]") { } { std::ostringstream oss; - proxy.Call("sync", {}, -1, GET, oss); + caller.call("sync", {}, -1, GET, oss); REQUIRE(oss.str() == "sync 1\n"); } // setting sync when running @@ -721,10 +783,10 @@ TEST_CASE("sync", "[.cmd]") { det.setPeriod(std::chrono::milliseconds(1000)); det.setSynchronization(1); det.startDetector(); - REQUIRE_THROWS(proxy.Call("sync", {"0"}, -1, PUT)); + REQUIRE_THROWS(caller.call("sync", {"0"}, -1, PUT)); { std::ostringstream oss; - proxy.Call("sync", {}, -1, GET, oss); + caller.call("sync", {}, -1, GET, oss); REQUIRE(oss.str() == "sync 1\n"); } det.stopDetector(); @@ -735,8 +797,8 @@ TEST_CASE("sync", "[.cmd]") { } det.setSynchronization(prev_val); } else { - REQUIRE_THROWS(proxy.Call("sync", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("sync", {"0"}, -1, PUT)); + REQUIRE_THROWS(caller.call("sync", {}, -1, GET)); + REQUIRE_THROWS(caller.call("sync", {"0"}, -1, PUT)); } } diff --git a/slsDetectorSoftware/tests/Caller/test-Caller-moench.cpp b/slsDetectorSoftware/tests/Caller/test-Caller-moench.cpp new file mode 100644 index 000000000..4da61d2b5 --- /dev/null +++ b/slsDetectorSoftware/tests/Caller/test-Caller-moench.cpp @@ -0,0 +1,114 @@ +// 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 + +#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 moench dacs", "[.cmdcall][.dacs]") { + // vbp_colbuf, vipre, vin_cm, vb_sda, vcasc_sfp, vout_cm, vipre_cds, + // ibias_sfp + Detector det; + Caller caller(&det); + auto det_type = det.getDetectorType().squash(); + if (det_type == defs::MOENCH) { + SECTION("vbp_colbuf") { + test_dac_caller(defs::VBP_COLBUF, "vbp_colbuf", 1300); + } + SECTION("vipre") { test_dac_caller(defs::VIPRE, "vipre", 1000); } + SECTION("vin_cm") { test_dac_caller(defs::VIN_CM, "vin_cm", 1400); } + SECTION("vb_sda") { test_dac_caller(defs::VB_SDA, "vb_sda", 680); } + SECTION("vcasc_sfp") { + test_dac_caller(defs::VCASC_SFP, "vcasc_sfp", 1428); + } + SECTION("vout_cm") { test_dac_caller(defs::VOUT_CM, "vout_cm", 1200); } + SECTION("vipre_cds") { + test_dac_caller(defs::VIPRE_CDS, "vipre_cds", 800); + } + SECTION("ibias_sfp") { + test_dac_caller(defs::IBIAS_SFP, "ibias_sfp", 900); + } + // eiger + REQUIRE_THROWS(caller.call("vthreshold", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vsvp", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vsvn", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vtrim", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vrpreamp", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vrshaper", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vtgstv", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vcmp_ll", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vcmp_lr", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vcal", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vcmp_rl", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vcmp_rr", {}, -1, GET)); + REQUIRE_THROWS(caller.call("rxb_rb", {}, -1, GET)); + REQUIRE_THROWS(caller.call("rxb_lb", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vcp", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vcn", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vishaper", {}, -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 + REQUIRE_THROWS(caller.call("vrpreamp", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vrshaper", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vrshaper_n", {}, -1, GET)); + // REQUIRE_THROWS(caller.call("vipre", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vishaper", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vdcsh", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vth1", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vth2", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vth3", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vcal_n", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vcal_p", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vtrim", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vcassh", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vcas", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vicin", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vipre_out", {}, -1, GET)); + // gotthard2 + REQUIRE_THROWS(caller.call("vref_h_adc", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vb_comp_fe", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vb_comp_adc", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vcom_cds", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vref_rstore", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vb_opa_1st", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vref_comp_fe", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vcom_adc1", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vref_l_adc", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vref_cds", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vb_cs", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vb_opa_fd", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vcom_adc2", {}, -1, GET)); + // jungfrau + REQUIRE_THROWS(caller.call("vb_comp", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vdd_prot", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vin_com", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vref_prech", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vb_pixbuf", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vb_ds", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vref_ds", {}, -1, GET)); + REQUIRE_THROWS(caller.call("vref_comp", {}, -1, GET)); + } +} + +} // namespace sls diff --git a/slsDetectorSoftware/tests/test-CmdProxy-mythen3.cpp b/slsDetectorSoftware/tests/Caller/test-Caller-mythen3.cpp similarity index 60% rename from slsDetectorSoftware/tests/test-CmdProxy-mythen3.cpp rename to slsDetectorSoftware/tests/Caller/test-Caller-mythen3.cpp index f08612096..16295a3e1 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy-mythen3.cpp +++ b/slsDetectorSoftware/tests/Caller/test-Caller-mythen3.cpp @@ -1,6 +1,6 @@ // SPDX-License-Identifier: LGPL-3.0-or-other // Copyright (C) 2021 Contributors to the SLS Detector Package -#include "CmdProxy.h" +#include "Caller.h" #include "catch.hpp" #include "sls/Detector.h" #include "sls/sls_detector_defs.h" @@ -9,7 +9,7 @@ #include "sls/Result.h" #include "sls/ToString.h" #include "sls/versionAPI.h" -#include "test-CmdProxy-global.h" +#include "test-Caller-global.h" #include "tests/globals.h" namespace sls { @@ -19,32 +19,40 @@ using test::PUT; /* dacs */ -TEST_CASE("Setting and reading back MYTHEN3 dacs", "[.cmd][.dacs]") { +TEST_CASE("Setting and reading back MYTHEN3 dacs", "[.cmdcall][.dacs]") { // vcassh, vth2, vshaper, vshaperneg, vipre_out, vth3, vth1, // vicin, vcas, vpreamp, vpl, vipre, viinsh, vph, vtrim, vdcsh, Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::MYTHEN3) { - SECTION("vcassh") { test_dac(defs::VCASSH, "vcassh", 1200); } - SECTION("vth2") { test_dac(defs::VTH2, "vth2", 2800); } - SECTION("vrshaper") { test_dac(defs::VRSHAPER, "vrshaper", 1280); } - SECTION("vrshaper_n") { - test_dac(defs::VRSHAPER_N, "vrshaper_n", 2800); + SECTION("vcassh") { test_dac_caller(defs::VCASSH, "vcassh", 1200); } + SECTION("vth2") { test_dac_caller(defs::VTH2, "vth2", 2800); } + SECTION("vrshaper") { + test_dac_caller(defs::VRSHAPER, "vrshaper", 1280); } - SECTION("vipre_out") { test_dac(defs::VIPRE_OUT, "vipre_out", 1220); } - SECTION("vth3") { test_dac(defs::VTH3, "vth3", 2800); } - SECTION("vth1") { test_dac(defs::VTH1, "vth1", 2880); } - SECTION("vicin") { test_dac(defs::VICIN, "vicin", 1708); } - SECTION("vcas") { test_dac(defs::VCAS, "vcas", 1800); } - SECTION("vrpreamp") { test_dac(defs::VRPREAMP, "vrpreamp", 1100); } - SECTION("vcal_n") { test_dac(defs::VCAL_N, "vcal_n", 1100); } - SECTION("vipre") { test_dac(defs::VIPRE, "vipre", 2624); } - SECTION("vishaper") { test_dac(defs::VISHAPER, "vishaper", 1708); } - SECTION("vcal_p") { test_dac(defs::VCAL_P, "vcal_p", 1712); } - SECTION("vtrim") { test_dac(defs::VTRIM, "vtrim", 2800); } - SECTION("vdcsh") { test_dac(defs::VDCSH, "vdcsh", 800); } + SECTION("vrshaper_n") { + test_dac_caller(defs::VRSHAPER_N, "vrshaper_n", 2800); + } + SECTION("vipre_out") { + test_dac_caller(defs::VIPRE_OUT, "vipre_out", 1220); + } + SECTION("vth3") { test_dac_caller(defs::VTH3, "vth3", 2800); } + SECTION("vth1") { test_dac_caller(defs::VTH1, "vth1", 2880); } + SECTION("vicin") { test_dac_caller(defs::VICIN, "vicin", 1708); } + SECTION("vcas") { test_dac_caller(defs::VCAS, "vcas", 1800); } + SECTION("vrpreamp") { + test_dac_caller(defs::VRPREAMP, "vrpreamp", 1100); + } + SECTION("vcal_n") { test_dac_caller(defs::VCAL_N, "vcal_n", 1100); } + SECTION("vipre") { test_dac_caller(defs::VIPRE, "vipre", 2624); } + SECTION("vishaper") { + test_dac_caller(defs::VISHAPER, "vishaper", 1708); + } + SECTION("vcal_p") { test_dac_caller(defs::VCAL_P, "vcal_p", 1712); } + SECTION("vtrim") { test_dac_caller(defs::VTRIM, "vtrim", 2800); } + SECTION("vdcsh") { test_dac_caller(defs::VDCSH, "vdcsh", 800); } SECTION("vthreshold") { // Read out individual vcmp to be able to reset after // the test is done @@ -55,67 +63,68 @@ TEST_CASE("Setting and reading back MYTHEN3 dacs", "[.cmd][.dacs]") { { std::ostringstream oss; - proxy.Call("dac", {"vthreshold", "1234"}, -1, PUT, oss); + caller.call("dac", {"vthreshold", "1234"}, -1, PUT, oss); REQUIRE(oss.str() == "dac vthreshold 1234\n"); } { std::ostringstream oss; - proxy.Call("dac", {"vthreshold"}, -1, GET, oss); + caller.call("dac", {"vthreshold"}, -1, GET, oss); REQUIRE(oss.str() == "dac vthreshold 1234\n"); } // disabling counters change vth values - proxy.Call("counters", {"0"}, -1, PUT); + caller.call("counters", {"0"}, -1, PUT); { std::ostringstream oss1, oss2, oss3; - proxy.Call("dac", {"vth1"}, -1, GET, oss1); + caller.call("dac", {"vth1"}, -1, GET, oss1); REQUIRE(oss1.str() == "dac vth1 1234\n"); - proxy.Call("dac", {"vth2"}, -1, GET, oss2); + caller.call("dac", {"vth2"}, -1, GET, oss2); REQUIRE(oss2.str() == "dac vth2 2800\n"); - proxy.Call("dac", {"vth3"}, -1, GET, oss3); + caller.call("dac", {"vth3"}, -1, GET, oss3); REQUIRE(oss3.str() == "dac vth3 2800\n"); } // vthreshold changes vth for only enabled counters - REQUIRE_NOTHROW(proxy.Call("dac", {"vthreshold", "2100"}, -1, PUT)); + REQUIRE_NOTHROW( + caller.call("dac", {"vthreshold", "2100"}, -1, PUT)); { std::ostringstream oss; - proxy.Call("dac", {"vthreshold"}, -1, GET, oss); + caller.call("dac", {"vthreshold"}, -1, GET, oss); REQUIRE(oss.str() == "dac vthreshold 2100\n"); std::ostringstream oss1, oss2, oss3; - proxy.Call("dac", {"vth1"}, -1, GET, oss1); + caller.call("dac", {"vth1"}, -1, GET, oss1); REQUIRE(oss1.str() == "dac vth1 2100\n"); - proxy.Call("dac", {"vth2"}, -1, GET, oss2); + caller.call("dac", {"vth2"}, -1, GET, oss2); REQUIRE(oss2.str() == "dac vth2 2800\n"); - proxy.Call("dac", {"vth3"}, -1, GET, oss3); + caller.call("dac", {"vth3"}, -1, GET, oss3); REQUIRE(oss3.str() == "dac vth3 2800\n"); } // vth overwrite vth even if counter disabled { std::ostringstream oss; - proxy.Call("dac", {"vth2", "2200"}, -1, PUT); - proxy.Call("dac", {"vth2"}, -1, GET, oss); + caller.call("dac", {"vth2", "2200"}, -1, PUT); + caller.call("dac", {"vth2"}, -1, GET, oss); REQUIRE(oss.str() == "dac vth2 2200\n"); } // counters enabled, sets remembered values - proxy.Call("counters", {"0", "1", "2"}, -1, PUT); + caller.call("counters", {"0", "1", "2"}, -1, PUT); { std::ostringstream oss1, oss2, oss3; - proxy.Call("dac", {"vth1"}, -1, GET, oss1); + caller.call("dac", {"vth1"}, -1, GET, oss1); REQUIRE(oss1.str() == "dac vth1 2100\n"); - proxy.Call("dac", {"vth2"}, -1, GET, oss2); + caller.call("dac", {"vth2"}, -1, GET, oss2); REQUIRE(oss2.str() == "dac vth2 2200\n"); - proxy.Call("dac", {"vth3"}, -1, GET, oss3); + caller.call("dac", {"vth3"}, -1, GET, oss3); REQUIRE(oss3.str() == "dac vth3 2100\n"); } // counters enabled, sets remembered values - proxy.Call("counters", {"0", "1"}, -1, PUT); + caller.call("counters", {"0", "1"}, -1, PUT); { std::ostringstream oss1, oss2, oss3; - proxy.Call("dac", {"vth1"}, -1, GET, oss1); + caller.call("dac", {"vth1"}, -1, GET, oss1); REQUIRE(oss1.str() == "dac vth1 2100\n"); - proxy.Call("dac", {"vth2"}, -1, GET, oss2); + caller.call("dac", {"vth2"}, -1, GET, oss2); REQUIRE(oss2.str() == "dac vth2 2200\n"); - proxy.Call("dac", {"vth3"}, -1, GET, oss3); + caller.call("dac", {"vth3"}, -1, GET, oss3); REQUIRE(oss3.str() == "dac vth3 2800\n"); } // Reset dacs after test @@ -126,81 +135,81 @@ TEST_CASE("Setting and reading back MYTHEN3 dacs", "[.cmd][.dacs]") { det.setDAC(defs::VTH3, vth3[i], false, {i}); } } - REQUIRE_THROWS(proxy.Call("dac", {"vsvp"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vsvn"}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("dac", {"vtrim"}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("dac", {"vrpreamp"}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("dac", {"vrshaper"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vtgstv"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcmp_ll"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcmp_lr"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcal"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcmp_rl"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcmp_rr"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"rxb_rb"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"rxb_lb"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcp"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcn"}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("dac", {"vishaper"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"iodelay"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vref_ds"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcascn_pb"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcascp_pb"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vout_cm"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcasc_out"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vin_cm"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vref_comp"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"ib_test_c"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vref_h_adc"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vb_comp_fe"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vb_comp_adc"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcom_cds"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vref_rstore"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vb_opa_1st"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vref_comp_fe"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcom_adc1"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vref_prech"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vref_l_adc"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vref_cds"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vb_cs"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vb_opa_fd"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcom_adc2"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vb_ds"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vb_comp"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vb_pixbuf"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vin_com"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vdd_prot"}, -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)); + 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)); + 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_prech"}, -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)); + REQUIRE_THROWS(caller.call("dac", {"vb_ds"}, -1, GET)); + REQUIRE_THROWS(caller.call("dac", {"vb_comp"}, -1, GET)); + REQUIRE_THROWS(caller.call("dac", {"vb_pixbuf"}, -1, GET)); + REQUIRE_THROWS(caller.call("dac", {"vin_com"}, -1, GET)); + REQUIRE_THROWS(caller.call("dac", {"vdd_prot"}, -1, GET)); } } /* acquisition */ -TEST_CASE("readout", "[.cmd]") { +TEST_CASE("readout", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); // PUT only command - REQUIRE_THROWS(proxy.Call("readout", {}, -1, GET)); + REQUIRE_THROWS(caller.call("readout", {}, -1, GET)); auto det_type = det.getDetectorType().squash(); if (det_type != defs::MYTHEN3) { - REQUIRE_THROWS(proxy.Call("readout", {}, -1, GET)); + REQUIRE_THROWS(caller.call("readout", {}, -1, GET)); } else { std::ostringstream oss; - proxy.Call("readout", {}, -1, PUT, oss); + caller.call("readout", {}, -1, PUT, oss); REQUIRE(oss.str() == "readout successful\n"); } } /* Mythen3 Specific */ -TEST_CASE("counters", "[.cmd]") { +TEST_CASE("counters", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::MYTHEN3) { - REQUIRE_THROWS(proxy.Call("counters", {}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("counters", {"3"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("counters", {"0", "-1"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("counters", {"0", "1", "1"}, -1, GET)); + REQUIRE_THROWS(caller.call("counters", {}, -1, PUT)); + REQUIRE_THROWS(caller.call("counters", {"3"}, -1, GET)); + REQUIRE_THROWS(caller.call("counters", {"0", "-1"}, -1, GET)); + REQUIRE_THROWS(caller.call("counters", {"0", "1", "1"}, -1, GET)); auto mask = det.getCounterMask({0}).squash(-1); std::vector list_str; @@ -210,140 +219,140 @@ TEST_CASE("counters", "[.cmd]") { } } std::ostringstream oss_set, oss_set2, oss_set3, oss_get; - proxy.Call("counters", {"0", "2", "1"}, -1, PUT, oss_set); + caller.call("counters", {"0", "2", "1"}, -1, PUT, oss_set); REQUIRE(oss_set.str() == "counters [0, 2, 1]\n"); - proxy.Call("counters", {"0", "2"}, -1, PUT, oss_set2); + caller.call("counters", {"0", "2"}, -1, PUT, oss_set2); REQUIRE(oss_set2.str() == "counters [0, 2]\n"); // put back old value - proxy.Call("counters", list_str, -1, PUT, oss_set3); + caller.call("counters", list_str, -1, PUT, oss_set3); REQUIRE(oss_set3.str() == "counters " + ToString(list_str) + "\n"); - proxy.Call("counters", {}, -1, GET, oss_get); + caller.call("counters", {}, -1, GET, oss_get); REQUIRE(oss_get.str() == "counters " + ToString(list_str) + "\n"); } else { - REQUIRE_THROWS(proxy.Call("counters", {}, -1, GET)); + REQUIRE_THROWS(caller.call("counters", {}, -1, GET)); } } -TEST_CASE("gates", "[.cmd]") { +TEST_CASE("gates", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::MYTHEN3) { auto prev_val = det.getNumberOfGates(); { std::ostringstream oss; - proxy.Call("gates", {"1000"}, -1, PUT, oss); + caller.call("gates", {"1000"}, -1, PUT, oss); REQUIRE(oss.str() == "gates 1000\n"); } { std::ostringstream oss; - proxy.Call("gates", {}, -1, GET, oss); + caller.call("gates", {}, -1, GET, oss); REQUIRE(oss.str() == "gates 1000\n"); } { std::ostringstream oss; - proxy.Call("gates", {"1"}, -1, PUT, oss); + caller.call("gates", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "gates 1\n"); } - REQUIRE_THROWS(proxy.Call("gates", {"0"}, -1, PUT)); + REQUIRE_THROWS(caller.call("gates", {"0"}, -1, PUT)); for (int i = 0; i != det.size(); ++i) { det.setNumberOfGates(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("gates", {}, -1, GET)); + REQUIRE_THROWS(caller.call("gates", {}, -1, GET)); } } -TEST_CASE("exptime1", "[.cmd]") { +TEST_CASE("exptime1", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::MYTHEN3) { auto prev_val = det.getExptime(0); { std::ostringstream oss; - proxy.Call("exptime1", {"1.25s"}, -1, PUT, oss); + caller.call("exptime1", {"1.25s"}, -1, PUT, oss); REQUIRE(oss.str() == "exptime1 1.25s\n"); } { std::ostringstream oss; - proxy.Call("exptime1", {}, -1, GET, oss); + caller.call("exptime1", {}, -1, GET, oss); REQUIRE(oss.str() == "exptime1 1.25s\n"); } { std::ostringstream oss; - proxy.Call("exptime1", {"0"}, -1, PUT, oss); + caller.call("exptime1", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "exptime1 0\n"); } for (int i = 0; i != det.size(); ++i) { det.setExptime(0, prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("exptime1", {}, -1, GET)); + REQUIRE_THROWS(caller.call("exptime1", {}, -1, GET)); } } -TEST_CASE("exptime2", "[.cmd]") { +TEST_CASE("exptime2", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::MYTHEN3) { auto prev_val = det.getExptime(1); { std::ostringstream oss; - proxy.Call("exptime2", {"1.25s"}, -1, PUT, oss); + caller.call("exptime2", {"1.25s"}, -1, PUT, oss); REQUIRE(oss.str() == "exptime2 1.25s\n"); } { std::ostringstream oss; - proxy.Call("exptime2", {}, -1, GET, oss); + caller.call("exptime2", {}, -1, GET, oss); REQUIRE(oss.str() == "exptime2 1.25s\n"); } { std::ostringstream oss; - proxy.Call("exptime2", {"0"}, -1, PUT, oss); + caller.call("exptime2", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "exptime2 0\n"); } for (int i = 0; i != det.size(); ++i) { det.setExptime(1, prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("exptime2", {}, -1, GET)); + REQUIRE_THROWS(caller.call("exptime2", {}, -1, GET)); } } -TEST_CASE("exptime3", "[.cmd]") { +TEST_CASE("exptime3", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::MYTHEN3) { auto prev_val = det.getExptime(2); { std::ostringstream oss; - proxy.Call("exptime3", {"1.25s"}, -1, PUT, oss); + caller.call("exptime3", {"1.25s"}, -1, PUT, oss); REQUIRE(oss.str() == "exptime3 1.25s\n"); } { std::ostringstream oss; - proxy.Call("exptime3", {}, -1, GET, oss); + caller.call("exptime3", {}, -1, GET, oss); REQUIRE(oss.str() == "exptime3 1.25s\n"); } { std::ostringstream oss; - proxy.Call("exptime3", {"0"}, -1, PUT, oss); + caller.call("exptime3", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "exptime3 0\n"); } for (int i = 0; i != det.size(); ++i) { det.setExptime(2, prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("exptime3", {}, -1, GET)); + REQUIRE_THROWS(caller.call("exptime3", {}, -1, GET)); } } -TEST_CASE("gatedelay", "[.cmd]") { +TEST_CASE("gatedelay", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::MYTHEN3) { auto prev_val = det.getExptimeForAllGates().tsquash( @@ -353,148 +362,148 @@ TEST_CASE("gatedelay", "[.cmd]") { } { std::ostringstream oss; - proxy.Call("gatedelay", {"0.05"}, -1, PUT, oss); + caller.call("gatedelay", {"0.05"}, -1, PUT, oss); REQUIRE(oss.str() == "gatedelay 0.05\n"); } if (det_type != defs::MYTHEN3) { std::ostringstream oss; - proxy.Call("gatedelay", {}, -1, GET, oss); + caller.call("gatedelay", {}, -1, GET, oss); REQUIRE(oss.str() == "gatedelay 50ms\n"); } { std::ostringstream oss; - proxy.Call("gatedelay", {"1s"}, -1, PUT, oss); + caller.call("gatedelay", {"1s"}, -1, PUT, oss); REQUIRE(oss.str() == "gatedelay 1s\n"); } { std::ostringstream oss; - proxy.Call("gatedelay", {"0"}, -1, PUT, oss); + caller.call("gatedelay", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "gatedelay 0\n"); } det.setGateDelay(-1, prev_val[0]); } else { - REQUIRE_THROWS(proxy.Call("gatedelay", {}, -1, GET)); + REQUIRE_THROWS(caller.call("gatedelay", {}, -1, GET)); } } -TEST_CASE("gatedelay1", "[.cmd]") { +TEST_CASE("gatedelay1", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::MYTHEN3) { auto prev_val = det.getGateDelay(0); { std::ostringstream oss; - proxy.Call("gatedelay1", {"1.25s"}, -1, PUT, oss); + caller.call("gatedelay1", {"1.25s"}, -1, PUT, oss); REQUIRE(oss.str() == "gatedelay1 1.25s\n"); } { std::ostringstream oss; - proxy.Call("gatedelay1", {}, -1, GET, oss); + caller.call("gatedelay1", {}, -1, GET, oss); REQUIRE(oss.str() == "gatedelay1 1.25s\n"); } { std::ostringstream oss; - proxy.Call("gatedelay1", {"0"}, -1, PUT, oss); + caller.call("gatedelay1", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "gatedelay1 0\n"); } for (int i = 0; i != det.size(); ++i) { det.setGateDelay(0, prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("gatedelay1", {}, -1, GET)); + REQUIRE_THROWS(caller.call("gatedelay1", {}, -1, GET)); } } -TEST_CASE("gatedelay2", "[.cmd]") { +TEST_CASE("gatedelay2", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::MYTHEN3) { auto prev_val = det.getGateDelay(1); { std::ostringstream oss; - proxy.Call("gatedelay2", {"1.25s"}, -1, PUT, oss); + caller.call("gatedelay2", {"1.25s"}, -1, PUT, oss); REQUIRE(oss.str() == "gatedelay2 1.25s\n"); } { std::ostringstream oss; - proxy.Call("gatedelay2", {}, -1, GET, oss); + caller.call("gatedelay2", {}, -1, GET, oss); REQUIRE(oss.str() == "gatedelay2 1.25s\n"); } { std::ostringstream oss; - proxy.Call("gatedelay2", {"0"}, -1, PUT, oss); + caller.call("gatedelay2", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "gatedelay2 0\n"); } for (int i = 0; i != det.size(); ++i) { det.setGateDelay(1, prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("gatedelay2", {}, -1, GET)); + REQUIRE_THROWS(caller.call("gatedelay2", {}, -1, GET)); } } -TEST_CASE("gatedelay3", "[.cmd]") { +TEST_CASE("gatedelay3", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::MYTHEN3) { auto prev_val = det.getGateDelay(2); { std::ostringstream oss; - proxy.Call("gatedelay3", {"1.25s"}, -1, PUT, oss); + caller.call("gatedelay3", {"1.25s"}, -1, PUT, oss); REQUIRE(oss.str() == "gatedelay3 1.25s\n"); } { std::ostringstream oss; - proxy.Call("gatedelay3", {}, -1, GET, oss); + caller.call("gatedelay3", {}, -1, GET, oss); REQUIRE(oss.str() == "gatedelay3 1.25s\n"); } { std::ostringstream oss; - proxy.Call("gatedelay3", {"0"}, -1, PUT, oss); + caller.call("gatedelay3", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "gatedelay3 0\n"); } for (int i = 0; i != det.size(); ++i) { det.setGateDelay(2, prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("gatedelay3", {}, -1, GET)); + REQUIRE_THROWS(caller.call("gatedelay3", {}, -1, GET)); } } -TEST_CASE("polarity", "[.cmd]") { +TEST_CASE("polarity", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); if (det.getDetectorType().squash() == defs::MYTHEN3) { auto prev_val = det.getPolarity(); { std::ostringstream oss; - proxy.Call("polarity", {"pos"}, -1, PUT, oss); + caller.call("polarity", {"pos"}, -1, PUT, oss); REQUIRE(oss.str() == "polarity pos\n"); } { std::ostringstream oss; - proxy.Call("polarity", {"neg"}, -1, PUT, oss); + caller.call("polarity", {"neg"}, -1, PUT, oss); REQUIRE(oss.str() == "polarity neg\n"); } { std::ostringstream oss; - proxy.Call("polarity", {}, -1, GET, oss); + caller.call("polarity", {}, -1, GET, oss); REQUIRE(oss.str() == "polarity neg\n"); } for (int i = 0; i != det.size(); ++i) { det.setPolarity(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("polarity", {}, -1, GET)); + REQUIRE_THROWS(caller.call("polarity", {}, -1, GET)); } } -TEST_CASE("interpolation", "[.cmd]") { +TEST_CASE("interpolation", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); if (det.getDetectorType().squash() == defs::MYTHEN3) { auto prev_interpolation = det.getInterpolation(); auto prev_mask = det.getCounterMask(); @@ -509,7 +518,7 @@ TEST_CASE("interpolation", "[.cmd]") { det.setCounterMask(fixedMask[i]); { std::ostringstream oss; - proxy.Call("interpolation", {"1"}, -1, PUT, oss); + caller.call("interpolation", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "interpolation 1\n"); REQUIRE(det.getCounterMask().tsquash( "inconsistent counter mask") == 7); @@ -519,7 +528,7 @@ TEST_CASE("interpolation", "[.cmd]") { } { std::ostringstream oss; - proxy.Call("interpolation", {"0"}, -1, PUT, oss); + caller.call("interpolation", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "interpolation 0\n"); REQUIRE(det.getCounterMask().tsquash( "inconsistent counter mask") == fixedMask[i]); @@ -533,7 +542,7 @@ TEST_CASE("interpolation", "[.cmd]") { { std::ostringstream oss; - proxy.Call("interpolation", {}, -1, GET, oss); + caller.call("interpolation", {}, -1, GET, oss); REQUIRE(oss.str() == "interpolation 0\n"); } for (int i = 0; i != det.size(); ++i) { @@ -542,13 +551,13 @@ TEST_CASE("interpolation", "[.cmd]") { det.setDAC(defs::VTH3, prev_vth3DacVal[i], 0, {i}); } } else { - REQUIRE_THROWS(proxy.Call("interpolation", {}, -1, GET)); + REQUIRE_THROWS(caller.call("interpolation", {}, -1, GET)); } } -TEST_CASE("pumpprobe", "[.cmd]") { +TEST_CASE("pumpprobe", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); if (det.getDetectorType().squash() == defs::MYTHEN3) { auto prev_val = det.getPumpProbe(); auto prev_interpolation = det.getInterpolation(); @@ -570,7 +579,7 @@ TEST_CASE("pumpprobe", "[.cmd]") { { // pump probe std::ostringstream oss; - proxy.Call("pumpprobe", {"1"}, -1, PUT, oss); + caller.call("pumpprobe", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "pumpprobe 1\n"); REQUIRE(det.getDAC(defs::VTH1, 0, {0}) .tsquash("inconsistent vth2 dac value") == @@ -583,11 +592,11 @@ TEST_CASE("pumpprobe", "[.cmd]") { disabledDacValue); } // interpolation and pump probe - REQUIRE_THROWS(proxy.Call("interpolation", {"1"}, -1, PUT)); + REQUIRE_THROWS(caller.call("interpolation", {"1"}, -1, PUT)); { // none std::ostringstream oss; - proxy.Call("pumpprobe", {"0"}, -1, PUT, oss); + caller.call("pumpprobe", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "pumpprobe 0\n"); REQUIRE(det.getCounterMask().tsquash( "inconsistent counter mask") == fixedMask[i]); @@ -607,7 +616,7 @@ TEST_CASE("pumpprobe", "[.cmd]") { } { std::ostringstream oss; - proxy.Call("pumpprobe", {}, -1, GET, oss); + caller.call("pumpprobe", {}, -1, GET, oss); REQUIRE(oss.str() == "pumpprobe 0\n"); } for (int i = 0; i != det.size(); ++i) { @@ -619,63 +628,63 @@ TEST_CASE("pumpprobe", "[.cmd]") { det.setDAC(defs::VTH3, prev_vth3DacVal[i], 0, {i}); } } else { - REQUIRE_THROWS(proxy.Call("pumpprobe", {}, -1, GET)); + REQUIRE_THROWS(caller.call("pumpprobe", {}, -1, GET)); } } -TEST_CASE("apulse", "[.cmd]") { +TEST_CASE("apulse", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); if (det.getDetectorType().squash() == defs::MYTHEN3) { auto prev_val = det.getAnalogPulsing(); { std::ostringstream oss; - proxy.Call("apulse", {"1"}, -1, PUT, oss); + caller.call("apulse", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "apulse 1\n"); } { std::ostringstream oss; - proxy.Call("apulse", {"0"}, -1, PUT, oss); + caller.call("apulse", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "apulse 0\n"); } { std::ostringstream oss; - proxy.Call("apulse", {}, -1, GET, oss); + caller.call("apulse", {}, -1, GET, oss); REQUIRE(oss.str() == "apulse 0\n"); } for (int i = 0; i != det.size(); ++i) { det.setAnalogPulsing(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("apulse", {}, -1, GET)); + REQUIRE_THROWS(caller.call("apulse", {}, -1, GET)); } } -TEST_CASE("dpulse", "[.cmd]") { +TEST_CASE("dpulse", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); if (det.getDetectorType().squash() == defs::MYTHEN3) { auto prev_val = det.getDigitalPulsing(); { std::ostringstream oss; - proxy.Call("dpulse", {"1"}, -1, PUT, oss); + caller.call("dpulse", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "dpulse 1\n"); } { std::ostringstream oss; - proxy.Call("dpulse", {"0"}, -1, PUT, oss); + caller.call("dpulse", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "dpulse 0\n"); } { std::ostringstream oss; - proxy.Call("dpulse", {}, -1, GET, oss); + caller.call("dpulse", {}, -1, GET, oss); REQUIRE(oss.str() == "dpulse 0\n"); } for (int i = 0; i != det.size(); ++i) { det.setDigitalPulsing(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("dpulse", {}, -1, GET)); + REQUIRE_THROWS(caller.call("dpulse", {}, -1, GET)); } } diff --git a/slsDetectorSoftware/tests/test-CmdProxy-pattern.cpp b/slsDetectorSoftware/tests/Caller/test-Caller-pattern.cpp similarity index 59% rename from slsDetectorSoftware/tests/test-CmdProxy-pattern.cpp rename to slsDetectorSoftware/tests/Caller/test-Caller-pattern.cpp index 08fad83bc..60e1f460e 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy-pattern.cpp +++ b/slsDetectorSoftware/tests/Caller/test-Caller-pattern.cpp @@ -1,6 +1,6 @@ // SPDX-License-Identifier: LGPL-3.0-or-other // Copyright (C) 2021 Contributors to the SLS Detector Package -#include "CmdProxy.h" +#include "Caller.h" #include "catch.hpp" #include "sls/Detector.h" #include "sls/sls_detector_defs.h" @@ -9,7 +9,7 @@ #include "sls/Result.h" #include "sls/ToString.h" #include "sls/versionAPI.h" -#include "test-CmdProxy-global.h" +#include "test-Caller-global.h" #include "tests/globals.h" namespace sls { @@ -19,114 +19,125 @@ using test::PUT; /* Pattern */ -TEST_CASE("patfname", "[.cmd]") { +TEST_CASE("patfname", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3) { - REQUIRE_THROWS(proxy.Call("patfname", {}, -1, PUT)); - REQUIRE_NOTHROW(proxy.Call("patfname", {}, -1, GET)); + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD || det_type == defs::MYTHEN3) { + REQUIRE_THROWS(caller.call("patfname", {}, -1, PUT)); + REQUIRE_NOTHROW(caller.call("patfname", {}, -1, GET)); } else { - REQUIRE_THROWS(proxy.Call("patfname", {}, -1, GET)); + REQUIRE_THROWS(caller.call("patfname", {}, -1, GET)); } } -TEST_CASE("pattern", "[.cmd]") { +TEST_CASE("pattern", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD || det_type == defs::MYTHEN3) { // no proper test for put - REQUIRE_THROWS(proxy.Call("pattern", {}, -1, GET)); + REQUIRE_THROWS(caller.call("pattern", {}, -1, GET)); } else { - REQUIRE_THROWS(proxy.Call("pattern", {}, -1, GET)); + REQUIRE_THROWS(caller.call("pattern", {}, -1, GET)); } } -TEST_CASE("savepattern", "[.cmd]") { +TEST_CASE("savepattern", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD || det_type == defs::MYTHEN3) { REQUIRE_THROWS( - proxy.Call("savepattern", {"/tmp/pattern.txt"}, -1, GET)); + caller.call("savepattern", {"/tmp/pattern.txt"}, -1, GET)); if (det.size() == 1) { REQUIRE_NOTHROW( - proxy.Call("savepattern", {"/tmp/pattern.txt"}, -1, PUT)); + caller.call("savepattern", {"/tmp/pattern.txt"}, -1, PUT)); } } else { REQUIRE_THROWS( - proxy.Call("savepattern", {"/tmp/pattern.txt"}, -1, PUT)); + caller.call("savepattern", {"/tmp/pattern.txt"}, -1, PUT)); } } -TEST_CASE("defaultpattern", "[.cmd]") { +TEST_CASE("defaultpattern", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::MYTHEN3) { - REQUIRE_THROWS(proxy.Call("defaultpattern", {}, -1, GET)); - REQUIRE_NOTHROW(proxy.Call("defaultpattern", {}, -1, PUT)); + REQUIRE_THROWS(caller.call("defaultpattern", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("defaultpattern", {}, -1, PUT)); } else { - REQUIRE_THROWS(proxy.Call("defaultpattern", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("defaultpattern", {}, -1, PUT)); + REQUIRE_THROWS(caller.call("defaultpattern", {}, -1, GET)); + REQUIRE_THROWS(caller.call("defaultpattern", {}, -1, PUT)); } } -TEST_CASE("patioctrl", "[.cmd]") { +TEST_CASE("patioctrl", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { auto prev_val = det.getPatternIOControl(); - { + if (det_type == defs::CHIPTESTBOARD) { std::ostringstream oss; - proxy.Call("patioctrl", {"0xc15004808d0a21a4"}, -1, PUT, oss); + caller.call("patioctrl", {"0xc15004808d0a21a4"}, -1, PUT, oss); REQUIRE(oss.str() == "patioctrl 0xc15004808d0a21a4\n"); } { std::ostringstream oss; - proxy.Call("patioctrl", {"0xaadf0"}, -1, PUT, oss); + caller.call("patioctrl", {"0xaadf0"}, -1, PUT, oss); REQUIRE(oss.str() == "patioctrl 0x00000000000aadf0\n"); } { std::ostringstream oss; - proxy.Call("patioctrl", {}, -1, GET, oss); + caller.call("patioctrl", {}, -1, GET, oss); REQUIRE(oss.str() == "patioctrl 0x00000000000aadf0\n"); } for (int i = 0; i != det.size(); ++i) { det.setPatternIOControl(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("patioctrl", {}, -1, GET)); + REQUIRE_THROWS(caller.call("patioctrl", {}, -1, GET)); } } -TEST_CASE("patword", "[.cmd]") { +TEST_CASE("patword", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD || det_type == defs::MYTHEN3) { int addr = 0x23; std::string saddr = ToStringHex(addr, 4); auto prev_val = det.getPatternWord(addr); { std::ostringstream oss; - proxy.Call("patword", {saddr, "0xc15004808d0a21a4"}, -1, PUT, oss); + caller.call("patword", {saddr, "0xc15004808d0a21a4"}, -1, PUT, oss); REQUIRE(oss.str() == "patword [" + saddr + ", 0xc15004808d0a21a4]\n"); } { std::ostringstream oss; - proxy.Call("patword", {saddr, "0xaadf0"}, -1, PUT, oss); + caller.call("patword", {saddr, "0x815004808d0a21a4"}, -1, PUT, oss); + REQUIRE(oss.str() == + "patword [" + saddr + ", 0x815004808d0a21a4]\n"); + } + { + std::ostringstream oss; + caller.call("patword", {saddr, "0xaadf0"}, -1, PUT, oss); REQUIRE(oss.str() == "patword [" + saddr + ", 0x00000000000aadf0]\n"); } { std::ostringstream oss; - proxy.Call("patword", {saddr}, -1, GET, oss); + caller.call("patword", {saddr}, -1, GET, oss); REQUIRE(oss.str() == "patword [" + saddr + ", 0x00000000000aadf0]\n"); } @@ -134,25 +145,26 @@ TEST_CASE("patword", "[.cmd]") { det.setPatternWord(addr, prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("patword", {"0x23"}, -1, GET)); + REQUIRE_THROWS(caller.call("patword", {"0x23"}, -1, GET)); } } -TEST_CASE("patlimits", "[.cmd]") { +TEST_CASE("patlimits", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD || det_type == defs::MYTHEN3) { auto prev_val = det.getPatternLoopAddresses(-1); { std::ostringstream oss; - proxy.Call("patlimits", {"0x20", "0x5c"}, -1, PUT, oss); + caller.call("patlimits", {"0x20", "0x5c"}, -1, PUT, oss); REQUIRE(oss.str() == "patlimits [0x0020, 0x005c]\n"); } { std::ostringstream oss; - proxy.Call("patlimits", {}, -1, GET, oss); + caller.call("patlimits", {}, -1, GET, oss); REQUIRE(oss.str() == "patlimits [0x0020, 0x005c]\n"); } for (int i = 0; i != det.size(); ++i) { @@ -160,16 +172,17 @@ TEST_CASE("patlimits", "[.cmd]") { {i}); } } else { - REQUIRE_THROWS(proxy.Call("patlimits", {}, -1, GET)); + REQUIRE_THROWS(caller.call("patlimits", {}, -1, GET)); } } -TEST_CASE("patloop", "[.cmd]") { +TEST_CASE("patloop", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD || det_type == defs::MYTHEN3) { for (int iLoop = 0; iLoop != MAX_PATTERN_LEVELS; ++iLoop) { // m3 only has 3 levels if (det_type == defs::MYTHEN3 && iLoop >= 3) { @@ -179,26 +192,26 @@ TEST_CASE("patloop", "[.cmd]") { std::string sLoop = ToString(iLoop); if (iLoop < 3) { std::string deprecatedCmd = "patloop" + sLoop; - { // depreciated + { // deprecated std::ostringstream oss; - proxy.Call(deprecatedCmd, {"0x20", "0x5c"}, -1, PUT, oss); + caller.call(deprecatedCmd, {"0x20", "0x5c"}, -1, PUT, oss); REQUIRE(oss.str() == deprecatedCmd + " [0x0020, 0x005c]\n"); } - { // depreciated + { // deprecated std::ostringstream oss; - proxy.Call(deprecatedCmd, {}, -1, GET, oss); + caller.call(deprecatedCmd, {}, -1, GET, oss); REQUIRE(oss.str() == deprecatedCmd + " [0x0020, 0x005c]\n"); } } { std::ostringstream oss; - proxy.Call("patloop", {sLoop, "0x20", "0x5c"}, -1, PUT, oss); + caller.call("patloop", {sLoop, "0x20", "0x5c"}, -1, PUT, oss); REQUIRE(oss.str() == "patloop " + sLoop + " [0x0020, 0x005c]\n"); } { std::ostringstream oss; - proxy.Call("patloop", {sLoop}, -1, GET, oss); + caller.call("patloop", {sLoop}, -1, GET, oss); REQUIRE(oss.str() == "patloop " + sLoop + " [0x0020, 0x005c]\n"); } @@ -208,16 +221,17 @@ TEST_CASE("patloop", "[.cmd]") { } } } else { - REQUIRE_THROWS(proxy.Call("patloop", {"0"}, -1, GET)); + REQUIRE_THROWS(caller.call("patloop", {"0"}, -1, GET)); } } -TEST_CASE("patnloop", "[.cmd]") { +TEST_CASE("patnloop", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD || det_type == defs::MYTHEN3) { for (int iLoop = 0; iLoop != MAX_PATTERN_LEVELS; ++iLoop) { // m3 only has 3 levels if (det_type == defs::MYTHEN3 && iLoop >= 3) { @@ -227,25 +241,25 @@ TEST_CASE("patnloop", "[.cmd]") { std::string sLoop = ToString(iLoop); if (iLoop < 3) { std::string deprecatedCmd = "patnloop" + sLoop; - { // depreciated + { // deprecated std::ostringstream oss; - proxy.Call(deprecatedCmd, {"5"}, -1, PUT, oss); + caller.call(deprecatedCmd, {"5"}, -1, PUT, oss); REQUIRE(oss.str() == deprecatedCmd + " 5\n"); } - { // depreciated + { // deprecated std::ostringstream oss; - proxy.Call(deprecatedCmd, {}, -1, GET, oss); + caller.call(deprecatedCmd, {}, -1, GET, oss); REQUIRE(oss.str() == deprecatedCmd + " 5\n"); } } { std::ostringstream oss; - proxy.Call("patnloop", {sLoop, "5"}, -1, PUT, oss); + caller.call("patnloop", {sLoop, "5"}, -1, PUT, oss); REQUIRE(oss.str() == "patnloop " + sLoop + " 5\n"); } { std::ostringstream oss; - proxy.Call("patnloop", {sLoop}, -1, GET, oss); + caller.call("patnloop", {sLoop}, -1, GET, oss); REQUIRE(oss.str() == "patnloop " + sLoop + " 5\n"); } for (int iDet = 0; iDet != det.size(); ++iDet) { @@ -253,16 +267,17 @@ TEST_CASE("patnloop", "[.cmd]") { } } } else { - REQUIRE_THROWS(proxy.Call("patnloop", {"0"}, -1, GET)); + REQUIRE_THROWS(caller.call("patnloop", {"0"}, -1, GET)); } } -TEST_CASE("patwait", "[.cmd]") { +TEST_CASE("patwait", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD || det_type == defs::MYTHEN3) { for (int iLoop = 0; iLoop != MAX_PATTERN_LEVELS; ++iLoop) { // m3 only has 3 levels if (det_type == defs::MYTHEN3 && iLoop >= 3) { @@ -272,25 +287,25 @@ TEST_CASE("patwait", "[.cmd]") { std::string sLoop = ToString(iLoop); if (iLoop < 3) { std::string deprecatedCmd = "patwait" + sLoop; - { // depreciated + { // deprecated std::ostringstream oss; - proxy.Call(deprecatedCmd, {"0x5c"}, -1, PUT, oss); + caller.call(deprecatedCmd, {"0x5c"}, -1, PUT, oss); REQUIRE(oss.str() == deprecatedCmd + " 0x005c\n"); } - { // depreciated + { // deprecated std::ostringstream oss; - proxy.Call(deprecatedCmd, {}, -1, GET, oss); + caller.call(deprecatedCmd, {}, -1, GET, oss); REQUIRE(oss.str() == deprecatedCmd + " 0x005c\n"); } } { std::ostringstream oss; - proxy.Call("patwait", {sLoop, "0x5c"}, -1, PUT, oss); + caller.call("patwait", {sLoop, "0x5c"}, -1, PUT, oss); REQUIRE(oss.str() == "patwait " + sLoop + " 0x005c\n"); } { std::ostringstream oss; - proxy.Call("patwait", {sLoop}, -1, GET, oss); + caller.call("patwait", {sLoop}, -1, GET, oss); REQUIRE(oss.str() == "patwait " + sLoop + " 0x005c\n"); } for (int iDet = 0; iDet != det.size(); ++iDet) { @@ -298,16 +313,17 @@ TEST_CASE("patwait", "[.cmd]") { } } } else { - REQUIRE_THROWS(proxy.Call("patwait", {"0"}, -1, GET)); + REQUIRE_THROWS(caller.call("patwait", {"0"}, -1, GET)); } } -TEST_CASE("patwaittime", "[.cmd]") { +TEST_CASE("patwaittime", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD || det_type == defs::MYTHEN3) { for (int iLoop = 0; iLoop != MAX_PATTERN_LEVELS; ++iLoop) { // m3 only has 3 levels if (det_type == defs::MYTHEN3 && iLoop >= 3) { @@ -317,25 +333,25 @@ TEST_CASE("patwaittime", "[.cmd]") { std::string sLoop = ToString(iLoop); if (iLoop < 3) { std::string deprecatedCmd = "patwaittime" + sLoop; - { // depreciated + { // deprecated std::ostringstream oss; - proxy.Call(deprecatedCmd, {"8589936640"}, -1, PUT, oss); + caller.call(deprecatedCmd, {"8589936640"}, -1, PUT, oss); REQUIRE(oss.str() == deprecatedCmd + " 8589936640\n"); } - { // depreciated + { // deprecated std::ostringstream oss; - proxy.Call(deprecatedCmd, {}, -1, GET, oss); + caller.call(deprecatedCmd, {}, -1, GET, oss); REQUIRE(oss.str() == deprecatedCmd + " 8589936640\n"); } } { std::ostringstream oss; - proxy.Call("patwaittime", {sLoop, "8589936640"}, -1, PUT, oss); + caller.call("patwaittime", {sLoop, "8589936640"}, -1, PUT, oss); REQUIRE(oss.str() == "patwaittime " + sLoop + " 8589936640\n"); } { std::ostringstream oss; - proxy.Call("patwaittime", {sLoop}, -1, GET, oss); + caller.call("patwaittime", {sLoop}, -1, GET, oss); REQUIRE(oss.str() == "patwaittime " + sLoop + " 8589936640\n"); } for (int iDet = 0; iDet != det.size(); ++iDet) { @@ -343,69 +359,71 @@ TEST_CASE("patwaittime", "[.cmd]") { } } } else { - REQUIRE_THROWS(proxy.Call("patwaittime", {"0"}, -1, GET)); + REQUIRE_THROWS(caller.call("patwaittime", {"0"}, -1, GET)); } } -TEST_CASE("patmask", "[.cmd]") { +TEST_CASE("patmask", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD || det_type == defs::MYTHEN3) { auto prev_val = det.getPatternMask(); { std::ostringstream oss; - proxy.Call("patmask", {"0x842f020204200dc0"}, -1, PUT, oss); + caller.call("patmask", {"0x842f020204200dc0"}, -1, PUT, oss); REQUIRE(oss.str() == "patmask 0x842f020204200dc0\n"); } { std::ostringstream oss; - proxy.Call("patmask", {}, -1, GET, oss); + caller.call("patmask", {}, -1, GET, oss); REQUIRE(oss.str() == "patmask 0x842f020204200dc0\n"); } for (int i = 0; i != det.size(); ++i) { det.setPatternMask(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("patmask", {}, -1, GET)); + REQUIRE_THROWS(caller.call("patmask", {}, -1, GET)); } } -TEST_CASE("patsetbit", "[.cmd]") { +TEST_CASE("patsetbit", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD || det_type == defs::MYTHEN3) { auto prev_val = det.getPatternBitMask(); { std::ostringstream oss; - proxy.Call("patsetbit", {"0x842f020204200dc0"}, -1, PUT, oss); + caller.call("patsetbit", {"0x842f020204200dc0"}, -1, PUT, oss); REQUIRE(oss.str() == "patsetbit 0x842f020204200dc0\n"); } { std::ostringstream oss; - proxy.Call("patsetbit", {}, -1, GET, oss); + caller.call("patsetbit", {}, -1, GET, oss); REQUIRE(oss.str() == "patsetbit 0x842f020204200dc0\n"); } for (int i = 0; i != det.size(); ++i) { det.setPatternBitMask(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("patsetbit", {}, -1, GET)); + REQUIRE_THROWS(caller.call("patsetbit", {}, -1, GET)); } } -TEST_CASE("patternstart", "[.cmd]") { +TEST_CASE("patternstart", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); - REQUIRE_THROWS(proxy.Call("patternstart", {}, -1, GET)); + Caller caller(&det); + REQUIRE_THROWS(caller.call("patternstart", {}, -1, GET)); auto det_type = det.getDetectorType().squash(); if (det_type == defs::MYTHEN3) { - REQUIRE_NOTHROW(proxy.Call("patternstart", {}, -1, PUT)); + REQUIRE_NOTHROW(caller.call("patternstart", {}, -1, PUT)); } else { - REQUIRE_THROWS(proxy.Call("patternstart", {}, -1, PUT)); + REQUIRE_THROWS(caller.call("patternstart", {}, -1, PUT)); } } diff --git a/slsDetectorSoftware/tests/test-CmdProxy-rx.cpp b/slsDetectorSoftware/tests/Caller/test-Caller-rx.cpp similarity index 64% rename from slsDetectorSoftware/tests/test-CmdProxy-rx.cpp rename to slsDetectorSoftware/tests/Caller/test-Caller-rx.cpp index 364335450..38fe14e86 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy-rx.cpp +++ b/slsDetectorSoftware/tests/Caller/test-Caller-rx.cpp @@ -1,11 +1,12 @@ // SPDX-License-Identifier: LGPL-3.0-or-other // Copyright (C) 2021 Contributors to the SLS Detector Package -#include "CmdProxy.h" +#include "Caller.h" #include "catch.hpp" #include "sls/Detector.h" #include "sls/Version.h" #include "sls/sls_detector_defs.h" -#include "test-CmdProxy-global.h" +#include "test-Caller-global.h" + #include #include "sls/versionAPI.h" @@ -23,77 +24,76 @@ python/scripts/list_tested_cmd.py to check if all commands are covered /* configuration */ -TEST_CASE("rx_version", "[.cmd][.rx]") { +TEST_CASE("rx_version", "[.cmdcall][.rx]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); std::ostringstream oss; - proxy.Call("rx_version", {}, -1, GET, oss); + caller.call("rx_version", {}, -1, GET, oss); sls::Version v(APIRECEIVER); std::ostringstream vs; vs << "rx_version " << v.concise() << '\n'; REQUIRE(oss.str() == vs.str()); - REQUIRE_THROWS(proxy.Call("rx_version", {"0"}, -1, PUT)); + REQUIRE_THROWS(caller.call("rx_version", {"0"}, -1, PUT)); } /* acquisition */ -TEST_CASE("rx_start", "[.cmd][.rx]") { +TEST_CASE("rx_start", "[.cmdcall][.rx]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); det.setFileWrite(false); // avoid writing or error on file creation // PUT only command - REQUIRE_THROWS(proxy.Call("rx_start", {}, -1, GET)); + REQUIRE_THROWS(caller.call("rx_start", {}, -1, GET)); { std::ostringstream oss; - proxy.Call("rx_start", {}, -1, PUT, oss); + caller.call("rx_start", {}, -1, PUT, oss); REQUIRE(oss.str() == "rx_start successful\n"); } { std::ostringstream oss; - proxy.Call("rx_status", {}, -1, GET, oss); + caller.call("rx_status", {}, -1, GET, oss); REQUIRE(oss.str() == "rx_status running\n"); } } -TEST_CASE("rx_stop", "[.cmd][.rx]") { +TEST_CASE("rx_stop", "[.cmdcall][.rx]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); // PUT only command - REQUIRE_THROWS(proxy.Call("rx_stop", {}, -1, GET)); + REQUIRE_THROWS(caller.call("rx_stop", {}, -1, GET)); { std::ostringstream oss; - proxy.Call("rx_stop", {}, -1, PUT, oss); + caller.call("rx_stop", {}, -1, PUT, oss); REQUIRE(oss.str() == "rx_stop successful\n"); } { std::ostringstream oss; - proxy.Call("rx_status", {}, -1, GET, oss); + caller.call("rx_status", {}, -1, GET, oss); REQUIRE(oss.str() == "rx_status idle\n"); } } -TEST_CASE("rx_status", "[.cmd][.rx]") { +TEST_CASE("rx_status", "[.cmdcall][.rx]") { Detector det; + Caller caller(&det); det.setFileWrite(false); // avoid writing or error on file creation - CmdProxy proxy(&det); det.startReceiver(); { std::ostringstream oss; - proxy.Call("rx_status", {}, -1, GET, oss); + caller.call("rx_status", {}, -1, GET, oss); REQUIRE(oss.str() == "rx_status running\n"); } det.stopReceiver(); { std::ostringstream oss; - proxy.Call("rx_status", {}, -1, GET, oss); + caller.call("rx_status", {}, -1, GET, oss); REQUIRE(oss.str() == "rx_status idle\n"); } } -TEST_CASE("rx_framescaught", "[.cmd][.rx]") { +TEST_CASE("rx_framescaught", "[.cmdcall][.rx]") { Detector det; - CmdProxy proxy(&det); - + Caller caller(&det); // This ensures 0 caught frames auto prev_val = det.getFileWrite(); det.setFileWrite(false); // avoid writing or error on file creation @@ -101,7 +101,7 @@ TEST_CASE("rx_framescaught", "[.cmd][.rx]") { det.stopReceiver(); { std::ostringstream oss; - proxy.Call("rx_framescaught", {}, -1, GET, oss); + caller.call("rx_framescaught", {}, -1, GET, oss); if (det.getNumberofUDPInterfaces().tsquash( "inconsistent number of interfaces") == 1) { REQUIRE(oss.str() == "rx_framescaught [0]\n"); @@ -116,7 +116,7 @@ TEST_CASE("rx_framescaught", "[.cmd][.rx]") { // det.acquire(); // { // std::ostringstream oss; - // proxy.Call("rx_framescaught", {}, -1, GET, oss); + // caller.call("rx_framescaught", {}, -1, GET, oss); // REQUIRE(oss.str() == "rx_framescaught 1\n"); // } @@ -125,11 +125,11 @@ TEST_CASE("rx_framescaught", "[.cmd][.rx]") { } } -TEST_CASE("rx_missingpackets", "[.cmd][.rx]") { +TEST_CASE("rx_missingpackets", "[.cmdcall][.rx]") { Detector det; + Caller caller(&det); auto prev_val = det.getFileWrite(); det.setFileWrite(false); // avoid writing or error on file creation - CmdProxy proxy(&det); auto prev_frames = det.getNumberOfFrames().tsquash("inconsistent #frames in test"); det.setNumberOfFrames(100); @@ -138,7 +138,7 @@ TEST_CASE("rx_missingpackets", "[.cmd][.rx]") { det.startReceiver(); det.stopReceiver(); std::ostringstream oss; - proxy.Call("rx_missingpackets", {}, -1, GET, oss); + caller.call("rx_missingpackets", {}, -1, GET, oss); if (det.getNumberofUDPInterfaces().tsquash( "inconsistent number of interfaces") == 1) { REQUIRE(oss.str() != "rx_missingpackets [0]\n"); @@ -147,14 +147,16 @@ TEST_CASE("rx_missingpackets", "[.cmd][.rx]") { } } auto det_type = det.getDetectorType().squash(); - if (det_type != defs::CHIPTESTBOARD && det_type != defs::MOENCH) { - // 0 missing packets (takes into account that acquisition is stopped) + if (det_type != defs::CHIPTESTBOARD && + det_type != defs::XILINX_CHIPTESTBOARD) { + // 0 missing packets (takes into account that acquisition is + // stopped) det.startReceiver(); det.startDetector(); det.stopDetector(); det.stopReceiver(); std::ostringstream oss; - proxy.Call("rx_missingpackets", {}, -1, GET, oss); + caller.call("rx_missingpackets", {}, -1, GET, oss); if (det.getNumberofUDPInterfaces().tsquash( "inconsistent number of interfaces") == 1) { REQUIRE(oss.str() == "rx_missingpackets [0]\n"); @@ -168,41 +170,41 @@ TEST_CASE("rx_missingpackets", "[.cmd][.rx]") { det.setNumberOfFrames(prev_frames); } -TEST_CASE("rx_frameindex", "[.cmd][.rx]") { +TEST_CASE("rx_frameindex", "[.cmdcall][.rx]") { Detector det; - CmdProxy proxy(&det); - proxy.Call("rx_frameindex", {}, -1, GET); + Caller caller(&det); + caller.call("rx_frameindex", {}, -1, GET); // This is a get only command - REQUIRE_THROWS(proxy.Call("rx_frameindex", {"2"}, -1, PUT)); + REQUIRE_THROWS(caller.call("rx_frameindex", {"2"}, -1, PUT)); } /* Network Configuration (Detector<->Receiver) */ -TEST_CASE("rx_printconfig", "[.cmd][.rx]") { +TEST_CASE("rx_printconfig", "[.cmdcall][.rx]") { Detector det; - CmdProxy proxy(&det); - REQUIRE_NOTHROW(proxy.Call("rx_printconfig", {}, -1, GET)); + Caller caller(&det); + REQUIRE_NOTHROW(caller.call("rx_printconfig", {}, -1, GET)); } /* Receiver Config */ -TEST_CASE("rx_hostname", "[.cmd][.rx]") { +TEST_CASE("rx_hostname", "[.cmdcall][.rx]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto prev_val = det.getRxHostname(); - // Cannot set rx_hostname (will reset parameters in rxr and no shm variables - // to update) + // Cannot set rx_hostname (will reset parameters in rxr and no shm + // variables to update) // { // // disable receiver // std::ostringstream oss; - // proxy.Call("rx_hostname", {"none"}, -1, PUT, oss); + // caller.call("rx_hostname", {"none"}, -1, PUT, oss); // REQUIRE(oss.str() == "rx_hostname [none]\n"); // } // { // std::ostringstream oss; - // proxy.Call("rx_hostname", {}, -1, GET, oss); + // caller.call("rx_hostname", {}, -1, GET, oss); // REQUIRE(oss.str() == "rx_hostname none\n"); // // receiver should be disabled // REQUIRE(det.getUseReceiverFlag().tsquash( @@ -214,43 +216,42 @@ TEST_CASE("rx_hostname", "[.cmd][.rx]") { // } { std::ostringstream oss; - proxy.Call("rx_hostname", {}, 0, GET, oss); + caller.call("rx_hostname", {}, 0, GET, oss); REQUIRE(oss.str() == "rx_hostname " + prev_val[0] + "\n"); } } -TEST_CASE("rx_tcpport", "[.cmd][.rx]") { +TEST_CASE("rx_tcpport", "[.cmdcall][.rx]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto prev_val = det.getRxPort(); uint16_t port = 3500; - proxy.Call("rx_tcpport", {std::to_string(port)}, -1, PUT); + caller.call("rx_tcpport", {std::to_string(port)}, -1, PUT); for (int i = 0; i != det.size(); ++i) { std::ostringstream oss; - proxy.Call("rx_tcpport", {}, i, GET, oss); + caller.call("rx_tcpport", {}, i, GET, oss); REQUIRE(oss.str() == "rx_tcpport " + std::to_string(port + i) + '\n'); } port = 5754; - proxy.Call("rx_tcpport", {std::to_string(port)}, -1, PUT); + caller.call("rx_tcpport", {std::to_string(port)}, -1, PUT); for (int i = 0; i != det.size(); ++i) { std::ostringstream oss; - proxy.Call("rx_tcpport", {}, i, GET, oss); + caller.call("rx_tcpport", {}, i, GET, oss); REQUIRE(oss.str() == "rx_tcpport " + std::to_string(port + i) + '\n'); } - - test_valid_port("rx_tcpport", {}, -1, PUT); - test_valid_port("rx_tcpport", {}, 0, PUT); + test_valid_port_caller("rx_tcpport", {}, -1, PUT); + test_valid_port_caller("rx_tcpport", {}, 0, PUT); // should fail for the second module if (det.size() > 1) { - REQUIRE_THROWS(proxy.Call("rx_tcpport", {"65535"}, -1, PUT)); + REQUIRE_THROWS(caller.call("rx_tcpport", {"65535"}, -1, PUT)); auto rxHostname = det.getRxHostname().squash("none"); if (rxHostname != "none") { std::ostringstream oss; for (int i = 0; i != det.size(); ++i) { oss << rxHostname << ":" << 65536 + i << "+"; } - REQUIRE_THROWS(proxy.Call("rx_hostname", {oss.str()}, -1, PUT)); + REQUIRE_THROWS(caller.call("rx_hostname", {oss.str()}, -1, PUT)); } } @@ -259,23 +260,23 @@ TEST_CASE("rx_tcpport", "[.cmd][.rx]") { } } -TEST_CASE("rx_fifodepth", "[.cmd][.rx]") { +TEST_CASE("rx_fifodepth", "[.cmdcall][.rx]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto prev_val = det.getRxFifoDepth(); { std::ostringstream oss; - proxy.Call("rx_fifodepth", {"10"}, -1, PUT, oss); + caller.call("rx_fifodepth", {"10"}, -1, PUT, oss); REQUIRE(oss.str() == "rx_fifodepth 10\n"); } { std::ostringstream oss; - proxy.Call("rx_fifodepth", {"100"}, -1, PUT, oss); + caller.call("rx_fifodepth", {"100"}, -1, PUT, oss); REQUIRE(oss.str() == "rx_fifodepth 100\n"); } { std::ostringstream oss; - proxy.Call("rx_fifodepth", {}, -1, GET, oss); + caller.call("rx_fifodepth", {}, -1, GET, oss); REQUIRE(oss.str() == "rx_fifodepth 100\n"); } for (int i = 0; i != det.size(); ++i) { @@ -283,23 +284,23 @@ TEST_CASE("rx_fifodepth", "[.cmd][.rx]") { } } -TEST_CASE("rx_silent", "[.cmd][.rx]") { +TEST_CASE("rx_silent", "[.cmdcall][.rx]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto prev_val = det.getRxSilentMode(); { std::ostringstream oss; - proxy.Call("rx_silent", {"1"}, -1, PUT, oss); + caller.call("rx_silent", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "rx_silent 1\n"); } { std::ostringstream oss; - proxy.Call("rx_silent", {}, -1, GET, oss); + caller.call("rx_silent", {}, -1, GET, oss); REQUIRE(oss.str() == "rx_silent 1\n"); } { std::ostringstream oss; - proxy.Call("rx_silent", {"0"}, -1, PUT, oss); + caller.call("rx_silent", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "rx_silent 0\n"); } for (int i = 0; i != det.size(); ++i) { @@ -307,28 +308,28 @@ TEST_CASE("rx_silent", "[.cmd][.rx]") { } } -TEST_CASE("rx_discardpolicy", "[.cmd][.rx]") { +TEST_CASE("rx_discardpolicy", "[.cmdcall][.rx]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto prev_val = det.getRxFrameDiscardPolicy(); { std::ostringstream oss; - proxy.Call("rx_discardpolicy", {"discardempty"}, -1, PUT, oss); + caller.call("rx_discardpolicy", {"discardempty"}, -1, PUT, oss); REQUIRE(oss.str() == "rx_discardpolicy discardempty\n"); } { std::ostringstream oss; - proxy.Call("rx_discardpolicy", {}, -1, GET, oss); + caller.call("rx_discardpolicy", {}, -1, GET, oss); REQUIRE(oss.str() == "rx_discardpolicy discardempty\n"); } { std::ostringstream oss; - proxy.Call("rx_discardpolicy", {"discardpartial"}, -1, PUT, oss); + caller.call("rx_discardpolicy", {"discardpartial"}, -1, PUT, oss); REQUIRE(oss.str() == "rx_discardpolicy discardpartial\n"); } { std::ostringstream oss; - proxy.Call("rx_discardpolicy", {"nodiscard"}, -1, PUT, oss); + caller.call("rx_discardpolicy", {"nodiscard"}, -1, PUT, oss); REQUIRE(oss.str() == "rx_discardpolicy nodiscard\n"); } for (int i = 0; i != det.size(); ++i) { @@ -336,23 +337,23 @@ TEST_CASE("rx_discardpolicy", "[.cmd][.rx]") { } } -TEST_CASE("rx_padding", "[.cmd][.rx]") { +TEST_CASE("rx_padding", "[.cmdcall][.rx]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto prev_val = det.getPartialFramesPadding(); { std::ostringstream oss; - proxy.Call("rx_padding", {"0"}, -1, PUT, oss); + caller.call("rx_padding", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "rx_padding 0\n"); } { std::ostringstream oss; - proxy.Call("rx_padding", {}, -1, GET, oss); + caller.call("rx_padding", {}, -1, GET, oss); REQUIRE(oss.str() == "rx_padding 0\n"); } { std::ostringstream oss; - proxy.Call("rx_padding", {"1"}, -1, PUT, oss); + caller.call("rx_padding", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "rx_padding 1\n"); } for (int i = 0; i != det.size(); ++i) { @@ -360,62 +361,62 @@ TEST_CASE("rx_padding", "[.cmd][.rx]") { } } -TEST_CASE("rx_udpsocksize", "[.cmd][.rx]") { +TEST_CASE("rx_udpsocksize", "[.cmdcall][.rx]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); int64_t prev_val = det.getRxUDPSocketBufferSize().tsquash( "Need same udp socket buffer size to test"); std::string s_new_val = std::to_string(prev_val); /*std::string s_new_val = std::to_string(prev_val - 1000); { Need permissions std::ostringstream oss; - proxy.Call("rx_udpsocksize", {s_new_val}, -1, PUT, oss); + caller.call("rx_udpsocksize", {s_new_val}, -1, PUT, oss); REQUIRE(oss.str() >= "rx_udpsocksize " + s_new_val + "\n"); }*/ { std::ostringstream oss; - proxy.Call("rx_udpsocksize", {}, -1, GET, oss); + caller.call("rx_udpsocksize", {}, -1, GET, oss); REQUIRE(oss.str() >= "rx_udpsocksize " + s_new_val + "\n"); } det.setRxUDPSocketBufferSize(prev_val); } -TEST_CASE("rx_realudpsocksize", "[.cmd][.rx]") { +TEST_CASE("rx_realudpsocksize", "[.cmdcall][.rx]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); uint64_t val = 0; { std::ostringstream oss; - proxy.Call("rx_udpsocksize", {}, -1, GET, oss); + caller.call("rx_udpsocksize", {}, -1, GET, oss); std::string s = (oss.str()).erase(0, strlen("rx_udpsocksize ")); val = std::stol(s); } { std::ostringstream oss; - proxy.Call("rx_realudpsocksize", {}, -1, GET, oss); + caller.call("rx_realudpsocksize", {}, -1, GET, oss); std::string s = (oss.str()).erase(0, strlen("rx_realudpsocksize ")); uint64_t rval = std::stol(s); REQUIRE(rval >= val * 2); } } -TEST_CASE("rx_lock", "[.cmd][.rx]") { +TEST_CASE("rx_lock", "[.cmdcall][.rx]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto prev_val = det.getRxLock(); { std::ostringstream oss; - proxy.Call("rx_lock", {"1"}, -1, PUT, oss); + caller.call("rx_lock", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "rx_lock 1\n"); } { std::ostringstream oss; - proxy.Call("rx_lock", {}, -1, GET, oss); + caller.call("rx_lock", {}, -1, GET, oss); REQUIRE(oss.str() == "rx_lock 1\n"); } { std::ostringstream oss; - proxy.Call("rx_lock", {"0"}, -1, PUT, oss); + caller.call("rx_lock", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "rx_lock 0\n"); } for (int i = 0; i != det.size(); ++i) { @@ -423,40 +424,40 @@ TEST_CASE("rx_lock", "[.cmd][.rx]") { } } -TEST_CASE("rx_lastclient", "[.cmd][.rx]") { +TEST_CASE("rx_lastclient", "[.cmdcall][.rx]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); std::ostringstream oss; - REQUIRE_NOTHROW(proxy.Call("rx_lastclient", {}, -1, GET, oss)); + REQUIRE_NOTHROW(caller.call("rx_lastclient", {}, -1, GET, oss)); if (test::my_ip != "undefined") { REQUIRE(oss.str() == "rx_lastclient " + test::my_ip + "\n"); } } -TEST_CASE("rx_threads", "[.cmd][.rx]") { +TEST_CASE("rx_threads", "[.cmdcall][.rx]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); std::ostringstream oss; - REQUIRE_NOTHROW(proxy.Call("rx_threads", {}, -1, GET, oss)); + REQUIRE_NOTHROW(caller.call("rx_threads", {}, -1, GET, oss)); } -TEST_CASE("rx_arping", "[.cmd][.rx]") { +TEST_CASE("rx_arping", "[.cmdcall][.rx]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto prev_val = det.getRxArping(); { std::ostringstream oss; - proxy.Call("rx_arping", {"1"}, -1, PUT, oss); + caller.call("rx_arping", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "rx_arping 1\n"); } { std::ostringstream oss; - proxy.Call("rx_arping", {}, -1, GET, oss); + caller.call("rx_arping", {}, -1, GET, oss); REQUIRE(oss.str() == "rx_arping 1\n"); } { std::ostringstream oss; - proxy.Call("rx_arping", {"0"}, -1, PUT, oss); + caller.call("rx_arping", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "rx_arping 0\n"); } for (int i = 0; i != det.size(); ++i) { @@ -464,13 +465,13 @@ TEST_CASE("rx_arping", "[.cmd][.rx]") { } } -TEST_CASE("rx_roi", "[.cmd]") { +TEST_CASE("rx_roi", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - - if (det_type == defs::CHIPTESTBOARD) { - REQUIRE_THROWS(proxy.Call("rx_roi", {"5", "10"}, -1, PUT)); + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { + REQUIRE_THROWS(caller.call("rx_roi", {"5", "10"}, -1, PUT)); } else { auto prev_val = det.getRxROI(); defs::xy detsize = det.getDetectorSize(); @@ -480,36 +481,36 @@ TEST_CASE("rx_roi", "[.cmd]") { det_type == defs::MYTHEN3) { { std::ostringstream oss; - proxy.Call("rx_roi", {"5", "10"}, -1, PUT, oss); + caller.call("rx_roi", {"5", "10"}, -1, PUT, oss); REQUIRE(oss.str() == "rx_roi [5, 10]\n"); } { std::ostringstream oss; - proxy.Call("rx_roi", {"10", "15"}, -1, PUT, oss); + caller.call("rx_roi", {"10", "15"}, -1, PUT, oss); REQUIRE(oss.str() == "rx_roi [10, 15]\n"); } - REQUIRE_THROWS(proxy.Call("rx_roi", {"-1", "-1"}, -1, PUT)); + REQUIRE_THROWS(caller.call("rx_roi", {"-1", "-1"}, -1, PUT)); REQUIRE_THROWS( - proxy.Call("rx_roi", {"10", "15", "25", "30"}, -1, PUT)); + caller.call("rx_roi", {"10", "15", "25", "30"}, -1, PUT)); } // 2d else { { std::ostringstream oss; - proxy.Call("rx_roi", {"10", "15", "1", "5"}, -1, PUT, oss); + caller.call("rx_roi", {"10", "15", "1", "5"}, -1, PUT, oss); REQUIRE(oss.str() == "rx_roi [10, 15, 1, 5]\n"); } { std::ostringstream oss; - proxy.Call("rx_roi", {"10", "22", "18", "19"}, -1, PUT, oss); + caller.call("rx_roi", {"10", "22", "18", "19"}, -1, PUT, oss); REQUIRE(oss.str() == "rx_roi [10, 22, 18, 19]\n"); } { std::ostringstream oss; - proxy.Call("rx_roi", - {"1", std::to_string(detsize.x - 5), "1", - std::to_string(detsize.y - 5)}, - -1, PUT, oss); + caller.call("rx_roi", + {"1", std::to_string(detsize.x - 5), "1", + std::to_string(detsize.y - 5)}, + -1, PUT, oss); REQUIRE(oss.str() == std::string("rx_roi [1, ") + std::to_string(detsize.x - 5) + std::string(", 1, ") + @@ -517,7 +518,7 @@ TEST_CASE("rx_roi", "[.cmd]") { std::string("]\n")); } REQUIRE_THROWS( - proxy.Call("rx_roi", {"-1", "-1", "-1", "-1"}, -1, PUT)); + caller.call("rx_roi", {"-1", "-1", "-1", "-1"}, -1, PUT)); } for (int i = 0; i != det.size(); ++i) { @@ -526,18 +527,18 @@ TEST_CASE("rx_roi", "[.cmd]") { } } -TEST_CASE("rx_clearroi", "[.cmd]") { +TEST_CASE("rx_clearroi", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - - if (det_type == defs::CHIPTESTBOARD) { - REQUIRE_THROWS(proxy.Call("rx_clearroi", {}, -1, PUT)); + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { + REQUIRE_THROWS(caller.call("rx_clearroi", {}, -1, PUT)); } else { auto prev_val = det.getRxROI(); { std::ostringstream oss; - proxy.Call("rx_clearroi", {}, -1, PUT, oss); + caller.call("rx_clearroi", {}, -1, PUT, oss); REQUIRE(oss.str() == "rx_clearroi successful\n"); } for (int i = 0; i != det.size(); ++i) { @@ -548,18 +549,18 @@ TEST_CASE("rx_clearroi", "[.cmd]") { /* File */ -TEST_CASE("fformat", "[.cmd]") { +TEST_CASE("fformat", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto prev_val = det.getFileFormat(); { std::ostringstream oss; - proxy.Call("fformat", {"binary"}, -1, PUT, oss); + caller.call("fformat", {"binary"}, -1, PUT, oss); REQUIRE(oss.str() == "fformat binary\n"); } { std::ostringstream oss; - proxy.Call("fformat", {}, -1, GET, oss); + caller.call("fformat", {}, -1, GET, oss); REQUIRE(oss.str() == "fformat binary\n"); } for (int i = 0; i != det.size(); ++i) { @@ -567,18 +568,18 @@ TEST_CASE("fformat", "[.cmd]") { } } -TEST_CASE("fpath", "[.cmd]") { +TEST_CASE("fpath", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto prev_val = det.getFilePath(); { std::ostringstream oss; - proxy.Call("fpath", {"/tmp"}, -1, PUT, oss); + caller.call("fpath", {"/tmp"}, -1, PUT, oss); REQUIRE(oss.str() == "fpath /tmp\n"); } { std::ostringstream oss; - proxy.Call("fpath", {}, -1, GET, oss); + caller.call("fpath", {}, -1, GET, oss); REQUIRE(oss.str() == "fpath /tmp\n"); } for (int i = 0; i != det.size(); ++i) { @@ -586,50 +587,50 @@ TEST_CASE("fpath", "[.cmd]") { } } -TEST_CASE("fname", "[.cmd]") { +TEST_CASE("fname", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto prev_val = det.getFileNamePrefix(); { std::ostringstream oss; - proxy.Call("fname", {"somename"}, -1, PUT, oss); + caller.call("fname", {"somename"}, -1, PUT, oss); REQUIRE(oss.str() == "fname somename\n"); } { std::ostringstream oss; - proxy.Call("fname", {}, -1, GET, oss); + caller.call("fname", {}, -1, GET, oss); REQUIRE(oss.str() == "fname somename\n"); } { std::ostringstream oss; - proxy.Call("fname", {"run"}, -1, PUT, oss); + caller.call("fname", {"run"}, -1, PUT, oss); REQUIRE(oss.str() == "fname run\n"); } - REQUIRE_THROWS(proxy.Call("fname", {"fdf/dfd"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("fname", {"fdf dfd"}, -1, PUT)); + REQUIRE_THROWS(caller.call("fname", {"fdf/dfd"}, -1, PUT)); + REQUIRE_THROWS(caller.call("fname", {"fdf dfd"}, -1, PUT)); for (int i = 0; i != det.size(); ++i) { det.setFileNamePrefix(prev_val[i], {i}); } } -TEST_CASE("findex", "[.cmd]") { +TEST_CASE("findex", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto prev_val = det.getAcquisitionIndex(); { std::ostringstream oss; - proxy.Call("findex", {"57"}, -1, PUT, oss); + caller.call("findex", {"57"}, -1, PUT, oss); REQUIRE(oss.str() == "findex 57\n"); } { std::ostringstream oss; - proxy.Call("findex", {}, -1, GET, oss); + caller.call("findex", {}, -1, GET, oss); REQUIRE(oss.str() == "findex 57\n"); } { std::ostringstream oss; - proxy.Call("findex", {"0"}, -1, PUT, oss); + caller.call("findex", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "findex 0\n"); } for (int i = 0; i != det.size(); ++i) { @@ -637,23 +638,23 @@ TEST_CASE("findex", "[.cmd]") { } } -TEST_CASE("fwrite", "[.cmd]") { +TEST_CASE("fwrite", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto prev_val = det.getFileWrite(); { std::ostringstream oss; - proxy.Call("fwrite", {"1"}, -1, PUT, oss); + caller.call("fwrite", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "fwrite 1\n"); } { std::ostringstream oss; - proxy.Call("fwrite", {}, -1, GET, oss); + caller.call("fwrite", {}, -1, GET, oss); REQUIRE(oss.str() == "fwrite 1\n"); } { std::ostringstream oss; - proxy.Call("fwrite", {"0"}, -1, PUT, oss); + caller.call("fwrite", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "fwrite 0\n"); } for (int i = 0; i != det.size(); ++i) { @@ -661,45 +662,45 @@ TEST_CASE("fwrite", "[.cmd]") { } } -TEST_CASE("fmaster", "[.cmd]") { +TEST_CASE("fmaster", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto prev_val = det.getMasterFileWrite(); { std::ostringstream oss; - proxy.Call("fmaster", {"0"}, -1, PUT, oss); + caller.call("fmaster", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "fmaster 0\n"); } { std::ostringstream oss; - proxy.Call("fmaster", {}, -1, GET, oss); + caller.call("fmaster", {}, -1, GET, oss); REQUIRE(oss.str() == "fmaster 0\n"); } { std::ostringstream oss; - proxy.Call("fmaster", {"1"}, -1, PUT, oss); + caller.call("fmaster", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "fmaster 1\n"); } det.setMasterFileWrite(prev_val); } -TEST_CASE("foverwrite", "[.cmd]") { +TEST_CASE("foverwrite", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto prev_val = det.getFileOverWrite(); { std::ostringstream oss; - proxy.Call("foverwrite", {"1"}, -1, PUT, oss); + caller.call("foverwrite", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "foverwrite 1\n"); } { std::ostringstream oss; - proxy.Call("foverwrite", {}, -1, GET, oss); + caller.call("foverwrite", {}, -1, GET, oss); REQUIRE(oss.str() == "foverwrite 1\n"); } { std::ostringstream oss; - proxy.Call("foverwrite", {"0"}, -1, PUT, oss); + caller.call("foverwrite", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "foverwrite 0\n"); } for (int i = 0; i != det.size(); ++i) { @@ -707,28 +708,28 @@ TEST_CASE("foverwrite", "[.cmd]") { } } -TEST_CASE("rx_framesperfile", "[.cmd][.rx]") { +TEST_CASE("rx_framesperfile", "[.cmdcall][.rx]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto prev_val = det.getFramesPerFile(); { std::ostringstream oss; - proxy.Call("rx_framesperfile", {"50"}, -1, PUT, oss); + caller.call("rx_framesperfile", {"50"}, -1, PUT, oss); REQUIRE(oss.str() == "rx_framesperfile 50\n"); } { std::ostringstream oss; - proxy.Call("rx_framesperfile", {}, -1, GET, oss); + caller.call("rx_framesperfile", {}, -1, GET, oss); REQUIRE(oss.str() == "rx_framesperfile 50\n"); } { std::ostringstream oss; - proxy.Call("rx_framesperfile", {"10000"}, -1, PUT, oss); + caller.call("rx_framesperfile", {"10000"}, -1, PUT, oss); REQUIRE(oss.str() == "rx_framesperfile 10000\n"); } { std::ostringstream oss; - proxy.Call("rx_framesperfile", {"0"}, -1, PUT, oss); + caller.call("rx_framesperfile", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "rx_framesperfile 0\n"); } for (int i = 0; i != det.size(); ++i) { @@ -738,24 +739,24 @@ TEST_CASE("rx_framesperfile", "[.cmd][.rx]") { /* ZMQ Streaming Parameters (Receiver<->Client) */ -TEST_CASE("rx_zmqstream", "[.cmd][.rx]") { +TEST_CASE("rx_zmqstream", "[.cmdcall][.rx]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto prev_val = det.getRxZmqDataStream(); { std::ostringstream oss; - proxy.Call("rx_zmqstream", {"1"}, -1, PUT, oss); + caller.call("rx_zmqstream", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "rx_zmqstream 1\n"); REQUIRE(det.getRxZmqDataStream().squash() == true); } { std::ostringstream oss; - proxy.Call("rx_zmqstream", {}, -1, GET, oss); + caller.call("rx_zmqstream", {}, -1, GET, oss); REQUIRE(oss.str() == "rx_zmqstream 1\n"); } { std::ostringstream oss; - proxy.Call("rx_zmqstream", {"0"}, -1, PUT, oss); + caller.call("rx_zmqstream", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "rx_zmqstream 0\n"); REQUIRE(det.getRxZmqDataStream().squash() == false); } @@ -764,23 +765,23 @@ TEST_CASE("rx_zmqstream", "[.cmd][.rx]") { } } -TEST_CASE("rx_zmqfreq", "[.cmd][.rx]") { +TEST_CASE("rx_zmqfreq", "[.cmdcall][.rx]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto prev_val = det.getRxZmqFrequency(); { std::ostringstream oss; - proxy.Call("rx_zmqfreq", {"1"}, -1, PUT, oss); + caller.call("rx_zmqfreq", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "rx_zmqfreq 1\n"); } { std::ostringstream oss; - proxy.Call("rx_zmqfreq", {}, -1, GET, oss); + caller.call("rx_zmqfreq", {}, -1, GET, oss); REQUIRE(oss.str() == "rx_zmqfreq 1\n"); } { std::ostringstream oss; - proxy.Call("rx_zmqfreq", {"0"}, -1, PUT, oss); + caller.call("rx_zmqfreq", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "rx_zmqfreq 0\n"); } for (int i = 0; i != det.size(); ++i) { @@ -788,23 +789,23 @@ TEST_CASE("rx_zmqfreq", "[.cmd][.rx]") { } } -TEST_CASE("rx_zmqstartfnum", "[.cmd][.rx]") { +TEST_CASE("rx_zmqstartfnum", "[.cmdcall][.rx]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto prev_val = det.getRxZmqStartingFrame(); { std::ostringstream oss; - proxy.Call("rx_zmqstartfnum", {"5"}, -1, PUT, oss); + caller.call("rx_zmqstartfnum", {"5"}, -1, PUT, oss); REQUIRE(oss.str() == "rx_zmqstartfnum 5\n"); } { std::ostringstream oss; - proxy.Call("rx_zmqstartfnum", {}, -1, GET, oss); + caller.call("rx_zmqstartfnum", {}, -1, GET, oss); REQUIRE(oss.str() == "rx_zmqstartfnum 5\n"); } { std::ostringstream oss; - proxy.Call("rx_zmqstartfnum", {"0"}, -1, PUT, oss); + caller.call("rx_zmqstartfnum", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "rx_zmqstartfnum 0\n"); } for (int i = 0; i != det.size(); ++i) { @@ -812,9 +813,9 @@ TEST_CASE("rx_zmqstartfnum", "[.cmd][.rx]") { } } -TEST_CASE("rx_zmqport", "[.cmd][.rx]") { +TEST_CASE("rx_zmqport", "[.cmdcall][.rx]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto prev_val_zmqport = det.getRxZmqPort(); auto prev_val_numinterfaces = det.getNumberofUDPInterfaces().tsquash( "inconsistent number of udp interfaces to test"); @@ -824,33 +825,32 @@ TEST_CASE("rx_zmqport", "[.cmd][.rx]") { if (det_type == defs::EIGER) { socketsperdetector *= 2; } else if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH) { - proxy.Call("numinterfaces", {"2"}, -1, PUT); + caller.call("numinterfaces", {"2"}, -1, PUT); socketsperdetector *= 2; } uint16_t port = 3500; - proxy.Call("rx_zmqport", {std::to_string(port)}, -1, PUT); + caller.call("rx_zmqport", {std::to_string(port)}, -1, PUT); for (int i = 0; i != det.size(); ++i) { std::ostringstream oss; - proxy.Call("rx_zmqport", {}, i, GET, oss); + caller.call("rx_zmqport", {}, i, GET, oss); REQUIRE(oss.str() == "rx_zmqport " + std::to_string(port + i * socketsperdetector) + '\n'); } port = 30001; - proxy.Call("rx_zmqport", {std::to_string(port)}, -1, PUT); + caller.call("rx_zmqport", {std::to_string(port)}, -1, PUT); for (int i = 0; i != det.size(); ++i) { std::ostringstream oss; - proxy.Call("rx_zmqport", {}, i, GET, oss); + caller.call("rx_zmqport", {}, i, GET, oss); REQUIRE(oss.str() == "rx_zmqport " + std::to_string(port + i * socketsperdetector) + '\n'); } - - test_valid_port("rx_zmqport", {}, -1, PUT); - test_valid_port("rx_zmqport", {}, 0, PUT); + test_valid_port_caller("rx_zmqport", {}, -1, PUT); + test_valid_port_caller("rx_zmqport", {}, 0, PUT); // should fail for the second module if (det.size() > 1) { - REQUIRE_THROWS(proxy.Call("rx_zmqport", {"65535"}, -1, PUT)); + REQUIRE_THROWS(caller.call("rx_zmqport", {"65535"}, -1, PUT)); } for (int i = 0; i != det.size(); ++i) { @@ -861,49 +861,29 @@ TEST_CASE("rx_zmqport", "[.cmd][.rx]") { } } -TEST_CASE("rx_zmqip", "[.cmd][.rx]") { +TEST_CASE("rx_zmqhwm", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); - auto prev_val = det.getRxZmqIP(); - { - std::ostringstream oss; - proxy.Call("rx_zmqip", {"127.0.0.1"}, 0, PUT, oss); - REQUIRE(oss.str() == "rx_zmqip 127.0.0.1\n"); - std::cout << "ZMQIP: " << det.getRxZmqIP() << '\n'; - } - { - std::ostringstream oss; - proxy.Call("rx_zmqip", {}, 0, GET, oss); - REQUIRE(oss.str() == "rx_zmqip 127.0.0.1\n"); - } - for (int i = 0; i != det.size(); ++i) { - det.setRxZmqIP(prev_val[i], {i}); - } -} - -TEST_CASE("rx_zmqhwm", "[.cmd]") { - Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto prev_val = det.getRxZmqHwm().tsquash("Inconsistent values for rx_zmqhwm to test"); { std::ostringstream oss; - proxy.Call("rx_zmqhwm", {"50"}, -1, PUT, oss); + caller.call("rx_zmqhwm", {"50"}, -1, PUT, oss); REQUIRE(oss.str() == "rx_zmqhwm 50\n"); } { std::ostringstream oss; - proxy.Call("rx_zmqhwm", {}, -1, GET, oss); + caller.call("rx_zmqhwm", {}, -1, GET, oss); REQUIRE(oss.str() == "rx_zmqhwm 50\n"); } { std::ostringstream oss; - proxy.Call("rx_zmqhwm", {"0"}, -1, PUT, oss); + caller.call("rx_zmqhwm", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "rx_zmqhwm 0\n"); } { std::ostringstream oss; - proxy.Call("rx_zmqhwm", {"-1"}, -1, PUT, oss); + caller.call("rx_zmqhwm", {"-1"}, -1, PUT, oss); REQUIRE(oss.str() == "rx_zmqhwm -1\n"); } det.setRxZmqHwm(prev_val); @@ -911,88 +891,90 @@ TEST_CASE("rx_zmqhwm", "[.cmd]") { /* CTB Specific */ -TEST_CASE("rx_dbitlist", "[.cmd][.rx]") { +TEST_CASE("rx_dbitlist", "[.cmdcall][.rx]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { auto prev_val = det.getRxDbitList(); { std::ostringstream oss; - proxy.Call("rx_dbitlist", - {"0", "4", "5", "8", "9", "10", "52", "63"}, -1, PUT, - oss); + caller.call("rx_dbitlist", + {"0", "4", "5", "8", "9", "10", "52", "63"}, -1, PUT, + oss); REQUIRE(oss.str() == "rx_dbitlist [0, 4, 5, 8, 9, 10, 52, 63]\n"); } { std::ostringstream oss; - proxy.Call("rx_dbitlist", {}, -1, GET, oss); + caller.call("rx_dbitlist", {}, -1, GET, oss); REQUIRE(oss.str() == "rx_dbitlist [0, 4, 5, 8, 9, 10, 52, 63]\n"); } - REQUIRE_THROWS(proxy.Call("rx_dbitlist", {"67"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("rx_dbitlist", {"-1"}, -1, PUT)); - REQUIRE_NOTHROW(proxy.Call("rx_dbitlist", {"all"}, -1, PUT)); + REQUIRE_THROWS(caller.call("rx_dbitlist", {"67"}, -1, PUT)); + REQUIRE_THROWS(caller.call("rx_dbitlist", {"-1"}, -1, PUT)); + REQUIRE_NOTHROW(caller.call("rx_dbitlist", {"all"}, -1, PUT)); for (int i = 0; i != det.size(); ++i) { det.setRxDbitList(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("rx_dbitlist", {}, -1, GET)); + REQUIRE_THROWS(caller.call("rx_dbitlist", {}, -1, GET)); } } -TEST_CASE("rx_dbitoffset", "[.cmd][.rx]") { +TEST_CASE("rx_dbitoffset", "[.cmdcall][.rx]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD) { + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { auto prev_val = det.getRxDbitOffset(); { std::ostringstream oss; - proxy.Call("rx_dbitoffset", {"1"}, -1, PUT, oss); + caller.call("rx_dbitoffset", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "rx_dbitoffset 1\n"); } { std::ostringstream oss; - proxy.Call("rx_dbitoffset", {"0"}, -1, PUT, oss); + caller.call("rx_dbitoffset", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "rx_dbitoffset 0\n"); } { std::ostringstream oss; - proxy.Call("rx_dbitoffset", {"15"}, -1, PUT, oss); + caller.call("rx_dbitoffset", {"15"}, -1, PUT, oss); REQUIRE(oss.str() == "rx_dbitoffset 15\n"); } { std::ostringstream oss; - proxy.Call("rx_dbitoffset", {}, -1, GET, oss); + caller.call("rx_dbitoffset", {}, -1, GET, oss); REQUIRE(oss.str() == "rx_dbitoffset 15\n"); } for (int i = 0; i != det.size(); ++i) { det.setRxDbitOffset(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("rx_dbitoffset", {}, -1, GET)); + REQUIRE_THROWS(caller.call("rx_dbitoffset", {}, -1, GET)); } } -TEST_CASE("rx_jsonaddheader", "[.cmd][.rx]") { +TEST_CASE("rx_jsonaddheader", "[.cmdcall][.rx]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto prev_val = det.getAdditionalJsonHeader(); { std::ostringstream oss; - proxy.Call("rx_jsonaddheader", {"key1", "value1", "key2", "value2"}, -1, - PUT, oss); + caller.call("rx_jsonaddheader", {"key1", "value1", "key2", "value2"}, + -1, PUT, oss); REQUIRE(oss.str() == "rx_jsonaddheader {key1: value1, key2: value2}\n"); } { std::ostringstream oss; - proxy.Call("rx_jsonaddheader", {}, -1, GET, oss); + caller.call("rx_jsonaddheader", {}, -1, GET, oss); REQUIRE(oss.str() == "rx_jsonaddheader {key1: value1, key2: value2}\n"); } { std::ostringstream oss; - proxy.Call("rx_jsonaddheader", {}, -1, PUT, oss); + caller.call("rx_jsonaddheader", {}, -1, PUT, oss); REQUIRE(oss.str() == "rx_jsonaddheader {}\n"); } for (int i = 0; i != det.size(); ++i) { @@ -1000,31 +982,31 @@ TEST_CASE("rx_jsonaddheader", "[.cmd][.rx]") { } } -TEST_CASE("rx_jsonpara", "[.cmd][.rx]") { +TEST_CASE("rx_jsonpara", "[.cmdcall][.rx]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto prev_val = det.getAdditionalJsonHeader(); { std::ostringstream oss; - proxy.Call("rx_jsonpara", {"key1", "value1"}, -1, PUT, oss); + caller.call("rx_jsonpara", {"key1", "value1"}, -1, PUT, oss); REQUIRE(oss.str() == "rx_jsonpara {key1: value1}\n"); } { std::ostringstream oss; - proxy.Call("rx_jsonpara", {"key1", "value2"}, -1, PUT, oss); + caller.call("rx_jsonpara", {"key1", "value2"}, -1, PUT, oss); REQUIRE(oss.str() == "rx_jsonpara {key1: value2}\n"); } { std::ostringstream oss; - proxy.Call("rx_jsonpara", {"key1"}, -1, GET, oss); + caller.call("rx_jsonpara", {"key1"}, -1, GET, oss); REQUIRE(oss.str() == "rx_jsonpara value2\n"); } { std::ostringstream oss; - proxy.Call("rx_jsonpara", {"key1"}, -1, PUT, oss); + caller.call("rx_jsonpara", {"key1"}, -1, PUT, oss); REQUIRE(oss.str() == "rx_jsonpara key1 deleted\n"); } - REQUIRE_THROWS(proxy.Call("rx_jsonpara", {"key1"}, -1, GET)); + REQUIRE_THROWS(caller.call("rx_jsonpara", {"key1"}, -1, GET)); for (int i = 0; i != det.size(); ++i) { det.setAdditionalJsonHeader(prev_val[i], {i}); } diff --git a/slsDetectorSoftware/tests/Caller/test-Caller-xilinx-chiptestboard.cpp b/slsDetectorSoftware/tests/Caller/test-Caller-xilinx-chiptestboard.cpp new file mode 100644 index 000000000..6133962f4 --- /dev/null +++ b/slsDetectorSoftware/tests/Caller/test-Caller-xilinx-chiptestboard.cpp @@ -0,0 +1,35 @@ +// 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 + +#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("configtransceiver", "[.cmdcall]") { + Detector det; + Caller caller(&det); + auto det_type = det.getDetectorType().squash(); + + if (det_type == defs::XILINX_CHIPTESTBOARD) { + REQUIRE_THROWS(caller.call("configtransceiver", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("configtransceiver", {}, -1, PUT)); + } else { + REQUIRE_THROWS(caller.call("configtransceiver", {}, -1, PUT)); + REQUIRE_THROWS(caller.call("configtransceiver", {}, -1, GET)); + } +} +} // namespace sls diff --git a/slsDetectorSoftware/tests/test-CmdProxy.cpp b/slsDetectorSoftware/tests/Caller/test-Caller.cpp similarity index 57% rename from slsDetectorSoftware/tests/test-CmdProxy.cpp rename to slsDetectorSoftware/tests/Caller/test-Caller.cpp index 5044e50e6..2ef8699f6 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy.cpp +++ b/slsDetectorSoftware/tests/Caller/test-Caller.cpp @@ -1,11 +1,11 @@ // SPDX-License-Identifier: LGPL-3.0-or-other // Copyright (C) 2021 Contributors to the SLS Detector Package -#include "CmdProxy.h" +#include "Caller.h" #include "catch.hpp" #include "sls/Detector.h" #include "sls/file_utils.h" #include "sls/sls_detector_defs.h" -#include "test-CmdProxy-global.h" +#include "test-Caller-global.h" #include #include @@ -19,51 +19,50 @@ using test::GET; using test::PUT; TEST_CASE("Calling help doesn't throw or cause segfault") { - // Dont add [.cmd] tag this should run with normal tests - CmdProxy proxy(nullptr); - auto commands = proxy.GetProxyCommands(); + // Dont add [.cmdcall] tag this should run with normal tests + Caller caller(nullptr); std::ostringstream os; - for (const auto &cmd : commands) + for (std::string cmd : caller.getAllCommands()) REQUIRE_NOTHROW( - proxy.Call(cmd, {}, -1, slsDetectorDefs::HELP_ACTION, os)); + caller.call(cmd, {}, -1, slsDetectorDefs::HELP_ACTION, os)); } -TEST_CASE("Unknown command", "[.cmd]") { +TEST_CASE("Unknown command", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); - REQUIRE_THROWS(proxy.Call("vsaevrreavv", {}, -1, PUT)); + Caller caller(&det); + REQUIRE_THROWS(caller.call("vsaevrreavv", {}, -1, PUT)); } /* configuration */ -TEST_CASE("config", "[.cmd]") { +TEST_CASE("config", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); // put only - REQUIRE_THROWS(proxy.Call("config", {}, -1, GET)); + REQUIRE_THROWS(caller.call("config", {}, -1, GET)); } // free: not testing -TEST_CASE("parameters", "[.cmd]") { +TEST_CASE("parameters", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); // put only - REQUIRE_THROWS(proxy.Call("parameters", {}, -1, GET)); + REQUIRE_THROWS(caller.call("parameters", {}, -1, GET)); /* auto prev_val = det.getNumberOfFrames().tsquash("Number of frames has to be same to test"); { system("echo 'frames 2' > /tmp/tempsetup.det "); std::ostringstream oss; - proxy.Call("parameters", {"/tmp/tempsetup.det"}, -1, PUT, oss); + caller.call("parameters", {"/tmp/tempsetup.det"}, -1, PUT, oss); REQUIRE(oss.str() == "parameters /tmp/tempsetup.det\n"); REQUIRE(det.getNumberOfFrames().tsquash("failed") == 2); } { system("echo '0:frames 1' > /tmp/tempsetup.det "); std::ostringstream oss; - proxy.Call("parameters", {"/tmp/tempsetup.det"}, -1, PUT, oss); + caller.call("parameters", {"/tmp/tempsetup.det"}, -1, PUT, oss); REQUIRE(oss.str() == "parameters /tmp/tempsetup.det\n"); REQUIRE(det.getNumberOfFrames({0}).tsquash("failed") == 1); } @@ -71,126 +70,127 @@ TEST_CASE("parameters", "[.cmd]") { */ } -TEST_CASE("hostname", "[.cmd]") { +TEST_CASE("hostname", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); - REQUIRE_NOTHROW(proxy.Call("hostname", {}, -1, GET)); + Caller caller(&det); + REQUIRE_NOTHROW(caller.call("hostname", {}, -1, GET)); } -TEST_CASE("virtual", "[.cmd]") { +TEST_CASE("virtual", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); - REQUIRE_THROWS(proxy.Call("virtual", {}, -1, GET)); - test_valid_port("virtual", {"1"}, -1, PUT); - REQUIRE_THROWS(proxy.Call("virtual", {"3", "65534"}, -1, PUT)); + Caller caller(&det); + REQUIRE_THROWS(caller.call("virtual", {}, -1, GET)); + test_valid_port_caller("virtual", {"1"}, -1, PUT); + REQUIRE_THROWS(caller.call("virtual", {"3", "65534"}, -1, PUT)); } -TEST_CASE("versions", "[.cmd]") { +TEST_CASE("versions", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); - REQUIRE_NOTHROW(proxy.Call("versions", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("versions", {"0"}, -1, PUT)); + Caller caller(&det); + REQUIRE_NOTHROW(caller.call("versions", {}, -1, GET)); + REQUIRE_THROWS(caller.call("versions", {"0"}, -1, PUT)); } -TEST_CASE("packageversion", "[.cmd]") { +TEST_CASE("packageversion", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); - REQUIRE_NOTHROW(proxy.Call("packageversion", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("packageversion", {"0"}, -1, PUT)); + Caller caller(&det); + REQUIRE_NOTHROW(caller.call("packageversion", {}, -1, GET)); + REQUIRE_THROWS(caller.call("packageversion", {"0"}, -1, PUT)); } -TEST_CASE("clientversion", "[.cmd]") { +TEST_CASE("clientversion", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); - REQUIRE_NOTHROW(proxy.Call("clientversion", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("clientversion", {"0"}, -1, PUT)); + Caller caller(&det); + REQUIRE_NOTHROW(caller.call("clientversion", {}, -1, GET)); + REQUIRE_THROWS(caller.call("clientversion", {"0"}, -1, PUT)); } -TEST_CASE("firmwareversion", "[.cmd]") { +TEST_CASE("firmwareversion", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); - REQUIRE_NOTHROW(proxy.Call("firmwareversion", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("firmwareversion", {"0"}, -1, PUT)); + Caller caller(&det); + REQUIRE_NOTHROW(caller.call("firmwareversion", {}, -1, GET)); + REQUIRE_THROWS(caller.call("firmwareversion", {"0"}, -1, PUT)); } -TEST_CASE("detectorserverversion", "[.cmd]") { +TEST_CASE("detectorserverversion", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); - REQUIRE_NOTHROW(proxy.Call("detectorserverversion", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("detectorserverversion", {"0"}, -1, PUT)); + Caller caller(&det); + REQUIRE_NOTHROW(caller.call("detectorserverversion", {}, -1, GET)); + REQUIRE_THROWS(caller.call("detectorserverversion", {"0"}, -1, PUT)); } -TEST_CASE("hardwareversion", "[.cmd]") { +TEST_CASE("hardwareversion", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); - REQUIRE_NOTHROW(proxy.Call("hardwareversion", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("hardwareversion", {"0"}, -1, PUT)); + Caller caller(&det); + REQUIRE_NOTHROW(caller.call("hardwareversion", {}, -1, GET)); + REQUIRE_THROWS(caller.call("hardwareversion", {"0"}, -1, PUT)); } -TEST_CASE("kernelversion", "[.cmd]") { +TEST_CASE("kernelversion", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); - REQUIRE_NOTHROW(proxy.Call("kernelversion", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("kernelversion", {"0"}, -1, PUT)); + Caller caller(&det); + REQUIRE_NOTHROW(caller.call("kernelversion", {}, -1, GET)); + REQUIRE_THROWS(caller.call("kernelversion", {"0"}, -1, PUT)); } -TEST_CASE("serialnumber", "[.cmd]") { +TEST_CASE("serialnumber", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::EIGER) { - REQUIRE_THROWS(proxy.Call("serialnumber", {}, -1, GET)); + if (det_type == defs::EIGER || det_type == defs::XILINX_CHIPTESTBOARD) { + REQUIRE_THROWS(caller.call("serialnumber", {}, -1, GET)); } else { - REQUIRE_NOTHROW(proxy.Call("serialnumber", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("serialnumber", {}, -1, GET)); } } -TEST_CASE("moduleid", "[.cmd]") { +TEST_CASE("moduleid", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::GOTTHARD2 || det_type == defs::MYTHEN3 || det_type == defs::EIGER || det_type == defs::JUNGFRAU || det_type == defs::MOENCH) { - REQUIRE_NOTHROW(proxy.Call("moduleid", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("moduleid", {}, -1, GET)); } else { - REQUIRE_THROWS(proxy.Call("moduleid", {}, -1, GET)); + REQUIRE_THROWS(caller.call("moduleid", {}, -1, GET)); } } -TEST_CASE("type", "[.cmd]") { +TEST_CASE("type", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto dt = det.getDetectorType().squash(); std::ostringstream oss; - proxy.Call("type", {}, -1, GET, oss); + caller.call("type", {}, -1, GET, oss); auto ans = oss.str().erase(0, strlen("type ")); REQUIRE(ans == ToString(dt) + '\n'); // REQUIRE(dt == test::type); } -TEST_CASE("detsize", "[.cmd]") { +TEST_CASE("detsize", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); - REQUIRE_NOTHROW(proxy.Call("detsize", {}, -1, GET)); + Caller caller(&det); + REQUIRE_NOTHROW(caller.call("detsize", {}, -1, GET)); } -TEST_CASE("settingslist", "[.cmd]") { +TEST_CASE("settingslist", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD) { - REQUIRE_THROWS(proxy.Call("settingslist", {}, -1, GET)); + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { + REQUIRE_THROWS(caller.call("settingslist", {}, -1, GET)); } else { - REQUIRE_NOTHROW(proxy.Call("settingslist", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("settingslist", {}, -1, PUT)); + REQUIRE_NOTHROW(caller.call("settingslist", {}, -1, GET)); + REQUIRE_THROWS(caller.call("settingslist", {}, -1, PUT)); } } -TEST_CASE("settings", "[.cmd]") { +TEST_CASE("settings", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); std::vector allSett; allSett.push_back("standard"); @@ -252,10 +252,10 @@ TEST_CASE("settings", "[.cmd]") { default: if (det_type == defs::EIGER) { // FIXME: need to remove when settings removed - REQUIRE_NOTHROW(proxy.Call("settings", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("settings", {"standard"}, -1, PUT)); + REQUIRE_NOTHROW(caller.call("settings", {}, -1, GET)); + REQUIRE_THROWS(caller.call("settings", {"standard"}, -1, PUT)); } else { - REQUIRE_THROWS(proxy.Call("settings", {}, -1, GET)); + REQUIRE_THROWS(caller.call("settings", {}, -1, GET)); } return; } @@ -264,18 +264,18 @@ TEST_CASE("settings", "[.cmd]") { for (auto &it : sett) { { std::ostringstream oss; - proxy.Call("settings", {it}, -1, PUT, oss); + caller.call("settings", {it}, -1, PUT, oss); REQUIRE(oss.str() == "settings " + it + "\n"); } { std::ostringstream oss; - proxy.Call("settings", {}, -1, GET, oss); + caller.call("settings", {}, -1, GET, oss); REQUIRE(oss.str() == "settings " + it + "\n"); } } for (auto &it : allSett) { if (std::find(sett.begin(), sett.end(), it) == sett.end()) { - REQUIRE_THROWS(proxy.Call("settings", {it}, -1, PUT)); + REQUIRE_THROWS(caller.call("settings", {it}, -1, PUT)); } } for (int i = 0; i != det.size(); ++i) { @@ -286,9 +286,9 @@ TEST_CASE("settings", "[.cmd]") { } } -TEST_CASE("threshold", "[.cmd]") { +TEST_CASE("threshold", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER) { @@ -298,15 +298,15 @@ TEST_CASE("threshold", "[.cmd]") { if (!prev_energies.empty()) { std::string senergy = std::to_string(prev_energies[0]); std::ostringstream oss1, oss2; - proxy.Call("threshold", {senergy, "standard"}, -1, PUT, oss1); + caller.call("threshold", {senergy, "standard"}, -1, PUT, oss1); REQUIRE(oss1.str() == "threshold [" + senergy + ", standard]\n"); - proxy.Call("threshold", {}, -1, GET, oss2); + caller.call("threshold", {}, -1, GET, oss2); REQUIRE(oss2.str() == "threshold " + senergy + "\n"); - REQUIRE_THROWS(proxy.Call( + REQUIRE_THROWS(caller.call( "threshold", {senergy, senergy, senergy, "standard"}, -1, PUT)); REQUIRE_THROWS( - proxy.Call("threshold", {senergy, "undefined"}, -1, PUT)); + caller.call("threshold", {senergy, "undefined"}, -1, PUT)); det.setTrimEnergies(prev_energies); for (int i = 0; i != det.size(); ++i) { @@ -316,7 +316,7 @@ TEST_CASE("threshold", "[.cmd]") { } } } - REQUIRE_NOTHROW(proxy.Call("threshold", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("threshold", {}, -1, GET)); } else if (det_type == defs::MYTHEN3) { auto prev_threshold = det.getAllThresholdEnergy(); auto prev_settings = @@ -326,29 +326,29 @@ TEST_CASE("threshold", "[.cmd]") { if (!prev_energies.empty()) { std::string senergy = std::to_string(prev_energies[0]); std::ostringstream oss1, oss2; - proxy.Call("threshold", {senergy, "standard"}, -1, PUT, oss1); + caller.call("threshold", {senergy, "standard"}, -1, PUT, oss1); REQUIRE(oss1.str() == "threshold [" + senergy + ", standard]\n"); - proxy.Call("threshold", {}, -1, GET, oss2); + caller.call("threshold", {}, -1, GET, oss2); REQUIRE(oss2.str() == "threshold [" + senergy + ", " + senergy + ", " + senergy + "]\n"); std::string senergy2 = std::to_string(prev_energies[1]); std::string senergy3 = std::to_string(prev_energies[2]); std::ostringstream oss3, oss4; - proxy.Call("threshold", {senergy, senergy2, senergy3, "standard"}, - -1, PUT, oss3); + caller.call("threshold", {senergy, senergy2, senergy3, "standard"}, + -1, PUT, oss3); REQUIRE(oss3.str() == "threshold [" + senergy + ", " + senergy2 + ", " + senergy3 + ", standard]\n"); - proxy.Call("threshold", {}, -1, GET, oss4); + caller.call("threshold", {}, -1, GET, oss4); REQUIRE(oss4.str() == "threshold [" + senergy + ", " + senergy2 + ", " + senergy3 + "]\n"); - REQUIRE_THROWS(proxy.Call("threshold", - {senergy, senergy, "standard"}, -1, PUT)); + REQUIRE_THROWS(caller.call( + "threshold", {senergy, senergy, "standard"}, -1, PUT)); REQUIRE_THROWS( - proxy.Call("threshold", {senergy, "undefined"}, -1, PUT)); - REQUIRE_NOTHROW(proxy.Call("threshold", {senergy}, -1, PUT)); - REQUIRE_NOTHROW(proxy.Call("threshold", - {senergy, senergy2, senergy3}, -1, PUT)); + caller.call("threshold", {senergy, "undefined"}, -1, PUT)); + REQUIRE_NOTHROW(caller.call("threshold", {senergy}, -1, PUT)); + REQUIRE_NOTHROW(caller.call( + "threshold", {senergy, senergy2, senergy3}, -1, PUT)); det.setTrimEnergies(prev_energies); for (int i = 0; i != det.size(); ++i) { if (prev_threshold[i][0] >= 0) { @@ -359,15 +359,15 @@ TEST_CASE("threshold", "[.cmd]") { } } } - REQUIRE_NOTHROW(proxy.Call("threshold", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("threshold", {}, -1, GET)); } else { - REQUIRE_THROWS(proxy.Call("threshold", {}, -1, GET)); + REQUIRE_THROWS(caller.call("threshold", {}, -1, GET)); } } -TEST_CASE("thresholdnotb", "[.cmd]") { +TEST_CASE("thresholdnotb", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER) { @@ -377,16 +377,16 @@ TEST_CASE("thresholdnotb", "[.cmd]") { if (!prev_energies.empty()) { std::string senergy = std::to_string(prev_energies[0]); std::ostringstream oss1, oss2; - proxy.Call("thresholdnotb", {senergy, "standard"}, -1, PUT, oss1); + caller.call("thresholdnotb", {senergy, "standard"}, -1, PUT, oss1); REQUIRE(oss1.str() == "thresholdnotb [" + senergy + ", standard]\n"); - proxy.Call("threshold", {}, -1, GET, oss2); + caller.call("threshold", {}, -1, GET, oss2); REQUIRE(oss2.str() == "threshold " + senergy + "\n"); - REQUIRE_THROWS(proxy.Call("thresholdnotb", - {senergy, senergy, senergy, "standard"}, - -1, PUT)); + REQUIRE_THROWS(caller.call("thresholdnotb", + {senergy, senergy, senergy, "standard"}, + -1, PUT)); REQUIRE_THROWS( - proxy.Call("thresholdnotb", {senergy, "undefined"}, -1, PUT)); + caller.call("thresholdnotb", {senergy, "undefined"}, -1, PUT)); det.setTrimEnergies(prev_energies); for (int i = 0; i != det.size(); ++i) { if (prev_threshold[i] >= 0) { @@ -395,7 +395,7 @@ TEST_CASE("thresholdnotb", "[.cmd]") { } } } - REQUIRE_NOTHROW(proxy.Call("threshold", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("threshold", {}, -1, GET)); } else if (det_type == defs::MYTHEN3) { auto prev_threshold = det.getAllThresholdEnergy(); auto prev_settings = @@ -405,32 +405,32 @@ TEST_CASE("thresholdnotb", "[.cmd]") { if (!prev_energies.empty()) { std::string senergy = std::to_string(prev_energies[0]); std::ostringstream oss1, oss2; - proxy.Call("thresholdnotb", {senergy, "standard"}, -1, PUT, oss1); + caller.call("thresholdnotb", {senergy, "standard"}, -1, PUT, oss1); REQUIRE(oss1.str() == "thresholdnotb [" + senergy + ", standard]\n"); - proxy.Call("threshold", {}, -1, GET, oss2); + caller.call("threshold", {}, -1, GET, oss2); REQUIRE(oss2.str() == "threshold [" + senergy + ", " + senergy + ", " + senergy + "]\n"); std::string senergy2 = std::to_string(prev_energies[1]); std::string senergy3 = std::to_string(prev_energies[2]); std::ostringstream oss3, oss4; - proxy.Call("thresholdnotb", - {senergy, senergy2, senergy3, "standard"}, -1, PUT, - oss3); + caller.call("thresholdnotb", + {senergy, senergy2, senergy3, "standard"}, -1, PUT, + oss3); REQUIRE(oss3.str() == "thresholdnotb [" + senergy + ", " + senergy2 + ", " + senergy3 + ", standard]\n"); - proxy.Call("threshold", {}, -1, GET, oss4); + caller.call("threshold", {}, -1, GET, oss4); REQUIRE(oss4.str() == "threshold [" + senergy + ", " + senergy2 + ", " + senergy3 + "]\n"); - REQUIRE_THROWS(proxy.Call("thresholdnotb", - {senergy, senergy, "standard"}, -1, PUT)); + REQUIRE_THROWS(caller.call( + "thresholdnotb", {senergy, senergy, "standard"}, -1, PUT)); REQUIRE_THROWS( - proxy.Call("thresholdnotb", {senergy, "undefined"}, -1, PUT)); - REQUIRE_NOTHROW(proxy.Call("thresholdnotb", {senergy}, -1, PUT)); - REQUIRE_NOTHROW(proxy.Call("thresholdnotb", - {senergy, senergy2, senergy3}, -1, PUT)); + caller.call("thresholdnotb", {senergy, "undefined"}, -1, PUT)); + REQUIRE_NOTHROW(caller.call("thresholdnotb", {senergy}, -1, PUT)); + REQUIRE_NOTHROW(caller.call( + "thresholdnotb", {senergy, senergy2, senergy3}, -1, PUT)); det.setTrimEnergies(prev_energies); for (int i = 0; i != det.size(); ++i) { if (prev_threshold[i][0] >= 0) { @@ -439,21 +439,21 @@ TEST_CASE("thresholdnotb", "[.cmd]") { } } } - REQUIRE_NOTHROW(proxy.Call("threshold", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("threshold", {}, -1, GET)); } else { - REQUIRE_THROWS(proxy.Call("thresholdnotb", {}, -1, GET)); + REQUIRE_THROWS(caller.call("thresholdnotb", {}, -1, GET)); } } -TEST_CASE("settingspath", "[.cmd]") { +TEST_CASE("settingspath", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto prev_val = det.getSettingsPath(); { std::ostringstream oss1, oss2; - proxy.Call("settingspath", {"/tmp"}, -1, PUT, oss1); + caller.call("settingspath", {"/tmp"}, -1, PUT, oss1); REQUIRE(oss1.str() == "settingspath /tmp\n"); - proxy.Call("settingspath", {}, -1, GET, oss2); + caller.call("settingspath", {}, -1, GET, oss2); REQUIRE(oss2.str() == "settingspath /tmp\n"); } for (int i = 0; i != det.size(); ++i) { @@ -461,70 +461,71 @@ TEST_CASE("settingspath", "[.cmd]") { } } -TEST_CASE("trimbits", "[.cmd]") { +TEST_CASE("trimbits", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); - REQUIRE_THROWS(proxy.Call("trimbits", {}, -1, GET)); + Caller caller(&det); + REQUIRE_THROWS(caller.call("trimbits", {}, -1, GET)); } -TEST_CASE("trimval", "[.cmd]") { +TEST_CASE("trimval", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::MYTHEN3 || det_type == defs::EIGER) { auto prev_val = det.getAllTrimbits(); { std::ostringstream oss; - proxy.Call("trimval", {"63"}, -1, PUT, oss); + caller.call("trimval", {"63"}, -1, PUT, oss); REQUIRE(oss.str() == "trimval 63\n"); } { std::ostringstream oss; - proxy.Call("trimval", {"0"}, -1, PUT, oss); + caller.call("trimval", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "trimval 0\n"); } { std::ostringstream oss; - proxy.Call("trimval", {}, -1, GET, oss); + caller.call("trimval", {}, -1, GET, oss); REQUIRE(oss.str() == "trimval 0\n"); } - REQUIRE_THROWS(proxy.Call("trimval", {"64"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("trimval", {"-2"}, -1, PUT)); + REQUIRE_THROWS(caller.call("trimval", {"64"}, -1, PUT)); + REQUIRE_THROWS(caller.call("trimval", {"-2"}, -1, PUT)); for (int i = 0; i != det.size(); ++i) { if (prev_val[i] != -1) { det.setAllTrimbits(prev_val[i], {i}); } } } else { - REQUIRE_THROWS(proxy.Call("trimval", {}, -1, GET)); + REQUIRE_THROWS(caller.call("trimval", {}, -1, GET)); } } -TEST_CASE("trimen", "[.cmd][.this]") { +TEST_CASE("trimen", "[.cmdcall][.this]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER || det_type == defs::MYTHEN3) { auto previous = det.getTrimEnergies(); std::ostringstream oss1, oss2; - proxy.Call("trimen", {"4500", "5400", "6400"}, -1, PUT, oss1); + caller.call("trimen", {"4500", "5400", "6400"}, -1, PUT, oss1); REQUIRE(oss1.str() == "trimen [4500, 5400, 6400]\n"); - proxy.Call("trimen", {}, -1, GET, oss2); + caller.call("trimen", {}, -1, GET, oss2); REQUIRE(oss2.str() == "trimen [4500, 5400, 6400]\n"); for (int i = 0; i != det.size(); ++i) { det.setTrimEnergies(previous[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("trimen", {"4500", "5400", "6400"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("trimen", {}, -1, GET)); + REQUIRE_THROWS( + caller.call("trimen", {"4500", "5400", "6400"}, -1, PUT)); + REQUIRE_THROWS(caller.call("trimen", {}, -1, GET)); } } -TEST_CASE("gappixels", "[.cmd]") { +TEST_CASE("gappixels", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); // test eiger(quad or full module only) @@ -543,38 +544,38 @@ TEST_CASE("gappixels", "[.cmd]") { auto prev_val = det.getGapPixelsinCallback(); { std::ostringstream oss; - proxy.Call("gappixels", {"1"}, -1, PUT, oss); + caller.call("gappixels", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "gappixels 1\n"); } { std::ostringstream oss; - proxy.Call("gappixels", {"0"}, -1, PUT, oss); + caller.call("gappixels", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "gappixels 0\n"); } { std::ostringstream oss; - proxy.Call("gappixels", {}, -1, GET, oss); + caller.call("gappixels", {}, -1, GET, oss); REQUIRE(oss.str() == "gappixels 0\n"); } det.setGapPixelsinCallback(prev_val); } else { { std::ostringstream oss; - proxy.Call("gappixels", {}, -1, GET, oss); + caller.call("gappixels", {}, -1, GET, oss); REQUIRE(oss.str() == "gappixels 0\n"); } { std::ostringstream oss; - proxy.Call("gappixels", {"0"}, -1, PUT, oss); + caller.call("gappixels", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "gappixels 0\n"); } - REQUIRE_THROWS(proxy.Call("gappixels", {"1"}, -1, PUT)); + REQUIRE_THROWS(caller.call("gappixels", {"1"}, -1, PUT)); } } -TEST_CASE("fliprows", "[.cmd]") { +TEST_CASE("fliprows", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); bool hw2 = false; if ((det_type == defs::JUNGFRAU || det_type == defs::MOENCH) && @@ -590,11 +591,11 @@ TEST_CASE("fliprows", "[.cmd]") { det.setNumberofUDPInterfaces(2); } std::ostringstream oss1, oss2, oss3; - proxy.Call("fliprows", {"1"}, -1, PUT, oss1); + caller.call("fliprows", {"1"}, -1, PUT, oss1); REQUIRE(oss1.str() == "fliprows 1\n"); - proxy.Call("fliprows", {}, -1, GET, oss2); + caller.call("fliprows", {}, -1, GET, oss2); REQUIRE(oss2.str() == "fliprows 1\n"); - proxy.Call("fliprows", {"0"}, -1, PUT, oss3); + caller.call("fliprows", {"0"}, -1, PUT, oss3); REQUIRE(oss3.str() == "fliprows 0\n"); for (int i = 0; i != det.size(); ++i) { det.setFlipRows(previous[i], {i}); @@ -603,18 +604,18 @@ TEST_CASE("fliprows", "[.cmd]") { det.setNumberofUDPInterfaces(previous_numudp); } } else { - REQUIRE_THROWS(proxy.Call("fliprows", {}, -1, GET)); + REQUIRE_THROWS(caller.call("fliprows", {}, -1, GET)); } } -TEST_CASE("master", "[.cmd]") { +TEST_CASE("master", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER || det_type == defs::MYTHEN3 || det_type == defs::GOTTHARD || det_type == defs::GOTTHARD2 || det_type == defs::JUNGFRAU || det_type == defs::MOENCH) { - REQUIRE_NOTHROW(proxy.Call("master", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("master", {}, -1, GET)); if (det_type == defs::EIGER || det_type == defs::GOTTHARD2 || det_type == defs::JUNGFRAU || det_type == defs::MOENCH) { // get previous master @@ -630,16 +631,16 @@ TEST_CASE("master", "[.cmd]") { } { std::ostringstream oss1; - proxy.Call("master", {"0"}, 0, PUT, oss1); + caller.call("master", {"0"}, 0, PUT, oss1); REQUIRE(oss1.str() == "master 0\n"); } { std::ostringstream oss1; - proxy.Call("master", {"1"}, 0, PUT, oss1); + caller.call("master", {"1"}, 0, PUT, oss1); REQUIRE(oss1.str() == "master 1\n"); } if (det.size() > 1) { - REQUIRE_THROWS(proxy.Call("master", {"1"}, -1, PUT)); + REQUIRE_THROWS(caller.call("master", {"1"}, -1, PUT)); } // set all to slaves, and then master for (int i = 0; i != det.size(); ++i) { @@ -648,69 +649,69 @@ TEST_CASE("master", "[.cmd]") { det.setMaster(1, prevMaster); } } else { - REQUIRE_THROWS(proxy.Call("master", {}, -1, GET)); + REQUIRE_THROWS(caller.call("master", {}, -1, GET)); } } -TEST_CASE("badchannels", "[.cmd]") { +TEST_CASE("badchannels", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::GOTTHARD2 || det_type == defs::MYTHEN3) { auto prev = det.getBadChannels(); - REQUIRE_THROWS(proxy.Call("badchannels", {}, -1, GET)); + REQUIRE_THROWS(caller.call("badchannels", {}, -1, GET)); std::string fname_put = getAbsolutePathFromCurrentProcess(TEST_FILE_NAME_BAD_CHANNELS); std::string fname_get = "/tmp/sls_test_channels.txt"; - REQUIRE_NOTHROW(proxy.Call("badchannels", {fname_put}, 0, PUT)); - REQUIRE_NOTHROW(proxy.Call("badchannels", {fname_get}, 0, GET)); + REQUIRE_NOTHROW(caller.call("badchannels", {fname_put}, 0, PUT)); + REQUIRE_NOTHROW(caller.call("badchannels", {fname_get}, 0, GET)); auto list = getChannelsFromFile(fname_get); std::vector expected = {0, 12, 15, 40, 41, 42, 43, 44, 1279}; REQUIRE(list == expected); - REQUIRE_NOTHROW(proxy.Call("badchannels", {"none"}, 0, PUT)); - REQUIRE_NOTHROW(proxy.Call("badchannels", {fname_get}, 0, GET)); + REQUIRE_NOTHROW(caller.call("badchannels", {"none"}, 0, PUT)); + REQUIRE_NOTHROW(caller.call("badchannels", {fname_get}, 0, GET)); list = getChannelsFromFile(fname_get); REQUIRE(list.empty()); - REQUIRE_NOTHROW(proxy.Call("badchannels", {fname_put}, 0, PUT)); + REQUIRE_NOTHROW(caller.call("badchannels", {fname_put}, 0, PUT)); - REQUIRE_NOTHROW(proxy.Call("badchannels", {"0"}, 0, PUT)); - REQUIRE_NOTHROW(proxy.Call("badchannels", {fname_get}, 0, GET)); + REQUIRE_NOTHROW(caller.call("badchannels", {"0"}, 0, PUT)); + REQUIRE_NOTHROW(caller.call("badchannels", {fname_get}, 0, GET)); list = getChannelsFromFile(fname_get); REQUIRE(list.empty()); - REQUIRE_NOTHROW(proxy.Call("badchannels", {"12"}, 0, PUT)); - REQUIRE_NOTHROW(proxy.Call("badchannels", {fname_get}, 0, GET)); + REQUIRE_NOTHROW(caller.call("badchannels", {"12"}, 0, PUT)); + REQUIRE_NOTHROW(caller.call("badchannels", {fname_get}, 0, GET)); list = getChannelsFromFile(fname_get); expected = {12}; REQUIRE(list == expected); - REQUIRE_NOTHROW(proxy.Call( + REQUIRE_NOTHROW(caller.call( "badchannels", {"0", "12,", "15", "43", "40:45", "1279"}, 0, PUT)); - REQUIRE_NOTHROW(proxy.Call("badchannels", {fname_get}, 0, GET)); + REQUIRE_NOTHROW(caller.call("badchannels", {fname_get}, 0, GET)); list = getChannelsFromFile(fname_get); expected = {0, 12, 15, 40, 41, 42, 43, 44, 1279}; REQUIRE(list == expected); - REQUIRE_NOTHROW(proxy.Call("badchannels", {"40:45"}, 0, PUT)); - REQUIRE_NOTHROW(proxy.Call("badchannels", {fname_get}, 0, GET)); + REQUIRE_NOTHROW(caller.call("badchannels", {"40:45"}, 0, PUT)); + REQUIRE_NOTHROW(caller.call("badchannels", {fname_get}, 0, GET)); list = getChannelsFromFile(fname_get); expected = {40, 41, 42, 43, 44}; REQUIRE(list == expected); - REQUIRE_NOTHROW(proxy.Call("badchannels", {"5,6,7"}, 0, PUT)); - REQUIRE_NOTHROW(proxy.Call("badchannels", {fname_get}, 0, GET)); + REQUIRE_NOTHROW(caller.call("badchannels", {"5,6,7"}, 0, PUT)); + REQUIRE_NOTHROW(caller.call("badchannels", {fname_get}, 0, GET)); list = getChannelsFromFile(fname_get); expected = {5, 6, 7}; REQUIRE(list == expected); - REQUIRE_NOTHROW(proxy.Call("badchannels", {"1:5,6,7"}, 0, PUT)); - REQUIRE_NOTHROW(proxy.Call("badchannels", {fname_get}, 0, GET)); + REQUIRE_NOTHROW(caller.call("badchannels", {"1:5,6,7"}, 0, PUT)); + REQUIRE_NOTHROW(caller.call("badchannels", {fname_get}, 0, GET)); list = getChannelsFromFile(fname_get); expected = {1, 2, 3, 4, 6, 7}; REQUIRE(list == expected); @@ -718,53 +719,53 @@ TEST_CASE("badchannels", "[.cmd]") { det.setBadChannels(prev); } else { - REQUIRE_THROWS(proxy.Call("badchannels", {}, -1, GET)); + REQUIRE_THROWS(caller.call("badchannels", {}, -1, GET)); } } -TEST_CASE("row", "[.cmd]") { +TEST_CASE("row", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto prev_val = det.getRow()[0]; { std::ostringstream oss; - proxy.Call("row", {"1"}, 0, PUT, oss); + caller.call("row", {"1"}, 0, PUT, oss); REQUIRE(oss.str() == "row 1\n"); } { std::ostringstream oss; - proxy.Call("row", {}, 0, GET, oss); + caller.call("row", {}, 0, GET, oss); REQUIRE(oss.str() == "row 1\n"); } { std::ostringstream oss; - proxy.Call("row", {"0"}, 0, PUT, oss); + caller.call("row", {"0"}, 0, PUT, oss); REQUIRE(oss.str() == "row 0\n"); } - REQUIRE_THROWS(proxy.Call("row", {"-5"}, -1, PUT)); + REQUIRE_THROWS(caller.call("row", {"-5"}, -1, PUT)); det.setRow(prev_val, {0}); } -TEST_CASE("column", "[.cmd]") { +TEST_CASE("column", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto prev_val = det.getColumn()[0]; { std::ostringstream oss; - proxy.Call("column", {"1"}, 0, PUT, oss); + caller.call("column", {"1"}, 0, PUT, oss); REQUIRE(oss.str() == "column 1\n"); } { std::ostringstream oss; - proxy.Call("column", {}, 0, GET, oss); + caller.call("column", {}, 0, GET, oss); REQUIRE(oss.str() == "column 1\n"); } { std::ostringstream oss; - proxy.Call("column", {"0"}, 0, PUT, oss); + caller.call("column", {"0"}, 0, PUT, oss); REQUIRE(oss.str() == "column 0\n"); } - REQUIRE_THROWS(proxy.Call("column", {"-5"}, -1, PUT)); + REQUIRE_THROWS(caller.call("column", {"-5"}, -1, PUT)); det.setColumn(prev_val, {0}); } @@ -772,57 +773,57 @@ TEST_CASE("column", "[.cmd]") { // acquire: not testing -TEST_CASE("frames", "[.cmd]") { +TEST_CASE("frames", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto prev_val = det.getNumberOfFrames().tsquash("#frames must be same to test"); { std::ostringstream oss; - proxy.Call("frames", {"1000"}, -1, PUT, oss); + caller.call("frames", {"1000"}, -1, PUT, oss); REQUIRE(oss.str() == "frames 1000\n"); } { std::ostringstream oss; - proxy.Call("frames", {}, -1, GET, oss); + caller.call("frames", {}, -1, GET, oss); REQUIRE(oss.str() == "frames 1000\n"); } { std::ostringstream oss; - proxy.Call("frames", {"1"}, -1, PUT, oss); + caller.call("frames", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "frames 1\n"); } - REQUIRE_THROWS(proxy.Call("frames", {"0"}, -1, PUT)); + REQUIRE_THROWS(caller.call("frames", {"0"}, -1, PUT)); det.setNumberOfFrames(prev_val); } -TEST_CASE("triggers", "[.cmd]") { +TEST_CASE("triggers", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto prev_val = det.getNumberOfTriggers().tsquash("#triggers must be same to test"); { std::ostringstream oss; - proxy.Call("triggers", {"1000"}, -1, PUT, oss); + caller.call("triggers", {"1000"}, -1, PUT, oss); REQUIRE(oss.str() == "triggers 1000\n"); } { std::ostringstream oss; - proxy.Call("triggers", {}, -1, GET, oss); + caller.call("triggers", {}, -1, GET, oss); REQUIRE(oss.str() == "triggers 1000\n"); } { std::ostringstream oss; - proxy.Call("triggers", {"1"}, -1, PUT, oss); + caller.call("triggers", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "triggers 1\n"); } - REQUIRE_THROWS(proxy.Call("triggers", {"0"}, -1, PUT)); + REQUIRE_THROWS(caller.call("triggers", {"0"}, -1, PUT)); det.setNumberOfTriggers(prev_val); } -TEST_CASE("exptime", "[.cmd][.time]") { +TEST_CASE("exptime", "[.cmdcall][.time]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); std::chrono::nanoseconds prev_val; if (det_type != defs::MYTHEN3) { @@ -837,29 +838,29 @@ TEST_CASE("exptime", "[.cmd][.time]") { } { std::ostringstream oss; - proxy.Call("exptime", {"0.05"}, -1, PUT, oss); + caller.call("exptime", {"0.05"}, -1, PUT, oss); REQUIRE(oss.str() == "exptime 0.05\n"); } if (det_type != defs::MYTHEN3) { std::ostringstream oss; - proxy.Call("exptime", {}, -1, GET, oss); + caller.call("exptime", {}, -1, GET, oss); REQUIRE(oss.str() == "exptime 50ms\n"); } { std::ostringstream oss; - proxy.Call("exptime", {"1s"}, -1, PUT, oss); + caller.call("exptime", {"1s"}, -1, PUT, oss); REQUIRE(oss.str() == "exptime 1s\n"); } if (det_type != defs::JUNGFRAU && det_type != defs::MOENCH) { { std::ostringstream oss; - proxy.Call("exptime", {"0"}, -1, PUT, oss); + caller.call("exptime", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "exptime 0\n"); } { // Get exptime of single module std::ostringstream oss; - proxy.Call("exptime", {}, 0, GET, oss); + caller.call("exptime", {}, 0, GET, oss); if (det_type == defs::MYTHEN3) { REQUIRE(oss.str() == "exptime [0ns, 0ns, 0ns]\n"); } else { @@ -870,23 +871,23 @@ TEST_CASE("exptime", "[.cmd][.time]") { det.setExptime(-1, prev_val); } -TEST_CASE("period", "[.cmd]") { +TEST_CASE("period", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto prev_val = det.getPeriod(); { std::ostringstream oss; - proxy.Call("period", {"1.25s"}, -1, PUT, oss); + caller.call("period", {"1.25s"}, -1, PUT, oss); REQUIRE(oss.str() == "period 1.25s\n"); } { std::ostringstream oss; - proxy.Call("period", {}, -1, GET, oss); + caller.call("period", {}, -1, GET, oss); REQUIRE(oss.str() == "period 1.25s\n"); } { std::ostringstream oss; - proxy.Call("period", {"0"}, -1, PUT, oss); + caller.call("period", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "period 0\n"); } for (int i = 0; i != det.size(); ++i) { @@ -894,31 +895,31 @@ TEST_CASE("period", "[.cmd]") { } } -TEST_CASE("delay", "[.cmd]") { +TEST_CASE("delay", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER) { - REQUIRE_THROWS(proxy.Call("delay", {"1"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("delay", {}, -1, GET)); + REQUIRE_THROWS(caller.call("delay", {"1"}, -1, PUT)); + REQUIRE_THROWS(caller.call("delay", {}, -1, GET)); } else if (det_type == defs::GOTTHARD) { // extra delays for master (can throw when setting) - REQUIRE_NOTHROW(proxy.Call("delay", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("delay", {}, -1, GET)); } else { auto prev_val = det.getDelayAfterTrigger(); { std::ostringstream oss; - proxy.Call("delay", {"1.25s"}, -1, PUT, oss); + caller.call("delay", {"1.25s"}, -1, PUT, oss); REQUIRE(oss.str() == "delay 1.25s\n"); } { std::ostringstream oss; - proxy.Call("delay", {}, -1, GET, oss); + caller.call("delay", {}, -1, GET, oss); REQUIRE(oss.str() == "delay 1.25s\n"); } { std::ostringstream oss; - proxy.Call("delay", {"0s"}, -1, PUT, oss); + caller.call("delay", {"0s"}, -1, PUT, oss); REQUIRE(oss.str() == "delay 0s\n"); } for (int i = 0; i != det.size(); ++i) { @@ -927,74 +928,68 @@ TEST_CASE("delay", "[.cmd]") { } } -TEST_CASE("framesl", "[.cmd]") { +TEST_CASE("framesl", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER) { - REQUIRE_THROWS(proxy.Call("framesl", {}, -1, GET)); + REQUIRE_THROWS(caller.call("framesl", {}, -1, GET)); } else { - REQUIRE_NOTHROW(proxy.Call("framesl", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("framesl", {}, -1, GET)); } } -TEST_CASE("triggersl", "[.cmd]") { +TEST_CASE("triggersl", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER) { - REQUIRE_THROWS(proxy.Call("triggersl", {}, -1, GET)); + REQUIRE_THROWS(caller.call("triggersl", {}, -1, GET)); } else { - REQUIRE_NOTHROW(proxy.Call("triggersl", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("triggersl", {}, -1, GET)); } } -TEST_CASE("delayl", "[.cmd]") { +TEST_CASE("delayl", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); switch (det_type) { case defs::EIGER: - case defs::CHIPTESTBOARD: - case defs::GOTTHARD2: - case defs::MYTHEN3: - REQUIRE_THROWS(proxy.Call("delayl", {}, -1, GET)); + REQUIRE_THROWS(caller.call("delayl", {}, -1, GET)); break; default: - REQUIRE_NOTHROW(proxy.Call("delayl", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("delayl", {}, -1, GET)); break; } } -TEST_CASE("periodl", "[.cmd]") { +TEST_CASE("periodl", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); switch (det_type) { case defs::EIGER: - case defs::CHIPTESTBOARD: - case defs::GOTTHARD2: - case defs::MYTHEN3: - REQUIRE_THROWS(proxy.Call("periodl", {}, -1, GET)); + REQUIRE_THROWS(caller.call("periodl", {}, -1, GET)); break; default: - REQUIRE_NOTHROW(proxy.Call("periodl", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("periodl", {}, -1, GET)); break; } } -TEST_CASE("dr", "[.cmd]") { +TEST_CASE("dr", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER) { auto dr = det.getDynamicRange().squash(); std::array vals{4, 8, 16, 32}; for (const auto val : vals) { std::ostringstream oss1, oss2; - proxy.Call("dr", {std::to_string(val)}, -1, PUT, oss1); + caller.call("dr", {std::to_string(val)}, -1, PUT, oss1); REQUIRE(oss1.str() == "dr " + std::to_string(val) + '\n'); - proxy.Call("dr", {}, -1, GET, oss2); + caller.call("dr", {}, -1, GET, oss2); REQUIRE(oss2.str() == "dr " + std::to_string(val) + '\n'); } det.setDynamicRange(dr); @@ -1004,229 +999,234 @@ TEST_CASE("dr", "[.cmd]") { std::array vals{8, 16, 32}; for (const auto val : vals) { std::ostringstream oss1, oss2; - proxy.Call("dr", {std::to_string(val)}, -1, PUT, oss1); + caller.call("dr", {std::to_string(val)}, -1, PUT, oss1); REQUIRE(oss1.str() == "dr " + std::to_string(val) + '\n'); - proxy.Call("dr", {}, -1, GET, oss2); + caller.call("dr", {}, -1, GET, oss2); REQUIRE(oss2.str() == "dr " + std::to_string(val) + '\n'); } det.setDynamicRange(dr); } else { // For the other detectors we should get an error message // except for dr 16 - REQUIRE_THROWS(proxy.Call("dr", {"4"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("dr", {"8"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("dr", {"32"}, -1, PUT)); + REQUIRE_THROWS(caller.call("dr", {"4"}, -1, PUT)); + REQUIRE_THROWS(caller.call("dr", {"8"}, -1, PUT)); + REQUIRE_THROWS(caller.call("dr", {"32"}, -1, PUT)); std::ostringstream oss1, oss2; - proxy.Call("dr", {"16"}, -1, PUT, oss1); + caller.call("dr", {"16"}, -1, PUT, oss1); REQUIRE(oss1.str() == "dr 16\n"); - proxy.Call("dr", {"16"}, -1, PUT, oss2); + caller.call("dr", {"16"}, -1, PUT, oss2); REQUIRE(oss2.str() == "dr 16\n"); } } -TEST_CASE("drlist", "[.cmd]") { +TEST_CASE("drlist", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); - REQUIRE_NOTHROW(proxy.Call("drlist", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("drlist", {}, -1, PUT)); + Caller caller(&det); + REQUIRE_NOTHROW(caller.call("drlist", {}, -1, GET)); + REQUIRE_THROWS(caller.call("drlist", {}, -1, PUT)); } -TEST_CASE("timing", "[.cmd]") { +TEST_CASE("timing", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); + auto det_type = det.getDetectorType().squash(); auto prev_val = det.getTimingMode(); det.setTimingMode(defs::AUTO_TIMING); { std::ostringstream oss1, oss2; - proxy.Call("timing", {"auto"}, -1, PUT, oss1); + caller.call("timing", {"auto"}, -1, PUT, oss1); REQUIRE(oss1.str() == "timing auto\n"); - proxy.Call("timing", {}, -1, GET, oss2); + caller.call("timing", {}, -1, GET, oss2); REQUIRE(oss2.str() == "timing auto\n"); } { std::ostringstream oss1, oss2; - proxy.Call("timing", {"trigger"}, -1, PUT, oss1); + caller.call("timing", {"trigger"}, -1, PUT, oss1); REQUIRE(oss1.str() == "timing trigger\n"); - proxy.Call("timing", {}, -1, GET, oss2); + caller.call("timing", {}, -1, GET, oss2); REQUIRE(oss2.str() == "timing trigger\n"); } - auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER) { { std::ostringstream oss1, oss2; - proxy.Call("timing", {"gating"}, -1, PUT, oss1); + caller.call("timing", {"gating"}, -1, PUT, oss1); REQUIRE(oss1.str() == "timing gating\n"); - proxy.Call("timing", {}, -1, GET, oss2); + caller.call("timing", {}, -1, GET, oss2); REQUIRE(oss2.str() == "timing gating\n"); } { std::ostringstream oss1, oss2; - proxy.Call("timing", {"burst_trigger"}, -1, PUT, oss1); + caller.call("timing", {"burst_trigger"}, -1, PUT, oss1); REQUIRE(oss1.str() == "timing burst_trigger\n"); - proxy.Call("timing", {}, -1, GET, oss2); + caller.call("timing", {}, -1, GET, oss2); REQUIRE(oss2.str() == "timing burst_trigger\n"); } - REQUIRE_THROWS(proxy.Call("timing", {"trigger_gating"}, -1, PUT)); + REQUIRE_THROWS(caller.call("timing", {"trigger_gating"}, -1, PUT)); } else if (det_type == defs::MYTHEN3) { { std::ostringstream oss1, oss2; - proxy.Call("timing", {"gating"}, -1, PUT, oss1); + caller.call("timing", {"gating"}, -1, PUT, oss1); REQUIRE(oss1.str() == "timing gating\n"); - proxy.Call("timing", {}, -1, GET, oss2); + caller.call("timing", {}, -1, GET, oss2); REQUIRE(oss2.str() == "timing gating\n"); } { std::ostringstream oss1, oss2; - proxy.Call("timing", {"trigger_gating"}, -1, PUT, oss1); + caller.call("timing", {"trigger_gating"}, -1, PUT, oss1); REQUIRE(oss1.str() == "timing trigger_gating\n"); - proxy.Call("timing", {}, -1, GET, oss2); + caller.call("timing", {}, -1, GET, oss2); REQUIRE(oss2.str() == "timing trigger_gating\n"); } - REQUIRE_THROWS(proxy.Call("timing", {"burst_trigger"}, -1, PUT)); + REQUIRE_THROWS(caller.call("timing", {"burst_trigger"}, -1, PUT)); } else { - REQUIRE_THROWS(proxy.Call("timing", {"gating"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("timing", {"burst_trigger"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("timing", {"trigger_gating"}, -1, PUT)); + REQUIRE_THROWS(caller.call("timing", {"gating"}, -1, PUT)); + REQUIRE_THROWS(caller.call("timing", {"burst_trigger"}, -1, PUT)); + REQUIRE_THROWS(caller.call("timing", {"trigger_gating"}, -1, PUT)); } for (int i = 0; i != det.size(); ++i) { det.setTimingMode(prev_val[i], {i}); } } -TEST_CASE("timinglist", "[.cmd]") { +TEST_CASE("timinglist", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); - REQUIRE_NOTHROW(proxy.Call("timinglist", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("timinglist", {}, -1, PUT)); + Caller caller(&det); + REQUIRE_NOTHROW(caller.call("timinglist", {}, -1, GET)); + REQUIRE_THROWS(caller.call("timinglist", {}, -1, PUT)); } -TEST_CASE("readoutspeed", "[.cmd]") { +TEST_CASE("readoutspeed", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER || det_type == defs::JUNGFRAU || - det_type == defs::MOENCH || det_type == defs::GOTTHARD2) { + det_type == defs::MOENCH || det_type == defs::GOTTHARD2 || + det_type == defs::MYTHEN3) { auto prev_val = det.getReadoutSpeed(); // full speed for jungfrau/moench only works for new boards (chipv1.1 is // with new board [hw1.0 and chipv1.0 not tested here]) if (((det_type == defs::JUNGFRAU) && det.getChipVersion().squash() * 10 == 11) || - (det_type == defs::EIGER) || (det_type == defs::MOENCH)) { + det_type == defs::EIGER || det_type == defs::MOENCH || + det_type == defs::MYTHEN3) { std::ostringstream oss1, oss2, oss3, oss4; - proxy.Call("readoutspeed", {"0"}, -1, PUT, oss1); + caller.call("readoutspeed", {"0"}, -1, PUT, oss1); REQUIRE(oss1.str() == "readoutspeed full_speed\n"); - proxy.Call("readoutspeed", {}, -1, GET, oss2); + caller.call("readoutspeed", {}, -1, GET, oss2); REQUIRE(oss2.str() == "readoutspeed full_speed\n"); - proxy.Call("readoutspeed", {"full_speed"}, -1, PUT, oss3); + caller.call("readoutspeed", {"full_speed"}, -1, PUT, oss3); REQUIRE(oss3.str() == "readoutspeed full_speed\n"); - proxy.Call("readoutspeed", {}, -1, GET, oss4); + caller.call("readoutspeed", {}, -1, GET, oss4); REQUIRE(oss4.str() == "readoutspeed full_speed\n"); } if (det_type == defs::EIGER || det_type == defs::JUNGFRAU || - det_type == defs::MOENCH) { + det_type == defs::MOENCH || det_type == defs::MYTHEN3) { { std::ostringstream oss1, oss2, oss3, oss4; - proxy.Call("readoutspeed", {"1"}, -1, PUT, oss1); + caller.call("readoutspeed", {"1"}, -1, PUT, oss1); REQUIRE(oss1.str() == "readoutspeed half_speed\n"); - proxy.Call("readoutspeed", {}, -1, GET, oss2); + caller.call("readoutspeed", {}, -1, GET, oss2); REQUIRE(oss2.str() == "readoutspeed half_speed\n"); - proxy.Call("readoutspeed", {"half_speed"}, -1, PUT, oss3); + caller.call("readoutspeed", {"half_speed"}, -1, PUT, oss3); REQUIRE(oss3.str() == "readoutspeed half_speed\n"); - proxy.Call("readoutspeed", {}, -1, GET, oss4); + caller.call("readoutspeed", {}, -1, GET, oss4); REQUIRE(oss4.str() == "readoutspeed half_speed\n"); } { std::ostringstream oss1, oss2, oss3, oss4; - proxy.Call("readoutspeed", {"2"}, -1, PUT, oss1); + caller.call("readoutspeed", {"2"}, -1, PUT, oss1); REQUIRE(oss1.str() == "readoutspeed quarter_speed\n"); - proxy.Call("readoutspeed", {}, -1, GET, oss2); + caller.call("readoutspeed", {}, -1, GET, oss2); REQUIRE(oss2.str() == "readoutspeed quarter_speed\n"); - proxy.Call("readoutspeed", {"quarter_speed"}, -1, PUT, oss3); + caller.call("readoutspeed", {"quarter_speed"}, -1, PUT, oss3); REQUIRE(oss3.str() == "readoutspeed quarter_speed\n"); - proxy.Call("readoutspeed", {}, -1, GET, oss4); + caller.call("readoutspeed", {}, -1, GET, oss4); REQUIRE(oss4.str() == "readoutspeed quarter_speed\n"); } - REQUIRE_THROWS(proxy.Call("readoutspeed", {"108"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("readoutspeed", {"144"}, -1, PUT)); + REQUIRE_THROWS(caller.call("readoutspeed", {"108"}, -1, PUT)); + REQUIRE_THROWS(caller.call("readoutspeed", {"144"}, -1, PUT)); } if (det_type == defs::GOTTHARD2) { { std::ostringstream oss1, oss2, oss3, oss4; - proxy.Call("readoutspeed", {"108"}, -1, PUT, oss1); + caller.call("readoutspeed", {"108"}, -1, PUT, oss1); REQUIRE(oss1.str() == "readoutspeed 108\n"); - proxy.Call("readoutspeed", {}, -1, GET, oss2); + caller.call("readoutspeed", {}, -1, GET, oss2); REQUIRE(oss2.str() == "readoutspeed 108\n"); } { std::ostringstream oss1, oss2, oss3, oss4; - proxy.Call("readoutspeed", {"144"}, -1, PUT, oss1); + caller.call("readoutspeed", {"144"}, -1, PUT, oss1); REQUIRE(oss1.str() == "readoutspeed 144\n"); - proxy.Call("readoutspeed", {}, -1, GET, oss2); + caller.call("readoutspeed", {}, -1, GET, oss2); REQUIRE(oss2.str() == "readoutspeed 144\n"); } - REQUIRE_THROWS(proxy.Call("readoutspeed", {"full_speed"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("readoutspeed", {"half_speed"}, -1, PUT)); REQUIRE_THROWS( - proxy.Call("readoutspeed", {"quarter_speed"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("readoutspeed", {"0"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("readoutspeed", {"1"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("readoutspeed", {"2"}, -1, PUT)); + caller.call("readoutspeed", {"full_speed"}, -1, PUT)); + REQUIRE_THROWS( + caller.call("readoutspeed", {"half_speed"}, -1, PUT)); + REQUIRE_THROWS( + caller.call("readoutspeed", {"quarter_speed"}, -1, PUT)); + REQUIRE_THROWS(caller.call("readoutspeed", {"0"}, -1, PUT)); + REQUIRE_THROWS(caller.call("readoutspeed", {"1"}, -1, PUT)); + REQUIRE_THROWS(caller.call("readoutspeed", {"2"}, -1, PUT)); } for (int i = 0; i != det.size(); ++i) { det.setReadoutSpeed(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("readoutspeed", {"0"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("readoutspeed", {}, -1, GET)); + REQUIRE_THROWS(caller.call("readoutspeed", {"0"}, -1, PUT)); + REQUIRE_THROWS(caller.call("readoutspeed", {}, -1, GET)); } } -TEST_CASE("readoutspeedlist", "[.cmd]") { +TEST_CASE("readoutspeedlist", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::GOTTHARD2 || det_type == defs::JUNGFRAU || - det_type == defs::MOENCH || det_type == defs::EIGER) { - REQUIRE_NOTHROW(proxy.Call("readoutspeedlist", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("readoutspeedlist", {}, -1, PUT)); + det_type == defs::MOENCH || det_type == defs::EIGER || + det_type == defs::MYTHEN3) { + REQUIRE_NOTHROW(caller.call("readoutspeedlist", {}, -1, GET)); + REQUIRE_THROWS(caller.call("readoutspeedlist", {}, -1, PUT)); } else { - REQUIRE_THROWS(proxy.Call("readoutspeedlist", {}, -1, GET)); + REQUIRE_THROWS(caller.call("readoutspeedlist", {}, -1, GET)); } } -TEST_CASE("adcphase", "[.cmd]") { +TEST_CASE("adcphase", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::GOTTHARD || det_type == defs::JUNGFRAU || det_type == defs::MOENCH || det_type == defs::CHIPTESTBOARD) { if (det_type == defs::GOTTHARD) { std::ostringstream oss1; - proxy.Call("adcphase", {"20"}, -1, PUT, oss1); + caller.call("adcphase", {"20"}, -1, PUT, oss1); REQUIRE(oss1.str() == "adcphase 20\n"); // cant get, cant use deg - REQUIRE_THROWS(proxy.Call("adcphase", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("adcphase", {"20", "deg"}, -1, PUT)); + REQUIRE_THROWS(caller.call("adcphase", {}, -1, GET)); + REQUIRE_THROWS(caller.call("adcphase", {"20", "deg"}, -1, PUT)); } else { auto prev_val = det.getADCPhase(); { std::ostringstream oss1, oss2; - proxy.Call("adcphase", {"20"}, -1, PUT, oss1); + caller.call("adcphase", {"20"}, -1, PUT, oss1); REQUIRE(oss1.str() == "adcphase 20\n"); - proxy.Call("adcphase", {}, -1, GET, oss2); + caller.call("adcphase", {}, -1, GET, oss2); REQUIRE(oss2.str() == "adcphase 20\n"); } { std::ostringstream oss1, oss2; - proxy.Call("adcphase", {"20", "deg"}, -1, PUT, oss1); + caller.call("adcphase", {"20", "deg"}, -1, PUT, oss1); REQUIRE(oss1.str() == "adcphase 20 deg\n"); - proxy.Call("adcphase", {"deg"}, -1, GET, oss2); + caller.call("adcphase", {"deg"}, -1, GET, oss2); REQUIRE(oss2.str() == "adcphase 20 deg\n"); } for (int i = 0; i != det.size(); ++i) { @@ -1234,96 +1234,102 @@ TEST_CASE("adcphase", "[.cmd]") { } } } else { - REQUIRE_THROWS(proxy.Call("adcphase", {"0"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("adcphase", {}, -1, GET)); + REQUIRE_THROWS(caller.call("adcphase", {"0"}, -1, PUT)); + REQUIRE_THROWS(caller.call("adcphase", {}, -1, GET)); } } -TEST_CASE("maxadcphaseshift", "[.cmd]") { +TEST_CASE("maxadcphaseshift", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH || det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3 || // only because clk index of 0 exists det_type == defs::GOTTHARD2) { // only because clk index of 0 exists - REQUIRE_NOTHROW(proxy.Call("maxadcphaseshift", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("maxadcphaseshift", {}, -1, GET)); } else { - REQUIRE_THROWS(proxy.Call("maxadcphaseshift", {}, -1, GET)); + REQUIRE_THROWS(caller.call("maxadcphaseshift", {}, -1, GET)); } } -TEST_CASE("dbitphase", "[.cmd]") { +TEST_CASE("dbitphase", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU || det_type == defs::CHIPTESTBOARD) { auto prev_val = det.getDBITPhase(); { std::ostringstream oss1, oss2; - proxy.Call("dbitphase", {"20"}, -1, PUT, oss1); + caller.call("dbitphase", {"20"}, -1, PUT, oss1); REQUIRE(oss1.str() == "dbitphase 20\n"); - proxy.Call("dbitphase", {}, -1, GET, oss2); + caller.call("dbitphase", {}, -1, GET, oss2); REQUIRE(oss2.str() == "dbitphase 20\n"); } { std::ostringstream oss1, oss2; - proxy.Call("dbitphase", {"23", "deg"}, -1, PUT, oss1); + caller.call("dbitphase", {"23", "deg"}, -1, PUT, oss1); REQUIRE(oss1.str() == "dbitphase 23 deg\n"); - proxy.Call("dbitphase", {"deg"}, -1, GET, oss2); + caller.call("dbitphase", {"deg"}, -1, GET, oss2); REQUIRE(oss2.str() == "dbitphase 23 deg\n"); } for (int i = 0; i != det.size(); ++i) { det.setDBITPhase(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("dbitphase", {"0"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("dbitphase", {}, -1, GET)); + REQUIRE_THROWS(caller.call("dbitphase", {"0"}, -1, PUT)); + REQUIRE_THROWS(caller.call("dbitphase", {}, -1, GET)); } } -TEST_CASE("maxdbitphaseshift", "[.cmd]") { +TEST_CASE("maxdbitphaseshift", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU || det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3 || // only because clk index of 0 exists det_type == defs::GOTTHARD2) { // only because clk index of 0 exists - REQUIRE_NOTHROW(proxy.Call("maxdbitphaseshift", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("maxdbitphaseshift", {}, -1, GET)); } else { - REQUIRE_THROWS(proxy.Call("maxdbitphaseshift", {}, -1, GET)); + REQUIRE_THROWS(caller.call("maxdbitphaseshift", {}, -1, GET)); } } -TEST_CASE("clkfreq", "[.cmd]") { +TEST_CASE("clkfreq", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::MYTHEN3 || det_type == defs::GOTTHARD2) { - REQUIRE_THROWS(proxy.Call("clkfreq", {"0", "2"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("clkfreq", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("clkfreq", {"7"}, -1, GET)); - REQUIRE_NOTHROW(proxy.Call("clkfreq", {"0"}, -1, GET)); + REQUIRE_THROWS(caller.call("clkfreq", {"0", "2"}, -1, PUT)); + REQUIRE_THROWS(caller.call("clkfreq", {}, -1, GET)); + REQUIRE_THROWS(caller.call("clkfreq", {"7"}, -1, GET)); + REQUIRE_NOTHROW(caller.call("clkfreq", {"0"}, -1, GET)); + // other clocks removed for m3 (setting not supported) + if (det_type == defs::MYTHEN3) { + REQUIRE_NOTHROW(caller.call("clkfreq", {"1"}, -1, GET)); + REQUIRE_NOTHROW(caller.call("clkfreq", {"2"}, -1, GET)); + REQUIRE_THROWS(caller.call("clkfreq", {"3"}, -1, GET)); + } } else { - REQUIRE_THROWS(proxy.Call("clkfreq", {"0"}, -1, GET)); + REQUIRE_THROWS(caller.call("clkfreq", {"0"}, -1, GET)); } } -TEST_CASE("clkphase", "[.cmd]") { +TEST_CASE("clkphase", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::MYTHEN3 || det_type == defs::GOTTHARD2) { - REQUIRE_THROWS(proxy.Call("clkphase", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("clkphase", {"7"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("clkphase", {"4"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("clkphase", {"7", "4"}, -1, PUT)); + REQUIRE_THROWS(caller.call("clkphase", {}, -1, GET)); + REQUIRE_THROWS(caller.call("clkphase", {"7"}, -1, GET)); + REQUIRE_THROWS(caller.call("clkphase", {"4"}, -1, PUT)); + REQUIRE_THROWS(caller.call("clkphase", {"7", "4"}, -1, PUT)); auto prev_val = det.getClockPhase(0); { std::ostringstream oss1, oss2; - proxy.Call("clkphase", {"0", "20"}, -1, PUT, oss1); + caller.call("clkphase", {"0", "20"}, -1, PUT, oss1); REQUIRE(oss1.str() == "clkphase 20\n"); - proxy.Call("clkphase", {"0"}, -1, GET, oss2); + caller.call("clkphase", {"0"}, -1, GET, oss2); REQUIRE(oss2.str() == "clkphase 20\n"); } std::string s_deg_val = "15"; @@ -1334,207 +1340,260 @@ TEST_CASE("clkphase", "[.cmd]") { } { std::ostringstream oss1, oss2; - proxy.Call("clkphase", {"0", s_deg_val, "deg"}, -1, PUT, oss1); + caller.call("clkphase", {"0", s_deg_val, "deg"}, -1, PUT, oss1); REQUIRE(oss1.str() == "clkphase " + s_deg_val + " deg\n"); - proxy.Call("clkphase", {"0", "deg"}, -1, GET, oss2); + caller.call("clkphase", {"0", "deg"}, -1, GET, oss2); REQUIRE(oss2.str() == "clkphase " + s_deg_val + " deg\n"); } for (int i = 0; i != det.size(); ++i) { det.setClockPhase(0, prev_val[i], {i}); } + // other clocks removed for m3 (setting not supported) + if (det_type == defs::MYTHEN3) { + REQUIRE_THROWS( + caller.call("clkphase", {"1", s_deg_val, "deg"}, -1, PUT)); + REQUIRE_NOTHROW(caller.call("clkphase", {"1"}, -1, GET)); + REQUIRE_THROWS( + caller.call("clkphase", {"2", s_deg_val, "deg"}, -1, PUT)); + REQUIRE_NOTHROW(caller.call("clkphase", {"2"}, -1, GET)); + REQUIRE_THROWS( + caller.call("clkphase", {"3", s_deg_val, "deg"}, -1, PUT)); + REQUIRE_THROWS(caller.call("clkphase", {"3"}, -1, GET)); + } } else { - REQUIRE_THROWS(proxy.Call("clkphase", {"0"}, -1, GET)); + REQUIRE_THROWS(caller.call("clkphase", {"0"}, -1, GET)); } } -TEST_CASE("clkdiv", "[.cmd]") { +TEST_CASE("clkdiv", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::MYTHEN3 || det_type == defs::GOTTHARD2) { - REQUIRE_THROWS(proxy.Call("clkdiv", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("clkdiv", {"7"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("clkdiv", {"7", "4"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("clkdiv", {"7", "4"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("clkdiv", {"0", "1"}, -1, PUT)); + REQUIRE_THROWS(caller.call("clkdiv", {}, -1, GET)); + REQUIRE_THROWS(caller.call("clkdiv", {"7"}, -1, GET)); + REQUIRE_THROWS(caller.call("clkdiv", {"7", "4"}, -1, PUT)); + REQUIRE_THROWS(caller.call("clkdiv", {"7", "4"}, -1, PUT)); + REQUIRE_THROWS(caller.call("clkdiv", {"0", "1"}, -1, PUT)); auto prev_val = det.getClockDivider(0); { std::ostringstream oss1, oss2; - proxy.Call("clkdiv", {"0", "3"}, -1, PUT, oss1); - REQUIRE(oss1.str() == "clkdiv 3\n"); - proxy.Call("clkdiv", {"0"}, -1, GET, oss2); - REQUIRE(oss2.str() == "clkdiv 3\n"); + caller.call("clkdiv", {"0", "3"}, -1, PUT, oss1); + REQUIRE(oss1.str() == "clkdiv 0 3\n"); + caller.call("clkdiv", {"0"}, -1, GET, oss2); + REQUIRE(oss2.str() == "clkdiv 0 3\n"); } for (int i = 0; i != det.size(); ++i) { det.setClockDivider(0, prev_val[i], {i}); } + // other clocks removed for m3 (setting not supported) + if (det_type == defs::MYTHEN3) { + REQUIRE_THROWS(caller.call("clkdiv", {"1", "2"}, -1, PUT)); + REQUIRE_NOTHROW(caller.call("clkdiv", {"1"}, -1, GET)); + REQUIRE_THROWS(caller.call("clkdiv", {"2", "2"}, -1, PUT)); + REQUIRE_NOTHROW(caller.call("clkdiv", {"2"}, -1, GET)); + REQUIRE_THROWS(caller.call("clkdiv", {"3", "2"}, -1, PUT)); + REQUIRE_THROWS(caller.call("clkdiv", {"3"}, -1, GET)); + } } else { - REQUIRE_THROWS(proxy.Call("clkdiv", {"0"}, -1, GET)); + REQUIRE_THROWS(caller.call("clkdiv", {"0"}, -1, GET)); } } -TEST_CASE("maxclkphaseshift", "[.cmd]") { +TEST_CASE("maxclkphaseshift", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::MYTHEN3 || det_type == defs::GOTTHARD2) { - REQUIRE_THROWS(proxy.Call("maxclkphaseshift", {"0", "2"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("maxclkphaseshift", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("maxclkphaseshift", {"7"}, -1, GET)); - REQUIRE_NOTHROW(proxy.Call("maxclkphaseshift", {"0"}, -1, GET)); + REQUIRE_THROWS(caller.call("maxclkphaseshift", {"0", "2"}, -1, PUT)); + REQUIRE_THROWS(caller.call("maxclkphaseshift", {}, -1, GET)); + REQUIRE_THROWS(caller.call("maxclkphaseshift", {"7"}, -1, GET)); + REQUIRE_NOTHROW(caller.call("maxclkphaseshift", {"0"}, -1, GET)); + // other clocks removed for m3 (setting not supported) + if (det_type == defs::MYTHEN3) { + REQUIRE_NOTHROW(caller.call("maxclkphaseshift", {"1"}, -1, GET)); + REQUIRE_NOTHROW(caller.call("maxclkphaseshift", {"2"}, -1, GET)); + REQUIRE_THROWS(caller.call("maxclkphaseshift", {"3"}, -1, GET)); + } } else { - REQUIRE_THROWS(proxy.Call("maxclkphaseshift", {"0"}, -1, GET)); + REQUIRE_THROWS(caller.call("maxclkphaseshift", {"0"}, -1, GET)); } } -TEST_CASE("highvoltage", "[.cmd]") { +TEST_CASE("highvoltage", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - auto prev_val = det.getHighVoltage(); - // selected values - if (det_type == defs::GOTTHARD) { - REQUIRE_THROWS(proxy.Call("highvoltage", {"50"}, -1, PUT)); - { - std::ostringstream oss1, oss2; - proxy.Call("highvoltage", {"90"}, -1, PUT, oss1); - REQUIRE(oss1.str() == "highvoltage 90\n"); - proxy.Call("highvoltage", {}, -1, GET, oss2); - REQUIRE(oss2.str() == "highvoltage 90\n"); + if (det_type != defs::XILINX_CHIPTESTBOARD) { + 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"); + } } - { - std::ostringstream oss1, oss2; - proxy.Call("highvoltage", {"0"}, -1, PUT, oss1); - REQUIRE(oss1.str() == "highvoltage 0\n"); - proxy.Call("highvoltage", {}, -1, GET, oss2); - REQUIRE(oss2.str() == "highvoltage 0\n"); + // range 0, 60 - 200 + else if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH || + det_type == defs::CHIPTESTBOARD) { + 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 - else if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH || - det_type == defs::CHIPTESTBOARD) { - REQUIRE_THROWS(proxy.Call("highvoltage", {"50"}, -1, PUT)); - { - std::ostringstream oss1, oss2; - proxy.Call("highvoltage", {"90"}, -1, PUT, oss1); - REQUIRE(oss1.str() == "highvoltage 90\n"); - proxy.Call("highvoltage", {}, -1, GET, oss2); - REQUIRE(oss2.str() == "highvoltage 90\n"); + // full range 0 - 200 (get needs to wait) + else if (det_type == defs::EIGER) { + { + std::ostringstream oss1, oss2; + caller.call("highvoltage", {"50"}, 0, PUT, oss1); + REQUIRE(oss1.str() == "highvoltage 50\n"); + std::this_thread::sleep_for(std::chrono::seconds(2)); + caller.call("highvoltage", {}, 0, GET, oss2); + REQUIRE(oss2.str() == "highvoltage 50\n"); + } + { + std::ostringstream oss1, oss2; + caller.call("highvoltage", {"120"}, 0, PUT, oss1); + REQUIRE(oss1.str() == "highvoltage 120\n"); + std::this_thread::sleep_for(std::chrono::seconds(2)); + caller.call("highvoltage", {}, 0, GET, oss2); + REQUIRE(oss2.str() == "highvoltage 120\n"); + } + { + std::ostringstream oss1, oss2; + caller.call("highvoltage", {"0"}, 0, PUT, oss1); + REQUIRE(oss1.str() == "highvoltage 0\n"); + std::this_thread::sleep_for(std::chrono::seconds(2)); + caller.call("highvoltage", {}, 0, GET, oss2); + REQUIRE(oss2.str() == "highvoltage 0\n"); + } } - { - std::ostringstream oss1, oss2; - proxy.Call("highvoltage", {"0"}, -1, PUT, oss1); - REQUIRE(oss1.str() == "highvoltage 0\n"); - proxy.Call("highvoltage", {}, -1, GET, oss2); - REQUIRE(oss2.str() == "highvoltage 0\n"); + // full range 0 - 200 + else { + { + std::ostringstream oss1, oss2; + caller.call("highvoltage", {"50"}, -1, PUT, oss1); + REQUIRE(oss1.str() == "highvoltage 50\n"); + caller.call("highvoltage", {}, -1, GET, oss2); + REQUIRE(oss2.str() == "highvoltage 50\n"); + } + { + std::ostringstream oss1, oss2; + caller.call("highvoltage", {"120"}, -1, PUT, oss1); + REQUIRE(oss1.str() == "highvoltage 120\n"); + caller.call("highvoltage", {}, -1, GET, oss2); + REQUIRE(oss2.str() == "highvoltage 120\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"); + } } - } - // full range 0 - 200 (get needs to wait) - else if (det_type == defs::EIGER) { - { - std::ostringstream oss1, oss2; - proxy.Call("highvoltage", {"50"}, 0, PUT, oss1); - REQUIRE(oss1.str() == "highvoltage 50\n"); - std::this_thread::sleep_for(std::chrono::seconds(2)); - proxy.Call("highvoltage", {}, 0, GET, oss2); - REQUIRE(oss2.str() == "highvoltage 50\n"); + for (int i = 0; i != det.size(); ++i) { + det.setHighVoltage(prev_val[i], {i}); } - { - std::ostringstream oss1, oss2; - proxy.Call("highvoltage", {"120"}, 0, PUT, oss1); - REQUIRE(oss1.str() == "highvoltage 120\n"); - std::this_thread::sleep_for(std::chrono::seconds(2)); - proxy.Call("highvoltage", {}, 0, GET, oss2); - REQUIRE(oss2.str() == "highvoltage 120\n"); - } - { - std::ostringstream oss1, oss2; - proxy.Call("highvoltage", {"0"}, 0, PUT, oss1); - REQUIRE(oss1.str() == "highvoltage 0\n"); - std::this_thread::sleep_for(std::chrono::seconds(2)); - proxy.Call("highvoltage", {}, 0, GET, oss2); - REQUIRE(oss2.str() == "highvoltage 0\n"); - } - } - // full range 0 - 200 - else { - { - std::ostringstream oss1, oss2; - proxy.Call("highvoltage", {"50"}, -1, PUT, oss1); - REQUIRE(oss1.str() == "highvoltage 50\n"); - proxy.Call("highvoltage", {}, -1, GET, oss2); - REQUIRE(oss2.str() == "highvoltage 50\n"); - } - { - std::ostringstream oss1, oss2; - proxy.Call("highvoltage", {"120"}, -1, PUT, oss1); - REQUIRE(oss1.str() == "highvoltage 120\n"); - proxy.Call("highvoltage", {}, -1, GET, oss2); - REQUIRE(oss2.str() == "highvoltage 120\n"); - } - { - std::ostringstream oss1, oss2; - proxy.Call("highvoltage", {"0"}, -1, PUT, oss1); - REQUIRE(oss1.str() == "highvoltage 0\n"); - proxy.Call("highvoltage", {}, -1, GET, oss2); - REQUIRE(oss2.str() == "highvoltage 0\n"); - } - } - for (int i = 0; i != det.size(); ++i) { - det.setHighVoltage(prev_val[i], {i}); + } else { + REQUIRE_THROWS(caller.call("highvoltage", {"0"}, -1, PUT)); + REQUIRE_THROWS(caller.call("highvoltage", {}, -1, GET)); } } -TEST_CASE("powerchip", "[.cmd]") { +TEST_CASE("powerchip", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH || - det_type == defs::MYTHEN3 || det_type == defs::GOTTHARD2) { + det_type == defs::MYTHEN3 || det_type == defs::GOTTHARD2 || + det_type == defs::XILINX_CHIPTESTBOARD) { auto prev_val = det.getPowerChip(); { std::ostringstream oss; - proxy.Call("powerchip", {"1"}, -1, PUT, oss); + caller.call("powerchip", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "powerchip 1\n"); } { std::ostringstream oss; - proxy.Call("powerchip", {"0"}, -1, PUT, oss); + caller.call("powerchip", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "powerchip 0\n"); } + // powering off chip throws if hv on (only test virtualserver - safety + if (det_type == defs::GOTTHARD2 && + det.isVirtualDetectorServer().tsquash( + "Inconsistent virtual detector " + "server to test powerchip command")) { + det.setPowerChip(1); + int hv = det.getHighVoltage().tsquash( + "Inconsistent high voltage to test " + "powerchip command"); + + det.setHighVoltage(100); + REQUIRE_THROWS(caller.call("powerchip", {"0"}, -1, PUT)); + + // previous settings + det.setHighVoltage(hv); + det.setPowerChip(0); + } { std::ostringstream oss; - proxy.Call("powerchip", {}, -1, GET, oss); + caller.call("powerchip", {}, -1, GET, oss); REQUIRE(oss.str() == "powerchip 0\n"); } for (int i = 0; i != det.size(); ++i) { det.setPowerChip(prev_val[i], {i}); + if (det_type == defs::XILINX_CHIPTESTBOARD) { + det.configureTransceiver(); + } } } else { - REQUIRE_THROWS(proxy.Call("powerchip", {}, -1, GET)); + REQUIRE_THROWS(caller.call("powerchip", {}, -1, GET)); } } -TEST_CASE("imagetest", "[.cmd]") { +TEST_CASE("imagetest", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); // cannot test only for virtual eiger/jungfrau if (det_type == defs::GOTTHARD) { auto prev_val = det.getImageTestMode(); { std::ostringstream oss1, oss2; - proxy.Call("imagetest", {"1"}, -1, PUT, oss1); + caller.call("imagetest", {"1"}, -1, PUT, oss1); REQUIRE(oss1.str() == "imagetest 1\n"); - proxy.Call("imagetest", {}, -1, GET, oss2); + caller.call("imagetest", {}, -1, GET, oss2); REQUIRE(oss2.str() == "imagetest 1\n"); } { std::ostringstream oss1, oss2; - proxy.Call("imagetest", {"0"}, -1, PUT, oss1); + caller.call("imagetest", {"0"}, -1, PUT, oss1); REQUIRE(oss1.str() == "imagetest 0\n"); - proxy.Call("imagetest", {}, -1, GET, oss2); + caller.call("imagetest", {}, -1, GET, oss2); REQUIRE(oss2.str() == "imagetest 0\n"); } for (int i = 0; i != det.size(); ++i) { @@ -1543,34 +1602,34 @@ TEST_CASE("imagetest", "[.cmd]") { } else if (det_type != defs::JUNGFRAU && det_type != defs::MOENCH && det_type != defs::EIGER) { // wont fail for eiger and jungfrau/moench virtual servers - REQUIRE_THROWS(proxy.Call("imagetest", {}, -1, GET)); + REQUIRE_THROWS(caller.call("imagetest", {}, -1, GET)); } } -TEST_CASE("extsig", "[.cmd]") { +TEST_CASE("extsig", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::GOTTHARD) { auto prev_val = det.getExternalSignalFlags(0); - REQUIRE_THROWS(proxy.Call("extsig", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("extsig", {"1"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("extsig", {"0", "inversion_on"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("extsig", {"0", "inversion_off"}, -1, PUT)); + 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; - proxy.Call("extsig", {"0", "trigger_in_rising_edge"}, -1, PUT, - oss1); + caller.call("extsig", {"0", "trigger_in_rising_edge"}, -1, PUT, + oss1); REQUIRE(oss1.str() == "extsig 0 trigger_in_rising_edge\n"); - proxy.Call("extsig", {"0"}, -1, GET, oss2); + caller.call("extsig", {"0"}, -1, GET, oss2); REQUIRE(oss2.str() == "extsig 0 trigger_in_rising_edge\n"); } { std::ostringstream oss1, oss2; - proxy.Call("extsig", {"0", "trigger_in_falling_edge"}, -1, PUT, - oss1); + caller.call("extsig", {"0", "trigger_in_falling_edge"}, -1, PUT, + oss1); REQUIRE(oss1.str() == "extsig 0 trigger_in_falling_edge\n"); - proxy.Call("extsig", {"0"}, -1, GET, oss2); + 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) { @@ -1579,42 +1638,42 @@ TEST_CASE("extsig", "[.cmd]") { } else if (det_type == defs::MYTHEN3) { auto prev_val_0 = det.getExternalSignalFlags(0); auto prev_val_1 = det.getExternalSignalFlags(1); - REQUIRE_THROWS(proxy.Call("extsig", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("extsig", {"8"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("extsig", {"0", "inversion_on"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("extsig", {"0", "inversion_off"}, -1, PUT)); + REQUIRE_THROWS(caller.call("extsig", {}, -1, GET)); + REQUIRE_THROWS(caller.call("extsig", {"8"}, -1, GET)); + REQUIRE_THROWS(caller.call("extsig", {"0", "inversion_on"}, -1, PUT)); + REQUIRE_THROWS(caller.call("extsig", {"0", "inversion_off"}, -1, PUT)); REQUIRE_THROWS( - proxy.Call("extsig", {"1", "trigger_in_rising_edge"}, -1, PUT)); + caller.call("extsig", {"1", "trigger_in_rising_edge"}, -1, PUT)); REQUIRE_THROWS( - proxy.Call("extsig", {"1", "trigger_in_falling_edge"}, -1, PUT)); + caller.call("extsig", {"1", "trigger_in_falling_edge"}, -1, PUT)); { std::ostringstream oss1, oss2; - proxy.Call("extsig", {"0", "trigger_in_rising_edge"}, -1, PUT, - oss1); + caller.call("extsig", {"0", "trigger_in_rising_edge"}, -1, PUT, + oss1); REQUIRE(oss1.str() == "extsig 0 trigger_in_rising_edge\n"); - proxy.Call("extsig", {"0"}, -1, GET, oss2); + caller.call("extsig", {"0"}, -1, GET, oss2); REQUIRE(oss2.str() == "extsig 0 trigger_in_rising_edge\n"); } { std::ostringstream oss1, oss2; - proxy.Call("extsig", {"0", "trigger_in_falling_edge"}, -1, PUT, - oss1); + caller.call("extsig", {"0", "trigger_in_falling_edge"}, -1, PUT, + oss1); REQUIRE(oss1.str() == "extsig 0 trigger_in_falling_edge\n"); - proxy.Call("extsig", {"0"}, -1, GET, oss2); + caller.call("extsig", {"0"}, -1, GET, oss2); REQUIRE(oss2.str() == "extsig 0 trigger_in_falling_edge\n"); } { std::ostringstream oss1, oss2; - proxy.Call("extsig", {"1", "inversion_off"}, -1, PUT, oss1); + caller.call("extsig", {"1", "inversion_off"}, -1, PUT, oss1); REQUIRE(oss1.str() == "extsig 1 inversion_off\n"); - proxy.Call("extsig", {"1"}, -1, GET, oss2); + caller.call("extsig", {"1"}, -1, GET, oss2); REQUIRE(oss2.str() == "extsig 1 inversion_off\n"); } { std::ostringstream oss1, oss2; - proxy.Call("extsig", {"1", "inversion_on"}, -1, PUT, oss1); + caller.call("extsig", {"1", "inversion_on"}, -1, PUT, oss1); REQUIRE(oss1.str() == "extsig 1 inversion_on\n"); - proxy.Call("extsig", {"1"}, -1, GET, oss2); + caller.call("extsig", {"1"}, -1, GET, oss2); REQUIRE(oss2.str() == "extsig 1 inversion_on\n"); } for (int i = 0; i != det.size(); ++i) { @@ -1622,13 +1681,13 @@ TEST_CASE("extsig", "[.cmd]") { det.setExternalSignalFlags(1, prev_val_1[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("extsig", {}, -1, GET)); + REQUIRE_THROWS(caller.call("extsig", {}, -1, GET)); } } -TEST_CASE("parallel", "[.cmd]") { +TEST_CASE("parallel", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER || det_type == defs::MYTHEN3 || @@ -1636,30 +1695,30 @@ TEST_CASE("parallel", "[.cmd]") { auto prev_val = det.getParallelMode(); { std::ostringstream oss; - proxy.Call("parallel", {"1"}, -1, PUT, oss); + caller.call("parallel", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "parallel 1\n"); } { std::ostringstream oss; - proxy.Call("parallel", {"0"}, -1, PUT, oss); + caller.call("parallel", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "parallel 0\n"); } { std::ostringstream oss; - proxy.Call("parallel", {}, -1, GET, oss); + caller.call("parallel", {}, -1, GET, oss); REQUIRE(oss.str() == "parallel 0\n"); } for (int i = 0; i != det.size(); ++i) { det.setParallelMode(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("parallel", {}, -1, GET)); + REQUIRE_THROWS(caller.call("parallel", {}, -1, GET)); } } -TEST_CASE("filterresistor", "[.cmd]") { +TEST_CASE("filterresistor", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); // only for chipv1.1 @@ -1673,87 +1732,87 @@ TEST_CASE("filterresistor", "[.cmd]") { auto prev_val = det.getFilterResistor(); { std::ostringstream oss; - proxy.Call("filterresistor", {"1"}, -1, PUT, oss); + caller.call("filterresistor", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "filterresistor 1\n"); } { std::ostringstream oss; - proxy.Call("filterresistor", {"0"}, -1, PUT, oss); + caller.call("filterresistor", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "filterresistor 0\n"); } { std::ostringstream oss; - proxy.Call("filterresistor", {}, -1, GET, oss); + caller.call("filterresistor", {}, -1, GET, oss); REQUIRE(oss.str() == "filterresistor 0\n"); } if (det_type == defs::GOTTHARD2) { - REQUIRE_NOTHROW(proxy.Call("filterresistor", {"2"}, -1, PUT)); - REQUIRE_NOTHROW(proxy.Call("filterresistor", {"3"}, -1, PUT)); + REQUIRE_NOTHROW(caller.call("filterresistor", {"2"}, -1, PUT)); + REQUIRE_NOTHROW(caller.call("filterresistor", {"3"}, -1, PUT)); } else { - REQUIRE_THROWS(proxy.Call("filterresistor", {"2"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("filterresistor", {"3"}, -1, PUT)); + REQUIRE_THROWS(caller.call("filterresistor", {"2"}, -1, PUT)); + REQUIRE_THROWS(caller.call("filterresistor", {"3"}, -1, PUT)); } for (int i = 0; i != det.size(); ++i) { det.setFilterResistor(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("filterresistor", {}, -1, GET)); + REQUIRE_THROWS(caller.call("filterresistor", {}, -1, GET)); } } -TEST_CASE("dbitpipeline", "[.cmd]") { +TEST_CASE("dbitpipeline", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::CHIPTESTBOARD || det_type == defs::GOTTHARD2) { auto prev_val = det.getDBITPipeline(); { std::ostringstream oss; - proxy.Call("dbitpipeline", {"1"}, -1, PUT, oss); + caller.call("dbitpipeline", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "dbitpipeline 1\n"); } { std::ostringstream oss; - proxy.Call("dbitpipeline", {"0"}, -1, PUT, oss); + caller.call("dbitpipeline", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "dbitpipeline 0\n"); } if (det_type == defs::CHIPTESTBOARD) { { std::ostringstream oss; - proxy.Call("dbitpipeline", {"15"}, -1, PUT, oss); + caller.call("dbitpipeline", {"15"}, -1, PUT, oss); REQUIRE(oss.str() == "dbitpipeline 15\n"); } { std::ostringstream oss; - proxy.Call("dbitpipeline", {}, -1, GET, oss); + caller.call("dbitpipeline", {}, -1, GET, oss); REQUIRE(oss.str() == "dbitpipeline 15\n"); } - REQUIRE_THROWS(proxy.Call("dbitpipeline", {"256"}, -1, PUT)); + REQUIRE_THROWS(caller.call("dbitpipeline", {"256"}, -1, PUT)); } else { { std::ostringstream oss; - proxy.Call("dbitpipeline", {"7"}, -1, PUT, oss); + caller.call("dbitpipeline", {"7"}, -1, PUT, oss); REQUIRE(oss.str() == "dbitpipeline 7\n"); } { std::ostringstream oss; - proxy.Call("dbitpipeline", {}, -1, GET, oss); + caller.call("dbitpipeline", {}, -1, GET, oss); REQUIRE(oss.str() == "dbitpipeline 7\n"); } - REQUIRE_THROWS(proxy.Call("dbitpipeline", {"8"}, -1, PUT)); + REQUIRE_THROWS(caller.call("dbitpipeline", {"8"}, -1, PUT)); } for (int i = 0; i != det.size(); ++i) { det.setDBITPipeline(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("dbitpipeline", {}, -1, GET)); + REQUIRE_THROWS(caller.call("dbitpipeline", {}, -1, GET)); } } -TEST_CASE("readnrows", "[.cmd]") { +TEST_CASE("readnrows", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER || det_type == defs::JUNGFRAU || det_type == defs::MOENCH) { @@ -1766,46 +1825,46 @@ TEST_CASE("readnrows", "[.cmd]") { if ((det_type == defs::JUNGFRAU || det_type == defs::MOENCH) && !hw2) { { std::ostringstream oss; - proxy.Call("readnrows", {}, -1, GET, oss); + caller.call("readnrows", {}, -1, GET, oss); REQUIRE(oss.str() == "readnrows 512\n"); } } else { auto prev_val = det.getReadNRows(); { std::ostringstream oss; - proxy.Call("readnrows", {"256"}, -1, PUT, oss); + caller.call("readnrows", {"256"}, -1, PUT, oss); REQUIRE(oss.str() == "readnrows 256\n"); } { std::ostringstream oss; - proxy.Call("readnrows", {}, -1, GET, oss); + caller.call("readnrows", {}, -1, GET, oss); REQUIRE(oss.str() == "readnrows 256\n"); } { std::ostringstream oss; - proxy.Call("readnrows", {"16"}, -1, PUT, oss); + caller.call("readnrows", {"16"}, -1, PUT, oss); REQUIRE(oss.str() == "readnrows 16\n"); } if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH) { - REQUIRE_THROWS(proxy.Call("readnrows", {"7"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("readnrows", {"20"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("readnrows", {"44"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("readnrows", {"513"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("readnrows", {"1"}, -1, PUT)); + REQUIRE_THROWS(caller.call("readnrows", {"7"}, -1, PUT)); + REQUIRE_THROWS(caller.call("readnrows", {"20"}, -1, PUT)); + REQUIRE_THROWS(caller.call("readnrows", {"44"}, -1, PUT)); + REQUIRE_THROWS(caller.call("readnrows", {"513"}, -1, PUT)); + REQUIRE_THROWS(caller.call("readnrows", {"1"}, -1, PUT)); } - REQUIRE_THROWS(proxy.Call("readnrows", {"0"}, -1, PUT)); + REQUIRE_THROWS(caller.call("readnrows", {"0"}, -1, PUT)); for (int i = 0; i != det.size(); ++i) { det.setReadNRows(prev_val[i], {i}); } } } else { - REQUIRE_THROWS(proxy.Call("readnrows", {}, -1, GET)); + REQUIRE_THROWS(caller.call("readnrows", {}, -1, GET)); } } -TEST_CASE("currentsource", "[.cmd]") { +TEST_CASE("currentsource", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::GOTTHARD2 || det_type == defs::JUNGFRAU) { @@ -1814,23 +1873,23 @@ TEST_CASE("currentsource", "[.cmd]") { if (det_type == defs::GOTTHARD2) { { std::ostringstream oss; - proxy.Call("currentsource", {"1"}, -1, PUT, oss); + caller.call("currentsource", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "currentsource [1]\n"); } { std::ostringstream oss; - proxy.Call("currentsource", {"0"}, -1, PUT, oss); + caller.call("currentsource", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "currentsource [0]\n"); } { std::ostringstream oss; - proxy.Call("currentsource", {}, -1, GET, oss); + caller.call("currentsource", {}, -1, GET, oss); REQUIRE(oss.str() == "currentsource [disabled]\n"); } REQUIRE_THROWS( - proxy.Call("currentsource", {"1", "fix", "42"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("currentsource", - {"1", "fix", "42", "normal"}, -1, PUT)); + caller.call("currentsource", {"1", "fix", "42"}, -1, PUT)); + REQUIRE_THROWS(caller.call("currentsource", + {"1", "fix", "42", "normal"}, -1, PUT)); } // jungfrau else { @@ -1841,94 +1900,94 @@ TEST_CASE("currentsource", "[.cmd]") { 10; } if (chipVersion == 10) { - REQUIRE_THROWS(proxy.Call("currentsource", {"1"}, -1, PUT)); + REQUIRE_THROWS(caller.call("currentsource", {"1"}, -1, PUT)); REQUIRE_THROWS( - proxy.Call("currentsource", {"1", "fix"}, -1, PUT)); + caller.call("currentsource", {"1", "fix"}, -1, PUT)); REQUIRE_THROWS( - proxy.Call("currentsource", {"1", "fix", "64"}, -1, PUT)); + caller.call("currentsource", {"1", "fix", "64"}, -1, PUT)); REQUIRE_THROWS( - proxy.Call("currentsource", {"1", "dfg", "64"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call( + caller.call("currentsource", {"1", "dfg", "64"}, -1, PUT)); + REQUIRE_THROWS(caller.call( "currentsource", {"1", "fix", "63", "normal"}, -1, PUT)); { std::ostringstream oss; - proxy.Call("currentsource", {"1", "fix", "63"}, -1, PUT, - oss); + caller.call("currentsource", {"1", "fix", "63"}, -1, PUT, + oss); REQUIRE(oss.str() == "currentsource [1, fix, 63]\n"); } { std::ostringstream oss; - proxy.Call("currentsource", {"0"}, -1, PUT, oss); + caller.call("currentsource", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "currentsource [0]\n"); } { std::ostringstream oss; - proxy.Call("currentsource", {}, -1, GET, oss); + caller.call("currentsource", {}, -1, GET, oss); REQUIRE(oss.str() == "currentsource [disabled]\n"); } { std::ostringstream oss; - proxy.Call("currentsource", {"1", "nofix", "63"}, -1, PUT, - oss); + caller.call("currentsource", {"1", "nofix", "63"}, -1, PUT, + oss); REQUIRE(oss.str() == "currentsource [1, nofix, 63]\n"); } { std::ostringstream oss; - proxy.Call("currentsource", {}, -1, GET, oss); + caller.call("currentsource", {}, -1, GET, oss); REQUIRE(oss.str() == "currentsource [enabled, nofix, 63]\n"); } } // chipv1.1 else { - REQUIRE_THROWS(proxy.Call("currentsource", {"1"}, -1, PUT)); + REQUIRE_THROWS(caller.call("currentsource", {"1"}, -1, PUT)); REQUIRE_THROWS( - proxy.Call("currentsource", {"1", "fix"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call( + caller.call("currentsource", {"1", "fix"}, -1, PUT)); + REQUIRE_THROWS(caller.call( "currentsource", {"1", "ffgdfgix", "0x0000000000000041"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call( + REQUIRE_THROWS(caller.call( "currentsource", {"1", "fix", "0x0000000000000041", "normaldgf"}, -1, PUT)); { std::ostringstream oss; - proxy.Call("currentsource", - {"1", "fix", "0x0000000000000041", "normal"}, -1, - PUT, oss); + caller.call("currentsource", + {"1", "fix", "0x0000000000000041", "normal"}, + -1, PUT, oss); REQUIRE( oss.str() == "currentsource [1, fix, 0x0000000000000041, normal]\n"); } { std::ostringstream oss; - proxy.Call("currentsource", {"0"}, -1, PUT, oss); + caller.call("currentsource", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "currentsource [0]\n"); } { std::ostringstream oss; - proxy.Call("currentsource", {}, -1, GET, oss); + caller.call("currentsource", {}, -1, GET, oss); REQUIRE(oss.str() == "currentsource [disabled]\n"); } { std::ostringstream oss; - proxy.Call("currentsource", - {"1", "nofix", "0x0000000000000041", "normal"}, - -1, PUT, oss); + caller.call("currentsource", + {"1", "nofix", "0x0000000000000041", "normal"}, + -1, PUT, oss); REQUIRE(oss.str() == "currentsource [1, nofix, " "0x0000000000000041, normal]\n"); } { std::ostringstream oss; - proxy.Call("currentsource", {}, -1, GET, oss); + caller.call("currentsource", {}, -1, GET, oss); REQUIRE(oss.str() == "currentsource [enabled, nofix, " "0x0000000000000041, normal]\n"); } { std::ostringstream oss; - proxy.Call("currentsource", - {"1", "nofix", "0x0000000000000041", "low"}, -1, - PUT, oss); + caller.call("currentsource", + {"1", "nofix", "0x0000000000000041", "low"}, -1, + PUT, oss); REQUIRE( oss.str() == "currentsource [1, nofix, 0x0000000000000041, low]\n"); @@ -1939,69 +1998,70 @@ TEST_CASE("currentsource", "[.cmd]") { det.setCurrentSource(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("currentsource", {}, -1, GET)); + REQUIRE_THROWS(caller.call("currentsource", {}, -1, GET)); } } /** temperature */ -TEST_CASE("templist", "[.cmd]") { +TEST_CASE("templist", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); - REQUIRE_NOTHROW(proxy.Call("templist", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("templist", {}, -1, PUT)); + Caller caller(&det); + REQUIRE_NOTHROW(caller.call("templist", {}, -1, GET)); + REQUIRE_THROWS(caller.call("templist", {}, -1, PUT)); } -TEST_CASE("tempvalues", "[.cmd]") { +TEST_CASE("tempvalues", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); - REQUIRE_NOTHROW(proxy.Call("tempvalues", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("tempvalues", {}, -1, PUT)); + Caller caller(&det); + REQUIRE_NOTHROW(caller.call("tempvalues", {}, -1, GET)); + REQUIRE_THROWS(caller.call("tempvalues", {}, -1, PUT)); } -TEST_CASE("temp_adc", "[.cmd]") { +TEST_CASE("temp_adc", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH || det_type == defs::GOTTHARD) { - REQUIRE_NOTHROW(proxy.Call("temp_adc", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("temp_adc", {}, -1, GET)); std::ostringstream oss; - REQUIRE_NOTHROW(proxy.Call("temp_adc", {}, 0, GET, oss)); + REQUIRE_NOTHROW(caller.call("temp_adc", {}, 0, GET, oss)); std::string s = (oss.str()).erase(0, strlen("temp_adc ")); REQUIRE(std::stoi(s) != -1); } else { - REQUIRE_THROWS(proxy.Call("temp_adc", {}, -1, GET)); + REQUIRE_THROWS(caller.call("temp_adc", {}, -1, GET)); } } -TEST_CASE("temp_fpga", "[.cmd]") { +TEST_CASE("temp_fpga", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type != defs::CHIPTESTBOARD) { - REQUIRE_NOTHROW(proxy.Call("temp_fpga", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("temp_fpga", {}, -1, GET)); std::ostringstream oss; - REQUIRE_NOTHROW(proxy.Call("temp_fpga", {}, 0, GET, oss)); + REQUIRE_NOTHROW(caller.call("temp_fpga", {}, 0, GET, oss)); std::string s = (oss.str()).erase(0, strlen("temp_fpga ")); REQUIRE(std::stoi(s) != -1); } else { - REQUIRE_THROWS(proxy.Call("temp_fpga", {}, -1, GET)); + REQUIRE_THROWS(caller.call("temp_fpga", {}, -1, GET)); } } /* list */ -TEST_CASE("daclist", "[.cmd]") { +TEST_CASE("daclist", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::CHIPTESTBOARD) { - REQUIRE_NOTHROW(proxy.Call("daclist", {}, -1, GET)); + if (det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD) { + REQUIRE_NOTHROW(caller.call("daclist", {}, -1, GET)); auto prev = det.getDacNames(); - REQUIRE_THROWS(proxy.Call("daclist", {"a", "s", "d"}, -1, PUT)); + REQUIRE_THROWS(caller.call("daclist", {"a", "s", "d"}, -1, PUT)); std::vector names; for (int iarg = 0; iarg != 18; ++iarg) { @@ -2009,38 +2069,39 @@ TEST_CASE("daclist", "[.cmd]") { } { std::ostringstream oss; - REQUIRE_NOTHROW(proxy.Call("daclist", names, -1, PUT, oss)); + REQUIRE_NOTHROW(caller.call("daclist", names, -1, PUT, oss)); } { std::ostringstream oss; - REQUIRE_NOTHROW(proxy.Call("daclist", {}, -1, GET, oss)); + REQUIRE_NOTHROW(caller.call("daclist", {}, -1, GET, oss)); REQUIRE(oss.str() == std::string("daclist ") + ToString(names) + '\n'); } det.setDacNames(prev); } else { - REQUIRE_THROWS(proxy.Call("daclist", {"a", "b"}, -1, PUT)); - REQUIRE_NOTHROW(proxy.Call("daclist", {}, -1, GET)); + REQUIRE_THROWS(caller.call("daclist", {"a", "b"}, -1, PUT)); + REQUIRE_NOTHROW(caller.call("daclist", {}, -1, GET)); } } /* dacs */ -TEST_CASE("dacvalues", "[.cmd]") { +TEST_CASE("dacvalues", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); - REQUIRE_NOTHROW(proxy.Call("dacvalues", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dacvalues", {}, -1, PUT)); + Caller caller(&det); + REQUIRE_NOTHROW(caller.call("dacvalues", {}, -1, GET)); + REQUIRE_THROWS(caller.call("dacvalues", {}, -1, PUT)); } -TEST_CASE("defaultdac", "[.cmd]") { +TEST_CASE("defaultdac", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type != defs::CHIPTESTBOARD) { - REQUIRE_THROWS(proxy.Call("defaultdac", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("defaultdac", {"blabla"}, -1, PUT)); + if (det_type != defs::CHIPTESTBOARD && + det_type != defs::XILINX_CHIPTESTBOARD) { + REQUIRE_THROWS(caller.call("defaultdac", {}, -1, GET)); + REQUIRE_THROWS(caller.call("defaultdac", {"blabla"}, -1, PUT)); auto daclist = det.getDacList(); for (auto it : daclist) { if (it == defs::VTHRESHOLD) { @@ -2050,13 +2111,13 @@ TEST_CASE("defaultdac", "[.cmd]") { auto prev_val = det.getDefaultDac(it); { std::ostringstream oss; - proxy.Call("defaultdac", {dacname, "1000"}, -1, PUT, oss); + caller.call("defaultdac", {dacname, "1000"}, -1, PUT, oss); REQUIRE(oss.str() == std::string("defaultdac ") + dacname + std::string(" 1000\n")); } { std::ostringstream oss; - proxy.Call("defaultdac", {dacname}, -1, GET, oss); + caller.call("defaultdac", {dacname}, -1, GET, oss); REQUIRE(oss.str() == std::string("defaultdac ") + dacname + std::string(" 1000\n")); } @@ -2072,14 +2133,14 @@ TEST_CASE("defaultdac", "[.cmd]") { auto prev_val = det.getDefaultDac(it, defs::GAIN0); { std::ostringstream oss; - proxy.Call("defaultdac", {dacname, "1000", "gain0"}, -1, - PUT, oss); + caller.call("defaultdac", {dacname, "1000", "gain0"}, -1, + PUT, oss); REQUIRE(oss.str() == std::string("defaultdac ") + dacname + std::string(" gain0 1000\n")); } { std::ostringstream oss; - proxy.Call("defaultdac", {dacname, "gain0"}, -1, GET, oss); + caller.call("defaultdac", {dacname, "gain0"}, -1, GET, oss); REQUIRE(oss.str() == std::string("defaultdac ") + dacname + std::string(" gain0 1000\n")); } @@ -2089,20 +2150,21 @@ TEST_CASE("defaultdac", "[.cmd]") { } } } else { - REQUIRE_THROWS(proxy.Call("defaultdac", {}, -1, GET)); + REQUIRE_THROWS(caller.call("defaultdac", {}, -1, GET)); } } -TEST_CASE("resetdacs", "[.cmd]") { +TEST_CASE("resetdacs", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); - if (det_type != defs::CHIPTESTBOARD) { + if (det_type != defs::CHIPTESTBOARD && + det_type != defs::XILINX_CHIPTESTBOARD) { auto prev_val = det.getSettings(); - REQUIRE_THROWS(proxy.Call("resetdacs", {}, -1, GET)); - REQUIRE_NOTHROW(proxy.Call("resetdacs", {}, -1, PUT)); - REQUIRE_NOTHROW(proxy.Call("resetdacs", {"hard"}, -1, PUT)); + REQUIRE_THROWS(caller.call("resetdacs", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("resetdacs", {}, -1, PUT)); + REQUIRE_NOTHROW(caller.call("resetdacs", {"hard"}, -1, PUT)); // settings should not change especially for jungfrau/moench and m3 auto next_val = det.getSettings(); @@ -2110,20 +2172,20 @@ TEST_CASE("resetdacs", "[.cmd]") { REQUIRE(prev_val[i] == next_val[i]); } } else { - REQUIRE_THROWS(proxy.Call("resetdacs", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("resetdacs", {}, -1, PUT)); + REQUIRE_THROWS(caller.call("resetdacs", {}, -1, GET)); + REQUIRE_THROWS(caller.call("resetdacs", {}, -1, PUT)); } } /* acquisition */ -TEST_CASE("trigger", "[.cmd]") { +TEST_CASE("trigger", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); - REQUIRE_THROWS(proxy.Call("trigger", {}, -1, GET)); + Caller caller(&det); + REQUIRE_THROWS(caller.call("trigger", {}, -1, GET)); auto det_type = det.getDetectorType().squash(); if (det_type == defs::MYTHEN3) { - REQUIRE_NOTHROW(proxy.Call("trigger", {}, -1, PUT)); + REQUIRE_NOTHROW(caller.call("trigger", {}, -1, PUT)); } else if (det_type == defs::EIGER || det_type == defs::JUNGFRAU || det_type == defs::MOENCH) { auto prev_timing = @@ -2143,7 +2205,7 @@ TEST_CASE("trigger", "[.cmd]") { det.startDetector(); { std::ostringstream oss; - proxy.Call("trigger", {}, -1, PUT, oss); + caller.call("trigger", {}, -1, PUT, oss); REQUIRE(oss.str() == "trigger successful\n"); } std::this_thread::sleep_for(std::chrono::seconds(2)); @@ -2156,14 +2218,14 @@ TEST_CASE("trigger", "[.cmd]") { det.setExptime(prev_exptime); det.setPeriod(prev_period); } else { - REQUIRE_THROWS(proxy.Call("trigger", {}, -1, PUT)); + REQUIRE_THROWS(caller.call("trigger", {}, -1, PUT)); } } -TEST_CASE("blockingtrigger", "[.cmd]") { +TEST_CASE("blockingtrigger", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); - REQUIRE_THROWS(proxy.Call("blockingtrigger", {}, -1, GET)); + Caller caller(&det); + REQUIRE_THROWS(caller.call("blockingtrigger", {}, -1, GET)); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER || det_type == defs::JUNGFRAU || det_type == defs::MOENCH) { @@ -2184,7 +2246,7 @@ TEST_CASE("blockingtrigger", "[.cmd]") { det.startDetector(); { std::ostringstream oss; - proxy.Call("blockingtrigger", {}, -1, PUT, oss); + caller.call("blockingtrigger", {}, -1, PUT, oss); REQUIRE(oss.str() == "blockingtrigger successful\n"); } if (det.isVirtualDetectorServer().tsquash( @@ -2200,23 +2262,23 @@ TEST_CASE("blockingtrigger", "[.cmd]") { det.setExptime(prev_exptime); det.setPeriod(prev_period); } else { - REQUIRE_THROWS(proxy.Call("blockingtrigger", {}, -1, PUT)); + REQUIRE_THROWS(caller.call("blockingtrigger", {}, -1, PUT)); } } -TEST_CASE("clearbusy", "[.cmd]") { +TEST_CASE("clearbusy", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); - REQUIRE_NOTHROW(proxy.Call("clearbusy", {}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("clearbusy", {"0"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("clearbusy", {}, -1, GET)); + Caller caller(&det); + REQUIRE_NOTHROW(caller.call("clearbusy", {}, -1, PUT)); + REQUIRE_THROWS(caller.call("clearbusy", {"0"}, -1, PUT)); + REQUIRE_THROWS(caller.call("clearbusy", {}, -1, GET)); } -TEST_CASE("start", "[.cmd]") { +TEST_CASE("start", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); // PUT only command - REQUIRE_THROWS(proxy.Call("start", {}, -1, GET)); + REQUIRE_THROWS(caller.call("start", {}, -1, GET)); auto det_type = det.getDetectorType().squash(); std::chrono::nanoseconds prev_val; if (det_type != defs::MYTHEN3) { @@ -2237,12 +2299,12 @@ TEST_CASE("start", "[.cmd]") { det.setNumberOfFrames(2000); { std::ostringstream oss; - proxy.Call("start", {}, -1, PUT, oss); + caller.call("start", {}, -1, PUT, oss); REQUIRE(oss.str() == "start successful\n"); } if (det_type != defs::CHIPTESTBOARD && det_type != defs::MOENCH) { std::ostringstream oss; - proxy.Call("status", {}, -1, GET, oss); + caller.call("status", {}, -1, GET, oss); REQUIRE(oss.str() == "status running\n"); } det.stopDetector(); @@ -2251,11 +2313,11 @@ TEST_CASE("start", "[.cmd]") { det.setNumberOfFrames(prev_frames); } -TEST_CASE("stop", "[.cmd]") { +TEST_CASE("stop", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); // PUT only command - REQUIRE_THROWS(proxy.Call("stop", {}, -1, GET)); + REQUIRE_THROWS(caller.call("stop", {}, -1, GET)); auto det_type = det.getDetectorType().squash(); std::chrono::nanoseconds prev_val; if (det_type != defs::MYTHEN3) { @@ -2277,17 +2339,17 @@ TEST_CASE("stop", "[.cmd]") { det.startDetector(); if (det_type != defs::CHIPTESTBOARD && det_type != defs::MOENCH) { std::ostringstream oss; - proxy.Call("status", {}, -1, GET, oss); + caller.call("status", {}, -1, GET, oss); REQUIRE(oss.str() == "status running\n"); } { std::ostringstream oss; - proxy.Call("stop", {}, -1, PUT, oss); + caller.call("stop", {}, -1, PUT, oss); REQUIRE(oss.str() == "stop successful\n"); } { std::ostringstream oss; - proxy.Call("status", {}, -1, GET, oss); + caller.call("status", {}, -1, GET, oss); REQUIRE(((oss.str() == "status stopped\n") || (oss.str() == "status idle\n"))); } @@ -2296,9 +2358,9 @@ TEST_CASE("stop", "[.cmd]") { det.setNumberOfFrames(prev_frames); } -TEST_CASE("status", "[.cmd]") { +TEST_CASE("status", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); std::chrono::nanoseconds prev_val; if (det_type != defs::MYTHEN3) { @@ -2320,13 +2382,13 @@ TEST_CASE("status", "[.cmd]") { det.startDetector(); if (det_type != defs::CHIPTESTBOARD && det_type != defs::MOENCH) { std::ostringstream oss; - proxy.Call("status", {}, -1, GET, oss); + caller.call("status", {}, -1, GET, oss); REQUIRE(oss.str() == "status running\n"); } det.stopDetector(); { std::ostringstream oss; - proxy.Call("status", {}, -1, GET, oss); + caller.call("status", {}, -1, GET, oss); REQUIRE(((oss.str() == "status stopped\n") || (oss.str() == "status idle\n"))); } @@ -2335,80 +2397,122 @@ TEST_CASE("status", "[.cmd]") { det.setNumberOfFrames(prev_frames); } -TEST_CASE("nextframenumber", "[.cmd]") { +TEST_CASE("nextframenumber", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER || det_type == defs::JUNGFRAU || - det_type == defs::MOENCH || det_type == defs::CHIPTESTBOARD) { + det_type == defs::MOENCH || det_type == defs::CHIPTESTBOARD || + det_type == defs::XILINX_CHIPTESTBOARD || det_type == defs::GOTTHARD2) { auto prev_sfnum = det.getNextFrameNumber(); - REQUIRE_THROWS(proxy.Call("nextframenumber", {"0"}, -1, PUT)); + REQUIRE_THROWS(caller.call("nextframenumber", {"0"}, -1, PUT)); { std::ostringstream oss; - proxy.Call("nextframenumber", {"3"}, -1, PUT, oss); + caller.call("nextframenumber", {"3"}, -1, PUT, oss); REQUIRE(oss.str() == "nextframenumber 3\n"); } { std::ostringstream oss; - proxy.Call("nextframenumber", {}, -1, GET, oss); + caller.call("nextframenumber", {}, -1, GET, oss); REQUIRE(oss.str() == "nextframenumber 3\n"); } { std::ostringstream oss; - proxy.Call("nextframenumber", {"1"}, -1, PUT, oss); + caller.call("nextframenumber", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "nextframenumber 1\n"); } - auto prev_timing = - det.getTimingMode().tsquash("inconsistent timing mode in test"); - auto prev_frames = - det.getNumberOfFrames().tsquash("inconsistent #frames in test"); - auto prev_exptime = - det.getExptime().tsquash("inconsistent exptime in test"); - auto prev_period = - det.getPeriod().tsquash("inconsistent period in test"); - det.setTimingMode(defs::AUTO_TIMING); - det.setNumberOfFrames(1); - det.setExptime(std::chrono::microseconds(200)); - det.setPeriod(std::chrono::milliseconds(1)); - det.startDetector(); - std::this_thread::sleep_for(std::chrono::seconds(2)); - auto currentfnum = - det.getNextFrameNumber().tsquash("inconsistent frame nr in test"); - REQUIRE(currentfnum == 2); - if (det_type == defs::EIGER) { - auto prev_tengiga = - det.getTenGiga().tsquash("inconsistent ten giga enable"); - det.setTenGiga(true); - det.setNextFrameNumber(1); + if (det_type == defs::GOTTHARD2) { + auto prev_timing = + det.getTimingMode().tsquash("inconsistent timing mode in test"); + auto prev_frames = + det.getNumberOfFrames().tsquash("inconsistent #frames in test"); + auto prev_exptime = + det.getExptime().tsquash("inconsistent exptime in test"); + auto prev_period = + det.getPeriod().tsquash("inconsistent period in test"); + auto prev_burstmode = + det.getBurstMode().tsquash("inconsistent burst mode in test"); + auto prev_bursts = + det.getNumberOfBursts().tsquash("inconsistent #bursts in test"); + auto prev_burstperiod = det.getBurstPeriod().tsquash( + "inconsistent burst period in test"); + + det.setTimingMode(defs::AUTO_TIMING); + det.setNumberOfFrames(1); + det.setExptime(std::chrono::microseconds(200)); + det.setPeriod(std::chrono::milliseconds(1)); + det.setBurstMode(defs::CONTINUOUS_EXTERNAL); + det.setNumberOfBursts(1); + det.setBurstPeriod(std::chrono::milliseconds(0)); + det.startDetector(); std::this_thread::sleep_for(std::chrono::seconds(2)); auto currentfnum = det.getNextFrameNumber().tsquash( "inconsistent frame nr in test"); REQUIRE(currentfnum == 2); - det.setTenGiga(prev_tengiga); + + det.setTimingMode(prev_timing); + det.setNumberOfFrames(prev_frames); + det.setExptime(prev_exptime); + det.setPeriod(prev_period); + det.setBurstMode(prev_burstmode); + det.setNumberOfBursts(prev_bursts); + det.setBurstPeriod(prev_burstperiod); + } else { + auto prev_timing = + det.getTimingMode().tsquash("inconsistent timing mode in test"); + auto prev_frames = + det.getNumberOfFrames().tsquash("inconsistent #frames in test"); + auto prev_exptime = + det.getExptime().tsquash("inconsistent exptime in test"); + auto prev_period = + det.getPeriod().tsquash("inconsistent period in test"); + det.setTimingMode(defs::AUTO_TIMING); + det.setNumberOfFrames(1); + det.setExptime(std::chrono::microseconds(200)); + det.setPeriod(std::chrono::milliseconds(1)); + det.startDetector(); + std::this_thread::sleep_for(std::chrono::seconds(2)); + auto currentfnum = det.getNextFrameNumber().tsquash( + "inconsistent frame nr in test"); + REQUIRE(currentfnum == 2); + if (det_type == defs::EIGER) { + auto prev_tengiga = + det.getTenGiga().tsquash("inconsistent ten giga enable"); + det.setTenGiga(true); + det.setNextFrameNumber(1); + det.startDetector(); + std::this_thread::sleep_for(std::chrono::seconds(2)); + auto currentfnum = det.getNextFrameNumber().tsquash( + "inconsistent frame nr in test"); + REQUIRE(currentfnum == 2); + det.setTenGiga(prev_tengiga); + } + + det.setTimingMode(prev_timing); + det.setNumberOfFrames(prev_frames); + det.setExptime(prev_exptime); + det.setPeriod(prev_period); } - det.setTimingMode(prev_timing); - det.setNumberOfFrames(prev_frames); - det.setExptime(prev_exptime); - det.setPeriod(prev_period); for (int i = 0; i != det.size(); ++i) { det.setNextFrameNumber(prev_sfnum[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("nextframenumber", {}, -1, GET)); + REQUIRE_THROWS(caller.call("nextframenumber", {}, -1, GET)); } } -TEST_CASE("scan", "[.cmd]") { +TEST_CASE("scan", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); defs::dacIndex ind = defs::DAC_0; defs::dacIndex notImplementedInd = defs::DAC_0; auto det_type = det.getDetectorType().squash(); switch (det_type) { case defs::CHIPTESTBOARD: + case defs::XILINX_CHIPTESTBOARD: ind = defs::DAC_0; notImplementedInd = defs::VSVP; break; @@ -2449,67 +2553,67 @@ TEST_CASE("scan", "[.cmd]") { } else { { std::ostringstream oss; - proxy.Call("scan", {ToString(ind), "500", "1500", "500"}, -1, PUT, - oss); + caller.call("scan", {ToString(ind), "500", "1500", "500"}, -1, PUT, + oss); CHECK(oss.str() == "scan [" + ToString(ind) + ", 500, 1500, 500]\n"); } { std::ostringstream oss; - proxy.Call("scan", {}, -1, GET, oss); + caller.call("scan", {}, -1, GET, oss); CHECK(oss.str() == "scan [enabled\ndac " + ToString(ind) + "\nstart 500\nstop 1500\nstep " "500\nsettleTime 1ms\n]\n"); } { std::ostringstream oss; - proxy.Call("scan", {ToString(ind), "500", "1500", "500", "2s"}, -1, - PUT, oss); + caller.call("scan", {ToString(ind), "500", "1500", "500", "2s"}, -1, + PUT, oss); CHECK(oss.str() == "scan [" + ToString(ind) + ", 500, 1500, 500, 2s]\n"); } { std::ostringstream oss; - proxy.Call("scan", {}, -1, GET, oss); + caller.call("scan", {}, -1, GET, oss); CHECK(oss.str() == "scan [enabled\ndac " + ToString(ind) + "\nstart 500\nstop 1500\nstep " "500\nsettleTime 2s\n]\n"); } { std::ostringstream oss; - proxy.Call("scan", {"0"}, -1, PUT, oss); + caller.call("scan", {"0"}, -1, PUT, oss); CHECK(oss.str() == "scan [0]\n"); } { std::ostringstream oss; - proxy.Call("scan", {}, -1, GET, oss); + caller.call("scan", {}, -1, GET, oss); CHECK(oss.str() == "scan [disabled]\n"); } { std::ostringstream oss; - proxy.Call("scan", {ToString(ind), "1500", "500", "-500"}, -1, PUT, - oss); + caller.call("scan", {ToString(ind), "1500", "500", "-500"}, -1, PUT, + oss); CHECK(oss.str() == "scan [" + ToString(ind) + ", 1500, 500, -500]\n"); } - CHECK_THROWS(proxy.Call( + CHECK_THROWS(caller.call( "scan", {ToString(notImplementedInd), "500", "1500", "500"}, -1, PUT)); - CHECK_THROWS(proxy.Call("scan", {ToString(ind), "500", "1500", "-500"}, - -1, PUT)); - CHECK_THROWS( - proxy.Call("scan", {ToString(ind), "1500", "500", "500"}, -1, PUT)); + CHECK_THROWS(caller.call("scan", {ToString(ind), "500", "1500", "-500"}, + -1, PUT)); + CHECK_THROWS(caller.call("scan", {ToString(ind), "1500", "500", "500"}, + -1, PUT)); if (det_type == defs::MYTHEN3 || defs::EIGER) { { std::ostringstream oss; - proxy.Call("scan", {"trimbits", "0", "63", "16", "2s"}, -1, PUT, - oss); + caller.call("scan", {"trimbits", "0", "63", "16", "2s"}, -1, + PUT, oss); CHECK(oss.str() == "scan [trimbits, 0, 63, 16, 2s]\n"); } { std::ostringstream oss; - proxy.Call("scan", {}, -1, GET, oss); + caller.call("scan", {}, -1, GET, oss); CHECK(oss.str() == "scan [enabled\ndac trimbits\nstart 0\nstop 48\nstep " "16\nsettleTime 2s\n]\n"); @@ -2524,69 +2628,69 @@ TEST_CASE("scan", "[.cmd]") { // Reset all dacs to previous value // for (int i = 0; i != det.size(); ++i) { // det.setDAC(ind, previous[i], false, {i}); - // det.setDAC(notImplementedInd, notImplementedPrevious[i], false, - // {i}); + // det.setDAC(notImplementedInd, notImplementedPrevious[i], + // false, {i}); // } } } -TEST_CASE("scanerrmsg", "[.cmd]") { +TEST_CASE("scanerrmsg", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); - REQUIRE_NOTHROW(proxy.Call("scanerrmsg", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("scanerrmsg", {""}, -1, PUT)); + Caller caller(&det); + REQUIRE_NOTHROW(caller.call("scanerrmsg", {}, -1, GET)); + REQUIRE_THROWS(caller.call("scanerrmsg", {""}, -1, PUT)); } /* Network Configuration (Detector<->Receiver) */ -TEST_CASE("numinterfaces", "[.cmd]") { +TEST_CASE("numinterfaces", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH) { auto prev_val = det.getNumberofUDPInterfaces().tsquash( "inconsistent numinterfaces to test"); { std::ostringstream oss; - proxy.Call("numinterfaces", {"2"}, -1, PUT, oss); + caller.call("numinterfaces", {"2"}, -1, PUT, oss); REQUIRE(oss.str() == "numinterfaces 2\n"); } { std::ostringstream oss; - proxy.Call("numinterfaces", {"1"}, -1, PUT, oss); + caller.call("numinterfaces", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "numinterfaces 1\n"); } { std::ostringstream oss; - proxy.Call("numinterfaces", {}, -1, GET, oss); + caller.call("numinterfaces", {}, -1, GET, oss); REQUIRE(oss.str() == "numinterfaces 1\n"); } det.setNumberofUDPInterfaces(prev_val); } else if (det_type == defs::EIGER) { - REQUIRE_THROWS(proxy.Call("numinterfaces", {"1"}, -1, PUT)); + REQUIRE_THROWS(caller.call("numinterfaces", {"1"}, -1, PUT)); { std::ostringstream oss; - proxy.Call("numinterfaces", {}, -1, GET, oss); + caller.call("numinterfaces", {}, -1, GET, oss); REQUIRE(oss.str() == "numinterfaces 2\n"); } } else { std::ostringstream oss; - proxy.Call("numinterfaces", {}, -1, GET, oss); + caller.call("numinterfaces", {}, -1, GET, oss); REQUIRE(oss.str() == "numinterfaces 1\n"); - REQUIRE_THROWS(proxy.Call("numinterfaces", {"1"}, -1, PUT)); + REQUIRE_THROWS(caller.call("numinterfaces", {"1"}, -1, PUT)); } - REQUIRE_THROWS(proxy.Call("numinterfaces", {"3"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("numinterfaces", {"0"}, -1, PUT)); + REQUIRE_THROWS(caller.call("numinterfaces", {"3"}, -1, PUT)); + REQUIRE_THROWS(caller.call("numinterfaces", {"0"}, -1, PUT)); } -TEST_CASE("udp_srcip", "[.cmd]") { +TEST_CASE("udp_srcip", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto prev_val = det.getSourceUDPIP(); - REQUIRE_THROWS(proxy.Call("udp_srcip", {"0.0.0.0"}, -1, PUT)); + REQUIRE_THROWS(caller.call("udp_srcip", {"0.0.0.0"}, -1, PUT)); { std::ostringstream oss; - proxy.Call("udp_srcip", {"129.129.205.12"}, -1, PUT, oss); + caller.call("udp_srcip", {"129.129.205.12"}, -1, PUT, oss); REQUIRE(oss.str() == "udp_srcip 129.129.205.12\n"); } for (int i = 0; i != det.size(); ++i) { @@ -2594,91 +2698,91 @@ TEST_CASE("udp_srcip", "[.cmd]") { } } -TEST_CASE("udp_dstlist", "[.cmd]") { +TEST_CASE("udp_dstlist", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH || det_type == defs::EIGER || det_type == defs::MYTHEN3 || det_type == defs::GOTTHARD2) { - REQUIRE_NOTHROW(proxy.Call("udp_dstlist", {}, 0, GET, std::cout, 0)); - REQUIRE_THROWS(proxy.Call( + REQUIRE_NOTHROW(caller.call("udp_dstlist", {}, 0, GET, std::cout, 0)); + REQUIRE_THROWS(caller.call( "udp_dstlist", {"ip=0.0.0.0", "mac=00:00:00:00:00:00", "port=1233"}, -1, PUT, std::cout, 0)); } else { - REQUIRE_THROWS(proxy.Call("udp_dstlist", {}, -1, GET, std::cout, 0)); + REQUIRE_THROWS(caller.call("udp_dstlist", {}, -1, GET, std::cout, 0)); } } -TEST_CASE("udp_numdst", "[.cmd]") { +TEST_CASE("udp_numdst", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH || det_type == defs::EIGER || det_type == defs::MYTHEN3 || det_type == defs::GOTTHARD2) { - REQUIRE_NOTHROW(proxy.Call("udp_numdst", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("udp_numdst", {}, -1, GET)); } else { - REQUIRE_THROWS(proxy.Call("udp_numdst", {}, -1, GET)); + REQUIRE_THROWS(caller.call("udp_numdst", {}, -1, GET)); } } -TEST_CASE("udp_cleardst", "[.cmd]") { +TEST_CASE("udp_cleardst", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); - REQUIRE_THROWS(proxy.Call("udp_cleardst", {}, -1, GET)); + Caller caller(&det); + REQUIRE_THROWS(caller.call("udp_cleardst", {}, -1, GET)); /* dont clear all udp destinations */ - /*REQUIRE_NOTHROW(proxy.Call("udp_cleardst", {}, -1, PUT));*/ + /*REQUIRE_NOTHROW(caller.call("udp_cleardst", {}, -1, PUT));*/ } -TEST_CASE("udp_firstdst", "[.cmd]") { +TEST_CASE("udp_firstdst", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH || det_type == defs::MYTHEN3 || det_type == defs::GOTTHARD2) { auto prev_val = det.getFirstUDPDestination(); { std::ostringstream oss; - proxy.Call("udp_firstdst", {"0"}, -1, PUT, oss); + caller.call("udp_firstdst", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "udp_firstdst 0\n"); } { std::ostringstream oss; - proxy.Call("udp_firstdst", {}, -1, GET, oss); + caller.call("udp_firstdst", {}, -1, GET, oss); REQUIRE(oss.str() == "udp_firstdst 0\n"); } /* { std::ostringstream oss; - proxy.Call("udp_firstdst", {"1"}, -1, PUT, oss); + caller.call("udp_firstdst", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "udp_firstdst 1\n"); } */ - REQUIRE_THROWS(proxy.Call("udp_firstdst", {"33"}, -1, PUT)); + REQUIRE_THROWS(caller.call("udp_firstdst", {"33"}, -1, PUT)); for (int i = 0; i != det.size(); ++i) { det.setFirstUDPDestination(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("udp_firstdst", {}, -1, GET)); + REQUIRE_THROWS(caller.call("udp_firstdst", {}, -1, GET)); } } -TEST_CASE("udp_dstip", "[.cmd]") { +TEST_CASE("udp_dstip", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); - REQUIRE_THROWS(proxy.Call("udp_dstip", {"0.0.0.0"}, -1, PUT)); + Caller caller(&det); + REQUIRE_THROWS(caller.call("udp_dstip", {"0.0.0.0"}, -1, PUT)); } -TEST_CASE("udp_srcmac", "[.cmd]") { +TEST_CASE("udp_srcmac", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto prev_val = det.getSourceUDPMAC(); - REQUIRE_THROWS(proxy.Call("udp_srcmac", {"00:00:00:00:00:00"}, -1, PUT)); + REQUIRE_THROWS(caller.call("udp_srcmac", {"00:00:00:00:00:00"}, -1, PUT)); { std::ostringstream oss; - proxy.Call("udp_srcmac", {"00:50:c2:42:34:12"}, -1, PUT, oss); + caller.call("udp_srcmac", {"00:50:c2:42:34:12"}, -1, PUT, oss); REQUIRE(oss.str() == "udp_srcmac 00:50:c2:42:34:12\n"); } for (int i = 0; i != det.size(); ++i) { @@ -2688,43 +2792,44 @@ TEST_CASE("udp_srcmac", "[.cmd]") { } } -TEST_CASE("udp_dstmac", "[.cmd]") { +TEST_CASE("udp_dstmac", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); - REQUIRE_THROWS(proxy.Call("udp_dstmac", {"00:00:00:00:00:00"}, -1, PUT)); + Caller caller(&det); + REQUIRE_THROWS(caller.call("udp_dstmac", {"00:00:00:00:00:00"}, -1, PUT)); } -TEST_CASE("udp_dstport", "[.cmd]") { +TEST_CASE("udp_dstport", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto prev_val = det.getDestinationUDPPort(); { std::ostringstream oss; - proxy.Call("udp_dstport", {"50084"}, -1, PUT, oss); + caller.call("udp_dstport", {"50084"}, -1, PUT, oss); REQUIRE(oss.str() == "udp_dstport 50084\n"); } - test_valid_port("udp_dstport", {}, -1, PUT); - test_valid_port("udp_dstport", {}, 0, PUT); + test_valid_port_caller("udp_dstport", {}, -1, PUT); + test_valid_port_caller("udp_dstport", {}, 0, PUT); // should fail for the second module if (det.size() > 1) { - REQUIRE_THROWS(proxy.Call("udp_dstport", {"65535"}, -1, PUT)); + REQUIRE_THROWS(caller.call("udp_dstport", {"65535"}, -1, PUT)); } + for (int i = 0; i != det.size(); ++i) { det.setDestinationUDPPort(prev_val[i], {i}); } } -TEST_CASE("udp_srcip2", "[.cmd]") { +TEST_CASE("udp_srcip2", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH || det_type == defs::GOTTHARD2) { auto prev_val = det.getSourceUDPIP2(); - REQUIRE_THROWS(proxy.Call("udp_srcip2", {"0.0.0.0"}, -1, PUT)); + REQUIRE_THROWS(caller.call("udp_srcip2", {"0.0.0.0"}, -1, PUT)); { std::ostringstream oss; - proxy.Call("udp_srcip2", {"129.129.205.12"}, -1, PUT, oss); + caller.call("udp_srcip2", {"129.129.205.12"}, -1, PUT, oss); REQUIRE(oss.str() == "udp_srcip2 129.129.205.12\n"); } for (int i = 0; i != det.size(); ++i) { @@ -2732,34 +2837,34 @@ TEST_CASE("udp_srcip2", "[.cmd]") { det.setSourceUDPIP2(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("udp_srcip2", {}, -1, GET)); + REQUIRE_THROWS(caller.call("udp_srcip2", {}, -1, GET)); } } -TEST_CASE("udp_dstip2", "[.cmd]") { +TEST_CASE("udp_dstip2", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH || det_type == defs::GOTTHARD2) { - REQUIRE_THROWS(proxy.Call("udp_dstip2", {"0.0.0.0"}, -1, PUT)); + REQUIRE_THROWS(caller.call("udp_dstip2", {"0.0.0.0"}, -1, PUT)); } else { - REQUIRE_THROWS(proxy.Call("udp_dstip2", {}, -1, GET)); + REQUIRE_THROWS(caller.call("udp_dstip2", {}, -1, GET)); } } -TEST_CASE("udp_srcmac2", "[.cmd]") { +TEST_CASE("udp_srcmac2", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH || det_type == defs::GOTTHARD2) { auto prev_val = det.getSourceUDPMAC2(); REQUIRE_THROWS( - proxy.Call("udp_srcmac2", {"00:00:00:00:00:00"}, -1, PUT)); + caller.call("udp_srcmac2", {"00:00:00:00:00:00"}, -1, PUT)); { std::ostringstream oss; - proxy.Call("udp_srcmac2", {"00:50:c2:42:34:12"}, -1, PUT, oss); + caller.call("udp_srcmac2", {"00:50:c2:42:34:12"}, -1, PUT, oss); REQUIRE(oss.str() == "udp_srcmac2 00:50:c2:42:34:12\n"); } for (int i = 0; i != det.size(); ++i) { @@ -2768,41 +2873,40 @@ TEST_CASE("udp_srcmac2", "[.cmd]") { } } } else { - REQUIRE_THROWS(proxy.Call("udp_srcmac2", {}, -1, GET)); + REQUIRE_THROWS(caller.call("udp_srcmac2", {}, -1, GET)); } } -TEST_CASE("udp_dstmac2", "[.cmd]") { +TEST_CASE("udp_dstmac2", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH || det_type == defs::GOTTHARD2) { REQUIRE_THROWS( - proxy.Call("udp_dstmac2", {"00:00:00:00:00:00"}, -1, PUT)); + caller.call("udp_dstmac2", {"00:00:00:00:00:00"}, -1, PUT)); } else { - REQUIRE_THROWS(proxy.Call("udp_dstmac2", {}, -1, GET)); + REQUIRE_THROWS(caller.call("udp_dstmac2", {}, -1, GET)); } } -TEST_CASE("udp_dstport2", "[.cmd]") { +TEST_CASE("udp_dstport2", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH || det_type == defs::GOTTHARD2 || det_type == defs::EIGER) { auto prev_val = det.getDestinationUDPPort2(); { std::ostringstream oss; - proxy.Call("udp_dstport2", {"50084"}, -1, PUT, oss); + caller.call("udp_dstport2", {"50084"}, -1, PUT, oss); REQUIRE(oss.str() == "udp_dstport2 50084\n"); } - - test_valid_port("udp_dstport2", {}, -1, PUT); - test_valid_port("udp_dstport2", {}, 0, PUT); + test_valid_port_caller("udp_dstport2", {}, -1, PUT); + test_valid_port_caller("udp_dstport2", {}, 0, PUT); // should fail for the second module if (det.size() > 1) { - REQUIRE_THROWS(proxy.Call("udp_dstport2", {"65535"}, -1, PUT)); + REQUIRE_THROWS(caller.call("udp_dstport2", {"65535"}, -1, PUT)); } for (int i = 0; i != det.size(); ++i) { @@ -2811,27 +2915,27 @@ TEST_CASE("udp_dstport2", "[.cmd]") { } } } else { - REQUIRE_THROWS(proxy.Call("udp_dstport2", {}, -1, GET)); + REQUIRE_THROWS(caller.call("udp_dstport2", {}, -1, GET)); } } -TEST_CASE("udp_reconfigure", "[.cmd]") { +TEST_CASE("udp_reconfigure", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); - REQUIRE_THROWS(proxy.Call("udp_reconfigure", {}, -1, GET)); - REQUIRE_NOTHROW(proxy.Call("udp_reconfigure", {}, -1, PUT)); + Caller caller(&det); + REQUIRE_THROWS(caller.call("udp_reconfigure", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("udp_reconfigure", {}, -1, PUT)); } -TEST_CASE("udp_validate", "[.cmd]") { +TEST_CASE("udp_validate", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); - REQUIRE_THROWS(proxy.Call("udp_validate", {}, -1, GET)); - REQUIRE_NOTHROW(proxy.Call("udp_validate", {}, -1, PUT)); + Caller caller(&det); + REQUIRE_THROWS(caller.call("udp_validate", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("udp_validate", {}, -1, PUT)); } -TEST_CASE("tengiga", "[.cmd]") { +TEST_CASE("tengiga", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER || det_type == defs::CHIPTESTBOARD || @@ -2840,22 +2944,22 @@ TEST_CASE("tengiga", "[.cmd]") { det.setTenGiga(false); std::ostringstream oss1, oss2; - proxy.Call("tengiga", {"1"}, -1, PUT, oss1); + caller.call("tengiga", {"1"}, -1, PUT, oss1); REQUIRE(oss1.str() == "tengiga 1\n"); - proxy.Call("tengiga", {}, -1, GET, oss2); + caller.call("tengiga", {}, -1, GET, oss2); REQUIRE(oss2.str() == "tengiga 1\n"); for (int i = 0; i != det.size(); ++i) { det.setTenGiga(tengiga[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("tengiga", {}, -1, GET)); + REQUIRE_THROWS(caller.call("tengiga", {}, -1, GET)); } } -TEST_CASE("flowcontrol10g", "[.cmd]") { +TEST_CASE("flowcontrol10g", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER || det_type == defs::JUNGFRAU || @@ -2863,30 +2967,30 @@ TEST_CASE("flowcontrol10g", "[.cmd]") { auto prev_val = det.getTenGigaFlowControl(); { std::ostringstream oss; - proxy.Call("flowcontrol10g", {"1"}, -1, PUT, oss); + caller.call("flowcontrol10g", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "flowcontrol10g 1\n"); } { std::ostringstream oss; - proxy.Call("flowcontrol10g", {"0"}, -1, PUT, oss); + caller.call("flowcontrol10g", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "flowcontrol10g 0\n"); } { std::ostringstream oss; - proxy.Call("flowcontrol10g", {}, -1, GET, oss); + caller.call("flowcontrol10g", {}, -1, GET, oss); REQUIRE(oss.str() == "flowcontrol10g 0\n"); } for (int i = 0; i != det.size(); ++i) { det.setTenGigaFlowControl(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("flowcontrol10g", {}, -1, GET)); + REQUIRE_THROWS(caller.call("flowcontrol10g", {}, -1, GET)); } } -TEST_CASE("txdelay_frame", "[.cmd]") { +TEST_CASE("txdelay_frame", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER || det_type == defs::JUNGFRAU || det_type == defs::MOENCH || det_type == defs::MYTHEN3) { @@ -2899,22 +3003,22 @@ TEST_CASE("txdelay_frame", "[.cmd]") { std::string sval = std::to_string(val); { std::ostringstream oss1, oss2; - proxy.Call("txdelay_frame", {sval}, -1, PUT, oss1); + caller.call("txdelay_frame", {sval}, -1, PUT, oss1); REQUIRE(oss1.str() == "txdelay_frame " + sval + "\n"); - proxy.Call("txdelay_frame", {}, -1, GET, oss2); + caller.call("txdelay_frame", {}, -1, GET, oss2); REQUIRE(oss2.str() == "txdelay_frame " + sval + "\n"); } for (int i = 0; i != det.size(); ++i) { det.setTransmissionDelayFrame(prev_val[i]); } } else { - REQUIRE_THROWS(proxy.Call("txdelay_frame", {}, -1, GET)); + REQUIRE_THROWS(caller.call("txdelay_frame", {}, -1, GET)); } } -TEST_CASE("txdelay", "[.cmd]") { +TEST_CASE("txdelay", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER || det_type == defs::JUNGFRAU || det_type == defs::MOENCH || det_type == defs::MYTHEN3) { @@ -2923,12 +3027,12 @@ TEST_CASE("txdelay", "[.cmd]") { if ((det_type == defs::JUNGFRAU || det_type == defs::MOENCH || det_type == defs::MYTHEN3) && (det.size() < 2)) { - REQUIRE_THROWS(proxy.Call("txdelay", {}, -1, GET)); + REQUIRE_THROWS(caller.call("txdelay", {}, -1, GET)); int val = 5; std::string sval = std::to_string(val); { std::ostringstream oss1; - proxy.Call("txdelay", {sval}, -1, PUT, oss1); + caller.call("txdelay", {sval}, -1, PUT, oss1); REQUIRE(oss1.str() == "txdelay " + sval + "\n"); } } @@ -2950,9 +3054,9 @@ TEST_CASE("txdelay", "[.cmd]") { std::string sval = std::to_string(val); { std::ostringstream oss1, oss2; - proxy.Call("txdelay", {sval}, -1, PUT, oss1); + caller.call("txdelay", {sval}, -1, PUT, oss1); REQUIRE(oss1.str() == "txdelay " + sval + "\n"); - proxy.Call("txdelay", {}, -1, GET, oss2); + caller.call("txdelay", {}, -1, GET, oss2); REQUIRE(oss2.str() == "txdelay " + sval + "\n"); } // test other mods @@ -2970,8 +3074,8 @@ TEST_CASE("txdelay", "[.cmd]") { } } // not a module level command - REQUIRE_THROWS(proxy.Call("txdelay", {"5"}, 0, PUT)); - REQUIRE_THROWS(proxy.Call("txdelay", {}, 0, GET)); + REQUIRE_THROWS(caller.call("txdelay", {"5"}, 0, PUT)); + REQUIRE_THROWS(caller.call("txdelay", {}, 0, GET)); for (int i = 0; i != det.size(); ++i) { if (eiger) { @@ -2982,15 +3086,15 @@ TEST_CASE("txdelay", "[.cmd]") { } } } else { - REQUIRE_THROWS(proxy.Call("txdelay", {}, -1, GET)); + REQUIRE_THROWS(caller.call("txdelay", {}, -1, GET)); } } /* ZMQ Streaming Parameters (Receiver<->Client) */ -TEST_CASE("zmqport", "[.cmd]") { +TEST_CASE("zmqport", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); int socketsperdetector = 1; auto det_type = det.getDetectorType().squash(); @@ -3006,12 +3110,12 @@ TEST_CASE("zmqport", "[.cmd]") { auto port_str = std::to_string(port); { std::ostringstream oss; - proxy.Call("zmqport", {port_str}, -1, PUT, oss); + caller.call("zmqport", {port_str}, -1, PUT, oss); REQUIRE(oss.str() == "zmqport " + port_str + '\n'); } for (int i = 0; i != det.size(); ++i) { std::ostringstream oss; - proxy.Call("zmqport", {}, i, GET, oss); + caller.call("zmqport", {}, i, GET, oss); REQUIRE(oss.str() == "zmqport " + std::to_string(port + i * socketsperdetector) + '\n'); @@ -3021,65 +3125,66 @@ TEST_CASE("zmqport", "[.cmd]") { port_str = std::to_string(port); { std::ostringstream oss; - proxy.Call("zmqport", {port_str}, -1, PUT, oss); + caller.call("zmqport", {port_str}, -1, PUT, oss); REQUIRE(oss.str() == "zmqport " + port_str + '\n'); } for (int i = 0; i != det.size(); ++i) { std::ostringstream oss; - proxy.Call("zmqport", {}, i, GET, oss); + caller.call("zmqport", {}, i, GET, oss); REQUIRE(oss.str() == "zmqport " + std::to_string(port + i * socketsperdetector) + '\n'); } - test_valid_port("zmqport", {}, -1, PUT); - test_valid_port("zmqport", {}, 0, PUT); + test_valid_port_caller("zmqport", {}, -1, PUT); + test_valid_port_caller("zmqport", {}, 0, PUT); // should fail for the second module if (det.size() > 1) { - REQUIRE_THROWS(proxy.Call("zmqport", {"65535"}, -1, PUT)); + REQUIRE_THROWS(caller.call("zmqport", {"65535"}, -1, PUT)); } + if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH) { det.setNumberofUDPInterfaces(prev); } } -TEST_CASE("zmqip", "[.cmd]") { +TEST_CASE("zmqip", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); std::ostringstream oss1, oss2; auto zmqip = det.getClientZmqIp(); - proxy.Call("zmqip", {}, 0, GET, oss1); + caller.call("zmqip", {}, 0, GET, oss1); REQUIRE(oss1.str() == "zmqip " + zmqip[0].str() + '\n'); - proxy.Call("zmqip", {zmqip[0].str()}, 0, PUT, oss2); + caller.call("zmqip", {zmqip[0].str()}, 0, PUT, oss2); REQUIRE(oss2.str() == "zmqip " + zmqip[0].str() + '\n'); for (int i = 0; i != det.size(); ++i) { - det.setRxZmqIP(zmqip[i], {i}); + det.setClientZmqIp(zmqip[i], {i}); } } -TEST_CASE("zmqhwm", "[.cmd]") { +TEST_CASE("zmqhwm", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto prev_val = det.getClientZmqHwm(); { std::ostringstream oss; - proxy.Call("zmqhwm", {"50"}, -1, PUT, oss); + caller.call("zmqhwm", {"50"}, -1, PUT, oss); REQUIRE(oss.str() == "zmqhwm 50\n"); } { std::ostringstream oss; - proxy.Call("zmqhwm", {}, -1, GET, oss); + caller.call("zmqhwm", {}, -1, GET, oss); REQUIRE(oss.str() == "zmqhwm 50\n"); } { std::ostringstream oss; - proxy.Call("zmqhwm", {"0"}, -1, PUT, oss); + caller.call("zmqhwm", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "zmqhwm 0\n"); } { std::ostringstream oss; - proxy.Call("zmqhwm", {"-1"}, -1, PUT, oss); + caller.call("zmqhwm", {"-1"}, -1, PUT, oss); REQUIRE(oss.str() == "zmqhwm -1\n"); } det.setClientZmqHwm(prev_val); @@ -3087,296 +3192,333 @@ TEST_CASE("zmqhwm", "[.cmd]") { /* Advanced */ -TEST_CASE("adcpipeline", "[.cmd]") { +TEST_CASE("adcpipeline", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::CHIPTESTBOARD || det_type == defs::MOENCH) { auto prev_val = det.getADCPipeline(); { std::ostringstream oss; - proxy.Call("adcpipeline", {"1"}, -1, PUT, oss); + caller.call("adcpipeline", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "adcpipeline 1\n"); } { std::ostringstream oss; - proxy.Call("adcpipeline", {"0"}, -1, PUT, oss); + caller.call("adcpipeline", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "adcpipeline 0\n"); } { std::ostringstream oss; - proxy.Call("adcpipeline", {"15"}, -1, PUT, oss); + caller.call("adcpipeline", {"15"}, -1, PUT, oss); REQUIRE(oss.str() == "adcpipeline 15\n"); } { std::ostringstream oss; - proxy.Call("adcpipeline", {}, -1, GET, oss); + caller.call("adcpipeline", {}, -1, GET, oss); REQUIRE(oss.str() == "adcpipeline 15\n"); } for (int i = 0; i != det.size(); ++i) { det.setADCPipeline(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("adcpipeline", {}, -1, GET)); + REQUIRE_THROWS(caller.call("adcpipeline", {}, -1, GET)); } } -TEST_CASE("programfpga", "[.cmd]") { +TEST_CASE("programfpga", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::CHIPTESTBOARD || det_type == defs::JUNGFRAU || det_type == defs::MOENCH || det_type == defs::MYTHEN3 || det_type == defs::GOTTHARD2) { // TODO program a real board? /// afs/psi.ch/project/sls_det_firmware/jungfrau_firmware/cyclone_V/v0_8/Jungfrau_MCB.pof - REQUIRE_THROWS(proxy.Call("programfpga", {}, -1, GET)); + REQUIRE_THROWS(caller.call("programfpga", {}, -1, GET)); } else { - REQUIRE_THROWS(proxy.Call("programfpga", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("programfpga", {"/tmp/test.pof"}, -1, PUT)); + REQUIRE_THROWS(caller.call("programfpga", {}, -1, GET)); + REQUIRE_THROWS(caller.call("programfpga", {"/tmp/test.pof"}, -1, PUT)); } } -TEST_CASE("resetfpga", "[.cmd]") { +TEST_CASE("resetfpga", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU || det_type == defs::CHIPTESTBOARD || - det_type == defs::MOENCH) { + det_type == defs::MOENCH || det_type == defs::XILINX_CHIPTESTBOARD) { // reset will also reset udp info from config file (comment out for - // invdividual tests) std::ostringstream oss; proxy.Call("resetfpga", + // invdividual tests) std::ostringstream oss; caller.call("resetfpga", // {}, -1, PUT, oss); REQUIRE(oss.str() == "resetfpga successful\n"); - REQUIRE_THROWS(proxy.Call("resetfpga", {}, -1, GET)); + REQUIRE_THROWS(caller.call("resetfpga", {}, -1, GET)); } else { - REQUIRE_THROWS(proxy.Call("resetfpga", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("resetfpga", {}, -1, PUT)); + REQUIRE_THROWS(caller.call("resetfpga", {}, -1, GET)); + REQUIRE_THROWS(caller.call("resetfpga", {}, -1, PUT)); } } -TEST_CASE("updatekernel", "[.cmd]") { +TEST_CASE("updatekernel", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH || det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3 || det_type == defs::GOTTHARD2) { // TODO: send real server? // std::ostringstream oss; - // proxy.Call("updatekernel",{"juImage_detector.lzma", + // caller.call("updatekernel",{"juImage_detector.lzma", // "pc13784"}, -1, PUT, oss); // REQUIRE(oss.str() == "updatekernel successful\n"); - REQUIRE_THROWS(proxy.Call("updatekernel", {}, -1, GET)); + REQUIRE_THROWS(caller.call("updatekernel", {}, -1, GET)); } else { - REQUIRE_THROWS(proxy.Call("updatekernel", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("updatekernel", {}, -1, PUT)); + REQUIRE_THROWS(caller.call("updatekernel", {}, -1, GET)); + REQUIRE_THROWS(caller.call("updatekernel", {}, -1, PUT)); } } -TEST_CASE("rebootcontroller", "[.cmd]") { +TEST_CASE("rebootcontroller", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH || det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3 || - det_type == defs::GOTTHARD2 || det_type == defs::GOTTHARD) { + det_type == defs::GOTTHARD2 || det_type == defs::GOTTHARD || + det_type == defs::XILINX_CHIPTESTBOARD) { // TODO: reboot real server? - // REQUIRE_NOTHROW(proxy.Call("rebootcontroller", {}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("rebootcontroller", {}, -1, GET)); + // REQUIRE_NOTHROW(caller.call("rebootcontroller", {}, -1, PUT)); + REQUIRE_THROWS(caller.call("rebootcontroller", {}, -1, GET)); } else { - REQUIRE_THROWS(proxy.Call("rebootcontroller", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("rebootcontroller", {}, -1, PUT)); + REQUIRE_THROWS(caller.call("rebootcontroller", {}, -1, GET)); + REQUIRE_THROWS(caller.call("rebootcontroller", {}, -1, PUT)); } } -TEST_CASE("update", "[.cmd]") { +TEST_CASE("update", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH || det_type == defs::CHIPTESTBOARD) { // TODO: update real server and firmware? - // REQUIRE_NOTHROW(proxy.Call("update", + // REQUIRE_NOTHROW(caller.call("update", // {"jungfrauDetectorServerv4.0.1.0", "pc13784", // "/afs/psi.ch/project/sls_det_firmware/jungfrau_firmware/cyclone_V/v0_8/Jungfrau_MCB.pof"}, // -1, PUT)); - REQUIRE_THROWS(proxy.Call("update", {}, -1, GET)); + REQUIRE_THROWS(caller.call("update", {}, -1, GET)); } else { - REQUIRE_THROWS(proxy.Call("update", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("update", {}, -1, PUT)); + REQUIRE_THROWS(caller.call("update", {}, -1, GET)); + REQUIRE_THROWS(caller.call("update", {}, -1, PUT)); } } -TEST_CASE("reg", "[.cmd]") { +TEST_CASE("reg", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type != defs::EIGER) { uint32_t addr = 0x64; + if (det_type == defs::MYTHEN3) { + addr = 0x80; + } + if (det_type == defs::GOTTHARD2) { + addr = 0x20; + } std::string saddr = ToStringHex(addr); auto prev_val = det.readRegister(addr); { std::ostringstream oss1, oss2; - proxy.Call("reg", {saddr, "0x5"}, -1, PUT, oss1); + caller.call("reg", {saddr, "0x6", "--validate"}, -1, PUT, oss1); + REQUIRE(oss1.str() == "reg [" + saddr + ", 0x6]\n"); + caller.call("reg", {saddr}, -1, GET, oss2); + REQUIRE(oss2.str() == "reg 0x6\n"); + } + { + std::ostringstream oss1, oss2; + caller.call("reg", {saddr, "0x5"}, -1, PUT, oss1); REQUIRE(oss1.str() == "reg [" + saddr + ", 0x5]\n"); - proxy.Call("reg", {saddr}, -1, GET, oss2); + caller.call("reg", {saddr}, -1, GET, oss2); REQUIRE(oss2.str() == "reg 0x5\n"); } for (int i = 0; i != det.size(); ++i) { - det.writeRegister(addr, prev_val[i], {i}); + det.writeRegister(addr, prev_val[i], false, {i}); } } // cannot check for eiger virtual server else { - REQUIRE_NOTHROW(proxy.Call("reg", {"0x64"}, -1, GET)); + REQUIRE_NOTHROW(caller.call("reg", {"0x64"}, -1, GET)); } } -TEST_CASE("adcreg", "[.cmd]") { +TEST_CASE("adcreg", "[.cmdcall]") { // TODO! what is a safe value to use? Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH || det_type == defs::CHIPTESTBOARD || det_type == defs::GOTTHARD) { std::ostringstream oss; - proxy.Call("adcreg", {"0x8", "0x3"}, -1, PUT, oss); + caller.call("adcreg", {"0x8", "0x3"}, -1, PUT, oss); REQUIRE(oss.str() == "adcreg [0x8, 0x3]\n"); // This is a put only command - REQUIRE_THROWS(proxy.Call("adcreg", {}, -1, GET)); + REQUIRE_THROWS(caller.call("adcreg", {}, -1, GET)); } else { - REQUIRE_THROWS(proxy.Call("adcreg", {"0x0", "0"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call("adcreg", {}, -1, GET)); + REQUIRE_THROWS(caller.call("adcreg", {"0x0", "0"}, -1, PUT)); + REQUIRE_THROWS(caller.call("adcreg", {}, -1, GET)); } } -TEST_CASE("setbit", "[.cmd]") { +TEST_CASE("setbit", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type != defs::EIGER) { uint32_t addr = 0x64; + if (det_type == defs::MYTHEN3) { + addr = 0x80; + } + if (det_type == defs::GOTTHARD2) { + addr = 0x20; + } std::string saddr = ToStringHex(addr); auto prev_val = det.readRegister(addr); { - std::ostringstream oss1, oss2; - proxy.Call("reg", {saddr, "0x0"}, -1, PUT); - proxy.Call("setbit", {saddr, "1"}, -1, PUT, oss1); + std::ostringstream oss1, oss2, oss3; + caller.call("reg", {saddr, "0x0"}, -1, PUT); + caller.call("setbit", {saddr, "1"}, -1, PUT, oss1); REQUIRE(oss1.str() == "setbit [" + saddr + ", 1]\n"); - proxy.Call("reg", {saddr}, -1, GET, oss2); - REQUIRE(oss2.str() == "reg 0x2\n"); + caller.call("setbit", {saddr, "2", "--validate"}, -1, PUT, oss2); + REQUIRE(oss2.str() == "setbit [" + saddr + ", 2]\n"); + caller.call("reg", {saddr}, -1, GET, oss3); + REQUIRE(oss3.str() == "reg 0x6\n"); } for (int i = 0; i != det.size(); ++i) { - det.writeRegister(addr, prev_val[i], {i}); + det.writeRegister(addr, prev_val[i], false, {i}); } } } -TEST_CASE("clearbit", "[.cmd]") { +TEST_CASE("clearbit", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type != defs::EIGER) { uint32_t addr = 0x64; + if (det_type == defs::MYTHEN3) { + addr = 0x80; + } + if (det_type == defs::GOTTHARD2) { + addr = 0x20; + } std::string saddr = ToStringHex(addr); auto prev_val = det.readRegister(addr); { - std::ostringstream oss1, oss2; - proxy.Call("reg", {saddr, "0x3"}, -1, PUT); - proxy.Call("clearbit", {saddr, "1"}, -1, PUT, oss1); + std::ostringstream oss1, oss2, oss3; + caller.call("reg", {saddr, "0x7"}, -1, PUT); + caller.call("clearbit", {saddr, "1"}, -1, PUT, oss1); REQUIRE(oss1.str() == "clearbit [" + saddr + ", 1]\n"); - proxy.Call("reg", {saddr}, -1, GET, oss2); - REQUIRE(oss2.str() == "reg 0x1\n"); + caller.call("clearbit", {saddr, "2", "--validate"}, -1, PUT, oss2); + REQUIRE(oss2.str() == "clearbit [" + saddr + ", 2]\n"); + caller.call("reg", {saddr}, -1, GET, oss3); + REQUIRE(oss3.str() == "reg 0x1\n"); } for (int i = 0; i != det.size(); ++i) { - det.writeRegister(addr, prev_val[i], {i}); + det.writeRegister(addr, prev_val[i], false, {i}); } } } -TEST_CASE("getbit", "[.cmd]") { +TEST_CASE("getbit", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type != defs::EIGER) { uint32_t addr = 0x64; + if (det_type == defs::MYTHEN3) { + addr = 0x80; + } + if (det_type == defs::GOTTHARD2) { + addr = 0x20; + } std::string saddr = ToStringHex(addr); auto prev_val = det.readRegister(addr); { std::ostringstream oss1, oss2; - proxy.Call("reg", {saddr, "0x3"}, -1, PUT); - proxy.Call("getbit", {saddr, "1"}, -1, GET, oss1); + caller.call("reg", {saddr, "0x3"}, -1, PUT); + caller.call("getbit", {saddr, "1"}, -1, GET, oss1); REQUIRE(oss1.str() == "getbit 1\n"); } for (int i = 0; i != det.size(); ++i) { - det.writeRegister(addr, prev_val[i], {i}); + det.writeRegister(addr, prev_val[i], false, {i}); } } // cannot check for eiger virtual server else { - REQUIRE_NOTHROW(proxy.Call("getbit", {"0x64", "1"}, -1, GET)); + REQUIRE_NOTHROW(caller.call("getbit", {"0x64", "1"}, -1, GET)); } } -TEST_CASE("firmwaretest", "[.cmd]") { +TEST_CASE("firmwaretest", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH || det_type == defs::CHIPTESTBOARD || det_type == defs::GOTTHARD || - det_type == defs::MYTHEN3 || det_type == defs::GOTTHARD2) { + det_type == defs::MYTHEN3 || det_type == defs::GOTTHARD2 || + det_type == defs::XILINX_CHIPTESTBOARD) { std::ostringstream oss; - proxy.Call("firmwaretest", {}, -1, PUT, oss); + caller.call("firmwaretest", {}, -1, PUT, oss); REQUIRE(oss.str() == "firmwaretest successful\n"); - REQUIRE_THROWS(proxy.Call("firmwaretest", {}, -1, GET)); + REQUIRE_THROWS(caller.call("firmwaretest", {}, -1, GET)); } else { - REQUIRE_THROWS(proxy.Call("firmwaretest", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("firmwaretest", {}, -1, PUT)); + REQUIRE_THROWS(caller.call("firmwaretest", {}, -1, GET)); + REQUIRE_THROWS(caller.call("firmwaretest", {}, -1, PUT)); } } -TEST_CASE("bustest", "[.cmd]") { +TEST_CASE("bustest", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH || det_type == defs::CHIPTESTBOARD || det_type == defs::GOTTHARD || det_type == defs::MYTHEN3 || det_type == defs::GOTTHARD2) { std::ostringstream oss; - proxy.Call("bustest", {}, -1, PUT, oss); + caller.call("bustest", {}, -1, PUT, oss); REQUIRE(oss.str() == "bustest successful\n"); - REQUIRE_THROWS(proxy.Call("bustest", {}, -1, GET)); + REQUIRE_THROWS(caller.call("bustest", {}, -1, GET)); } else { - REQUIRE_THROWS(proxy.Call("bustest", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("bustest", {}, -1, PUT)); + REQUIRE_THROWS(caller.call("bustest", {}, -1, GET)); + REQUIRE_THROWS(caller.call("bustest", {}, -1, PUT)); } } -TEST_CASE("initialchecks", "[.cmd]") { +TEST_CASE("initialchecks", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto check = det.getInitialChecks(); { std::ostringstream oss; - proxy.Call("initialchecks", {"0"}, -1, PUT, oss); + caller.call("initialchecks", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "initialchecks 0\n"); } { std::ostringstream oss; - proxy.Call("initialchecks", {}, -1, GET, oss); + caller.call("initialchecks", {}, -1, GET, oss); REQUIRE(oss.str() == "initialchecks 0\n"); } { std::ostringstream oss; - proxy.Call("initialchecks", {}, -1, GET, oss); + caller.call("initialchecks", {}, -1, GET, oss); REQUIRE(oss.str() == "initialchecks 0\n"); } det.setInitialChecks(check); } -TEST_CASE("adcinvert", "[.cmd]") { +TEST_CASE("adcinvert", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::CHIPTESTBOARD || det_type == defs::JUNGFRAU || @@ -3384,87 +3526,89 @@ TEST_CASE("adcinvert", "[.cmd]") { auto prev_val = det.getADCInvert(); { std::ostringstream oss; - proxy.Call("adcinvert", {"0x8d0a21d4"}, -1, PUT, oss); + caller.call("adcinvert", {"0x8d0a21d4"}, -1, PUT, oss); REQUIRE(oss.str() == "adcinvert 0x8d0a21d4\n"); } { std::ostringstream oss; - proxy.Call("adcinvert", {}, -1, GET, oss); + caller.call("adcinvert", {}, -1, GET, oss); REQUIRE(oss.str() == "adcinvert 0x8d0a21d4\n"); } for (int i = 0; i != det.size(); ++i) { det.setADCInvert(prev_val[i], {i}); } } else { - REQUIRE_THROWS(proxy.Call("adcinvert", {}, -1, GET)); + REQUIRE_THROWS(caller.call("adcinvert", {}, -1, GET)); } } /* Insignificant */ -TEST_CASE("port", "[.cmd]") { +TEST_CASE("port", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto prev_val = det.getControlPort({0}).squash(); { std::ostringstream oss; - proxy.Call("port", {"1942"}, 0, PUT, oss); + caller.call("port", {"1942"}, 0, PUT, oss); REQUIRE(oss.str() == "port 1942\n"); } { std::ostringstream oss; - proxy.Call("port", {}, 0, GET, oss); + caller.call("port", {}, 0, GET, oss); REQUIRE(oss.str() == "port 1942\n"); } - test_valid_port("port", {}, -1, PUT); - test_valid_port("port", {}, 0, PUT); + test_valid_port_caller("port", {}, -1, PUT); + test_valid_port_caller("port", {}, 0, PUT); // should fail for the second module if (det.size() > 1) { - REQUIRE_THROWS(proxy.Call("port", {"65536"}, -1, PUT)); + REQUIRE_THROWS(caller.call("port", {"65536"}, -1, PUT)); } + det.setControlPort(prev_val, {0}); } -TEST_CASE("stopport", "[.cmd]") { +TEST_CASE("stopport", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto prev_val = det.getStopPort({0}).squash(); { std::ostringstream oss; - proxy.Call("stopport", {"1942"}, 0, PUT, oss); + caller.call("stopport", {"1942"}, 0, PUT, oss); REQUIRE(oss.str() == "stopport 1942\n"); } { std::ostringstream oss; - proxy.Call("stopport", {}, 0, GET, oss); + caller.call("stopport", {}, 0, GET, oss); REQUIRE(oss.str() == "stopport 1942\n"); } - test_valid_port("stopport", {}, -1, PUT); - test_valid_port("stopport", {}, 0, PUT); + test_valid_port_caller("stopport", {}, -1, PUT); + test_valid_port_caller("stopport", {}, 0, PUT); // should fail for the second module if (det.size() > 1) { - REQUIRE_THROWS(proxy.Call("stopport", {"65536"}, -1, PUT)); + REQUIRE_THROWS(caller.call("stopport", {"65536"}, -1, PUT)); } + det.setStopPort(prev_val, {0}); } -TEST_CASE("lock", "[.cmd]") { +TEST_CASE("lock", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto prev_val = det.getDetectorLock(); { std::ostringstream oss; - proxy.Call("lock", {"1"}, -1, PUT, oss); + caller.call("lock", {"1"}, -1, PUT, oss); REQUIRE(oss.str() == "lock 1\n"); } { std::ostringstream oss; - proxy.Call("lock", {}, -1, GET, oss); + caller.call("lock", {}, -1, GET, oss); REQUIRE(oss.str() == "lock 1\n"); } { std::ostringstream oss; - proxy.Call("lock", {"0"}, -1, PUT, oss); + caller.call("lock", {"0"}, -1, PUT, oss); REQUIRE(oss.str() == "lock 0\n"); } for (int i = 0; i != det.size(); ++i) { @@ -3472,74 +3616,84 @@ TEST_CASE("lock", "[.cmd]") { } } -TEST_CASE("execcommand", "[.cmd]") { +TEST_CASE("execcommand", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); - REQUIRE_NOTHROW(proxy.Call("execcommand", {"ls *.txt"}, -1, PUT)); + Caller caller(&det); + REQUIRE_NOTHROW(caller.call("execcommand", {"ls *.txt"}, -1, PUT)); } -TEST_CASE("framecounter", "[.cmd]") { +TEST_CASE("framecounter", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH || det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3 || - det_type == defs::GOTTHARD2) { + det_type == defs::GOTTHARD2 || det_type == defs::XILINX_CHIPTESTBOARD) { auto framecounter = det.getNumberOfFramesFromStart().squash(); std::ostringstream oss; - proxy.Call("framecounter", {}, -1, GET, oss); + caller.call("framecounter", {}, -1, GET, oss); REQUIRE(oss.str() == "framecounter " + std::to_string(framecounter) + "\n"); - REQUIRE_NOTHROW(proxy.Call("framecounter", {}, -1, GET)); + REQUIRE_NOTHROW(caller.call("framecounter", {}, -1, GET)); } else { - REQUIRE_THROWS(proxy.Call("framecounter", {}, -1, GET)); + REQUIRE_THROWS(caller.call("framecounter", {}, -1, GET)); } } -TEST_CASE("runtime", "[.cmd]") { +TEST_CASE("runtime", "[.cmdcall]") { // TODO! can we test this? Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH || det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3 || - det_type == defs::GOTTHARD2) { + det_type == defs::GOTTHARD2 || det_type == defs::XILINX_CHIPTESTBOARD) { std::ostringstream oss; - proxy.Call("runtime", {}, -1, GET, oss); + caller.call("runtime", {}, -1, GET, oss); // Get only - REQUIRE_THROWS(proxy.Call("runtime", {"2019"}, -1, PUT)); - REQUIRE_NOTHROW(proxy.Call("runtime", {}, -1, GET)); + REQUIRE_THROWS(caller.call("runtime", {"2019"}, -1, PUT)); + REQUIRE_NOTHROW(caller.call("runtime", {}, -1, GET)); } else { - REQUIRE_THROWS(proxy.Call("runtime", {}, -1, GET)); + REQUIRE_THROWS(caller.call("runtime", {}, -1, GET)); } } -TEST_CASE("frametime", "[.cmd]") { +TEST_CASE("frametime", "[.cmdcall]") { // TODO! can we test this? Detector det; - CmdProxy proxy(&det); + Caller caller(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH || det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3 || - det_type == defs::GOTTHARD2) { + det_type == defs::GOTTHARD2 || det_type == defs::XILINX_CHIPTESTBOARD) { std::ostringstream oss; - proxy.Call("frametime", {}, -1, GET, oss); + caller.call("frametime", {}, -1, GET, oss); // Get only - REQUIRE_THROWS(proxy.Call("frametime", {"2019"}, -1, PUT)); - REQUIRE_NOTHROW(proxy.Call("frametime", {}, -1, GET)); + REQUIRE_THROWS(caller.call("frametime", {"2019"}, -1, PUT)); + REQUIRE_NOTHROW(caller.call("frametime", {}, -1, GET)); } else { - REQUIRE_THROWS(proxy.Call("frametime", {}, -1, GET)); + REQUIRE_THROWS(caller.call("frametime", {}, -1, GET)); } } -TEST_CASE("user", "[.cmd]") { +TEST_CASE("user", "[.cmdcall]") { Detector det; - CmdProxy proxy(&det); - proxy.Call("user", {}, -1, GET); + Caller caller(&det); + caller.call("user", {}, -1, GET); // This is a get only command - REQUIRE_THROWS(proxy.Call("user", {}, -1, PUT)); - REQUIRE_NOTHROW(proxy.Call("user", {}, -1, GET)); + REQUIRE_THROWS(caller.call("user", {}, -1, PUT)); + REQUIRE_NOTHROW(caller.call("user", {}, -1, GET)); } -} // namespace sls +TEST_CASE("sleep", "[.cmdcall]") { + Detector det; + Caller caller(&det); + REQUIRE_NOTHROW(caller.call("sleep", {"1"}, -1, PUT)); + REQUIRE_NOTHROW(caller.call("sleep", {"100", "ms"}, -1, PUT)); + REQUIRE_NOTHROW(caller.call("sleep", {"1000", "ns"}, -1, PUT)); + // This is a put only command + REQUIRE_THROWS(caller.call("sleep", {}, -1, GET)); +} + +} // namespace sls \ No newline at end of file diff --git a/slsDetectorSoftware/tests/test-CmdParser.cpp b/slsDetectorSoftware/tests/test-CmdParser.cpp index 84a4b1f6d..cec60358e 100644 --- a/slsDetectorSoftware/tests/test-CmdParser.cpp +++ b/slsDetectorSoftware/tests/test-CmdParser.cpp @@ -7,7 +7,7 @@ // tests to add // help for all docs -// command for all depreciated commands +// command for all deprecated commands namespace sls { diff --git a/slsDetectorSoftware/tests/test-CmdProxy-global.h b/slsDetectorSoftware/tests/test-CmdProxy-global.h deleted file mode 100644 index 164fbbc8a..000000000 --- a/slsDetectorSoftware/tests/test-CmdProxy-global.h +++ /dev/null @@ -1,17 +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" - -namespace sls { - -void test_valid_port(const std::string &command, - const std::vector &arguments, int detector_id, - int action); - -void test_dac(slsDetectorDefs::dacIndex index, const std::string &dacname, - int dacvalue); -void test_onchip_dac(slsDetectorDefs::dacIndex index, - const std::string &dacname, int dacvalue); - -} // namespace sls diff --git a/slsDetectorSoftware/tests/test-CmdProxy-gotthard.cpp b/slsDetectorSoftware/tests/test-CmdProxy-gotthard.cpp deleted file mode 100644 index 4c26986c2..000000000 --- a/slsDetectorSoftware/tests/test-CmdProxy-gotthard.cpp +++ /dev/null @@ -1,164 +0,0 @@ -// SPDX-License-Identifier: LGPL-3.0-or-other -// Copyright (C) 2021 Contributors to the SLS Detector Package -#include "CmdProxy.h" -#include "catch.hpp" -#include "sls/Detector.h" -#include "sls/sls_detector_defs.h" -#include - -#include "sls/Result.h" -#include "sls/ToString.h" -#include "sls/versionAPI.h" -#include "test-CmdProxy-global.h" -#include "tests/globals.h" - -namespace sls { - -using test::GET; -using test::PUT; - -/* dacs */ - -TEST_CASE("Setting and reading back GOTTHARD dacs", "[.cmd][.dacs]") { - // vref_ds, vcascn_pb, vcascp_pb, vout_cm, vcasc_out, vin_cm, vref_comp, - // ib_test_c - - Detector det; - CmdProxy proxy(&det); - auto det_type = det.getDetectorType().squash(); - if (det_type == defs::GOTTHARD) { - SECTION("vref_ds") { test_dac(defs::VREF_DS, "vref_ds", 660); } - SECTION("vcascn_pb") { test_dac(defs::VCASCN_PB, "vcascn_pb", 650); } - SECTION("vcascp_pb") { test_dac(defs::VCASCP_PB, "vcascp_pb", 1480); } - SECTION("vout_cm") { test_dac(defs::VOUT_CM, "vout_cm", 1520); } - SECTION("vcasc_out") { test_dac(defs::VCASC_OUT, "vcasc_out", 1320); } - SECTION("vin_cm") { test_dac(defs::VIN_CM, "vin_cm", 1350); } - SECTION("vref_comp") { test_dac(defs::VREF_COMP, "vref_comp", 350); } - SECTION("ib_test_c") { test_dac(defs::IB_TESTC, "ib_test_c", 2001); } - // eiger - REQUIRE_THROWS(proxy.Call("dac", {"vthreshold"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vsvp"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vsvn"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vtrim"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vrpreamp"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vrshaper"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vtgstv"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcmp_ll"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcmp_lr"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcal"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcmp_rl"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcmp_rr"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"rxb_rb"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"rxb_lb"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcp"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcn"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vishaper"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"iodelay"}, -1, GET)); - // jungfrau - REQUIRE_THROWS(proxy.Call("dac", {"vb_comp"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vdd_prot"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vin_com"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vref_prech"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vb_pixbuf"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vb_ds"}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("dac", {"vref_ds"}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("dac", {"vref_comp"}, -1, GET)); - // mythen3 - REQUIRE_THROWS(proxy.Call("dac", {"vrpreamp"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vrshaper"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vrshaper_n"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vipre"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vishaper"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vdcsh"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vth1"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vth2"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vth3"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcal_n"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcal_p"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vtrim"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcassh"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcas"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vicin"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vipre_out"}, -1, GET)); - // gotthard2 - REQUIRE_THROWS(proxy.Call("dac", {"vref_h_adc"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vb_comp_fe"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vb_comp_adc"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcom_cds"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vref_rstore"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vb_opa_1st"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vref_comp_fe"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcom_adc1"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vref_l_adc"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vref_cds"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vb_cs"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vb_opa_fd"}, -1, GET)); - REQUIRE_THROWS(proxy.Call("dac", {"vcom_adc2"}, -1, GET)); - } -} - -/* Gotthard Specific */ - -TEST_CASE("roi", "[.cmd]") { - Detector det; - CmdProxy proxy(&det); - auto det_type = det.getDetectorType().squash(); - - if (det_type == defs::GOTTHARD) { - if (det.size() > 1) { - REQUIRE_THROWS(proxy.Call("roi", {"0", "255"}, -1, PUT)); - REQUIRE_NOTHROW(proxy.Call("roi", {}, -1, GET)); - } else { - auto prev_val = det.getROI(); - { - std::ostringstream oss; - proxy.Call("roi", {"0", "255"}, -1, PUT, oss); - REQUIRE(oss.str() == "roi [0, 255]\n"); - } - { - std::ostringstream oss; - proxy.Call("roi", {"256", "511"}, -1, PUT, oss); - REQUIRE(oss.str() == "roi [256, 511]\n"); - } - REQUIRE_THROWS(proxy.Call("roi", {"0", "256"}, -1, PUT)); - for (int i = 0; i != det.size(); ++i) { - det.setROI(prev_val[i], i); - } - } - } else { - REQUIRE_THROWS(proxy.Call("roi", {}, -1, GET)); - } -} - -TEST_CASE("clearroi", "[.cmd]") { - Detector det; - CmdProxy proxy(&det); - auto det_type = det.getDetectorType().squash(); - - if (det_type == defs::GOTTHARD) { - auto prev_val = det.getROI(); - { - std::ostringstream oss; - proxy.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(proxy.Call("clearroi", {}, -1, PUT)); - } -} - -TEST_CASE("exptimel", "[.cmd]") { - Detector det; - CmdProxy proxy(&det); - auto det_type = det.getDetectorType().squash(); - if (det_type == defs::GOTTHARD) { - REQUIRE_NOTHROW(proxy.Call("exptimel", {}, -1, GET)); - } else { - REQUIRE_THROWS(proxy.Call("exptimel", {}, -1, GET)); - } -} - -} // namespace sls diff --git a/slsDetectorSoftware/tests/test-CmdProxy-moench.cpp b/slsDetectorSoftware/tests/test-CmdProxy-moench.cpp deleted file mode 100644 index e56e0d99f..000000000 --- a/slsDetectorSoftware/tests/test-CmdProxy-moench.cpp +++ /dev/null @@ -1,109 +0,0 @@ -// SPDX-License-Identifier: LGPL-3.0-or-other -// Copyright (C) 2021 Contributors to the SLS Detector Package -#include "CmdProxy.h" -#include "catch.hpp" -#include "sls/Detector.h" -#include "sls/sls_detector_defs.h" -#include - -#include "sls/Result.h" -#include "sls/ToString.h" -#include "sls/versionAPI.h" -#include "test-CmdProxy-global.h" -#include "tests/globals.h" - -namespace sls { - -using test::GET; -using test::PUT; - -/* dacs */ -TEST_CASE("Setting and reading back moench dacs", "[.cmd][.dacs]") { - // vbp_colbuf, vipre, vin_cm, vb_sda, vcasc_sfp, vout_cm, vipre_cds, - // ibias_sfp - Detector det; - CmdProxy proxy(&det); - auto det_type = det.getDetectorType().squash(); - if (det_type == defs::MOENCH) { - SECTION("vbp_colbuf") { - test_dac(defs::VBP_COLBUF, "vbp_colbuf", 1300); - } - SECTION("vipre") { test_dac(defs::VIPRE, "vipre", 1000); } - SECTION("vin_cm") { test_dac(defs::VIN_CM, "vin_cm", 1400); } - SECTION("vb_sda") { test_dac(defs::VB_SDA, "vb_sda", 680); } - SECTION("vcasc_sfp") { test_dac(defs::VCASC_SFP, "vcasc_sfp", 1428); } - SECTION("vout_cm") { test_dac(defs::VOUT_CM, "vout_cm", 1200); } - SECTION("vipre_cds") { test_dac(defs::VIPRE_CDS, "vipre_cds", 800); } - SECTION("ibias_sfp") { test_dac(defs::IBIAS_SFP, "ibias_sfp", 900); } - // eiger - REQUIRE_THROWS(proxy.Call("vthreshold", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vsvp", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vsvn", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vtrim", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vrpreamp", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vrshaper", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vtgstv", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcmp_ll", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcmp_lr", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcal", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcmp_rl", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcmp_rr", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("rxb_rb", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("rxb_lb", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcp", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcn", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vishaper", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("iodelay", {}, -1, GET)); - // gotthard - REQUIRE_THROWS(proxy.Call("vref_ds", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcascn_pb", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcascp_pb", {}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("vout_cm", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcasc_out", {}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("vin_cm", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_comp", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("ib_test_c", {}, -1, GET)); - // mythen3 - REQUIRE_THROWS(proxy.Call("vrpreamp", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vrshaper", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vrshaper_n", {}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("vipre", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vishaper", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vdcsh", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vth1", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vth2", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vth3", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcal_n", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcal_p", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vtrim", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcassh", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcas", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vicin", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vipre_out", {}, -1, GET)); - // gotthard2 - REQUIRE_THROWS(proxy.Call("vref_h_adc", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_comp_fe", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_comp_adc", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcom_cds", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_rstore", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_opa_1st", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_comp_fe", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcom_adc1", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_l_adc", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_cds", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_cs", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_opa_fd", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcom_adc2", {}, -1, GET)); - // jungfrau - REQUIRE_THROWS(proxy.Call("vb_comp", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vdd_prot", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vin_com", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_prech", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_pixbuf", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_ds", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_ds", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_comp", {}, -1, GET)); - } -} - -} // namespace sls diff --git a/slsDetectorSoftware/tests/test-Module.cpp b/slsDetectorSoftware/tests/test-Module.cpp index 203ee30f3..5e9767c36 100644 --- a/slsDetectorSoftware/tests/test-Module.cpp +++ b/slsDetectorSoftware/tests/test-Module.cpp @@ -1,5 +1,6 @@ // SPDX-License-Identifier: LGPL-3.0-or-other // Copyright (C) 2021 Contributors to the SLS Detector Package +#include "Detector.h" #include "Module.h" #include "SharedMemory.h" #include "catch.hpp" @@ -10,7 +11,9 @@ using dt = slsDetectorDefs::detectorType; TEST_CASE("Construction with a defined detector type") { Module m(dt::EIGER); REQUIRE(m.getDetectorType() == dt::EIGER); - m.freeSharedMemory(); // clean up + freeSharedMemory(0, 0); // clean up + SharedMemory moduleShm(0, 0); + REQUIRE(moduleShm.exists() == false); } TEST_CASE("Read back detector type from shm") { @@ -23,7 +26,9 @@ TEST_CASE("Read back detector type from shm") { // Now both objects point to the same shm so we can only // free one! - m2.freeSharedMemory(); + freeSharedMemory(0, 0); + SharedMemory moduleShm(0, 0); + REQUIRE(moduleShm.exists() == false); } TEST_CASE("Is shm fixed pattern shm compatible") { @@ -41,25 +46,33 @@ TEST_CASE("Is shm fixed pattern shm compatible") { // Should fail since version is set to 0 REQUIRE(m.isFixedPatternSharedMemoryCompatible() == false); - m.freeSharedMemory(); + freeSharedMemory(0, 0); + SharedMemory moduleShm(0, 0); + REQUIRE(moduleShm.exists() == false); } TEST_CASE("Get default control port") { Module m(dt::MYTHEN3); REQUIRE(m.getControlPort() == 1952); - m.freeSharedMemory(); + freeSharedMemory(0, 0); + SharedMemory moduleShm(0, 0); + REQUIRE(moduleShm.exists() == false); } TEST_CASE("Get default stop port") { Module m(dt::GOTTHARD2); REQUIRE(m.getStopPort() == 1953); - m.freeSharedMemory(); + freeSharedMemory(0, 0); + SharedMemory moduleShm(0, 0); + REQUIRE(moduleShm.exists() == false); } TEST_CASE("Get default receiver TCP port") { Module m(dt::MYTHEN3); REQUIRE(m.getReceiverPort() == 1954); - m.freeSharedMemory(); + freeSharedMemory(0, 0); + SharedMemory moduleShm(0, 0); + REQUIRE(moduleShm.exists() == false); } } // namespace sls diff --git a/slsReceiverSoftware/include/sls/Receiver.h b/slsReceiverSoftware/include/sls/Receiver.h index cbeccd29a..f3389c80e 100644 --- a/slsReceiverSoftware/include/sls/Receiver.h +++ b/slsReceiverSoftware/include/sls/Receiver.h @@ -41,51 +41,36 @@ class Receiver : private virtual slsDetectorDefs { /** * Start Acquisition Call back (slsMultiReceiver writes data if file write * enabled) if registerCallBackRawDataReady or - * registerCallBackRawDataModifyReady registered, users get data callback - * arguments are: - * - file path - * - file name prefix - * - file index - * - image size in bytes + * registerCallBackRawDataModifyReady registered + * Call back arguments are: + * - startCallbackHeader metadata */ - void registerCallBackStartAcquisition(int (*func)(const std::string &, - const std::string &, - uint64_t, size_t, void *), + void registerCallBackStartAcquisition(int (*func)(const startCallbackHeader, + void *), void *arg); /** * Call back for acquisition finished * callback argument is: - * - total frames caught + * - startCallbackHeader metadata */ - void registerCallBackAcquisitionFinished(void (*func)(uint64_t, void *), - void *arg); + void registerCallBackAcquisitionFinished( + void (*func)(const endCallbackHeader, void *), void *arg); /** * Call back for raw data * args to raw data ready callback are: * - sls_receiver_header frame metadata, + * - dataCallbackHeader metadata * - pointer to data - * - image size in bytes + * - image size in bytes. Can be modified to the new size to be + * written/streamed. (only smaller value allowed). */ void registerCallBackRawDataReady(void (*func)(sls_receiver_header &, - char *, size_t, void *), + const dataCallbackHeader, + char *, size_t &, void *), void *arg); - /** - * Call back for raw data (modified) - * args to raw data ready callback are: - * - sls_receiver_header frame metadata, - * - pointer to data - * - revDatasize is the reference of data size in bytes. - * Can be modified to the new size to be written/streamed. (only smaller - * value allowed). - */ - void registerCallBackRawDataModifyReady(void (*func)(sls_receiver_header &, - char *, size_t &, - void *), - void *arg); - private: std::unique_ptr tcpipInterface; }; diff --git a/slsReceiverSoftware/src/ClientInterface.cpp b/slsReceiverSoftware/src/ClientInterface.cpp index 24942d6a5..ce8702151 100644 --- a/slsReceiverSoftware/src/ClientInterface.cpp +++ b/slsReceiverSoftware/src/ClientInterface.cpp @@ -54,32 +54,25 @@ std::string ClientInterface::getReceiverVersion() { return APIRECEIVER; } /***callback functions***/ void ClientInterface::registerCallBackStartAcquisition( - int (*func)(const std::string &, const std::string &, uint64_t, size_t, - void *), - void *arg) { + int (*func)(const startCallbackHeader, void *), void *arg) { startAcquisitionCallBack = func; pStartAcquisition = arg; } -void ClientInterface::registerCallBackAcquisitionFinished(void (*func)(uint64_t, - void *), - void *arg) { +void ClientInterface::registerCallBackAcquisitionFinished( + void (*func)(const endCallbackHeader, void *), void *arg) { acquisitionFinishedCallBack = func; pAcquisitionFinished = arg; } void ClientInterface::registerCallBackRawDataReady( - void (*func)(sls_receiver_header &, char *, size_t, void *), void *arg) { + void (*func)(sls_receiver_header &, dataCallbackHeader, char *, size_t &, + void *), + void *arg) { rawDataReadyCallBack = func; pRawDataReady = arg; } -void ClientInterface::registerCallBackRawDataModifyReady( - void (*func)(sls_receiver_header &, char *, size_t &, void *), void *arg) { - rawDataModifyReadyCallBack = func; - pRawDataReady = arg; -} - void ClientInterface::startTCPServer() { tcpThreadId = gettid(); LOG(logINFOBLUE) << "Created [ TCP server Tid: " << tcpThreadId << "]"; @@ -168,8 +161,6 @@ int ClientInterface::functionTable(){ flist[F_GET_RECEIVER_FILE_FORMAT] = &ClientInterface::get_file_format; flist[F_SET_RECEIVER_STREAMING_PORT] = &ClientInterface::set_streaming_port; flist[F_GET_RECEIVER_STREAMING_PORT] = &ClientInterface::get_streaming_port; - flist[F_SET_RECEIVER_STREAMING_SRC_IP] = &ClientInterface::set_streaming_source_ip; - flist[F_GET_RECEIVER_STREAMING_SRC_IP] = &ClientInterface::get_streaming_source_ip; flist[F_SET_RECEIVER_SILENT_MODE] = &ClientInterface::set_silent_mode; flist[F_GET_RECEIVER_SILENT_MODE] = &ClientInterface::get_silent_mode; flist[F_RESTREAM_STOP_FROM_RECEIVER] = &ClientInterface::restream_stop; @@ -372,7 +363,7 @@ int ClientInterface::setup_receiver(Interface &socket) { arg.additionalStorageCells); } - if (detType == CHIPTESTBOARD) { + if (detType == CHIPTESTBOARD || detType == XILINX_CHIPTESTBOARD) { impl()->setNumberofAnalogSamples(arg.analogSamples); impl()->setNumberofDigitalSamples(arg.digitalSamples); impl()->setNumberofTransceiverSamples(arg.transceiverSamples); @@ -409,12 +400,14 @@ int ClientInterface::setup_receiver(Interface &socket) { detType == MYTHEN3) { impl()->setTenGigaEnable(arg.tenGiga); } - if (detType == CHIPTESTBOARD) { + if (detType == CHIPTESTBOARD || detType == XILINX_CHIPTESTBOARD) { impl()->setReadoutMode(arg.roMode); - impl()->setADCEnableMask(arg.adcMask); impl()->setTenGigaADCEnableMask(arg.adc10gMask); impl()->setTransceiverEnableMask(arg.transceiverMask); } + if (detType == CHIPTESTBOARD) { + impl()->setADCEnableMask(arg.adcMask); + } if (detType == GOTTHARD) { impl()->setDetectorROI(arg.roi); } @@ -448,6 +441,7 @@ void ClientInterface::setDetectorType(detectorType arg) { case GOTTHARD: case EIGER: case CHIPTESTBOARD: + case XILINX_CHIPTESTBOARD: case JUNGFRAU: case MOENCH: case MYTHEN3: @@ -476,9 +470,6 @@ void ClientInterface::setDetectorType(detectorType arg) { if (rawDataReadyCallBack != nullptr) impl()->registerCallBackRawDataReady(rawDataReadyCallBack, pRawDataReady); - if (rawDataModifyReadyCallBack != nullptr) - impl()->registerCallBackRawDataModifyReady(rawDataModifyReadyCallBack, - pRawDataReady); impl()->setThreadIds(parentThreadId, tcpThreadId); } @@ -568,7 +559,7 @@ int ClientInterface::set_burst_mode(Interface &socket) { int ClientInterface::set_num_analog_samples(Interface &socket) { auto value = socket.Receive(); LOG(logDEBUG1) << "Setting num analog samples to " << value; - if (detType != CHIPTESTBOARD) { + if (detType != CHIPTESTBOARD && detType != XILINX_CHIPTESTBOARD) { functionNotImplemented(); } try { @@ -584,7 +575,7 @@ int ClientInterface::set_num_analog_samples(Interface &socket) { int ClientInterface::set_num_digital_samples(Interface &socket) { auto value = socket.Receive(); LOG(logDEBUG1) << "Setting num digital samples to " << value; - if (detType != CHIPTESTBOARD) { + if (detType != CHIPTESTBOARD && detType != XILINX_CHIPTESTBOARD) { functionNotImplemented(); } try { @@ -1081,21 +1072,6 @@ int ClientInterface::get_streaming_port(Interface &socket) { return socket.sendResult(retval); } -int ClientInterface::set_streaming_source_ip(Interface &socket) { - auto ip = socket.Receive(); - if (ip == 0) - throw RuntimeError("Invalid zmq ip " + ip.str()); - verifyIdle(socket); - impl()->setStreamingSourceIP(ip); - return socket.Send(OK); -} - -int ClientInterface::get_streaming_source_ip(Interface &socket) { - IpAddr retval = impl()->getStreamingSourceIP(); - LOG(logDEBUG1) << "streaming IP:" << retval; - return socket.sendResult(retval); -} - int ClientInterface::set_silent_mode(Interface &socket) { auto value = socket.Receive(); if (value < 0) { @@ -1249,7 +1225,7 @@ int ClientInterface::get_padding_enable(Interface &socket) { int ClientInterface::set_readout_mode(Interface &socket) { auto arg = socket.Receive(); - if (detType != CHIPTESTBOARD) + if (detType != CHIPTESTBOARD && detType != XILINX_CHIPTESTBOARD) functionNotImplemented(); if (arg >= 0) { @@ -1294,7 +1270,7 @@ int ClientInterface::set_adc_mask(Interface &socket) { int ClientInterface::set_dbit_list(Interface &socket) { StaticVector args; socket.Receive(args); - if (detType != CHIPTESTBOARD) + if (detType != CHIPTESTBOARD && detType != XILINX_CHIPTESTBOARD) functionNotImplemented(); LOG(logDEBUG1) << "Setting DBIT list"; for (auto &it : args) { @@ -1307,7 +1283,7 @@ int ClientInterface::set_dbit_list(Interface &socket) { } int ClientInterface::get_dbit_list(Interface &socket) { - if (detType != CHIPTESTBOARD) + if (detType != CHIPTESTBOARD && detType != XILINX_CHIPTESTBOARD) functionNotImplemented(); StaticVector retval; retval = impl()->getDbitList(); @@ -1317,7 +1293,7 @@ int ClientInterface::get_dbit_list(Interface &socket) { int ClientInterface::set_dbit_offset(Interface &socket) { auto arg = socket.Receive(); - if (detType != CHIPTESTBOARD) + if (detType != CHIPTESTBOARD && detType != XILINX_CHIPTESTBOARD) functionNotImplemented(); if (arg < 0) { throw RuntimeError("Invalid dbit offset: " + std::to_string(arg)); @@ -1329,7 +1305,7 @@ int ClientInterface::set_dbit_offset(Interface &socket) { } int ClientInterface::get_dbit_offset(Interface &socket) { - if (detType != CHIPTESTBOARD) + if (detType != CHIPTESTBOARD && detType != XILINX_CHIPTESTBOARD) functionNotImplemented(); int retval = impl()->getDbitOffset(); LOG(logDEBUG1) << "Dbit offset retval: " << retval; @@ -1735,7 +1711,7 @@ int ClientInterface::get_receiver_roi(Interface &socket) { int ClientInterface::set_receiver_roi(Interface &socket) { auto arg = socket.Receive(); - if (detType == CHIPTESTBOARD) + if (detType == CHIPTESTBOARD || detType == XILINX_CHIPTESTBOARD) functionNotImplemented(); LOG(logDEBUG1) << "Set Receiver ROI: " << ToString(arg); verifyIdle(socket); @@ -1751,7 +1727,7 @@ int ClientInterface::set_receiver_roi(Interface &socket) { int ClientInterface::set_receiver_roi_metadata(Interface &socket) { auto arg = socket.Receive(); - if (detType == CHIPTESTBOARD) + if (detType == CHIPTESTBOARD || detType == XILINX_CHIPTESTBOARD) functionNotImplemented(); LOG(logDEBUG1) << "Set Receiver ROI Metadata: " << ToString(arg); verifyIdle(socket); @@ -1768,7 +1744,7 @@ int ClientInterface::set_receiver_roi_metadata(Interface &socket) { int ClientInterface::set_num_transceiver_samples(Interface &socket) { auto value = socket.Receive(); LOG(logDEBUG1) << "Setting num transceiver samples to " << value; - if (detType != CHIPTESTBOARD) { + if (detType != CHIPTESTBOARD && detType != XILINX_CHIPTESTBOARD) { functionNotImplemented(); } try { diff --git a/slsReceiverSoftware/src/ClientInterface.h b/slsReceiverSoftware/src/ClientInterface.h index 89b4ce7d6..8bde90c64 100644 --- a/slsReceiverSoftware/src/ClientInterface.h +++ b/slsReceiverSoftware/src/ClientInterface.h @@ -34,26 +34,20 @@ class ClientInterface : private virtual slsDetectorDefs { //***callback functions*** /** params: file path, file name, file index, image size */ - void registerCallBackStartAcquisition(int (*func)(const std::string &, - const std::string &, - uint64_t, size_t, void *), + void registerCallBackStartAcquisition(int (*func)(const startCallbackHeader, + void *), void *arg); /** params: total frames caught */ - void registerCallBackAcquisitionFinished(void (*func)(uint64_t, void *), - void *arg); + void registerCallBackAcquisitionFinished( + void (*func)(const endCallbackHeader, void *), void *arg); /** params: sls_receiver_header, pointer to data, image size */ void registerCallBackRawDataReady(void (*func)(sls_receiver_header &, - char *, size_t, void *), + const dataCallbackHeader, + char *, size_t &, void *), void *arg); - /** params: sls_receiver_header, pointer to data, reference to image size */ - void registerCallBackRawDataModifyReady(void (*func)(sls_receiver_header &, - char *, size_t &, - void *), - void *arg); - private: void startTCPServer(); int functionTable(); @@ -117,8 +111,6 @@ class ClientInterface : private virtual slsDetectorDefs { int get_file_format(ServerInterface &socket); int set_streaming_port(ServerInterface &socket); int get_streaming_port(ServerInterface &socket); - int set_streaming_source_ip(ServerInterface &socket); - int get_streaming_source_ip(ServerInterface &socket); int set_silent_mode(ServerInterface &socket); int get_silent_mode(ServerInterface &socket); int restream_stop(ServerInterface &socket); @@ -188,15 +180,14 @@ class ClientInterface : private virtual slsDetectorDefs { //***callback parameters*** - int (*startAcquisitionCallBack)(const std::string &, const std::string &, - uint64_t, size_t, void *) = nullptr; + int (*startAcquisitionCallBack)(const startCallbackHeader, + void *) = nullptr; void *pStartAcquisition{nullptr}; - void (*acquisitionFinishedCallBack)(uint64_t, void *) = nullptr; + void (*acquisitionFinishedCallBack)(const endCallbackHeader, + void *) = nullptr; void *pAcquisitionFinished{nullptr}; - void (*rawDataReadyCallBack)(sls_receiver_header &, char *, size_t, - void *) = nullptr; - void (*rawDataModifyReadyCallBack)(sls_receiver_header &, char *, size_t &, - void *) = nullptr; + void (*rawDataReadyCallBack)(sls_receiver_header &, dataCallbackHeader, + char *, size_t &, void *) = nullptr; void *pRawDataReady{nullptr}; pid_t parentThreadId{0}; diff --git a/slsReceiverSoftware/src/DataProcessor.cpp b/slsReceiverSoftware/src/DataProcessor.cpp index 000c2ad85..e5702389d 100644 --- a/slsReceiverSoftware/src/DataProcessor.cpp +++ b/slsReceiverSoftware/src/DataProcessor.cpp @@ -41,6 +41,10 @@ void DataProcessor::SetFifo(Fifo *f) { fifo = f; } void DataProcessor::SetGeneralData(GeneralData *g) { generalData = g; } +void DataProcessor::SetUdpPortNumber(const uint16_t portNumber) { + udpPortNumber = portNumber; +} + void DataProcessor::SetActivate(bool enable) { activated = enable; } void DataProcessor::SetReceiverROI(ROI roi) { @@ -73,6 +77,27 @@ void DataProcessor::SetCtbDbitList(std::vector value) { void DataProcessor::SetCtbDbitOffset(int value) { ctbDbitOffset = value; } +void DataProcessor::SetQuadEnable(bool value) { quadEnable = value; } + +void DataProcessor::SetFlipRows(bool fd) { + flipRows = fd; + // flip only right port of quad + if (quadEnable) { + flipRows = (index == 1 ? true : false); + } +} + +void DataProcessor::SetNumberofTotalFrames(uint64_t value) { + nTotalFrames = value; +} + +void DataProcessor::SetAdditionalJsonHeader( + const std::map &json) { + std::lock_guard lock(additionalJsonMutex); + additionalJsonHeader = json; + isAdditionalJsonUpdated = true; +} + void DataProcessor::ResetParametersforNewAcquisition() { StopRunning(); startedFlag = false; @@ -127,8 +152,6 @@ void DataProcessor::CreateFirstFiles(const std::string &fileNamePrefix, const uint64_t fileIndex, const bool overWriteEnable, const bool silentMode, - const uint16_t udpPortNumber, - const uint64_t numImages, const bool detectorDataStream) { if (dataFile == nullptr) { throw RuntimeError("file object not contstructed"); @@ -156,7 +179,7 @@ void DataProcessor::CreateFirstFiles(const std::string &fileNamePrefix, case HDF5: dataFile->CreateFirstHDF5DataFile( fileNamePrefix, fileIndex, overWriteEnable, silentMode, - udpPortNumber, generalData->framesPerFile, numImages, nx, ny, + udpPortNumber, generalData->framesPerFile, nTotalFrames, nx, ny, generalData->dynamicRange); break; #endif @@ -182,8 +205,8 @@ uint32_t DataProcessor::GetFilesInAcquisition() const { std::string DataProcessor::CreateVirtualFile( const std::string &filePath, const std::string &fileNamePrefix, const uint64_t fileIndex, const bool overWriteEnable, const bool silentMode, - const int modulePos, const uint64_t numImages, const int numModX, - const int numModY, std::mutex *hdf5LibMutex) { + const int modulePos, const int numModX, const int numModY, + std::mutex *hdf5LibMutex) { if (receiverRoiEnabled) { throw std::runtime_error( @@ -361,14 +384,31 @@ void DataProcessor::ProcessAnImage(sls_receiver_header &header, size_t &size, } try { - // normal call back + // callbacks if (rawDataReadyCallBack != nullptr) { - rawDataReadyCallBack(header, data, size, pRawDataReady); - } - // call back with modified size - else if (rawDataModifyReadyCallBack != nullptr) { - rawDataModifyReadyCallBack(header, data, size, pRawDataReady); + uint64_t frameIndex = fnum - firstIndex; + // update local copy only if it was updated (to prevent locking each + // time) + if (isAdditionalJsonUpdated) { + std::lock_guard lock(additionalJsonMutex); + localAdditionalJsonHeader = additionalJsonHeader; + isAdditionalJsonUpdated = false; + } + + dataCallbackHeader callbackHeader = { + udpPortNumber, + {static_cast(generalData->nPixelsX), + static_cast(generalData->nPixelsY)}, + fnum, + frameIndex, + (100 * ((double)(frameIndex + 1) / (double)(nTotalFrames))), + (nump == generalData->packetsPerFrame ? true : false), + flipRows, + localAdditionalJsonHeader}; + + rawDataReadyCallBack(header, callbackHeader, data, size, + pRawDataReady); } } catch (const std::exception &e) { throw RuntimeError("Get Data Callback Error: " + std::string(e.what())); @@ -427,17 +467,13 @@ bool DataProcessor::CheckCount() { } void DataProcessor::registerCallBackRawDataReady( - void (*func)(sls_receiver_header &, char *, size_t, void *), void *arg) { + void (*func)(sls_receiver_header &, dataCallbackHeader, char *, size_t &, + void *), + void *arg) { rawDataReadyCallBack = func; pRawDataReady = arg; } -void DataProcessor::registerCallBackRawDataModifyReady( - void (*func)(sls_receiver_header &, char *, size_t &, void *), void *arg) { - rawDataModifyReadyCallBack = func; - pRawDataReady = arg; -} - void DataProcessor::PadMissingPackets(sls_receiver_header header, char *data) { LOG(logDEBUG) << index << ": Padding Missing Packets"; @@ -480,6 +516,7 @@ void DataProcessor::PadMissingPackets(sls_receiver_header header, char *data) { memset(data + (pnum * dsize), 0xFF, dsize + 2); break; case CHIPTESTBOARD: + case XILINX_CHIPTESTBOARD: if (pnum == (pperFrame - 1)) memset(data + (pnum * dsize), 0xFF, corrected_dsize); else diff --git a/slsReceiverSoftware/src/DataProcessor.h b/slsReceiverSoftware/src/DataProcessor.h index af8af6d17..29ea9e84c 100644 --- a/slsReceiverSoftware/src/DataProcessor.h +++ b/slsReceiverSoftware/src/DataProcessor.h @@ -37,6 +37,7 @@ class DataProcessor : private virtual slsDetectorDefs, public ThreadObject { void SetFifo(Fifo *f); void SetGeneralData(GeneralData *generalData); + void SetUdpPortNumber(const uint16_t portNumber); void SetActivate(bool enable); void SetReceiverROI(ROI roi); void SetDataStreamEnable(bool enable); @@ -46,6 +47,11 @@ class DataProcessor : private virtual slsDetectorDefs, public ThreadObject { void SetFramePadding(bool enable); void SetCtbDbitList(std::vector value); void SetCtbDbitOffset(int value); + void SetQuadEnable(bool value); + void SetFlipRows(bool fd); + void SetNumberofTotalFrames(uint64_t value); + void + SetAdditionalJsonHeader(const std::map &json); void ResetParametersforNewAcquisition(); void CloseFiles(); @@ -56,9 +62,7 @@ class DataProcessor : private virtual slsDetectorDefs, public ThreadObject { void CreateFirstFiles(const std::string &fileNamePrefix, const uint64_t fileIndex, const bool overWriteEnable, - const bool silentMode, const uint16_t udpPortNumber, - const uint64_t numImages, - const bool detectorDataStream); + const bool silentMode, const bool detectorDataStream); #ifdef HDF5C uint32_t GetFilesInAcquisition() const; std::string CreateVirtualFile(const std::string &filePath, @@ -66,8 +70,8 @@ class DataProcessor : private virtual slsDetectorDefs, public ThreadObject { const uint64_t fileIndex, const bool overWriteEnable, const bool silentMode, const int modulePos, - const uint64_t numImages, const int numModX, - const int numModY, std::mutex *hdf5LibMutex); + const int numModX, const int numModY, + std::mutex *hdf5LibMutex); void LinkFileInMaster(const std::string &masterFileName, const std::string &virtualFileName, const bool silentMode, std::mutex *hdf5LibMutex); @@ -83,15 +87,10 @@ class DataProcessor : private virtual slsDetectorDefs, public ThreadObject { /** params: sls_receiver_header, pointer to data, image size */ void registerCallBackRawDataReady(void (*func)(sls_receiver_header &, - char *, size_t, void *), + dataCallbackHeader, char *, + size_t &, void *), void *arg); - /** params: sls_receiver_header, pointer to data, reference to image size */ - void registerCallBackRawDataModifyReady(void (*func)(sls_receiver_header &, - char *, size_t &, - void *), - void *arg); - private: void RecordFirstIndex(uint64_t fnum); @@ -150,6 +149,8 @@ class DataProcessor : private virtual slsDetectorDefs, public ThreadObject { GeneralData *generalData{nullptr}; Fifo *fifo; + + uint16_t udpPortNumber{0}; bool dataStreamEnable; bool activated{false}; ROI receiverRoi{}; @@ -167,6 +168,18 @@ class DataProcessor : private virtual slsDetectorDefs, public ThreadObject { int ctbDbitOffset; std::atomic startedFlag{false}; std::atomic firstIndex{0}; + bool quadEnable{false}; + bool flipRows{false}; + uint64_t nTotalFrames{0}; + + std::map additionalJsonHeader; + /** Used by streamer thread to update local copy (reduce number of locks + * during streaming) */ + std::atomic isAdditionalJsonUpdated{false}; + /** mutex to update json and to read and update local copy */ + mutable std::mutex additionalJsonMutex; + /** local copy of additional json header (it can be update on the fly) */ + std::map localAdditionalJsonHeader; // for statistics uint64_t numFramesCaught{0}; @@ -189,19 +202,8 @@ class DataProcessor : private virtual slsDetectorDefs, public ThreadObject { * dataPointer is the pointer to the data * dataSize in bytes is the size of the data in bytes. */ - void (*rawDataReadyCallBack)(sls_receiver_header &, char *, size_t, - void *) = nullptr; - - /** - * Call back for raw data (modified) - * args to raw data ready callback are - * sls_receiver_header frame metadata - * dataPointer is the pointer to the data - * revDatasize is the reference of data size in bytes. Can be modified to - * the new size to be written/streamed. (only smaller value). - */ - void (*rawDataModifyReadyCallBack)(sls_receiver_header &, char *, size_t &, - void *) = nullptr; + void (*rawDataReadyCallBack)(sls_receiver_header &, dataCallbackHeader, + char *, size_t &, void *) = nullptr; void *pRawDataReady{nullptr}; }; diff --git a/slsReceiverSoftware/src/DataStreamer.cpp b/slsReceiverSoftware/src/DataStreamer.cpp index a645246cd..aef93e984 100644 --- a/slsReceiverSoftware/src/DataStreamer.cpp +++ b/slsReceiverSoftware/src/DataStreamer.cpp @@ -84,11 +84,10 @@ void DataStreamer::RecordFirstIndex(uint64_t fnum, size_t firstImageIndex) { << ", First Streamer Index:" << fnum; } -void DataStreamer::CreateZmqSockets(uint16_t port, const IpAddr ip, int hwm) { +void DataStreamer::CreateZmqSockets(uint16_t port, int hwm) { uint16_t portnum = port + index; - std::string sip = ip.str(); try { - zmqSocket = new ZmqSocket(portnum, (ip != 0 ? sip.c_str() : nullptr)); + zmqSocket = new ZmqSocket(portnum); // set if custom if (hwm >= 0) { diff --git a/slsReceiverSoftware/src/DataStreamer.h b/slsReceiverSoftware/src/DataStreamer.h index 2e6f931af..b7cc94a5d 100644 --- a/slsReceiverSoftware/src/DataStreamer.h +++ b/slsReceiverSoftware/src/DataStreamer.h @@ -45,10 +45,9 @@ class DataStreamer : private virtual slsDetectorDefs, public ThreadObject { * Creates Zmq Sockets * (throws an exception if it couldnt create zmq sockets) * @param port streaming port start index - * @param ip streaming source ip * @param hwm streaming high water mark */ - void CreateZmqSockets(uint16_t port, const IpAddr ip, int hwm); + void CreateZmqSockets(uint16_t port, int hwm); void CloseZmqSocket(); void RestreamStop(); diff --git a/slsReceiverSoftware/src/Fifo.h b/slsReceiverSoftware/src/Fifo.h index d07fe5fef..729ce368b 100644 --- a/slsReceiverSoftware/src/Fifo.h +++ b/slsReceiverSoftware/src/Fifo.h @@ -11,10 +11,11 @@ *@short constructs the fifo structure */ +#include "sls/CircularFifo.h" #include "sls/logger.h" #include "sls/sls_detector_defs.h" -#include "sls/CircularFifo.h" +#include namespace sls { @@ -49,8 +50,8 @@ class Fifo : private virtual slsDetectorDefs { CircularFifo *fifoFree; CircularFifo *fifoStream; int fifoDepth; - volatile int status_fifoBound; - volatile int status_fifoFree; + std::atomic status_fifoBound; + std::atomic status_fifoFree; }; } // namespace sls diff --git a/slsReceiverSoftware/src/GeneralData.h b/slsReceiverSoftware/src/GeneralData.h index 12a46f7a2..408ece595 100644 --- a/slsReceiverSoftware/src/GeneralData.h +++ b/slsReceiverSoftware/src/GeneralData.h @@ -648,4 +648,122 @@ class ChipTestBoardData : public GeneralData { }; }; +class XilinxChipTestBoardData : public GeneralData { + private: + const int NCHAN_DIGITAL = 64; + const int NUM_BYTES_PER_ANALOG_CHANNEL = 2; + const int NUM_BYTES_PER_TRANSCEIVER_CHANNEL = 8; + int nAnalogBytes = 0; + int nDigitalBytes = 0; + int nTransceiverBytes = 0; + + public: + /** Constructor */ + XilinxChipTestBoardData() { + detType = slsDetectorDefs::XILINX_CHIPTESTBOARD; + nPixelsY = 1; // number of samples + headerSizeinPacket = sizeof(slsDetectorDefs::sls_detector_header); + frameIndexMask = 0xFFFFFF; // 10g + frameIndexOffset = 8; // 10g + packetIndexMask = 0xFF; // 10g + framesPerFile = XILINX_CTB_MAX_FRAMES_PER_FILE; + fifoDepth = 2500; + standardheader = true; + dataSize = 8144; + packetSize = headerSizeinPacket + dataSize; + tengigaEnable = true; + UpdateImageSize(); + }; + + public: + int GetNumberOfAnalogDatabytes() { return nAnalogBytes; }; + + int GetNumberOfDigitalDatabytes() { return nDigitalBytes; }; + + int GetNumberOfTransceiverDatabytes() { return nTransceiverBytes; }; + + void SetNumberOfAnalogSamples(int n) { + nAnalogSamples = n; + UpdateImageSize(); + }; + + void SetNumberOfDigitalSamples(int n) { + nDigitalSamples = n; + UpdateImageSize(); + }; + + void SetNumberOfTransceiverSamples(int n) { + nTransceiverSamples = n; + UpdateImageSize(); + }; + + void SetOneGigaAdcEnableMask(int n) { + adcEnableMaskOneGiga = n; + UpdateImageSize(); + }; + + void SetTenGigaAdcEnableMask(int n) { + adcEnableMaskTenGiga = n; + UpdateImageSize(); + }; + + void SetTransceiverEnableMask(int n) { + transceiverMask = n; + UpdateImageSize(); + }; + + void SetReadoutMode(slsDetectorDefs::readoutMode r) { + readoutType = r; + UpdateImageSize(); + }; + + private: + void UpdateImageSize() { + nAnalogBytes = 0; + nDigitalBytes = 0; + nTransceiverBytes = 0; + int nAnalogChans = 0, nDigitalChans = 0, nTransceiverChans = 0; + + // analog channels (normal, analog/digital readout) + if (readoutType == slsDetectorDefs::ANALOG_ONLY || + readoutType == slsDetectorDefs::ANALOG_AND_DIGITAL) { + uint32_t adcEnableMask = adcEnableMaskTenGiga; + nAnalogChans = __builtin_popcount(adcEnableMask); + + nAnalogBytes = + nAnalogChans * NUM_BYTES_PER_ANALOG_CHANNEL * nAnalogSamples; + LOG(logDEBUG1) << " Number of Analog Channels:" << nAnalogChans + << " Databytes: " << nAnalogBytes; + } + // digital channels + if (readoutType == slsDetectorDefs::DIGITAL_ONLY || + readoutType == slsDetectorDefs::ANALOG_AND_DIGITAL || + readoutType == slsDetectorDefs::DIGITAL_AND_TRANSCEIVER) { + nDigitalChans = NCHAN_DIGITAL; + nDigitalBytes = (sizeof(uint64_t) * nDigitalSamples); + LOG(logDEBUG1) << "Number of Digital Channels:" << nDigitalChans + << " Databytes: " << nDigitalBytes; + } + // transceiver channels + if (readoutType == slsDetectorDefs::TRANSCEIVER_ONLY || + readoutType == slsDetectorDefs::DIGITAL_AND_TRANSCEIVER) { + nTransceiverChans = __builtin_popcount(transceiverMask); + ; + nTransceiverBytes = nTransceiverChans * + NUM_BYTES_PER_TRANSCEIVER_CHANNEL * + nTransceiverSamples; + LOG(logDEBUG1) << "Number of Transceiver Channels:" + << nTransceiverChans + << " Databytes: " << nTransceiverBytes; + } + nPixelsX = nAnalogChans + nDigitalChans + nTransceiverChans; + + imageSize = nAnalogBytes + nDigitalBytes + nTransceiverBytes; + packetsPerFrame = ceil((double)imageSize / (double)dataSize); + + LOG(logDEBUG1) << "Total Number of Channels:" << nPixelsX + << " Databytes: " << imageSize; + }; +}; + } // namespace sls diff --git a/slsReceiverSoftware/src/Implementation.cpp b/slsReceiverSoftware/src/Implementation.cpp index ad3613798..f7aed96ef 100644 --- a/slsReceiverSoftware/src/Implementation.cpp +++ b/slsReceiverSoftware/src/Implementation.cpp @@ -116,6 +116,7 @@ void Implementation::setDetectorType(const detectorType d) { case JUNGFRAU: case MOENCH: case CHIPTESTBOARD: + case XILINX_CHIPTESTBOARD: case MYTHEN3: case GOTTHARD2: LOG(logINFO) << " ***** " << ToString(d) << " Receiver *****"; @@ -145,6 +146,9 @@ void Implementation::setDetectorType(const detectorType d) { case CHIPTESTBOARD: generalData = new ChipTestBoardData(); break; + case XILINX_CHIPTESTBOARD: + generalData = new XilinxChipTestBoardData(); + break; case MYTHEN3: generalData = new Mythen3Data(); break; @@ -192,6 +196,7 @@ void Implementation::SetupListener(int i) { void Implementation::SetupDataProcessor(int i) { dataProcessor[i]->SetFifo(fifo[i].get()); dataProcessor[i]->SetGeneralData(generalData); + dataProcessor[i]->SetUdpPortNumber(udpPortNum[i]); dataProcessor[i]->SetActivate(activated); dataProcessor[i]->SetReceiverROI(portRois[i]); dataProcessor[i]->SetDataStreamEnable(dataStreamEnable); @@ -201,19 +206,21 @@ void Implementation::SetupDataProcessor(int i) { dataProcessor[i]->SetFramePadding(framePadding); dataProcessor[i]->SetCtbDbitList(ctbDbitList); dataProcessor[i]->SetCtbDbitOffset(ctbDbitOffset); + dataProcessor[i]->SetQuadEnable(quadEnable); + dataProcessor[i]->SetFlipRows(flipRows); + dataProcessor[i]->SetNumberofTotalFrames(numberOfTotalFrames); + dataProcessor[i]->SetAdditionalJsonHeader(additionalJsonHeader); } void Implementation::SetupDataStreamer(int i) { dataStreamer[i]->SetFifo(fifo[i].get()); dataStreamer[i]->SetGeneralData(generalData); - dataStreamer[i]->CreateZmqSockets(streamingPort, streamingSrcIP, - streamingHwm); + dataStreamer[i]->CreateZmqSockets(streamingPort, streamingHwm); dataStreamer[i]->SetAdditionalJsonHeader(additionalJsonHeader); dataStreamer[i]->SetFileIndex(fileIndex); dataStreamer[i]->SetQuadEnable(quadEnable); dataStreamer[i]->SetFlipRows(flipRows); dataStreamer[i]->SetNumberofPorts(numPorts); - dataStreamer[i]->SetQuadEnable(quadEnable); dataStreamer[i]->SetNumberofTotalFrames(numberOfTotalFrames); dataStreamer[i]->SetReceiverROI( portRois[i].completeRoi() ? GetMaxROIPerPort() : portRois[i]); @@ -526,10 +533,7 @@ void Implementation::setFileFormat(const fileFormat f) { std::string Implementation::getFilePath() const { return filePath; } void Implementation::setFilePath(const std::string &c) { - if (!c.empty()) { - mkdir_p(c); // throws if it can't create - filePath = c; - } + filePath = c; LOG(logINFO) << "File path: " << filePath; } @@ -685,18 +689,26 @@ void Implementation::startReceiver() { // callbacks if (startAcquisitionCallBack) { try { - std::size_t imageSize = - static_cast(generalData->imageSize); - startAcquisitionCallBack(filePath, fileName, fileIndex, imageSize, - pStartAcquisition); + std::vector udpPort; + for (size_t i = 0; i != listener.size(); ++i) { + udpPort.push_back(udpPortNum[i]); + } + startCallbackHeader callbackHeader = { + udpPort, + generalData->dynamicRange, + numPorts, + static_cast(generalData->imageSize), + filePath, + fileName, + fileIndex, + quadEnable, + additionalJsonHeader}; + startAcquisitionCallBack(callbackHeader, pStartAcquisition); } catch (const std::exception &e) { std::ostringstream oss; oss << "Start Acquisition Callback Error: " << e.what(); throw RuntimeError(oss.str()); } - if (rawDataReadyCallBack != nullptr) { - LOG(logINFO) << "Data Write has been defined externally"; - } } // processor->writer @@ -793,15 +805,26 @@ void Implementation::stopReceiver() { } TLogLevel lev = ((mp[i]) > 0) ? logINFORED : logINFOGREEN; - LOG(lev) << "Summary of Port " << udpPortNum[i] << summary; + LOG(lev) << "Summary of Port " << udpPortNum[i] << " (" << eth[i] + << ')' << summary; } // callback if (acquisitionFinishedCallBack) { try { - acquisitionFinishedCallBack( - (tot / generalData->numUDPInterfaces), - pAcquisitionFinished); + std::vector udpPort; + std::vector completeFramesCaught; + std::vector lastFrameIndexCaught; + for (size_t i = 0; i != listener.size(); ++i) { + udpPort.push_back(udpPortNum[i]); + completeFramesCaught.push_back( + listener[i]->GetNumCompleteFramesCaught()); + lastFrameIndexCaught.push_back( + listener[i]->GetLastFrameIndexCaught()); + } + endCallbackHeader callHeader = {udpPort, completeFramesCaught, + lastFrameIndexCaught}; + acquisitionFinishedCallBack(callHeader, pAcquisitionFinished); } catch (const std::exception &e) { // change status status = IDLE; @@ -897,14 +920,17 @@ void Implementation::CreateUDPSockets() { void Implementation::SetupWriter() { try { + // check if folder exists and throw if it cant create + mkdir_p(filePath); + // create first files for (unsigned int i = 0; i < dataProcessor.size(); ++i) { std::ostringstream os; os << filePath << "/" << fileName << "_d" << (modulePos * generalData->numUDPInterfaces + i); std::string fileNamePrefix = os.str(); - dataProcessor[i]->CreateFirstFiles( - fileNamePrefix, fileIndex, overwriteEnable, silentMode, - udpPortNum[i], numberOfTotalFrames, detectorDataStream[i]); + dataProcessor[i]->CreateFirstFiles(fileNamePrefix, fileIndex, + overwriteEnable, silentMode, + detectorDataStream[i]); } } catch (const RuntimeError &e) { shutDownUDPSockets(); @@ -966,7 +992,7 @@ void Implementation::StartMasterWriter() { masterAttributes.dbitoffset = ctbDbitOffset; masterAttributes.dbitlist = 0; for (auto &i : ctbDbitList) { - masterAttributes.dbitlist |= (1 << i); + masterAttributes.dbitlist |= (static_cast(1) << i); } masterAttributes.transceiverSamples = generalData->nTransceiverSamples; @@ -1000,8 +1026,7 @@ void Implementation::StartMasterWriter() { (numPorts.x * numPorts.y) > 1) { virtualFileName = dataProcessor[0]->CreateVirtualFile( filePath, fileName, fileIndex, overwriteEnable, silentMode, - modulePos, numberOfTotalFrames, numPorts.x, numPorts.y, - &hdf5LibMutex); + modulePos, numPorts.x, numPorts.y, &hdf5LibMutex); } // link file in master if (masterFileWriteEnable) { @@ -1109,11 +1134,6 @@ void Implementation::setNumberofUDPInterfaces(const int n) { it->registerCallBackRawDataReady(rawDataReadyCallBack, pRawDataReady); } - if (rawDataModifyReadyCallBack) { - for (const auto &it : dataProcessor) - it->registerCallBackRawDataModifyReady( - rawDataModifyReadyCallBack, pRawDataReady); - } // test socket buffer size with current set up setUDPSocketBufferSize(0); @@ -1145,6 +1165,7 @@ uint16_t Implementation::getUDPPortNumber() const { return udpPortNum[0]; } void Implementation::setUDPPortNumber(const uint16_t i) { udpPortNum[0] = i; listener[0]->SetUdpPortNumber(i); + dataProcessor[0]->SetUdpPortNumber(i); LOG(logINFO) << "UDP Port Number[0]: " << udpPortNum[0]; } @@ -1154,6 +1175,7 @@ void Implementation::setUDPPortNumber2(const uint16_t i) { udpPortNum[1] = i; if (listener.size() > 1) { listener[1]->SetUdpPortNumber(i); + dataProcessor[1]->SetUdpPortNumber(i); } LOG(logINFO) << "UDP Port Number[1]: " << udpPortNum[1]; } @@ -1258,13 +1280,6 @@ void Implementation::setStreamingPort(const uint16_t i) { LOG(logINFO) << "Streaming Port: " << streamingPort; } -IpAddr Implementation::getStreamingSourceIP() const { return streamingSrcIP; } - -void Implementation::setStreamingSourceIP(const IpAddr ip) { - streamingSrcIP = ip; - LOG(logINFO) << "Streaming Source IP: " << streamingSrcIP; -} - int Implementation::getStreamingHwm() const { return streamingHwm; } void Implementation::setStreamingHwm(const int i) { @@ -1282,6 +1297,9 @@ void Implementation::setAdditionalJsonHeader( const std::map &c) { additionalJsonHeader = c; + for (const auto &it : dataProcessor) { + it->SetAdditionalJsonHeader(c); + } for (const auto &it : dataStreamer) { it->SetAdditionalJsonHeader(c); } @@ -1324,6 +1342,9 @@ void Implementation::setAdditionalJsonParameter(const std::string &key, LOG(logINFO) << "Adding additional json parameter (" << key << ") to " << value; } + for (const auto &it : dataProcessor) { + it->SetAdditionalJsonHeader(additionalJsonHeader); + } for (const auto &it : dataStreamer) { it->SetAdditionalJsonHeader(additionalJsonHeader); } @@ -1363,6 +1384,8 @@ void Implementation::updateTotalNumberOfFrames() { } numberOfTotalFrames = numFrames * repeats * (int64_t)(numberOfAdditionalStorageCells + 1); + for (const auto &it : dataProcessor) + it->SetNumberofTotalFrames(numberOfTotalFrames); for (const auto &it : dataStreamer) it->SetNumberofTotalFrames(numberOfTotalFrames); if (numberOfTotalFrames == 0) { @@ -1621,6 +1644,8 @@ bool Implementation::getFlipRows() const { return flipRows; } void Implementation::setFlipRows(bool enable) { flipRows = enable; + for (const auto &it : dataProcessor) + it->SetFlipRows(flipRows); for (const auto &it : dataStreamer) it->SetFlipRows(flipRows); LOG(logINFO) << "Flip Rows: " << flipRows; @@ -1632,6 +1657,10 @@ void Implementation::setQuad(const bool b) { if (quadEnable != b) { quadEnable = b; setDetectorSize(numModules); + for (const auto &it : dataProcessor) { + it->SetQuadEnable(quadEnable); + it->SetFlipRows(flipRows); + } for (const auto &it : dataStreamer) { it->SetQuadEnable(quadEnable); it->SetFlipRows(flipRows); @@ -1773,35 +1802,25 @@ void Implementation::setTransceiverEnableMask(uint32_t mask) { * * * ************************************************/ void Implementation::registerCallBackStartAcquisition( - int (*func)(const std::string &, const std::string &, uint64_t, size_t, - void *), - void *arg) { + int (*func)(const startCallbackHeader, void *), void *arg) { startAcquisitionCallBack = func; pStartAcquisition = arg; } -void Implementation::registerCallBackAcquisitionFinished(void (*func)(uint64_t, - void *), - void *arg) { +void Implementation::registerCallBackAcquisitionFinished( + void (*func)(const endCallbackHeader, void *), void *arg) { acquisitionFinishedCallBack = func; pAcquisitionFinished = arg; } void Implementation::registerCallBackRawDataReady( - void (*func)(sls_receiver_header &, char *, size_t, void *), void *arg) { + void (*func)(sls_receiver_header &, dataCallbackHeader, char *, size_t &, + void *), + void *arg) { rawDataReadyCallBack = func; pRawDataReady = arg; for (const auto &it : dataProcessor) it->registerCallBackRawDataReady(rawDataReadyCallBack, pRawDataReady); } -void Implementation::registerCallBackRawDataModifyReady( - void (*func)(sls_receiver_header &, char *, size_t &, void *), void *arg) { - rawDataModifyReadyCallBack = func; - pRawDataReady = arg; - for (const auto &it : dataProcessor) - it->registerCallBackRawDataModifyReady(rawDataModifyReadyCallBack, - pRawDataReady); -} - } // namespace sls diff --git a/slsReceiverSoftware/src/Implementation.h b/slsReceiverSoftware/src/Implementation.h index 7c41a91e6..671f6deb2 100644 --- a/slsReceiverSoftware/src/Implementation.h +++ b/slsReceiverSoftware/src/Implementation.h @@ -142,8 +142,6 @@ class Implementation : private virtual slsDetectorDefs { void setStreamingStartingFrameNumber(const uint32_t fnum); uint16_t getStreamingPort() const; void setStreamingPort(const uint16_t i); - IpAddr getStreamingSourceIP() const; - void setStreamingSourceIP(const IpAddr ip); int getStreamingHwm() const; void setStreamingHwm(const int i); std::map getAdditionalJsonHeader() const; @@ -267,22 +265,17 @@ class Implementation : private virtual slsDetectorDefs { * * * ************************************************/ /** params: file path, file name, file index, image size */ - void registerCallBackStartAcquisition(int (*func)(const std::string &, - const std::string &, - uint64_t, size_t, void *), + void registerCallBackStartAcquisition(int (*func)(const startCallbackHeader, + void *), void *arg); /** params: total frames caught */ - void registerCallBackAcquisitionFinished(void (*func)(uint64_t, void *), - void *arg); + void registerCallBackAcquisitionFinished( + void (*func)(const endCallbackHeader, void *), void *arg); /** params: sls_receiver_header, pointer to data, image size */ void registerCallBackRawDataReady(void (*func)(sls_receiver_header &, - char *, size_t, void *), + dataCallbackHeader, char *, + size_t &, void *), void *arg); - /** params: sls_receiver_header, pointer to data, reference to image size */ - void registerCallBackRawDataModifyReady(void (*func)(sls_receiver_header &, - char *, size_t &, - void *), - void *arg); private: void SetLocalNetworkParameters(); @@ -346,7 +339,6 @@ class Implementation : private virtual slsDetectorDefs { uint32_t streamingTimerInMs{DEFAULT_STREAMING_TIMER_IN_MS}; uint32_t streamingStartFnum{0}; uint16_t streamingPort{0}; - IpAddr streamingSrcIP = IpAddr{}; int streamingHwm{-1}; std::map additionalJsonHeader; @@ -382,15 +374,13 @@ class Implementation : private virtual slsDetectorDefs { int ctbDbitOffset{0}; // callbacks - int (*startAcquisitionCallBack)(const std::string &, const std::string &, - uint64_t, size_t, void *){nullptr}; + int (*startAcquisitionCallBack)(const startCallbackHeader, void *){nullptr}; void *pStartAcquisition{nullptr}; - void (*acquisitionFinishedCallBack)(uint64_t, void *){nullptr}; + void (*acquisitionFinishedCallBack)(const endCallbackHeader, + void *){nullptr}; void *pAcquisitionFinished{nullptr}; - void (*rawDataReadyCallBack)(sls_receiver_header &, char *, size_t, - void *){nullptr}; - void (*rawDataModifyReadyCallBack)(sls_receiver_header &, char *, size_t &, - void *){nullptr}; + void (*rawDataReadyCallBack)(sls_receiver_header &, dataCallbackHeader, + char *, size_t &, void *){nullptr}; void *pRawDataReady{nullptr}; // class objects diff --git a/slsReceiverSoftware/src/Listener.cpp b/slsReceiverSoftware/src/Listener.cpp index f1cb897df..7dac8952a 100644 --- a/slsReceiverSoftware/src/Listener.cpp +++ b/slsReceiverSoftware/src/Listener.cpp @@ -81,10 +81,6 @@ void Listener::SetEthernetInterface(const std::string e) { if (eth.find('.') != std::string::npos) { eth = ""; } - if (!eth.length()) { - LOG(logWARNING) << "ethernet interface for udp port " << udpPortNumber - << " is empty. Listening to all"; - } } void Listener::SetActivate(bool enable) { @@ -153,12 +149,15 @@ void Listener::CreateUDPSocket(int &actualSize) { packetSize = generalData->vetoPacketSize; } + std::string ip = + (eth.length() ? InterfaceNameToIp(eth).str().c_str() : ""); + udpSocket = nullptr; udpSocket = make_unique( - udpPortNumber, packetSize, - (eth.length() ? InterfaceNameToIp(eth).str().c_str() : nullptr), + udpPortNumber, packetSize, (ip.length() ? ip.c_str() : nullptr), generalData->udpSocketBufferSize); - LOG(logINFO) << index << ": UDP port opened at port " << udpPortNumber; + LOG(logINFO) << index << ": UDP port opened at port " << udpPortNumber + << " (" << (ip.length() ? ip : "any") << ')'; udpSocketAlive = true; @@ -466,11 +465,12 @@ void Listener::CopyPacket(char *dst, char *src, uint32_t dataSize, // 2nd packet: 4 bytes fnum, previous 1*2 bytes data + 640*2 bytes data case GOTTHARD: if (!pnum) - memcpy(dst, &src[detHeaderSize + 4], dataSize - 2); + memcpy(dst, &src[detHeaderSize + 2], dataSize - 2); else - memcpy(dst + dataSize - 2, &src[detHeaderSize], dataSize + 2); + memcpy(dst + dataSize - 2, &src[detHeaderSize - 2], dataSize + 2); break; case CHIPTESTBOARD: + case XILINX_CHIPTESTBOARD: if (pnum == (generalData->packetsPerFrame - 1)) memcpy(dst + (pnum * dataSize), &src[detHeaderSize], correctedDataSize); diff --git a/slsReceiverSoftware/src/MasterAttributes.cpp b/slsReceiverSoftware/src/MasterAttributes.cpp index 9f0c8c9a1..c7a73f4d1 100644 --- a/slsReceiverSoftware/src/MasterAttributes.cpp +++ b/slsReceiverSoftware/src/MasterAttributes.cpp @@ -31,6 +31,9 @@ void MasterAttributes::GetBinaryAttributes( case slsDetectorDefs::CHIPTESTBOARD: GetCtbBinaryAttributes(w); break; + case slsDetectorDefs::XILINX_CHIPTESTBOARD: + GetXilinxCtbBinaryAttributes(w); + break; default: throw RuntimeError("Unknown Detector type to get master attributes"); } @@ -63,6 +66,9 @@ void MasterAttributes::WriteHDF5Attributes(H5::H5File *fd, H5::Group *group) { case slsDetectorDefs::CHIPTESTBOARD: WriteCtbHDF5Attributes(fd, group); break; + case slsDetectorDefs::XILINX_CHIPTESTBOARD: + WriteXilinxCtbHDF5Attributes(fd, group); + break; default: throw RuntimeError("Unknown Detector type to get master attributes"); } @@ -814,4 +820,49 @@ void MasterAttributes::WriteCtbHDF5Attributes(H5::H5File *fd, } #endif +void MasterAttributes::GetXilinxCtbBinaryAttributes( + rapidjson::PrettyWriter *w) { + w->Key("Exptime"); + w->String(ToString(exptime).c_str()); + w->Key("Period"); + w->String(ToString(period).c_str()); + w->Key("ADC Mask"); + w->String(ToStringHex(adcmask).c_str()); + w->Key("Analog Flag"); + w->Uint(analog); + w->Key("Analog Samples"); + w->Uint(analogSamples); + w->Key("Digital Flag"); + w->Uint(digital); + w->Key("Digital Samples"); + w->Uint(digitalSamples); + w->Key("Dbit Offset"); + w->Uint(dbitoffset); + w->Key("Dbit Bitset"); + w->Uint64(dbitlist); + w->Key("Transceiver Mask"); + w->String(ToStringHex(transceiverMask).c_str()); + w->Key("Transceiver Flag"); + w->Uint(transceiver); + w->Key("Transceiver Samples"); + w->Uint(transceiverSamples); +} + +#ifdef HDF5C +void MasterAttributes::WriteXilinxCtbHDF5Attributes(H5::H5File *fd, + H5::Group *group) { + MasterAttributes::WriteHDF5Exptime(fd, group); + MasterAttributes::WriteHDF5Period(fd, group); + MasterAttributes::WriteHDF5AdcMask(fd, group); + MasterAttributes::WriteHDF5AnalogFlag(fd, group); + MasterAttributes::WriteHDF5AnalogSamples(fd, group); + MasterAttributes::WriteHDF5DigitalFlag(fd, group); + MasterAttributes::WriteHDF5DigitalSamples(fd, group); + MasterAttributes::WriteHDF5DbitOffset(fd, group); + MasterAttributes::WriteHDF5DbitList(fd, group); + MasterAttributes::WriteHDF5TransceiverMask(fd, group); + MasterAttributes::WriteHDF5TransceiverFlag(fd, group); + MasterAttributes::WriteHDF5TransceiverSamples(fd, group); +} +#endif } // namespace sls diff --git a/slsReceiverSoftware/src/MasterAttributes.h b/slsReceiverSoftware/src/MasterAttributes.h index c079fcf08..4853446fb 100644 --- a/slsReceiverSoftware/src/MasterAttributes.h +++ b/slsReceiverSoftware/src/MasterAttributes.h @@ -152,6 +152,12 @@ class MasterAttributes { #ifdef HDF5C void WriteCtbHDF5Attributes(H5::H5File *fd, H5::Group *group); #endif + + void GetXilinxCtbBinaryAttributes( + rapidjson::PrettyWriter *w); +#ifdef HDF5C + void WriteXilinxCtbHDF5Attributes(H5::H5File *fd, H5::Group *group); +#endif }; } // namespace sls diff --git a/slsReceiverSoftware/src/MultiReceiverApp.cpp b/slsReceiverSoftware/src/MultiReceiverApp.cpp index b9ac35eab..7e6b3656b 100644 --- a/slsReceiverSoftware/src/MultiReceiverApp.cpp +++ b/slsReceiverSoftware/src/MultiReceiverApp.cpp @@ -38,11 +38,14 @@ void sigInterruptHandler(int p) { sem_post(&semaphore); } * prints usage of this example program */ std::string getHelpMessage() { - return std::string( - "\n\nUsage:\n" - "./slsMultiReceiver(detReceiver) [start_tcp_port (non-zero and 16 " - "bit)] [num_receivers] [optional: 1 for call back (print frame header " - "for debugging), 0 for none (default)]\n\n"); + std::ostringstream os; + os << "\nUsage:\n" + << "./slsMultiReceiver [start tcp port] [num recevers] [call back " + "option (optional)]\n" + << "\t - tcp port has to be non-zero and 16 bit\n" + << "\t - call back option is 0 (disabled) by default, 1 prints frame " + "header for debugging\n"; + return os.str(); } /** @@ -50,19 +53,40 @@ std::string getHelpMessage() { * enabled) if registerCallBackRawDataReady or * registerCallBackRawDataModifyReady registered, users get data */ -int StartAcq(const std::string &filePath, const std::string &fileName, - uint64_t fileIndex, size_t imageSize, void *objectPointer) { - LOG(sls::logINFOBLUE) << "#### StartAcq: filePath:" << filePath - << " fileName:" << fileName - << " fileIndex:" << fileIndex - << " imageSize:" << imageSize << " ####"; +int StartAcq(const slsDetectorDefs::startCallbackHeader callbackHeader, + void *objectPointer) { + LOG(sls::logINFOBLUE) << "#### Start Acquisition:" + << "\n\t[" + << "\n\tUDP Port : " + << sls::ToString(callbackHeader.udpPort) + << "\n\tDynamic Range : " + << callbackHeader.dynamicRange + << "\n\tDetector Shape : " + << sls::ToString(callbackHeader.detectorShape) + << "\n\tImage Size : " << callbackHeader.imageSize + << "\n\tFile Path : " << callbackHeader.filePath + << "\n\tFile Name : " << callbackHeader.fileName + << "\n\tFile Index : " << callbackHeader.fileIndex + << "\n\tQuad Enable : " << callbackHeader.quad + << "\n\tAdditional Json Header : " + << sls::ToString(callbackHeader.addJsonHeader) + << "\n\t]"; return 0; } /** Acquisition Finished Call back */ -void AcquisitionFinished(uint64_t framesCaught, void *objectPointer) { - LOG(sls::logINFOBLUE) << "#### AcquisitionFinished: framesCaught:" - << framesCaught << " ####"; +void AcquisitionFinished( + const slsDetectorDefs::endCallbackHeader callbackHeader, + void *objectPointer) { + LOG(sls::logINFOBLUE) << "#### AcquisitionFinished:" + << "\n\t[" + << "\n\tUDP Port : " + << sls::ToString(callbackHeader.udpPort) + << "\n\tComplete Frames : " + << sls::ToString(callbackHeader.completeFrames) + << "\n\tLast Frame Index : " + << sls::ToString(callbackHeader.lastFrameIndex) + << "\n\t]"; } /** @@ -70,62 +94,61 @@ void AcquisitionFinished(uint64_t framesCaught, void *objectPointer) { * Prints in different colors(for each receiver process) the different headers * for each image call back. */ -void GetData(slsDetectorDefs::sls_receiver_header &header, char *dataPointer, - size_t imageSize, void *objectPointer) { +void GetData(slsDetectorDefs::sls_receiver_header &header, + slsDetectorDefs::dataCallbackHeader callbackHeader, + char *dataPointer, size_t &imageSize, void *objectPointer) { + slsDetectorDefs::sls_detector_header detectorHeader = header.detHeader; PRINT_IN_COLOR( - detectorHeader.modId ? detectorHeader.modId : detectorHeader.row, - "#### %d %d GetData: ####\n" - "frameNumber: %lu\t\texpLength: %u\t\tpacketNumber: %u\t\tdetSpec1: %lu" - "\t\ttimestamp: %lu\t\tmodId: %u\t\t" - "row: %u\t\tcolumn: %u\t\tdetSpec2: %u\t\tdetSpec3: %u" - "\t\tdetSpec4: %u\t\tdetType: %u\t\tversion: %u" - //"\t\tpacketsMask:%s" - "\t\tfirstbytedata: 0x%x\t\tdatsize: %zu\n\n", - detectorHeader.column, detectorHeader.row, - (long unsigned int)detectorHeader.frameNumber, detectorHeader.expLength, - detectorHeader.packetNumber, (long unsigned int)detectorHeader.detSpec1, - (long unsigned int)detectorHeader.timestamp, detectorHeader.modId, - detectorHeader.row, detectorHeader.column, detectorHeader.detSpec2, - detectorHeader.detSpec3, detectorHeader.detSpec4, - detectorHeader.detType, detectorHeader.version, + (callbackHeader.udpPort % 10), + "#### GetData: " + "\n\tCallback Header: " + "\n\t[" + "\n\tUDP Port: %u" + "\n\tShape: [%u, %u]" + "\n\tAcq Index : %lu" + "\n\tFrame Index :%lu" + "\n\tProgress : %.2f%%" + "\n\tCompelte Image :%s" + "\n\tFlip Rows :%s" + "\n\tAdditional Json Header : %s" + "\n\t]" + "\n\ttReceiver Header: " + "\n\t[" + "\n\tFrame Number : %lu" + "\n\tExposure Length :%u" + "\n\tPackets Caught :%u" + "\n\tDetector Specific 1: %lu" + "\n\tTimestamp : %lu" + "\n\tModule Id :%u" + "\n\tRow : %u" + "\n\tColumn :%u" + "\n\tDetector Specific 2 : %u" + "\n\tDetector Specific 3 : %u" + "\n\tDetector Specific 4 : %u" + "\n\tDetector Type : %s" + "\n\tVersion: %u" + "\n\t]" + "\n\tFirst Byte Data: 0x%x" + "\n\tImage Size: %zu\n\n", + callbackHeader.udpPort, callbackHeader.shape.x, callbackHeader.shape.y, + callbackHeader.acqIndex, callbackHeader.frameIndex, + callbackHeader.progress, + sls::ToString(callbackHeader.completeImage).c_str(), + sls::ToString(callbackHeader.flipRows).c_str(), + sls::ToString(callbackHeader.addJsonHeader).c_str(), + detectorHeader.frameNumber, detectorHeader.expLength, + detectorHeader.packetNumber, detectorHeader.detSpec1, + detectorHeader.timestamp, detectorHeader.modId, detectorHeader.row, + detectorHeader.column, detectorHeader.detSpec2, detectorHeader.detSpec3, + detectorHeader.detSpec4, sls::ToString(detectorHeader.detType).c_str(), + detectorHeader.version, // header->packetsMask.to_string().c_str(), ((uint8_t)(*((uint8_t *)(dataPointer)))), imageSize); -} - -/** - * Get Receiver Data Call back (modified) - * Prints in different colors(for each receiver process) the different headers - * for each image call back. - * @param modifiedImageSize new data size in bytes after the callback. - * This will be the size written/streamed. (only smaller value is allowed). - */ -void GetData(slsDetectorDefs::sls_receiver_header &header, char *dataPointer, - size_t &modifiedImageSize, void *objectPointer) { - slsDetectorDefs::sls_detector_header detectorHeader = header.detHeader; - - PRINT_IN_COLOR( - detectorHeader.modId ? detectorHeader.modId : detectorHeader.row, - "#### %d %d GetData: ####\n" - "frameNumber: %lu\t\texpLength: %u\t\tpacketNumber: %u\t\tdetSpec1: %lu" - "\t\ttimestamp: %lu\t\tmodId: %u\t\t" - "row: %u\t\tcolumn: %u\t\tdetSpec2: %u\t\tdetSpec3: %u" - "\t\tdetSpec4: %u\t\tdetType: %u\t\tversion: %u" - //"\t\tpacketsMask:%s" - "\t\tfirstbytedata: 0x%x\t\tdatsize: %zu\n\n", - detectorHeader.column, detectorHeader.row, - (long unsigned int)detectorHeader.frameNumber, detectorHeader.expLength, - detectorHeader.packetNumber, (long unsigned int)detectorHeader.detSpec1, - (long unsigned int)detectorHeader.timestamp, detectorHeader.modId, - detectorHeader.row, detectorHeader.column, detectorHeader.detSpec2, - detectorHeader.detSpec3, detectorHeader.detSpec4, - detectorHeader.detType, detectorHeader.version, - // header->packetsMask.to_string().c_str(), - *reinterpret_cast(dataPointer), modifiedImageSize); // if data is modified, eg ROI and size is reduced - modifiedImageSize = 26000; + imageSize = 26000; } /** @@ -139,26 +162,40 @@ int main(int argc, char *argv[]) { /** - set default values */ int numReceivers = 1; - uint16_t startTCPPort = 1954; + uint16_t startTCPPort = DEFAULT_TCP_RX_PORTNO; int withCallback = 0; sem_init(&semaphore, 1, 0); /** - get number of receivers and start tcp port from command line * arguments */ - try { - if (argc == 3 || argc == 4) { - startTCPPort = sls::StringTo(argv[1]); - if (startTCPPort == 0) { - throw; - } - numReceivers = std::stoi(argv[2]); - if (argc == 4) { - withCallback = std::stoi(argv[3]); - } - } else - throw; - } catch (...) { - throw std::runtime_error(getHelpMessage()); + if (argc > 1) { + try { + if (argc == 3 || argc == 4) { + startTCPPort = sls::StringTo(argv[1]); + if (startTCPPort == 0) { + throw std::runtime_error("Invalid start tcp port"); + } + numReceivers = std::stoi(argv[2]); + if (numReceivers > 1024) { + cprintf(RED, + "Did you mix up the order of the arguments?\n%s\n", + getHelpMessage().c_str()); + return EXIT_FAILURE; + } + if (numReceivers == 0) { + cprintf(RED, "Invalid number of receivers.\n%s\n", + getHelpMessage().c_str()); + return EXIT_FAILURE; + } + if (argc == 4) { + withCallback = std::stoi(argv[3]); + } + } else + throw std::runtime_error("Invalid number of arguments"); + } catch (const std::exception &e) { + cprintf(RED, "Error: %s\n%s\n", e.what(), getHelpMessage().c_str()); + return EXIT_FAILURE; + } } cprintf(BLUE, "Parent Process Created [ Tid: %ld ]\n", (long)gettid()); @@ -214,26 +251,22 @@ int main(int argc, char *argv[]) { throw; } /** - register callbacks. remember to set file write enable to 0 - (using the client) if we should not write files and you will write data - using the callbacks */ + * (using the client) if we should not write files and you will + * write data using the callbacks */ if (withCallback) { /** - Call back for start acquisition */ - cprintf(BLUE, "Registering StartAcq()\n"); + cprintf(BLUE, "Registering StartAcq()\n"); receiver->registerCallBackStartAcquisition(StartAcq, nullptr); /** - Call back for acquisition finished */ - cprintf(BLUE, "Registering AcquisitionFinished()\n"); + cprintf(BLUE, "Registering AcquisitionFinished()\n"); receiver->registerCallBackAcquisitionFinished( AcquisitionFinished, nullptr); /* - Call back for raw data */ - cprintf(BLUE, "Registering GetData() \n"); - if (withCallback == 1) - receiver->registerCallBackRawDataReady(GetData, nullptr); - else if (withCallback == 2) - receiver->registerCallBackRawDataModifyReady(GetData, - nullptr); + cprintf(BLUE, "Registering GetData() \n"); + receiver->registerCallBackRawDataReady(GetData, nullptr); } /** - as long as no Ctrl+C */ diff --git a/slsReceiverSoftware/src/Receiver.cpp b/slsReceiverSoftware/src/Receiver.cpp index bff6757e0..d7c676366 100644 --- a/slsReceiverSoftware/src/Receiver.cpp +++ b/slsReceiverSoftware/src/Receiver.cpp @@ -133,28 +133,21 @@ std::string Receiver::getReceiverVersion() { return tcpipInterface->getReceiverVersion(); } -void Receiver::registerCallBackStartAcquisition(int (*func)(const std::string &, - const std::string &, - uint64_t, size_t, - void *), - void *arg) { +void Receiver::registerCallBackStartAcquisition( + int (*func)(const startCallbackHeader, void *), void *arg) { tcpipInterface->registerCallBackStartAcquisition(func, arg); } -void Receiver::registerCallBackAcquisitionFinished(void (*func)(uint64_t, - void *), - void *arg) { +void Receiver::registerCallBackAcquisitionFinished( + void (*func)(const endCallbackHeader, void *), void *arg) { tcpipInterface->registerCallBackAcquisitionFinished(func, arg); } void Receiver::registerCallBackRawDataReady( - void (*func)(sls_receiver_header &, char *, size_t, void *), void *arg) { + void (*func)(sls_receiver_header &, const dataCallbackHeader, char *, + size_t &, void *), + void *arg) { tcpipInterface->registerCallBackRawDataReady(func, arg); } -void Receiver::registerCallBackRawDataModifyReady( - void (*func)(sls_receiver_header &, char *, size_t &, void *), void *arg) { - tcpipInterface->registerCallBackRawDataModifyReady(func, arg); -} - } // namespace sls \ No newline at end of file diff --git a/slsReceiverSoftware/src/receiver_defs.h b/slsReceiverSoftware/src/receiver_defs.h index 2a7a4d1ed..05a10a9cb 100644 --- a/slsReceiverSoftware/src/receiver_defs.h +++ b/slsReceiverSoftware/src/receiver_defs.h @@ -22,14 +22,15 @@ namespace sls { #define HDF5_WRITER_VERSION (6.6) // 1 decimal places #define BINARY_WRITER_VERSION (7.2) // 1 decimal places -#define MAX_FRAMES_PER_FILE 20000 -#define SHORT_MAX_FRAMES_PER_FILE 100000 -#define EIGER_MAX_FRAMES_PER_FILE 10000 -#define JFRAU_MAX_FRAMES_PER_FILE 10000 -#define MOENCH_MAX_FRAMES_PER_FILE 100000 -#define CTB_MAX_FRAMES_PER_FILE 20000 -#define MYTHEN3_MAX_FRAMES_PER_FILE 10000 -#define GOTTHARD2_MAX_FRAMES_PER_FILE 20000 +#define MAX_FRAMES_PER_FILE 20000 +#define SHORT_MAX_FRAMES_PER_FILE 100000 +#define EIGER_MAX_FRAMES_PER_FILE 10000 +#define JFRAU_MAX_FRAMES_PER_FILE 10000 +#define MOENCH_MAX_FRAMES_PER_FILE 100000 +#define CTB_MAX_FRAMES_PER_FILE 20000 +#define XILINX_CTB_MAX_FRAMES_PER_FILE 20000 +#define MYTHEN3_MAX_FRAMES_PER_FILE 10000 +#define GOTTHARD2_MAX_FRAMES_PER_FILE 20000 #define STATISTIC_FRAMENUMBER_INFINITE (20000) diff --git a/slsSupportLib/include/sls/ToString.h b/slsSupportLib/include/sls/ToString.h index efef1161c..fc9a431bf 100644 --- a/slsSupportLib/include/sls/ToString.h +++ b/slsSupportLib/include/sls/ToString.h @@ -44,6 +44,8 @@ std::string ToString(const defs::streamingInterface s); std::string ToString(const defs::vetoAlgorithm s); std::string ToString(const defs::gainMode s); std::string ToString(const defs::polarity s); +std::string ToString(const defs::timingInfoDecoder s); +std::string ToString(const defs::collectionMode s); std::string ToString(const slsDetectorDefs::xy &coord); std::ostream &operator<<(std::ostream &os, const slsDetectorDefs::xy &coord); @@ -318,6 +320,8 @@ template <> defs::streamingInterface StringTo(const std::string &s); template <> defs::vetoAlgorithm StringTo(const std::string &s); template <> defs::gainMode StringTo(const std::string &s); template <> defs::polarity StringTo(const std::string &s); +template <> defs::timingInfoDecoder StringTo(const std::string &s); +template <> defs::collectionMode StringTo(const std::string &s); template <> uint8_t StringTo(const std::string &s); template <> uint16_t StringTo(const std::string &s); diff --git a/slsSupportLib/include/sls/ZmqSocket.h b/slsSupportLib/include/sls/ZmqSocket.h index 772d6bc65..ba65d59ce 100644 --- a/slsSupportLib/include/sls/ZmqSocket.h +++ b/slsSupportLib/include/sls/ZmqSocket.h @@ -24,7 +24,7 @@ #include //json header in zmq stream #pragma GCC diagnostic pop -//#include +// #include class zmq_msg_t; namespace sls { @@ -38,6 +38,8 @@ namespace sls { #define DEFAULT_LOW_ZMQ_HWM_BUFFERSIZE (1024 * 1024) // 1MB #define DEFAULT_ZMQ_BUFFERSIZE (-1) // os default +#define ZMQ_PUBLISHER_IP "0.0.0.0" + /** zmq header structure */ struct zmqHeader { /** true if incoming data, false if end of acquisition */ @@ -98,21 +100,11 @@ class ZmqSocket { // use this to optimize if optimizing required eg. int value = -1; if // (zmq_setsockopt(socketDescriptor, ZMQ_LINGER, &value,sizeof(value))) { // Close(); - /** - * Constructor for a client - * Creates socket, context and connects to server - * @param hostname_or_ip hostname or ip of server - * @param portnumber port number - */ + /** Constructor for a subscriber socket */ ZmqSocket(const char *const hostname_or_ip, const uint16_t portnumber); - /** - * Constructor for a server - * Creates socket, context and connects to server - * @param portnumber port number - * @param ethip is the ip of the ethernet interface to stream zmq from - */ - ZmqSocket(const uint16_t portnumber, const char *ethip); + /** Constructor for a publisher socket */ + ZmqSocket(const uint16_t portnumber); /** Returns high water mark for outbound messages */ int GetSendHighWaterMark(); diff --git a/slsSupportLib/include/sls/sls_detector_defs.h b/slsSupportLib/include/sls/sls_detector_defs.h index ac6fa5146..576df0763 100644 --- a/slsSupportLib/include/sls/sls_detector_defs.h +++ b/slsSupportLib/include/sls/sls_detector_defs.h @@ -25,7 +25,9 @@ #include #include #include +#include #include +#include #else // C includes #include @@ -96,6 +98,7 @@ class slsDetectorDefs { MOENCH, MYTHEN3, GOTTHARD2, + XILINX_CHIPTESTBOARD }; /** return values */ @@ -112,6 +115,20 @@ class slsDetectorDefs { STOPPED }; + /** + dimension indexes + */ + enum dimension { X, Y }; + +#ifdef __cplusplus + struct xy { + int x{0}; + int y{0}; + xy() = default; + xy(int x, int y) : x(x), y(y){}; + } __attribute__((packed)); +#endif + /** @short structure for a Detector Packet or Image Header Details at https://slsdetectorgroup.github.io/devdoc/udpheader.html @@ -159,6 +176,36 @@ class slsDetectorDefs { sls_detector_header detHeader; /**< is the detector header */ sls_bitset packetsMask; /**< is the packets caught bit mask */ }; + + struct startCallbackHeader { + std::vector udpPort; + uint32_t dynamicRange; + xy detectorShape; + size_t imageSize; + std::string filePath; + std::string fileName; + uint64_t fileIndex; + bool quad; + std::map addJsonHeader; + }; + + struct endCallbackHeader { + std::vector udpPort; + std::vector completeFrames; + std::vector lastFrameIndex; + }; + + struct dataCallbackHeader { + uint32_t udpPort; + xy shape; + uint64_t acqIndex; + uint64_t frameIndex; + double progress; + bool completeImage; + bool flipRows; + std::map addJsonHeader; + }; + #endif enum frameDiscardPolicy { NO_DISCARD, @@ -223,20 +270,6 @@ typedef struct { READOUT_ZMQ_ACTION }; - /** - dimension indexes - */ - enum dimension { X, Y }; - -#ifdef __cplusplus - struct xy { - int x{0}; - int y{0}; - xy() = default; - xy(int x, int y) : x(x), y(y){}; - } __attribute__((packed)); -#endif - /** use of the external signals */ @@ -486,6 +519,8 @@ enum streamingInterface { }; enum polarity { POSITIVE, NEGATIVE }; + enum timingInfoDecoder { SWISSFEL, SHINE }; + enum collectionMode { HOLE, ELECTRON }; #ifdef __cplusplus @@ -689,6 +724,7 @@ struct detParameters { nChipY = 2; nDacs = 8; break; + case slsDetectorDefs::detectorType::XILINX_CHIPTESTBOARD: case slsDetectorDefs::detectorType::CHIPTESTBOARD: nChanX = 36; nChanY = 1; diff --git a/slsSupportLib/include/sls/sls_detector_funcs.h b/slsSupportLib/include/sls/sls_detector_funcs.h index b0b6de884..badbd29af 100755 --- a/slsSupportLib/include/sls/sls_detector_funcs.h +++ b/slsSupportLib/include/sls/sls_detector_funcs.h @@ -292,6 +292,11 @@ enum detFuncs { F_SET_COLUMN, F_GET_PEDESTAL_MODE, F_SET_PEDESTAL_MODE, + F_CONFIG_TRANSCEIVER, + F_GET_TIMING_INFO_DECODER, + F_SET_TIMING_INFO_DECODER, + F_GET_COLLECTION_MODE, + F_SET_COLLECTION_MODE, NUM_DET_FUNCTIONS, RECEIVER_ENUM_START = 512, /**< detector function should not exceed this @@ -691,6 +696,11 @@ const char* getFunctionNameFromEnum(enum detFuncs func) { case F_SET_COLUMN: return "F_SET_COLUMN"; case F_GET_PEDESTAL_MODE: return "F_GET_PEDESTAL_MODE"; case F_SET_PEDESTAL_MODE: return "F_SET_PEDESTAL_MODE"; + case F_CONFIG_TRANSCEIVER: return "F_CONFIG_TRANSCEIVER"; + case F_GET_TIMING_INFO_DECODER: return "F_GET_TIMING_INFO_DECODER"; + case F_SET_TIMING_INFO_DECODER: return "F_SET_TIMING_INFO_DECODER"; + case F_GET_COLLECTION_MODE: return "F_GET_COLLECTION_MODE"; + case F_SET_COLLECTION_MODE: return "F_SET_COLLECTION_MODE"; case NUM_DET_FUNCTIONS: return "NUM_DET_FUNCTIONS"; case RECEIVER_ENUM_START: return "RECEIVER_ENUM_START"; @@ -746,8 +756,8 @@ const char* getFunctionNameFromEnum(enum detFuncs func) { case F_GET_RECEIVER_FILE_FORMAT: return "F_GET_RECEIVER_FILE_FORMAT"; case F_SET_RECEIVER_STREAMING_PORT: return "F_SET_RECEIVER_STREAMING_PORT"; case F_GET_RECEIVER_STREAMING_PORT: return "F_GET_RECEIVER_STREAMING_PORT"; - case F_SET_RECEIVER_STREAMING_SRC_IP: return "F_SET_RECEIVER_STREAMING_SRC_IP"; - case F_GET_RECEIVER_STREAMING_SRC_IP: return "F_GET_RECEIVER_STREAMING_SRC_IP"; + case F_SET_RECEIVER_STREAMING_SRC_IP: return "F_SET_RECEIVER_STREAMING_SRC_IP - obsolete"; + case F_GET_RECEIVER_STREAMING_SRC_IP: return "F_GET_RECEIVER_STREAMING_SRC_IP - obsolete"; case F_SET_RECEIVER_SILENT_MODE: return "F_SET_RECEIVER_SILENT_MODE"; case F_GET_RECEIVER_SILENT_MODE: return "F_GET_RECEIVER_SILENT_MODE"; case F_RESTREAM_STOP_FROM_RECEIVER: return "F_RESTREAM_STOP_FROM_RECEIVER"; diff --git a/slsSupportLib/include/sls/versionAPI.h b/slsSupportLib/include/sls/versionAPI.h index 0f4fed035..ae23d8ef0 100644 --- a/slsSupportLib/include/sls/versionAPI.h +++ b/slsSupportLib/include/sls/versionAPI.h @@ -1,13 +1,13 @@ // SPDX-License-Identifier: LGPL-3.0-or-other // Copyright (C) 2021 Contributors to the SLS Detector Package /** API versions */ -#define RELEASE "8.0.2" -#define APICTB "8.0.0 0x231109" -#define APIGOTTHARD "8.0.0 0x231109" -#define APIGOTTHARD2 "8.0.0 0x231109" -#define APIEIGER "8.0.0 0x231109" -#define APIJUNGFRAU "8.0.2 0x240827" -#define APIMOENCH "8.0.2 0x240827" -#define APIMYTHEN3 "8.0.2 0x240827" -#define APILIB "8.0.2 0x240916" -#define APIRECEIVER "8.0.2 0x240916" +#define APICTB "9.0.0 0x241121" +#define APIGOTTHARD "9.0.0 0x241121" +#define APIGOTTHARD2 "9.0.0 0x241121" +#define APIJUNGFRAU "9.0.0 0x241121" +#define APIMOENCH "9.0.0 0x241121" +#define APIXILINXCTB "9.0.0 0x241121" +#define APIEIGER "9.0.0 0x241121" +#define APIMYTHEN3 "9.0.0 0x241121" +#define APILIB "developer 0x241122" +#define APIRECEIVER "developer 0x241122" diff --git a/slsSupportLib/src/ToString.cpp b/slsSupportLib/src/ToString.cpp index 66206fe16..28db75323 100644 --- a/slsSupportLib/src/ToString.cpp +++ b/slsSupportLib/src/ToString.cpp @@ -207,6 +207,8 @@ std::string ToString(const defs::detectorType s) { return std::string("Mythen3"); case defs::GOTTHARD2: return std::string("Gotthard2"); + case defs::XILINX_CHIPTESTBOARD: + return std::string("Xilinx_ChipTestBoard"); default: return std::string("Unknown"); } @@ -677,6 +679,28 @@ std::string ToString(const defs::polarity s) { } } +std::string ToString(const defs::timingInfoDecoder s) { + switch (s) { + case defs::SWISSFEL: + return std::string("swissfel"); + case defs::SHINE: + return std::string("shine"); + default: + return std::string("Unknown"); + } +} + +std::string ToString(const defs::collectionMode s) { + switch (s) { + case defs::HOLE: + return std::string("hole"); + case defs::ELECTRON: + return std::string("electron"); + default: + return std::string("Unknown"); + } +} + const std::string &ToString(const std::string &s) { return s; } template <> defs::detectorType StringTo(const std::string &s) { @@ -694,6 +718,8 @@ template <> defs::detectorType StringTo(const std::string &s) { return defs::MYTHEN3; if (s == "Gotthard2") return defs::GOTTHARD2; + if (s == "Xilinx_ChipTestBoard") + return defs::XILINX_CHIPTESTBOARD; throw RuntimeError("Unknown detector type " + s); } @@ -1100,6 +1126,22 @@ template <> defs::polarity StringTo(const std::string &s) { throw RuntimeError("Unknown polarity mode " + s); } +template <> defs::timingInfoDecoder StringTo(const std::string &s) { + if (s == "swissfel") + return defs::SWISSFEL; + if (s == "shine") + return defs::SHINE; + throw RuntimeError("Unknown Timing Info Decoder " + s); +} + +template <> defs::collectionMode StringTo(const std::string &s) { + if (s == "hole") + return defs::HOLE; + if (s == "electron") + return defs::ELECTRON; + throw RuntimeError("Unknown collection mode " + s); +} + template <> uint8_t StringTo(const std::string &s) { int base = s.find("0x") != std::string::npos ? 16 : 10; int value = std::stoi(s, nullptr, base); diff --git a/slsSupportLib/src/ZmqSocket.cpp b/slsSupportLib/src/ZmqSocket.cpp index d727d61dc..2fafe4799 100644 --- a/slsSupportLib/src/ZmqSocket.cpp +++ b/slsSupportLib/src/ZmqSocket.cpp @@ -53,10 +53,19 @@ ZmqSocket::ZmqSocket(const char *const hostname_or_ip, } LOG(logDEBUG) << "Default receive high water mark:" << GetReceiveHighWaterMark(); + + // enable IPv6 addresses + int ipv6 = 1; + if (zmq_setsockopt(sockfd.socketDescriptor, ZMQ_IPV6, &ipv6, + sizeof(ipv6))) { + PrintError(); + throw ZmqSocketError("Could not set ZMQ_IPV6"); + } } -ZmqSocket::ZmqSocket(const uint16_t portnumber, const char *ethip) +ZmqSocket::ZmqSocket(const uint16_t portnumber) : portno(portnumber), sockfd(true) { + // create context sockfd.contextDescriptor = zmq_ctx_new(); if (sockfd.contextDescriptor == nullptr) @@ -72,10 +81,48 @@ ZmqSocket::ZmqSocket(const uint16_t portnumber, const char *ethip) // construct address, can be refactored with libfmt std::ostringstream oss; - oss << "tcp://" << ethip << ":" << portno; + oss << "tcp://" << ZMQ_PUBLISHER_IP << ":" << portno; sockfd.serverAddress = oss.str(); LOG(logDEBUG) << "zmq address: " << sockfd.serverAddress; + // enable IPv6 addresses + int ipv6 = 1; + if (zmq_setsockopt(sockfd.socketDescriptor, ZMQ_IPV6, &ipv6, + sizeof(ipv6))) { + PrintError(); + throw ZmqSocketError("Could not set ZMQ_IPV6"); + } + + // Socket Options for keepalive + // enable TCP keepalive + int keepalive = 1; + if (zmq_setsockopt(sockfd.socketDescriptor, ZMQ_TCP_KEEPALIVE, &keepalive, + sizeof(keepalive))) { + PrintError(); + throw ZmqSocketError("Could set socket opt ZMQ_TCP_KEEPALIVE"); + } + // set the number of keepalives before death + keepalive = 10; + if (zmq_setsockopt(sockfd.socketDescriptor, ZMQ_TCP_KEEPALIVE_CNT, + &keepalive, sizeof(keepalive))) { + PrintError(); + throw ZmqSocketError("Could set socket opt ZMQ_TCP_KEEPALIVE_CNT"); + } + // set the time before the first keepalive + keepalive = 60; + if (zmq_setsockopt(sockfd.socketDescriptor, ZMQ_TCP_KEEPALIVE_IDLE, + &keepalive, sizeof(keepalive))) { + PrintError(); + throw ZmqSocketError("Could set socket opt ZMQ_TCP_KEEPALIVE_IDLE"); + } + // set the interval between keepalives + keepalive = 1; + if (zmq_setsockopt(sockfd.socketDescriptor, ZMQ_TCP_KEEPALIVE_INTVL, + &keepalive, sizeof(keepalive))) { + PrintError(); + throw ZmqSocketError("Could set socket opt ZMQ_TCP_KEEPALIVE_INTVL"); + } + // bind address if (zmq_bind(sockfd.socketDescriptor, sockfd.serverAddress.c_str())) { PrintError(); @@ -83,7 +130,7 @@ ZmqSocket::ZmqSocket(const uint16_t portnumber, const char *ethip) } // sleep to allow a slow-joiner std::this_thread::sleep_for(std::chrono::milliseconds(200)); -}; +} int ZmqSocket::GetSendHighWaterMark() { int value = 0; @@ -188,8 +235,9 @@ void ZmqSocket::SetReceiveBuffer(int limit) { } } -void ZmqSocket::Rebind() { // the purpose is to apply HWL changes, which are - // frozen at bind, which is in the constructor. +void ZmqSocket::Rebind() { + // the purpose is to apply HWL changes, which are + // frozen at bind, which is in the constructor. // unbbind if (zmq_unbind(sockfd.socketDescriptor, sockfd.serverAddress.c_str())) { @@ -472,8 +520,11 @@ void ZmqSocket::PrintError() { LOG(logERROR) << "No I/O thread is available to accomplish the task (zmq)"; break; + case ENOENT: + LOG(logERROR) << "The requested endpoint does not exist (zmq)"; + break; default: - LOG(logERROR) << "Unknown socket error (zmq)"; + LOG(logERROR) << "Unknown socket error (zmq). Error code: " << errno; break; } } diff --git a/slsSupportLib/tests/test-ToString.cpp b/slsSupportLib/tests/test-ToString.cpp index 56b591eba..4fa3ac1af 100644 --- a/slsSupportLib/tests/test-ToString.cpp +++ b/slsSupportLib/tests/test-ToString.cpp @@ -136,6 +136,7 @@ TEST_CASE("string to detectorType") { REQUIRE(StringTo
("Moench") == dt::MOENCH); REQUIRE(StringTo
("Mythen3") == dt::MYTHEN3); REQUIRE(StringTo
("Gotthard2") == dt::GOTTHARD2); + REQUIRE(StringTo
("Xilinx_ChipTestBoard") == dt::XILINX_CHIPTESTBOARD); } TEST_CASE("vec") { @@ -356,4 +357,17 @@ TEST_CASE("string to speedLevel") { REQUIRE(StringTo("144") == defs::speedLevel::G2_144MHZ); } +// Timing Info Decoder +TEST_CASE("timingInfoDecoder to string") { + REQUIRE(ToString(defs::timingInfoDecoder::SWISSFEL) == "swissfel"); + REQUIRE(ToString(defs::timingInfoDecoder::SHINE) == "shine"); +} + +TEST_CASE("string to timingInfoDecoder") { + REQUIRE(StringTo("swissfel") == + defs::timingInfoDecoder::SWISSFEL); + REQUIRE(StringTo("shine") == + defs::timingInfoDecoder::SHINE); +} + } // namespace sls diff --git a/slsSupportLib/tests/test-ZmqSocket.cpp b/slsSupportLib/tests/test-ZmqSocket.cpp index 8dba7fc8b..441ba9501 100644 --- a/slsSupportLib/tests/test-ZmqSocket.cpp +++ b/slsSupportLib/tests/test-ZmqSocket.cpp @@ -17,14 +17,14 @@ TEST_CASE("Get port number for sub") { TEST_CASE("Get port number for pub") { constexpr int port = 50001; - ZmqSocket pub(port, "*"); + ZmqSocket pub(port); REQUIRE(pub.GetPortNumber() == port); } TEST_CASE("Server address") { constexpr int port = 50001; - ZmqSocket pub(port, "*"); - REQUIRE(pub.GetZmqServerAddress() == std::string("tcp://*:50001")); + ZmqSocket pub(port); + REQUIRE(pub.GetZmqServerAddress() == std::string("tcp://0.0.0.0:50001")); } TEST_CASE("Send header on localhost") { @@ -32,7 +32,7 @@ TEST_CASE("Send header on localhost") { ZmqSocket sub("localhost", port); sub.Connect(); - ZmqSocket pub(port, "*"); + ZmqSocket pub(port); // Header to send zmqHeader header; @@ -67,7 +67,7 @@ TEST_CASE("Send serveral headers of different length") { ZmqSocket sub("localhost", port); sub.Connect(); - ZmqSocket pub(port, "*"); + ZmqSocket pub(port); zmqHeader header; header.data = false; // if true we wait for the data @@ -95,7 +95,7 @@ TEST_CASE("Send header and data") { ZmqSocket sub("localhost", port); sub.Connect(); - ZmqSocket pub(port, "*"); + ZmqSocket pub(port); std::vector data{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; const int nbytes = data.size() * sizeof(decltype(data)::value_type); diff --git a/tests/scripts/test_simulators.py b/tests/scripts/test_simulators.py index 1ee095d51..34f7ca9ba 100644 --- a/tests/scripts/test_simulators.py +++ b/tests/scripts/test_simulators.py @@ -51,6 +51,20 @@ def killProcess(name): else: print('process not running : ' + name) + +def killAllStaleProcesses(): + killProcess('eigerDetectorServer_virtual') + killProcess('jungfrauDetectorServer_virtual') + killProcess('mythen3DetectorServer_virtual') + killProcess('gotthard2DetectorServer_virtual') + killProcess('gotthardDetectorServer_virtual') + killProcess('ctbDetectorServer_virtual') + killProcess('moenchDetectorServer_virtual') + killProcess('xilinx_ctbDetectorServer_virtual') + killProcess('slsReceiver') + killProcess('slsMultiReceiver') + cleanSharedmemory() + def cleanup(name): ''' kill both servers, receivers and clean shared memory @@ -118,15 +132,17 @@ def loadConfig(name, rx_hostname, settingsdir): d.udp_srcip = d.udp_dstip else: d.udp_srcip = 'auto' - if d.type == detectorType.JUNGFRAU or d.type == detectorType.MOENCH: + if d.type == detectorType.JUNGFRAU or d.type == detectorType.MOENCH or d.type == detectorType.XILINX_CHIPTESTBOARD: d.powerchip = 1 + if d.type == detectorType.XILINX_CHIPTESTBOARD: + d.configureTransceiver() except: Log(Fore.RED, 'Could not load config for ' + name) raise def startCmdTests(name, fp, fname): Log(Fore.GREEN, 'Cmd Tests for ' + name) - cmd = 'tests --abort [.cmd] -s -o ' + fname + cmd = 'tests --abort [.cmdcall] -s -o ' + fname p = subprocess.run(cmd.split(), stdout=fp, stderr=fp, check=True, text=True) p.check_returncode() @@ -174,6 +190,7 @@ if args.servers is None: 'gotthard', 'ctb', 'moench', + 'xilinx_ctb' ] else: servers = args.servers @@ -199,6 +216,8 @@ with open(fname, 'w') as fp: Log(Fore.BLUE, 'General tests (results: ' + file_results + ')') startGeneralTests(fp, file_results) + killAllStaleProcesses() + for server in servers: try: # print to terminal for progress @@ -218,7 +237,7 @@ with open(fname, 'w') as fp: startCmdTests(server, fp, file_results) cleanup(server) except: - Log(log.RED, 'Exception caught. Cleaning up.') + Log(Fore.RED, 'Exception caught. Cleaning up.') cleanup(server) sys.stdout = original_stdout sys.stderr = original_stderr diff --git a/updateReleaseVersion.sh b/updateReleaseVersion.sh deleted file mode 100644 index 8f38ae191..000000000 --- a/updateReleaseVersion.sh +++ /dev/null @@ -1,15 +0,0 @@ -# SPDX-License-Identifier: LGPL-3.0-or-other -# Copyright (C) 2021 Contributors to the SLS Detector Package - -API_FILE=$PWD/slsSupportLib/include/sls/versionAPI.h -CURR_BRANCH=$(cat $API_FILE | grep RELEASE | awk '{print $3}' ) - -# default branch is developer -if [ $# -eq 0 ]; then - declare -a NEW_BRANCH="developer" -else - declare -a NEW_BRANCH=${1} -fi - -# update branch -sed -i s/$CURR_BRANCH/\"$NEW_BRANCH\"/g $API_FILE diff --git a/update_version.py b/update_version.py new file mode 100644 index 000000000..c074ae542 --- /dev/null +++ b/update_version.py @@ -0,0 +1,36 @@ +# SPDX-License-Identifier: LGPL-3.0-or-other +# Copyright (C) 2021 Contributors to the SLS Detector Package +""" +Script to update VERSION file with semantic versioning if provided as an argument, or with 0.0.0 if no argument is provided. +""" + +import sys +import re + +def get_version(): + + # Check at least one argument is passed + if len(sys.argv) < 2: + return "0.0.0" + + version = sys.argv[1] + + # Validate that the version argument matches semantic versioning format (X.Y.Z) + if not re.match(r'^\d+\.\d+\.\d+$', version): + print("Error: Version argument must be in semantic versioning format (X.Y.Z)") + sys.exit(1) + + return version + + +def write_version_to_file(version): + with open("VERSION", "w") as version_file: + version_file.write(version) + print(f"Version {version} written to VERSION file.") + + +# Main script +if __name__ == "__main__": + + version = get_version() + write_version_to_file(version) \ No newline at end of file diff --git a/zsh_autocomplete.sh b/zsh_autocomplete.sh new file mode 120000 index 000000000..143520002 --- /dev/null +++ b/zsh_autocomplete.sh @@ -0,0 +1 @@ +slsDetectorSoftware/generator/autocomplete/zsh_autocomplete.sh \ No newline at end of file