Compare commits
18 Commits
1.0.0-rc.1
...
1.0.0-rc.1
| Author | SHA1 | Date | |
|---|---|---|---|
| e6eb7af5ae | |||
| c9eb2ca65d | |||
| 3d9c93c32a | |||
| 1d7e5f173d | |||
| bc8afdcb55 | |||
| 4ae0668f2f | |||
| 4cf20ae71b | |||
| c7d255de6f | |||
| 7cc6f4508a | |||
| ce19996874 | |||
| ad579f5d22 | |||
| 26408608d4 | |||
| e92169a244 | |||
| 6aa43e6b7e | |||
| 2203513ffb | |||
| b605b95127 | |||
| 040c43084e | |||
| 95eaad3d35 |
329
.fpga_gitlab-ci.yml
Normal file
329
.fpga_gitlab-ci.yml
Normal file
@@ -0,0 +1,329 @@
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
- synthesis
|
||||
- release
|
||||
|
||||
build:x86:gcc:
|
||||
stage: build
|
||||
variables:
|
||||
CC: gcc
|
||||
CXX: g++
|
||||
tags:
|
||||
- gcc
|
||||
- x86
|
||||
needs: []
|
||||
script:
|
||||
- mkdir build
|
||||
- cd build
|
||||
- source /opt/rh/gcc-toolset-12/enable
|
||||
- cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
- make -j48
|
||||
|
||||
build:x86:gcc_writer:
|
||||
stage: build
|
||||
variables:
|
||||
CC: gcc
|
||||
CXX: g++
|
||||
tags:
|
||||
- gcc
|
||||
- x86
|
||||
needs: []
|
||||
script:
|
||||
- mkdir build
|
||||
- cd build
|
||||
- source /opt/rh/gcc-toolset-12/enable
|
||||
- cmake -DCMAKE_BUILD_TYPE=Release -DJFJOCH_WRITER_ONLY=ON ..
|
||||
- make -j48
|
||||
|
||||
build:x86:driver:
|
||||
stage: build
|
||||
variables:
|
||||
CC: gcc
|
||||
CXX: g++
|
||||
tags:
|
||||
- gcc
|
||||
- x86
|
||||
needs: []
|
||||
script:
|
||||
- cd fpga/pcie_driver
|
||||
- make
|
||||
|
||||
build:x86:python_client:
|
||||
stage: build
|
||||
needs: []
|
||||
tags:
|
||||
- python
|
||||
script:
|
||||
- cd python-client
|
||||
- python3 setup.py sdist bdist_wheel
|
||||
- mv dist/* ..
|
||||
artifacts:
|
||||
paths:
|
||||
- jfjoch_client-*whl
|
||||
- jfjoch_client-*tar.gz
|
||||
expire_in: 1 week
|
||||
|
||||
build:x86:vitis_hls:
|
||||
stage: build
|
||||
tags:
|
||||
- x86
|
||||
needs: []
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
- if: $CI_PIPELINE_SOURCE == "push"
|
||||
changes:
|
||||
- fpga/hls/*
|
||||
- fpga/hdl/*
|
||||
- fpga/scripts/*
|
||||
- fpga/xdc/*
|
||||
- fpga/microblaze/*
|
||||
- fpga/include/jfjoch_fpga.h
|
||||
script:
|
||||
- source /opt/Xilinx/Vitis_HLS/2022.1/settings64.sh
|
||||
- mkdir build
|
||||
- cd build
|
||||
- /usr/bin/cmake ..
|
||||
- make hls
|
||||
|
||||
build:x86:frontend:
|
||||
stage: build
|
||||
tags:
|
||||
- x86
|
||||
needs: []
|
||||
script:
|
||||
- mkdir build
|
||||
- cd build
|
||||
- /usr/bin/cmake ..
|
||||
- make frontend
|
||||
- cd ../frontend/dist
|
||||
- tar czf ../../jfjoch_frontend.tar.gz *
|
||||
artifacts:
|
||||
paths:
|
||||
- jfjoch_frontend.tar.gz
|
||||
expire_in: 1 week
|
||||
|
||||
build:x86:rpm:
|
||||
stage: build
|
||||
tags:
|
||||
- x86
|
||||
needs: []
|
||||
script:
|
||||
- mkdir build
|
||||
- cd build
|
||||
- source /opt/rh/gcc-toolset-12/enable
|
||||
- cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
- make frontend
|
||||
- make -j48 package
|
||||
- mv *.rpm ..
|
||||
artifacts:
|
||||
paths:
|
||||
- "*.rpm"
|
||||
expire_in: 1 week
|
||||
|
||||
test:x86:gcc:
|
||||
stage: test
|
||||
timeout: 90m
|
||||
variables:
|
||||
CTEST_OUTPUT_ON_FAILURE: 1
|
||||
CC: gcc
|
||||
CXX: g++
|
||||
needs: ["build:x86:gcc"]
|
||||
dependencies: []
|
||||
tags:
|
||||
- gcc
|
||||
- x86
|
||||
script:
|
||||
- source /opt/rh/gcc-toolset-12/enable
|
||||
- mkdir -p build
|
||||
- cd build
|
||||
- cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
- make -j48 jfjoch_test HDF5DatasetWriteTest
|
||||
- cd tests
|
||||
- ./jfjoch_test -r junit -o report.xml
|
||||
- cd ../tools
|
||||
- ./HDF5DatasetWriteTest ../../tests/test_data/compression_benchmark.h5
|
||||
artifacts:
|
||||
expire_in: 1 week
|
||||
reports:
|
||||
junit: build/tests/report.xml
|
||||
|
||||
test:x86:crystfel:
|
||||
stage: test
|
||||
timeout: 90m
|
||||
variables:
|
||||
CTEST_OUTPUT_ON_FAILURE: 1
|
||||
CC: gcc
|
||||
CXX: g++
|
||||
needs: ["build:x86:gcc"]
|
||||
dependencies: []
|
||||
tags:
|
||||
- gcc
|
||||
- x86
|
||||
- crystfel
|
||||
script:
|
||||
- source /opt/rh/gcc-toolset-12/enable
|
||||
- mkdir -p build
|
||||
- cd build
|
||||
- cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
- make -j8 HDF5DatasetWriteTest
|
||||
- cd ../tests/crystfel
|
||||
- HDF5DATASET_WRITE_TEST_IMAGES_PER_FILE=0 ../../build/tools/HDF5DatasetWriteTest ../../tests/test_data/compression_benchmark.h5 10
|
||||
- indexamajig -i writing_test.lst -g jf4m.geom -o x.stream --indexing=xgandalf
|
||||
|
||||
test:x86:xds_durin:
|
||||
stage: test
|
||||
timeout: 90m
|
||||
variables:
|
||||
CTEST_OUTPUT_ON_FAILURE: 1
|
||||
CC: gcc
|
||||
CXX: g++
|
||||
needs: ["build:x86:gcc"]
|
||||
dependencies: []
|
||||
tags:
|
||||
- gcc
|
||||
- x86
|
||||
- xds
|
||||
script:
|
||||
- source /opt/rh/gcc-toolset-12/enable
|
||||
- mkdir -p build
|
||||
- cd build
|
||||
- cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
- make -j8 HDF5DatasetWriteTest
|
||||
- cd ../tests/xds_durin
|
||||
- HDF5DATASET_WRITE_TEST_IMAGES_PER_FILE=0 ../../build/tools/HDF5DatasetWriteTest ../../tests/test_data/compression_benchmark.h5 25
|
||||
- xds_par |grep -a1 ISa |tail -n1
|
||||
|
||||
test:x86:xds_neggia:
|
||||
stage: test
|
||||
timeout: 90m
|
||||
variables:
|
||||
CTEST_OUTPUT_ON_FAILURE: 1
|
||||
CC: gcc
|
||||
CXX: g++
|
||||
needs: ["build:x86:gcc"]
|
||||
dependencies: []
|
||||
tags:
|
||||
- gcc
|
||||
- x86
|
||||
- xds
|
||||
script:
|
||||
- source /opt/rh/gcc-toolset-12/enable
|
||||
- mkdir -p build
|
||||
- cd build
|
||||
- cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
- make -j8 HDF5DatasetWriteTest
|
||||
- cd ../tests/xds_neggia
|
||||
- HDF5DATASET_WRITE_TEST_IMAGES_PER_FILE=0 ../../build/tools/HDF5DatasetWriteTest ../../tests/test_data/compression_benchmark.h5 25
|
||||
- xds_par |grep -a1 ISa |tail -n1
|
||||
|
||||
test:x86:xia2.ssx:
|
||||
stage: test
|
||||
timeout: 90m
|
||||
variables:
|
||||
CTEST_OUTPUT_ON_FAILURE: 1
|
||||
CC: gcc
|
||||
CXX: g++
|
||||
needs: ["build:x86:gcc"]
|
||||
dependencies: []
|
||||
tags:
|
||||
- gcc
|
||||
- x86
|
||||
- xds
|
||||
script:
|
||||
- source /opt/rh/gcc-toolset-12/enable
|
||||
- mkdir -p build
|
||||
- mkdir -p dials_test
|
||||
- cd build
|
||||
- cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
- make -j8 HDF5DatasetWriteTest
|
||||
- cd ../dials_test
|
||||
- ../build/tools/HDF5DatasetWriteTest ../tests/test_data/compression_benchmark.h5 100
|
||||
- source /usr/local/dials-v3-17-0/dials_env.sh
|
||||
- xia2.ssx image=writing_test_master.h5 space_group=P43212 unit_cell=78.551,78.551,36.914,90.000,90.000,90.000
|
||||
|
||||
synthesis:vivado_pcie_100g:
|
||||
stage: synthesis
|
||||
dependencies: []
|
||||
variables:
|
||||
CC: gcc
|
||||
CXX: g++
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
- if: $CI_PIPELINE_SOURCE == "push"
|
||||
changes:
|
||||
- fpga/hls/*
|
||||
- fpga/hdl/*
|
||||
- fpga/scripts/*
|
||||
- fpga/xdc/*
|
||||
- fpga/pcie_driver/jfjoch_fpga.h
|
||||
- if: $CI_COMMIT_MESSAGE =~ /^FPGA/
|
||||
allow_failure: true
|
||||
tags:
|
||||
- vivado
|
||||
retry: 2
|
||||
artifacts:
|
||||
paths:
|
||||
- "jfjoch_fpga_pcie_100g.mcs"
|
||||
expire_in: 1 week
|
||||
script:
|
||||
- source /opt/rh/gcc-toolset-12/enable
|
||||
- source /opt/Xilinx/Vivado/2022.1/settings64.sh
|
||||
- touch jfjoch_fpga_pcie_100g.mcs
|
||||
- mkdir -p build
|
||||
- cd build
|
||||
- /usr/bin/cmake ..
|
||||
- make -j4 pcie_100g
|
||||
- mv fpga/jfjoch_fpga_pcie_100g.mcs ..
|
||||
needs: ["build:x86:gcc", "test:x86:gcc"]
|
||||
|
||||
synthesis:vivado_pcie_8x10g:
|
||||
stage: synthesis
|
||||
dependencies: []
|
||||
variables:
|
||||
CC: gcc
|
||||
CXX: g++
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
- if: $CI_PIPELINE_SOURCE == "push"
|
||||
changes:
|
||||
- fpga/hls/*
|
||||
- fpga/hdl/*
|
||||
- fpga/scripts/*
|
||||
- fpga/xdc/*
|
||||
- fpga/pcie_driver/jfjoch_fpga.h
|
||||
- if: $CI_COMMIT_MESSAGE =~ /^FPGA/
|
||||
allow_failure: true
|
||||
tags:
|
||||
- vivado
|
||||
retry: 2
|
||||
artifacts:
|
||||
paths:
|
||||
- "jfjoch_fpga_pcie_8x10g.mcs"
|
||||
expire_in: 1 week
|
||||
script:
|
||||
- source /opt/rh/gcc-toolset-12/enable
|
||||
- source /opt/Xilinx/Vivado/2022.1/settings64.sh
|
||||
- touch jfjoch_fpga_pcie_8x10g.mcs
|
||||
- mkdir -p build
|
||||
- cd build
|
||||
- /usr/bin/cmake ..
|
||||
- make -j4 pcie_8x10g
|
||||
- mv fpga/jfjoch_fpga_pcie_8x10g.mcs ..
|
||||
needs: [ "build:x86:gcc", "test:x86:gcc" ]
|
||||
|
||||
release:
|
||||
stage: release
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
when: manual
|
||||
tags:
|
||||
- x86
|
||||
dependencies:
|
||||
- synthesis:vivado_pcie_8x10g
|
||||
- synthesis:vivado_pcie_100g
|
||||
- build:x86:python_client
|
||||
- build:x86:frontend
|
||||
- build:x86:rpm
|
||||
script:
|
||||
- bash gitlab_upload_release.sh
|
||||
220
.gitlab-ci.yml
220
.gitlab-ci.yml
@@ -1,7 +1,6 @@
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
- synthesis
|
||||
- release
|
||||
|
||||
build:x86:gcc:
|
||||
@@ -16,7 +15,7 @@ build:x86:gcc:
|
||||
script:
|
||||
- mkdir build
|
||||
- cd build
|
||||
- source /opt/rh/gcc-toolset-12/enable
|
||||
- source /opt/rh/gcc-toolset-12/enable
|
||||
- cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
- make -j48
|
||||
|
||||
@@ -45,37 +44,24 @@ build:x86:driver:
|
||||
- gcc
|
||||
- x86
|
||||
needs: []
|
||||
artifacts:
|
||||
paths:
|
||||
- "jfjoch_driver.tar.gz"
|
||||
expire_in: 1 week
|
||||
script:
|
||||
- cd fpga/pcie_driver
|
||||
- make
|
||||
- bash pack.sh
|
||||
- mv jfjoch_driver.tar.gz ../..
|
||||
|
||||
build:x86:vitis_hls:
|
||||
build:x86:python_client:
|
||||
stage: build
|
||||
tags:
|
||||
- x86
|
||||
needs: []
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
- if: $CI_PIPELINE_SOURCE == "push"
|
||||
changes:
|
||||
- fpga/hls/*
|
||||
- fpga/hdl/*
|
||||
- fpga/scripts/*
|
||||
- fpga/xdc/*
|
||||
- fpga/microblaze/*
|
||||
- fpga/include/jfjoch_fpga.h
|
||||
tags:
|
||||
- python
|
||||
script:
|
||||
- source /opt/Xilinx/Vitis_HLS/2022.1/settings64.sh
|
||||
- mkdir build
|
||||
- cd build
|
||||
- /usr/bin/cmake ..
|
||||
- make hls
|
||||
- cd python-client
|
||||
- python3 setup.py sdist bdist_wheel
|
||||
- mv dist/* ..
|
||||
artifacts:
|
||||
paths:
|
||||
- jfjoch_client-*whl
|
||||
- jfjoch_client-*tar.gz
|
||||
expire_in: 1 week
|
||||
|
||||
build:x86:frontend:
|
||||
stage: build
|
||||
@@ -125,7 +111,7 @@ test:x86:gcc:
|
||||
- gcc
|
||||
- x86
|
||||
script:
|
||||
- source /opt/rh/gcc-toolset-12/enable
|
||||
- source /opt/rh/gcc-toolset-12/enable
|
||||
- mkdir -p build
|
||||
- cd build
|
||||
- cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
@@ -153,7 +139,7 @@ test:x86:crystfel:
|
||||
- x86
|
||||
- crystfel
|
||||
script:
|
||||
- source /opt/rh/gcc-toolset-12/enable
|
||||
- source /opt/rh/gcc-toolset-12/enable
|
||||
- mkdir -p build
|
||||
- cd build
|
||||
- cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
@@ -176,7 +162,7 @@ test:x86:xds_durin:
|
||||
- x86
|
||||
- xds
|
||||
script:
|
||||
- source /opt/rh/gcc-toolset-12/enable
|
||||
- source /opt/rh/gcc-toolset-12/enable
|
||||
- mkdir -p build
|
||||
- cd build
|
||||
- cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
@@ -222,7 +208,7 @@ test:x86:xia2.ssx:
|
||||
- x86
|
||||
- xds
|
||||
script:
|
||||
- source /opt/rh/gcc-toolset-12/enable
|
||||
- source /opt/rh/gcc-toolset-12/enable
|
||||
- mkdir -p build
|
||||
- mkdir -p dials_test
|
||||
- cd build
|
||||
@@ -233,76 +219,6 @@ test:x86:xia2.ssx:
|
||||
- source /usr/local/dials-v3-17-0/dials_env.sh
|
||||
- xia2.ssx image=writing_test_master.h5 space_group=P43212 unit_cell=78.551,78.551,36.914,90.000,90.000,90.000
|
||||
|
||||
synthesis:vivado_pcie_100g:
|
||||
stage: synthesis
|
||||
dependencies: []
|
||||
variables:
|
||||
CC: gcc
|
||||
CXX: g++
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
- if: $CI_PIPELINE_SOURCE == "push"
|
||||
changes:
|
||||
- fpga/hls/*
|
||||
- fpga/hdl/*
|
||||
- fpga/scripts/*
|
||||
- fpga/xdc/*
|
||||
- fpga/pcie_driver/jfjoch_fpga.h
|
||||
- if: $CI_COMMIT_MESSAGE =~ /^FPGA/
|
||||
allow_failure: true
|
||||
tags:
|
||||
- vivado
|
||||
retry: 2
|
||||
artifacts:
|
||||
paths:
|
||||
- "jfjoch_fpga_pcie_100g.mcs"
|
||||
expire_in: 1 week
|
||||
script:
|
||||
- source /opt/rh/gcc-toolset-12/enable
|
||||
- source /opt/Xilinx/Vivado/2022.1/settings64.sh
|
||||
- touch jfjoch_fpga_pcie_100g.mcs
|
||||
- mkdir -p build
|
||||
- cd build
|
||||
- /usr/bin/cmake ..
|
||||
- make -j4 pcie_100g
|
||||
- mv fpga/jfjoch_fpga_pcie_100g.mcs ..
|
||||
needs: ["build:x86:gcc", "test:x86:gcc"]
|
||||
|
||||
synthesis:vivado_pcie_8x10g:
|
||||
stage: synthesis
|
||||
dependencies: []
|
||||
variables:
|
||||
CC: gcc
|
||||
CXX: g++
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
- if: $CI_PIPELINE_SOURCE == "push"
|
||||
changes:
|
||||
- fpga/hls/*
|
||||
- fpga/hdl/*
|
||||
- fpga/scripts/*
|
||||
- fpga/xdc/*
|
||||
- fpga/pcie_driver/jfjoch_fpga.h
|
||||
- if: $CI_COMMIT_MESSAGE =~ /^FPGA/
|
||||
allow_failure: true
|
||||
tags:
|
||||
- vivado
|
||||
retry: 2
|
||||
artifacts:
|
||||
paths:
|
||||
- "jfjoch_fpga_pcie_8x10g.mcs"
|
||||
expire_in: 1 week
|
||||
script:
|
||||
- source /opt/rh/gcc-toolset-12/enable
|
||||
- source /opt/Xilinx/Vivado/2022.1/settings64.sh
|
||||
- touch jfjoch_fpga_pcie_8x10g.mcs
|
||||
- mkdir -p build
|
||||
- cd build
|
||||
- /usr/bin/cmake ..
|
||||
- make -j4 pcie_8x10g
|
||||
- mv fpga/jfjoch_fpga_pcie_8x10g.mcs ..
|
||||
needs: [ "build:x86:gcc", "test:x86:gcc" ]
|
||||
|
||||
release:
|
||||
stage: release
|
||||
rules:
|
||||
@@ -311,108 +227,8 @@ release:
|
||||
tags:
|
||||
- x86
|
||||
dependencies:
|
||||
- synthesis:vivado_pcie_8x10g
|
||||
- synthesis:vivado_pcie_100g
|
||||
- build:x86:python_client
|
||||
- build:x86:frontend
|
||||
- build:x86:driver
|
||||
- build:x86:rpm
|
||||
script:
|
||||
- export PACKAGE_VERSION_SEM=`head -n1 VERSION`
|
||||
- export PACKAGE_VERSION=${PACKAGE_VERSION_SEM//-/_}
|
||||
- export PACKAGE_REGISTRY_URL="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/jungfraujoch/${PACKAGE_VERSION_SEM}"
|
||||
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file jfjoch-driver-dkms-${PACKAGE_VERSION}-1.el8.noarch.rpm "${PACKAGE_REGISTRY_URL}/jfjoch-driver-dkms-${PACKAGE_VERSION}-1.el8.noarch.rpm"'
|
||||
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file jfjoch-writer-${PACKAGE_VERSION}-1.el8.x86_64.rpm "${PACKAGE_REGISTRY_URL}/jfjoch-writer-${PACKAGE_VERSION}-1.el8.x86_64.rpm"'
|
||||
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file jfjoch-${PACKAGE_VERSION}-1.el8.x86_64.rpm "${PACKAGE_REGISTRY_URL}/jfjoch-${PACKAGE_VERSION}-1.el8.x86_64.rpm"'
|
||||
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file jfjoch_driver.tar.gz "${PACKAGE_REGISTRY_URL}/jfjoch_driver.tar.gz"'
|
||||
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file jfjoch_frontend.tar.gz "${PACKAGE_REGISTRY_URL}/jfjoch_frontend.tar.gz"'
|
||||
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file jfjoch_fpga_pcie_100g.mcs "${PACKAGE_REGISTRY_URL}/jfjoch_fpga_pcie_100g.mcs"'
|
||||
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file jfjoch_fpga_pcie_8x10g.mcs "${PACKAGE_REGISTRY_URL}/jfjoch_fpga_pcie_8x10g.mcs"'
|
||||
- >
|
||||
release-cli create --name "Release $PACKAGE_VERSION_SEM" --tag-name $PACKAGE_VERSION_SEM
|
||||
--assets-link "{\"name\":\"jfjoch_driver.tar.gz\",\"url\":\"${PACKAGE_REGISTRY_URL}/jfjoch_driver.tar.gz\"}"
|
||||
--assets-link "{\"name\":\"jfjoch_frontend.tar.gz\",\"url\":\"${PACKAGE_REGISTRY_URL}/jfjoch_frontend.tar.gz\"}"
|
||||
--assets-link "{\"name\":\"jfjoch_fpga_pcie_8x10g.mcs\",\"url\":\"${PACKAGE_REGISTRY_URL}/jfjoch_fpga_pcie_8x10g.mcs\"}"
|
||||
--assets-link "{\"name\":\"jfjoch_fpga_pcie_100g.mcs\",\"url\":\"${PACKAGE_REGISTRY_URL}/jfjoch_fpga_pcie_100g.mcs\"}"
|
||||
--assets-link "{\"name\":\"jfjoch-${PACKAGE_VERSION}-1.el8.x86_64.rpm\",\"url\":\"${PACKAGE_REGISTRY_URL}/jfjoch-${PACKAGE_VERSION}-1.el8.x86_64.rpm\",\"link_type\":\"package\"}"
|
||||
--assets-link "{\"name\":\"jfjoch-writer-${PACKAGE_VERSION}-1.el8.x86_64.rpm\",\"url\":\"${PACKAGE_REGISTRY_URL}/jfjoch-writer-${PACKAGE_VERSION}-1.el8.x86_64.rpm\",\"link_type\":\"package\"}"
|
||||
--assets-link "{\"name\":\"jfjoch-driver-dkms-${PACKAGE_VERSION}-1.el8.noarch.rpm\",\"url\":\"${PACKAGE_REGISTRY_URL}/jfjoch-driver-dkms-${PACKAGE_VERSION}-1.el8.noarch.rpm\",\"link_type\":\"package\"}"
|
||||
|
||||
release_no_fpga:
|
||||
stage: release
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
when: manual
|
||||
tags:
|
||||
- x86
|
||||
dependencies:
|
||||
- build:x86:frontend
|
||||
- build:x86:driver
|
||||
- build:x86:rpm
|
||||
script:
|
||||
- export PACKAGE_VERSION_SEM=`head -n1 VERSION`
|
||||
- export PACKAGE_VERSION=${PACKAGE_VERSION_SEM//-/_}
|
||||
- export PACKAGE_REGISTRY_URL="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/jungfraujoch/${PACKAGE_VERSION_SEM}"
|
||||
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file jfjoch-driver-dkms-${PACKAGE_VERSION}-1.el8.noarch.rpm "${PACKAGE_REGISTRY_URL}/jfjoch-driver-dkms-${PACKAGE_VERSION}-1.el8.noarch.rpm"'
|
||||
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file jfjoch-writer-${PACKAGE_VERSION}-1.el8.x86_64.rpm "${PACKAGE_REGISTRY_URL}/jfjoch-writer-${PACKAGE_VERSION}-1.el8.x86_64.rpm"'
|
||||
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file jfjoch-${PACKAGE_VERSION}-1.el8.x86_64.rpm "${PACKAGE_REGISTRY_URL}/jfjoch-${PACKAGE_VERSION}-1.el8.x86_64.rpm"'
|
||||
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file jfjoch_driver.tar.gz "${PACKAGE_REGISTRY_URL}/jfjoch_driver.tar.gz"'
|
||||
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file jfjoch_frontend.tar.gz "${PACKAGE_REGISTRY_URL}/jfjoch_frontend.tar.gz"'
|
||||
- >
|
||||
release-cli create --name "Release $PACKAGE_VERSION_SEM" --tag-name $PACKAGE_VERSION_SEM
|
||||
--assets-link "{\"name\":\"jfjoch_driver.tar.gz\",\"url\":\"${PACKAGE_REGISTRY_URL}/jfjoch_driver.tar.gz\"}"
|
||||
--assets-link "{\"name\":\"jfjoch_frontend.tar.gz\",\"url\":\"${PACKAGE_REGISTRY_URL}/jfjoch_frontend.tar.gz\"}"
|
||||
--assets-link "{\"name\":\"jfjoch-${PACKAGE_VERSION}-1.el8.x86_64.rpm\",\"url\":\"${PACKAGE_REGISTRY_URL}/jfjoch-${PACKAGE_VERSION}-1.el8.x86_64.rpm\",\"link_type\":\"package\"}"
|
||||
--assets-link "{\"name\":\"jfjoch-writer-${PACKAGE_VERSION}-1.el8.x86_64.rpm\",\"url\":\"${PACKAGE_REGISTRY_URL}/jfjoch-writer-${PACKAGE_VERSION}-1.el8.x86_64.rpm\",\"link_type\":\"package\"}"
|
||||
--assets-link "{\"name\":\"jfjoch-driver-dkms-${PACKAGE_VERSION}-1.el8.noarch.rpm\",\"url\":\"${PACKAGE_REGISTRY_URL}/jfjoch-driver-dkms-${PACKAGE_VERSION}-1.el8.noarch.rpm\",\"link_type\":\"package\"}"
|
||||
--assets-link "{\"name\":\"jfjoch_fpga_pcie_8x10g.mcs\",\"url\":\"${PACKAGE_REGISTRY_URL}/jfjoch_fpga_pcie_8x10g.mcs\"}"
|
||||
--assets-link "{\"name\":\"jfjoch_fpga_pcie_100g.mcs\",\"url\":\"${PACKAGE_REGISTRY_URL}/jfjoch_fpga_pcie_100g.mcs\"}"
|
||||
|
||||
upload_fpga_100g:
|
||||
stage: release
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
when: manual
|
||||
- if: $CI_COMMIT_MESSAGE =~ /^FPGA/
|
||||
when: manual
|
||||
- if: $CI_PIPELINE_SOURCE == "push"
|
||||
changes:
|
||||
- fpga/hls/*
|
||||
- fpga/hdl/*
|
||||
- fpga/scripts/*
|
||||
- fpga/xdc/*
|
||||
- fpga/pcie_driver/jfjoch_fpga.h
|
||||
when: manual
|
||||
tags:
|
||||
- x86
|
||||
dependencies:
|
||||
- synthesis:vivado_pcie_100g
|
||||
script:
|
||||
- export PACKAGE_VERSION_SEM=`head -n1 VERSION`
|
||||
- export PACKAGE_VERSION=${PACKAGE_VERSION_SEM//-/_}
|
||||
- export PACKAGE_REGISTRY_URL="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/jungfraujoch/${PACKAGE_VERSION_SEM}"
|
||||
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file jfjoch_fpga_pcie_100g.mcs "${PACKAGE_REGISTRY_URL}/jfjoch_fpga_pcie_100g.mcs"'
|
||||
|
||||
upload_fpga_8x10g:
|
||||
stage: release
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
when: manual
|
||||
- if: $CI_COMMIT_MESSAGE =~ /^FPGA/
|
||||
when: manual
|
||||
- if: $CI_PIPELINE_SOURCE == "push"
|
||||
changes:
|
||||
- fpga/hls/*
|
||||
- fpga/hdl/*
|
||||
- fpga/scripts/*
|
||||
- fpga/xdc/*
|
||||
- fpga/pcie_driver/jfjoch_fpga.h
|
||||
when: manual
|
||||
tags:
|
||||
- x86
|
||||
dependencies:
|
||||
- synthesis:vivado_pcie_8x10g
|
||||
script:
|
||||
- export PACKAGE_VERSION_SEM=`head -n1 VERSION`
|
||||
- export PACKAGE_VERSION=${PACKAGE_VERSION_SEM//-/_}
|
||||
- export PACKAGE_REGISTRY_URL="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/jungfraujoch/${PACKAGE_VERSION_SEM}"
|
||||
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file jfjoch_fpga_pcie_8x10g.mcs "${PACKAGE_REGISTRY_URL}/jfjoch_fpga_pcie_8x10g.mcs"'
|
||||
- bash gitlab_upload_release.sh
|
||||
|
||||
@@ -73,10 +73,13 @@ FetchContent_Declare(hdf5
|
||||
GIT_SHALLOW 1
|
||||
EXCLUDE_FROM_ALL)
|
||||
|
||||
SET(PISTACHE_USE_CONTENT_ENCODING_DEFLATE ON)
|
||||
SET(PISTACHE_BUILD_TESTS OFF)
|
||||
|
||||
FetchContent_Declare(
|
||||
pistache_http
|
||||
GIT_REPOSITORY https://github.com/fleon-psi/pistache
|
||||
GIT_TAG 51553b92cc7bb25ac792462722ddd4fae33d14b1
|
||||
GIT_TAG 784955df8bbef471924d1631606f0f2a2f93d570
|
||||
EXCLUDE_FROM_ALL
|
||||
)
|
||||
|
||||
|
||||
140
DEPLOYMENT.md
Normal file
140
DEPLOYMENT.md
Normal file
@@ -0,0 +1,140 @@
|
||||
# Deployment of Jungfraujoch
|
||||
|
||||
To deploy Jungfraujoch, one needs to follow four steps:
|
||||
|
||||
1. Install main Jungfraujoch code and frontend web interface
|
||||
2. Flash the U55C FPGA card with a proper image and install Linux kernel driver
|
||||
3. Install Jungfraujoch writer
|
||||
4. Install Python OpenAPI client
|
||||
|
||||
Installation procedure depend a lot on the operating system. For RedHat Enterprise Linux 8, Rocky 8, or compatible
|
||||
installation can be done with prebuilt RPMs and is relatively straightforward. For other systems one needs to build
|
||||
software from source. Both ways will be presented.
|
||||
|
||||
## Install main Jungfraujoch code and frontend web interface
|
||||
|
||||
On RHEL 8 systems there is a `jfjoch-<version>-1.el8.x86_64.rpm` that needs to be installed and contains all the necessary software and web interface.
|
||||
|
||||
On other OSes one needs to compile Jungfraujoch from source (from the repo directory):
|
||||
```
|
||||
$ mkdir build
|
||||
$ cd build
|
||||
$ cmake .. -DCMAKE_INSTALL_PREFIX=<directory to install>
|
||||
$ make
|
||||
$ sudo make install
|
||||
```
|
||||
For manual installation, we recommend to use non-standard directory (like `/opt/jfjoch`), to facilitate upgrades and removal.
|
||||
|
||||
Frontend web user interface has to be built separately with:
|
||||
```
|
||||
$ cd build
|
||||
$ make frontend
|
||||
```
|
||||
Frontend files (.html and .js) will be placed in `frontend/dist` (outside of `build/` directory!) and has to be copied to a general location, e.g. `/usr/local/jfjoch/frontend` or `/opt/jfjoch/frotend`.
|
||||
|
||||
## Flash the U55C FPGA card with a proper image and install Linux kernel driver.
|
||||
|
||||
### Firmware flashing
|
||||
1. Check that the card is detected by OS with "lspci |grep Xilinx" and check the PCIe bus/device/function (BDF) number, `11:00.0` in this case:
|
||||
```
|
||||
$ lspci |grep Xilinx
|
||||
23:00.0 Processing accelerators: Xilinx Corporation Device 3450 (rev 2)
|
||||
```
|
||||
Note the device number `3450` that identifies Jungfraujoch device (Jungfraujoch pass is 3450 m above sea level) and `rev 2` identifying release of the firmware.
|
||||
|
||||
2. Check the speed of the card, that it is detected as PCIe Gen4x8 device (needs to be done as root, otherwise configuration details are not given):
|
||||
```
|
||||
$ sudo lspci -vv -s <PCIe slot number>
|
||||
23:00.0 Processing accelerators: Xilinx Corporation Device 3450
|
||||
(...)
|
||||
LnkSta: Speed 16GT/s (ok), Width x8 (ok)
|
||||
(...)
|
||||
```
|
||||
|
||||
3. Download the MCS image from release files or build it using Vivado (WARNING! building time can be about 8 hours and doesn't allways reach correct timing).
|
||||
4. Flash the card with `xbflash.qspi` tool (part of Jungfraujoch). For fresh card use:
|
||||
```
|
||||
sudo xbflash.qspi --primary <path to MCS file> --card <PCIe slot from above> --bar-offset 0x1f06000
|
||||
```
|
||||
For card that was already flashed with Jungfraujoch images:
|
||||
|
||||
```
|
||||
sudo xbflash.qspi --primary <path to MCS file> --card <PCIe slot from above>
|
||||
```
|
||||
It is necessary to confirm the operation by pressing `Y` key or one can add `--force` option to avoid confirmation.
|
||||
It is safe to run multiple flashing processes in parallel for different cards, for example in separate screen sessions.
|
||||
|
||||
5. Cold reboot:
|
||||
```
|
||||
sudo ipmitool chassis power cycle
|
||||
```
|
||||
|
||||
### Install PCIe driver
|
||||
|
||||
For first run it is though recommended to try the driver without installing to the kernel directory:
|
||||
```
|
||||
$ cd fpga/pcie_driver
|
||||
$ make
|
||||
$ sudo insmod jfjoch.ko
|
||||
```
|
||||
|
||||
Check with `dmesg` that the device was properly found:
|
||||
```
|
||||
$ dmesg |grep jfjoch
|
||||
[ 431.624933] jfjoch 0000:23:00.0: enabling device (0140 -> 0142)
|
||||
[ 431.919147] misc jfjoch0: Jungfraujoch FPGA loaded with FW build: 5610030a
|
||||
```
|
||||
|
||||
If things work, it is recommended to install the driver with DKMS, so it is rebuilt for kernel updates.
|
||||
On RHEL 8 you can install prebuilt RPM provided in the Gitlab package registry. On other systems follow procedure in
|
||||
[PCIe driver](fpga/pcie_driver/README.md).
|
||||
|
||||
NOTE: Driver installation procedure on non-RHEL 8 systems is not well understood/optimized at the moment.
|
||||
|
||||
NOTE: In case driver is included in the init RAM-disk image, it is necessary to rebuild the RAM-disk if driver is updated:
|
||||
```
|
||||
$ sudo dracut -f
|
||||
```
|
||||
### Configure network
|
||||
Configure switch according to [FPGA network guide](fpga/NETWORK.md) - specifically set manual speed and turn off auto-negotiation
|
||||
for the port used to connect U55C card and connect card to switch.
|
||||
|
||||
### Running Jungfraujoch software
|
||||
Main Jungfraujoch service is called `jfjoch_broker`. It is responsible for handling data from FPGAs, doing processing, analysis, compression and sending images on ZeroMQ output.
|
||||
It is recommended to run the service as `systemd` service.
|
||||
|
||||
`jfjoch_broker` takes two parameters: JSON configuration file and HTTP port (default is 5232).
|
||||
Example JSON files are placed in [etc](etc) folder. JSON file format is also explained in the OpenAPI definition, as `jfjoch_settings` data structure.
|
||||
|
||||
When running the service can be accessed via HTTP interface from a web browser for configuration and monitoring.
|
||||
|
||||
To prepare the configuration file one also needs to reference calibration files: gain files for PSI JUNGFRAU and trim-bit files for PSI EIGER.
|
||||
These need to be obtained from the PSI Detector Group.
|
||||
|
||||
### Card verification
|
||||
|
||||
To test that FPGA board is working properly without access to a JUNGFRAU detector, you can use `jfjoch_action_test` tool.
|
||||
For example to simulate 10M pixel system with 4 FPGA cards and 200k images on a 2 CPU system with 2 GPUs:
|
||||
```
|
||||
jfjoch_action_test ~/nextgendcu/ -m20 -s4 -i 200000 -Pn2g2
|
||||
```
|
||||
Or 1M pixel system with one FPGA card:
|
||||
```
|
||||
jfjoch_action_test ~/nextgendcu/ -m2 -s1 -i 200000
|
||||
```
|
||||
|
||||
## Install Jungfraujoch writer
|
||||
Jungfraujoch writer is an additional service, that can connect to `jfjoch_broker` ZeroMQ interface and writes files according to NeXus/NXmx HDF5 standard.
|
||||
|
||||
At the moment it is better to have a separate machine, with access to distributed file system, for writing images.
|
||||
|
||||
Writer can be installed with a dedicated RPM file or compiled from source. For compilation, you can use the following commands:
|
||||
```
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DJFJOCH_WRITER_ONLY=ON -DCMAKE_INSTALL_PREFIX=<directory to install> ..
|
||||
make jfjoch
|
||||
```
|
||||
|
||||
## Install Jungfraujoch Python client
|
||||
This is under development.
|
||||
55
HARDWARE.md
Normal file
55
HARDWARE.md
Normal file
@@ -0,0 +1,55 @@
|
||||
# Hardware requirements
|
||||
Operating Jungfraujoch requires the following:
|
||||
|
||||
1. High performance server
|
||||
2. FPGA board(s) installed in the server
|
||||
3. (optionally) GPU boards
|
||||
4. (optionally) 100G switch to connect FPGA and the detector
|
||||
|
||||
Unfortunately, at the moment it is not possible to purchase server configuration from a major vendor that would include
|
||||
AMD FPGA boards. Therefore, the two has to be purchases separately. This might have impact on the warranty for the hardware
|
||||
and has to be clarified with the vendor. PSI only supports the system on the best effort basis and doesn't take any responsibility
|
||||
for warranty limitations for operating FPGA boards in the server. Having said this - we didn't encounter any hardware issues so far.
|
||||
|
||||
## High performance server
|
||||
PSI is using HPE DL380 Gen11 servers are the moment to operate Jungfraujoch systems. However, this is because of general
|
||||
preference for this vendor, there is no Jungfraujoch-specific reason to buy from this vendor. We do expect that system
|
||||
from any other vendor with similar specification should work as well.
|
||||
|
||||
At PSI, we use the following configuration of HPE DL380 Gen11 to operate 9M pixel detectors at 2 kHz is as follows:
|
||||
* 2 x Intel Xeon 8558P
|
||||
* 512 GB RAM
|
||||
* 2 x Nvidia L4 GPU (for indexing)
|
||||
* 1 x Nvidia Connect-X 6 200G ethernet/IB network (for outgoing traffic; this can be substituted according to facility needs)
|
||||
* Copper 1G/10G network
|
||||
|
||||
### PCI slots
|
||||
When ordering the system it is important to ensure enough PCIe cards can be accommodated in the system.
|
||||
In case of our system we need to put at least seven PCIe cards: 4 x FPGA, 2x GPU, 1x network
|
||||
|
||||
Note - for FPGA x8 lane electrically/x16 lane mechanically PCIe slots are OK.
|
||||
|
||||
## FPGA
|
||||
Jungfraujoch is built for [AMD/Xilinx U55C](https://www.amd.com/en/products/accelerators/alveo/u55c/a-u55c-p00g-pq-g.html)
|
||||
(A-U55C-P00G-PQ-G) card. Other FPGA cards are currently not supported.
|
||||
|
||||
Single U55C card supports roughly 5 detector modules (2.5M pixels) at 2 kHz and 10 detector modules (5M pixels) at 1 kHz.
|
||||
For detectors operating at lower frame rates (e.g., 100 Hz) larger detectors can be supported by a single U55C card, though it requires
|
||||
using TX delay functionality in the detector.
|
||||
|
||||
## GPUs
|
||||
Operating fast-feedback indexer code requires operation of a graphic processing unit from Nvidia.
|
||||
For practical reasons, i.e. power consumption and cost, we choose inference grade card Nvidia L4.
|
||||
In the past we have also used T4 cards. So, in principle any recent CUDA compatible GPU should work.
|
||||
|
||||
## Network switch
|
||||
Small detectors (up to 4M pixel) can be in principle operated without switch. In this case one needs `8x10g` variant
|
||||
of the Jungfraujoch FPGA image, which allows to directly connect 4 JUNGFRAU modules to one U55C card.
|
||||
|
||||
Such configuration is however
|
||||
impractical for larger systems or more complex deployments, like multiple detectors operated from one Jungfraujochs server.
|
||||
In this case one needs a network switch.
|
||||
|
||||
We currently use Nvidia/Mellanox SN2100 switch, though there is no reason not to use other models/other vendors.
|
||||
For switches with only 100G ports it is important to ensure, that these can be split into 4x10G ports to connect the detector.
|
||||
|
||||
66
README.md
66
README.md
@@ -12,14 +12,17 @@ The project is supported by :
|
||||
## License
|
||||
|
||||
Operating Jungfraujoch requires license from the Paul Scherrer Institute.
|
||||
|
||||
Specifically, non-profit research facilities operating PSI JUNGFRAU and PSI EIGER detectors are granted the license to use the
|
||||
code and binary images within their facilities, as well as to modify the code according to their needs.
|
||||
|
||||
Sharing the code requires explicit permission from the Paul Scherrer Institute.
|
||||
|
||||
## Hardware requirements
|
||||
1. PSI JUNGFRAU or EIGER detector
|
||||
2. Server system with AMD/Xilinx Alveo U55C cards and optionally Nvidia GPUs
|
||||
## Compatible detectors
|
||||
Currently, Jungfraujoch supports PSI JUNGFRAU and PSI EIGER detectors.
|
||||
|
||||
At the moment only AMD Alveo U55C card is supported by Jungfraujoch.
|
||||
Nvidia L4 GPU is recommended for indexing and used for performance tuning.
|
||||
## Hardware requirements
|
||||
See [hardware requirements](HARDWARE.md) documentation.
|
||||
|
||||
## FPGA bitstream
|
||||
Instructions see [here](fpga/README.md)
|
||||
@@ -28,18 +31,22 @@ Instructions see [here](fpga/README.md)
|
||||
Jungfraujoch supports PSI JUNGFRAU and EIGER detectors. Jungfruajoch controls the detector via statically compiled `slsDetectorPackage` into its source code.
|
||||
It is important that detector firmware has to match `slsDetectorPackage` version used in Jungfraujoch (8.0.2 at the moment).
|
||||
See [PSI Detector group website](https://www.psi.ch/en/lxn/software-releases) for details.
|
||||
## Software
|
||||
Recommended operating system is Red Hat Enterprise Linux (RHEL) / Rocky Linux versions 8 and 9 (both are tested on a regular basis).
|
||||
|
||||
## Operating system
|
||||
Recommended operating system is Red Hat Enterprise Linux (RHEL) / Rocky Linux versions 8.
|
||||
For this operating system we provide RPMs with pre-built binaries to simplify deployment.
|
||||
|
||||
We do also operate one of the systems with Rocky 9 without issues.
|
||||
Running Jungfraujoch on Red Hat Enterprise Linux 7 is currently not tested and not recommended,
|
||||
but likely possible with providing multiple packages from external repositories.
|
||||
but likely possible with providing some packages from external repositories.
|
||||
There are some limited tests with recent Ubuntu and Fedora distributions, though these are not systematic.
|
||||
Other linux platforms should work, but no tests were done so far.
|
||||
|
||||
### Dependencies
|
||||
### Software dependencies
|
||||
Required:
|
||||
* C++20 compiler and C++20 standard library; recommended GCC 11+ or clang 14+ (Intel OneAPI, AMD AOCC)
|
||||
* CMake version 3.21 or newer + GNU make tool
|
||||
* JPEG library (turbo-jpeg is also OK)
|
||||
* JPEG library (turbo-jpeg is OK)
|
||||
|
||||
Optional:
|
||||
* CUDA compiler version 11 or newer - required for MX fast feedback indexer
|
||||
@@ -69,6 +76,9 @@ Directly included in the repository:
|
||||
|
||||
For license check LICENSE file in respective directory
|
||||
|
||||
## Installation guide
|
||||
Follow [Installation guide](INSTALL.md).
|
||||
|
||||
### Software components
|
||||
|
||||
* `jfjoch_broker` in `broker` - main service running on the Jungfraujoch server, responsible for control of the detector and data acquisition;
|
||||
@@ -76,32 +86,6 @@ For license check LICENSE file in respective directory
|
||||
* `jfjoch_writer` in `writer` - HDF5 writer; HDF5 writer is designed to work on the same or separate server system. It has rather limited requirements in terms of performance and memory.
|
||||
The goal is to separate data acquisition node with custom FPGA hardware and file system node with stronger security/stability requirements. See [details](writer/README.md).
|
||||
|
||||
### Compilation
|
||||
Use the following commands:
|
||||
|
||||
```
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make jfjoch
|
||||
```
|
||||
|
||||
### Compilation (writer only)
|
||||
In most use cases it is better to have a separate machine, with access to distributed file system, for writing.
|
||||
Such machine needs only a HDF5 writer service with fewer dependencies. For compilation use the following commands:
|
||||
|
||||
```
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DJFJOCH_WRITER_ONLY=ON ..
|
||||
make jfjoch
|
||||
```
|
||||
|
||||
## Versions
|
||||
**FPGA release** is as hexadecimal number indicted in the [jfjoch_fpga.h](fpga/pcie_driver/jfjoch_fpga.h) as JFJOCH_FPGA_RELEASE constant. This number indicated breaking changes in the FPGA firmware interface.
|
||||
FPGA release has to be consistent between FPGA firmware, kernel driver and `jfjoch_broker` - both kernel driver and software won't work in case of version mismatch.
|
||||
Commits to `main` branch with the same FPGA release version are OK to mix between components.
|
||||
|
||||
## Web Frontend
|
||||
Jungfraujoch is equipped with React-based web frontend for user-friendly experience. Frontend has the following options:
|
||||
* Presenting current state of the detector
|
||||
@@ -112,14 +96,8 @@ Jungfraujoch is equipped with React-based web frontend for user-friendly experie
|
||||
|
||||
Frontend is written in TypeScript. For details see [frontend/](frontend) directory.
|
||||
|
||||
Jungfraujoch Cmake scripts have an option to start frontend build with the following command:
|
||||
```
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make frontend
|
||||
```
|
||||
Contrary to standard CMake way, frontend will be built in "source" `frontend/build` directory, not in `build/` subdirectory.
|
||||
## OpenAPI python client
|
||||
Jungfraujoch is controlled with HTTP/REST interface defined with an OpenAPI specification. For convenience, we provide Python client in [python_client](python_client/) directory.
|
||||
|
||||
## Tests
|
||||
|
||||
|
||||
@@ -147,7 +147,8 @@ int64_t AcquisitionCounters::CalculateDelay(size_t curr_frame, uint16_t module_n
|
||||
slowest_head_tmp = GetSlowestFrameNumber();
|
||||
else
|
||||
slowest_head_tmp = GetCurrFrameNumber(module_number);
|
||||
|
||||
if (slowest_head_tmp < curr_frame)
|
||||
return 0;
|
||||
return slowest_head_tmp - curr_frame;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,6 +44,8 @@ void JFJochBrokerHttp::initialize_post(Pistache::Http::ResponseWriter &response)
|
||||
|
||||
void JFJochBrokerHttp::start_post(const org::openapitools::server::model::Dataset_settings &datasetSettings,
|
||||
Pistache::Http::ResponseWriter &response) {
|
||||
nlohmann::json j = datasetSettings;
|
||||
logger.Info("Start {}", j.dump());
|
||||
state_machine.Start(Convert(datasetSettings));
|
||||
response.send(Pistache::Http::Code::Ok);
|
||||
}
|
||||
@@ -137,23 +139,15 @@ void JFJochBrokerHttp::config_spot_finding_put(
|
||||
response.send(Pistache::Http::Code::Ok);
|
||||
}
|
||||
|
||||
void JFJochBrokerHttp::plot_azim_int_get(Pistache::Http::ResponseWriter &response) {
|
||||
GenericPlot(PlotType::AzInt, 0, response);
|
||||
void JFJochBrokerHttp::plot_azim_int_get(const std::optional<bool>& compression,
|
||||
Pistache::Http::ResponseWriter &response) {
|
||||
GenericPlot(PlotType::AzInt, 0, compression, response);
|
||||
}
|
||||
|
||||
void JFJochBrokerHttp::statistics_calibration_get(Pistache::Http::ResponseWriter &response) {
|
||||
auto calib = state_machine.GetCalibrationStatistics();
|
||||
nlohmann::json j;
|
||||
|
||||
for (const auto &i: calib) {
|
||||
auto output = Convert(i);
|
||||
std::stringstream s;
|
||||
assert(output.validate(s));
|
||||
|
||||
nlohmann::json j_elem;
|
||||
to_json(j_elem, output);
|
||||
j.push_back(j_elem);
|
||||
}
|
||||
for (const auto &d: Convert(state_machine.GetCalibrationStatistics()))
|
||||
j.push_back(d);
|
||||
response.send(Pistache::Http::Code::Ok, j.dump(), MIME(Application, Json));
|
||||
}
|
||||
|
||||
@@ -345,7 +339,10 @@ void JFJochBrokerHttp::preview_pedestal_tiff_get(const std::optional<int32_t> &g
|
||||
}
|
||||
|
||||
void JFJochBrokerHttp::GenericPlot(PlotType plot_type, const std::optional<int32_t> &binning,
|
||||
const std::optional<bool>& in_compression,
|
||||
Pistache::Http::ResponseWriter &response) {
|
||||
bool compression = !in_compression.has_value() || in_compression.value();
|
||||
|
||||
PlotRequest req{.type = plot_type, .binning = 0};
|
||||
if (binning) {
|
||||
if (binning.value() < 0)
|
||||
@@ -354,62 +351,73 @@ void JFJochBrokerHttp::GenericPlot(PlotType plot_type, const std::optional<int32
|
||||
req.binning = binning.value();
|
||||
}
|
||||
auto plot = state_machine.GetPlots(req);
|
||||
ProcessOutput(Convert(plot), response);
|
||||
ProcessOutput(Convert(plot), response, compression);
|
||||
}
|
||||
|
||||
void JFJochBrokerHttp::plot_bkg_estimate_get(const std::optional<int32_t> &binning,
|
||||
const std::optional<bool>& compression,
|
||||
Pistache::Http::ResponseWriter &response) {
|
||||
GenericPlot(PlotType::BkgEstimate, binning, response);
|
||||
GenericPlot(PlotType::BkgEstimate, binning, compression, response);
|
||||
}
|
||||
|
||||
void JFJochBrokerHttp::plot_error_pixel_get(const std::optional<int32_t> &binning,
|
||||
const std::optional<bool>& compression,
|
||||
Pistache::Http::ResponseWriter &response) {
|
||||
GenericPlot(PlotType::ErrorPixels, binning, response);
|
||||
GenericPlot(PlotType::ErrorPixels, binning, compression, response);
|
||||
}
|
||||
|
||||
void JFJochBrokerHttp::plot_image_collection_efficiency_get(const std::optional<int32_t> &binning,
|
||||
const std::optional<bool>& compression,
|
||||
Pistache::Http::ResponseWriter &response) {
|
||||
GenericPlot(PlotType::ImageCollectionEfficiency, binning, response);
|
||||
GenericPlot(PlotType::ImageCollectionEfficiency, binning, compression, response);
|
||||
}
|
||||
|
||||
void JFJochBrokerHttp::plot_indexing_rate_get(const std::optional<int32_t> &binning,
|
||||
const std::optional<bool>& compression,
|
||||
Pistache::Http::ResponseWriter &response) {
|
||||
GenericPlot(PlotType::IndexingRate, binning, response);
|
||||
GenericPlot(PlotType::IndexingRate, binning, compression, response);
|
||||
}
|
||||
|
||||
void JFJochBrokerHttp::plot_receiver_delay_get(const std::optional<int32_t> &binning,
|
||||
const std::optional<bool>& compression,
|
||||
Pistache::Http::ResponseWriter &response) {
|
||||
GenericPlot(PlotType::ReceiverDelay, binning, response);
|
||||
GenericPlot(PlotType::ReceiverDelay, binning, compression, response);
|
||||
}
|
||||
|
||||
void JFJochBrokerHttp::plot_receiver_free_send_buffers_get(const std::optional<int32_t> &binning,
|
||||
const std::optional<bool>& compression,
|
||||
Pistache::Http::ResponseWriter &response) {
|
||||
GenericPlot(PlotType::ReceiverFreeSendBuf, binning, response);
|
||||
GenericPlot(PlotType::ReceiverFreeSendBuf, binning, compression, response);
|
||||
}
|
||||
|
||||
void JFJochBrokerHttp::plot_roi_max_count_get(const std::optional<int32_t> &binning,
|
||||
const std::optional<bool>& compression,
|
||||
Pistache::Http::ResponseWriter &response) {
|
||||
GenericPlot(PlotType::ROIMaxCount, binning, response);
|
||||
GenericPlot(PlotType::ROIMaxCount, binning, compression, response);
|
||||
}
|
||||
|
||||
void JFJochBrokerHttp::plot_roi_sum_get(const std::optional<int32_t> &binning,
|
||||
const std::optional<bool>& compression,
|
||||
Pistache::Http::ResponseWriter &response) {
|
||||
GenericPlot(PlotType::ROISum, binning, response);
|
||||
GenericPlot(PlotType::ROISum, binning, compression, response);
|
||||
}
|
||||
|
||||
void JFJochBrokerHttp::plot_roi_valid_pixels_get(const std::optional<int32_t> &binning,
|
||||
const std::optional<bool>& compression,
|
||||
Pistache::Http::ResponseWriter &response) {
|
||||
GenericPlot(PlotType::ROIPixels, binning, response);
|
||||
GenericPlot(PlotType::ROIPixels, binning, compression, response);
|
||||
}
|
||||
|
||||
void JFJochBrokerHttp::plot_spot_count_get(const std::optional<int32_t> &binning,
|
||||
const std::optional<bool>& compression,
|
||||
Pistache::Http::ResponseWriter &response) {
|
||||
GenericPlot(PlotType::SpotCount, binning, response);
|
||||
GenericPlot(PlotType::SpotCount, binning, compression, response);
|
||||
}
|
||||
|
||||
void JFJochBrokerHttp::plot_strong_pixel_get(const std::optional<int32_t> &binning,
|
||||
const std::optional<bool>& compression,
|
||||
Pistache::Http::ResponseWriter &response) {
|
||||
GenericPlot(PlotType::StrongPixels, binning, response);
|
||||
GenericPlot(PlotType::StrongPixels, binning, compression, response);
|
||||
}
|
||||
|
||||
void JFJochBrokerHttp::config_mask_tiff_get(Pistache::Http::ResponseWriter &response) {
|
||||
@@ -469,3 +477,46 @@ void JFJochBrokerHttp::fpga_status_get(Pistache::Http::ResponseWriter &response)
|
||||
j.push_back(d);
|
||||
response.send(Pistache::Http::Code::Ok, j.dump(), MIME(Application, Json));
|
||||
}
|
||||
|
||||
void JFJochBrokerHttp::statistics_get(const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) {
|
||||
org::openapitools::server::model::Jfjoch_statistics statistics;
|
||||
|
||||
auto data_collection_statistics = state_machine.GetMeasurementStatistics();
|
||||
if (data_collection_statistics)
|
||||
statistics.setMeasurement(Convert(data_collection_statistics.value()));
|
||||
|
||||
statistics.setFpga(Convert(state_machine.GetDeviceStatus()));
|
||||
statistics.setCalibration(Convert(state_machine.GetCalibrationStatistics()));
|
||||
statistics.setBroker(Convert(state_machine.GetStatus()));
|
||||
|
||||
auto det_status = state_machine.GetDetectorStatus();
|
||||
if (det_status.has_value())
|
||||
statistics.setDetector(Convert(det_status.value()));
|
||||
|
||||
statistics.setDetectorSettings(Convert(state_machine.GetDetectorSettings()));
|
||||
statistics.setDetectorList(Convert(state_machine.GetDetectorsList()));
|
||||
statistics.setDataProcessingSettings(Convert(state_machine.GetSpotFindingSettings()));
|
||||
statistics.setInstrumentMetadata(Convert(state_machine.GetInstrumentMetadata()));
|
||||
statistics.setImageFormatSettings(Convert(state_machine.GetImageFormatSettings()));
|
||||
|
||||
auto zeromq_prev = state_machine.GetPreviewSocketSettings();
|
||||
if (!zeromq_prev.address.empty())
|
||||
statistics.setZeromqPreview(Convert(zeromq_prev));
|
||||
|
||||
nlohmann::json j = statistics;
|
||||
if (!compression.has_value() || compression.value())
|
||||
response.setCompression(Pistache::Http::Header::Encoding::Deflate);
|
||||
|
||||
response.send(Pistache::Http::Code::Ok, j.dump(), MIME(Application, Json));
|
||||
}
|
||||
|
||||
void JFJochBrokerHttp::config_zeromq_preview_get(Pistache::Http::ResponseWriter &response) {
|
||||
ProcessOutput(Convert(state_machine.GetPreviewSocketSettings()), response);
|
||||
}
|
||||
|
||||
void JFJochBrokerHttp::config_zeromq_preview_put(
|
||||
const org::openapitools::server::model::Zeromq_preview_settings &zeromqPreviewSettings,
|
||||
Pistache::Http::ResponseWriter &response) {
|
||||
state_machine.SetPreviewSocketSettings(Convert(zeromqPreviewSettings));
|
||||
response.send(Pistache::Http::Code::Ok);
|
||||
}
|
||||
|
||||
@@ -51,33 +51,34 @@ class JFJochBrokerHttp : public org::openapitools::server::api::DefaultApi {
|
||||
Pistache::Http::ResponseWriter &response) override;
|
||||
|
||||
void GenericPlot(PlotType plot_type,
|
||||
const std::optional<int32_t> &binning,
|
||||
Pistache::Http::ResponseWriter &response);
|
||||
const std::optional<int32_t> &binning,
|
||||
const std::optional<bool>& compression,
|
||||
Pistache::Http::ResponseWriter &response);
|
||||
|
||||
void plot_bkg_estimate_get(const std::optional<int32_t> &binning,
|
||||
Pistache::Http::ResponseWriter &response) override;
|
||||
void plot_error_pixel_get(const std::optional<int32_t> &binning,
|
||||
void plot_bkg_estimate_get(const std::optional<int32_t> &binning, const std::optional<bool>& compression,
|
||||
Pistache::Http::ResponseWriter &response) override;
|
||||
void plot_error_pixel_get(const std::optional<int32_t> &binning, const std::optional<bool>& compression,
|
||||
Pistache::Http::ResponseWriter &response) override;
|
||||
void plot_image_collection_efficiency_get(const std::optional<int32_t> &binning,
|
||||
void plot_image_collection_efficiency_get(const std::optional<int32_t> &binning, const std::optional<bool>& compression,
|
||||
Pistache::Http::ResponseWriter &response) override;
|
||||
void plot_indexing_rate_get(const std::optional<int32_t> &binning,
|
||||
void plot_indexing_rate_get(const std::optional<int32_t> &binning, const std::optional<bool>& compression,
|
||||
Pistache::Http::ResponseWriter &response) override;
|
||||
void plot_receiver_delay_get(const std::optional<int32_t> &binning,
|
||||
void plot_receiver_delay_get(const std::optional<int32_t> &binning, const std::optional<bool>& compression,
|
||||
Pistache::Http::ResponseWriter &response) override;
|
||||
void plot_receiver_free_send_buffers_get(const std::optional<int32_t> &binning,
|
||||
void plot_receiver_free_send_buffers_get(const std::optional<int32_t> &binning, const std::optional<bool>& compression,
|
||||
Pistache::Http::ResponseWriter &response) override;
|
||||
void plot_roi_max_count_get(const std::optional<int32_t> &binning,
|
||||
void plot_roi_max_count_get(const std::optional<int32_t> &binning, const std::optional<bool>& compression,
|
||||
Pistache::Http::ResponseWriter &response) override;
|
||||
void plot_roi_sum_get(const std::optional<int32_t> &binning,
|
||||
void plot_roi_sum_get(const std::optional<int32_t> &binning, const std::optional<bool>& compression,
|
||||
Pistache::Http::ResponseWriter &response) override;
|
||||
void plot_roi_valid_pixels_get(const std::optional<int32_t> &binning,
|
||||
void plot_roi_valid_pixels_get(const std::optional<int32_t> &binning, const std::optional<bool>& compression,
|
||||
Pistache::Http::ResponseWriter &response) override;
|
||||
void plot_spot_count_get(const std::optional<int32_t> &binning,
|
||||
void plot_spot_count_get(const std::optional<int32_t> &binning, const std::optional<bool>& compression,
|
||||
Pistache::Http::ResponseWriter &response) override;
|
||||
void plot_strong_pixel_get(const std::optional<int32_t> &binning,
|
||||
void plot_strong_pixel_get(const std::optional<int32_t> &binning, const std::optional<bool>& compression,
|
||||
Pistache::Http::ResponseWriter &response) override;
|
||||
|
||||
void plot_azim_int_get(Pistache::Http::ResponseWriter &response) override;
|
||||
void plot_azim_int_get(const std::optional<bool>& compression, Pistache::Http::ResponseWriter &response) override;
|
||||
|
||||
void statistics_calibration_get(Pistache::Http::ResponseWriter &response) override;
|
||||
|
||||
@@ -141,7 +142,7 @@ class JFJochBrokerHttp : public org::openapitools::server::api::DefaultApi {
|
||||
std::pair<Pistache::Http::Code, std::string> handleOperationException(const std::exception &ex) const noexcept override;
|
||||
|
||||
template <class T>
|
||||
void ProcessOutput(const T& output, Pistache::Http::ResponseWriter &response) {
|
||||
void ProcessOutput(const T& output, Pistache::Http::ResponseWriter &response, bool compression = false) {
|
||||
std::stringstream s;
|
||||
if(!output.validate(s)) {
|
||||
logger.Error(s.str());
|
||||
@@ -149,6 +150,8 @@ class JFJochBrokerHttp : public org::openapitools::server::api::DefaultApi {
|
||||
}
|
||||
|
||||
nlohmann::json j = output;
|
||||
if (compression)
|
||||
response.setCompression(Pistache::Http::Header::Encoding::Deflate);
|
||||
response.send(Pistache::Http::Code::Ok, j.dump(), MIME(Application, Json));
|
||||
}
|
||||
|
||||
@@ -158,6 +161,14 @@ class JFJochBrokerHttp : public org::openapitools::server::api::DefaultApi {
|
||||
|
||||
void config_image_format_raw_post(Pistache::Http::ResponseWriter &response) override;
|
||||
|
||||
void statistics_get(const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) override;
|
||||
|
||||
void config_zeromq_preview_get(Pistache::Http::ResponseWriter &response) override;
|
||||
|
||||
void
|
||||
config_zeromq_preview_put(const org::openapitools::server::model::Zeromq_preview_settings &zeromqPreviewSettings,
|
||||
Pistache::Http::ResponseWriter &response) override;
|
||||
|
||||
public:
|
||||
JFJochBrokerHttp(const DiffractionExperiment& experiment, std::shared_ptr<Pistache::Rest::Router> &rtr);
|
||||
void AddDetectorSetup(const DetectorSetup &setup);
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "../image_pusher/HDF5FilePusher.h"
|
||||
#include "OpenAPIConvert.h"
|
||||
#include "Detector_type.h"
|
||||
#include "../image_pusher/NonePusher.h"
|
||||
|
||||
DetectorGeometry ParseStandardDetectorGeometry(const org::openapitools::server::model::Detector &j) {
|
||||
auto s = j.getStandardGeometry();
|
||||
@@ -88,7 +89,9 @@ DetectorSetup ParseDetectorSetup(const org::openapitools::server::model::Detecto
|
||||
.SensorThickness_um(d.getSensorThicknessUm())
|
||||
// .PixelSize_um(GET_FLOAT(j, "pixel_size_um", 75.0f))
|
||||
.SensorMaterial(d.getSensorMaterial())
|
||||
.SerialNumber(d.getSerialNumber());
|
||||
.SerialNumber(d.getSerialNumber())
|
||||
.ModuleSync(d.isModuleSync());
|
||||
|
||||
if (d.baseDataIpv4AddressIsSet())
|
||||
setup.BaseIPv4Addr(d.getBaseDataIpv4Address());
|
||||
if (d.txDelayIsSet())
|
||||
@@ -114,11 +117,18 @@ void ParseFacilityConfiguration(const org::openapitools::server::model::Jfjoch_s
|
||||
std::unique_ptr<ImagePusher> ParseZMQImagePusher(const org::openapitools::server::model::Jfjoch_settings &j) {
|
||||
if (!j.zeromqIsSet())
|
||||
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "ZeroMQ settings must be provided");
|
||||
auto tmp = std::make_unique<ZMQStream2Pusher>(j.getZeromq().getImageSocket(),
|
||||
j.getZeromq().getSendWatermark());
|
||||
|
||||
if (j.getZeromq().previewSocketIsSet())
|
||||
tmp->PreviewSocket(j.getZeromq().getPreviewSocket());
|
||||
std::optional<int32_t> send_buffer_size;
|
||||
if (j.getZeromq().sendBufferSizeIsSet())
|
||||
send_buffer_size = j.getZeromq().getSendBufferSize();
|
||||
|
||||
std::optional<int32_t> send_watermark;
|
||||
if (j.getZeromq().sendWatermarkIsSet())
|
||||
send_watermark = j.getZeromq().getSendWatermark();
|
||||
|
||||
auto tmp = std::make_unique<ZMQStream2Pusher>(j.getZeromq().getImageSocket(),
|
||||
send_watermark,
|
||||
send_buffer_size);
|
||||
|
||||
if (j.getZeromq().writerNotificationSocketIsSet())
|
||||
tmp->WriterNotificationSocket(j.getZeromq().getWriterNotificationSocket());
|
||||
@@ -132,7 +142,7 @@ std::unique_ptr<ImagePusher> ParseImagePusher(const org::openapitools::server::m
|
||||
case org::openapitools::server::model::Image_pusher_type::eImage_pusher_type::HDF5:
|
||||
return std::make_unique<HDF5FilePusher>();
|
||||
case org::openapitools::server::model::Image_pusher_type::eImage_pusher_type::NONE:
|
||||
return {};
|
||||
return std::make_unique<NonePusher>();
|
||||
case org::openapitools::server::model::Image_pusher_type::eImage_pusher_type::CBOR:
|
||||
return std::make_unique<CBORFilePusher>();
|
||||
default:
|
||||
@@ -151,3 +161,17 @@ void ParseAcquisitionDeviceGroup(const org::openapitools::server::model::Jfjoch_
|
||||
aq_devices.AddPCIeDevice(p.getBlk(), ipv4_addr);
|
||||
}
|
||||
}
|
||||
|
||||
void ParseReceiverSettings(const org::openapitools::server::model::Jfjoch_settings &input, JFJochReceiverService &service) {
|
||||
std::string numa_policy = input.getNumaPolicy();
|
||||
if (!numa_policy.empty())
|
||||
service.NUMAPolicy(numa_policy);
|
||||
|
||||
// Using default in case
|
||||
service.NumThreads(input.getReceiverThreads());
|
||||
|
||||
if (input.zeromqPreviewIsSet()) {
|
||||
service.PreviewSocket(input.getZeromqPreview().getSocketAddress());
|
||||
service.PreviewSocketSettings(Convert(input.getZeromqPreview()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "../common/DiffractionExperiment.h"
|
||||
#include "../acquisition_device/AcquisitionDeviceGroup.h"
|
||||
#include "../image_pusher/ImagePusher.h"
|
||||
|
||||
#include "../receiver/JFJochReceiverService.h"
|
||||
#include "gen/model/Jfjoch_settings.h"
|
||||
|
||||
DetectorGeometry ParseStandardDetectorGeometry(const org::openapitools::server::model::Detector &j);
|
||||
@@ -19,5 +19,6 @@ void ParseFacilityConfiguration(const org::openapitools::server::model::Jfjoch_s
|
||||
std::unique_ptr<ImagePusher> ParseImagePusher(const org::openapitools::server::model::Jfjoch_settings &j);
|
||||
|
||||
void ParseAcquisitionDeviceGroup(const org::openapitools::server::model::Jfjoch_settings &input, AcquisitionDeviceGroup &aq_devices);
|
||||
void ParseReceiverSettings(const org::openapitools::server::model::Jfjoch_settings &input, JFJochReceiverService &service);
|
||||
|
||||
#endif //JUNGFRAUJOCH_JFJOCHBROKERPARSER_H
|
||||
|
||||
@@ -118,12 +118,18 @@ JFJochServices &JFJochServices::Receiver(JFJochReceiverService *input) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
std::optional<JFJochReceiverStatus> JFJochServices::GetReceiverStatus() {
|
||||
std::optional<JFJochReceiverStatus> JFJochServices::GetReceiverStatus() const {
|
||||
if (receiver == nullptr)
|
||||
return {};
|
||||
return receiver->GetStatus();
|
||||
}
|
||||
|
||||
std::optional<float> JFJochServices::GetReceiverProgress() const {
|
||||
if (receiver == nullptr)
|
||||
return {};
|
||||
return receiver->GetProgress();
|
||||
}
|
||||
|
||||
MultiLinePlot JFJochServices::GetPlots(const PlotRequest &request) {
|
||||
if (receiver == nullptr)
|
||||
return {};
|
||||
@@ -193,4 +199,16 @@ std::vector<DeviceStatus> JFJochServices::GetDeviceStatus() const {
|
||||
if (receiver)
|
||||
ret = receiver->GetDeviceStatus();
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
ZMQPreviewSettings JFJochServices::GetPreviewSocketSettings() {
|
||||
if (receiver)
|
||||
return receiver->GetPreviewSocketSettings();
|
||||
else
|
||||
return {};
|
||||
}
|
||||
|
||||
void JFJochServices::SetPreviewSocketSettings(const ZMQPreviewSettings &input) {
|
||||
if (receiver)
|
||||
receiver->PreviewSocketSettings(input);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,8 @@ public:
|
||||
void LoadInternalGeneratorImage(const DiffractionExperiment &experiment,
|
||||
const std::vector<uint16_t> &image,
|
||||
uint64_t image_number);
|
||||
std::optional<JFJochReceiverStatus> GetReceiverStatus();
|
||||
std::optional<JFJochReceiverStatus> GetReceiverStatus() const;
|
||||
std::optional<float> GetReceiverProgress() const;
|
||||
MultiLinePlot GetPlots(const PlotRequest &request);
|
||||
|
||||
void SetSpotFindingSettings(const SpotFindingSettings &settings);
|
||||
@@ -48,6 +49,9 @@ public:
|
||||
void GetXFELEventCode(std::vector<uint64_t> &v) const;
|
||||
|
||||
std::vector<DeviceStatus> GetDeviceStatus() const;
|
||||
|
||||
void SetPreviewSocketSettings(const ZMQPreviewSettings &input);
|
||||
ZMQPreviewSettings GetPreviewSocketSettings();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -46,6 +46,13 @@ bool JFJochStateMachine::ImportPedestalG1G2(const JFJochReceiverOutput &receiver
|
||||
}
|
||||
|
||||
void JFJochStateMachine::TakePedestalInternalAll(std::unique_lock<std::mutex> &ul) {
|
||||
if (experiment.GetDetectorSetup().GetDetectorType() == DetectorType::EIGER) {
|
||||
logger.Info("EIGER configuration");
|
||||
services.ConfigureDetector(experiment);
|
||||
logger.Info(" ... done ");
|
||||
return;
|
||||
}
|
||||
|
||||
calibration = std::make_unique<JFCalibration>(experiment);
|
||||
|
||||
if (!gain_calibration.empty()) {
|
||||
@@ -54,7 +61,7 @@ void JFJochStateMachine::TakePedestalInternalAll(std::unique_lock<std::mutex> &u
|
||||
for (int i = 0; i < gain_calibration.size(); i++)
|
||||
calibration->GainCalibration(i) = gain_calibration[i];
|
||||
}
|
||||
|
||||
|
||||
cancel_sequence = false;
|
||||
|
||||
logger.Info("Pedestal sequence started");
|
||||
@@ -111,7 +118,6 @@ void JFJochStateMachine::TakePedestalInternalG0(std::unique_lock<std::mutex> &ul
|
||||
auto pedestal_output = services.Stop();
|
||||
ul.lock();
|
||||
|
||||
SetFullMeasurementOutput(pedestal_output);
|
||||
if (ImportPedestalG0(pedestal_output.receiver_output))
|
||||
state = JFJochState::Idle;
|
||||
else
|
||||
@@ -150,7 +156,6 @@ void JFJochStateMachine::TakePedestalInternalG1(std::unique_lock<std::mutex> &ul
|
||||
auto pedestal_output = services.Stop();
|
||||
ul.lock();
|
||||
|
||||
SetFullMeasurementOutput(pedestal_output);
|
||||
if (ImportPedestalG1G2(pedestal_output.receiver_output, 1, storage_cell))
|
||||
state = JFJochState::Idle;
|
||||
else
|
||||
@@ -189,7 +194,6 @@ void JFJochStateMachine::TakePedestalInternalG2(std::unique_lock<std::mutex> &ul
|
||||
auto pedestal_output = services.Stop();
|
||||
ul.lock();
|
||||
|
||||
SetFullMeasurementOutput(pedestal_output);
|
||||
if (ImportPedestalG1G2(pedestal_output.receiver_output, 2, storage_cell))
|
||||
state = JFJochState::Idle;
|
||||
else
|
||||
@@ -211,7 +215,6 @@ void JFJochStateMachine::Initialize() {
|
||||
|
||||
state = JFJochState::Busy;
|
||||
|
||||
ClearMeasurementStatistics();
|
||||
measurement = std::async(std::launch::async, &JFJochStateMachine::InitializeThread, this, std::move(ul));
|
||||
}
|
||||
|
||||
@@ -256,8 +259,6 @@ void JFJochStateMachine::Start(const DatasetSettings& settings) {
|
||||
|
||||
experiment.ImportDatasetSettings(settings);
|
||||
|
||||
ClearAndSetMeasurementStatistics();
|
||||
|
||||
cancel_sequence = false;
|
||||
if (experiment.GetStorageCellNumber() == 1)
|
||||
experiment.StorageCellStart(15);
|
||||
@@ -283,7 +284,6 @@ void JFJochStateMachine::Start(const DatasetSettings& settings) {
|
||||
void JFJochStateMachine::MeasurementThread() {
|
||||
try {
|
||||
auto tmp_output = services.Stop();
|
||||
SetFullMeasurementOutput(tmp_output);
|
||||
{
|
||||
std::unique_lock<std::mutex> ul(m);
|
||||
state = JFJochState::Idle;
|
||||
@@ -329,10 +329,8 @@ JFJochStateMachine::~JFJochStateMachine() {
|
||||
} catch (...) {}
|
||||
}
|
||||
|
||||
void JFJochStateMachine::SetFullMeasurementOutput(const JFJochServicesOutput &output) {
|
||||
std::unique_lock<std::mutex> ul(last_receiver_output_mutex);
|
||||
|
||||
MeasurementStatistics tmp{}; // reset last measurement statistics
|
||||
std::optional<MeasurementStatistics> JFJochStateMachine::GetMeasurementStatistics() const {
|
||||
MeasurementStatistics tmp{};
|
||||
|
||||
tmp.file_prefix = experiment.GetFilePrefix();
|
||||
tmp.run_number = experiment.GetRunNumber();
|
||||
@@ -344,59 +342,8 @@ void JFJochStateMachine::SetFullMeasurementOutput(const JFJochServicesOutput &ou
|
||||
tmp.images_expected = experiment.GetImageNum();
|
||||
tmp.unit_cell = experiment.GetUnitCellString();
|
||||
|
||||
|
||||
tmp.compression_ratio = output.receiver_output.status.compressed_ratio;
|
||||
tmp.collection_efficiency = output.receiver_output.efficiency;
|
||||
tmp.images_collected = output.receiver_output.status.images_collected;
|
||||
tmp.images_sent = output.receiver_output.status.images_sent;
|
||||
tmp.images_skipped = output.receiver_output.status.images_skipped;
|
||||
tmp.cancelled = output.receiver_output.status.cancelled;
|
||||
tmp.max_image_number_sent = output.receiver_output.status.max_image_number_sent;
|
||||
tmp.max_receive_delay = output.receiver_output.status.max_receive_delay;
|
||||
tmp.indexing_rate = output.receiver_output.status.indexing_rate;
|
||||
tmp.bkg_estimate = output.receiver_output.status.bkg_estimate;
|
||||
|
||||
measurement_statistics = tmp;
|
||||
}
|
||||
|
||||
void JFJochStateMachine::ClearAndSetMeasurementStatistics() {
|
||||
std::unique_lock<std::mutex> ul(last_receiver_output_mutex);
|
||||
MeasurementStatistics tmp{};
|
||||
|
||||
tmp.file_prefix = experiment.GetFilePrefix();
|
||||
tmp.run_number = experiment.GetRunNumber();
|
||||
tmp.experiment_group = experiment.GetExperimentGroup();
|
||||
|
||||
tmp.detector_height = experiment.GetXPixelsNum();
|
||||
tmp.detector_width = experiment.GetYPixelsNum();
|
||||
tmp.detector_pixel_depth = experiment.GetByteDepthImage();
|
||||
tmp.images_expected = experiment.GetImageNum();
|
||||
tmp.unit_cell = experiment.GetUnitCellString();
|
||||
|
||||
measurement_statistics = tmp;
|
||||
}
|
||||
|
||||
void JFJochStateMachine::ClearMeasurementStatistics() {
|
||||
std::unique_lock<std::mutex> ul(last_receiver_output_mutex);
|
||||
measurement_statistics.reset();
|
||||
}
|
||||
|
||||
std::optional<MeasurementStatistics> JFJochStateMachine::GetMeasurementStatistics() const {
|
||||
|
||||
auto rcv_status = services.GetReceiverStatus();
|
||||
if (rcv_status) {
|
||||
MeasurementStatistics tmp;
|
||||
|
||||
tmp.file_prefix = experiment.GetFilePrefix();
|
||||
tmp.run_number = experiment.GetRunNumber();
|
||||
tmp.experiment_group = experiment.GetExperimentGroup();
|
||||
|
||||
tmp.detector_width = experiment.GetXPixelsNum();
|
||||
tmp.detector_height = experiment.GetYPixelsNum();
|
||||
tmp.detector_pixel_depth = experiment.GetByteDepthImage();
|
||||
tmp.images_expected = experiment.GetImageNum();
|
||||
tmp.unit_cell = experiment.GetUnitCellString();
|
||||
|
||||
tmp.compression_ratio = rcv_status->compressed_ratio;
|
||||
tmp.images_collected = rcv_status->images_collected;
|
||||
tmp.images_sent = rcv_status->images_sent;
|
||||
@@ -406,11 +353,9 @@ std::optional<MeasurementStatistics> JFJochStateMachine::GetMeasurementStatistic
|
||||
tmp.max_receive_delay = rcv_status->max_receive_delay;
|
||||
tmp.indexing_rate = rcv_status->indexing_rate;
|
||||
tmp.bkg_estimate = rcv_status->bkg_estimate;
|
||||
return tmp;
|
||||
} else {
|
||||
std::unique_lock<std::mutex> ul(last_receiver_output_mutex);
|
||||
return measurement_statistics;
|
||||
tmp.collection_efficiency = rcv_status->efficiency;
|
||||
}
|
||||
return tmp;
|
||||
}
|
||||
|
||||
std::vector<JFCalibrationModuleStatistics> JFJochStateMachine::GetCalibrationStatistics() const {
|
||||
@@ -454,16 +399,8 @@ DiffractionExperiment &JFJochStateMachine::NotThreadSafe_Experiment() {
|
||||
|
||||
BrokerStatus JFJochStateMachine::GetStatus() const {
|
||||
BrokerStatus ret{};
|
||||
|
||||
ret.broker_state = state;
|
||||
try {
|
||||
auto rcv_status = services.GetReceiverStatus();
|
||||
if (rcv_status) {
|
||||
ret.progress = rcv_status.value().progress;
|
||||
ret.indexing_rate = rcv_status.value().indexing_rate;
|
||||
}
|
||||
} catch (JFJochException &e) {} // ignore exception in getting receiver status (don't really care, e.g. if receiver is down)
|
||||
|
||||
ret.progress = services.GetReceiverProgress();
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -774,4 +711,12 @@ void JFJochStateMachine::ConvImageFormatSettings() {
|
||||
|
||||
std::vector<DeviceStatus> JFJochStateMachine::GetDeviceStatus() const {
|
||||
return services.GetDeviceStatus();
|
||||
}
|
||||
}
|
||||
|
||||
void JFJochStateMachine::SetPreviewSocketSettings(const ZMQPreviewSettings &input) {
|
||||
services.SetPreviewSocketSettings(input);
|
||||
}
|
||||
|
||||
ZMQPreviewSettings JFJochStateMachine::GetPreviewSocketSettings() {
|
||||
return services.GetPreviewSocketSettings();
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ enum class JFJochState {Inactive, Idle, Measuring, Error, Busy, Pedestal};
|
||||
struct BrokerStatus {
|
||||
JFJochState broker_state;
|
||||
std::optional<float> progress;
|
||||
std::optional<float> indexing_rate;
|
||||
};
|
||||
|
||||
struct DetectorListElement {
|
||||
@@ -89,12 +88,6 @@ class JFJochStateMachine {
|
||||
mutable std::mutex calibration_statistics_mutex;
|
||||
std::vector<JFCalibrationModuleStatistics> calibration_statistics;
|
||||
|
||||
mutable std::mutex last_receiver_output_mutex;
|
||||
std::optional<MeasurementStatistics> measurement_statistics;
|
||||
void SetFullMeasurementOutput(const JFJochServicesOutput &output);
|
||||
void ClearMeasurementStatistics();
|
||||
void ClearAndSetMeasurementStatistics();
|
||||
|
||||
mutable std::mutex data_processing_settings_mutex;
|
||||
SpotFindingSettings data_processing_settings;
|
||||
|
||||
@@ -183,6 +176,9 @@ public:
|
||||
std::string GetUserPixelMaskTIFF() const;
|
||||
void SetUserPixelMask(const std::string &v);
|
||||
std::vector<DeviceStatus> GetDeviceStatus() const;
|
||||
|
||||
void SetPreviewSocketSettings(const ZMQPreviewSettings &input);
|
||||
ZMQPreviewSettings GetPreviewSocketSettings();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -73,9 +73,49 @@ org::openapitools::server::model::Measurement_statistics Convert(const Measureme
|
||||
ret.setBkgEstimate(input.bkg_estimate.value());
|
||||
ret.setUnitCell(input.unit_cell);
|
||||
ret.setRunNumber(input.run_number);
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
DetectorTiming Convert(const org::openapitools::server::model::Detector_timing& input) {
|
||||
switch (input.getValue()) {
|
||||
case org::openapitools::server::model::Detector_timing::eDetector_timing::AUTO:
|
||||
return DetectorTiming::Auto;
|
||||
case org::openapitools::server::model::Detector_timing::eDetector_timing::TRIGGER:
|
||||
return DetectorTiming::Trigger;
|
||||
case org::openapitools::server::model::Detector_timing::eDetector_timing::BURST:
|
||||
return DetectorTiming::Burst;
|
||||
case org::openapitools::server::model::Detector_timing::eDetector_timing::GATED:
|
||||
return DetectorTiming::Gated;
|
||||
default:
|
||||
case org::openapitools::server::model::Detector_timing::eDetector_timing::INVALID_VALUE_OPENAPI_GENERATED:
|
||||
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "invalid input");
|
||||
}
|
||||
}
|
||||
|
||||
org::openapitools::server::model::Detector_timing Convert(DetectorTiming input) {
|
||||
org::openapitools::server::model::Detector_timing val;
|
||||
switch (input) {
|
||||
|
||||
case DetectorTiming::Auto:
|
||||
val.setValue(org::openapitools::server::model::Detector_timing::eDetector_timing::AUTO);
|
||||
break;
|
||||
case DetectorTiming::Trigger:
|
||||
val.setValue(org::openapitools::server::model::Detector_timing::eDetector_timing::TRIGGER);
|
||||
break;
|
||||
case DetectorTiming::Burst:
|
||||
val.setValue(org::openapitools::server::model::Detector_timing::eDetector_timing::BURST);
|
||||
break;
|
||||
case DetectorTiming::Gated:
|
||||
val.setValue(org::openapitools::server::model::Detector_timing::eDetector_timing::GATED);
|
||||
break;
|
||||
default:
|
||||
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "invalid input");
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
||||
DetectorSettings Convert(const org::openapitools::server::model::Detector_settings &input) {
|
||||
DetectorSettings ret{};
|
||||
|
||||
@@ -85,22 +125,29 @@ DetectorSettings Convert(const org::openapitools::server::model::Detector_settin
|
||||
else
|
||||
ret.FrameTime(std::chrono::microseconds(input.getFrameTimeUs()));
|
||||
|
||||
ret.StorageCells(input.getStorageCellCount());
|
||||
|
||||
ret.StorageCellDelay(std::chrono::nanoseconds(input.getStorageCellDelayNs()));
|
||||
|
||||
ret.FixGainG1(input.isFixedGainG1());
|
||||
ret.UseGainHG0(input.isUseGainHg0());
|
||||
ret.InternalGeneratorEnable(input.isInternalFrameGenerator());
|
||||
ret.InternalGeneratorImages(input.getInternalFrameGeneratorImages());
|
||||
|
||||
ret.PedestalG0Frames(input.getPedestalG0Frames());
|
||||
ret.PedestalG1Frames(input.getPedestalG1Frames());
|
||||
ret.PedestalG2Frames(input.getPedestalG2Frames());
|
||||
ret.PedestalMinImageCount(input.getPedestalMinImageCount());
|
||||
|
||||
ret.PedestalG0RMSLimit(input.getPedestalG0RmsLimit());
|
||||
ret.DetectorDelay(std::chrono::nanoseconds(input.getDetectorTriggerDelayNs()));
|
||||
|
||||
ret.StorageCells(input.getJungfrauStorageCellCount());
|
||||
ret.StorageCellDelay(std::chrono::nanoseconds(input.getJungfrauStorageCellDelayNs()));
|
||||
|
||||
ret.FixGainG1(input.isJungfrauFixedGainG1());
|
||||
ret.UseGainHG0(input.isJungfrauUseGainHg0());
|
||||
|
||||
ret.PedestalG0Frames(input.getJungfrauPedestalG0Frames());
|
||||
ret.PedestalG1Frames(input.getJungfrauPedestalG1Frames());
|
||||
ret.PedestalG2Frames(input.getJungfrauPedestalG2Frames());
|
||||
ret.PedestalMinImageCount(input.getJungfrauPedestalMinImageCount());
|
||||
ret.PedestalG0RMSLimit(input.getJungfrauPedestalG0RmsLimit());
|
||||
|
||||
if (input.eigerThresholdKeVIsSet())
|
||||
ret.EigerThreshold_keV(input.getEigerThresholdKeV());
|
||||
|
||||
if (input.timingIsSet())
|
||||
ret.Timing(Convert(input.getTiming()));
|
||||
else
|
||||
ret.Timing(DetectorTiming::Trigger);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -110,21 +157,25 @@ org::openapitools::server::model::Detector_settings Convert(const DetectorSettin
|
||||
ret.setFrameTimeUs(input.GetFrameTime().count());
|
||||
if (input.GetCountTime().has_value())
|
||||
ret.setCountTimeUs(input.GetCountTime()->count());
|
||||
|
||||
ret.setStorageCellCount(input.GetStorageCells());
|
||||
ret.setInternalFrameGenerator(input.IsInternalGeneratorEnable());
|
||||
ret.setFixedGainG1(input.IsFixGainG1());
|
||||
ret.setUseGainHg0(input.IsUseGainHG0());
|
||||
|
||||
ret.setPedestalG0Frames(input.GetPedestalG0Frames());
|
||||
ret.setPedestalG1Frames(input.GetPedestalG1Frames());
|
||||
ret.setPedestalG2Frames(input.GetPedestalG2Frames());
|
||||
ret.setPedestalMinImageCount(input.GetPedestalMinImageCount());
|
||||
|
||||
ret.setStorageCellDelayNs(input.GetStorageCellDelay().count());
|
||||
ret.setDetectorTriggerDelayNs(input.GetDetectorDelay().count());
|
||||
ret.setInternalFrameGeneratorImages(input.GetInternalGeneratorImages());
|
||||
ret.setPedestalG0RmsLimit(input.GetPedestalG0RMSLimit());
|
||||
ret.setInternalFrameGenerator(input.IsInternalGeneratorEnable());
|
||||
|
||||
ret.setJungfrauStorageCellCount(input.GetStorageCells());
|
||||
ret.setJungfrauFixedGainG1(input.IsFixGainG1());
|
||||
ret.setJungfrauUseGainHg0(input.IsUseGainHG0());
|
||||
|
||||
ret.setJungfrauPedestalG0Frames(input.GetPedestalG0Frames());
|
||||
ret.setJungfrauPedestalG1Frames(input.GetPedestalG1Frames());
|
||||
ret.setJungfrauPedestalG2Frames(input.GetPedestalG2Frames());
|
||||
ret.setJungfrauPedestalMinImageCount(input.GetPedestalMinImageCount());
|
||||
|
||||
ret.setJungfrauStorageCellDelayNs(input.GetStorageCellDelay().count());
|
||||
ret.setJungfrauPedestalG0RmsLimit(input.GetPedestalG0RMSLimit());
|
||||
if (input.GetEIGERThreshold_keV().has_value())
|
||||
ret.setEigerThresholdKeV(input.GetEIGERThreshold_keV().value());
|
||||
|
||||
ret.setTiming(Convert(input.GetTiming()));
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -153,8 +204,6 @@ org::openapitools::server::model::Broker_status Convert(const BrokerStatus& inpu
|
||||
}
|
||||
if (input.progress.has_value())
|
||||
ret.setProgress(input.progress.value());
|
||||
if (input.indexing_rate.has_value() && (input.indexing_rate >= 0.0))
|
||||
ret.setIndexingRate(input.indexing_rate.value());
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -175,6 +224,14 @@ org::openapitools::server::model::Calibration_statistics_inner Convert(const JFC
|
||||
return output;
|
||||
}
|
||||
|
||||
std::vector<org::openapitools::server::model::Calibration_statistics_inner> Convert(const std::vector<JFCalibrationModuleStatistics>& input) {
|
||||
std::vector<org::openapitools::server::model::Calibration_statistics_inner> ret;
|
||||
for (const auto &i: input)
|
||||
ret.push_back(Convert(i));
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
org::openapitools::server::model::Instrument_metadata Convert(const InstrumentMetadata& input) {
|
||||
org::openapitools::server::model::Instrument_metadata output;
|
||||
output.setInstrumentName(input.GetInstrumentName());
|
||||
@@ -193,38 +250,55 @@ InstrumentMetadata Convert(const org::openapitools::server::model::Instrument_me
|
||||
return output;
|
||||
}
|
||||
|
||||
|
||||
org::openapitools::server::model::Detector_state Convert(DetectorState input) {
|
||||
org::openapitools::server::model::Detector_state ret;
|
||||
switch (input) {
|
||||
case DetectorState::IDLE:
|
||||
ret.setValue(org::openapitools::server::model::Detector_state::eDetector_state::IDLE);
|
||||
break;
|
||||
case DetectorState::ERROR:
|
||||
ret.setValue(org::openapitools::server::model::Detector_state::eDetector_state::ERROR);
|
||||
break;
|
||||
case DetectorState::BUSY:
|
||||
ret.setValue(org::openapitools::server::model::Detector_state::eDetector_state::BUSY);
|
||||
break;
|
||||
case DetectorState::WAITING:
|
||||
ret.setValue(org::openapitools::server::model::Detector_state::eDetector_state::WAITING);
|
||||
break;
|
||||
default:
|
||||
case DetectorState::NOT_CONNECTED:
|
||||
ret.setValue(org::openapitools::server::model::Detector_state::eDetector_state::NOT_CONNECTED);
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
org::openapitools::server::model::Detector_power_state Convert(DetectorPowerState input) {
|
||||
org::openapitools::server::model::Detector_power_state ret;
|
||||
switch (input) {
|
||||
case DetectorPowerState::ON:
|
||||
ret.setValue(org::openapitools::server::model::Detector_power_state::eDetector_power_state::POWERON);
|
||||
break;
|
||||
case DetectorPowerState::PARTIAL:
|
||||
ret.setValue(org::openapitools::server::model::Detector_power_state::eDetector_power_state::PARTIAL);
|
||||
break;
|
||||
default:
|
||||
case DetectorPowerState::OFF:
|
||||
ret.setValue(org::openapitools::server::model::Detector_power_state::eDetector_power_state::POWEROFF);
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
org::openapitools::server::model::Detector_status Convert(const DetectorStatus &input) {
|
||||
org::openapitools::server::model::Detector_status output;
|
||||
output.setServerVersion(input.detector_server_version);
|
||||
output.setNumberOfTriggersLeft(input.remaining_triggers);
|
||||
output.setFpgaTempDegC(input.temperature_fpga_degC);
|
||||
output.setHighVoltageV(input.high_voltage_V);
|
||||
switch (input.power_state) {
|
||||
case DetectorPowerState::ON:
|
||||
output.setPowerchip("PowerOn");
|
||||
break;
|
||||
case DetectorPowerState::OFF:
|
||||
output.setPowerchip("PowerOff");
|
||||
break;
|
||||
case DetectorPowerState::PARTIAL:
|
||||
output.setPowerchip("Partial");
|
||||
break;
|
||||
}
|
||||
switch (input.detector_state) {
|
||||
|
||||
case DetectorState::IDLE:
|
||||
output.setState("Idle");
|
||||
break;
|
||||
case DetectorState::ERROR:
|
||||
output.setState("Error");
|
||||
break;
|
||||
case DetectorState::BUSY:
|
||||
output.setState("Busy");
|
||||
break;
|
||||
case DetectorState::WAITING:
|
||||
output.setState("Waiting");
|
||||
break;
|
||||
}
|
||||
output.setPowerchip(Convert(input.power_state));
|
||||
output.setState(Convert(input.detector_state));
|
||||
return output;
|
||||
}
|
||||
|
||||
@@ -477,7 +551,27 @@ std::vector<org::openapitools::server::model::Fpga_status_inner> Convert(const s
|
||||
tmp.setHbmTempC(static_cast<float>(d.hbm_0_temp_C));
|
||||
tmp.setPowerUsageW(static_cast<float>(d.fpga_pcie_12V_I_mA * d.fpga_pcie_12V_V_mV + d.fpga_pcie_3p3V_I_mA
|
||||
* d.fpga_pcie_3p3V_V_mV) / (1000.0f * 1000.0f));
|
||||
tmp.setIdle(d.idle);
|
||||
ret.emplace_back(std::move(tmp));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
ZMQPreviewSettings Convert(const org::openapitools::server::model::Zeromq_preview_settings &input) {
|
||||
ZMQPreviewSettings ret;
|
||||
if (input.isEnabled())
|
||||
ret.period = std::chrono::milliseconds(input.getPeriodMs());
|
||||
else
|
||||
ret.period = {};
|
||||
ret.address = "";
|
||||
return ret;
|
||||
}
|
||||
|
||||
org::openapitools::server::model::Zeromq_preview_settings Convert(const ZMQPreviewSettings &settings) {
|
||||
org::openapitools::server::model::Zeromq_preview_settings ret;
|
||||
ret.setEnabled(settings.period.has_value());
|
||||
if (settings.period.has_value())
|
||||
ret.setPeriodMs(settings.period.value().count() / 1000);
|
||||
ret.setSocketAddress(settings.address);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "../common/DetectorSettings.h"
|
||||
#include "../jungfrau/JFCalibration.h"
|
||||
#include "../common/InstrumentMetadata.h"
|
||||
#include "Zeromq_preview_settings.h"
|
||||
|
||||
SpotFindingSettings Convert(const org::openapitools::server::model::Spot_finding_settings &input);
|
||||
org::openapitools::server::model::Spot_finding_settings Convert(const SpotFindingSettings &input);
|
||||
@@ -38,6 +39,7 @@ DetectorSettings Convert(const org::openapitools::server::model::Detector_settin
|
||||
org::openapitools::server::model::Detector_settings Convert(const DetectorSettings &input);
|
||||
org::openapitools::server::model::Broker_status Convert(const BrokerStatus& input);
|
||||
org::openapitools::server::model::Calibration_statistics_inner Convert(const JFCalibrationModuleStatistics& input);
|
||||
std::vector<org::openapitools::server::model::Calibration_statistics_inner> Convert(const std::vector<JFCalibrationModuleStatistics>& input);
|
||||
org::openapitools::server::model::Instrument_metadata Convert(const InstrumentMetadata& input);
|
||||
|
||||
InstrumentMetadata Convert(const org::openapitools::server::model::Instrument_metadata &input);
|
||||
@@ -56,4 +58,7 @@ org::openapitools::server::model::Image_format_settings Convert(const ImageForma
|
||||
DatasetSettings Convert(const org::openapitools::server::model::Dataset_settings& input);
|
||||
std::vector<org::openapitools::server::model::Fpga_status_inner> Convert(const std::vector<DeviceStatus> &input);
|
||||
|
||||
org::openapitools::server::model::Zeromq_preview_settings Convert(const ZMQPreviewSettings& settings);
|
||||
ZMQPreviewSettings Convert(const org::openapitools::server::model::Zeromq_preview_settings& input);
|
||||
|
||||
#endif //JFJOCH_OPENAPICONVERT_H
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -53,6 +53,8 @@ void DefaultApi::setupRoutes() {
|
||||
Routes::Put(*router, base + "/config/spot_finding", Routes::bind(&DefaultApi::config_spot_finding_put_handler, this));
|
||||
Routes::Get(*router, base + "/config/user_mask.tiff", Routes::bind(&DefaultApi::config_user_mask_tiff_get_handler, this));
|
||||
Routes::Put(*router, base + "/config/user_mask.tiff", Routes::bind(&DefaultApi::config_user_mask_tiff_put_handler, this));
|
||||
Routes::Get(*router, base + "/config/zeromq_preview", Routes::bind(&DefaultApi::config_zeromq_preview_get_handler, this));
|
||||
Routes::Put(*router, base + "/config/zeromq_preview", Routes::bind(&DefaultApi::config_zeromq_preview_put_handler, this));
|
||||
Routes::Post(*router, base + "/deactivate", Routes::bind(&DefaultApi::deactivate_post_handler, this));
|
||||
Routes::Get(*router, base + "/detector/status", Routes::bind(&DefaultApi::detector_status_get_handler, this));
|
||||
Routes::Get(*router, base + "/fpga_status", Routes::bind(&DefaultApi::fpga_status_get_handler, this));
|
||||
@@ -82,6 +84,7 @@ void DefaultApi::setupRoutes() {
|
||||
Routes::Post(*router, base + "/start", Routes::bind(&DefaultApi::start_post_handler, this));
|
||||
Routes::Get(*router, base + "/statistics/calibration", Routes::bind(&DefaultApi::statistics_calibration_get_handler, this));
|
||||
Routes::Get(*router, base + "/statistics/data_collection", Routes::bind(&DefaultApi::statistics_data_collection_get_handler, this));
|
||||
Routes::Get(*router, base + "/statistics", Routes::bind(&DefaultApi::statistics_get_handler, this));
|
||||
Routes::Get(*router, base + "/status", Routes::bind(&DefaultApi::status_get_handler, this));
|
||||
Routes::Post(*router, base + "/trigger", Routes::bind(&DefaultApi::trigger_post_handler, this));
|
||||
Routes::Get(*router, base + "/version", Routes::bind(&DefaultApi::version_get_handler, this));
|
||||
@@ -571,6 +574,56 @@ void DefaultApi::config_user_mask_tiff_put_handler(const Pistache::Rest::Request
|
||||
response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
|
||||
}
|
||||
|
||||
}
|
||||
void DefaultApi::config_zeromq_preview_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) {
|
||||
try {
|
||||
|
||||
|
||||
try {
|
||||
this->config_zeromq_preview_get(response);
|
||||
} catch (Pistache::Http::HttpError &e) {
|
||||
response.send(static_cast<Pistache::Http::Code>(e.code()), e.what());
|
||||
return;
|
||||
} catch (std::exception &e) {
|
||||
this->handleOperationException(e, response);
|
||||
return;
|
||||
}
|
||||
|
||||
} catch (std::exception &e) {
|
||||
response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
|
||||
}
|
||||
|
||||
}
|
||||
void DefaultApi::config_zeromq_preview_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) {
|
||||
try {
|
||||
|
||||
|
||||
// Getting the body param
|
||||
|
||||
Zeromq_preview_settings zeromqPreviewSettings;
|
||||
|
||||
try {
|
||||
nlohmann::json::parse(request.body()).get_to(zeromqPreviewSettings);
|
||||
zeromqPreviewSettings.validate();
|
||||
} catch (std::exception &e) {
|
||||
this->handleParsingException(e, response);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
this->config_zeromq_preview_put(zeromqPreviewSettings, response);
|
||||
} catch (Pistache::Http::HttpError &e) {
|
||||
response.send(static_cast<Pistache::Http::Code>(e.code()), e.what());
|
||||
return;
|
||||
} catch (std::exception &e) {
|
||||
this->handleOperationException(e, response);
|
||||
return;
|
||||
}
|
||||
|
||||
} catch (std::exception &e) {
|
||||
response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
|
||||
}
|
||||
|
||||
}
|
||||
void DefaultApi::deactivate_post_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) {
|
||||
try {
|
||||
@@ -667,12 +720,22 @@ void DefaultApi::pedestal_post_handler(const Pistache::Rest::Request &, Pistache
|
||||
}
|
||||
|
||||
}
|
||||
void DefaultApi::plot_azim_int_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) {
|
||||
void DefaultApi::plot_azim_int_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) {
|
||||
try {
|
||||
|
||||
|
||||
// Getting the query params
|
||||
auto compressionQuery = request.query().get("compression");
|
||||
std::optional<bool> compression;
|
||||
if(compressionQuery.has_value()){
|
||||
bool valueQuery_instance;
|
||||
if(fromStringValue(compressionQuery.value(), valueQuery_instance)){
|
||||
compression = valueQuery_instance;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
this->plot_azim_int_get(response);
|
||||
this->plot_azim_int_get(compression, response);
|
||||
} catch (Pistache::Http::HttpError &e) {
|
||||
response.send(static_cast<Pistache::Http::Code>(e.code()), e.what());
|
||||
return;
|
||||
@@ -699,9 +762,17 @@ void DefaultApi::plot_bkg_estimate_get_handler(const Pistache::Rest::Request &re
|
||||
binning = valueQuery_instance;
|
||||
}
|
||||
}
|
||||
auto compressionQuery = request.query().get("compression");
|
||||
std::optional<bool> compression;
|
||||
if(compressionQuery.has_value()){
|
||||
bool valueQuery_instance;
|
||||
if(fromStringValue(compressionQuery.value(), valueQuery_instance)){
|
||||
compression = valueQuery_instance;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
this->plot_bkg_estimate_get(binning, response);
|
||||
this->plot_bkg_estimate_get(binning, compression, response);
|
||||
} catch (Pistache::Http::HttpError &e) {
|
||||
response.send(static_cast<Pistache::Http::Code>(e.code()), e.what());
|
||||
return;
|
||||
@@ -728,9 +799,17 @@ void DefaultApi::plot_error_pixel_get_handler(const Pistache::Rest::Request &req
|
||||
binning = valueQuery_instance;
|
||||
}
|
||||
}
|
||||
auto compressionQuery = request.query().get("compression");
|
||||
std::optional<bool> compression;
|
||||
if(compressionQuery.has_value()){
|
||||
bool valueQuery_instance;
|
||||
if(fromStringValue(compressionQuery.value(), valueQuery_instance)){
|
||||
compression = valueQuery_instance;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
this->plot_error_pixel_get(binning, response);
|
||||
this->plot_error_pixel_get(binning, compression, response);
|
||||
} catch (Pistache::Http::HttpError &e) {
|
||||
response.send(static_cast<Pistache::Http::Code>(e.code()), e.what());
|
||||
return;
|
||||
@@ -757,9 +836,17 @@ void DefaultApi::plot_image_collection_efficiency_get_handler(const Pistache::Re
|
||||
binning = valueQuery_instance;
|
||||
}
|
||||
}
|
||||
auto compressionQuery = request.query().get("compression");
|
||||
std::optional<bool> compression;
|
||||
if(compressionQuery.has_value()){
|
||||
bool valueQuery_instance;
|
||||
if(fromStringValue(compressionQuery.value(), valueQuery_instance)){
|
||||
compression = valueQuery_instance;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
this->plot_image_collection_efficiency_get(binning, response);
|
||||
this->plot_image_collection_efficiency_get(binning, compression, response);
|
||||
} catch (Pistache::Http::HttpError &e) {
|
||||
response.send(static_cast<Pistache::Http::Code>(e.code()), e.what());
|
||||
return;
|
||||
@@ -786,9 +873,17 @@ void DefaultApi::plot_indexing_rate_get_handler(const Pistache::Rest::Request &r
|
||||
binning = valueQuery_instance;
|
||||
}
|
||||
}
|
||||
auto compressionQuery = request.query().get("compression");
|
||||
std::optional<bool> compression;
|
||||
if(compressionQuery.has_value()){
|
||||
bool valueQuery_instance;
|
||||
if(fromStringValue(compressionQuery.value(), valueQuery_instance)){
|
||||
compression = valueQuery_instance;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
this->plot_indexing_rate_get(binning, response);
|
||||
this->plot_indexing_rate_get(binning, compression, response);
|
||||
} catch (Pistache::Http::HttpError &e) {
|
||||
response.send(static_cast<Pistache::Http::Code>(e.code()), e.what());
|
||||
return;
|
||||
@@ -815,9 +910,17 @@ void DefaultApi::plot_receiver_delay_get_handler(const Pistache::Rest::Request &
|
||||
binning = valueQuery_instance;
|
||||
}
|
||||
}
|
||||
auto compressionQuery = request.query().get("compression");
|
||||
std::optional<bool> compression;
|
||||
if(compressionQuery.has_value()){
|
||||
bool valueQuery_instance;
|
||||
if(fromStringValue(compressionQuery.value(), valueQuery_instance)){
|
||||
compression = valueQuery_instance;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
this->plot_receiver_delay_get(binning, response);
|
||||
this->plot_receiver_delay_get(binning, compression, response);
|
||||
} catch (Pistache::Http::HttpError &e) {
|
||||
response.send(static_cast<Pistache::Http::Code>(e.code()), e.what());
|
||||
return;
|
||||
@@ -844,9 +947,17 @@ void DefaultApi::plot_receiver_free_send_buffers_get_handler(const Pistache::Res
|
||||
binning = valueQuery_instance;
|
||||
}
|
||||
}
|
||||
auto compressionQuery = request.query().get("compression");
|
||||
std::optional<bool> compression;
|
||||
if(compressionQuery.has_value()){
|
||||
bool valueQuery_instance;
|
||||
if(fromStringValue(compressionQuery.value(), valueQuery_instance)){
|
||||
compression = valueQuery_instance;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
this->plot_receiver_free_send_buffers_get(binning, response);
|
||||
this->plot_receiver_free_send_buffers_get(binning, compression, response);
|
||||
} catch (Pistache::Http::HttpError &e) {
|
||||
response.send(static_cast<Pistache::Http::Code>(e.code()), e.what());
|
||||
return;
|
||||
@@ -873,9 +984,17 @@ void DefaultApi::plot_roi_max_count_get_handler(const Pistache::Rest::Request &r
|
||||
binning = valueQuery_instance;
|
||||
}
|
||||
}
|
||||
auto compressionQuery = request.query().get("compression");
|
||||
std::optional<bool> compression;
|
||||
if(compressionQuery.has_value()){
|
||||
bool valueQuery_instance;
|
||||
if(fromStringValue(compressionQuery.value(), valueQuery_instance)){
|
||||
compression = valueQuery_instance;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
this->plot_roi_max_count_get(binning, response);
|
||||
this->plot_roi_max_count_get(binning, compression, response);
|
||||
} catch (Pistache::Http::HttpError &e) {
|
||||
response.send(static_cast<Pistache::Http::Code>(e.code()), e.what());
|
||||
return;
|
||||
@@ -902,9 +1021,17 @@ void DefaultApi::plot_roi_sum_get_handler(const Pistache::Rest::Request &request
|
||||
binning = valueQuery_instance;
|
||||
}
|
||||
}
|
||||
auto compressionQuery = request.query().get("compression");
|
||||
std::optional<bool> compression;
|
||||
if(compressionQuery.has_value()){
|
||||
bool valueQuery_instance;
|
||||
if(fromStringValue(compressionQuery.value(), valueQuery_instance)){
|
||||
compression = valueQuery_instance;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
this->plot_roi_sum_get(binning, response);
|
||||
this->plot_roi_sum_get(binning, compression, response);
|
||||
} catch (Pistache::Http::HttpError &e) {
|
||||
response.send(static_cast<Pistache::Http::Code>(e.code()), e.what());
|
||||
return;
|
||||
@@ -931,9 +1058,17 @@ void DefaultApi::plot_roi_valid_pixels_get_handler(const Pistache::Rest::Request
|
||||
binning = valueQuery_instance;
|
||||
}
|
||||
}
|
||||
auto compressionQuery = request.query().get("compression");
|
||||
std::optional<bool> compression;
|
||||
if(compressionQuery.has_value()){
|
||||
bool valueQuery_instance;
|
||||
if(fromStringValue(compressionQuery.value(), valueQuery_instance)){
|
||||
compression = valueQuery_instance;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
this->plot_roi_valid_pixels_get(binning, response);
|
||||
this->plot_roi_valid_pixels_get(binning, compression, response);
|
||||
} catch (Pistache::Http::HttpError &e) {
|
||||
response.send(static_cast<Pistache::Http::Code>(e.code()), e.what());
|
||||
return;
|
||||
@@ -960,9 +1095,17 @@ void DefaultApi::plot_spot_count_get_handler(const Pistache::Rest::Request &requ
|
||||
binning = valueQuery_instance;
|
||||
}
|
||||
}
|
||||
auto compressionQuery = request.query().get("compression");
|
||||
std::optional<bool> compression;
|
||||
if(compressionQuery.has_value()){
|
||||
bool valueQuery_instance;
|
||||
if(fromStringValue(compressionQuery.value(), valueQuery_instance)){
|
||||
compression = valueQuery_instance;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
this->plot_spot_count_get(binning, response);
|
||||
this->plot_spot_count_get(binning, compression, response);
|
||||
} catch (Pistache::Http::HttpError &e) {
|
||||
response.send(static_cast<Pistache::Http::Code>(e.code()), e.what());
|
||||
return;
|
||||
@@ -989,9 +1132,17 @@ void DefaultApi::plot_strong_pixel_get_handler(const Pistache::Rest::Request &re
|
||||
binning = valueQuery_instance;
|
||||
}
|
||||
}
|
||||
auto compressionQuery = request.query().get("compression");
|
||||
std::optional<bool> compression;
|
||||
if(compressionQuery.has_value()){
|
||||
bool valueQuery_instance;
|
||||
if(fromStringValue(compressionQuery.value(), valueQuery_instance)){
|
||||
compression = valueQuery_instance;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
this->plot_strong_pixel_get(binning, response);
|
||||
this->plot_strong_pixel_get(binning, compression, response);
|
||||
} catch (Pistache::Http::HttpError &e) {
|
||||
response.send(static_cast<Pistache::Http::Code>(e.code()), e.what());
|
||||
return;
|
||||
@@ -1298,6 +1449,35 @@ void DefaultApi::statistics_data_collection_get_handler(const Pistache::Rest::Re
|
||||
response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
|
||||
}
|
||||
|
||||
}
|
||||
void DefaultApi::statistics_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) {
|
||||
try {
|
||||
|
||||
|
||||
// Getting the query params
|
||||
auto compressionQuery = request.query().get("compression");
|
||||
std::optional<bool> compression;
|
||||
if(compressionQuery.has_value()){
|
||||
bool valueQuery_instance;
|
||||
if(fromStringValue(compressionQuery.value(), valueQuery_instance)){
|
||||
compression = valueQuery_instance;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
this->statistics_get(compression, response);
|
||||
} catch (Pistache::Http::HttpError &e) {
|
||||
response.send(static_cast<Pistache::Http::Code>(e.code()), e.what());
|
||||
return;
|
||||
} catch (std::exception &e) {
|
||||
this->handleOperationException(e, response);
|
||||
return;
|
||||
}
|
||||
|
||||
} catch (std::exception &e) {
|
||||
response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
|
||||
}
|
||||
|
||||
}
|
||||
void DefaultApi::status_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) {
|
||||
try {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -40,12 +40,14 @@
|
||||
#include "Fpga_status_inner.h"
|
||||
#include "Image_format_settings.h"
|
||||
#include "Instrument_metadata.h"
|
||||
#include "Jfjoch_statistics.h"
|
||||
#include "Measurement_statistics.h"
|
||||
#include "Plots.h"
|
||||
#include "Preview_settings.h"
|
||||
#include "Roi_box_list.h"
|
||||
#include "Roi_circle_list.h"
|
||||
#include "Spot_finding_settings.h"
|
||||
#include "Zeromq_preview_settings.h"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -83,6 +85,8 @@ private:
|
||||
void config_spot_finding_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void config_user_mask_tiff_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void config_user_mask_tiff_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void config_zeromq_preview_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void config_zeromq_preview_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void deactivate_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void detector_status_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void fpga_status_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
@@ -112,6 +116,7 @@ private:
|
||||
void start_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void statistics_calibration_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void statistics_data_collection_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void statistics_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void status_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void trigger_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void version_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
@@ -295,6 +300,21 @@ private:
|
||||
/// </remarks>
|
||||
virtual void config_user_mask_tiff_put(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Get ZeroMQ preview settings
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
virtual void config_zeromq_preview_get(Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Set ZeroMQ preview settings
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Jungfraujoch can generate preview message stream on ZeroMQ SUB socket. Here settings of the socket can be adjusted. While the data structure contains also socket_address, this cannot be changed via HTTP and is ignore in PUT request. Options set with this PUT request have no effect on HTTP based preview.
|
||||
/// </remarks>
|
||||
/// <param name="zeromqPreviewSettings"> (optional)</param>
|
||||
virtual void config_zeromq_preview_put(const org::openapitools::server::model::Zeromq_preview_settings &zeromqPreviewSettings, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Prepare detector to turn off
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
@@ -335,7 +355,8 @@ private:
|
||||
/// <remarks>
|
||||
/// Generate average radial integration profile
|
||||
/// </remarks>
|
||||
virtual void plot_azim_int_get(Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
|
||||
virtual void plot_azim_int_get(const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Generate background estimate plot
|
||||
/// </summary>
|
||||
@@ -343,7 +364,8 @@ private:
|
||||
/// Mean intensity for d = 3 - 5 A per image; binning is configurable
|
||||
/// </remarks>
|
||||
/// <param name="binning">Binning of frames for the plot (0 = default binning) (optional, default to 0)</param>
|
||||
virtual void plot_bkg_estimate_get(const std::optional<int32_t> &binning, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
|
||||
virtual void plot_bkg_estimate_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Generate error pixels plot
|
||||
/// </summary>
|
||||
@@ -351,7 +373,8 @@ private:
|
||||
/// Count of error (mean) and saturated (mean/max) pixels per image; binning is configurable
|
||||
/// </remarks>
|
||||
/// <param name="binning">Binning of frames for the plot (0 = default binning) (optional, default to 0)</param>
|
||||
virtual void plot_error_pixel_get(const std::optional<int32_t> &binning, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
|
||||
virtual void plot_error_pixel_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Generate image collection efficiency plot
|
||||
/// </summary>
|
||||
@@ -359,7 +382,8 @@ private:
|
||||
/// Ratio of collected and expected packets per image; binning is configurable
|
||||
/// </remarks>
|
||||
/// <param name="binning">Binning of frames for the plot (0 = default binning) (optional, default to 0)</param>
|
||||
virtual void plot_image_collection_efficiency_get(const std::optional<int32_t> &binning, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
|
||||
virtual void plot_image_collection_efficiency_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Generate indexing rate plot
|
||||
/// </summary>
|
||||
@@ -367,7 +391,8 @@ private:
|
||||
/// Image indexing rate; binning is configurable
|
||||
/// </remarks>
|
||||
/// <param name="binning">Binning of frames for the plot (0 = default binning) (optional, default to 0)</param>
|
||||
virtual void plot_indexing_rate_get(const std::optional<int32_t> &binning, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
|
||||
virtual void plot_indexing_rate_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Generate receiver delay plot
|
||||
/// </summary>
|
||||
@@ -375,7 +400,8 @@ private:
|
||||
/// Amount of frames the receiver is behind the FPGA for each image - used for internal debugging; binning is configurable
|
||||
/// </remarks>
|
||||
/// <param name="binning">Binning of frames for the plot (0 = default binning) (optional, default to 0)</param>
|
||||
virtual void plot_receiver_delay_get(const std::optional<int32_t> &binning, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
|
||||
virtual void plot_receiver_delay_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Generate receiver free send buffer plot
|
||||
/// </summary>
|
||||
@@ -383,7 +409,8 @@ private:
|
||||
/// Amount of send buffers available during frame processing - used for internal debugging; binning is configurable
|
||||
/// </remarks>
|
||||
/// <param name="binning">Binning of frames for the plot (0 = default binning) (optional, default to 0)</param>
|
||||
virtual void plot_receiver_free_send_buffers_get(const std::optional<int32_t> &binning, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
|
||||
virtual void plot_receiver_free_send_buffers_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Generate plot of ROI max count
|
||||
/// </summary>
|
||||
@@ -391,7 +418,8 @@ private:
|
||||
/// Max count of ROI per image; binning is configurable
|
||||
/// </remarks>
|
||||
/// <param name="binning">Binning of frames for the plot (0 = default binning) (optional, default to 0)</param>
|
||||
virtual void plot_roi_max_count_get(const std::optional<int32_t> &binning, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
|
||||
virtual void plot_roi_max_count_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Generate ROI sum plot
|
||||
/// </summary>
|
||||
@@ -399,7 +427,8 @@ private:
|
||||
/// Sum of ROI rectangle per image; binning is configurable
|
||||
/// </remarks>
|
||||
/// <param name="binning">Binning of frames for the plot (0 = default binning) (optional, default to 0)</param>
|
||||
virtual void plot_roi_sum_get(const std::optional<int32_t> &binning, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
|
||||
virtual void plot_roi_sum_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Generate plot of ROI valid pixels
|
||||
/// </summary>
|
||||
@@ -407,7 +436,8 @@ private:
|
||||
/// Number of pixels within a ROI area; pixels with special values (overload, bad pixel) are excluded; multipixels are counted just once; binning is configurable
|
||||
/// </remarks>
|
||||
/// <param name="binning">Binning of frames for the plot (0 = default binning) (optional, default to 0)</param>
|
||||
virtual void plot_roi_valid_pixels_get(const std::optional<int32_t> &binning, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
|
||||
virtual void plot_roi_valid_pixels_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Generate spot count plot
|
||||
/// </summary>
|
||||
@@ -415,7 +445,8 @@ private:
|
||||
/// Number of spots per image; binning is configurable
|
||||
/// </remarks>
|
||||
/// <param name="binning">Binning of frames for the plot (0 = default binning) (optional, default to 0)</param>
|
||||
virtual void plot_spot_count_get(const std::optional<int32_t> &binning, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
|
||||
virtual void plot_spot_count_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Generate strong pixels plot
|
||||
/// </summary>
|
||||
@@ -423,7 +454,8 @@ private:
|
||||
/// Count of strong pixels per image (from spot finding); binning is configurable
|
||||
/// </remarks>
|
||||
/// <param name="binning">Binning of frames for the plot (0 = default binning) (optional, default to 0)</param>
|
||||
virtual void plot_strong_pixel_get(const std::optional<int32_t> &binning, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
|
||||
virtual void plot_strong_pixel_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Get last preview image in TIFF format for calibration with PyFAI/Dioptas
|
||||
/// </summary>
|
||||
@@ -515,6 +547,14 @@ private:
|
||||
/// </remarks>
|
||||
virtual void statistics_data_collection_get(Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Get general statistics
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
|
||||
virtual void statistics_get(const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Get Jungfraujoch status
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -24,8 +24,6 @@ Broker_status::Broker_status()
|
||||
m_State = "";
|
||||
m_Progress = 0.0f;
|
||||
m_ProgressIsSet = false;
|
||||
m_Indexing_rate = 0.0f;
|
||||
m_Indexing_rateIsSet = false;
|
||||
|
||||
}
|
||||
|
||||
@@ -55,25 +53,6 @@ bool Broker_status::validate(std::stringstream& msg, const std::string& pathPref
|
||||
const std::string currentValuePath = _pathPrefix + ".progress";
|
||||
|
||||
|
||||
if (value < static_cast<float>(0.0))
|
||||
{
|
||||
success = false;
|
||||
msg << currentValuePath << ": must be greater than or equal to 0.0;";
|
||||
}
|
||||
if (value > static_cast<float>(1.0))
|
||||
{
|
||||
success = false;
|
||||
msg << currentValuePath << ": must be less than or equal to 1.0;";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (indexingRateIsSet())
|
||||
{
|
||||
const float& value = m_Indexing_rate;
|
||||
const std::string currentValuePath = _pathPrefix + ".indexingRate";
|
||||
|
||||
|
||||
if (value < static_cast<float>(0.0))
|
||||
{
|
||||
success = false;
|
||||
@@ -99,10 +78,7 @@ bool Broker_status::operator==(const Broker_status& rhs) const
|
||||
&&
|
||||
|
||||
|
||||
((!progressIsSet() && !rhs.progressIsSet()) || (progressIsSet() && rhs.progressIsSet() && getProgress() == rhs.getProgress())) &&
|
||||
|
||||
|
||||
((!indexingRateIsSet() && !rhs.indexingRateIsSet()) || (indexingRateIsSet() && rhs.indexingRateIsSet() && getIndexingRate() == rhs.getIndexingRate()))
|
||||
((!progressIsSet() && !rhs.progressIsSet()) || (progressIsSet() && rhs.progressIsSet() && getProgress() == rhs.getProgress()))
|
||||
|
||||
;
|
||||
}
|
||||
@@ -118,8 +94,6 @@ void to_json(nlohmann::json& j, const Broker_status& o)
|
||||
j["state"] = o.m_State;
|
||||
if(o.progressIsSet())
|
||||
j["progress"] = o.m_Progress;
|
||||
if(o.indexingRateIsSet())
|
||||
j["indexing_rate"] = o.m_Indexing_rate;
|
||||
|
||||
}
|
||||
|
||||
@@ -131,11 +105,6 @@ void from_json(const nlohmann::json& j, Broker_status& o)
|
||||
j.at("progress").get_to(o.m_Progress);
|
||||
o.m_ProgressIsSet = true;
|
||||
}
|
||||
if(j.find("indexing_rate") != j.end())
|
||||
{
|
||||
j.at("indexing_rate").get_to(o.m_Indexing_rate);
|
||||
o.m_Indexing_rateIsSet = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -164,23 +133,6 @@ void Broker_status::unsetProgress()
|
||||
{
|
||||
m_ProgressIsSet = false;
|
||||
}
|
||||
float Broker_status::getIndexingRate() const
|
||||
{
|
||||
return m_Indexing_rate;
|
||||
}
|
||||
void Broker_status::setIndexingRate(float const value)
|
||||
{
|
||||
m_Indexing_rate = value;
|
||||
m_Indexing_rateIsSet = true;
|
||||
}
|
||||
bool Broker_status::indexingRateIsSet() const
|
||||
{
|
||||
return m_Indexing_rateIsSet;
|
||||
}
|
||||
void Broker_status::unsetIndexing_rate()
|
||||
{
|
||||
m_Indexing_rateIsSet = false;
|
||||
}
|
||||
|
||||
|
||||
} // namespace org::openapitools::server::model
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -64,19 +64,12 @@ public:
|
||||
std::string getState() const;
|
||||
void setState(std::string const& value);
|
||||
/// <summary>
|
||||
///
|
||||
/// Progress of data collection (only available if receiving is running)
|
||||
/// </summary>
|
||||
float getProgress() const;
|
||||
void setProgress(float const value);
|
||||
bool progressIsSet() const;
|
||||
void unsetProgress();
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
float getIndexingRate() const;
|
||||
void setIndexingRate(float const value);
|
||||
bool indexingRateIsSet() const;
|
||||
void unsetIndexing_rate();
|
||||
|
||||
friend void to_json(nlohmann::json& j, const Broker_status& o);
|
||||
friend void from_json(const nlohmann::json& j, Broker_status& o);
|
||||
@@ -85,8 +78,6 @@ protected:
|
||||
|
||||
float m_Progress;
|
||||
bool m_ProgressIsSet;
|
||||
float m_Indexing_rate;
|
||||
bool m_Indexing_rateIsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -28,6 +28,8 @@ Detector::Detector()
|
||||
m_High_voltage_VIsSet = false;
|
||||
m_Udp_interface_count = 1L;
|
||||
m_Udp_interface_countIsSet = false;
|
||||
m_Module_sync = true;
|
||||
m_Module_syncIsSet = false;
|
||||
m_Sensor_thickness_um = 320.0f;
|
||||
m_Sensor_thickness_umIsSet = false;
|
||||
m_Calibration_fileIsSet = false;
|
||||
@@ -129,7 +131,7 @@ bool Detector::validate(std::stringstream& msg, const std::string& pathPrefix) c
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (sensorThicknessUmIsSet())
|
||||
{
|
||||
const float& value = m_Sensor_thickness_um;
|
||||
@@ -252,6 +254,9 @@ bool Detector::operator==(const Detector& rhs) const
|
||||
((!udpInterfaceCountIsSet() && !rhs.udpInterfaceCountIsSet()) || (udpInterfaceCountIsSet() && rhs.udpInterfaceCountIsSet() && getUdpInterfaceCount() == rhs.getUdpInterfaceCount())) &&
|
||||
|
||||
|
||||
((!moduleSyncIsSet() && !rhs.moduleSyncIsSet()) || (moduleSyncIsSet() && rhs.moduleSyncIsSet() && isModuleSync() == rhs.isModuleSync())) &&
|
||||
|
||||
|
||||
((!sensorThicknessUmIsSet() && !rhs.sensorThicknessUmIsSet()) || (sensorThicknessUmIsSet() && rhs.sensorThicknessUmIsSet() && getSensorThicknessUm() == rhs.getSensorThicknessUm())) &&
|
||||
|
||||
|
||||
@@ -297,6 +302,8 @@ void to_json(nlohmann::json& j, const Detector& o)
|
||||
j["high_voltage_V"] = o.m_High_voltage_V;
|
||||
if(o.udpInterfaceCountIsSet())
|
||||
j["udp_interface_count"] = o.m_Udp_interface_count;
|
||||
if(o.moduleSyncIsSet())
|
||||
j["module_sync"] = o.m_Module_sync;
|
||||
if(o.sensorThicknessUmIsSet())
|
||||
j["sensor_thickness_um"] = o.m_Sensor_thickness_um;
|
||||
if(o.calibrationFileIsSet() || !o.m_Calibration_file.empty())
|
||||
@@ -337,6 +344,11 @@ void from_json(const nlohmann::json& j, Detector& o)
|
||||
j.at("udp_interface_count").get_to(o.m_Udp_interface_count);
|
||||
o.m_Udp_interface_countIsSet = true;
|
||||
}
|
||||
if(j.find("module_sync") != j.end())
|
||||
{
|
||||
j.at("module_sync").get_to(o.m_Module_sync);
|
||||
o.m_Module_syncIsSet = true;
|
||||
}
|
||||
if(j.find("sensor_thickness_um") != j.end())
|
||||
{
|
||||
j.at("sensor_thickness_um").get_to(o.m_Sensor_thickness_um);
|
||||
@@ -452,6 +464,23 @@ void Detector::unsetUdp_interface_count()
|
||||
{
|
||||
m_Udp_interface_countIsSet = false;
|
||||
}
|
||||
bool Detector::isModuleSync() const
|
||||
{
|
||||
return m_Module_sync;
|
||||
}
|
||||
void Detector::setModuleSync(bool const value)
|
||||
{
|
||||
m_Module_sync = value;
|
||||
m_Module_syncIsSet = true;
|
||||
}
|
||||
bool Detector::moduleSyncIsSet() const
|
||||
{
|
||||
return m_Module_syncIsSet;
|
||||
}
|
||||
void Detector::unsetModule_sync()
|
||||
{
|
||||
m_Module_syncIsSet = false;
|
||||
}
|
||||
float Detector::getSensorThicknessUm() const
|
||||
{
|
||||
return m_Sensor_thickness_um;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -94,6 +94,13 @@ public:
|
||||
bool udpInterfaceCountIsSet() const;
|
||||
void unsetUdp_interface_count();
|
||||
/// <summary>
|
||||
/// Use module 0 as master for timing. Only applies to JUNGFRAU detector (this cannot be turned off for EIGER).
|
||||
/// </summary>
|
||||
bool isModuleSync() const;
|
||||
void setModuleSync(bool const value);
|
||||
bool moduleSyncIsSet() const;
|
||||
void unsetModule_sync();
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
float getSensorThicknessUm() const;
|
||||
@@ -170,6 +177,8 @@ protected:
|
||||
bool m_High_voltage_VIsSet;
|
||||
int64_t m_Udp_interface_count;
|
||||
bool m_Udp_interface_countIsSet;
|
||||
bool m_Module_sync;
|
||||
bool m_Module_syncIsSet;
|
||||
float m_Sensor_thickness_um;
|
||||
bool m_Sensor_thickness_umIsSet;
|
||||
std::vector<std::string> m_Calibration_file;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -26,7 +26,6 @@ Detector_list_detectors_inner::Detector_list_detectors_inner()
|
||||
m_Serial_number = "";
|
||||
m_Base_ipv4_addr = "";
|
||||
m_Udp_interface_count = 0L;
|
||||
m_Udp_interface_countIsSet = false;
|
||||
m_Nmodules = 0L;
|
||||
m_Width = 0L;
|
||||
m_Height = 0L;
|
||||
@@ -87,8 +86,8 @@ bool Detector_list_detectors_inner::operator==(const Detector_list_detectors_inn
|
||||
(getBaseIpv4Addr() == rhs.getBaseIpv4Addr())
|
||||
&&
|
||||
|
||||
|
||||
((!udpInterfaceCountIsSet() && !rhs.udpInterfaceCountIsSet()) || (udpInterfaceCountIsSet() && rhs.udpInterfaceCountIsSet() && getUdpInterfaceCount() == rhs.getUdpInterfaceCount())) &&
|
||||
(getUdpInterfaceCount() == rhs.getUdpInterfaceCount())
|
||||
&&
|
||||
|
||||
(getNmodules() == rhs.getNmodules())
|
||||
&&
|
||||
@@ -114,8 +113,7 @@ void to_json(nlohmann::json& j, const Detector_list_detectors_inner& o)
|
||||
j["description"] = o.m_Description;
|
||||
j["serial_number"] = o.m_Serial_number;
|
||||
j["base_ipv4_addr"] = o.m_Base_ipv4_addr;
|
||||
if(o.udpInterfaceCountIsSet())
|
||||
j["udp_interface_count"] = o.m_Udp_interface_count;
|
||||
j["udp_interface_count"] = o.m_Udp_interface_count;
|
||||
j["nmodules"] = o.m_Nmodules;
|
||||
j["width"] = o.m_Width;
|
||||
j["height"] = o.m_Height;
|
||||
@@ -128,11 +126,7 @@ void from_json(const nlohmann::json& j, Detector_list_detectors_inner& o)
|
||||
j.at("description").get_to(o.m_Description);
|
||||
j.at("serial_number").get_to(o.m_Serial_number);
|
||||
j.at("base_ipv4_addr").get_to(o.m_Base_ipv4_addr);
|
||||
if(j.find("udp_interface_count") != j.end())
|
||||
{
|
||||
j.at("udp_interface_count").get_to(o.m_Udp_interface_count);
|
||||
o.m_Udp_interface_countIsSet = true;
|
||||
}
|
||||
j.at("udp_interface_count").get_to(o.m_Udp_interface_count);
|
||||
j.at("nmodules").get_to(o.m_Nmodules);
|
||||
j.at("width").get_to(o.m_Width);
|
||||
j.at("height").get_to(o.m_Height);
|
||||
@@ -178,15 +172,6 @@ int64_t Detector_list_detectors_inner::getUdpInterfaceCount() const
|
||||
void Detector_list_detectors_inner::setUdpInterfaceCount(int64_t const value)
|
||||
{
|
||||
m_Udp_interface_count = value;
|
||||
m_Udp_interface_countIsSet = true;
|
||||
}
|
||||
bool Detector_list_detectors_inner::udpInterfaceCountIsSet() const
|
||||
{
|
||||
return m_Udp_interface_countIsSet;
|
||||
}
|
||||
void Detector_list_detectors_inner::unsetUdp_interface_count()
|
||||
{
|
||||
m_Udp_interface_countIsSet = false;
|
||||
}
|
||||
int64_t Detector_list_detectors_inner::getNmodules() const
|
||||
{
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -83,8 +83,6 @@ public:
|
||||
/// </summary>
|
||||
int64_t getUdpInterfaceCount() const;
|
||||
void setUdpInterfaceCount(int64_t const value);
|
||||
bool udpInterfaceCountIsSet() const;
|
||||
void unsetUdp_interface_count();
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
@@ -113,7 +111,7 @@ protected:
|
||||
std::string m_Base_ipv4_addr;
|
||||
|
||||
int64_t m_Udp_interface_count;
|
||||
bool m_Udp_interface_countIsSet;
|
||||
|
||||
int64_t m_Nmodules;
|
||||
|
||||
int64_t m_Width;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
122
broker/gen/model/Detector_power_state.cpp
Normal file
122
broker/gen/model/Detector_power_state.cpp
Normal file
@@ -0,0 +1,122 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
#include "Detector_power_state.h"
|
||||
#include "Helpers.h"
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
|
||||
namespace org::openapitools::server::model
|
||||
{
|
||||
|
||||
Detector_power_state::Detector_power_state()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Detector_power_state::validate() const
|
||||
{
|
||||
std::stringstream msg;
|
||||
if (!validate(msg))
|
||||
{
|
||||
throw org::openapitools::server::helpers::ValidationException(msg.str());
|
||||
}
|
||||
}
|
||||
|
||||
bool Detector_power_state::validate(std::stringstream& msg) const
|
||||
{
|
||||
return validate(msg, "");
|
||||
}
|
||||
|
||||
bool Detector_power_state::validate(std::stringstream& msg, const std::string& pathPrefix) const
|
||||
{
|
||||
bool success = true;
|
||||
const std::string _pathPrefix = pathPrefix.empty() ? "Detector_power_state" : pathPrefix;
|
||||
|
||||
|
||||
if (m_value == Detector_power_state::eDetector_power_state::INVALID_VALUE_OPENAPI_GENERATED)
|
||||
{
|
||||
success = false;
|
||||
msg << _pathPrefix << ": has no value;";
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
bool Detector_power_state::operator==(const Detector_power_state& rhs) const
|
||||
{
|
||||
return
|
||||
getValue() == rhs.getValue()
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
bool Detector_power_state::operator!=(const Detector_power_state& rhs) const
|
||||
{
|
||||
return !(*this == rhs);
|
||||
}
|
||||
|
||||
void to_json(nlohmann::json& j, const Detector_power_state& o)
|
||||
{
|
||||
j = nlohmann::json::object();
|
||||
|
||||
switch (o.getValue())
|
||||
{
|
||||
case Detector_power_state::eDetector_power_state::INVALID_VALUE_OPENAPI_GENERATED:
|
||||
j = "INVALID_VALUE_OPENAPI_GENERATED";
|
||||
break;
|
||||
case Detector_power_state::eDetector_power_state::POWERON:
|
||||
j = "PowerOn";
|
||||
break;
|
||||
case Detector_power_state::eDetector_power_state::POWEROFF:
|
||||
j = "PowerOff";
|
||||
break;
|
||||
case Detector_power_state::eDetector_power_state::PARTIAL:
|
||||
j = "Partial";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void from_json(const nlohmann::json& j, Detector_power_state& o)
|
||||
{
|
||||
|
||||
auto s = j.get<std::string>();
|
||||
if (s == "PowerOn") {
|
||||
o.setValue(Detector_power_state::eDetector_power_state::POWERON);
|
||||
}
|
||||
else if (s == "PowerOff") {
|
||||
o.setValue(Detector_power_state::eDetector_power_state::POWEROFF);
|
||||
}
|
||||
else if (s == "Partial") {
|
||||
o.setValue(Detector_power_state::eDetector_power_state::PARTIAL);
|
||||
} else {
|
||||
std::stringstream ss;
|
||||
ss << "Unexpected value " << s << " in json"
|
||||
<< " cannot be converted to enum of type"
|
||||
<< " Detector_power_state::eDetector_power_state";
|
||||
throw std::invalid_argument(ss.str());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Detector_power_state::eDetector_power_state Detector_power_state::getValue() const
|
||||
{
|
||||
return m_value;
|
||||
}
|
||||
void Detector_power_state::setValue(Detector_power_state::eDetector_power_state value)
|
||||
{
|
||||
m_value = value;
|
||||
}
|
||||
|
||||
} // namespace org::openapitools::server::model
|
||||
|
||||
80
broker/gen/model/Detector_power_state.h
Normal file
80
broker/gen/model/Detector_power_state.h
Normal file
@@ -0,0 +1,80 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
/*
|
||||
* Detector_power_state.h
|
||||
*
|
||||
* Power on of ASICs
|
||||
*/
|
||||
|
||||
#ifndef Detector_power_state_H_
|
||||
#define Detector_power_state_H_
|
||||
|
||||
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
namespace org::openapitools::server::model
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Power on of ASICs
|
||||
/// </summary>
|
||||
class Detector_power_state
|
||||
{
|
||||
public:
|
||||
Detector_power_state();
|
||||
virtual ~Detector_power_state() = default;
|
||||
|
||||
enum class eDetector_power_state {
|
||||
// To have a valid default value.
|
||||
// Avoiding name clashes with user defined
|
||||
// enum values
|
||||
INVALID_VALUE_OPENAPI_GENERATED = 0,
|
||||
POWERON,
|
||||
POWEROFF,
|
||||
PARTIAL
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Validate the current data in the model. Throws a ValidationException on failure.
|
||||
/// </summary>
|
||||
void validate() const;
|
||||
|
||||
/// <summary>
|
||||
/// Validate the current data in the model. Returns false on error and writes an error
|
||||
/// message into the given stringstream.
|
||||
/// </summary>
|
||||
bool validate(std::stringstream& msg) const;
|
||||
|
||||
/// <summary>
|
||||
/// Helper overload for validate. Used when one model stores another model and calls it's validate.
|
||||
/// Not meant to be called outside that case.
|
||||
/// </summary>
|
||||
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
|
||||
|
||||
bool operator==(const Detector_power_state& rhs) const;
|
||||
bool operator!=(const Detector_power_state& rhs) const;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// Detector_power_state members
|
||||
|
||||
Detector_power_state::eDetector_power_state getValue() const;
|
||||
void setValue(Detector_power_state::eDetector_power_state value);
|
||||
|
||||
friend void to_json(nlohmann::json& j, const Detector_power_state& o);
|
||||
friend void from_json(const nlohmann::json& j, Detector_power_state& o);
|
||||
protected:
|
||||
Detector_power_state::eDetector_power_state m_value = Detector_power_state::eDetector_power_state::INVALID_VALUE_OPENAPI_GENERATED;
|
||||
};
|
||||
|
||||
} // namespace org::openapitools::server::model
|
||||
|
||||
#endif /* Detector_power_state_H_ */
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -24,21 +24,33 @@ Detector_settings::Detector_settings()
|
||||
m_Frame_time_us = 0L;
|
||||
m_Count_time_us = 0L;
|
||||
m_Count_time_usIsSet = false;
|
||||
m_Storage_cell_count = 1L;
|
||||
m_Internal_frame_generator = false;
|
||||
m_Internal_frame_generatorIsSet = false;
|
||||
m_Internal_frame_generator_images = 1L;
|
||||
m_Pedestal_g0_frames = 2000L;
|
||||
m_Pedestal_g1_frames = 300L;
|
||||
m_Pedestal_g2_frames = 300L;
|
||||
m_Pedestal_g0_rms_limit = 100L;
|
||||
m_Pedestal_min_image_count = 128L;
|
||||
m_Storage_cell_delay_ns = 5000L;
|
||||
m_Internal_frame_generator_imagesIsSet = false;
|
||||
m_Detector_trigger_delay_ns = 0L;
|
||||
m_Detector_trigger_delay_nsIsSet = false;
|
||||
m_Fixed_gain_g1 = false;
|
||||
m_Fixed_gain_g1IsSet = false;
|
||||
m_Use_gain_hg0 = false;
|
||||
m_Use_gain_hg0IsSet = false;
|
||||
m_TimingIsSet = false;
|
||||
m_Eiger_threshold_keV = 0.0f;
|
||||
m_Eiger_threshold_keVIsSet = false;
|
||||
m_Jungfrau_pedestal_g0_frames = 2000L;
|
||||
m_Jungfrau_pedestal_g0_framesIsSet = false;
|
||||
m_Jungfrau_pedestal_g1_frames = 300L;
|
||||
m_Jungfrau_pedestal_g1_framesIsSet = false;
|
||||
m_Jungfrau_pedestal_g2_frames = 300L;
|
||||
m_Jungfrau_pedestal_g2_framesIsSet = false;
|
||||
m_Jungfrau_pedestal_g0_rms_limit = 100L;
|
||||
m_Jungfrau_pedestal_g0_rms_limitIsSet = false;
|
||||
m_Jungfrau_pedestal_min_image_count = 128L;
|
||||
m_Jungfrau_pedestal_min_image_countIsSet = false;
|
||||
m_Jungfrau_storage_cell_count = 1L;
|
||||
m_Jungfrau_storage_cell_countIsSet = false;
|
||||
m_Jungfrau_storage_cell_delay_ns = 5000L;
|
||||
m_Jungfrau_storage_cell_delay_nsIsSet = false;
|
||||
m_Jungfrau_fixed_gain_g1 = false;
|
||||
m_Jungfrau_fixed_gain_g1IsSet = false;
|
||||
m_Jungfrau_use_gain_hg0 = false;
|
||||
m_Jungfrau_use_gain_hg0IsSet = false;
|
||||
|
||||
}
|
||||
|
||||
@@ -75,28 +87,9 @@ bool Detector_settings::validate(std::stringstream& msg, const std::string& path
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* Storage_cell_count */ {
|
||||
const int64_t& value = m_Storage_cell_count;
|
||||
const std::string currentValuePath = _pathPrefix + ".storageCellCount";
|
||||
|
||||
|
||||
if (value < 1ll)
|
||||
{
|
||||
success = false;
|
||||
msg << currentValuePath << ": must be greater than or equal to 1;";
|
||||
}
|
||||
if (value > 16ll)
|
||||
{
|
||||
success = false;
|
||||
msg << currentValuePath << ": must be less than or equal to 16;";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* Internal_frame_generator_images */ {
|
||||
|
||||
if (internalFrameGeneratorImagesIsSet())
|
||||
{
|
||||
const int64_t& value = m_Internal_frame_generator_images;
|
||||
const std::string currentValuePath = _pathPrefix + ".internalFrameGeneratorImages";
|
||||
|
||||
@@ -114,90 +107,6 @@ bool Detector_settings::validate(std::stringstream& msg, const std::string& path
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* Pedestal_g0_frames */ {
|
||||
const int64_t& value = m_Pedestal_g0_frames;
|
||||
const std::string currentValuePath = _pathPrefix + ".pedestalG0Frames";
|
||||
|
||||
|
||||
if (value < 0ll)
|
||||
{
|
||||
success = false;
|
||||
msg << currentValuePath << ": must be greater than or equal to 0;";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* Pedestal_g1_frames */ {
|
||||
const int64_t& value = m_Pedestal_g1_frames;
|
||||
const std::string currentValuePath = _pathPrefix + ".pedestalG1Frames";
|
||||
|
||||
|
||||
if (value < 0ll)
|
||||
{
|
||||
success = false;
|
||||
msg << currentValuePath << ": must be greater than or equal to 0;";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* Pedestal_g2_frames */ {
|
||||
const int64_t& value = m_Pedestal_g2_frames;
|
||||
const std::string currentValuePath = _pathPrefix + ".pedestalG2Frames";
|
||||
|
||||
|
||||
if (value < 0ll)
|
||||
{
|
||||
success = false;
|
||||
msg << currentValuePath << ": must be greater than or equal to 0;";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* Pedestal_g0_rms_limit */ {
|
||||
const int64_t& value = m_Pedestal_g0_rms_limit;
|
||||
const std::string currentValuePath = _pathPrefix + ".pedestalG0RmsLimit";
|
||||
|
||||
|
||||
if (value < 0ll)
|
||||
{
|
||||
success = false;
|
||||
msg << currentValuePath << ": must be greater than or equal to 0;";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* Pedestal_min_image_count */ {
|
||||
const int64_t& value = m_Pedestal_min_image_count;
|
||||
const std::string currentValuePath = _pathPrefix + ".pedestalMinImageCount";
|
||||
|
||||
|
||||
if (value < 32ll)
|
||||
{
|
||||
success = false;
|
||||
msg << currentValuePath << ": must be greater than or equal to 32;";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* Storage_cell_delay_ns */ {
|
||||
const int64_t& value = m_Storage_cell_delay_ns;
|
||||
const std::string currentValuePath = _pathPrefix + ".storageCellDelayNs";
|
||||
|
||||
|
||||
if (value < 2100ll)
|
||||
{
|
||||
success = false;
|
||||
msg << currentValuePath << ": must be greater than or equal to 2100;";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (detectorTriggerDelayNsIsSet())
|
||||
{
|
||||
const int64_t& value = m_Detector_trigger_delay_ns;
|
||||
@@ -211,6 +120,128 @@ bool Detector_settings::validate(std::stringstream& msg, const std::string& path
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (eigerThresholdKeVIsSet())
|
||||
{
|
||||
const float& value = m_Eiger_threshold_keV;
|
||||
const std::string currentValuePath = _pathPrefix + ".eigerThresholdKeV";
|
||||
|
||||
|
||||
if (value < static_cast<float>(1.0))
|
||||
{
|
||||
success = false;
|
||||
msg << currentValuePath << ": must be greater than or equal to 1.0;";
|
||||
}
|
||||
if (value > static_cast<float>(100.0))
|
||||
{
|
||||
success = false;
|
||||
msg << currentValuePath << ": must be less than or equal to 100.0;";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (jungfrauPedestalG0FramesIsSet())
|
||||
{
|
||||
const int64_t& value = m_Jungfrau_pedestal_g0_frames;
|
||||
const std::string currentValuePath = _pathPrefix + ".jungfrauPedestalG0Frames";
|
||||
|
||||
|
||||
if (value < 0ll)
|
||||
{
|
||||
success = false;
|
||||
msg << currentValuePath << ": must be greater than or equal to 0;";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (jungfrauPedestalG1FramesIsSet())
|
||||
{
|
||||
const int64_t& value = m_Jungfrau_pedestal_g1_frames;
|
||||
const std::string currentValuePath = _pathPrefix + ".jungfrauPedestalG1Frames";
|
||||
|
||||
|
||||
if (value < 0ll)
|
||||
{
|
||||
success = false;
|
||||
msg << currentValuePath << ": must be greater than or equal to 0;";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (jungfrauPedestalG2FramesIsSet())
|
||||
{
|
||||
const int64_t& value = m_Jungfrau_pedestal_g2_frames;
|
||||
const std::string currentValuePath = _pathPrefix + ".jungfrauPedestalG2Frames";
|
||||
|
||||
|
||||
if (value < 0ll)
|
||||
{
|
||||
success = false;
|
||||
msg << currentValuePath << ": must be greater than or equal to 0;";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (jungfrauPedestalG0RmsLimitIsSet())
|
||||
{
|
||||
const int64_t& value = m_Jungfrau_pedestal_g0_rms_limit;
|
||||
const std::string currentValuePath = _pathPrefix + ".jungfrauPedestalG0RmsLimit";
|
||||
|
||||
|
||||
if (value < 0ll)
|
||||
{
|
||||
success = false;
|
||||
msg << currentValuePath << ": must be greater than or equal to 0;";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (jungfrauPedestalMinImageCountIsSet())
|
||||
{
|
||||
const int64_t& value = m_Jungfrau_pedestal_min_image_count;
|
||||
const std::string currentValuePath = _pathPrefix + ".jungfrauPedestalMinImageCount";
|
||||
|
||||
|
||||
if (value < 32ll)
|
||||
{
|
||||
success = false;
|
||||
msg << currentValuePath << ": must be greater than or equal to 32;";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (jungfrauStorageCellCountIsSet())
|
||||
{
|
||||
const int64_t& value = m_Jungfrau_storage_cell_count;
|
||||
const std::string currentValuePath = _pathPrefix + ".jungfrauStorageCellCount";
|
||||
|
||||
|
||||
if (value < 1ll)
|
||||
{
|
||||
success = false;
|
||||
msg << currentValuePath << ": must be greater than or equal to 1;";
|
||||
}
|
||||
if (value > 16ll)
|
||||
{
|
||||
success = false;
|
||||
msg << currentValuePath << ": must be less than or equal to 16;";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (jungfrauStorageCellDelayNsIsSet())
|
||||
{
|
||||
const int64_t& value = m_Jungfrau_storage_cell_delay_ns;
|
||||
const std::string currentValuePath = _pathPrefix + ".jungfrauStorageCellDelayNs";
|
||||
|
||||
|
||||
if (value < 2100ll)
|
||||
{
|
||||
success = false;
|
||||
msg << currentValuePath << ": must be greater than or equal to 2100;";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
@@ -226,41 +257,47 @@ bool Detector_settings::operator==(const Detector_settings& rhs) const
|
||||
|
||||
((!countTimeUsIsSet() && !rhs.countTimeUsIsSet()) || (countTimeUsIsSet() && rhs.countTimeUsIsSet() && getCountTimeUs() == rhs.getCountTimeUs())) &&
|
||||
|
||||
(getStorageCellCount() == rhs.getStorageCellCount())
|
||||
&&
|
||||
|
||||
(isInternalFrameGenerator() == rhs.isInternalFrameGenerator())
|
||||
&&
|
||||
((!internalFrameGeneratorIsSet() && !rhs.internalFrameGeneratorIsSet()) || (internalFrameGeneratorIsSet() && rhs.internalFrameGeneratorIsSet() && isInternalFrameGenerator() == rhs.isInternalFrameGenerator())) &&
|
||||
|
||||
(getInternalFrameGeneratorImages() == rhs.getInternalFrameGeneratorImages())
|
||||
&&
|
||||
|
||||
(getPedestalG0Frames() == rhs.getPedestalG0Frames())
|
||||
&&
|
||||
|
||||
(getPedestalG1Frames() == rhs.getPedestalG1Frames())
|
||||
&&
|
||||
|
||||
(getPedestalG2Frames() == rhs.getPedestalG2Frames())
|
||||
&&
|
||||
|
||||
(getPedestalG0RmsLimit() == rhs.getPedestalG0RmsLimit())
|
||||
&&
|
||||
|
||||
(getPedestalMinImageCount() == rhs.getPedestalMinImageCount())
|
||||
&&
|
||||
|
||||
(getStorageCellDelayNs() == rhs.getStorageCellDelayNs())
|
||||
&&
|
||||
((!internalFrameGeneratorImagesIsSet() && !rhs.internalFrameGeneratorImagesIsSet()) || (internalFrameGeneratorImagesIsSet() && rhs.internalFrameGeneratorImagesIsSet() && getInternalFrameGeneratorImages() == rhs.getInternalFrameGeneratorImages())) &&
|
||||
|
||||
|
||||
((!detectorTriggerDelayNsIsSet() && !rhs.detectorTriggerDelayNsIsSet()) || (detectorTriggerDelayNsIsSet() && rhs.detectorTriggerDelayNsIsSet() && getDetectorTriggerDelayNs() == rhs.getDetectorTriggerDelayNs())) &&
|
||||
|
||||
|
||||
((!fixedGainG1IsSet() && !rhs.fixedGainG1IsSet()) || (fixedGainG1IsSet() && rhs.fixedGainG1IsSet() && isFixedGainG1() == rhs.isFixedGainG1())) &&
|
||||
((!timingIsSet() && !rhs.timingIsSet()) || (timingIsSet() && rhs.timingIsSet() && getTiming() == rhs.getTiming())) &&
|
||||
|
||||
|
||||
((!useGainHg0IsSet() && !rhs.useGainHg0IsSet()) || (useGainHg0IsSet() && rhs.useGainHg0IsSet() && isUseGainHg0() == rhs.isUseGainHg0()))
|
||||
((!eigerThresholdKeVIsSet() && !rhs.eigerThresholdKeVIsSet()) || (eigerThresholdKeVIsSet() && rhs.eigerThresholdKeVIsSet() && getEigerThresholdKeV() == rhs.getEigerThresholdKeV())) &&
|
||||
|
||||
|
||||
((!jungfrauPedestalG0FramesIsSet() && !rhs.jungfrauPedestalG0FramesIsSet()) || (jungfrauPedestalG0FramesIsSet() && rhs.jungfrauPedestalG0FramesIsSet() && getJungfrauPedestalG0Frames() == rhs.getJungfrauPedestalG0Frames())) &&
|
||||
|
||||
|
||||
((!jungfrauPedestalG1FramesIsSet() && !rhs.jungfrauPedestalG1FramesIsSet()) || (jungfrauPedestalG1FramesIsSet() && rhs.jungfrauPedestalG1FramesIsSet() && getJungfrauPedestalG1Frames() == rhs.getJungfrauPedestalG1Frames())) &&
|
||||
|
||||
|
||||
((!jungfrauPedestalG2FramesIsSet() && !rhs.jungfrauPedestalG2FramesIsSet()) || (jungfrauPedestalG2FramesIsSet() && rhs.jungfrauPedestalG2FramesIsSet() && getJungfrauPedestalG2Frames() == rhs.getJungfrauPedestalG2Frames())) &&
|
||||
|
||||
|
||||
((!jungfrauPedestalG0RmsLimitIsSet() && !rhs.jungfrauPedestalG0RmsLimitIsSet()) || (jungfrauPedestalG0RmsLimitIsSet() && rhs.jungfrauPedestalG0RmsLimitIsSet() && getJungfrauPedestalG0RmsLimit() == rhs.getJungfrauPedestalG0RmsLimit())) &&
|
||||
|
||||
|
||||
((!jungfrauPedestalMinImageCountIsSet() && !rhs.jungfrauPedestalMinImageCountIsSet()) || (jungfrauPedestalMinImageCountIsSet() && rhs.jungfrauPedestalMinImageCountIsSet() && getJungfrauPedestalMinImageCount() == rhs.getJungfrauPedestalMinImageCount())) &&
|
||||
|
||||
|
||||
((!jungfrauStorageCellCountIsSet() && !rhs.jungfrauStorageCellCountIsSet()) || (jungfrauStorageCellCountIsSet() && rhs.jungfrauStorageCellCountIsSet() && getJungfrauStorageCellCount() == rhs.getJungfrauStorageCellCount())) &&
|
||||
|
||||
|
||||
((!jungfrauStorageCellDelayNsIsSet() && !rhs.jungfrauStorageCellDelayNsIsSet()) || (jungfrauStorageCellDelayNsIsSet() && rhs.jungfrauStorageCellDelayNsIsSet() && getJungfrauStorageCellDelayNs() == rhs.getJungfrauStorageCellDelayNs())) &&
|
||||
|
||||
|
||||
((!jungfrauFixedGainG1IsSet() && !rhs.jungfrauFixedGainG1IsSet()) || (jungfrauFixedGainG1IsSet() && rhs.jungfrauFixedGainG1IsSet() && isJungfrauFixedGainG1() == rhs.isJungfrauFixedGainG1())) &&
|
||||
|
||||
|
||||
((!jungfrauUseGainHg0IsSet() && !rhs.jungfrauUseGainHg0IsSet()) || (jungfrauUseGainHg0IsSet() && rhs.jungfrauUseGainHg0IsSet() && isJungfrauUseGainHg0() == rhs.isJungfrauUseGainHg0()))
|
||||
|
||||
;
|
||||
}
|
||||
@@ -276,21 +313,34 @@ void to_json(nlohmann::json& j, const Detector_settings& o)
|
||||
j["frame_time_us"] = o.m_Frame_time_us;
|
||||
if(o.countTimeUsIsSet())
|
||||
j["count_time_us"] = o.m_Count_time_us;
|
||||
j["storage_cell_count"] = o.m_Storage_cell_count;
|
||||
j["internal_frame_generator"] = o.m_Internal_frame_generator;
|
||||
j["internal_frame_generator_images"] = o.m_Internal_frame_generator_images;
|
||||
j["pedestal_g0_frames"] = o.m_Pedestal_g0_frames;
|
||||
j["pedestal_g1_frames"] = o.m_Pedestal_g1_frames;
|
||||
j["pedestal_g2_frames"] = o.m_Pedestal_g2_frames;
|
||||
j["pedestal_g0_rms_limit"] = o.m_Pedestal_g0_rms_limit;
|
||||
j["pedestal_min_image_count"] = o.m_Pedestal_min_image_count;
|
||||
j["storage_cell_delay_ns"] = o.m_Storage_cell_delay_ns;
|
||||
if(o.internalFrameGeneratorIsSet())
|
||||
j["internal_frame_generator"] = o.m_Internal_frame_generator;
|
||||
if(o.internalFrameGeneratorImagesIsSet())
|
||||
j["internal_frame_generator_images"] = o.m_Internal_frame_generator_images;
|
||||
if(o.detectorTriggerDelayNsIsSet())
|
||||
j["detector_trigger_delay_ns"] = o.m_Detector_trigger_delay_ns;
|
||||
if(o.fixedGainG1IsSet())
|
||||
j["fixed_gain_g1"] = o.m_Fixed_gain_g1;
|
||||
if(o.useGainHg0IsSet())
|
||||
j["use_gain_hg0"] = o.m_Use_gain_hg0;
|
||||
if(o.timingIsSet())
|
||||
j["timing"] = o.m_Timing;
|
||||
if(o.eigerThresholdKeVIsSet())
|
||||
j["eiger_threshold_keV"] = o.m_Eiger_threshold_keV;
|
||||
if(o.jungfrauPedestalG0FramesIsSet())
|
||||
j["jungfrau_pedestal_g0_frames"] = o.m_Jungfrau_pedestal_g0_frames;
|
||||
if(o.jungfrauPedestalG1FramesIsSet())
|
||||
j["jungfrau_pedestal_g1_frames"] = o.m_Jungfrau_pedestal_g1_frames;
|
||||
if(o.jungfrauPedestalG2FramesIsSet())
|
||||
j["jungfrau_pedestal_g2_frames"] = o.m_Jungfrau_pedestal_g2_frames;
|
||||
if(o.jungfrauPedestalG0RmsLimitIsSet())
|
||||
j["jungfrau_pedestal_g0_rms_limit"] = o.m_Jungfrau_pedestal_g0_rms_limit;
|
||||
if(o.jungfrauPedestalMinImageCountIsSet())
|
||||
j["jungfrau_pedestal_min_image_count"] = o.m_Jungfrau_pedestal_min_image_count;
|
||||
if(o.jungfrauStorageCellCountIsSet())
|
||||
j["jungfrau_storage_cell_count"] = o.m_Jungfrau_storage_cell_count;
|
||||
if(o.jungfrauStorageCellDelayNsIsSet())
|
||||
j["jungfrau_storage_cell_delay_ns"] = o.m_Jungfrau_storage_cell_delay_ns;
|
||||
if(o.jungfrauFixedGainG1IsSet())
|
||||
j["jungfrau_fixed_gain_g1"] = o.m_Jungfrau_fixed_gain_g1;
|
||||
if(o.jungfrauUseGainHg0IsSet())
|
||||
j["jungfrau_use_gain_hg0"] = o.m_Jungfrau_use_gain_hg0;
|
||||
|
||||
}
|
||||
|
||||
@@ -302,29 +352,75 @@ void from_json(const nlohmann::json& j, Detector_settings& o)
|
||||
j.at("count_time_us").get_to(o.m_Count_time_us);
|
||||
o.m_Count_time_usIsSet = true;
|
||||
}
|
||||
j.at("storage_cell_count").get_to(o.m_Storage_cell_count);
|
||||
j.at("internal_frame_generator").get_to(o.m_Internal_frame_generator);
|
||||
j.at("internal_frame_generator_images").get_to(o.m_Internal_frame_generator_images);
|
||||
j.at("pedestal_g0_frames").get_to(o.m_Pedestal_g0_frames);
|
||||
j.at("pedestal_g1_frames").get_to(o.m_Pedestal_g1_frames);
|
||||
j.at("pedestal_g2_frames").get_to(o.m_Pedestal_g2_frames);
|
||||
j.at("pedestal_g0_rms_limit").get_to(o.m_Pedestal_g0_rms_limit);
|
||||
j.at("pedestal_min_image_count").get_to(o.m_Pedestal_min_image_count);
|
||||
j.at("storage_cell_delay_ns").get_to(o.m_Storage_cell_delay_ns);
|
||||
if(j.find("internal_frame_generator") != j.end())
|
||||
{
|
||||
j.at("internal_frame_generator").get_to(o.m_Internal_frame_generator);
|
||||
o.m_Internal_frame_generatorIsSet = true;
|
||||
}
|
||||
if(j.find("internal_frame_generator_images") != j.end())
|
||||
{
|
||||
j.at("internal_frame_generator_images").get_to(o.m_Internal_frame_generator_images);
|
||||
o.m_Internal_frame_generator_imagesIsSet = true;
|
||||
}
|
||||
if(j.find("detector_trigger_delay_ns") != j.end())
|
||||
{
|
||||
j.at("detector_trigger_delay_ns").get_to(o.m_Detector_trigger_delay_ns);
|
||||
o.m_Detector_trigger_delay_nsIsSet = true;
|
||||
}
|
||||
if(j.find("fixed_gain_g1") != j.end())
|
||||
if(j.find("timing") != j.end())
|
||||
{
|
||||
j.at("fixed_gain_g1").get_to(o.m_Fixed_gain_g1);
|
||||
o.m_Fixed_gain_g1IsSet = true;
|
||||
j.at("timing").get_to(o.m_Timing);
|
||||
o.m_TimingIsSet = true;
|
||||
}
|
||||
if(j.find("use_gain_hg0") != j.end())
|
||||
if(j.find("eiger_threshold_keV") != j.end())
|
||||
{
|
||||
j.at("use_gain_hg0").get_to(o.m_Use_gain_hg0);
|
||||
o.m_Use_gain_hg0IsSet = true;
|
||||
j.at("eiger_threshold_keV").get_to(o.m_Eiger_threshold_keV);
|
||||
o.m_Eiger_threshold_keVIsSet = true;
|
||||
}
|
||||
if(j.find("jungfrau_pedestal_g0_frames") != j.end())
|
||||
{
|
||||
j.at("jungfrau_pedestal_g0_frames").get_to(o.m_Jungfrau_pedestal_g0_frames);
|
||||
o.m_Jungfrau_pedestal_g0_framesIsSet = true;
|
||||
}
|
||||
if(j.find("jungfrau_pedestal_g1_frames") != j.end())
|
||||
{
|
||||
j.at("jungfrau_pedestal_g1_frames").get_to(o.m_Jungfrau_pedestal_g1_frames);
|
||||
o.m_Jungfrau_pedestal_g1_framesIsSet = true;
|
||||
}
|
||||
if(j.find("jungfrau_pedestal_g2_frames") != j.end())
|
||||
{
|
||||
j.at("jungfrau_pedestal_g2_frames").get_to(o.m_Jungfrau_pedestal_g2_frames);
|
||||
o.m_Jungfrau_pedestal_g2_framesIsSet = true;
|
||||
}
|
||||
if(j.find("jungfrau_pedestal_g0_rms_limit") != j.end())
|
||||
{
|
||||
j.at("jungfrau_pedestal_g0_rms_limit").get_to(o.m_Jungfrau_pedestal_g0_rms_limit);
|
||||
o.m_Jungfrau_pedestal_g0_rms_limitIsSet = true;
|
||||
}
|
||||
if(j.find("jungfrau_pedestal_min_image_count") != j.end())
|
||||
{
|
||||
j.at("jungfrau_pedestal_min_image_count").get_to(o.m_Jungfrau_pedestal_min_image_count);
|
||||
o.m_Jungfrau_pedestal_min_image_countIsSet = true;
|
||||
}
|
||||
if(j.find("jungfrau_storage_cell_count") != j.end())
|
||||
{
|
||||
j.at("jungfrau_storage_cell_count").get_to(o.m_Jungfrau_storage_cell_count);
|
||||
o.m_Jungfrau_storage_cell_countIsSet = true;
|
||||
}
|
||||
if(j.find("jungfrau_storage_cell_delay_ns") != j.end())
|
||||
{
|
||||
j.at("jungfrau_storage_cell_delay_ns").get_to(o.m_Jungfrau_storage_cell_delay_ns);
|
||||
o.m_Jungfrau_storage_cell_delay_nsIsSet = true;
|
||||
}
|
||||
if(j.find("jungfrau_fixed_gain_g1") != j.end())
|
||||
{
|
||||
j.at("jungfrau_fixed_gain_g1").get_to(o.m_Jungfrau_fixed_gain_g1);
|
||||
o.m_Jungfrau_fixed_gain_g1IsSet = true;
|
||||
}
|
||||
if(j.find("jungfrau_use_gain_hg0") != j.end())
|
||||
{
|
||||
j.at("jungfrau_use_gain_hg0").get_to(o.m_Jungfrau_use_gain_hg0);
|
||||
o.m_Jungfrau_use_gain_hg0IsSet = true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -354,14 +450,6 @@ void Detector_settings::unsetCount_time_us()
|
||||
{
|
||||
m_Count_time_usIsSet = false;
|
||||
}
|
||||
int64_t Detector_settings::getStorageCellCount() const
|
||||
{
|
||||
return m_Storage_cell_count;
|
||||
}
|
||||
void Detector_settings::setStorageCellCount(int64_t const value)
|
||||
{
|
||||
m_Storage_cell_count = value;
|
||||
}
|
||||
bool Detector_settings::isInternalFrameGenerator() const
|
||||
{
|
||||
return m_Internal_frame_generator;
|
||||
@@ -369,6 +457,15 @@ bool Detector_settings::isInternalFrameGenerator() const
|
||||
void Detector_settings::setInternalFrameGenerator(bool const value)
|
||||
{
|
||||
m_Internal_frame_generator = value;
|
||||
m_Internal_frame_generatorIsSet = true;
|
||||
}
|
||||
bool Detector_settings::internalFrameGeneratorIsSet() const
|
||||
{
|
||||
return m_Internal_frame_generatorIsSet;
|
||||
}
|
||||
void Detector_settings::unsetInternal_frame_generator()
|
||||
{
|
||||
m_Internal_frame_generatorIsSet = false;
|
||||
}
|
||||
int64_t Detector_settings::getInternalFrameGeneratorImages() const
|
||||
{
|
||||
@@ -377,54 +474,15 @@ int64_t Detector_settings::getInternalFrameGeneratorImages() const
|
||||
void Detector_settings::setInternalFrameGeneratorImages(int64_t const value)
|
||||
{
|
||||
m_Internal_frame_generator_images = value;
|
||||
m_Internal_frame_generator_imagesIsSet = true;
|
||||
}
|
||||
int64_t Detector_settings::getPedestalG0Frames() const
|
||||
bool Detector_settings::internalFrameGeneratorImagesIsSet() const
|
||||
{
|
||||
return m_Pedestal_g0_frames;
|
||||
return m_Internal_frame_generator_imagesIsSet;
|
||||
}
|
||||
void Detector_settings::setPedestalG0Frames(int64_t const value)
|
||||
void Detector_settings::unsetInternal_frame_generator_images()
|
||||
{
|
||||
m_Pedestal_g0_frames = value;
|
||||
}
|
||||
int64_t Detector_settings::getPedestalG1Frames() const
|
||||
{
|
||||
return m_Pedestal_g1_frames;
|
||||
}
|
||||
void Detector_settings::setPedestalG1Frames(int64_t const value)
|
||||
{
|
||||
m_Pedestal_g1_frames = value;
|
||||
}
|
||||
int64_t Detector_settings::getPedestalG2Frames() const
|
||||
{
|
||||
return m_Pedestal_g2_frames;
|
||||
}
|
||||
void Detector_settings::setPedestalG2Frames(int64_t const value)
|
||||
{
|
||||
m_Pedestal_g2_frames = value;
|
||||
}
|
||||
int64_t Detector_settings::getPedestalG0RmsLimit() const
|
||||
{
|
||||
return m_Pedestal_g0_rms_limit;
|
||||
}
|
||||
void Detector_settings::setPedestalG0RmsLimit(int64_t const value)
|
||||
{
|
||||
m_Pedestal_g0_rms_limit = value;
|
||||
}
|
||||
int64_t Detector_settings::getPedestalMinImageCount() const
|
||||
{
|
||||
return m_Pedestal_min_image_count;
|
||||
}
|
||||
void Detector_settings::setPedestalMinImageCount(int64_t const value)
|
||||
{
|
||||
m_Pedestal_min_image_count = value;
|
||||
}
|
||||
int64_t Detector_settings::getStorageCellDelayNs() const
|
||||
{
|
||||
return m_Storage_cell_delay_ns;
|
||||
}
|
||||
void Detector_settings::setStorageCellDelayNs(int64_t const value)
|
||||
{
|
||||
m_Storage_cell_delay_ns = value;
|
||||
m_Internal_frame_generator_imagesIsSet = false;
|
||||
}
|
||||
int64_t Detector_settings::getDetectorTriggerDelayNs() const
|
||||
{
|
||||
@@ -443,39 +501,192 @@ void Detector_settings::unsetDetector_trigger_delay_ns()
|
||||
{
|
||||
m_Detector_trigger_delay_nsIsSet = false;
|
||||
}
|
||||
bool Detector_settings::isFixedGainG1() const
|
||||
org::openapitools::server::model::Detector_timing Detector_settings::getTiming() const
|
||||
{
|
||||
return m_Fixed_gain_g1;
|
||||
return m_Timing;
|
||||
}
|
||||
void Detector_settings::setFixedGainG1(bool const value)
|
||||
void Detector_settings::setTiming(org::openapitools::server::model::Detector_timing const& value)
|
||||
{
|
||||
m_Fixed_gain_g1 = value;
|
||||
m_Fixed_gain_g1IsSet = true;
|
||||
m_Timing = value;
|
||||
m_TimingIsSet = true;
|
||||
}
|
||||
bool Detector_settings::fixedGainG1IsSet() const
|
||||
bool Detector_settings::timingIsSet() const
|
||||
{
|
||||
return m_Fixed_gain_g1IsSet;
|
||||
return m_TimingIsSet;
|
||||
}
|
||||
void Detector_settings::unsetFixed_gain_g1()
|
||||
void Detector_settings::unsetTiming()
|
||||
{
|
||||
m_Fixed_gain_g1IsSet = false;
|
||||
m_TimingIsSet = false;
|
||||
}
|
||||
bool Detector_settings::isUseGainHg0() const
|
||||
float Detector_settings::getEigerThresholdKeV() const
|
||||
{
|
||||
return m_Use_gain_hg0;
|
||||
return m_Eiger_threshold_keV;
|
||||
}
|
||||
void Detector_settings::setUseGainHg0(bool const value)
|
||||
void Detector_settings::setEigerThresholdKeV(float const value)
|
||||
{
|
||||
m_Use_gain_hg0 = value;
|
||||
m_Use_gain_hg0IsSet = true;
|
||||
m_Eiger_threshold_keV = value;
|
||||
m_Eiger_threshold_keVIsSet = true;
|
||||
}
|
||||
bool Detector_settings::useGainHg0IsSet() const
|
||||
bool Detector_settings::eigerThresholdKeVIsSet() const
|
||||
{
|
||||
return m_Use_gain_hg0IsSet;
|
||||
return m_Eiger_threshold_keVIsSet;
|
||||
}
|
||||
void Detector_settings::unsetUse_gain_hg0()
|
||||
void Detector_settings::unsetEiger_threshold_keV()
|
||||
{
|
||||
m_Use_gain_hg0IsSet = false;
|
||||
m_Eiger_threshold_keVIsSet = false;
|
||||
}
|
||||
int64_t Detector_settings::getJungfrauPedestalG0Frames() const
|
||||
{
|
||||
return m_Jungfrau_pedestal_g0_frames;
|
||||
}
|
||||
void Detector_settings::setJungfrauPedestalG0Frames(int64_t const value)
|
||||
{
|
||||
m_Jungfrau_pedestal_g0_frames = value;
|
||||
m_Jungfrau_pedestal_g0_framesIsSet = true;
|
||||
}
|
||||
bool Detector_settings::jungfrauPedestalG0FramesIsSet() const
|
||||
{
|
||||
return m_Jungfrau_pedestal_g0_framesIsSet;
|
||||
}
|
||||
void Detector_settings::unsetJungfrau_pedestal_g0_frames()
|
||||
{
|
||||
m_Jungfrau_pedestal_g0_framesIsSet = false;
|
||||
}
|
||||
int64_t Detector_settings::getJungfrauPedestalG1Frames() const
|
||||
{
|
||||
return m_Jungfrau_pedestal_g1_frames;
|
||||
}
|
||||
void Detector_settings::setJungfrauPedestalG1Frames(int64_t const value)
|
||||
{
|
||||
m_Jungfrau_pedestal_g1_frames = value;
|
||||
m_Jungfrau_pedestal_g1_framesIsSet = true;
|
||||
}
|
||||
bool Detector_settings::jungfrauPedestalG1FramesIsSet() const
|
||||
{
|
||||
return m_Jungfrau_pedestal_g1_framesIsSet;
|
||||
}
|
||||
void Detector_settings::unsetJungfrau_pedestal_g1_frames()
|
||||
{
|
||||
m_Jungfrau_pedestal_g1_framesIsSet = false;
|
||||
}
|
||||
int64_t Detector_settings::getJungfrauPedestalG2Frames() const
|
||||
{
|
||||
return m_Jungfrau_pedestal_g2_frames;
|
||||
}
|
||||
void Detector_settings::setJungfrauPedestalG2Frames(int64_t const value)
|
||||
{
|
||||
m_Jungfrau_pedestal_g2_frames = value;
|
||||
m_Jungfrau_pedestal_g2_framesIsSet = true;
|
||||
}
|
||||
bool Detector_settings::jungfrauPedestalG2FramesIsSet() const
|
||||
{
|
||||
return m_Jungfrau_pedestal_g2_framesIsSet;
|
||||
}
|
||||
void Detector_settings::unsetJungfrau_pedestal_g2_frames()
|
||||
{
|
||||
m_Jungfrau_pedestal_g2_framesIsSet = false;
|
||||
}
|
||||
int64_t Detector_settings::getJungfrauPedestalG0RmsLimit() const
|
||||
{
|
||||
return m_Jungfrau_pedestal_g0_rms_limit;
|
||||
}
|
||||
void Detector_settings::setJungfrauPedestalG0RmsLimit(int64_t const value)
|
||||
{
|
||||
m_Jungfrau_pedestal_g0_rms_limit = value;
|
||||
m_Jungfrau_pedestal_g0_rms_limitIsSet = true;
|
||||
}
|
||||
bool Detector_settings::jungfrauPedestalG0RmsLimitIsSet() const
|
||||
{
|
||||
return m_Jungfrau_pedestal_g0_rms_limitIsSet;
|
||||
}
|
||||
void Detector_settings::unsetJungfrau_pedestal_g0_rms_limit()
|
||||
{
|
||||
m_Jungfrau_pedestal_g0_rms_limitIsSet = false;
|
||||
}
|
||||
int64_t Detector_settings::getJungfrauPedestalMinImageCount() const
|
||||
{
|
||||
return m_Jungfrau_pedestal_min_image_count;
|
||||
}
|
||||
void Detector_settings::setJungfrauPedestalMinImageCount(int64_t const value)
|
||||
{
|
||||
m_Jungfrau_pedestal_min_image_count = value;
|
||||
m_Jungfrau_pedestal_min_image_countIsSet = true;
|
||||
}
|
||||
bool Detector_settings::jungfrauPedestalMinImageCountIsSet() const
|
||||
{
|
||||
return m_Jungfrau_pedestal_min_image_countIsSet;
|
||||
}
|
||||
void Detector_settings::unsetJungfrau_pedestal_min_image_count()
|
||||
{
|
||||
m_Jungfrau_pedestal_min_image_countIsSet = false;
|
||||
}
|
||||
int64_t Detector_settings::getJungfrauStorageCellCount() const
|
||||
{
|
||||
return m_Jungfrau_storage_cell_count;
|
||||
}
|
||||
void Detector_settings::setJungfrauStorageCellCount(int64_t const value)
|
||||
{
|
||||
m_Jungfrau_storage_cell_count = value;
|
||||
m_Jungfrau_storage_cell_countIsSet = true;
|
||||
}
|
||||
bool Detector_settings::jungfrauStorageCellCountIsSet() const
|
||||
{
|
||||
return m_Jungfrau_storage_cell_countIsSet;
|
||||
}
|
||||
void Detector_settings::unsetJungfrau_storage_cell_count()
|
||||
{
|
||||
m_Jungfrau_storage_cell_countIsSet = false;
|
||||
}
|
||||
int64_t Detector_settings::getJungfrauStorageCellDelayNs() const
|
||||
{
|
||||
return m_Jungfrau_storage_cell_delay_ns;
|
||||
}
|
||||
void Detector_settings::setJungfrauStorageCellDelayNs(int64_t const value)
|
||||
{
|
||||
m_Jungfrau_storage_cell_delay_ns = value;
|
||||
m_Jungfrau_storage_cell_delay_nsIsSet = true;
|
||||
}
|
||||
bool Detector_settings::jungfrauStorageCellDelayNsIsSet() const
|
||||
{
|
||||
return m_Jungfrau_storage_cell_delay_nsIsSet;
|
||||
}
|
||||
void Detector_settings::unsetJungfrau_storage_cell_delay_ns()
|
||||
{
|
||||
m_Jungfrau_storage_cell_delay_nsIsSet = false;
|
||||
}
|
||||
bool Detector_settings::isJungfrauFixedGainG1() const
|
||||
{
|
||||
return m_Jungfrau_fixed_gain_g1;
|
||||
}
|
||||
void Detector_settings::setJungfrauFixedGainG1(bool const value)
|
||||
{
|
||||
m_Jungfrau_fixed_gain_g1 = value;
|
||||
m_Jungfrau_fixed_gain_g1IsSet = true;
|
||||
}
|
||||
bool Detector_settings::jungfrauFixedGainG1IsSet() const
|
||||
{
|
||||
return m_Jungfrau_fixed_gain_g1IsSet;
|
||||
}
|
||||
void Detector_settings::unsetJungfrau_fixed_gain_g1()
|
||||
{
|
||||
m_Jungfrau_fixed_gain_g1IsSet = false;
|
||||
}
|
||||
bool Detector_settings::isJungfrauUseGainHg0() const
|
||||
{
|
||||
return m_Jungfrau_use_gain_hg0;
|
||||
}
|
||||
void Detector_settings::setJungfrauUseGainHg0(bool const value)
|
||||
{
|
||||
m_Jungfrau_use_gain_hg0 = value;
|
||||
m_Jungfrau_use_gain_hg0IsSet = true;
|
||||
}
|
||||
bool Detector_settings::jungfrauUseGainHg0IsSet() const
|
||||
{
|
||||
return m_Jungfrau_use_gain_hg0IsSet;
|
||||
}
|
||||
void Detector_settings::unsetJungfrau_use_gain_hg0()
|
||||
{
|
||||
m_Jungfrau_use_gain_hg0IsSet = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -19,6 +19,7 @@
|
||||
#define Detector_settings_H_
|
||||
|
||||
|
||||
#include "Detector_timing.h"
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
namespace org::openapitools::server::model
|
||||
@@ -70,50 +71,19 @@ public:
|
||||
bool countTimeUsIsSet() const;
|
||||
void unsetCount_time_us();
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
int64_t getStorageCellCount() const;
|
||||
void setStorageCellCount(int64_t const value);
|
||||
/// <summary>
|
||||
/// Use internal frame generator in FPGA instead of getting data from a real detector
|
||||
/// </summary>
|
||||
bool isInternalFrameGenerator() const;
|
||||
void setInternalFrameGenerator(bool const value);
|
||||
bool internalFrameGeneratorIsSet() const;
|
||||
void unsetInternal_frame_generator();
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
int64_t getInternalFrameGeneratorImages() const;
|
||||
void setInternalFrameGeneratorImages(int64_t const value);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
int64_t getPedestalG0Frames() const;
|
||||
void setPedestalG0Frames(int64_t const value);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
int64_t getPedestalG1Frames() const;
|
||||
void setPedestalG1Frames(int64_t const value);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
int64_t getPedestalG2Frames() const;
|
||||
void setPedestalG2Frames(int64_t const value);
|
||||
/// <summary>
|
||||
/// Pixels with pedestal G0 RMS above the threshold are marked as masked pixels
|
||||
/// </summary>
|
||||
int64_t getPedestalG0RmsLimit() const;
|
||||
void setPedestalG0RmsLimit(int64_t const value);
|
||||
/// <summary>
|
||||
/// Minimum number of collected images for pedestal to consider it viable
|
||||
/// </summary>
|
||||
int64_t getPedestalMinImageCount() const;
|
||||
void setPedestalMinImageCount(int64_t const value);
|
||||
/// <summary>
|
||||
/// Delay between two storage cells [ns]
|
||||
/// </summary>
|
||||
int64_t getStorageCellDelayNs() const;
|
||||
void setStorageCellDelayNs(int64_t const value);
|
||||
bool internalFrameGeneratorImagesIsSet() const;
|
||||
void unsetInternal_frame_generator_images();
|
||||
/// <summary>
|
||||
/// Delay between TTL trigger and acquisition start [ns]
|
||||
/// </summary>
|
||||
@@ -122,19 +92,82 @@ public:
|
||||
bool detectorTriggerDelayNsIsSet() const;
|
||||
void unsetDetector_trigger_delay_ns();
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
org::openapitools::server::model::Detector_timing getTiming() const;
|
||||
void setTiming(org::openapitools::server::model::Detector_timing const& value);
|
||||
bool timingIsSet() const;
|
||||
void unsetTiming();
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
float getEigerThresholdKeV() const;
|
||||
void setEigerThresholdKeV(float const value);
|
||||
bool eigerThresholdKeVIsSet() const;
|
||||
void unsetEiger_threshold_keV();
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
int64_t getJungfrauPedestalG0Frames() const;
|
||||
void setJungfrauPedestalG0Frames(int64_t const value);
|
||||
bool jungfrauPedestalG0FramesIsSet() const;
|
||||
void unsetJungfrau_pedestal_g0_frames();
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
int64_t getJungfrauPedestalG1Frames() const;
|
||||
void setJungfrauPedestalG1Frames(int64_t const value);
|
||||
bool jungfrauPedestalG1FramesIsSet() const;
|
||||
void unsetJungfrau_pedestal_g1_frames();
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
int64_t getJungfrauPedestalG2Frames() const;
|
||||
void setJungfrauPedestalG2Frames(int64_t const value);
|
||||
bool jungfrauPedestalG2FramesIsSet() const;
|
||||
void unsetJungfrau_pedestal_g2_frames();
|
||||
/// <summary>
|
||||
/// Pixels with pedestal G0 RMS above the threshold are marked as masked pixels
|
||||
/// </summary>
|
||||
int64_t getJungfrauPedestalG0RmsLimit() const;
|
||||
void setJungfrauPedestalG0RmsLimit(int64_t const value);
|
||||
bool jungfrauPedestalG0RmsLimitIsSet() const;
|
||||
void unsetJungfrau_pedestal_g0_rms_limit();
|
||||
/// <summary>
|
||||
/// Minimum number of collected images for pedestal to consider it viable
|
||||
/// </summary>
|
||||
int64_t getJungfrauPedestalMinImageCount() const;
|
||||
void setJungfrauPedestalMinImageCount(int64_t const value);
|
||||
bool jungfrauPedestalMinImageCountIsSet() const;
|
||||
void unsetJungfrau_pedestal_min_image_count();
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
int64_t getJungfrauStorageCellCount() const;
|
||||
void setJungfrauStorageCellCount(int64_t const value);
|
||||
bool jungfrauStorageCellCountIsSet() const;
|
||||
void unsetJungfrau_storage_cell_count();
|
||||
/// <summary>
|
||||
/// Delay between two storage cells [ns]
|
||||
/// </summary>
|
||||
int64_t getJungfrauStorageCellDelayNs() const;
|
||||
void setJungfrauStorageCellDelayNs(int64_t const value);
|
||||
bool jungfrauStorageCellDelayNsIsSet() const;
|
||||
void unsetJungfrau_storage_cell_delay_ns();
|
||||
/// <summary>
|
||||
/// Fix gain to G1 (can be useful for storage cells)
|
||||
/// </summary>
|
||||
bool isFixedGainG1() const;
|
||||
void setFixedGainG1(bool const value);
|
||||
bool fixedGainG1IsSet() const;
|
||||
void unsetFixed_gain_g1();
|
||||
bool isJungfrauFixedGainG1() const;
|
||||
void setJungfrauFixedGainG1(bool const value);
|
||||
bool jungfrauFixedGainG1IsSet() const;
|
||||
void unsetJungfrau_fixed_gain_g1();
|
||||
/// <summary>
|
||||
/// Use high G0 (for low energy applications)
|
||||
/// </summary>
|
||||
bool isUseGainHg0() const;
|
||||
void setUseGainHg0(bool const value);
|
||||
bool useGainHg0IsSet() const;
|
||||
void unsetUse_gain_hg0();
|
||||
bool isJungfrauUseGainHg0() const;
|
||||
void setJungfrauUseGainHg0(bool const value);
|
||||
bool jungfrauUseGainHg0IsSet() const;
|
||||
void unsetJungfrau_use_gain_hg0();
|
||||
|
||||
friend void to_json(nlohmann::json& j, const Detector_settings& o);
|
||||
friend void from_json(const nlohmann::json& j, Detector_settings& o);
|
||||
@@ -143,30 +176,34 @@ protected:
|
||||
|
||||
int64_t m_Count_time_us;
|
||||
bool m_Count_time_usIsSet;
|
||||
int64_t m_Storage_cell_count;
|
||||
|
||||
bool m_Internal_frame_generator;
|
||||
|
||||
bool m_Internal_frame_generatorIsSet;
|
||||
int64_t m_Internal_frame_generator_images;
|
||||
|
||||
int64_t m_Pedestal_g0_frames;
|
||||
|
||||
int64_t m_Pedestal_g1_frames;
|
||||
|
||||
int64_t m_Pedestal_g2_frames;
|
||||
|
||||
int64_t m_Pedestal_g0_rms_limit;
|
||||
|
||||
int64_t m_Pedestal_min_image_count;
|
||||
|
||||
int64_t m_Storage_cell_delay_ns;
|
||||
|
||||
bool m_Internal_frame_generator_imagesIsSet;
|
||||
int64_t m_Detector_trigger_delay_ns;
|
||||
bool m_Detector_trigger_delay_nsIsSet;
|
||||
bool m_Fixed_gain_g1;
|
||||
bool m_Fixed_gain_g1IsSet;
|
||||
bool m_Use_gain_hg0;
|
||||
bool m_Use_gain_hg0IsSet;
|
||||
org::openapitools::server::model::Detector_timing m_Timing;
|
||||
bool m_TimingIsSet;
|
||||
float m_Eiger_threshold_keV;
|
||||
bool m_Eiger_threshold_keVIsSet;
|
||||
int64_t m_Jungfrau_pedestal_g0_frames;
|
||||
bool m_Jungfrau_pedestal_g0_framesIsSet;
|
||||
int64_t m_Jungfrau_pedestal_g1_frames;
|
||||
bool m_Jungfrau_pedestal_g1_framesIsSet;
|
||||
int64_t m_Jungfrau_pedestal_g2_frames;
|
||||
bool m_Jungfrau_pedestal_g2_framesIsSet;
|
||||
int64_t m_Jungfrau_pedestal_g0_rms_limit;
|
||||
bool m_Jungfrau_pedestal_g0_rms_limitIsSet;
|
||||
int64_t m_Jungfrau_pedestal_min_image_count;
|
||||
bool m_Jungfrau_pedestal_min_image_countIsSet;
|
||||
int64_t m_Jungfrau_storage_cell_count;
|
||||
bool m_Jungfrau_storage_cell_countIsSet;
|
||||
int64_t m_Jungfrau_storage_cell_delay_ns;
|
||||
bool m_Jungfrau_storage_cell_delay_nsIsSet;
|
||||
bool m_Jungfrau_fixed_gain_g1;
|
||||
bool m_Jungfrau_fixed_gain_g1IsSet;
|
||||
bool m_Jungfrau_use_gain_hg0;
|
||||
bool m_Jungfrau_use_gain_hg0IsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
134
broker/gen/model/Detector_state.cpp
Normal file
134
broker/gen/model/Detector_state.cpp
Normal file
@@ -0,0 +1,134 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
#include "Detector_state.h"
|
||||
#include "Helpers.h"
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
|
||||
namespace org::openapitools::server::model
|
||||
{
|
||||
|
||||
Detector_state::Detector_state()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Detector_state::validate() const
|
||||
{
|
||||
std::stringstream msg;
|
||||
if (!validate(msg))
|
||||
{
|
||||
throw org::openapitools::server::helpers::ValidationException(msg.str());
|
||||
}
|
||||
}
|
||||
|
||||
bool Detector_state::validate(std::stringstream& msg) const
|
||||
{
|
||||
return validate(msg, "");
|
||||
}
|
||||
|
||||
bool Detector_state::validate(std::stringstream& msg, const std::string& pathPrefix) const
|
||||
{
|
||||
bool success = true;
|
||||
const std::string _pathPrefix = pathPrefix.empty() ? "Detector_state" : pathPrefix;
|
||||
|
||||
|
||||
if (m_value == Detector_state::eDetector_state::INVALID_VALUE_OPENAPI_GENERATED)
|
||||
{
|
||||
success = false;
|
||||
msg << _pathPrefix << ": has no value;";
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
bool Detector_state::operator==(const Detector_state& rhs) const
|
||||
{
|
||||
return
|
||||
getValue() == rhs.getValue()
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
bool Detector_state::operator!=(const Detector_state& rhs) const
|
||||
{
|
||||
return !(*this == rhs);
|
||||
}
|
||||
|
||||
void to_json(nlohmann::json& j, const Detector_state& o)
|
||||
{
|
||||
j = nlohmann::json::object();
|
||||
|
||||
switch (o.getValue())
|
||||
{
|
||||
case Detector_state::eDetector_state::INVALID_VALUE_OPENAPI_GENERATED:
|
||||
j = "INVALID_VALUE_OPENAPI_GENERATED";
|
||||
break;
|
||||
case Detector_state::eDetector_state::IDLE:
|
||||
j = "Idle";
|
||||
break;
|
||||
case Detector_state::eDetector_state::WAITING:
|
||||
j = "Waiting";
|
||||
break;
|
||||
case Detector_state::eDetector_state::BUSY:
|
||||
j = "Busy";
|
||||
break;
|
||||
case Detector_state::eDetector_state::ERROR:
|
||||
j = "Error";
|
||||
break;
|
||||
case Detector_state::eDetector_state::NOT_CONNECTED:
|
||||
j = "Not connected";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void from_json(const nlohmann::json& j, Detector_state& o)
|
||||
{
|
||||
|
||||
auto s = j.get<std::string>();
|
||||
if (s == "Idle") {
|
||||
o.setValue(Detector_state::eDetector_state::IDLE);
|
||||
}
|
||||
else if (s == "Waiting") {
|
||||
o.setValue(Detector_state::eDetector_state::WAITING);
|
||||
}
|
||||
else if (s == "Busy") {
|
||||
o.setValue(Detector_state::eDetector_state::BUSY);
|
||||
}
|
||||
else if (s == "Error") {
|
||||
o.setValue(Detector_state::eDetector_state::ERROR);
|
||||
}
|
||||
else if (s == "Not connected") {
|
||||
o.setValue(Detector_state::eDetector_state::NOT_CONNECTED);
|
||||
} else {
|
||||
std::stringstream ss;
|
||||
ss << "Unexpected value " << s << " in json"
|
||||
<< " cannot be converted to enum of type"
|
||||
<< " Detector_state::eDetector_state";
|
||||
throw std::invalid_argument(ss.str());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Detector_state::eDetector_state Detector_state::getValue() const
|
||||
{
|
||||
return m_value;
|
||||
}
|
||||
void Detector_state::setValue(Detector_state::eDetector_state value)
|
||||
{
|
||||
m_value = value;
|
||||
}
|
||||
|
||||
} // namespace org::openapitools::server::model
|
||||
|
||||
82
broker/gen/model/Detector_state.h
Normal file
82
broker/gen/model/Detector_state.h
Normal file
@@ -0,0 +1,82 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
/*
|
||||
* Detector_state.h
|
||||
*
|
||||
* Current state of the detector
|
||||
*/
|
||||
|
||||
#ifndef Detector_state_H_
|
||||
#define Detector_state_H_
|
||||
|
||||
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
namespace org::openapitools::server::model
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Current state of the detector
|
||||
/// </summary>
|
||||
class Detector_state
|
||||
{
|
||||
public:
|
||||
Detector_state();
|
||||
virtual ~Detector_state() = default;
|
||||
|
||||
enum class eDetector_state {
|
||||
// To have a valid default value.
|
||||
// Avoiding name clashes with user defined
|
||||
// enum values
|
||||
INVALID_VALUE_OPENAPI_GENERATED = 0,
|
||||
IDLE,
|
||||
WAITING,
|
||||
BUSY,
|
||||
ERROR,
|
||||
NOT_CONNECTED
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Validate the current data in the model. Throws a ValidationException on failure.
|
||||
/// </summary>
|
||||
void validate() const;
|
||||
|
||||
/// <summary>
|
||||
/// Validate the current data in the model. Returns false on error and writes an error
|
||||
/// message into the given stringstream.
|
||||
/// </summary>
|
||||
bool validate(std::stringstream& msg) const;
|
||||
|
||||
/// <summary>
|
||||
/// Helper overload for validate. Used when one model stores another model and calls it's validate.
|
||||
/// Not meant to be called outside that case.
|
||||
/// </summary>
|
||||
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
|
||||
|
||||
bool operator==(const Detector_state& rhs) const;
|
||||
bool operator!=(const Detector_state& rhs) const;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// Detector_state members
|
||||
|
||||
Detector_state::eDetector_state getValue() const;
|
||||
void setValue(Detector_state::eDetector_state value);
|
||||
|
||||
friend void to_json(nlohmann::json& j, const Detector_state& o);
|
||||
friend void from_json(const nlohmann::json& j, Detector_state& o);
|
||||
protected:
|
||||
Detector_state::eDetector_state m_value = Detector_state::eDetector_state::INVALID_VALUE_OPENAPI_GENERATED;
|
||||
};
|
||||
|
||||
} // namespace org::openapitools::server::model
|
||||
|
||||
#endif /* Detector_state_H_ */
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -21,8 +21,6 @@ namespace org::openapitools::server::model
|
||||
|
||||
Detector_status::Detector_status()
|
||||
{
|
||||
m_State = "";
|
||||
m_Powerchip = "";
|
||||
m_Server_version = "";
|
||||
m_Number_of_triggers_left = 0L;
|
||||
|
||||
@@ -147,19 +145,19 @@ void from_json(const nlohmann::json& j, Detector_status& o)
|
||||
|
||||
}
|
||||
|
||||
std::string Detector_status::getState() const
|
||||
org::openapitools::server::model::Detector_state Detector_status::getState() const
|
||||
{
|
||||
return m_State;
|
||||
}
|
||||
void Detector_status::setState(std::string const& value)
|
||||
void Detector_status::setState(org::openapitools::server::model::Detector_state const& value)
|
||||
{
|
||||
m_State = value;
|
||||
}
|
||||
std::string Detector_status::getPowerchip() const
|
||||
org::openapitools::server::model::Detector_power_state Detector_status::getPowerchip() const
|
||||
{
|
||||
return m_Powerchip;
|
||||
}
|
||||
void Detector_status::setPowerchip(std::string const& value)
|
||||
void Detector_status::setPowerchip(org::openapitools::server::model::Detector_power_state const& value)
|
||||
{
|
||||
m_Powerchip = value;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -19,7 +19,9 @@
|
||||
#define Detector_status_H_
|
||||
|
||||
|
||||
#include "Detector_state.h"
|
||||
#include <string>
|
||||
#include "Detector_power_state.h"
|
||||
#include <vector>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
@@ -60,15 +62,15 @@ public:
|
||||
/// Detector_status members
|
||||
|
||||
/// <summary>
|
||||
/// Current state of the detector
|
||||
///
|
||||
/// </summary>
|
||||
std::string getState() const;
|
||||
void setState(std::string const& value);
|
||||
org::openapitools::server::model::Detector_state getState() const;
|
||||
void setState(org::openapitools::server::model::Detector_state const& value);
|
||||
/// <summary>
|
||||
/// Power on of ASICs
|
||||
///
|
||||
/// </summary>
|
||||
std::string getPowerchip() const;
|
||||
void setPowerchip(std::string const& value);
|
||||
org::openapitools::server::model::Detector_power_state getPowerchip() const;
|
||||
void setPowerchip(org::openapitools::server::model::Detector_power_state const& value);
|
||||
/// <summary>
|
||||
/// Detector server (on read-out boards) version
|
||||
/// </summary>
|
||||
@@ -93,9 +95,9 @@ public:
|
||||
friend void to_json(nlohmann::json& j, const Detector_status& o);
|
||||
friend void from_json(const nlohmann::json& j, Detector_status& o);
|
||||
protected:
|
||||
std::string m_State;
|
||||
org::openapitools::server::model::Detector_state m_State;
|
||||
|
||||
std::string m_Powerchip;
|
||||
org::openapitools::server::model::Detector_power_state m_Powerchip;
|
||||
|
||||
std::string m_Server_version;
|
||||
|
||||
|
||||
128
broker/gen/model/Detector_timing.cpp
Normal file
128
broker/gen/model/Detector_timing.cpp
Normal file
@@ -0,0 +1,128 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
#include "Detector_timing.h"
|
||||
#include "Helpers.h"
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
|
||||
namespace org::openapitools::server::model
|
||||
{
|
||||
|
||||
Detector_timing::Detector_timing()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Detector_timing::validate() const
|
||||
{
|
||||
std::stringstream msg;
|
||||
if (!validate(msg))
|
||||
{
|
||||
throw org::openapitools::server::helpers::ValidationException(msg.str());
|
||||
}
|
||||
}
|
||||
|
||||
bool Detector_timing::validate(std::stringstream& msg) const
|
||||
{
|
||||
return validate(msg, "");
|
||||
}
|
||||
|
||||
bool Detector_timing::validate(std::stringstream& msg, const std::string& pathPrefix) const
|
||||
{
|
||||
bool success = true;
|
||||
const std::string _pathPrefix = pathPrefix.empty() ? "Detector_timing" : pathPrefix;
|
||||
|
||||
|
||||
if (m_value == Detector_timing::eDetector_timing::INVALID_VALUE_OPENAPI_GENERATED)
|
||||
{
|
||||
success = false;
|
||||
msg << _pathPrefix << ": has no value;";
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
bool Detector_timing::operator==(const Detector_timing& rhs) const
|
||||
{
|
||||
return
|
||||
getValue() == rhs.getValue()
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
bool Detector_timing::operator!=(const Detector_timing& rhs) const
|
||||
{
|
||||
return !(*this == rhs);
|
||||
}
|
||||
|
||||
void to_json(nlohmann::json& j, const Detector_timing& o)
|
||||
{
|
||||
j = nlohmann::json::object();
|
||||
|
||||
switch (o.getValue())
|
||||
{
|
||||
case Detector_timing::eDetector_timing::INVALID_VALUE_OPENAPI_GENERATED:
|
||||
j = "INVALID_VALUE_OPENAPI_GENERATED";
|
||||
break;
|
||||
case Detector_timing::eDetector_timing::AUTO:
|
||||
j = "auto";
|
||||
break;
|
||||
case Detector_timing::eDetector_timing::TRIGGER:
|
||||
j = "trigger";
|
||||
break;
|
||||
case Detector_timing::eDetector_timing::BURST:
|
||||
j = "burst";
|
||||
break;
|
||||
case Detector_timing::eDetector_timing::GATED:
|
||||
j = "gated";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void from_json(const nlohmann::json& j, Detector_timing& o)
|
||||
{
|
||||
|
||||
auto s = j.get<std::string>();
|
||||
if (s == "auto") {
|
||||
o.setValue(Detector_timing::eDetector_timing::AUTO);
|
||||
}
|
||||
else if (s == "trigger") {
|
||||
o.setValue(Detector_timing::eDetector_timing::TRIGGER);
|
||||
}
|
||||
else if (s == "burst") {
|
||||
o.setValue(Detector_timing::eDetector_timing::BURST);
|
||||
}
|
||||
else if (s == "gated") {
|
||||
o.setValue(Detector_timing::eDetector_timing::GATED);
|
||||
} else {
|
||||
std::stringstream ss;
|
||||
ss << "Unexpected value " << s << " in json"
|
||||
<< " cannot be converted to enum of type"
|
||||
<< " Detector_timing::eDetector_timing";
|
||||
throw std::invalid_argument(ss.str());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Detector_timing::eDetector_timing Detector_timing::getValue() const
|
||||
{
|
||||
return m_value;
|
||||
}
|
||||
void Detector_timing::setValue(Detector_timing::eDetector_timing value)
|
||||
{
|
||||
m_value = value;
|
||||
}
|
||||
|
||||
} // namespace org::openapitools::server::model
|
||||
|
||||
81
broker/gen/model/Detector_timing.h
Normal file
81
broker/gen/model/Detector_timing.h
Normal file
@@ -0,0 +1,81 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
/*
|
||||
* Detector_timing.h
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef Detector_timing_H_
|
||||
#define Detector_timing_H_
|
||||
|
||||
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
namespace org::openapitools::server::model
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
class Detector_timing
|
||||
{
|
||||
public:
|
||||
Detector_timing();
|
||||
virtual ~Detector_timing() = default;
|
||||
|
||||
enum class eDetector_timing {
|
||||
// To have a valid default value.
|
||||
// Avoiding name clashes with user defined
|
||||
// enum values
|
||||
INVALID_VALUE_OPENAPI_GENERATED = 0,
|
||||
AUTO,
|
||||
TRIGGER,
|
||||
BURST,
|
||||
GATED
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Validate the current data in the model. Throws a ValidationException on failure.
|
||||
/// </summary>
|
||||
void validate() const;
|
||||
|
||||
/// <summary>
|
||||
/// Validate the current data in the model. Returns false on error and writes an error
|
||||
/// message into the given stringstream.
|
||||
/// </summary>
|
||||
bool validate(std::stringstream& msg) const;
|
||||
|
||||
/// <summary>
|
||||
/// Helper overload for validate. Used when one model stores another model and calls it's validate.
|
||||
/// Not meant to be called outside that case.
|
||||
/// </summary>
|
||||
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
|
||||
|
||||
bool operator==(const Detector_timing& rhs) const;
|
||||
bool operator!=(const Detector_timing& rhs) const;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// Detector_timing members
|
||||
|
||||
Detector_timing::eDetector_timing getValue() const;
|
||||
void setValue(Detector_timing::eDetector_timing value);
|
||||
|
||||
friend void to_json(nlohmann::json& j, const Detector_timing& o);
|
||||
friend void from_json(const nlohmann::json& j, Detector_timing& o);
|
||||
protected:
|
||||
Detector_timing::eDetector_timing m_value = Detector_timing::eDetector_timing::INVALID_VALUE_OPENAPI_GENERATED;
|
||||
};
|
||||
|
||||
} // namespace org::openapitools::server::model
|
||||
|
||||
#endif /* Detector_timing_H_ */
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -31,6 +31,7 @@ Fpga_status_inner::Fpga_status_inner()
|
||||
m_Hbm_temp_C = 0.0f;
|
||||
m_Packets_udp = 0L;
|
||||
m_Packets_sls = 0L;
|
||||
m_Idle = false;
|
||||
|
||||
}
|
||||
|
||||
@@ -53,7 +54,7 @@ bool Fpga_status_inner::validate(std::stringstream& msg, const std::string& path
|
||||
bool success = true;
|
||||
const std::string _pathPrefix = pathPrefix.empty() ? "Fpga_status_inner" : pathPrefix;
|
||||
|
||||
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
@@ -90,6 +91,9 @@ bool Fpga_status_inner::operator==(const Fpga_status_inner& rhs) const
|
||||
&&
|
||||
|
||||
(getPacketsSls() == rhs.getPacketsSls())
|
||||
&&
|
||||
|
||||
(isIdle() == rhs.isIdle())
|
||||
|
||||
|
||||
;
|
||||
@@ -113,6 +117,7 @@ void to_json(nlohmann::json& j, const Fpga_status_inner& o)
|
||||
j["hbm_temp_C"] = o.m_Hbm_temp_C;
|
||||
j["packets_udp"] = o.m_Packets_udp;
|
||||
j["packets_sls"] = o.m_Packets_sls;
|
||||
j["idle"] = o.m_Idle;
|
||||
|
||||
}
|
||||
|
||||
@@ -128,6 +133,7 @@ void from_json(const nlohmann::json& j, Fpga_status_inner& o)
|
||||
j.at("hbm_temp_C").get_to(o.m_Hbm_temp_C);
|
||||
j.at("packets_udp").get_to(o.m_Packets_udp);
|
||||
j.at("packets_sls").get_to(o.m_Packets_sls);
|
||||
j.at("idle").get_to(o.m_Idle);
|
||||
|
||||
}
|
||||
|
||||
@@ -211,6 +217,14 @@ void Fpga_status_inner::setPacketsSls(int64_t const value)
|
||||
{
|
||||
m_Packets_sls = value;
|
||||
}
|
||||
bool Fpga_status_inner::isIdle() const
|
||||
{
|
||||
return m_Idle;
|
||||
}
|
||||
void Fpga_status_inner::setIdle(bool const value)
|
||||
{
|
||||
m_Idle = value;
|
||||
}
|
||||
|
||||
|
||||
} // namespace org::openapitools::server::model
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -108,6 +108,11 @@ public:
|
||||
/// </summary>
|
||||
int64_t getPacketsSls() const;
|
||||
void setPacketsSls(int64_t const value);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
bool isIdle() const;
|
||||
void setIdle(bool const value);
|
||||
|
||||
friend void to_json(nlohmann::json& j, const Fpga_status_inner& o);
|
||||
friend void from_json(const nlohmann::json& j, Fpga_status_inner& o);
|
||||
@@ -132,6 +137,8 @@ protected:
|
||||
|
||||
int64_t m_Packets_sls;
|
||||
|
||||
bool m_Idle;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -34,6 +34,7 @@ Jfjoch_settings::Jfjoch_settings()
|
||||
m_Numa_policy = "";
|
||||
m_Numa_policyIsSet = false;
|
||||
m_Frontend_directory = "";
|
||||
m_Zeromq_previewIsSet = false;
|
||||
|
||||
}
|
||||
|
||||
@@ -110,11 +111,6 @@ bool Jfjoch_settings::validate(std::stringstream& msg, const std::string& pathPr
|
||||
success = false;
|
||||
msg << currentValuePath << ": must be greater than or equal to 128;";
|
||||
}
|
||||
if (value > 16384)
|
||||
{
|
||||
success = false;
|
||||
msg << currentValuePath << ": must be less than or equal to 16384;";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -136,7 +132,7 @@ bool Jfjoch_settings::validate(std::stringstream& msg, const std::string& pathPr
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
@@ -179,8 +175,11 @@ bool Jfjoch_settings::operator==(const Jfjoch_settings& rhs) const
|
||||
&&
|
||||
|
||||
(getImagePusher() == rhs.getImagePusher())
|
||||
&&
|
||||
|
||||
|
||||
((!zeromqPreviewIsSet() && !rhs.zeromqPreviewIsSet()) || (zeromqPreviewIsSet() && rhs.zeromqPreviewIsSet() && getZeromqPreview() == rhs.getZeromqPreview()))
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
@@ -213,6 +212,8 @@ void to_json(nlohmann::json& j, const Jfjoch_settings& o)
|
||||
j["numa_policy"] = o.m_Numa_policy;
|
||||
j["frontend_directory"] = o.m_Frontend_directory;
|
||||
j["image_pusher"] = o.m_Image_pusher;
|
||||
if(o.zeromqPreviewIsSet())
|
||||
j["zeromq_preview"] = o.m_Zeromq_preview;
|
||||
|
||||
}
|
||||
|
||||
@@ -266,6 +267,11 @@ void from_json(const nlohmann::json& j, Jfjoch_settings& o)
|
||||
}
|
||||
j.at("frontend_directory").get_to(o.m_Frontend_directory);
|
||||
j.at("image_pusher").get_to(o.m_Image_pusher);
|
||||
if(j.find("zeromq_preview") != j.end())
|
||||
{
|
||||
j.at("zeromq_preview").get_to(o.m_Zeromq_preview);
|
||||
o.m_Zeromq_previewIsSet = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -446,6 +452,23 @@ void Jfjoch_settings::setImagePusher(org::openapitools::server::model::Image_pus
|
||||
{
|
||||
m_Image_pusher = value;
|
||||
}
|
||||
org::openapitools::server::model::Zeromq_preview_settings Jfjoch_settings::getZeromqPreview() const
|
||||
{
|
||||
return m_Zeromq_preview;
|
||||
}
|
||||
void Jfjoch_settings::setZeromqPreview(org::openapitools::server::model::Zeromq_preview_settings const& value)
|
||||
{
|
||||
m_Zeromq_preview = value;
|
||||
m_Zeromq_previewIsSet = true;
|
||||
}
|
||||
bool Jfjoch_settings::zeromqPreviewIsSet() const
|
||||
{
|
||||
return m_Zeromq_previewIsSet;
|
||||
}
|
||||
void Jfjoch_settings::unsetZeromq_preview()
|
||||
{
|
||||
m_Zeromq_previewIsSet = false;
|
||||
}
|
||||
|
||||
|
||||
} // namespace org::openapitools::server::model
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
|
||||
#include "Detector.h"
|
||||
#include "Zeromq_preview_settings.h"
|
||||
#include "Image_pusher_type.h"
|
||||
#include "Pcie_devices_inner.h"
|
||||
#include <string>
|
||||
@@ -145,6 +146,13 @@ public:
|
||||
/// </summary>
|
||||
org::openapitools::server::model::Image_pusher_type getImagePusher() const;
|
||||
void setImagePusher(org::openapitools::server::model::Image_pusher_type const& value);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
org::openapitools::server::model::Zeromq_preview_settings getZeromqPreview() const;
|
||||
void setZeromqPreview(org::openapitools::server::model::Zeromq_preview_settings const& value);
|
||||
bool zeromqPreviewIsSet() const;
|
||||
void unsetZeromq_preview();
|
||||
|
||||
friend void to_json(nlohmann::json& j, const Jfjoch_settings& o);
|
||||
friend void from_json(const nlohmann::json& j, Jfjoch_settings& o);
|
||||
@@ -173,6 +181,8 @@ protected:
|
||||
|
||||
org::openapitools::server::model::Image_pusher_type m_Image_pusher;
|
||||
|
||||
org::openapitools::server::model::Zeromq_preview_settings m_Zeromq_preview;
|
||||
bool m_Zeromq_previewIsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
427
broker/gen/model/Jfjoch_statistics.cpp
Normal file
427
broker/gen/model/Jfjoch_statistics.cpp
Normal file
@@ -0,0 +1,427 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
#include "Jfjoch_statistics.h"
|
||||
#include "Helpers.h"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
namespace org::openapitools::server::model
|
||||
{
|
||||
|
||||
Jfjoch_statistics::Jfjoch_statistics()
|
||||
{
|
||||
m_DetectorIsSet = false;
|
||||
m_Detector_listIsSet = false;
|
||||
m_Detector_settingsIsSet = false;
|
||||
m_Image_format_settingsIsSet = false;
|
||||
m_Instrument_metadataIsSet = false;
|
||||
m_Data_processing_settingsIsSet = false;
|
||||
m_MeasurementIsSet = false;
|
||||
m_BrokerIsSet = false;
|
||||
m_FpgaIsSet = false;
|
||||
m_CalibrationIsSet = false;
|
||||
m_Zeromq_previewIsSet = false;
|
||||
|
||||
}
|
||||
|
||||
void Jfjoch_statistics::validate() const
|
||||
{
|
||||
std::stringstream msg;
|
||||
if (!validate(msg))
|
||||
{
|
||||
throw org::openapitools::server::helpers::ValidationException(msg.str());
|
||||
}
|
||||
}
|
||||
|
||||
bool Jfjoch_statistics::validate(std::stringstream& msg) const
|
||||
{
|
||||
return validate(msg, "");
|
||||
}
|
||||
|
||||
bool Jfjoch_statistics::validate(std::stringstream& msg, const std::string& pathPrefix) const
|
||||
{
|
||||
bool success = true;
|
||||
const std::string _pathPrefix = pathPrefix.empty() ? "Jfjoch_statistics" : pathPrefix;
|
||||
|
||||
|
||||
if (fpgaIsSet())
|
||||
{
|
||||
const std::vector<org::openapitools::server::model::Fpga_status_inner>& value = m_Fpga;
|
||||
const std::string currentValuePath = _pathPrefix + ".fpga";
|
||||
|
||||
|
||||
{ // Recursive validation of array elements
|
||||
const std::string oldValuePath = currentValuePath;
|
||||
int i = 0;
|
||||
for (const org::openapitools::server::model::Fpga_status_inner& value : value)
|
||||
{
|
||||
const std::string currentValuePath = oldValuePath + "[" + std::to_string(i) + "]";
|
||||
|
||||
success = value.validate(msg, currentValuePath + ".fpga") && success;
|
||||
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (calibrationIsSet())
|
||||
{
|
||||
const std::vector<org::openapitools::server::model::Calibration_statistics_inner>& value = m_Calibration;
|
||||
const std::string currentValuePath = _pathPrefix + ".calibration";
|
||||
|
||||
|
||||
{ // Recursive validation of array elements
|
||||
const std::string oldValuePath = currentValuePath;
|
||||
int i = 0;
|
||||
for (const org::openapitools::server::model::Calibration_statistics_inner& value : value)
|
||||
{
|
||||
const std::string currentValuePath = oldValuePath + "[" + std::to_string(i) + "]";
|
||||
|
||||
success = value.validate(msg, currentValuePath + ".calibration") && success;
|
||||
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
bool Jfjoch_statistics::operator==(const Jfjoch_statistics& rhs) const
|
||||
{
|
||||
return
|
||||
|
||||
|
||||
|
||||
((!detectorIsSet() && !rhs.detectorIsSet()) || (detectorIsSet() && rhs.detectorIsSet() && getDetector() == rhs.getDetector())) &&
|
||||
|
||||
|
||||
((!detectorListIsSet() && !rhs.detectorListIsSet()) || (detectorListIsSet() && rhs.detectorListIsSet() && getDetectorList() == rhs.getDetectorList())) &&
|
||||
|
||||
|
||||
((!detectorSettingsIsSet() && !rhs.detectorSettingsIsSet()) || (detectorSettingsIsSet() && rhs.detectorSettingsIsSet() && getDetectorSettings() == rhs.getDetectorSettings())) &&
|
||||
|
||||
|
||||
((!imageFormatSettingsIsSet() && !rhs.imageFormatSettingsIsSet()) || (imageFormatSettingsIsSet() && rhs.imageFormatSettingsIsSet() && getImageFormatSettings() == rhs.getImageFormatSettings())) &&
|
||||
|
||||
|
||||
((!instrumentMetadataIsSet() && !rhs.instrumentMetadataIsSet()) || (instrumentMetadataIsSet() && rhs.instrumentMetadataIsSet() && getInstrumentMetadata() == rhs.getInstrumentMetadata())) &&
|
||||
|
||||
|
||||
((!dataProcessingSettingsIsSet() && !rhs.dataProcessingSettingsIsSet()) || (dataProcessingSettingsIsSet() && rhs.dataProcessingSettingsIsSet() && getDataProcessingSettings() == rhs.getDataProcessingSettings())) &&
|
||||
|
||||
|
||||
((!measurementIsSet() && !rhs.measurementIsSet()) || (measurementIsSet() && rhs.measurementIsSet() && getMeasurement() == rhs.getMeasurement())) &&
|
||||
|
||||
|
||||
((!brokerIsSet() && !rhs.brokerIsSet()) || (brokerIsSet() && rhs.brokerIsSet() && getBroker() == rhs.getBroker())) &&
|
||||
|
||||
|
||||
((!fpgaIsSet() && !rhs.fpgaIsSet()) || (fpgaIsSet() && rhs.fpgaIsSet() && getFpga() == rhs.getFpga())) &&
|
||||
|
||||
|
||||
((!calibrationIsSet() && !rhs.calibrationIsSet()) || (calibrationIsSet() && rhs.calibrationIsSet() && getCalibration() == rhs.getCalibration())) &&
|
||||
|
||||
|
||||
((!zeromqPreviewIsSet() && !rhs.zeromqPreviewIsSet()) || (zeromqPreviewIsSet() && rhs.zeromqPreviewIsSet() && getZeromqPreview() == rhs.getZeromqPreview()))
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
bool Jfjoch_statistics::operator!=(const Jfjoch_statistics& rhs) const
|
||||
{
|
||||
return !(*this == rhs);
|
||||
}
|
||||
|
||||
void to_json(nlohmann::json& j, const Jfjoch_statistics& o)
|
||||
{
|
||||
j = nlohmann::json::object();
|
||||
if(o.detectorIsSet())
|
||||
j["detector"] = o.m_Detector;
|
||||
if(o.detectorListIsSet())
|
||||
j["detector_list"] = o.m_Detector_list;
|
||||
if(o.detectorSettingsIsSet())
|
||||
j["detector_settings"] = o.m_Detector_settings;
|
||||
if(o.imageFormatSettingsIsSet())
|
||||
j["image_format_settings"] = o.m_Image_format_settings;
|
||||
if(o.instrumentMetadataIsSet())
|
||||
j["instrument_metadata"] = o.m_Instrument_metadata;
|
||||
if(o.dataProcessingSettingsIsSet())
|
||||
j["data_processing_settings"] = o.m_Data_processing_settings;
|
||||
if(o.measurementIsSet())
|
||||
j["measurement"] = o.m_Measurement;
|
||||
if(o.brokerIsSet())
|
||||
j["broker"] = o.m_Broker;
|
||||
if(o.fpgaIsSet() || !o.m_Fpga.empty())
|
||||
j["fpga"] = o.m_Fpga;
|
||||
if(o.calibrationIsSet() || !o.m_Calibration.empty())
|
||||
j["calibration"] = o.m_Calibration;
|
||||
if(o.zeromqPreviewIsSet())
|
||||
j["zeromq_preview"] = o.m_Zeromq_preview;
|
||||
|
||||
}
|
||||
|
||||
void from_json(const nlohmann::json& j, Jfjoch_statistics& o)
|
||||
{
|
||||
if(j.find("detector") != j.end())
|
||||
{
|
||||
j.at("detector").get_to(o.m_Detector);
|
||||
o.m_DetectorIsSet = true;
|
||||
}
|
||||
if(j.find("detector_list") != j.end())
|
||||
{
|
||||
j.at("detector_list").get_to(o.m_Detector_list);
|
||||
o.m_Detector_listIsSet = true;
|
||||
}
|
||||
if(j.find("detector_settings") != j.end())
|
||||
{
|
||||
j.at("detector_settings").get_to(o.m_Detector_settings);
|
||||
o.m_Detector_settingsIsSet = true;
|
||||
}
|
||||
if(j.find("image_format_settings") != j.end())
|
||||
{
|
||||
j.at("image_format_settings").get_to(o.m_Image_format_settings);
|
||||
o.m_Image_format_settingsIsSet = true;
|
||||
}
|
||||
if(j.find("instrument_metadata") != j.end())
|
||||
{
|
||||
j.at("instrument_metadata").get_to(o.m_Instrument_metadata);
|
||||
o.m_Instrument_metadataIsSet = true;
|
||||
}
|
||||
if(j.find("data_processing_settings") != j.end())
|
||||
{
|
||||
j.at("data_processing_settings").get_to(o.m_Data_processing_settings);
|
||||
o.m_Data_processing_settingsIsSet = true;
|
||||
}
|
||||
if(j.find("measurement") != j.end())
|
||||
{
|
||||
j.at("measurement").get_to(o.m_Measurement);
|
||||
o.m_MeasurementIsSet = true;
|
||||
}
|
||||
if(j.find("broker") != j.end())
|
||||
{
|
||||
j.at("broker").get_to(o.m_Broker);
|
||||
o.m_BrokerIsSet = true;
|
||||
}
|
||||
if(j.find("fpga") != j.end())
|
||||
{
|
||||
j.at("fpga").get_to(o.m_Fpga);
|
||||
o.m_FpgaIsSet = true;
|
||||
}
|
||||
if(j.find("calibration") != j.end())
|
||||
{
|
||||
j.at("calibration").get_to(o.m_Calibration);
|
||||
o.m_CalibrationIsSet = true;
|
||||
}
|
||||
if(j.find("zeromq_preview") != j.end())
|
||||
{
|
||||
j.at("zeromq_preview").get_to(o.m_Zeromq_preview);
|
||||
o.m_Zeromq_previewIsSet = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
org::openapitools::server::model::Detector_status Jfjoch_statistics::getDetector() const
|
||||
{
|
||||
return m_Detector;
|
||||
}
|
||||
void Jfjoch_statistics::setDetector(org::openapitools::server::model::Detector_status const& value)
|
||||
{
|
||||
m_Detector = value;
|
||||
m_DetectorIsSet = true;
|
||||
}
|
||||
bool Jfjoch_statistics::detectorIsSet() const
|
||||
{
|
||||
return m_DetectorIsSet;
|
||||
}
|
||||
void Jfjoch_statistics::unsetDetector()
|
||||
{
|
||||
m_DetectorIsSet = false;
|
||||
}
|
||||
org::openapitools::server::model::Detector_list Jfjoch_statistics::getDetectorList() const
|
||||
{
|
||||
return m_Detector_list;
|
||||
}
|
||||
void Jfjoch_statistics::setDetectorList(org::openapitools::server::model::Detector_list const& value)
|
||||
{
|
||||
m_Detector_list = value;
|
||||
m_Detector_listIsSet = true;
|
||||
}
|
||||
bool Jfjoch_statistics::detectorListIsSet() const
|
||||
{
|
||||
return m_Detector_listIsSet;
|
||||
}
|
||||
void Jfjoch_statistics::unsetDetector_list()
|
||||
{
|
||||
m_Detector_listIsSet = false;
|
||||
}
|
||||
org::openapitools::server::model::Detector_settings Jfjoch_statistics::getDetectorSettings() const
|
||||
{
|
||||
return m_Detector_settings;
|
||||
}
|
||||
void Jfjoch_statistics::setDetectorSettings(org::openapitools::server::model::Detector_settings const& value)
|
||||
{
|
||||
m_Detector_settings = value;
|
||||
m_Detector_settingsIsSet = true;
|
||||
}
|
||||
bool Jfjoch_statistics::detectorSettingsIsSet() const
|
||||
{
|
||||
return m_Detector_settingsIsSet;
|
||||
}
|
||||
void Jfjoch_statistics::unsetDetector_settings()
|
||||
{
|
||||
m_Detector_settingsIsSet = false;
|
||||
}
|
||||
org::openapitools::server::model::Image_format_settings Jfjoch_statistics::getImageFormatSettings() const
|
||||
{
|
||||
return m_Image_format_settings;
|
||||
}
|
||||
void Jfjoch_statistics::setImageFormatSettings(org::openapitools::server::model::Image_format_settings const& value)
|
||||
{
|
||||
m_Image_format_settings = value;
|
||||
m_Image_format_settingsIsSet = true;
|
||||
}
|
||||
bool Jfjoch_statistics::imageFormatSettingsIsSet() const
|
||||
{
|
||||
return m_Image_format_settingsIsSet;
|
||||
}
|
||||
void Jfjoch_statistics::unsetImage_format_settings()
|
||||
{
|
||||
m_Image_format_settingsIsSet = false;
|
||||
}
|
||||
org::openapitools::server::model::Instrument_metadata Jfjoch_statistics::getInstrumentMetadata() const
|
||||
{
|
||||
return m_Instrument_metadata;
|
||||
}
|
||||
void Jfjoch_statistics::setInstrumentMetadata(org::openapitools::server::model::Instrument_metadata const& value)
|
||||
{
|
||||
m_Instrument_metadata = value;
|
||||
m_Instrument_metadataIsSet = true;
|
||||
}
|
||||
bool Jfjoch_statistics::instrumentMetadataIsSet() const
|
||||
{
|
||||
return m_Instrument_metadataIsSet;
|
||||
}
|
||||
void Jfjoch_statistics::unsetInstrument_metadata()
|
||||
{
|
||||
m_Instrument_metadataIsSet = false;
|
||||
}
|
||||
org::openapitools::server::model::Spot_finding_settings Jfjoch_statistics::getDataProcessingSettings() const
|
||||
{
|
||||
return m_Data_processing_settings;
|
||||
}
|
||||
void Jfjoch_statistics::setDataProcessingSettings(org::openapitools::server::model::Spot_finding_settings const& value)
|
||||
{
|
||||
m_Data_processing_settings = value;
|
||||
m_Data_processing_settingsIsSet = true;
|
||||
}
|
||||
bool Jfjoch_statistics::dataProcessingSettingsIsSet() const
|
||||
{
|
||||
return m_Data_processing_settingsIsSet;
|
||||
}
|
||||
void Jfjoch_statistics::unsetData_processing_settings()
|
||||
{
|
||||
m_Data_processing_settingsIsSet = false;
|
||||
}
|
||||
org::openapitools::server::model::Measurement_statistics Jfjoch_statistics::getMeasurement() const
|
||||
{
|
||||
return m_Measurement;
|
||||
}
|
||||
void Jfjoch_statistics::setMeasurement(org::openapitools::server::model::Measurement_statistics const& value)
|
||||
{
|
||||
m_Measurement = value;
|
||||
m_MeasurementIsSet = true;
|
||||
}
|
||||
bool Jfjoch_statistics::measurementIsSet() const
|
||||
{
|
||||
return m_MeasurementIsSet;
|
||||
}
|
||||
void Jfjoch_statistics::unsetMeasurement()
|
||||
{
|
||||
m_MeasurementIsSet = false;
|
||||
}
|
||||
org::openapitools::server::model::Broker_status Jfjoch_statistics::getBroker() const
|
||||
{
|
||||
return m_Broker;
|
||||
}
|
||||
void Jfjoch_statistics::setBroker(org::openapitools::server::model::Broker_status const& value)
|
||||
{
|
||||
m_Broker = value;
|
||||
m_BrokerIsSet = true;
|
||||
}
|
||||
bool Jfjoch_statistics::brokerIsSet() const
|
||||
{
|
||||
return m_BrokerIsSet;
|
||||
}
|
||||
void Jfjoch_statistics::unsetBroker()
|
||||
{
|
||||
m_BrokerIsSet = false;
|
||||
}
|
||||
std::vector<org::openapitools::server::model::Fpga_status_inner> Jfjoch_statistics::getFpga() const
|
||||
{
|
||||
return m_Fpga;
|
||||
}
|
||||
void Jfjoch_statistics::setFpga(std::vector<org::openapitools::server::model::Fpga_status_inner> const& value)
|
||||
{
|
||||
m_Fpga = value;
|
||||
m_FpgaIsSet = true;
|
||||
}
|
||||
bool Jfjoch_statistics::fpgaIsSet() const
|
||||
{
|
||||
return m_FpgaIsSet;
|
||||
}
|
||||
void Jfjoch_statistics::unsetFpga()
|
||||
{
|
||||
m_FpgaIsSet = false;
|
||||
}
|
||||
std::vector<org::openapitools::server::model::Calibration_statistics_inner> Jfjoch_statistics::getCalibration() const
|
||||
{
|
||||
return m_Calibration;
|
||||
}
|
||||
void Jfjoch_statistics::setCalibration(std::vector<org::openapitools::server::model::Calibration_statistics_inner> const& value)
|
||||
{
|
||||
m_Calibration = value;
|
||||
m_CalibrationIsSet = true;
|
||||
}
|
||||
bool Jfjoch_statistics::calibrationIsSet() const
|
||||
{
|
||||
return m_CalibrationIsSet;
|
||||
}
|
||||
void Jfjoch_statistics::unsetCalibration()
|
||||
{
|
||||
m_CalibrationIsSet = false;
|
||||
}
|
||||
org::openapitools::server::model::Zeromq_preview_settings Jfjoch_statistics::getZeromqPreview() const
|
||||
{
|
||||
return m_Zeromq_preview;
|
||||
}
|
||||
void Jfjoch_statistics::setZeromqPreview(org::openapitools::server::model::Zeromq_preview_settings const& value)
|
||||
{
|
||||
m_Zeromq_preview = value;
|
||||
m_Zeromq_previewIsSet = true;
|
||||
}
|
||||
bool Jfjoch_statistics::zeromqPreviewIsSet() const
|
||||
{
|
||||
return m_Zeromq_previewIsSet;
|
||||
}
|
||||
void Jfjoch_statistics::unsetZeromq_preview()
|
||||
{
|
||||
m_Zeromq_previewIsSet = false;
|
||||
}
|
||||
|
||||
|
||||
} // namespace org::openapitools::server::model
|
||||
|
||||
180
broker/gen/model/Jfjoch_statistics.h
Normal file
180
broker/gen/model/Jfjoch_statistics.h
Normal file
@@ -0,0 +1,180 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
/*
|
||||
* Jfjoch_statistics.h
|
||||
*
|
||||
* Pool statistics for Jungfraujoch to reduce transfers between frontend and jfjoch_broker
|
||||
*/
|
||||
|
||||
#ifndef Jfjoch_statistics_H_
|
||||
#define Jfjoch_statistics_H_
|
||||
|
||||
|
||||
#include "Calibration_statistics_inner.h"
|
||||
#include "Detector_status.h"
|
||||
#include "Broker_status.h"
|
||||
#include "Measurement_statistics.h"
|
||||
#include "Spot_finding_settings.h"
|
||||
#include "Zeromq_preview_settings.h"
|
||||
#include "Detector_list.h"
|
||||
#include "Fpga_status_inner.h"
|
||||
#include "Image_format_settings.h"
|
||||
#include "Detector_settings.h"
|
||||
#include "Instrument_metadata.h"
|
||||
#include <vector>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
namespace org::openapitools::server::model
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Pool statistics for Jungfraujoch to reduce transfers between frontend and jfjoch_broker
|
||||
/// </summary>
|
||||
class Jfjoch_statistics
|
||||
{
|
||||
public:
|
||||
Jfjoch_statistics();
|
||||
virtual ~Jfjoch_statistics() = default;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Validate the current data in the model. Throws a ValidationException on failure.
|
||||
/// </summary>
|
||||
void validate() const;
|
||||
|
||||
/// <summary>
|
||||
/// Validate the current data in the model. Returns false on error and writes an error
|
||||
/// message into the given stringstream.
|
||||
/// </summary>
|
||||
bool validate(std::stringstream& msg) const;
|
||||
|
||||
/// <summary>
|
||||
/// Helper overload for validate. Used when one model stores another model and calls it's validate.
|
||||
/// Not meant to be called outside that case.
|
||||
/// </summary>
|
||||
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
|
||||
|
||||
bool operator==(const Jfjoch_statistics& rhs) const;
|
||||
bool operator!=(const Jfjoch_statistics& rhs) const;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// Jfjoch_statistics members
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
org::openapitools::server::model::Detector_status getDetector() const;
|
||||
void setDetector(org::openapitools::server::model::Detector_status const& value);
|
||||
bool detectorIsSet() const;
|
||||
void unsetDetector();
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
org::openapitools::server::model::Detector_list getDetectorList() const;
|
||||
void setDetectorList(org::openapitools::server::model::Detector_list const& value);
|
||||
bool detectorListIsSet() const;
|
||||
void unsetDetector_list();
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
org::openapitools::server::model::Detector_settings getDetectorSettings() const;
|
||||
void setDetectorSettings(org::openapitools::server::model::Detector_settings const& value);
|
||||
bool detectorSettingsIsSet() const;
|
||||
void unsetDetector_settings();
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
org::openapitools::server::model::Image_format_settings getImageFormatSettings() const;
|
||||
void setImageFormatSettings(org::openapitools::server::model::Image_format_settings const& value);
|
||||
bool imageFormatSettingsIsSet() const;
|
||||
void unsetImage_format_settings();
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
org::openapitools::server::model::Instrument_metadata getInstrumentMetadata() const;
|
||||
void setInstrumentMetadata(org::openapitools::server::model::Instrument_metadata const& value);
|
||||
bool instrumentMetadataIsSet() const;
|
||||
void unsetInstrument_metadata();
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
org::openapitools::server::model::Spot_finding_settings getDataProcessingSettings() const;
|
||||
void setDataProcessingSettings(org::openapitools::server::model::Spot_finding_settings const& value);
|
||||
bool dataProcessingSettingsIsSet() const;
|
||||
void unsetData_processing_settings();
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
org::openapitools::server::model::Measurement_statistics getMeasurement() const;
|
||||
void setMeasurement(org::openapitools::server::model::Measurement_statistics const& value);
|
||||
bool measurementIsSet() const;
|
||||
void unsetMeasurement();
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
org::openapitools::server::model::Broker_status getBroker() const;
|
||||
void setBroker(org::openapitools::server::model::Broker_status const& value);
|
||||
bool brokerIsSet() const;
|
||||
void unsetBroker();
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
std::vector<org::openapitools::server::model::Fpga_status_inner> getFpga() const;
|
||||
void setFpga(std::vector<org::openapitools::server::model::Fpga_status_inner> const& value);
|
||||
bool fpgaIsSet() const;
|
||||
void unsetFpga();
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
std::vector<org::openapitools::server::model::Calibration_statistics_inner> getCalibration() const;
|
||||
void setCalibration(std::vector<org::openapitools::server::model::Calibration_statistics_inner> const& value);
|
||||
bool calibrationIsSet() const;
|
||||
void unsetCalibration();
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
org::openapitools::server::model::Zeromq_preview_settings getZeromqPreview() const;
|
||||
void setZeromqPreview(org::openapitools::server::model::Zeromq_preview_settings const& value);
|
||||
bool zeromqPreviewIsSet() const;
|
||||
void unsetZeromq_preview();
|
||||
|
||||
friend void to_json(nlohmann::json& j, const Jfjoch_statistics& o);
|
||||
friend void from_json(const nlohmann::json& j, Jfjoch_statistics& o);
|
||||
protected:
|
||||
org::openapitools::server::model::Detector_status m_Detector;
|
||||
bool m_DetectorIsSet;
|
||||
org::openapitools::server::model::Detector_list m_Detector_list;
|
||||
bool m_Detector_listIsSet;
|
||||
org::openapitools::server::model::Detector_settings m_Detector_settings;
|
||||
bool m_Detector_settingsIsSet;
|
||||
org::openapitools::server::model::Image_format_settings m_Image_format_settings;
|
||||
bool m_Image_format_settingsIsSet;
|
||||
org::openapitools::server::model::Instrument_metadata m_Instrument_metadata;
|
||||
bool m_Instrument_metadataIsSet;
|
||||
org::openapitools::server::model::Spot_finding_settings m_Data_processing_settings;
|
||||
bool m_Data_processing_settingsIsSet;
|
||||
org::openapitools::server::model::Measurement_statistics m_Measurement;
|
||||
bool m_MeasurementIsSet;
|
||||
org::openapitools::server::model::Broker_status m_Broker;
|
||||
bool m_BrokerIsSet;
|
||||
std::vector<org::openapitools::server::model::Fpga_status_inner> m_Fpga;
|
||||
bool m_FpgaIsSet;
|
||||
std::vector<org::openapitools::server::model::Calibration_statistics_inner> m_Calibration;
|
||||
bool m_CalibrationIsSet;
|
||||
org::openapitools::server::model::Zeromq_preview_settings m_Zeromq_preview;
|
||||
bool m_Zeromq_previewIsSet;
|
||||
|
||||
};
|
||||
|
||||
} // namespace org::openapitools::server::model
|
||||
|
||||
#endif /* Jfjoch_statistics_H_ */
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
134
broker/gen/model/Zeromq_preview_settings.cpp
Normal file
134
broker/gen/model/Zeromq_preview_settings.cpp
Normal file
@@ -0,0 +1,134 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
#include "Zeromq_preview_settings.h"
|
||||
#include "Helpers.h"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
namespace org::openapitools::server::model
|
||||
{
|
||||
|
||||
Zeromq_preview_settings::Zeromq_preview_settings()
|
||||
{
|
||||
m_Enabled = true;
|
||||
m_Period_ms = 1000L;
|
||||
m_Socket_address = "";
|
||||
m_Socket_addressIsSet = false;
|
||||
|
||||
}
|
||||
|
||||
void Zeromq_preview_settings::validate() const
|
||||
{
|
||||
std::stringstream msg;
|
||||
if (!validate(msg))
|
||||
{
|
||||
throw org::openapitools::server::helpers::ValidationException(msg.str());
|
||||
}
|
||||
}
|
||||
|
||||
bool Zeromq_preview_settings::validate(std::stringstream& msg) const
|
||||
{
|
||||
return validate(msg, "");
|
||||
}
|
||||
|
||||
bool Zeromq_preview_settings::validate(std::stringstream& msg, const std::string& pathPrefix) const
|
||||
{
|
||||
bool success = true;
|
||||
const std::string _pathPrefix = pathPrefix.empty() ? "Zeromq_preview_settings" : pathPrefix;
|
||||
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
bool Zeromq_preview_settings::operator==(const Zeromq_preview_settings& rhs) const
|
||||
{
|
||||
return
|
||||
|
||||
|
||||
(isEnabled() == rhs.isEnabled())
|
||||
&&
|
||||
|
||||
(getPeriodMs() == rhs.getPeriodMs())
|
||||
&&
|
||||
|
||||
|
||||
((!socketAddressIsSet() && !rhs.socketAddressIsSet()) || (socketAddressIsSet() && rhs.socketAddressIsSet() && getSocketAddress() == rhs.getSocketAddress()))
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
bool Zeromq_preview_settings::operator!=(const Zeromq_preview_settings& rhs) const
|
||||
{
|
||||
return !(*this == rhs);
|
||||
}
|
||||
|
||||
void to_json(nlohmann::json& j, const Zeromq_preview_settings& o)
|
||||
{
|
||||
j = nlohmann::json::object();
|
||||
j["enabled"] = o.m_Enabled;
|
||||
j["period_ms"] = o.m_Period_ms;
|
||||
if(o.socketAddressIsSet())
|
||||
j["socket_address"] = o.m_Socket_address;
|
||||
|
||||
}
|
||||
|
||||
void from_json(const nlohmann::json& j, Zeromq_preview_settings& o)
|
||||
{
|
||||
j.at("enabled").get_to(o.m_Enabled);
|
||||
j.at("period_ms").get_to(o.m_Period_ms);
|
||||
if(j.find("socket_address") != j.end())
|
||||
{
|
||||
j.at("socket_address").get_to(o.m_Socket_address);
|
||||
o.m_Socket_addressIsSet = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool Zeromq_preview_settings::isEnabled() const
|
||||
{
|
||||
return m_Enabled;
|
||||
}
|
||||
void Zeromq_preview_settings::setEnabled(bool const value)
|
||||
{
|
||||
m_Enabled = value;
|
||||
}
|
||||
int64_t Zeromq_preview_settings::getPeriodMs() const
|
||||
{
|
||||
return m_Period_ms;
|
||||
}
|
||||
void Zeromq_preview_settings::setPeriodMs(int64_t const value)
|
||||
{
|
||||
m_Period_ms = value;
|
||||
}
|
||||
std::string Zeromq_preview_settings::getSocketAddress() const
|
||||
{
|
||||
return m_Socket_address;
|
||||
}
|
||||
void Zeromq_preview_settings::setSocketAddress(std::string const& value)
|
||||
{
|
||||
m_Socket_address = value;
|
||||
m_Socket_addressIsSet = true;
|
||||
}
|
||||
bool Zeromq_preview_settings::socketAddressIsSet() const
|
||||
{
|
||||
return m_Socket_addressIsSet;
|
||||
}
|
||||
void Zeromq_preview_settings::unsetSocket_address()
|
||||
{
|
||||
m_Socket_addressIsSet = false;
|
||||
}
|
||||
|
||||
|
||||
} // namespace org::openapitools::server::model
|
||||
|
||||
93
broker/gen/model/Zeromq_preview_settings.h
Normal file
93
broker/gen/model/Zeromq_preview_settings.h
Normal file
@@ -0,0 +1,93 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
/*
|
||||
* Zeromq_preview_settings.h
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef Zeromq_preview_settings_H_
|
||||
#define Zeromq_preview_settings_H_
|
||||
|
||||
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
namespace org::openapitools::server::model
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
class Zeromq_preview_settings
|
||||
{
|
||||
public:
|
||||
Zeromq_preview_settings();
|
||||
virtual ~Zeromq_preview_settings() = default;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Validate the current data in the model. Throws a ValidationException on failure.
|
||||
/// </summary>
|
||||
void validate() const;
|
||||
|
||||
/// <summary>
|
||||
/// Validate the current data in the model. Returns false on error and writes an error
|
||||
/// message into the given stringstream.
|
||||
/// </summary>
|
||||
bool validate(std::stringstream& msg) const;
|
||||
|
||||
/// <summary>
|
||||
/// Helper overload for validate. Used when one model stores another model and calls it's validate.
|
||||
/// Not meant to be called outside that case.
|
||||
/// </summary>
|
||||
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
|
||||
|
||||
bool operator==(const Zeromq_preview_settings& rhs) const;
|
||||
bool operator!=(const Zeromq_preview_settings& rhs) const;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// Zeromq_preview_settings members
|
||||
|
||||
/// <summary>
|
||||
/// ZeroMQ preview socket is enabled.
|
||||
/// </summary>
|
||||
bool isEnabled() const;
|
||||
void setEnabled(bool const value);
|
||||
/// <summary>
|
||||
/// Period for generating preview image sent to the ZeroMQ interface in milliseconds. Default is 1 second. If set to zero, all images will be sent ZeroMQ (should be used only in case of relatively slow data collection). This has no effect on HTTP based preview, which updates always at rate of 1 second.
|
||||
/// </summary>
|
||||
int64_t getPeriodMs() const;
|
||||
void setPeriodMs(int64_t const value);
|
||||
/// <summary>
|
||||
/// PUB ZeroMQ socket for preview images. This socket operates at a reduced frame rate. Images are serialized using CBOR. Address follows ZeroMQ convention for sockets - in practice ipc://<socket file> and tpc://<IP address>:<port> sockets are OK. 0.0.0.0 instead of IP address is accepted and means listening on all network interfaces.
|
||||
/// </summary>
|
||||
std::string getSocketAddress() const;
|
||||
void setSocketAddress(std::string const& value);
|
||||
bool socketAddressIsSet() const;
|
||||
void unsetSocket_address();
|
||||
|
||||
friend void to_json(nlohmann::json& j, const Zeromq_preview_settings& o);
|
||||
friend void from_json(const nlohmann::json& j, Zeromq_preview_settings& o);
|
||||
protected:
|
||||
bool m_Enabled;
|
||||
|
||||
int64_t m_Period_ms;
|
||||
|
||||
std::string m_Socket_address;
|
||||
bool m_Socket_addressIsSet;
|
||||
|
||||
};
|
||||
|
||||
} // namespace org::openapitools::server::model
|
||||
|
||||
#endif /* Zeromq_preview_settings_H_ */
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -23,9 +23,9 @@ Zeromq_settings::Zeromq_settings()
|
||||
{
|
||||
m_Send_watermark = 100L;
|
||||
m_Send_watermarkIsSet = false;
|
||||
m_Send_buffer_size = 0L;
|
||||
m_Send_buffer_sizeIsSet = false;
|
||||
m_Image_socketIsSet = false;
|
||||
m_Preview_socket = "";
|
||||
m_Preview_socketIsSet = false;
|
||||
m_Writer_notification_socket = "";
|
||||
m_Writer_notification_socketIsSet = false;
|
||||
|
||||
@@ -69,7 +69,7 @@ bool Zeromq_settings::validate(std::stringstream& msg, const std::string& pathPr
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (imageSocketIsSet())
|
||||
{
|
||||
const std::vector<std::string>& value = m_Image_socket;
|
||||
@@ -90,7 +90,7 @@ bool Zeromq_settings::validate(std::stringstream& msg, const std::string& pathPr
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
@@ -103,12 +103,12 @@ bool Zeromq_settings::operator==(const Zeromq_settings& rhs) const
|
||||
((!sendWatermarkIsSet() && !rhs.sendWatermarkIsSet()) || (sendWatermarkIsSet() && rhs.sendWatermarkIsSet() && getSendWatermark() == rhs.getSendWatermark())) &&
|
||||
|
||||
|
||||
((!sendBufferSizeIsSet() && !rhs.sendBufferSizeIsSet()) || (sendBufferSizeIsSet() && rhs.sendBufferSizeIsSet() && getSendBufferSize() == rhs.getSendBufferSize())) &&
|
||||
|
||||
|
||||
((!imageSocketIsSet() && !rhs.imageSocketIsSet()) || (imageSocketIsSet() && rhs.imageSocketIsSet() && getImageSocket() == rhs.getImageSocket())) &&
|
||||
|
||||
|
||||
((!previewSocketIsSet() && !rhs.previewSocketIsSet()) || (previewSocketIsSet() && rhs.previewSocketIsSet() && getPreviewSocket() == rhs.getPreviewSocket())) &&
|
||||
|
||||
|
||||
((!writerNotificationSocketIsSet() && !rhs.writerNotificationSocketIsSet()) || (writerNotificationSocketIsSet() && rhs.writerNotificationSocketIsSet() && getWriterNotificationSocket() == rhs.getWriterNotificationSocket()))
|
||||
|
||||
;
|
||||
@@ -124,10 +124,10 @@ void to_json(nlohmann::json& j, const Zeromq_settings& o)
|
||||
j = nlohmann::json::object();
|
||||
if(o.sendWatermarkIsSet())
|
||||
j["send_watermark"] = o.m_Send_watermark;
|
||||
if(o.sendBufferSizeIsSet())
|
||||
j["send_buffer_size"] = o.m_Send_buffer_size;
|
||||
if(o.imageSocketIsSet() || !o.m_Image_socket.empty())
|
||||
j["image_socket"] = o.m_Image_socket;
|
||||
if(o.previewSocketIsSet())
|
||||
j["preview_socket"] = o.m_Preview_socket;
|
||||
if(o.writerNotificationSocketIsSet())
|
||||
j["writer_notification_socket"] = o.m_Writer_notification_socket;
|
||||
|
||||
@@ -140,16 +140,16 @@ void from_json(const nlohmann::json& j, Zeromq_settings& o)
|
||||
j.at("send_watermark").get_to(o.m_Send_watermark);
|
||||
o.m_Send_watermarkIsSet = true;
|
||||
}
|
||||
if(j.find("send_buffer_size") != j.end())
|
||||
{
|
||||
j.at("send_buffer_size").get_to(o.m_Send_buffer_size);
|
||||
o.m_Send_buffer_sizeIsSet = true;
|
||||
}
|
||||
if(j.find("image_socket") != j.end())
|
||||
{
|
||||
j.at("image_socket").get_to(o.m_Image_socket);
|
||||
o.m_Image_socketIsSet = true;
|
||||
}
|
||||
if(j.find("preview_socket") != j.end())
|
||||
{
|
||||
j.at("preview_socket").get_to(o.m_Preview_socket);
|
||||
o.m_Preview_socketIsSet = true;
|
||||
}
|
||||
if(j.find("writer_notification_socket") != j.end())
|
||||
{
|
||||
j.at("writer_notification_socket").get_to(o.m_Writer_notification_socket);
|
||||
@@ -175,6 +175,23 @@ void Zeromq_settings::unsetSend_watermark()
|
||||
{
|
||||
m_Send_watermarkIsSet = false;
|
||||
}
|
||||
int64_t Zeromq_settings::getSendBufferSize() const
|
||||
{
|
||||
return m_Send_buffer_size;
|
||||
}
|
||||
void Zeromq_settings::setSendBufferSize(int64_t const value)
|
||||
{
|
||||
m_Send_buffer_size = value;
|
||||
m_Send_buffer_sizeIsSet = true;
|
||||
}
|
||||
bool Zeromq_settings::sendBufferSizeIsSet() const
|
||||
{
|
||||
return m_Send_buffer_sizeIsSet;
|
||||
}
|
||||
void Zeromq_settings::unsetSend_buffer_size()
|
||||
{
|
||||
m_Send_buffer_sizeIsSet = false;
|
||||
}
|
||||
std::vector<std::string> Zeromq_settings::getImageSocket() const
|
||||
{
|
||||
return m_Image_socket;
|
||||
@@ -192,23 +209,6 @@ void Zeromq_settings::unsetImage_socket()
|
||||
{
|
||||
m_Image_socketIsSet = false;
|
||||
}
|
||||
std::string Zeromq_settings::getPreviewSocket() const
|
||||
{
|
||||
return m_Preview_socket;
|
||||
}
|
||||
void Zeromq_settings::setPreviewSocket(std::string const& value)
|
||||
{
|
||||
m_Preview_socket = value;
|
||||
m_Preview_socketIsSet = true;
|
||||
}
|
||||
bool Zeromq_settings::previewSocketIsSet() const
|
||||
{
|
||||
return m_Preview_socketIsSet;
|
||||
}
|
||||
void Zeromq_settings::unsetPreview_socket()
|
||||
{
|
||||
m_Preview_socketIsSet = false;
|
||||
}
|
||||
std::string Zeromq_settings::getWriterNotificationSocket() const
|
||||
{
|
||||
return m_Writer_notification_socket;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Jungfraujoch
|
||||
* Jungfraujoch Broker Web API
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.14
|
||||
* The version of the OpenAPI document: 1.0.0-rc.18
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -67,6 +67,13 @@ public:
|
||||
bool sendWatermarkIsSet() const;
|
||||
void unsetSend_watermark();
|
||||
/// <summary>
|
||||
/// Send buffer size for ZeroMQ socket
|
||||
/// </summary>
|
||||
int64_t getSendBufferSize() const;
|
||||
void setSendBufferSize(int64_t const value);
|
||||
bool sendBufferSizeIsSet() const;
|
||||
void unsetSend_buffer_size();
|
||||
/// <summary>
|
||||
/// PUSH ZeroMQ socket for images. In case multiple sockets are provided, images are streamed over multiple sockets. Images are serialized using CBOR. Address follows ZeroMQ convention for sockets - in practice ipc://<socket file> and tpc://<IP address>:<port> sockets are OK. 0.0.0.0 instead of IP address is accepted and means listening on all network interfaces.
|
||||
/// </summary>
|
||||
std::vector<std::string> getImageSocket() const;
|
||||
@@ -74,13 +81,6 @@ public:
|
||||
bool imageSocketIsSet() const;
|
||||
void unsetImage_socket();
|
||||
/// <summary>
|
||||
/// PUB ZeroMQ socket for preview images. This socket operates at a reduced frame rate. Images are serialized using CBOR. Address follows ZeroMQ convention for sockets - in practice ipc://<socket file> and tpc://<IP address>:<port> sockets are OK. 0.0.0.0 instead of IP address is accepted and means listening on all network interfaces.
|
||||
/// </summary>
|
||||
std::string getPreviewSocket() const;
|
||||
void setPreviewSocket(std::string const& value);
|
||||
bool previewSocketIsSet() const;
|
||||
void unsetPreview_socket();
|
||||
/// <summary>
|
||||
/// PULL ZeroMQ socket for notifications from writer that it finished operation. This allows Jungfraujoch to operate in a synchronous manner, with end of acquisition being also end of writing. Address follows ZeroMQ convention for sockets - in practice ipc://<socket file> and tpc://<IP address>:<port> sockets are OK. 0.0.0.0 instead of IP address should be avoided, as this socket address is forwarded to the writer process via START ZerOMQ message and in case of multiple ineterfaces the address might be ambigous. Using * (star) instead of port number is allowed and it means a random free port number.
|
||||
/// </summary>
|
||||
std::string getWriterNotificationSocket() const;
|
||||
@@ -93,10 +93,10 @@ public:
|
||||
protected:
|
||||
int64_t m_Send_watermark;
|
||||
bool m_Send_watermarkIsSet;
|
||||
int64_t m_Send_buffer_size;
|
||||
bool m_Send_buffer_sizeIsSet;
|
||||
std::vector<std::string> m_Image_socket;
|
||||
bool m_Image_socketIsSet;
|
||||
std::string m_Preview_socket;
|
||||
bool m_Preview_socketIsSet;
|
||||
std::string m_Writer_notification_socket;
|
||||
bool m_Writer_notification_socketIsSet;
|
||||
|
||||
|
||||
@@ -1,11 +1,34 @@
|
||||
openapi: 3.0.3
|
||||
info:
|
||||
title: Jungfraujoch
|
||||
description: Jungfraujoch Broker Web API
|
||||
version: 1.0.0-rc.14
|
||||
description: |
|
||||
API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland).
|
||||
Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU.
|
||||
Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
version: 1.0.0-rc.18
|
||||
contact:
|
||||
name: Filip Leonarski (Paul Scherrer Institute)
|
||||
email: filip.leonarski@psi.ch
|
||||
servers:
|
||||
- url: http://localhost:5232
|
||||
description: Test Jungfraujoch system
|
||||
components:
|
||||
parameters:
|
||||
binning:
|
||||
in: query
|
||||
name: binning
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
description: Binning of frames for the plot (0 = default binning)
|
||||
compression:
|
||||
in: query
|
||||
name: compression
|
||||
required: false
|
||||
schema:
|
||||
type: boolean
|
||||
default: true
|
||||
description: Enable DEFLATE compression of output data.
|
||||
schemas:
|
||||
rotation_axis:
|
||||
description: Definition of a crystal rotation axis
|
||||
@@ -308,6 +331,14 @@ components:
|
||||
default: true
|
||||
description: |
|
||||
Mask multipixels on chip boundary
|
||||
detector_power_state:
|
||||
type: string
|
||||
description: Power on of ASICs
|
||||
enum: [ "PowerOn", "PowerOff", "Partial" ]
|
||||
detector_state:
|
||||
type: string
|
||||
description: Current state of the detector
|
||||
enum: [ "Idle", "Waiting", "Busy", "Error", "Not connected"]
|
||||
detector_status:
|
||||
type: object
|
||||
required:
|
||||
@@ -319,13 +350,9 @@ components:
|
||||
- high_voltage_V
|
||||
properties:
|
||||
state:
|
||||
type: string
|
||||
description: Current state of the detector
|
||||
enum: ["Idle", "Waiting", "Busy", "Error"]
|
||||
$ref: '#/components/schemas/detector_state'
|
||||
powerchip:
|
||||
type: string
|
||||
description: Power on of ASICs
|
||||
enum: ["PowerOn", "PowerOff", "Partial"]
|
||||
$ref: '#/components/schemas/detector_power_state'
|
||||
server_version:
|
||||
type: string
|
||||
description: Detector server (on read-out boards) version
|
||||
@@ -345,19 +372,14 @@ components:
|
||||
items:
|
||||
type: integer
|
||||
format: int64
|
||||
detector_timing:
|
||||
type: string
|
||||
enum: [auto, trigger, burst, gated]
|
||||
default: trigger
|
||||
detector_settings:
|
||||
type: object
|
||||
required:
|
||||
- frame_time_us
|
||||
- storage_cell_count
|
||||
- storage_cell_delay_ns
|
||||
- internal_frame_generator
|
||||
- internal_frame_generator_images
|
||||
- pedestal_g0_frames
|
||||
- pedestal_g1_frames
|
||||
- pedestal_g2_frames
|
||||
- pedestal_g0_rms_limit
|
||||
- pedestal_min_image_count
|
||||
properties:
|
||||
frame_time_us:
|
||||
type: integer
|
||||
@@ -368,12 +390,6 @@ components:
|
||||
type: integer
|
||||
description: Integration time of the detector. If not provided count time will be set to maximum value for a given frame time.
|
||||
format: int64
|
||||
storage_cell_count:
|
||||
type: integer
|
||||
format: int64
|
||||
default: 1
|
||||
minimum: 1
|
||||
maximum: 16
|
||||
internal_frame_generator:
|
||||
type: boolean
|
||||
default: false
|
||||
@@ -384,50 +400,63 @@ components:
|
||||
default: 1
|
||||
minimum: 1
|
||||
maximum: 128
|
||||
pedestal_g0_frames:
|
||||
type: integer
|
||||
format: int64
|
||||
default: 2000
|
||||
minimum: 0
|
||||
pedestal_g1_frames:
|
||||
type: integer
|
||||
format: int64
|
||||
default: 300
|
||||
minimum: 0
|
||||
pedestal_g2_frames:
|
||||
type: integer
|
||||
format: int64
|
||||
default: 300
|
||||
minimum: 0
|
||||
pedestal_g0_rms_limit:
|
||||
type: integer
|
||||
format: int64
|
||||
default: 100
|
||||
minimum: 0
|
||||
description: Pixels with pedestal G0 RMS above the threshold are marked as masked pixels
|
||||
pedestal_min_image_count:
|
||||
type: integer
|
||||
format: int64
|
||||
default: 128
|
||||
minimum: 32
|
||||
description: Minimum number of collected images for pedestal to consider it viable
|
||||
storage_cell_delay_ns:
|
||||
type: integer
|
||||
format: int64
|
||||
minimum: 2100
|
||||
default: 5000
|
||||
description: Delay between two storage cells [ns]
|
||||
detector_trigger_delay_ns:
|
||||
type: integer
|
||||
format: int64
|
||||
minimum: 0
|
||||
default: 0
|
||||
description: Delay between TTL trigger and acquisition start [ns]
|
||||
fixed_gain_g1:
|
||||
timing:
|
||||
$ref: '#/components/schemas/detector_timing'
|
||||
eiger_threshold_keV:
|
||||
type: number
|
||||
format: float
|
||||
minimum: 1.0
|
||||
maximum: 100.0
|
||||
jungfrau_pedestal_g0_frames:
|
||||
type: integer
|
||||
format: int64
|
||||
default: 2000
|
||||
minimum: 0
|
||||
jungfrau_pedestal_g1_frames:
|
||||
type: integer
|
||||
format: int64
|
||||
default: 300
|
||||
minimum: 0
|
||||
jungfrau_pedestal_g2_frames:
|
||||
type: integer
|
||||
format: int64
|
||||
default: 300
|
||||
minimum: 0
|
||||
jungfrau_pedestal_g0_rms_limit:
|
||||
type: integer
|
||||
format: int64
|
||||
default: 100
|
||||
minimum: 0
|
||||
description: Pixels with pedestal G0 RMS above the threshold are marked as masked pixels
|
||||
jungfrau_pedestal_min_image_count:
|
||||
type: integer
|
||||
format: int64
|
||||
default: 128
|
||||
minimum: 32
|
||||
description: Minimum number of collected images for pedestal to consider it viable
|
||||
jungfrau_storage_cell_count:
|
||||
type: integer
|
||||
format: int64
|
||||
default: 1
|
||||
minimum: 1
|
||||
maximum: 16
|
||||
jungfrau_storage_cell_delay_ns:
|
||||
type: integer
|
||||
format: int64
|
||||
minimum: 2100
|
||||
default: 5000
|
||||
description: Delay between two storage cells [ns]
|
||||
jungfrau_fixed_gain_g1:
|
||||
type: boolean
|
||||
default: false
|
||||
description: Fix gain to G1 (can be useful for storage cells)
|
||||
use_gain_hg0:
|
||||
jungfrau_use_gain_hg0:
|
||||
type: boolean
|
||||
default: false
|
||||
description: Use high G0 (for low energy applications)
|
||||
@@ -537,6 +566,7 @@ components:
|
||||
- height
|
||||
- serial_number
|
||||
- base_ipv4_addr
|
||||
- udp_interface_count
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
@@ -665,6 +695,7 @@ components:
|
||||
- hbm_temp_C
|
||||
- packets_sls
|
||||
- packets_udp
|
||||
- idle
|
||||
properties:
|
||||
pci_dev_id:
|
||||
type: string
|
||||
@@ -693,11 +724,12 @@ components:
|
||||
packets_sls:
|
||||
type: integer
|
||||
format: int64
|
||||
idle:
|
||||
type: boolean
|
||||
broker_status:
|
||||
type: object
|
||||
required:
|
||||
- state
|
||||
- device
|
||||
properties:
|
||||
state:
|
||||
type: string
|
||||
@@ -705,15 +737,10 @@ components:
|
||||
progress:
|
||||
type: number
|
||||
format: float
|
||||
description: Progress of data collection (only available if receiving is running)
|
||||
example: 1.0
|
||||
minimum: 0.0
|
||||
maximum: 1.0
|
||||
indexing_rate:
|
||||
type: number
|
||||
format: float
|
||||
example: 0.10
|
||||
minimum: 0.0
|
||||
maximum: 1.0
|
||||
plot:
|
||||
type: object
|
||||
required:
|
||||
@@ -788,6 +815,32 @@ components:
|
||||
masked_pixels:
|
||||
type: integer
|
||||
format: int64
|
||||
jfjoch_statistics:
|
||||
type: object
|
||||
description: "Pool statistics for Jungfraujoch to reduce transfers between frontend and jfjoch_broker"
|
||||
properties:
|
||||
detector:
|
||||
$ref: '#/components/schemas/detector_status'
|
||||
detector_list:
|
||||
$ref: '#/components/schemas/detector_list'
|
||||
detector_settings:
|
||||
$ref: '#/components/schemas/detector_settings'
|
||||
image_format_settings:
|
||||
$ref: '#/components/schemas/image_format_settings'
|
||||
instrument_metadata:
|
||||
$ref: '#/components/schemas/instrument_metadata'
|
||||
data_processing_settings:
|
||||
$ref: '#/components/schemas/spot_finding_settings'
|
||||
measurement:
|
||||
$ref: '#/components/schemas/measurement_statistics'
|
||||
broker:
|
||||
$ref: '#/components/schemas/broker_status'
|
||||
fpga:
|
||||
$ref: '#/components/schemas/fpga_status'
|
||||
calibration:
|
||||
$ref: '#/components/schemas/calibration_statistics'
|
||||
zeromq_preview:
|
||||
$ref: '#/components/schemas/zeromq_preview_settings'
|
||||
preview_settings:
|
||||
type: object
|
||||
description: "Settings for JPEG rendering of preview images"
|
||||
@@ -1040,6 +1093,10 @@ components:
|
||||
minimum: 1
|
||||
maximum: 2
|
||||
default: 1
|
||||
module_sync:
|
||||
type: boolean
|
||||
default: true
|
||||
description: Use module 0 as master for timing. Only applies to JUNGFRAU detector (this cannot be turned off for EIGER).
|
||||
sensor_thickness_um:
|
||||
type: number
|
||||
format: float
|
||||
@@ -1093,6 +1150,10 @@ components:
|
||||
maximum: 16384
|
||||
default: 100
|
||||
description: Watermark for ZeroMQ send queue (number of outstanding messages queued on Jungfraujoch server per queue)
|
||||
send_buffer_size:
|
||||
type: integer
|
||||
format: int64
|
||||
description: Send buffer size for ZeroMQ socket
|
||||
image_socket:
|
||||
type: array
|
||||
items:
|
||||
@@ -1103,14 +1164,6 @@ components:
|
||||
Images are serialized using CBOR.
|
||||
Address follows ZeroMQ convention for sockets - in practice ipc://<socket file> and tpc://<IP address>:<port> sockets are OK.
|
||||
0.0.0.0 instead of IP address is accepted and means listening on all network interfaces.
|
||||
preview_socket:
|
||||
type: string
|
||||
example: "tcp://1.2.3.4:6000"
|
||||
description: |
|
||||
PUB ZeroMQ socket for preview images. This socket operates at a reduced frame rate.
|
||||
Images are serialized using CBOR.
|
||||
Address follows ZeroMQ convention for sockets - in practice ipc://<socket file> and tpc://<IP address>:<port> sockets are OK.
|
||||
0.0.0.0 instead of IP address is accepted and means listening on all network interfaces.
|
||||
writer_notification_socket:
|
||||
type: string
|
||||
example: "tcp://1.3.4.6:7000"
|
||||
@@ -1166,7 +1219,6 @@ components:
|
||||
image_buffer_MiB:
|
||||
type: integer
|
||||
minimum: 128
|
||||
maximum: 16384
|
||||
default: 2048
|
||||
description: Size of internal buffer in MiB for images before they are sent to a stream
|
||||
receiver_threads:
|
||||
@@ -1183,6 +1235,33 @@ components:
|
||||
description: Location of built JavaScript web frontend
|
||||
image_pusher:
|
||||
$ref: '#/components/schemas/image_pusher_type'
|
||||
zeromq_preview:
|
||||
$ref: '#/components/schemas/zeromq_preview_settings'
|
||||
zeromq_preview_settings:
|
||||
type: object
|
||||
required:
|
||||
- enabled
|
||||
- period_ms
|
||||
properties:
|
||||
enabled:
|
||||
type: boolean
|
||||
default: true
|
||||
description: ZeroMQ preview socket is enabled.
|
||||
period_ms:
|
||||
type: integer
|
||||
format: int64
|
||||
default: 1000
|
||||
description: |
|
||||
Period for generating preview image sent to the ZeroMQ interface in milliseconds. Default is 1 second.
|
||||
If set to zero, all images will be sent ZeroMQ (should be used only in case of relatively slow data collection).
|
||||
This has no effect on HTTP based preview, which updates always at rate of 1 second.
|
||||
socket_address:
|
||||
type: string
|
||||
description: |
|
||||
PUB ZeroMQ socket for preview images. This socket operates at a reduced frame rate.
|
||||
Images are serialized using CBOR.
|
||||
Address follows ZeroMQ convention for sockets - in practice ipc://<socket file> and tpc://<IP address>:<port> sockets are OK.
|
||||
0.0.0.0 instead of IP address is accepted and means listening on all network interfaces.
|
||||
paths:
|
||||
/initialize:
|
||||
post:
|
||||
@@ -1634,6 +1713,44 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/detector_list'
|
||||
/config/zeromq_preview:
|
||||
put:
|
||||
summary: Set ZeroMQ preview settings
|
||||
description: |
|
||||
Jungfraujoch can generate preview message stream on ZeroMQ SUB socket.
|
||||
Here settings of the socket can be adjusted.
|
||||
While the data structure contains also socket_address, this cannot be changed via HTTP and is ignore in PUT request.
|
||||
Options set with this PUT request have no effect on HTTP based preview.
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/zeromq_preview_settings'
|
||||
responses:
|
||||
"200":
|
||||
description: Everything OK
|
||||
"400":
|
||||
description: Input parsing or validation error
|
||||
content:
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
description: Exception error
|
||||
"500":
|
||||
description: Error within Jungfraujoch code - see output message.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/error_message'
|
||||
get:
|
||||
summary: Get ZeroMQ preview settings
|
||||
responses:
|
||||
"200":
|
||||
description: Everything OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/zeromq_preview_settings'
|
||||
/status:
|
||||
get:
|
||||
summary: Get Jungfraujoch status
|
||||
@@ -1779,15 +1896,11 @@ paths:
|
||||
summary: Generate background estimate plot
|
||||
description: Mean intensity for d = 3 - 5 A per image; binning is configurable
|
||||
parameters:
|
||||
- in: query
|
||||
name: binning
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
description: Binning of frames for the plot (0 = default binning)
|
||||
- $ref: '#/components/parameters/binning'
|
||||
- $ref: '#/components/parameters/compression'
|
||||
responses:
|
||||
"200":
|
||||
description: Everything OK
|
||||
description: Everything OK. Response will be by default compressed with deflate algorithm, if using curl, use --compressed option.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
@@ -1804,15 +1917,11 @@ paths:
|
||||
summary: Generate spot count plot
|
||||
description: Number of spots per image; binning is configurable
|
||||
parameters:
|
||||
- in: query
|
||||
name: binning
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
description: Binning of frames for the plot (0 = default binning)
|
||||
- $ref: '#/components/parameters/binning'
|
||||
- $ref: '#/components/parameters/compression'
|
||||
responses:
|
||||
"200":
|
||||
description: Everything OK
|
||||
description: Response will be by default compressed with deflate algorithm, if using curl, use --compressed option.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
@@ -1829,15 +1938,11 @@ paths:
|
||||
summary: Generate indexing rate plot
|
||||
description: Image indexing rate; binning is configurable
|
||||
parameters:
|
||||
- in: query
|
||||
name: binning
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
description: Binning of frames for the plot (0 = default binning)
|
||||
- $ref: '#/components/parameters/binning'
|
||||
- $ref: '#/components/parameters/compression'
|
||||
responses:
|
||||
"200":
|
||||
description: Everything OK
|
||||
description: Response will be by default compressed with deflate algorithm, if using curl, use --compressed option.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
@@ -1854,15 +1959,11 @@ paths:
|
||||
summary: Generate error pixels plot
|
||||
description: Count of error (mean) and saturated (mean/max) pixels per image; binning is configurable
|
||||
parameters:
|
||||
- in: query
|
||||
name: binning
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
description: Binning of frames for the plot (0 = default binning)
|
||||
- $ref: '#/components/parameters/binning'
|
||||
- $ref: '#/components/parameters/compression'
|
||||
responses:
|
||||
"200":
|
||||
description: Everything OK
|
||||
description: Response will be by default compressed with deflate algorithm, if using curl, use --compressed option.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
@@ -1879,15 +1980,11 @@ paths:
|
||||
summary: Generate strong pixels plot
|
||||
description: Count of strong pixels per image (from spot finding); binning is configurable
|
||||
parameters:
|
||||
- in: query
|
||||
name: binning
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
description: Binning of frames for the plot (0 = default binning)
|
||||
- $ref: '#/components/parameters/binning'
|
||||
- $ref: '#/components/parameters/compression'
|
||||
responses:
|
||||
"200":
|
||||
description: Everything OK
|
||||
description: Response will be by default compressed with deflate algorithm, if using curl, use --compressed option.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
@@ -1904,15 +2001,11 @@ paths:
|
||||
summary: Generate ROI sum plot
|
||||
description: Sum of ROI rectangle per image; binning is configurable
|
||||
parameters:
|
||||
- in: query
|
||||
name: binning
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
description: Binning of frames for the plot (0 = default binning)
|
||||
- $ref: '#/components/parameters/binning'
|
||||
- $ref: '#/components/parameters/compression'
|
||||
responses:
|
||||
"200":
|
||||
description: Everything OK
|
||||
description: Response will be by default compressed with deflate algorithm, if using curl, use --compressed option.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
@@ -1929,15 +2022,11 @@ paths:
|
||||
summary: Generate plot of ROI max count
|
||||
description: Max count of ROI per image; binning is configurable
|
||||
parameters:
|
||||
- in: query
|
||||
name: binning
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
description: Binning of frames for the plot (0 = default binning)
|
||||
- $ref: '#/components/parameters/binning'
|
||||
- $ref: '#/components/parameters/compression'
|
||||
responses:
|
||||
"200":
|
||||
description: Everything OK
|
||||
description: Response will be by default compressed with deflate algorithm, if using curl, use --compressed option.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
@@ -1954,15 +2043,11 @@ paths:
|
||||
summary: Generate plot of ROI valid pixels
|
||||
description: Number of pixels within a ROI area; pixels with special values (overload, bad pixel) are excluded; multipixels are counted just once; binning is configurable
|
||||
parameters:
|
||||
- in: query
|
||||
name: binning
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
description: Binning of frames for the plot (0 = default binning)
|
||||
- $ref: '#/components/parameters/binning'
|
||||
- $ref: '#/components/parameters/compression'
|
||||
responses:
|
||||
"200":
|
||||
description: Everything OK
|
||||
description: Response will be by default compressed with deflate algorithm, if using curl, use --compressed option.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
@@ -1979,12 +2064,8 @@ paths:
|
||||
summary: Generate receiver delay plot
|
||||
description: Amount of frames the receiver is behind the FPGA for each image - used for internal debugging; binning is configurable
|
||||
parameters:
|
||||
- in: query
|
||||
name: binning
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
description: Binning of frames for the plot (0 = default binning)
|
||||
- $ref: '#/components/parameters/binning'
|
||||
- $ref: '#/components/parameters/compression'
|
||||
responses:
|
||||
"200":
|
||||
description: Everything OK
|
||||
@@ -2004,12 +2085,8 @@ paths:
|
||||
summary: Generate receiver free send buffer plot
|
||||
description: Amount of send buffers available during frame processing - used for internal debugging; binning is configurable
|
||||
parameters:
|
||||
- in: query
|
||||
name: binning
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
description: Binning of frames for the plot (0 = default binning)
|
||||
- $ref: '#/components/parameters/binning'
|
||||
- $ref: '#/components/parameters/compression'
|
||||
responses:
|
||||
"200":
|
||||
description: Everything OK
|
||||
@@ -2030,12 +2107,8 @@ paths:
|
||||
summary: Generate image collection efficiency plot
|
||||
description: Ratio of collected and expected packets per image; binning is configurable
|
||||
parameters:
|
||||
- in: query
|
||||
name: binning
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
description: Binning of frames for the plot (0 = default binning)
|
||||
- $ref: '#/components/parameters/binning'
|
||||
- $ref: '#/components/parameters/compression'
|
||||
responses:
|
||||
"200":
|
||||
description: Everything OK
|
||||
@@ -2054,6 +2127,8 @@ paths:
|
||||
get:
|
||||
summary: Generate radial integration profile
|
||||
description: Generate average radial integration profile
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/compression'
|
||||
responses:
|
||||
"200":
|
||||
description: Everything OK
|
||||
@@ -2061,6 +2136,18 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/plots'
|
||||
/statistics:
|
||||
get:
|
||||
summary: Get general statistics
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/compression'
|
||||
responses:
|
||||
"200":
|
||||
description: Everything OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/jfjoch_statistics'
|
||||
/statistics/data_collection:
|
||||
get:
|
||||
summary: Get data collection statistics
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user