From b605b95127ba8b87ff676f938dcd60228650e5d3 Mon Sep 17 00:00:00 2001 From: leonarski_f Date: Fri, 11 Oct 2024 11:11:37 +0200 Subject: [PATCH] version 1.0.0-rc.16 --- .gitlab-ci.yml | 123 +-- DEPLOYMENT.md | 144 +++ HARDWARE.md | 55 ++ README.md | 66 +- VERSION | 2 +- acquisition_device/AcquisitionCounters.cpp | 3 +- broker/JFJochBrokerParser.cpp | 15 +- broker/OpenAPIConvert.cpp | 172 ++-- broker/gen/api/ApiBase.h | 4 +- broker/gen/api/DefaultApi.cpp | 4 +- broker/gen/api/DefaultApi.h | 4 +- broker/gen/model/Azim_int_settings.cpp | 4 +- broker/gen/model/Azim_int_settings.h | 4 +- broker/gen/model/Broker_status.cpp | 4 +- broker/gen/model/Broker_status.h | 4 +- .../model/Calibration_statistics_inner.cpp | 4 +- .../gen/model/Calibration_statistics_inner.h | 4 +- broker/gen/model/Dataset_settings.cpp | 4 +- broker/gen/model/Dataset_settings.h | 4 +- .../gen/model/Dataset_settings_unit_cell.cpp | 4 +- broker/gen/model/Dataset_settings_unit_cell.h | 4 +- broker/gen/model/Detector.cpp | 4 +- broker/gen/model/Detector.h | 4 +- broker/gen/model/Detector_list.cpp | 4 +- broker/gen/model/Detector_list.h | 4 +- .../model/Detector_list_detectors_inner.cpp | 4 +- .../gen/model/Detector_list_detectors_inner.h | 4 +- broker/gen/model/Detector_module.cpp | 4 +- broker/gen/model/Detector_module.h | 4 +- .../gen/model/Detector_module_direction.cpp | 4 +- broker/gen/model/Detector_module_direction.h | 4 +- broker/gen/model/Detector_power_state.cpp | 122 +++ broker/gen/model/Detector_power_state.h | 80 ++ broker/gen/model/Detector_selection.cpp | 4 +- broker/gen/model/Detector_selection.h | 4 +- broker/gen/model/Detector_settings.cpp | 695 +++++++++----- broker/gen/model/Detector_settings.h | 167 ++-- broker/gen/model/Detector_state.cpp | 134 +++ broker/gen/model/Detector_state.h | 82 ++ broker/gen/model/Detector_status.cpp | 14 +- broker/gen/model/Detector_status.h | 22 +- broker/gen/model/Detector_timing.cpp | 128 +++ broker/gen/model/Detector_timing.h | 81 ++ broker/gen/model/Detector_type.cpp | 4 +- broker/gen/model/Detector_type.h | 4 +- broker/gen/model/Error_message.cpp | 4 +- broker/gen/model/Error_message.h | 4 +- broker/gen/model/Fpga_status_inner.cpp | 4 +- broker/gen/model/Fpga_status_inner.h | 4 +- broker/gen/model/Helpers.cpp | 4 +- broker/gen/model/Helpers.h | 4 +- broker/gen/model/Image_format_settings.cpp | 4 +- broker/gen/model/Image_format_settings.h | 4 +- broker/gen/model/Image_pusher_type.cpp | 4 +- broker/gen/model/Image_pusher_type.h | 4 +- broker/gen/model/Instrument_metadata.cpp | 4 +- broker/gen/model/Instrument_metadata.h | 4 +- broker/gen/model/Jfjoch_settings.cpp | 9 +- broker/gen/model/Jfjoch_settings.h | 4 +- broker/gen/model/Measurement_statistics.cpp | 4 +- broker/gen/model/Measurement_statistics.h | 4 +- broker/gen/model/Pcie_devices_inner.cpp | 4 +- broker/gen/model/Pcie_devices_inner.h | 4 +- broker/gen/model/Plot.cpp | 4 +- broker/gen/model/Plot.h | 4 +- broker/gen/model/Plots.cpp | 4 +- broker/gen/model/Plots.h | 4 +- broker/gen/model/Preview_settings.cpp | 4 +- broker/gen/model/Preview_settings.h | 4 +- broker/gen/model/Roi_box.cpp | 4 +- broker/gen/model/Roi_box.h | 4 +- broker/gen/model/Roi_box_list.cpp | 4 +- broker/gen/model/Roi_box_list.h | 4 +- broker/gen/model/Roi_circle.cpp | 4 +- broker/gen/model/Roi_circle.h | 4 +- broker/gen/model/Roi_circle_list.cpp | 4 +- broker/gen/model/Roi_circle_list.h | 4 +- broker/gen/model/Rotation_axis.cpp | 4 +- broker/gen/model/Rotation_axis.h | 4 +- broker/gen/model/Spot_finding_settings.cpp | 4 +- broker/gen/model/Spot_finding_settings.h | 4 +- .../gen/model/Standard_detector_geometry.cpp | 4 +- broker/gen/model/Standard_detector_geometry.h | 4 +- broker/gen/model/Zeromq_settings.cpp | 35 +- broker/gen/model/Zeromq_settings.h | 13 +- broker/jfjoch_api.yaml | 134 +-- broker/redoc-static.html | 250 +++-- common/DetectorSettings.cpp | 31 + common/DetectorSettings.h | 12 +- common/DiffractionExperiment.cpp | 21 +- common/DiffractionExperiment.h | 2 + detector_control/DetectorWrapper.cpp | 47 +- detector_control/DetectorWrapper.h | 2 +- fpga/INSTALL.md | 70 -- fpga/README.md | 11 +- fpga/hls/HLSDevice.cpp | 104 ++- fpga/hls/parallel_stream.h | 27 +- fpga/host_library/JungfraujochDevice.cpp | 2 +- fpga/pcie_driver/README.md | 7 +- fpga/pcie_driver/dkms.conf | 2 +- fpga/pcie_driver/install_dkms.sh | 5 +- fpga/pcie_driver/jfjoch_drv.c | 2 +- fpga/pcie_driver/pack.sh | 6 - fpga/pcie_driver/postinstall.sh | 2 +- fpga/pcie_driver/preuninstall.sh | 2 +- frontend/src/App.tsx | 7 +- .../src/components/DataProcessingPlot.tsx | 35 +- .../src/components/DataProcessingPlots.tsx | 38 +- frontend/src/components/DetectorSettings.tsx | 473 ++++++---- frontend/src/components/DetectorStatus.tsx | 42 +- .../src/components/ImageFormatSettings.tsx | 41 +- .../src/components/InstrumentMetadata.tsx | 15 +- ...tegerTextField.tsx => NumberTextField.tsx} | 18 +- frontend/src/components/PreviewImage.tsx | 4 +- frontend/src/openapi/core/OpenAPI.ts | 4 +- frontend/src/openapi/index.ts | 5 +- .../openapi/models/detector_power_state.ts | 13 + .../src/openapi/models/detector_settings.ts | 44 +- frontend/src/openapi/models/detector_state.ts | 15 + .../src/openapi/models/detector_status.ts | 37 +- .../src/openapi/models/detector_timing.ts | 11 + .../src/openapi/models/zeromq_settings.ts | 4 + frontend/src/version.ts | 2 +- gitlab_upload_release.sh | 32 + image_pusher/CMakeLists.txt | 2 + image_pusher/NonePusher.cpp | 25 + image_pusher/NonePusher.h | 19 + image_pusher/ZMQStream2Pusher.cpp | 11 +- image_pusher/ZMQStream2Pusher.h | 4 +- python-client/README.md | 34 +- python-client/docs/AzimIntSettings.md | 2 +- python-client/docs/BrokerStatus.md | 2 +- .../docs/CalibrationStatisticsInner.md | 2 +- python-client/docs/DatasetSettings.md | 2 +- python-client/docs/DatasetSettingsUnitCell.md | 2 +- python-client/docs/DefaultApi.md | 864 +++++++++--------- python-client/docs/Detector.md | 2 +- python-client/docs/DetectorList.md | 2 +- .../docs/DetectorListDetectorsInner.md | 2 +- python-client/docs/DetectorModule.md | 2 +- python-client/docs/DetectorPowerState.md | 15 + python-client/docs/DetectorSelection.md | 2 +- python-client/docs/DetectorSettings.md | 26 +- python-client/docs/DetectorState.md | 19 + python-client/docs/DetectorStatus.md | 6 +- python-client/docs/DetectorTiming.md | 16 + python-client/docs/ErrorMessage.md | 2 +- python-client/docs/FpgaStatusInner.md | 2 +- python-client/docs/ImageFormatSettings.md | 2 +- python-client/docs/InstrumentMetadata.md | 2 +- python-client/docs/JfjochSettings.md | 2 +- python-client/docs/MeasurementStatistics.md | 2 +- python-client/docs/PcieDevicesInner.md | 2 +- python-client/docs/Plot.md | 2 +- python-client/docs/Plots.md | 2 +- python-client/docs/PreviewSettings.md | 2 +- python-client/docs/RoiBox.md | 2 +- python-client/docs/RoiBoxList.md | 2 +- python-client/docs/RoiCircle.md | 2 +- python-client/docs/RoiCircleList.md | 2 +- python-client/docs/RotationAxis.md | 2 +- python-client/docs/SpotFindingSettings.md | 2 +- .../docs/StandardDetectorGeometry.md | 2 +- python-client/docs/ZeromqSettings.md | 3 +- python-client/jfjoch_client/__init__.py | 70 ++ python-client/jfjoch_client/api/__init__.py | 5 + .../api/default_api.py | 44 +- .../api_client.py | 18 +- .../api_response.py | 0 .../configuration.py | 16 +- .../exceptions.py | 4 +- .../jfjoch_client/models/__init__.py | 53 ++ .../models/azim_int_settings.py | 4 +- .../models/broker_status.py | 4 +- .../models/calibration_statistics_inner.py | 4 +- .../models/dataset_settings.py | 8 +- .../models/dataset_settings_unit_cell.py | 4 +- .../models/detector.py | 10 +- .../models/detector_list.py | 6 +- .../models/detector_list_detectors_inner.py | 4 +- .../models/detector_module.py | 6 +- .../models/detector_module_direction.py | 4 +- .../models/detector_power_state.py | 39 + .../models/detector_selection.py | 4 +- .../jfjoch_client/models/detector_settings.py | 120 +++ .../jfjoch_client/models/detector_state.py | 41 + .../models/detector_status.py | 26 +- .../jfjoch_client/models/detector_timing.py | 40 + .../models/detector_type.py | 4 +- .../models/error_message.py | 4 +- .../models/fpga_status_inner.py | 4 +- .../models/image_format_settings.py | 4 +- .../models/image_pusher_type.py | 4 +- .../models/instrument_metadata.py | 4 +- .../models/jfjoch_settings.py | 22 +- .../models/measurement_statistics.py | 4 +- .../models/pcie_devices_inner.py | 4 +- .../models/plot.py | 4 +- .../models/plots.py | 6 +- .../models/preview_settings.py | 4 +- .../models/roi_box.py | 4 +- .../models/roi_box_list.py | 6 +- .../models/roi_circle.py | 4 +- .../models/roi_circle_list.py | 6 +- .../models/rotation_axis.py | 4 +- .../models/spot_finding_settings.py | 4 +- .../models/standard_detector_geometry.py | 4 +- .../models/zeromq_settings.py | 10 +- .../py.typed | 0 .../{openapi_client => jfjoch_client}/rest.py | 6 +- python-client/openapi_client/__init__.py | 67 -- python-client/openapi_client/api/__init__.py | 5 - .../openapi_client/models/__init__.py | 50 - .../models/detector_settings.py | 115 --- python-client/pyproject.toml | 10 +- python-client/setup.py | 14 +- receiver/JFJochReceiverPlots.cpp | 16 + tests/AcquisitionCountersTest.cpp | 12 +- update_version.sh | 7 +- writer/gen/api/ApiBase.h | 2 +- writer/gen/api/DefaultApi.cpp | 2 +- writer/gen/api/DefaultApi.h | 2 +- writer/gen/model/Helpers.cpp | 2 +- writer/gen/model/Helpers.h | 2 +- writer/gen/model/Writer_statistics.cpp | 2 +- writer/gen/model/Writer_statistics.h | 2 +- writer/writer_api.yaml | 2 +- 227 files changed, 3881 insertions(+), 2176 deletions(-) create mode 100644 DEPLOYMENT.md create mode 100644 HARDWARE.md create mode 100644 broker/gen/model/Detector_power_state.cpp create mode 100644 broker/gen/model/Detector_power_state.h create mode 100644 broker/gen/model/Detector_state.cpp create mode 100644 broker/gen/model/Detector_state.h create mode 100644 broker/gen/model/Detector_timing.cpp create mode 100644 broker/gen/model/Detector_timing.h delete mode 100644 fpga/INSTALL.md delete mode 100755 fpga/pcie_driver/pack.sh rename frontend/src/components/{IntegerTextField.tsx => NumberTextField.tsx} (87%) create mode 100644 frontend/src/openapi/models/detector_power_state.ts create mode 100644 frontend/src/openapi/models/detector_state.ts create mode 100644 frontend/src/openapi/models/detector_timing.ts create mode 100644 gitlab_upload_release.sh create mode 100644 image_pusher/NonePusher.cpp create mode 100644 image_pusher/NonePusher.h create mode 100644 python-client/docs/DetectorPowerState.md create mode 100644 python-client/docs/DetectorState.md create mode 100644 python-client/docs/DetectorTiming.md create mode 100644 python-client/jfjoch_client/__init__.py create mode 100644 python-client/jfjoch_client/api/__init__.py rename python-client/{openapi_client => jfjoch_client}/api/default_api.py (99%) rename python-client/{openapi_client => jfjoch_client}/api_client.py (97%) rename python-client/{openapi_client => jfjoch_client}/api_response.py (100%) rename python-client/{openapi_client => jfjoch_client}/configuration.py (95%) rename python-client/{openapi_client => jfjoch_client}/exceptions.py (94%) create mode 100644 python-client/jfjoch_client/models/__init__.py rename python-client/{openapi_client => jfjoch_client}/models/azim_int_settings.py (91%) rename python-client/{openapi_client => jfjoch_client}/models/broker_status.py (90%) rename python-client/{openapi_client => jfjoch_client}/models/calibration_statistics_inner.py (91%) rename python-client/{openapi_client => jfjoch_client}/models/dataset_settings.py (96%) rename python-client/{openapi_client => jfjoch_client}/models/dataset_settings_unit_cell.py (91%) rename python-client/{openapi_client => jfjoch_client}/models/detector.py (91%) rename python-client/{openapi_client => jfjoch_client}/models/detector_list.py (87%) rename python-client/{openapi_client => jfjoch_client}/models/detector_list_detectors_inner.py (91%) rename python-client/{openapi_client => jfjoch_client}/models/detector_module.py (87%) rename python-client/{openapi_client => jfjoch_client}/models/detector_module_direction.py (68%) create mode 100644 python-client/jfjoch_client/models/detector_power_state.py rename python-client/{openapi_client => jfjoch_client}/models/detector_selection.py (88%) create mode 100644 python-client/jfjoch_client/models/detector_settings.py create mode 100644 python-client/jfjoch_client/models/detector_state.py rename python-client/{openapi_client => jfjoch_client}/models/detector_status.py (79%) create mode 100644 python-client/jfjoch_client/models/detector_timing.py rename python-client/{openapi_client => jfjoch_client}/models/detector_type.py (66%) rename python-client/{openapi_client => jfjoch_client}/models/error_message.py (90%) rename python-client/{openapi_client => jfjoch_client}/models/fpga_status_inner.py (91%) rename python-client/{openapi_client => jfjoch_client}/models/image_format_settings.py (93%) rename python-client/{openapi_client => jfjoch_client}/models/image_pusher_type.py (68%) rename python-client/{openapi_client => jfjoch_client}/models/instrument_metadata.py (91%) rename python-client/{openapi_client => jfjoch_client}/models/jfjoch_settings.py (85%) rename python-client/{openapi_client => jfjoch_client}/models/measurement_statistics.py (95%) rename python-client/{openapi_client => jfjoch_client}/models/pcie_devices_inner.py (89%) rename python-client/{openapi_client => jfjoch_client}/models/plot.py (89%) rename python-client/{openapi_client => jfjoch_client}/models/plots.py (88%) rename python-client/{openapi_client => jfjoch_client}/models/preview_settings.py (92%) rename python-client/{openapi_client => jfjoch_client}/models/roi_box.py (91%) rename python-client/{openapi_client => jfjoch_client}/models/roi_box_list.py (88%) rename python-client/{openapi_client => jfjoch_client}/models/roi_circle.py (90%) rename python-client/{openapi_client => jfjoch_client}/models/roi_circle_list.py (88%) rename python-client/{openapi_client => jfjoch_client}/models/rotation_axis.py (90%) rename python-client/{openapi_client => jfjoch_client}/models/spot_finding_settings.py (94%) rename python-client/{openapi_client => jfjoch_client}/models/standard_detector_geometry.py (91%) rename python-client/{openapi_client => jfjoch_client}/models/zeromq_settings.py (86%) rename python-client/{openapi_client => jfjoch_client}/py.typed (100%) rename python-client/{openapi_client => jfjoch_client}/rest.py (96%) delete mode 100644 python-client/openapi_client/__init__.py delete mode 100644 python-client/openapi_client/api/__init__.py delete mode 100644 python-client/openapi_client/models/__init__.py delete mode 100644 python-client/openapi_client/models/detector_settings.py diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 529d271a..9dbbc9f2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,15 +45,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: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 @@ -313,106 +322,8 @@ release: 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 diff --git a/DEPLOYMENT.md b/DEPLOYMENT.md new file mode 100644 index 00000000..e2720ed5 --- /dev/null +++ b/DEPLOYMENT.md @@ -0,0 +1,144 @@ +# Deployment of Jungfraujoch + +To deploy Jungfraujoch, one needs to follow four steps: + +1. Flash the U55C FPGA card with a proper image and install Linux kernel driver +2. Install main Jungfraujoch code and frontend web interface +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. + +## Flash the U55C FPGA card with a proper image and install Linux kernel driver. + + +### Firmware flashing +1. Install the `xbflash2` tool from Xilinx, which allows to flash the firmware through PCIe connector. + +It can be downloaded as RPM/DEB file from [Alveo product page](https://www.xilinx.com/products/boards-and-kits/alveo/u55c.html#xbflash2). For RHEL9 this needs to built from source - [Xilinx/XRT github repository](https://github.com/Xilinx/XRT). + +2. Check that the card is detected by OS with "lspci |grep Xilinx" and check the PCIe slot number (`11:00.0` in this case): +``` +$ lspci |grep Xilinx +23:00.0 Processing accelerators: Xilinx Corporation Device 3450 (rev 58) +``` +Note the device number `3450` that identifies Jungfraujoch device (Jungfraujoch pass is 3450 m above sea level) and `rev 58` identifying release of the firmware. +3. 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 +23:00.0 Processing accelerators: Xilinx Corporation Device 3450 +(...) +LnkSta: Speed 16GT/s (ok), Width x8 (ok) +(...) +``` + +4. 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). +5. Flash the card with xbflash2. For fresh card use: +``` +sudo xbflash2 program --spi --image --bar-offset 0x1f06000 -d +``` +For card that was already flashed with Jungfraujoch images: + +``` +sudo xbflash2 program --spi --image -d +``` +It is necessary to confirm the operation by pressing `Y` key. +It is safe to run multiple flashing processes in parallel for different cards, for example in separate screen sessions. + +6. 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. + +## Install main Jungfraujoch code and frontend web interface + +On RHEL 8 systems there is a `jfjoch--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= +$ 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`. + +### 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= .. +make jfjoch +``` + +## Install Jungfraujoch Python client +This is under development. \ No newline at end of file diff --git a/HARDWARE.md b/HARDWARE.md new file mode 100644 index 00000000..527c2844 --- /dev/null +++ b/HARDWARE.md @@ -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. + diff --git a/README.md b/README.md index ac75887d..f1168c4f 100644 --- a/README.md +++ b/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 diff --git a/VERSION b/VERSION index ceb7a602..e384ff5d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.0-rc.15 +1.0.0-rc.16 diff --git a/acquisition_device/AcquisitionCounters.cpp b/acquisition_device/AcquisitionCounters.cpp index 0d169a46..14ef5dca 100644 --- a/acquisition_device/AcquisitionCounters.cpp +++ b/acquisition_device/AcquisitionCounters.cpp @@ -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; } diff --git a/broker/JFJochBrokerParser.cpp b/broker/JFJochBrokerParser.cpp index d4c0eeea..86765e33 100644 --- a/broker/JFJochBrokerParser.cpp +++ b/broker/JFJochBrokerParser.cpp @@ -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(); @@ -114,8 +115,18 @@ void ParseFacilityConfiguration(const org::openapitools::server::model::Jfjoch_s std::unique_ptr ParseZMQImagePusher(const org::openapitools::server::model::Jfjoch_settings &j) { if (!j.zeromqIsSet()) throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "ZeroMQ settings must be provided"); + + std::optional send_buffer_size; + if (j.getZeromq().sendBufferSizeIsSet()) + send_buffer_size = j.getZeromq().getSendBufferSize(); + + std::optional send_watermark; + if (j.getZeromq().sendWatermarkIsSet()) + send_watermark = j.getZeromq().getSendWatermark(); + auto tmp = std::make_unique(j.getZeromq().getImageSocket(), - j.getZeromq().getSendWatermark()); + send_watermark, + send_buffer_size); if (j.getZeromq().previewSocketIsSet()) tmp->PreviewSocket(j.getZeromq().getPreviewSocket()); @@ -132,7 +143,7 @@ std::unique_ptr ParseImagePusher(const org::openapitools::server::m case org::openapitools::server::model::Image_pusher_type::eImage_pusher_type::HDF5: return std::make_unique(); case org::openapitools::server::model::Image_pusher_type::eImage_pusher_type::NONE: - return {}; + return std::make_unique(); case org::openapitools::server::model::Image_pusher_type::eImage_pusher_type::CBOR: return std::make_unique(); default: diff --git a/broker/OpenAPIConvert.cpp b/broker/OpenAPIConvert.cpp index 11174f64..8a12a1ba 100644 --- a/broker/OpenAPIConvert.cpp +++ b/broker/OpenAPIConvert.cpp @@ -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; } @@ -191,38 +242,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; } diff --git a/broker/gen/api/ApiBase.h b/broker/gen/api/ApiBase.h index 2d548d8c..da7d9ef0 100644 --- a/broker/gen/api/ApiBase.h +++ b/broker/gen/api/ApiBase.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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/api/DefaultApi.cpp b/broker/gen/api/DefaultApi.cpp index 37a7dced..1625e0eb 100644 --- a/broker/gen/api/DefaultApi.cpp +++ b/broker/gen/api/DefaultApi.cpp @@ -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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/api/DefaultApi.h b/broker/gen/api/DefaultApi.h index cfeff5ed..d4d86db0 100644 --- a/broker/gen/api/DefaultApi.h +++ b/broker/gen/api/DefaultApi.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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Azim_int_settings.cpp b/broker/gen/model/Azim_int_settings.cpp index 71907afe..83e37f7a 100644 --- a/broker/gen/model/Azim_int_settings.cpp +++ b/broker/gen/model/Azim_int_settings.cpp @@ -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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Azim_int_settings.h b/broker/gen/model/Azim_int_settings.h index 3f764f30..17b5494f 100644 --- a/broker/gen/model/Azim_int_settings.h +++ b/broker/gen/model/Azim_int_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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Broker_status.cpp b/broker/gen/model/Broker_status.cpp index 2a3477c5..1cef344e 100644 --- a/broker/gen/model/Broker_status.cpp +++ b/broker/gen/model/Broker_status.cpp @@ -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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Broker_status.h b/broker/gen/model/Broker_status.h index 178b21ee..4977fb36 100644 --- a/broker/gen/model/Broker_status.h +++ b/broker/gen/model/Broker_status.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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Calibration_statistics_inner.cpp b/broker/gen/model/Calibration_statistics_inner.cpp index dcca7dea..040ab4bc 100644 --- a/broker/gen/model/Calibration_statistics_inner.cpp +++ b/broker/gen/model/Calibration_statistics_inner.cpp @@ -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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Calibration_statistics_inner.h b/broker/gen/model/Calibration_statistics_inner.h index a38be993..e7acd1eb 100644 --- a/broker/gen/model/Calibration_statistics_inner.h +++ b/broker/gen/model/Calibration_statistics_inner.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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Dataset_settings.cpp b/broker/gen/model/Dataset_settings.cpp index 4b508a13..70177c22 100644 --- a/broker/gen/model/Dataset_settings.cpp +++ b/broker/gen/model/Dataset_settings.cpp @@ -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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Dataset_settings.h b/broker/gen/model/Dataset_settings.h index 2ae87c59..281cb59c 100644 --- a/broker/gen/model/Dataset_settings.h +++ b/broker/gen/model/Dataset_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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Dataset_settings_unit_cell.cpp b/broker/gen/model/Dataset_settings_unit_cell.cpp index 9ce89e33..84991b26 100644 --- a/broker/gen/model/Dataset_settings_unit_cell.cpp +++ b/broker/gen/model/Dataset_settings_unit_cell.cpp @@ -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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Dataset_settings_unit_cell.h b/broker/gen/model/Dataset_settings_unit_cell.h index 8c536768..91e223de 100644 --- a/broker/gen/model/Dataset_settings_unit_cell.h +++ b/broker/gen/model/Dataset_settings_unit_cell.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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector.cpp b/broker/gen/model/Detector.cpp index 68d8a472..c8d4811b 100644 --- a/broker/gen/model/Detector.cpp +++ b/broker/gen/model/Detector.cpp @@ -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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector.h b/broker/gen/model/Detector.h index e0d9e2c4..e6ae273d 100644 --- a/broker/gen/model/Detector.h +++ b/broker/gen/model/Detector.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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_list.cpp b/broker/gen/model/Detector_list.cpp index 3a3c29ff..b2eaf240 100644 --- a/broker/gen/model/Detector_list.cpp +++ b/broker/gen/model/Detector_list.cpp @@ -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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_list.h b/broker/gen/model/Detector_list.h index 581d005a..ba1058e2 100644 --- a/broker/gen/model/Detector_list.h +++ b/broker/gen/model/Detector_list.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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_list_detectors_inner.cpp b/broker/gen/model/Detector_list_detectors_inner.cpp index aa432fed..14b78923 100644 --- a/broker/gen/model/Detector_list_detectors_inner.cpp +++ b/broker/gen/model/Detector_list_detectors_inner.cpp @@ -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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_list_detectors_inner.h b/broker/gen/model/Detector_list_detectors_inner.h index c6768512..5ea7e511 100644 --- a/broker/gen/model/Detector_list_detectors_inner.h +++ b/broker/gen/model/Detector_list_detectors_inner.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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_module.cpp b/broker/gen/model/Detector_module.cpp index 45d72869..0ee3d06a 100644 --- a/broker/gen/model/Detector_module.cpp +++ b/broker/gen/model/Detector_module.cpp @@ -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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_module.h b/broker/gen/model/Detector_module.h index 44f72f34..b8c986aa 100644 --- a/broker/gen/model/Detector_module.h +++ b/broker/gen/model/Detector_module.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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_module_direction.cpp b/broker/gen/model/Detector_module_direction.cpp index ef5dc225..f7d12357 100644 --- a/broker/gen/model/Detector_module_direction.cpp +++ b/broker/gen/model/Detector_module_direction.cpp @@ -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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_module_direction.h b/broker/gen/model/Detector_module_direction.h index 007f30ae..f7bf3211 100644 --- a/broker/gen/model/Detector_module_direction.h +++ b/broker/gen/model/Detector_module_direction.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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_power_state.cpp b/broker/gen/model/Detector_power_state.cpp new file mode 100644 index 00000000..723b38d5 --- /dev/null +++ b/broker/gen/model/Detector_power_state.cpp @@ -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.16 +* 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 +#include + +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(); + 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 + diff --git a/broker/gen/model/Detector_power_state.h b/broker/gen/model/Detector_power_state.h new file mode 100644 index 00000000..f343a4a5 --- /dev/null +++ b/broker/gen/model/Detector_power_state.h @@ -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.16 +* 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 + +namespace org::openapitools::server::model +{ + +/// +/// Power on of ASICs +/// +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 + }; + + /// + /// Validate the current data in the model. Throws a ValidationException on failure. + /// + void validate() const; + + /// + /// Validate the current data in the model. Returns false on error and writes an error + /// message into the given stringstream. + /// + bool validate(std::stringstream& msg) const; + + /// + /// Helper overload for validate. Used when one model stores another model and calls it's validate. + /// Not meant to be called outside that case. + /// + 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_ */ diff --git a/broker/gen/model/Detector_selection.cpp b/broker/gen/model/Detector_selection.cpp index 02c49d7a..0bb5e550 100644 --- a/broker/gen/model/Detector_selection.cpp +++ b/broker/gen/model/Detector_selection.cpp @@ -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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_selection.h b/broker/gen/model/Detector_selection.h index 177e9f0e..45504548 100644 --- a/broker/gen/model/Detector_selection.h +++ b/broker/gen/model/Detector_selection.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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_settings.cpp b/broker/gen/model/Detector_settings.cpp index a59284a0..bb1384fc 100644 --- a/broker/gen/model/Detector_settings.cpp +++ b/broker/gen/model/Detector_settings.cpp @@ -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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * 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(1.0)) + { + success = false; + msg << currentValuePath << ": must be greater than or equal to 1.0;"; + } + if (value > static_cast(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; } diff --git a/broker/gen/model/Detector_settings.h b/broker/gen/model/Detector_settings.h index 70a43655..f36909c6 100644 --- a/broker/gen/model/Detector_settings.h +++ b/broker/gen/model/Detector_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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * 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 namespace org::openapitools::server::model @@ -70,50 +71,19 @@ public: bool countTimeUsIsSet() const; void unsetCount_time_us(); /// - /// - /// - int64_t getStorageCellCount() const; - void setStorageCellCount(int64_t const value); - /// /// Use internal frame generator in FPGA instead of getting data from a real detector /// bool isInternalFrameGenerator() const; void setInternalFrameGenerator(bool const value); + bool internalFrameGeneratorIsSet() const; + void unsetInternal_frame_generator(); /// /// /// int64_t getInternalFrameGeneratorImages() const; void setInternalFrameGeneratorImages(int64_t const value); - /// - /// - /// - int64_t getPedestalG0Frames() const; - void setPedestalG0Frames(int64_t const value); - /// - /// - /// - int64_t getPedestalG1Frames() const; - void setPedestalG1Frames(int64_t const value); - /// - /// - /// - int64_t getPedestalG2Frames() const; - void setPedestalG2Frames(int64_t const value); - /// - /// Pixels with pedestal G0 RMS above the threshold are marked as masked pixels - /// - int64_t getPedestalG0RmsLimit() const; - void setPedestalG0RmsLimit(int64_t const value); - /// - /// Minimum number of collected images for pedestal to consider it viable - /// - int64_t getPedestalMinImageCount() const; - void setPedestalMinImageCount(int64_t const value); - /// - /// Delay between two storage cells [ns] - /// - int64_t getStorageCellDelayNs() const; - void setStorageCellDelayNs(int64_t const value); + bool internalFrameGeneratorImagesIsSet() const; + void unsetInternal_frame_generator_images(); /// /// Delay between TTL trigger and acquisition start [ns] /// @@ -122,19 +92,82 @@ public: bool detectorTriggerDelayNsIsSet() const; void unsetDetector_trigger_delay_ns(); /// + /// + /// + org::openapitools::server::model::Detector_timing getTiming() const; + void setTiming(org::openapitools::server::model::Detector_timing const& value); + bool timingIsSet() const; + void unsetTiming(); + /// + /// + /// + float getEigerThresholdKeV() const; + void setEigerThresholdKeV(float const value); + bool eigerThresholdKeVIsSet() const; + void unsetEiger_threshold_keV(); + /// + /// + /// + int64_t getJungfrauPedestalG0Frames() const; + void setJungfrauPedestalG0Frames(int64_t const value); + bool jungfrauPedestalG0FramesIsSet() const; + void unsetJungfrau_pedestal_g0_frames(); + /// + /// + /// + int64_t getJungfrauPedestalG1Frames() const; + void setJungfrauPedestalG1Frames(int64_t const value); + bool jungfrauPedestalG1FramesIsSet() const; + void unsetJungfrau_pedestal_g1_frames(); + /// + /// + /// + int64_t getJungfrauPedestalG2Frames() const; + void setJungfrauPedestalG2Frames(int64_t const value); + bool jungfrauPedestalG2FramesIsSet() const; + void unsetJungfrau_pedestal_g2_frames(); + /// + /// Pixels with pedestal G0 RMS above the threshold are marked as masked pixels + /// + int64_t getJungfrauPedestalG0RmsLimit() const; + void setJungfrauPedestalG0RmsLimit(int64_t const value); + bool jungfrauPedestalG0RmsLimitIsSet() const; + void unsetJungfrau_pedestal_g0_rms_limit(); + /// + /// Minimum number of collected images for pedestal to consider it viable + /// + int64_t getJungfrauPedestalMinImageCount() const; + void setJungfrauPedestalMinImageCount(int64_t const value); + bool jungfrauPedestalMinImageCountIsSet() const; + void unsetJungfrau_pedestal_min_image_count(); + /// + /// + /// + int64_t getJungfrauStorageCellCount() const; + void setJungfrauStorageCellCount(int64_t const value); + bool jungfrauStorageCellCountIsSet() const; + void unsetJungfrau_storage_cell_count(); + /// + /// Delay between two storage cells [ns] + /// + int64_t getJungfrauStorageCellDelayNs() const; + void setJungfrauStorageCellDelayNs(int64_t const value); + bool jungfrauStorageCellDelayNsIsSet() const; + void unsetJungfrau_storage_cell_delay_ns(); + /// /// Fix gain to G1 (can be useful for storage cells) /// - 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(); /// /// Use high G0 (for low energy applications) /// - 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; }; diff --git a/broker/gen/model/Detector_state.cpp b/broker/gen/model/Detector_state.cpp new file mode 100644 index 00000000..def70037 --- /dev/null +++ b/broker/gen/model/Detector_state.cpp @@ -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.16 +* 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 +#include + +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(); + 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 + diff --git a/broker/gen/model/Detector_state.h b/broker/gen/model/Detector_state.h new file mode 100644 index 00000000..b2014e93 --- /dev/null +++ b/broker/gen/model/Detector_state.h @@ -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.16 +* 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 + +namespace org::openapitools::server::model +{ + +/// +/// Current state of the detector +/// +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 + }; + + /// + /// Validate the current data in the model. Throws a ValidationException on failure. + /// + void validate() const; + + /// + /// Validate the current data in the model. Returns false on error and writes an error + /// message into the given stringstream. + /// + bool validate(std::stringstream& msg) const; + + /// + /// Helper overload for validate. Used when one model stores another model and calls it's validate. + /// Not meant to be called outside that case. + /// + 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_ */ diff --git a/broker/gen/model/Detector_status.cpp b/broker/gen/model/Detector_status.cpp index 7ff353d1..edeeef99 100644 --- a/broker/gen/model/Detector_status.cpp +++ b/broker/gen/model/Detector_status.cpp @@ -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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * 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; } diff --git a/broker/gen/model/Detector_status.h b/broker/gen/model/Detector_status.h index 66a707ab..424b56de 100644 --- a/broker/gen/model/Detector_status.h +++ b/broker/gen/model/Detector_status.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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * 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 +#include "Detector_power_state.h" #include #include @@ -60,15 +62,15 @@ public: /// Detector_status members /// - /// Current state of the detector + /// /// - 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); /// - /// Power on of ASICs + /// /// - 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); /// /// Detector server (on read-out boards) version /// @@ -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; diff --git a/broker/gen/model/Detector_timing.cpp b/broker/gen/model/Detector_timing.cpp new file mode 100644 index 00000000..d4120c92 --- /dev/null +++ b/broker/gen/model/Detector_timing.cpp @@ -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.16 +* 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 +#include + +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(); + 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 + diff --git a/broker/gen/model/Detector_timing.h b/broker/gen/model/Detector_timing.h new file mode 100644 index 00000000..12731edd --- /dev/null +++ b/broker/gen/model/Detector_timing.h @@ -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.16 +* 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 + +namespace org::openapitools::server::model +{ + +/// +/// +/// +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 + }; + + /// + /// Validate the current data in the model. Throws a ValidationException on failure. + /// + void validate() const; + + /// + /// Validate the current data in the model. Returns false on error and writes an error + /// message into the given stringstream. + /// + bool validate(std::stringstream& msg) const; + + /// + /// Helper overload for validate. Used when one model stores another model and calls it's validate. + /// Not meant to be called outside that case. + /// + 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_ */ diff --git a/broker/gen/model/Detector_type.cpp b/broker/gen/model/Detector_type.cpp index 07a6506a..09a387b9 100644 --- a/broker/gen/model/Detector_type.cpp +++ b/broker/gen/model/Detector_type.cpp @@ -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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_type.h b/broker/gen/model/Detector_type.h index 1bdcf927..6dee27dd 100644 --- a/broker/gen/model/Detector_type.h +++ b/broker/gen/model/Detector_type.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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Error_message.cpp b/broker/gen/model/Error_message.cpp index bc44ba01..c2aae3f0 100644 --- a/broker/gen/model/Error_message.cpp +++ b/broker/gen/model/Error_message.cpp @@ -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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Error_message.h b/broker/gen/model/Error_message.h index 31d12f21..cc08c18c 100644 --- a/broker/gen/model/Error_message.h +++ b/broker/gen/model/Error_message.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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Fpga_status_inner.cpp b/broker/gen/model/Fpga_status_inner.cpp index b818a970..28d32eb6 100644 --- a/broker/gen/model/Fpga_status_inner.cpp +++ b/broker/gen/model/Fpga_status_inner.cpp @@ -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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Fpga_status_inner.h b/broker/gen/model/Fpga_status_inner.h index ae4cb1eb..00995972 100644 --- a/broker/gen/model/Fpga_status_inner.h +++ b/broker/gen/model/Fpga_status_inner.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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Helpers.cpp b/broker/gen/model/Helpers.cpp index 23cd0169..8e3c0237 100644 --- a/broker/gen/model/Helpers.cpp +++ b/broker/gen/model/Helpers.cpp @@ -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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Helpers.h b/broker/gen/model/Helpers.h index d786805c..070de826 100644 --- a/broker/gen/model/Helpers.h +++ b/broker/gen/model/Helpers.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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Image_format_settings.cpp b/broker/gen/model/Image_format_settings.cpp index c3684c99..f3b94eb4 100644 --- a/broker/gen/model/Image_format_settings.cpp +++ b/broker/gen/model/Image_format_settings.cpp @@ -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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Image_format_settings.h b/broker/gen/model/Image_format_settings.h index e4ffc921..9ff5d61e 100644 --- a/broker/gen/model/Image_format_settings.h +++ b/broker/gen/model/Image_format_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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Image_pusher_type.cpp b/broker/gen/model/Image_pusher_type.cpp index 366b269e..7b0a3903 100644 --- a/broker/gen/model/Image_pusher_type.cpp +++ b/broker/gen/model/Image_pusher_type.cpp @@ -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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Image_pusher_type.h b/broker/gen/model/Image_pusher_type.h index 72f1ac7a..0d74b340 100644 --- a/broker/gen/model/Image_pusher_type.h +++ b/broker/gen/model/Image_pusher_type.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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Instrument_metadata.cpp b/broker/gen/model/Instrument_metadata.cpp index 036eb300..d20445c6 100644 --- a/broker/gen/model/Instrument_metadata.cpp +++ b/broker/gen/model/Instrument_metadata.cpp @@ -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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Instrument_metadata.h b/broker/gen/model/Instrument_metadata.h index f48c1c87..6758595e 100644 --- a/broker/gen/model/Instrument_metadata.h +++ b/broker/gen/model/Instrument_metadata.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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Jfjoch_settings.cpp b/broker/gen/model/Jfjoch_settings.cpp index 853f26a4..ba1b48a8 100644 --- a/broker/gen/model/Jfjoch_settings.cpp +++ b/broker/gen/model/Jfjoch_settings.cpp @@ -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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -110,11 +110,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;"; - } } diff --git a/broker/gen/model/Jfjoch_settings.h b/broker/gen/model/Jfjoch_settings.h index 12369aa3..ce0f74f7 100644 --- a/broker/gen/model/Jfjoch_settings.h +++ b/broker/gen/model/Jfjoch_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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Measurement_statistics.cpp b/broker/gen/model/Measurement_statistics.cpp index 701d1fbc..78cb3cff 100644 --- a/broker/gen/model/Measurement_statistics.cpp +++ b/broker/gen/model/Measurement_statistics.cpp @@ -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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Measurement_statistics.h b/broker/gen/model/Measurement_statistics.h index 90245a02..2f43da5e 100644 --- a/broker/gen/model/Measurement_statistics.h +++ b/broker/gen/model/Measurement_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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Pcie_devices_inner.cpp b/broker/gen/model/Pcie_devices_inner.cpp index 31768352..9f2d18c7 100644 --- a/broker/gen/model/Pcie_devices_inner.cpp +++ b/broker/gen/model/Pcie_devices_inner.cpp @@ -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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Pcie_devices_inner.h b/broker/gen/model/Pcie_devices_inner.h index 625015ce..b753a211 100644 --- a/broker/gen/model/Pcie_devices_inner.h +++ b/broker/gen/model/Pcie_devices_inner.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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Plot.cpp b/broker/gen/model/Plot.cpp index fa87d328..02c9cb26 100644 --- a/broker/gen/model/Plot.cpp +++ b/broker/gen/model/Plot.cpp @@ -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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Plot.h b/broker/gen/model/Plot.h index 6d64f121..9e32bdda 100644 --- a/broker/gen/model/Plot.h +++ b/broker/gen/model/Plot.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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Plots.cpp b/broker/gen/model/Plots.cpp index 8579bb67..00f1b605 100644 --- a/broker/gen/model/Plots.cpp +++ b/broker/gen/model/Plots.cpp @@ -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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Plots.h b/broker/gen/model/Plots.h index 334f45fc..e4b86217 100644 --- a/broker/gen/model/Plots.h +++ b/broker/gen/model/Plots.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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Preview_settings.cpp b/broker/gen/model/Preview_settings.cpp index e4640d46..2acfb06c 100644 --- a/broker/gen/model/Preview_settings.cpp +++ b/broker/gen/model/Preview_settings.cpp @@ -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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Preview_settings.h b/broker/gen/model/Preview_settings.h index 02efb8d2..eeb8168f 100644 --- a/broker/gen/model/Preview_settings.h +++ b/broker/gen/model/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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Roi_box.cpp b/broker/gen/model/Roi_box.cpp index 98ddb7f0..06d26fcd 100644 --- a/broker/gen/model/Roi_box.cpp +++ b/broker/gen/model/Roi_box.cpp @@ -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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Roi_box.h b/broker/gen/model/Roi_box.h index c804e20d..f746c82b 100644 --- a/broker/gen/model/Roi_box.h +++ b/broker/gen/model/Roi_box.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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Roi_box_list.cpp b/broker/gen/model/Roi_box_list.cpp index 0f5956b1..98ab52f0 100644 --- a/broker/gen/model/Roi_box_list.cpp +++ b/broker/gen/model/Roi_box_list.cpp @@ -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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Roi_box_list.h b/broker/gen/model/Roi_box_list.h index 25d134d4..1a12283b 100644 --- a/broker/gen/model/Roi_box_list.h +++ b/broker/gen/model/Roi_box_list.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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Roi_circle.cpp b/broker/gen/model/Roi_circle.cpp index ec2a3516..520b86bb 100644 --- a/broker/gen/model/Roi_circle.cpp +++ b/broker/gen/model/Roi_circle.cpp @@ -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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Roi_circle.h b/broker/gen/model/Roi_circle.h index 9d96b26e..d251ffe8 100644 --- a/broker/gen/model/Roi_circle.h +++ b/broker/gen/model/Roi_circle.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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Roi_circle_list.cpp b/broker/gen/model/Roi_circle_list.cpp index 7ed42fb3..50ca4527 100644 --- a/broker/gen/model/Roi_circle_list.cpp +++ b/broker/gen/model/Roi_circle_list.cpp @@ -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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Roi_circle_list.h b/broker/gen/model/Roi_circle_list.h index 41738388..5e197ace 100644 --- a/broker/gen/model/Roi_circle_list.h +++ b/broker/gen/model/Roi_circle_list.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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Rotation_axis.cpp b/broker/gen/model/Rotation_axis.cpp index cb547903..11435f21 100644 --- a/broker/gen/model/Rotation_axis.cpp +++ b/broker/gen/model/Rotation_axis.cpp @@ -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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Rotation_axis.h b/broker/gen/model/Rotation_axis.h index ab4c1139..a38d7771 100644 --- a/broker/gen/model/Rotation_axis.h +++ b/broker/gen/model/Rotation_axis.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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Spot_finding_settings.cpp b/broker/gen/model/Spot_finding_settings.cpp index 58db80cd..8fe1b2ad 100644 --- a/broker/gen/model/Spot_finding_settings.cpp +++ b/broker/gen/model/Spot_finding_settings.cpp @@ -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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Spot_finding_settings.h b/broker/gen/model/Spot_finding_settings.h index 52091084..41a444b9 100644 --- a/broker/gen/model/Spot_finding_settings.h +++ b/broker/gen/model/Spot_finding_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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Standard_detector_geometry.cpp b/broker/gen/model/Standard_detector_geometry.cpp index 35b6eb49..b15c9ccd 100644 --- a/broker/gen/model/Standard_detector_geometry.cpp +++ b/broker/gen/model/Standard_detector_geometry.cpp @@ -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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Standard_detector_geometry.h b/broker/gen/model/Standard_detector_geometry.h index f870fc7b..fbd8f498 100644 --- a/broker/gen/model/Standard_detector_geometry.h +++ b/broker/gen/model/Standard_detector_geometry.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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Zeromq_settings.cpp b/broker/gen/model/Zeromq_settings.cpp index ce84f7bd..783300d1 100644 --- a/broker/gen/model/Zeromq_settings.cpp +++ b/broker/gen/model/Zeromq_settings.cpp @@ -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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -23,6 +23,8 @@ 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; @@ -69,7 +71,7 @@ bool Zeromq_settings::validate(std::stringstream& msg, const std::string& pathPr } } - + if (imageSocketIsSet()) { const std::vector& value = m_Image_socket; @@ -103,6 +105,9 @@ 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())) && @@ -124,6 +129,8 @@ 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()) @@ -140,6 +147,11 @@ 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); @@ -175,6 +187,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 Zeromq_settings::getImageSocket() const { return m_Image_socket; diff --git a/broker/gen/model/Zeromq_settings.h b/broker/gen/model/Zeromq_settings.h index 0f2299fd..280e6372 100644 --- a/broker/gen/model/Zeromq_settings.h +++ b/broker/gen/model/Zeromq_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.15 +* The version of the OpenAPI document: 1.0.0-rc.16 * 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(); /// + /// Send buffer size for ZeroMQ socket + /// + int64_t getSendBufferSize() const; + void setSendBufferSize(int64_t const value); + bool sendBufferSizeIsSet() const; + void unsetSend_buffer_size(); + /// /// 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. /// std::vector getImageSocket() const; @@ -93,6 +100,8 @@ public: protected: int64_t m_Send_watermark; bool m_Send_watermarkIsSet; + int64_t m_Send_buffer_size; + bool m_Send_buffer_sizeIsSet; std::vector m_Image_socket; bool m_Image_socketIsSet; std::string m_Preview_socket; diff --git a/broker/jfjoch_api.yaml b/broker/jfjoch_api.yaml index 836dfd9c..66dcadee 100644 --- a/broker/jfjoch_api.yaml +++ b/broker/jfjoch_api.yaml @@ -1,10 +1,17 @@ openapi: 3.0.3 info: title: Jungfraujoch - description: Jungfraujoch Broker Web API - version: 1.0.0-rc.15 + 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.16 contact: + name: Filip Leonarski (Paul Scherrer Institute) email: filip.leonarski@psi.ch +servers: + - url: http://localhost:5232 + description: Test Jungfraujoch system components: schemas: rotation_axis: @@ -308,6 +315,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 +334,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 +356,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 +374,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 +384,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) @@ -1090,6 +1103,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: @@ -1163,7 +1180,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: diff --git a/broker/redoc-static.html b/broker/redoc-static.html index 30547e25..db8ee6be 100644 --- a/broker/redoc-static.html +++ b/broker/redoc-static.html @@ -367,8 +367,12 @@ data-styled.g137[id="sc-kqGpvY"]{content:"bAFwPb,"}/*!sc*/ 55.627 l 55.6165,55.627 -231.245496,231.24803 c -127.185,127.1864 -231.5279,231.248 -231.873,231.248 -0.3451,0 -104.688, -104.0616 -231.873,-231.248 z - " fill="currentColor">

Jungfraujoch (1.0.0-rc.15)

Download OpenAPI specification:Download

Jungfraujoch Broker Web API

+ " fill="currentColor">

Jungfraujoch (1.0.0-rc.16)

Download OpenAPI specification:Download

Filip Leonarski (Paul Scherrer Institute): filip.leonarski@psi.ch

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.

Initialize detector and data acquisition

Initialization started

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

Collect dark current for the detector

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

Collect dark current for the detector

Updates calibration of the JUNGFRAU detector. Must be in Idle state.

@@ -403,7 +409,9 @@ If storage cells are used, the execution time might be few minutes. " class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

Everything OK

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

Start detector

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

Start detector

Input parsing or validation error

Request samples

Content type
application/json
{
  • "images_per_trigger": 1,
  • "ntrigger": 1,
  • "image_time_us": 0,
  • "beam_x_pxl": 0.1,
  • "beam_y_pxl": 0.1,
  • "detector_distance_mm": 0.1,
  • "incident_energy_keV": 0.001,
  • "file_prefix": "",
  • "images_per_file": 1000,
  • "space_group_number": 0,
  • "sample_name": "",
  • "compression": "bslz4",
  • "total_flux": 0.1,
  • "transmission": 1,
  • "goniometer": {
    },
  • "header_appendix": null,
  • "image_appendix": null,
  • "data_reduction_factor_serialmx": 1,
  • "pixel_value_low_threshold": 0,
  • "run_number": 0,
  • "run_name": "string",
  • "experiment_group": "string",
  • "poisson_compression": 16,
  • "write_nxmx_hdf5_master": true,
  • "save_calibration": true,
  • "unit_cell": {
    }
}

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

Wait for acquisition done

Request samples

Content type
application/json
{
  • "images_per_trigger": 1,
  • "ntrigger": 1,
  • "image_time_us": 0,
  • "beam_x_pxl": 0.1,
  • "beam_y_pxl": 0.1,
  • "detector_distance_mm": 0.1,
  • "incident_energy_keV": 0.001,
  • "file_prefix": "",
  • "images_per_file": 1000,
  • "space_group_number": 0,
  • "sample_name": "",
  • "compression": "bslz4",
  • "total_flux": 0.1,
  • "transmission": 1,
  • "goniometer": {
    },
  • "header_appendix": null,
  • "image_appendix": null,
  • "data_reduction_factor_serialmx": 1,
  • "pixel_value_low_threshold": 0,
  • "run_number": 0,
  • "run_name": "string",
  • "experiment_group": "string",
  • "poisson_compression": 16,
  • "write_nxmx_hdf5_master": true,
  • "save_calibration": true,
  • "unit_cell": {
    }
}

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

Wait for acquisition done

Detector is inactive mode

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

Send soft trigger to the detector

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

Send soft trigger to the detector

Generate soft trigger

Responses

Cancel running data collection

Cancel running data collection

Responses

Prepare detector to turn off

Prepare detector to turn off

Should be in Idle or Error state. @@ -563,7 +579,9 @@ Should be used always before turning off power from the detector.

" class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

Detector ready to turn off

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

Change detector configuration

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

Change detector configuration

Interval between consecutive frames.

count_time_us
integer <int64>

Integration time of the detector. If not provided count time will be set to maximum value for a given frame time.

-
storage_cell_count
required
integer <int64> [ 1 .. 16 ]
Default: 1
internal_frame_generator
required
boolean
Default: false
internal_frame_generator
boolean
Default: false

Use internal frame generator in FPGA instead of getting data from a real detector

-
internal_frame_generator_images
required
integer <int64> [ 1 .. 128 ]
Default: 1
pedestal_g0_frames
required
integer <int64> >= 0
Default: 2000
pedestal_g1_frames
required
integer <int64> >= 0
Default: 300
pedestal_g2_frames
required
integer <int64> >= 0
Default: 300
pedestal_g0_rms_limit
required
integer <int64> >= 0
Default: 100

Pixels with pedestal G0 RMS above the threshold are marked as masked pixels

-
pedestal_min_image_count
required
integer <int64> >= 32
Default: 128

Minimum number of collected images for pedestal to consider it viable

-
storage_cell_delay_ns
required
integer <int64> >= 2100
Default: 5000

Delay between two storage cells [ns]

-
detector_trigger_delay_ns
integer <int64> >= 0
Default: 0
internal_frame_generator_images
integer <int64> [ 1 .. 128 ]
Default: 1
detector_trigger_delay_ns
integer <int64> >= 0
Default: 0

Delay between TTL trigger and acquisition start [ns]

-
fixed_gain_g1
boolean
Default: false
timing
string (detector_timing)
Default: "trigger"
Enum: "auto" "trigger" "burst" "gated"
eiger_threshold_keV
number <float> [ 1 .. 100 ]
jungfrau_pedestal_g0_frames
integer <int64> >= 0
Default: 2000
jungfrau_pedestal_g1_frames
integer <int64> >= 0
Default: 300
jungfrau_pedestal_g2_frames
integer <int64> >= 0
Default: 300
jungfrau_pedestal_g0_rms_limit
integer <int64> >= 0
Default: 100

Pixels with pedestal G0 RMS above the threshold are marked as masked pixels

+
jungfrau_pedestal_min_image_count
integer <int64> >= 32
Default: 128

Minimum number of collected images for pedestal to consider it viable

+
jungfrau_storage_cell_count
integer <int64> [ 1 .. 16 ]
Default: 1
jungfrau_storage_cell_delay_ns
integer <int64> >= 2100
Default: 5000

Delay between two storage cells [ns]

+
jungfrau_fixed_gain_g1
boolean
Default: false

Fix gain to G1 (can be useful for storage cells)

-
use_gain_hg0
boolean
Default: false
jungfrau_use_gain_hg0
boolean
Default: false

Use high G0 (for low energy applications)

Responses

Request samples

Content type
application/json
{
  • "frame_time_us": 450,
  • "count_time_us": 0,
  • "storage_cell_count": 1,
  • "internal_frame_generator": false,
  • "internal_frame_generator_images": 1,
  • "pedestal_g0_frames": 2000,
  • "pedestal_g1_frames": 300,
  • "pedestal_g2_frames": 300,
  • "pedestal_g0_rms_limit": 100,
  • "pedestal_min_image_count": 128,
  • "storage_cell_delay_ns": 5000,
  • "detector_trigger_delay_ns": 0,
  • "fixed_gain_g1": false,
  • "use_gain_hg0": false
}

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

Get detector configuration

Request samples

Content type
application/json
{
  • "frame_time_us": 450,
  • "count_time_us": 0,
  • "internal_frame_generator": false,
  • "internal_frame_generator_images": 1,
  • "detector_trigger_delay_ns": 0,
  • "timing": "auto",
  • "eiger_threshold_keV": 1,
  • "jungfrau_pedestal_g0_frames": 2000,
  • "jungfrau_pedestal_g1_frames": 300,
  • "jungfrau_pedestal_g2_frames": 300,
  • "jungfrau_pedestal_g0_rms_limit": 100,
  • "jungfrau_pedestal_min_image_count": 128,
  • "jungfrau_storage_cell_count": 1,
  • "jungfrau_storage_cell_delay_ns": 5000,
  • "jungfrau_fixed_gain_g1": false,
  • "jungfrau_use_gain_hg0": false
}

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

Get detector configuration

Can be done anytime

Responses

Response samples

Content type
application/json
{
  • "frame_time_us": 450,
  • "count_time_us": 0,
  • "storage_cell_count": 1,
  • "internal_frame_generator": false,
  • "internal_frame_generator_images": 1,
  • "pedestal_g0_frames": 2000,
  • "pedestal_g1_frames": 300,
  • "pedestal_g2_frames": 300,
  • "pedestal_g0_rms_limit": 100,
  • "pedestal_min_image_count": 128,
  • "storage_cell_delay_ns": 5000,
  • "detector_trigger_delay_ns": 0,
  • "fixed_gain_g1": false,
  • "use_gain_hg0": false
}

Change instrument metadata

Response samples

Content type
application/json
{
  • "frame_time_us": 450,
  • "count_time_us": 0,
  • "internal_frame_generator": false,
  • "internal_frame_generator_images": 1,
  • "detector_trigger_delay_ns": 0,
  • "timing": "auto",
  • "eiger_threshold_keV": 1,
  • "jungfrau_pedestal_g0_frames": 2000,
  • "jungfrau_pedestal_g1_frames": 300,
  • "jungfrau_pedestal_g2_frames": 300,
  • "jungfrau_pedestal_g0_rms_limit": 100,
  • "jungfrau_pedestal_min_image_count": 128,
  • "jungfrau_storage_cell_count": 1,
  • "jungfrau_storage_cell_delay_ns": 5000,
  • "jungfrau_fixed_gain_g1": false,
  • "jungfrau_use_gain_hg0": false
}

Change instrument metadata

This can only be done when detector is Idle, Error or Inactive states.

Request Body schema: application/json
source_name
required
string
source_type
string
Default: ""

Input parsing or validation error

Request samples

Content type
application/json
{
  • "source_name": "Swiss Light Source",
  • "source_type": "Synchrotron X-ray Source",
  • "instrument_name": "CristallinaMX",
  • "pulsed_source": false
}

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

Get instrument metadata

Request samples

Content type
application/json
{
  • "source_name": "Swiss Light Source",
  • "source_type": "Synchrotron X-ray Source",
  • "instrument_name": "CristallinaMX",
  • "pulsed_source": false
}

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

Get instrument metadata

Can be done anytime

Responses

Response samples

Content type
application/json
{
  • "source_name": "Swiss Light Source",
  • "source_type": "Synchrotron X-ray Source",
  • "instrument_name": "CristallinaMX",
  • "pulsed_source": false
}

Change image output format

Response samples

Content type
application/json
{
  • "source_name": "Swiss Light Source",
  • "source_type": "Synchrotron X-ray Source",
  • "instrument_name": "CristallinaMX",
  • "pulsed_source": false
}

Change image output format

This can only be done when detector is Idle, Error or Inactive states.

Request Body schema: application/json
summation
required
boolean

Input parsing or validation error

Request samples

Content type
application/json
{
  • "summation": true,
  • "geometry_transform": true,
  • "jungfrau_conversion": true,
  • "jungfrau_conversion_factor_keV": 0.001,
  • "bit_depth_image": 16,
  • "signed_output": true,
  • "mask_module_edges": true,
  • "mask_chip_edges": true
}

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

Get image output format

Request samples

Content type
application/json
{
  • "summation": true,
  • "geometry_transform": true,
  • "jungfrau_conversion": true,
  • "jungfrau_conversion_factor_keV": 0.001,
  • "bit_depth_image": 16,
  • "signed_output": true,
  • "mask_module_edges": true,
  • "mask_chip_edges": true
}

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

Get image output format

Can be done anytime

Responses

Response samples

Content type
application/json
{
  • "summation": true,
  • "geometry_transform": true,
  • "jungfrau_conversion": true,
  • "jungfrau_conversion_factor_keV": 0.001,
  • "bit_depth_image": 16,
  • "signed_output": true,
  • "mask_module_edges": true,
  • "mask_chip_edges": true
}

Configure format for raw data collection

Response samples

Content type
application/json
{
  • "summation": true,
  • "geometry_transform": true,
  • "jungfrau_conversion": true,
  • "jungfrau_conversion_factor_keV": 0.001,
  • "bit_depth_image": 16,
  • "signed_output": true,
  • "mask_module_edges": true,
  • "mask_chip_edges": true
}

Configure format for raw data collection

This can only be done when detector is Idle, Error or Inactive states.

Responses

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

Configure format for data collection with full conversion

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

Configure format for data collection with full conversion

This can only be done when detector is Idle, Error or Inactive states.

Responses

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

Configure spot finding

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

Configure spot finding

Can be done anytime, also while data collection is running

Request Body schema: application/json
enable
required
boolean
Default: true

Everything OK

Request samples

Content type
application/json
{
  • "enable": true,
  • "indexing": true,
  • "filter_powder_rings": false,
  • "min_spot_count_powder_ring": 5,
  • "signal_to_noise_threshold": 0.1,
  • "photon_count_threshold": 0,
  • "min_pix_per_spot": 1,
  • "max_pix_per_spot": 1,
  • "high_resolution_limit": 0.1,
  • "low_resolution_limit": 0.1,
  • "indexing_tolerance": 1
}

Get data processing configuration

Request samples

Content type
application/json
{
  • "enable": true,
  • "indexing": true,
  • "filter_powder_rings": false,
  • "min_spot_count_powder_ring": 5,
  • "signal_to_noise_threshold": 0.1,
  • "photon_count_threshold": 0,
  • "min_pix_per_spot": 1,
  • "max_pix_per_spot": 1,
  • "high_resolution_limit": 0.1,
  • "low_resolution_limit": 0.1,
  • "indexing_tolerance": 1
}

Get data processing configuration

Can be done anytime

Responses

Response samples

Content type
application/json
{
  • "enable": true,
  • "indexing": true,
  • "filter_powder_rings": false,
  • "min_spot_count_powder_ring": 5,
  • "signal_to_noise_threshold": 0.1,
  • "photon_count_threshold": 0,
  • "min_pix_per_spot": 1,
  • "max_pix_per_spot": 1,
  • "high_resolution_limit": 0.1,
  • "low_resolution_limit": 0.1,
  • "indexing_tolerance": 1
}

Configure radial integration

Response samples

Content type
application/json
{
  • "enable": true,
  • "indexing": true,
  • "filter_powder_rings": false,
  • "min_spot_count_powder_ring": 5,
  • "signal_to_noise_threshold": 0.1,
  • "photon_count_threshold": 0,
  • "min_pix_per_spot": 1,
  • "max_pix_per_spot": 1,
  • "high_resolution_limit": 0.1,
  • "low_resolution_limit": 0.1,
  • "indexing_tolerance": 1
}

Configure radial integration

Can be done when detector is Inactive or Idle

Request Body schema: application/json
polarization_factor
number <float> [ -1 .. 1 ]

If polarization factor is provided, than polarization correction is enabled.

@@ -729,11 +767,15 @@ Even if disabled spot finding information will still be send and written, though " class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

Input parsing or validation error

Request samples

Content type
application/json
{
  • "polarization_factor": -1,
  • "solid_angle_corr": true,
  • "high_q_recipA": 0.1,
  • "low_q_recipA": 0.1,
  • "q_spacing": 0.1
}

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

Get radial integration configuration

Request samples

Content type
application/json
{
  • "polarization_factor": -1,
  • "solid_angle_corr": true,
  • "high_q_recipA": 0.1,
  • "low_q_recipA": 0.1,
  • "q_spacing": 0.1
}

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

Get radial integration configuration

Can be done anytime

Responses

Response samples

Content type
application/json
{
  • "polarization_factor": -1,
  • "solid_angle_corr": true,
  • "high_q_recipA": 0.1,
  • "low_q_recipA": 0.1,
  • "q_spacing": 0.1
}

Load binary image for internal FPGA generator

Response samples

Content type
application/json
{
  • "polarization_factor": -1,
  • "solid_angle_corr": true,
  • "high_q_recipA": 0.1,
  • "low_q_recipA": 0.1,
  • "q_spacing": 0.1
}

Load binary image for internal FPGA generator

Load image for internal FPGA generator. This can only happen in Idle state of the detector. @@ -745,7 +787,9 @@ Requires binary blob with 16-bit integer numbers of size of detector in raw/conv " class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

Everything OK

Load TIFF image for internal FPGA generator

Load TIFF image for internal FPGA generator

Load image for internal FPGA generator. This can only happen in Idle state of the detector. @@ -757,7 +801,9 @@ Requires TIFF with 16-bit integer numbers of size of detector in raw/converted c " class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

Everything OK

Select detector

Select detector

Jungfraujoch allows to control multiple detectors and/or region-of-interests. @@ -769,29 +815,41 @@ Changing detector will set detector to Inactive state and will requ " class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

Input parsing or validation error

Request samples

Content type
application/json
{
  • "id": 1
}

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

List available detectors

Request samples

Content type
application/json
{
  • "id": 1
}

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

List available detectors

Configured detectors that can be selected by used

Responses

Response samples

Content type
application/json
{
  • "detectors": [
    ],
  • "current_id": 0
}

Get Jungfraujoch status

Response samples

Content type
application/json
{
  • "detectors": [
    ],
  • "current_id": 0
}

Get Jungfraujoch status

Status of the data acquisition

Responses

Response samples

Content type
application/json
{
  • "state": "Inactive",
  • "progress": 1
}

Get status of FPGA devices

Responses

Response samples

Content type
application/json
{
  • "state": "Inactive",
  • "progress": 1
}

Get status of FPGA devices

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Return XFEL pulse IDs for the current data acquisition

Response samples

Content type
application/json
[
  • {
    }
]

Return XFEL pulse IDs for the current data acquisition

Return array of XFEL pulse IDs - (-1) if image not recorded

Responses

Response samples

Content type
application/json
[
  • 0
]

Return XFEL event codes for the current data acquisition

Response samples

Content type
application/json
[
  • 0
]

Return XFEL event codes for the current data acquisition

Return array of XFEL event codes

Responses

Response samples

Content type
application/json
[
  • 0
]

Get detector status

Response samples

Content type
application/json
[
  • 0
]

Get detector status

Status of the JUNGFRAU detector

Responses

Response samples

Content type
application/json
{
  • "state": "Idle",
  • "powerchip": "PowerOn",
  • "server_version": "string",
  • "number_of_triggers_left": 0,
  • "fpga_temp_degC": [
    ],
  • "high_voltage_V": [
    ]
}

Get box ROIs

Responses

Response samples

Content type
application/json
{
  • "state": "Idle",
  • "powerchip": "PowerOn",
  • "server_version": "string",
  • "number_of_triggers_left": 0,
  • "fpga_temp_degC": [
    ],
  • "high_voltage_V": [
    ]
}

Get box ROIs

Responses

Response samples

Content type
application/json
{
  • "rois": [
    ]
}

Upload box ROIs

Request Body schema: application/json
Array of objects (roi_box) <= 32 items

Responses

Response samples

Content type
application/json
{
  • "rois": [
    ]
}

Upload box ROIs

Request Body schema: application/json
Array of objects (roi_box) <= 32 items

Responses

Request samples

Content type
application/json
{
  • "rois": [
    ]
}

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

Get circular ROI

Responses

Request samples

Content type
application/json
{
  • "rois": [
    ]
}

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

Get circular ROI

Responses

Response samples

Content type
application/json
{
  • "rois": [
    ]
}

Upload circular ROI

Request Body schema: application/json
required
Array of objects (roi_circle) <= 32 items

Responses

Response samples

Content type
application/json
{
  • "rois": [
    ]
}

Upload circular ROI

Request Body schema: application/json
required
Array of objects (roi_circle) <= 32 items

Responses

Request samples

Content type
application/json
{
  • "rois": [
    ]
}

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

Generate background estimate plot

Request samples

Content type
application/json
{
  • "rois": [
    ]
}

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

Generate background estimate plot

Mean intensity for d = 3 - 5 A per image; binning is configurable

query Parameters
binning
integer

Binning of frames for the plot (0 = default binning)

@@ -823,7 +891,9 @@ Changing detector will set detector to Inactive state and will requ " class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

Everything OK

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate spot count plot

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate spot count plot

Number of spots per image; binning is configurable

query Parameters
binning
integer

Binning of frames for the plot (0 = default binning)

@@ -831,7 +901,9 @@ Changing detector will set detector to Inactive state and will requ " class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

Everything OK

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate indexing rate plot

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate indexing rate plot

Image indexing rate; binning is configurable

query Parameters
binning
integer

Binning of frames for the plot (0 = default binning)

@@ -839,7 +911,9 @@ Changing detector will set detector to Inactive state and will requ " class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

Everything OK

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate error pixels plot

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate error pixels plot

Count of error (mean) and saturated (mean/max) pixels per image; binning is configurable

query Parameters
binning
integer

Binning of frames for the plot (0 = default binning)

@@ -847,7 +921,9 @@ Changing detector will set detector to Inactive state and will requ " class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

Everything OK

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate strong pixels plot

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate strong pixels plot

Count of strong pixels per image (from spot finding); binning is configurable

query Parameters
binning
integer

Binning of frames for the plot (0 = default binning)

@@ -855,7 +931,9 @@ Changing detector will set detector to Inactive state and will requ " class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

Everything OK

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate ROI sum plot

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate ROI sum plot

Sum of ROI rectangle per image; binning is configurable

query Parameters
binning
integer

Binning of frames for the plot (0 = default binning)

@@ -863,7 +941,9 @@ Changing detector will set detector to Inactive state and will requ " class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

Everything OK

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate plot of ROI max count

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate plot of ROI max count

Max count of ROI per image; binning is configurable

query Parameters
binning
integer

Binning of frames for the plot (0 = default binning)

@@ -871,7 +951,9 @@ Changing detector will set detector to Inactive state and will requ " class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

Everything OK

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate plot of ROI valid pixels

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate plot of ROI valid pixels

Number of pixels within a ROI area; pixels with special values (overload, bad pixel) are excluded; multipixels are counted just once; binning is configurable

query Parameters
binning
integer

Binning of frames for the plot (0 = default binning)

@@ -879,7 +961,9 @@ Changing detector will set detector to Inactive state and will requ " class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

Everything OK

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate receiver delay plot

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate receiver delay plot

Amount of frames the receiver is behind the FPGA for each image - used for internal debugging; binning is configurable

query Parameters
binning
integer

Binning of frames for the plot (0 = default binning)

@@ -887,7 +971,9 @@ Changing detector will set detector to Inactive state and will requ " class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

Everything OK

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate receiver free send buffer plot

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate receiver free send buffer plot

Amount of send buffers available during frame processing - used for internal debugging; binning is configurable

query Parameters
binning
integer

Binning of frames for the plot (0 = default binning)

@@ -895,7 +981,9 @@ Changing detector will set detector to Inactive state and will requ " class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

Everything OK

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate image collection efficiency plot

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate image collection efficiency plot

Ratio of collected and expected packets per image; binning is configurable

query Parameters
binning
integer

Binning of frames for the plot (0 = default binning)

@@ -903,21 +991,29 @@ Changing detector will set detector to Inactive state and will requ " class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

Everything OK

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate radial integration profile

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate radial integration profile

Generate average radial integration profile

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Get data collection statistics

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Get data collection statistics

Results of the last data collection

Responses

Response samples

Content type
application/json
{
  • "file_prefix": "string",
  • "run_number": 0,
  • "experiment_group": "string",
  • "images_expected": 0,
  • "images_collected": 0,
  • "images_sent": 0,
  • "images_discarded_lossy_compression": 0,
  • "max_image_number_sent": 0,
  • "collection_efficiency": 1,
  • "compression_ratio": 5.3,
  • "cancelled": true,
  • "max_receiver_delay": 0,
  • "indexing_rate": 0.1,
  • "detector_width": 0,
  • "detector_height": 0,
  • "detector_pixel_depth": 2,
  • "bkg_estimate": 0.1,
  • "unit_cell": "string"
}

Get calibration statistics

Response samples

Content type
application/json
{
  • "file_prefix": "string",
  • "run_number": 0,
  • "experiment_group": "string",
  • "images_expected": 0,
  • "images_collected": 0,
  • "images_sent": 0,
  • "images_discarded_lossy_compression": 0,
  • "max_image_number_sent": 0,
  • "collection_efficiency": 1,
  • "compression_ratio": 5.3,
  • "cancelled": true,
  • "max_receiver_delay": 0,
  • "indexing_rate": 0.1,
  • "detector_width": 0,
  • "detector_height": 0,
  • "detector_pixel_depth": 2,
  • "bkg_estimate": 0.1,
  • "unit_cell": "string"
}

Get calibration statistics

Statistics are provided for each module/storage cell separately

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get last preview image in JPEG format using custom settings

Request Body schema: application/json
saturation
required
integer <int64> [ 0 .. 65535 ]

Response samples

Content type
application/json
[
  • {
    }
]

Get last preview image in JPEG format using custom settings

Request Body schema: application/json
saturation
required
integer <int64> [ 0 .. 65535 ]

Saturation value to set contrast in the preview image

show_spots
boolean
Default: true

Show spot finding results on the image

@@ -937,31 +1033,43 @@ Changing detector will set detector to Inactive state and will requ " class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

No preview image recorded so far

Request samples

Content type
application/json
{
  • "saturation": 65535,
  • "show_spots": true,
  • "show_roi": false,
  • "jpeg_quality": 100,
  • "show_indexed": false,
  • "show_user_mask": false,
  • "resolution_ring": 0.1
}

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

Get last preview image in JPEG format using default settings

Responses

Request samples

Content type
application/json
{
  • "saturation": 65535,
  • "show_spots": true,
  • "show_roi": false,
  • "jpeg_quality": 100,
  • "show_indexed": false,
  • "show_user_mask": false,
  • "resolution_ring": 0.1
}

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

Get last preview image in JPEG format using default settings

Responses

Get last preview image in TIFF format

Responses

Get last preview image in TIFF format

Responses

Get last preview image in TIFF format for calibration with PyFAI/Dioptas

Get last preview image in TIFF format for calibration with PyFAI/Dioptas

Image is reduced to unsigned 16-bit images, all bad pixels are set to 65535 and image is mirrored in vertical direction

Responses

Get mask of the detector

Get mask of the detector

Get full pixel mask of the detector See NXmx standard for meaning of pixel values

Responses

Get user mask of the detector

Get user mask of the detector

Get user pixel mask of the detector in the actual detector coordinates: 0 - good pixel, 1 - masked

Responses

Upload user mask of the detector

Upload user mask of the detector

All good

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

Get pedestal G0 in TIFF format

query Parameters
gain_level
required
integer

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

Get pedestal G0 in TIFF format

query Parameters
gain_level
required
integer

Gain level (0, 1, 2)

sc
integer

Storage cell number

@@ -989,11 +1099,15 @@ User mask is not automatically applied - i.e. pixels with user mask will have a " class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

Calibration image

/version

Responses

/version

Responses

+