From 756461957493658685293ece4c696c852ff8fb8f Mon Sep 17 00:00:00 2001 From: leonarski_f Date: Sun, 8 Dec 2024 13:26:13 +0100 Subject: [PATCH] version 1.0.0-rc.29 --- VERSION | 2 +- broker/JFJochBrokerHttp.cpp | 22 +- broker/JFJochBrokerHttp.h | 9 +- broker/JFJochBrokerParser.cpp | 3 + broker/JFJochStateMachine.cpp | 225 +++++----- broker/JFJochStateMachine.h | 25 +- broker/OpenAPIConvert.cpp | 53 ++- broker/OpenAPIConvert.h | 9 +- broker/gen/api/ApiBase.h | 2 +- broker/gen/api/DefaultApi.cpp | 158 +++---- broker/gen/api/DefaultApi.h | 56 +-- broker/gen/model/Azim_int_settings.cpp | 2 +- broker/gen/model/Azim_int_settings.h | 2 +- broker/gen/model/Broker_status.cpp | 67 ++- broker/gen/model/Broker_status.h | 25 +- .../model/Calibration_statistics_inner.cpp | 2 +- .../gen/model/Calibration_statistics_inner.h | 2 +- broker/gen/model/Dataset_settings.cpp | 2 +- broker/gen/model/Dataset_settings.h | 2 +- .../gen/model/Dataset_settings_unit_cell.cpp | 2 +- broker/gen/model/Dataset_settings_unit_cell.h | 2 +- broker/gen/model/Detector.cpp | 45 +- broker/gen/model/Detector.h | 13 +- broker/gen/model/Detector_list.cpp | 10 +- broker/gen/model/Detector_list.h | 10 +- .../model/Detector_list_detectors_inner.cpp | 46 ++- .../gen/model/Detector_list_detectors_inner.h | 23 +- broker/gen/model/Detector_list_element.cpp | 245 +++++++++++ broker/gen/model/Detector_list_element.h | 147 +++++++ broker/gen/model/Detector_module.cpp | 2 +- broker/gen/model/Detector_module.h | 2 +- .../gen/model/Detector_module_direction.cpp | 2 +- broker/gen/model/Detector_module_direction.h | 2 +- broker/gen/model/Detector_power_state.cpp | 2 +- broker/gen/model/Detector_power_state.h | 2 +- broker/gen/model/Detector_selection.cpp | 2 +- broker/gen/model/Detector_selection.h | 2 +- broker/gen/model/Detector_settings.cpp | 6 +- broker/gen/model/Detector_settings.h | 2 +- broker/gen/model/Detector_state.cpp | 2 +- broker/gen/model/Detector_state.h | 2 +- broker/gen/model/Detector_status.cpp | 2 +- broker/gen/model/Detector_status.h | 2 +- broker/gen/model/Detector_timing.cpp | 2 +- broker/gen/model/Detector_timing.h | 2 +- broker/gen/model/Detector_type.cpp | 2 +- broker/gen/model/Detector_type.h | 2 +- broker/gen/model/Error_message.cpp | 2 +- broker/gen/model/Error_message.h | 2 +- broker/gen/model/Fpga_status_inner.cpp | 2 +- broker/gen/model/Fpga_status_inner.h | 2 +- broker/gen/model/Helpers.cpp | 2 +- broker/gen/model/Helpers.h | 2 +- broker/gen/model/Image_format_settings.cpp | 2 +- broker/gen/model/Image_format_settings.h | 2 +- broker/gen/model/Image_pusher_type.cpp | 2 +- broker/gen/model/Image_pusher_type.h | 2 +- broker/gen/model/Instrument_metadata.cpp | 2 +- broker/gen/model/Instrument_metadata.h | 2 +- broker/gen/model/Jfjoch_settings.cpp | 2 +- broker/gen/model/Jfjoch_settings.h | 2 +- broker/gen/model/Jfjoch_statistics.cpp | 34 +- broker/gen/model/Jfjoch_statistics.h | 12 +- broker/gen/model/Measurement_statistics.cpp | 2 +- broker/gen/model/Measurement_statistics.h | 2 +- broker/gen/model/Pcie_devices_inner.cpp | 2 +- broker/gen/model/Pcie_devices_inner.h | 2 +- broker/gen/model/Pixel_mask_statistics.cpp | 2 +- broker/gen/model/Pixel_mask_statistics.h | 2 +- broker/gen/model/Plot.cpp | 2 +- broker/gen/model/Plot.h | 2 +- broker/gen/model/Plots.cpp | 2 +- broker/gen/model/Plots.h | 2 +- broker/gen/model/Preview_settings.cpp | 2 +- broker/gen/model/Preview_settings.h | 2 +- broker/gen/model/Roi_box.cpp | 2 +- broker/gen/model/Roi_box.h | 2 +- broker/gen/model/Roi_box_list.cpp | 2 +- broker/gen/model/Roi_box_list.h | 2 +- broker/gen/model/Roi_circle.cpp | 2 +- broker/gen/model/Roi_circle.h | 2 +- broker/gen/model/Roi_circle_list.cpp | 2 +- broker/gen/model/Roi_circle_list.h | 2 +- broker/gen/model/Roi_definitions.cpp | 111 +++++ broker/gen/model/Roi_definitions.h | 85 ++++ broker/gen/model/Rotation_axis.cpp | 2 +- broker/gen/model/Rotation_axis.h | 2 +- broker/gen/model/Spot_finding_settings.cpp | 2 +- broker/gen/model/Spot_finding_settings.h | 2 +- .../gen/model/Standard_detector_geometry.cpp | 2 +- broker/gen/model/Standard_detector_geometry.h | 2 +- broker/gen/model/Zeromq_metadata_settings.cpp | 2 +- broker/gen/model/Zeromq_metadata_settings.h | 2 +- broker/gen/model/Zeromq_preview_settings.cpp | 2 +- broker/gen/model/Zeromq_preview_settings.h | 2 +- broker/gen/model/Zeromq_settings.cpp | 2 +- broker/gen/model/Zeromq_settings.h | 2 +- broker/jfjoch_api.yaml | 177 ++++---- broker/redoc-static.html | 128 +++--- common/CMakeLists.txt | 2 + common/Definitions.h | 8 +- common/DetectorSettings.cpp | 12 - common/DetectorSettings.h | 1 - common/DetectorSetup.cpp | 44 +- common/DetectorSetup.h | 9 +- common/DiffractionExperiment.cpp | 28 +- common/ROIDefinition.cpp | 3 + common/ROIDefinition.h | 15 + common/ROIMap.cpp | 44 +- common/ROIMap.h | 11 +- detector_control/DetectorWrapper.cpp | 5 + docs/CHANGELOG.md | 11 + docs/JFJOCH_BROKER.md | 1 + docs/conf.py | 2 +- docs/python_client/README.md | 13 +- docs/python_client/docs/BrokerStatus.md | 3 +- docs/python_client/docs/DefaultApi.md | 390 ++++++------------ docs/python_client/docs/Detector.md | 3 +- docs/python_client/docs/DetectorList.md | 2 +- .../docs/DetectorListDetectorsInner.md | 3 + .../python_client/docs/DetectorListElement.md | 39 ++ docs/python_client/docs/JfjochStatistics.md | 1 + docs/python_client/docs/RoiDefinitions.md | 31 ++ etc/broker_local.json | 2 + fpga/hdl/action_config.v | 2 +- fpga/pcie_driver/dkms.conf | 2 +- fpga/pcie_driver/install_dkms.sh | 2 +- fpga/pcie_driver/jfjoch_drv.c | 2 +- fpga/pcie_driver/postinstall.sh | 2 +- fpga/pcie_driver/preuninstall.sh | 2 +- frontend/package-lock.json | 4 +- frontend/package.json | 2 +- frontend/src/App.tsx | 2 +- frontend/src/components/DetectorSelection.tsx | 104 +++-- frontend/src/components/DetectorStatus.tsx | 89 ++-- frontend/src/components/ErrorMessage.tsx | 37 +- frontend/src/components/ROI.tsx | 97 +++-- frontend/src/openapi/core/OpenAPI.ts | 2 +- frontend/src/openapi/index.ts | 2 + frontend/src/openapi/models/broker_status.ts | 18 +- frontend/src/openapi/models/detector.ts | 11 +- frontend/src/openapi/models/detector_list.ts | 16 +- .../openapi/models/detector_list_element.ts | 22 + .../src/openapi/models/jfjoch_statistics.ts | 2 + .../src/openapi/models/roi_definitions.ts | 16 + .../src/openapi/services/DefaultService.ts | 52 +-- frontend/src/version.ts | 2 +- preview/PreviewImage.cpp | 4 +- receiver/JFJochReceiver.cpp | 10 +- receiver/JFJochReceiver.h | 2 + tests/DetectorSettingsTest.cpp | 7 - tests/DetectorSetupTest.cpp | 12 + tests/DiffractionExperimentTest.cpp | 36 +- tests/JFJochReceiverProcessingTest.cpp | 7 +- tests/JFJochStateMachineTest.cpp | 23 +- tests/JPEGTest.cpp | 18 +- tests/ROIMapTest.cpp | 18 +- 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 +- 165 files changed, 2061 insertions(+), 1155 deletions(-) create mode 100644 broker/gen/model/Detector_list_element.cpp create mode 100644 broker/gen/model/Detector_list_element.h create mode 100644 broker/gen/model/Roi_definitions.cpp create mode 100644 broker/gen/model/Roi_definitions.h create mode 100644 common/ROIDefinition.cpp create mode 100644 common/ROIDefinition.h create mode 100644 docs/python_client/docs/DetectorListElement.md create mode 100644 docs/python_client/docs/RoiDefinitions.md create mode 100644 frontend/src/openapi/models/detector_list_element.ts create mode 100644 frontend/src/openapi/models/roi_definitions.ts diff --git a/VERSION b/VERSION index 90a7420b..3dcfd461 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.0-rc.28 +1.0.0-rc.29 diff --git a/broker/JFJochBrokerHttp.cpp b/broker/JFJochBrokerHttp.cpp index fba0034a..aa97e618 100644 --- a/broker/JFJochBrokerHttp.cpp +++ b/broker/JFJochBrokerHttp.cpp @@ -79,7 +79,7 @@ void JFJochBrokerHttp::wait_till_done_post(const std::optional &timeout response.send(Pistache::Http::Code::Bad_Gateway); break; case JFJochState::Error: - throw WrongDAQStateException(status.error.value_or("Unknown error")); + throw WrongDAQStateException(status.message.value_or("Unknown error")); case JFJochState::Measuring: case JFJochState::Busy: case JFJochState::Pedestal: @@ -291,23 +291,14 @@ void JFJochBrokerHttp::config_internal_generator_image_tiff_put(const Pistache:: response.send(Pistache::Http::Code::Ok); } -void JFJochBrokerHttp::roi_box_get(Pistache::Http::ResponseWriter &response) { - ProcessOutput(Convert(state_machine.GetBoxROI()), response); +void JFJochBrokerHttp::config_roi_get(Pistache::Http::ResponseWriter &response) { + ProcessOutput(Convert(state_machine.GetROIDefintion()), response); } -void JFJochBrokerHttp::roi_box_put(const org::openapitools::server::model::Roi_box_list &roiBoxList, - Pistache::Http::ResponseWriter &response) { - state_machine.SetBoxROI(Convert(roiBoxList)); - response.send(Pistache::Http::Code::Ok); -} +void JFJochBrokerHttp::config_roi_put(const org::openapitools::server::model::Roi_definitions &roiDefinitions, -void JFJochBrokerHttp::roi_circle_get(Pistache::Http::ResponseWriter &response) { - ProcessOutput(Convert(state_machine.GetCircleROI()), response); -} - -void JFJochBrokerHttp::roi_circle_put(const org::openapitools::server::model::Roi_circle_list &roiCircleList, - Pistache::Http::ResponseWriter &response) { - state_machine.SetCircleROI(Convert(roiCircleList)); +Pistache::Http::ResponseWriter &response) { + state_machine.SetROIDefinition(Convert(roiDefinitions)); response.send(Pistache::Http::Code::Ok); } @@ -548,6 +539,7 @@ void JFJochBrokerHttp::statistics_get(const std::optional &compression, Pi statistics.setInstrumentMetadata(Convert(state_machine.GetInstrumentMetadata())); statistics.setImageFormatSettings(Convert(state_machine.GetImageFormatSettings())); statistics.setPixelMask(Convert(state_machine.GetPixelMaskStatistics())); + statistics.setRoi(Convert(state_machine.GetROIDefintion())); auto zeromq_prev = state_machine.GetPreviewSocketSettings(); if (!zeromq_prev.address.empty()) diff --git a/broker/JFJochBrokerHttp.h b/broker/JFJochBrokerHttp.h index 79456458..a5f6598b 100644 --- a/broker/JFJochBrokerHttp.h +++ b/broker/JFJochBrokerHttp.h @@ -111,12 +111,9 @@ class JFJochBrokerHttp : public org::openapitools::server::api::DefaultApi { Pistache::Http::ResponseWriter &response) override; void preview_image_tiff_get(Pistache::Http::ResponseWriter &response) override; - void roi_box_get(Pistache::Http::ResponseWriter &response) override; - void roi_box_put(const org::openapitools::server::model::Roi_box_list &roiBoxList, - Pistache::Http::ResponseWriter &response) override; - void roi_circle_get(Pistache::Http::ResponseWriter &response) override; - void roi_circle_put(const org::openapitools::server::model::Roi_circle_list &roiCircleList, - Pistache::Http::ResponseWriter &response) override; + void config_roi_get(Pistache::Http::ResponseWriter &response) override; + void config_roi_put(const org::openapitools::server::model::Roi_definitions &roiDefinitions, + Pistache::Http::ResponseWriter &response) override; void config_internal_generator_image_put(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter &response) override; diff --git a/broker/JFJochBrokerParser.cpp b/broker/JFJochBrokerParser.cpp index 14f3bbda..76c5bc1b 100644 --- a/broker/JFJochBrokerParser.cpp +++ b/broker/JFJochBrokerParser.cpp @@ -93,6 +93,9 @@ DetectorSetup ParseDetectorSetup(const org::openapitools::server::model::Detecto .SerialNumber(d.getSerialNumber()) .ModuleSync(d.isModuleSync()); + if (d.readoutTimeUsIsSet()) + setup.ReadOutTime(std::chrono::microseconds(d.getReadoutTimeUs())); + if (d.baseDataIpv4AddressIsSet()) setup.BaseIPv4Addr(d.getBaseDataIpv4Address()); if (d.txDelayIsSet()) diff --git a/broker/JFJochStateMachine.cpp b/broker/JFJochStateMachine.cpp index fa14e67d..825fc570 100644 --- a/broker/JFJochStateMachine.cpp +++ b/broker/JFJochStateMachine.cpp @@ -5,6 +5,7 @@ #include "JFJochStateMachine.h" #include "../preview/JFJochTIFF.h" +#include "pistache/net.h" JFJochStateMachine::JFJochStateMachine(JFJochServices &in_services, Logger &in_logger) : logger(in_logger), @@ -12,7 +13,7 @@ JFJochStateMachine::JFJochStateMachine(JFJochServices &in_services, Logger &in_l pixel_mask(experiment), current_detector_setup(0), data_processing_settings(DiffractionExperiment::DefaultDataProcessingSettings()), - pixel_mask_statistics({0,0,0}) { + pixel_mask_statistics({0, 0, 0}) { SupressTIFFErrors(); } @@ -77,12 +78,15 @@ void JFJochStateMachine::TakePedestalInternalAll(std::unique_lock &u TakePedestalInternalG2(ul, i); } } + SetState(JFJochState::Idle, + "Pedestal sequence done", + BrokerStatus::MessageSeverity::Success); services.ConfigureDetector(experiment); pixel_mask.LoadDetectorBadPixelMask(experiment, calibration.get()); UpdatePixelMaskStatistics(pixel_mask.GetStatistics()); } catch (const std::exception &e) { logger.Error("Pedestal sequence error {}", e.what()); - SetState(JFJochState::Error, e.what()); + SetState(JFJochState::Error, e.what(), BrokerStatus::MessageSeverity::Error); throw; } logger.Info("Pedestal sequence done"); @@ -91,10 +95,14 @@ void JFJochStateMachine::TakePedestalInternalAll(std::unique_lock &u void JFJochStateMachine::TakePedestalInternalG0(std::unique_lock &ul) { DiffractionExperiment local_experiment(experiment); - if (local_experiment.IsFixedGainG1()) + std::string message; + if (local_experiment.IsFixedGainG1()) { local_experiment.Mode(DetectorMode::PedestalG1); - else + message = "Pedestal G1"; + } else { local_experiment.Mode(DetectorMode::PedestalG0); + message = "Pedestal G0"; + } if (local_experiment.GetStorageCellNumber() == 1) local_experiment.StorageCellStart(15); @@ -102,15 +110,16 @@ void JFJochStateMachine::TakePedestalInternalG0(std::unique_lock &ul local_experiment.StorageCellStart(0); if (cancel_sequence) { - SetState(JFJochState::Inactive); - return; - } - if (local_experiment.GetPedestalG0Frames() == 0) { - SetState(JFJochState::Idle); + SetState(JFJochState::Inactive, + "Pedestal sequence cancelled", + BrokerStatus::MessageSeverity::Warning); return; } - SetState(JFJochState::Pedestal); + if (local_experiment.GetPedestalG0Frames() == 0) + return; + + SetState(JFJochState::Pedestal, message, BrokerStatus::MessageSeverity::Info); services.ConfigureDetector(local_experiment); services.Start(local_experiment, pixel_mask, *calibration); @@ -125,7 +134,9 @@ void JFJochStateMachine::TakePedestalInternalG0(std::unique_lock &ul if (ImportPedestalG0(pedestal_output.receiver_output)) SetState(JFJochState::Idle); else - SetState(JFJochState::Inactive); + SetState(JFJochState::Error, + "Pedestal not collected properly", + BrokerStatus::MessageSeverity::Error); } void JFJochStateMachine::TakePedestalInternalG1(std::unique_lock &ul, int32_t storage_cell) { @@ -139,16 +150,19 @@ void JFJochStateMachine::TakePedestalInternalG1(std::unique_lock &ul if (cancel_sequence) { - SetState(JFJochState::Inactive); + SetState(JFJochState::Inactive, + "Pedestal sequence cancelled", + BrokerStatus::MessageSeverity::Warning); return; } - if (local_experiment.GetPedestalG1Frames() == 0) { - SetState(JFJochState::Idle); + if (local_experiment.GetPedestalG1Frames() == 0) return; - } - SetState(JFJochState::Pedestal); + + SetState(JFJochState::Pedestal, + "Pedestal G1 SC" + std::to_string(storage_cell), + BrokerStatus::MessageSeverity::Info); services.ConfigureDetector(local_experiment); services.Start(local_experiment, pixel_mask, *calibration); @@ -160,11 +174,10 @@ void JFJochStateMachine::TakePedestalInternalG1(std::unique_lock &ul auto pedestal_output = services.Stop(); ul.lock(); - if (ImportPedestalG1G2(pedestal_output.receiver_output, 1, storage_cell)) - SetState(JFJochState::Idle); - else - SetState(JFJochState::Inactive); - + if (!ImportPedestalG1G2(pedestal_output.receiver_output, 1, storage_cell)) + SetState(JFJochState::Error, + "Pedestal not collected properly", + BrokerStatus::MessageSeverity::Error); } void JFJochStateMachine::TakePedestalInternalG2(std::unique_lock &ul, int32_t storage_cell) { @@ -177,16 +190,19 @@ void JFJochStateMachine::TakePedestalInternalG2(std::unique_lock &ul local_experiment.StorageCellStart(15); if (cancel_sequence) { - SetState(JFJochState::Inactive); + SetState(JFJochState::Inactive, + "Pedestal sequence cancelled", + BrokerStatus::MessageSeverity::Warning); return; } - if (local_experiment.GetPedestalG2Frames() == 0) { - SetState(JFJochState::Idle); + if (local_experiment.GetPedestalG2Frames() == 0) return; - } - SetState(JFJochState::Pedestal); + + SetState(JFJochState::Pedestal, + "Pedestal G2 SC" + std::to_string(storage_cell), + BrokerStatus::MessageSeverity::Info); services.ConfigureDetector(local_experiment); services.Start(local_experiment, pixel_mask, *calibration); @@ -198,17 +214,17 @@ void JFJochStateMachine::TakePedestalInternalG2(std::unique_lock &ul auto pedestal_output = services.Stop(); ul.lock(); - if (ImportPedestalG1G2(pedestal_output.receiver_output, 2, storage_cell)) - SetState(JFJochState::Idle); - else - SetState(JFJochState::Inactive); + if (!ImportPedestalG1G2(pedestal_output.receiver_output, 2, storage_cell)) + SetState(JFJochState::Error, + "Pedestal not collected properly", + BrokerStatus::MessageSeverity::Error); } void JFJochStateMachine::Initialize() { std::unique_lock ul(m); if (IsRunning()) - throw WrongDAQStateException ("Cannot initialize during measurement"); + throw WrongDAQStateException("Cannot initialize during measurement"); if (detector_setup.empty()) throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "Detector information not provided"); @@ -217,7 +233,7 @@ void JFJochStateMachine::Initialize() { logger.Info("Initialize"); - SetState(JFJochState::Busy); + SetState(JFJochState::Busy, "Configuring detector", BrokerStatus::MessageSeverity::Info); measurement = std::async(std::launch::async, &JFJochStateMachine::InitializeThread, this, std::move(ul)); } @@ -226,7 +242,7 @@ void JFJochStateMachine::Pedestal() { std::unique_lock ul(m); if (state != JFJochState::Idle) - throw WrongDAQStateException ("Must be idle to take pedestal"); + throw WrongDAQStateException("Must be idle to take pedestal"); measurement = std::async(std::launch::async, &JFJochStateMachine::PedestalThread, this, std::move(ul)); } @@ -239,8 +255,8 @@ void JFJochStateMachine::PedestalThread(std::unique_lock ul) { void JFJochStateMachine::InitializeThread(std::unique_lock ul) { try { services.On(experiment); - } catch (const std::exception& e) { - SetState(JFJochState::Error, e.what()); + } catch (const std::exception &e) { + SetState(JFJochState::Error, e.what(), BrokerStatus::MessageSeverity::Error); throw; } TakePedestalInternalAll(ul); @@ -252,11 +268,11 @@ void JFJochStateMachine::Trigger() { services.Trigger(); } -void JFJochStateMachine::Start(const DatasetSettings& settings) { +void JFJochStateMachine::Start(const DatasetSettings &settings) { std::unique_lock ul(m); if (state != JFJochState::Idle) - throw WrongDAQStateException ("Must be idle to start measurement"); + throw WrongDAQStateException("Must be idle to start measurement"); if (measurement.valid()) measurement.get(); // In case measurement was running - clear thread @@ -272,14 +288,14 @@ void JFJochStateMachine::Start(const DatasetSettings& settings) { experiment.IncrementRunNumber(); try { - SetState(JFJochState::Busy); + SetState(JFJochState::Busy, "Preparing measurement", BrokerStatus::MessageSeverity::Info); services.SetSpotFindingSettings(GetSpotFindingSettings()); services.Start(experiment, pixel_mask, *calibration); - SetState(JFJochState::Measuring); + SetState(JFJochState::Measuring, "Measuring ...", BrokerStatus::MessageSeverity::Info); measurement = std::async(std::launch::async, &JFJochStateMachine::MeasurementThread, this); } catch (const std::exception &e) { - SetState(JFJochState::Error, e.what()); + SetState(JFJochState::Error, e.what(), BrokerStatus::MessageSeverity::Error); services.Cancel(); throw; } @@ -297,14 +313,29 @@ PixelMaskStatistics JFJochStateMachine::GetPixelMaskStatistics() const { void JFJochStateMachine::MeasurementThread() { try { - auto tmp_output = services.Stop(); - { + auto tmp_output = services.Stop(); { std::unique_lock ul(m); - SetState(JFJochState::Idle); + + if (tmp_output.receiver_output.writer_queue_full_warning) + SetState(JFJochState::Idle, + "Stream receiver (writer or downstream analysis) cannot cope with data; reduce frame rate", + BrokerStatus::MessageSeverity::Warning); + else if (tmp_output.receiver_output.status.cancelled) + SetState(JFJochState::Idle, + "Data collection cancelled", + BrokerStatus::MessageSeverity::Info); + else if (tmp_output.receiver_output.efficiency != 1.0) + SetState(JFJochState::Idle, + "Missing packets in data collection; reduce frame rate", + BrokerStatus::MessageSeverity::Error); + else + SetState(JFJochState::Idle, + "Data collection without problems", + BrokerStatus::MessageSeverity::Success); } } catch (const std::exception &e) { std::unique_lock ul(m); - SetState(JFJochState::Error, e.what()); + SetState(JFJochState::Error, e.what(), BrokerStatus::MessageSeverity::Error); } c.notify_all(); } @@ -318,9 +349,11 @@ void JFJochStateMachine::Cancel() { } } -void JFJochStateMachine::DebugOnly_SetState(JFJochState in_state, const std::optional &error_message) { +void JFJochStateMachine::DebugOnly_SetState(JFJochState in_state, + const std::optional &message, + BrokerStatus::MessageSeverity message_severity) { std::unique_lock ul(m); - SetState(in_state, error_message); + SetState(in_state, message, message_severity); } void JFJochStateMachine::Deactivate() { @@ -329,9 +362,13 @@ void JFJochStateMachine::Deactivate() { if (measurement.valid()) measurement.get(); services.Off(); - SetState(JFJochState::Inactive); + SetState(JFJochState::Inactive, + "Detector safe to turn off", + BrokerStatus::MessageSeverity::Info); } catch (const std::exception &e) { - SetState(JFJochState::Error, e.what()); + SetState(JFJochState::Error, + e.what(), + BrokerStatus::MessageSeverity::Error); throw; } } @@ -397,14 +434,14 @@ void JFJochStateMachine::LoadDetectorSettings(const DetectorSettings &settings) ImportDetectorSettings(settings); break; case JFJochState::Idle: - SetState(JFJochState::Busy); + SetState(JFJochState::Busy, "Loading settings", BrokerStatus::MessageSeverity::Info); ImportDetectorSettings(settings); measurement = std::async(std::launch::async, &JFJochStateMachine::PedestalThread, this, std::move(ul)); break; case JFJochState::Measuring: case JFJochState::Busy: case JFJochState::Pedestal: - throw WrongDAQStateException ("Cannot change detector settings during data collection"); + throw WrongDAQStateException("Cannot change detector settings during data collection"); } } @@ -419,14 +456,16 @@ BrokerStatus JFJochStateMachine::GetStatus() const { return ret; } -void JFJochStateMachine::SetState(JFJochState curr_state, const std::optional &error_message) { +void JFJochStateMachine::SetState(JFJochState curr_state, + const std::optional &message, + BrokerStatus::MessageSeverity message_severity) { std::unique_lock ul(broker_status_mutex); state = curr_state; - broker_status.state = curr_state; - if (error_message && curr_state == JFJochState::Error) - broker_status.error = error_message; - else - broker_status.error = {}; + broker_status = BrokerStatus{ + .state = curr_state, + .message = message, + .message_severity = message_severity + }; } MultiLinePlot JFJochStateMachine::GetPlots(const PlotRequest &request) const { @@ -450,6 +489,7 @@ void JFJochStateMachine::AddDetectorSetup(const DetectorSetup &setup) { if (detector_setup.empty()) { experiment.Detector(setup); + UpdateROIDefinition(); gain_calibration = setup.GetGainCalibration(); current_detector_setup = 0; pixel_mask = PixelMask(experiment); @@ -461,7 +501,7 @@ DetectorList JFJochStateMachine::GetDetectorsList() const { std::unique_lock ul(m); DetectorList ret; - for (const auto & i : detector_setup) { + for (const auto &i: detector_setup) { DetectorListElement tmp; tmp.description = i.GetDescription(); tmp.nmodules = i.GetModulesNum(); @@ -470,6 +510,9 @@ DetectorList JFJochStateMachine::GetDetectorsList() const { tmp.serial_number = i.GetSerialNumber(); tmp.base_ipv4_addr = i.GetBaseIPv4Addr(); tmp.udp_interface_count = i.GetUDPInterfaceCount(); + tmp.min_frame_time = i.GetMinFrameTime(); + tmp.min_count_time = i.GetMinCountTime(); + tmp.readout_time = i.GetReadOutTime(); ret.detector.emplace_back(std::move(tmp)); } @@ -488,17 +531,18 @@ void JFJochStateMachine::SelectDetector(int64_t id) { throw JFJochException(JFJochExceptionCategory::ArrayOutOfBounds, "Detector doesn't exist"); if (IsRunning()) - throw WrongDAQStateException ("Cannot change detector during data collection"); + throw WrongDAQStateException("Cannot change detector during data collection"); try { experiment.Detector(detector_setup[id]); + UpdateROIDefinition(); gain_calibration = detector_setup[id].GetGainCalibration(); pixel_mask = PixelMask(experiment); - SetState(JFJochState::Inactive); + SetState(JFJochState::Inactive, detector_setup[id].GetDescription() + " selected; please initialize"); current_detector_setup = id; } catch (const JFJochException &e) { logger.ErrorException(e); - SetState(JFJochState::Inactive); + SetState(JFJochState::Error, e.what(), BrokerStatus::MessageSeverity::Error); throw; // re-throw the exception, so it is populated to caller } } @@ -507,7 +551,7 @@ void JFJochStateMachine::SetRadialIntegrationSettings(const AzimuthalIntegration std::unique_lock ul(m); if (IsRunning()) - throw WrongDAQStateException ("Cannot change radial integration settings during data collection"); + throw WrongDAQStateException("Cannot change radial integration settings during data collection"); experiment.ImportRadialIntegrationSettings(settings); } @@ -552,10 +596,11 @@ void JFJochStateMachine::ResetError() noexcept { try { if (measurement.valid()) measurement.get(); - } catch (...) {} + } catch (...) { + } } -std::string JFJochStateMachine::GetPreviewJPEG(const PreviewJPEGSettings& settings) const { +std::string JFJochStateMachine::GetPreviewJPEG(const PreviewJPEGSettings &settings) const { return services.GetPreviewJPEG(settings); } @@ -567,7 +612,7 @@ std::string JFJochStateMachine::GetPedestalTIFF(size_t gain_level, size_t sc) co std::unique_lock ul(m); if (state != JFJochState::Idle) - throw WrongDAQStateException ("Pedestal can be only retrieved in Idle state"); + throw WrongDAQStateException("Pedestal can be only retrieved in Idle state"); if ((experiment.GetDetectorSetup().GetDetectorType() == DetectorType::JUNGFRAU) && calibration) { auto tmp = calibration->GetPedestal(gain_level, sc); @@ -581,11 +626,12 @@ void JFJochStateMachine::LoadInternalGeneratorImage(const void *data, size_t siz std::unique_lock ul(m); if (state != JFJochState::Idle) - throw WrongDAQStateException ("Can change internal generator image only when detector in Idle state"); + throw WrongDAQStateException("Can change internal generator image only when detector in Idle state"); if ((size != experiment.GetPixelsNum() * sizeof(uint16_t)) && (size != experiment.GetModulesNum() * RAW_MODULE_SIZE * sizeof(uint16_t))) - throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "Image size doesn't match current detector"); + throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, + "Image size doesn't match current detector"); if (image_number >= experiment.GetInternalPacketGeneratorImages()) throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, @@ -601,7 +647,7 @@ void JFJochStateMachine::LoadInternalGeneratorImageTIFF(const std::string &s, ui std::unique_lock ul(m); if (state != JFJochState::Idle) - throw WrongDAQStateException ("Can change internal generator image only when detector in Idle state"); + throw WrongDAQStateException("Can change internal generator image only when detector in Idle state"); uint32_t cols, lines; auto v = ReadTIFFFromString16(s, cols, lines); @@ -609,35 +655,28 @@ void JFJochStateMachine::LoadInternalGeneratorImageTIFF(const std::string &s, ui || ((cols == RAW_MODULE_SIZE) && (lines == RAW_MODULE_LINES * experiment.GetModulesNum()))) services.LoadInternalGeneratorImage(experiment, v, image_number); else - throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "Image size doesn't match current detector"); + throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, + "Image size doesn't match current detector"); } -void JFJochStateMachine::SetBoxROI(const std::vector &input) { +void JFJochStateMachine::UpdateROIDefinition() { + std::unique_lock ul(roi_mutex); + roi = experiment.ROI().GetROIDefinition(); +} + +void JFJochStateMachine::SetROIDefinition(const ROIDefinition &input) { std::unique_lock ul(m); if (IsRunning()) - throw WrongDAQStateException ("ROI can be modified only when detector is not running"); + throw WrongDAQStateException("ROI can be modified only when detector is not running"); - experiment.ROI().SetROIBox(input); + experiment.ROI().SetROI(input); + UpdateROIDefinition(); } -void JFJochStateMachine::SetCircleROI(const std::vector &input) { - std::unique_lock ul(m); - - if (IsRunning()) - throw WrongDAQStateException ("ROI can be modified only when detector is not running"); - - experiment.ROI().SetROICircle(input); -} - -std::vector JFJochStateMachine::GetBoxROI() const { - std::unique_lock ul(m); - return experiment.ROI().GetROIBox(); -} - -std::vector JFJochStateMachine::GetCircleROI() const { - std::unique_lock ul(m); - return experiment.ROI().GetROICircle(); +ROIDefinition JFJochStateMachine::GetROIDefintion() const { + std::unique_lock ul(roi_mutex); + return roi; } std::vector JFJochStateMachine::GetXFELPulseID() const { @@ -680,7 +719,7 @@ void JFJochStateMachine::SetUserPixelMask(const std::vector &v) { std::unique_lock ul(m); if (state != JFJochState::Idle) - throw WrongDAQStateException ("User mask can be only modified in Idle state"); + throw WrongDAQStateException("User mask can be only modified in Idle state"); try { pixel_mask.LoadUserMask(experiment, v); @@ -700,7 +739,7 @@ void JFJochStateMachine::LoadInstrumentMetadata(const InstrumentMetadata &settin std::unique_lock ul(m); if (IsRunning()) - throw WrongDAQStateException ("Cannot change instrument metadata during data collection"); + throw WrongDAQStateException("Cannot change instrument metadata during data collection"); experiment.ImportInstrumentMetadata(settings); } @@ -714,7 +753,7 @@ void JFJochStateMachine::LoadImageFormatSettings(const ImageFormatSettings &sett std::unique_lock ul(m); if (IsRunning()) - throw WrongDAQStateException ("Cannot change image format settings during data collection"); + throw WrongDAQStateException("Cannot change image format settings during data collection"); experiment.ImportImageFormatSettings(settings); pixel_mask.Update(settings); @@ -725,7 +764,7 @@ void JFJochStateMachine::RawImageFormatSettings() { std::unique_lock ul(m); if (IsRunning()) - throw WrongDAQStateException ("Cannot change instrument metadata during data collection"); + throw WrongDAQStateException("Cannot change instrument metadata during data collection"); experiment.Raw(); } @@ -734,7 +773,7 @@ void JFJochStateMachine::ConvImageFormatSettings() { std::unique_lock ul(m); if (IsRunning()) - throw WrongDAQStateException ("Cannot change instrument metadata during data collection"); + throw WrongDAQStateException("Cannot change instrument metadata during data collection"); experiment.Conversion(); } diff --git a/broker/JFJochStateMachine.h b/broker/JFJochStateMachine.h index 6f78fb13..e1bec973 100644 --- a/broker/JFJochStateMachine.h +++ b/broker/JFJochStateMachine.h @@ -21,7 +21,8 @@ enum class JFJochState {Inactive, Idle, Measuring, Error, Busy, Pedestal}; struct BrokerStatus { JFJochState state = JFJochState::Inactive; std::optional progress; - std::optional error; + std::optional message; + enum class MessageSeverity {Error, Info, Warning, Success} message_severity = MessageSeverity::Error; }; struct DetectorListElement { @@ -32,6 +33,9 @@ struct DetectorListElement { int64_t nmodules; int64_t width; int64_t height; + std::chrono::microseconds readout_time; + std::chrono::microseconds min_frame_time; + std::chrono::microseconds min_count_time; }; struct DetectorList { @@ -101,10 +105,15 @@ class JFJochStateMachine { mutable std::mutex broker_status_mutex; BrokerStatus broker_status; + mutable std::mutex roi_mutex; + ROIDefinition roi; + void UpdatePixelMaskStatistics(const PixelMaskStatistics &input); // Private functions assume that lock m is acquired - void SetState(JFJochState curr_state, const std::optional &error_message = {}); + void SetState(JFJochState curr_state, + const std::optional &message = {}, + BrokerStatus::MessageSeverity message_severity = BrokerStatus::MessageSeverity::Info); void MeasurementThread(); void PedestalThread(std::unique_lock ul); void InitializeThread(std::unique_lock ul); @@ -117,6 +126,7 @@ class JFJochStateMachine { void TakePedestalInternalG1(std::unique_lock &ul, int32_t storage_cell = 0); void TakePedestalInternalG2(std::unique_lock &ul, int32_t storage_cell = 0); void ImportDetectorSettings(const DetectorSettings& input); + void UpdateROIDefinition(); public: JFJochStateMachine(JFJochServices &in_services, Logger &logger); ~JFJochStateMachine(); @@ -173,13 +183,12 @@ public: DiffractionExperiment& NotThreadSafe_Experiment(); // Function for debug only - UNSAFE for real operation - void DebugOnly_SetState(JFJochState state, const std::optional &error_message = {}); + void DebugOnly_SetState(JFJochState state, + const std::optional &message = {}, + BrokerStatus::MessageSeverity message_severity = BrokerStatus::MessageSeverity::Info); - void SetBoxROI(const std::vector& input); - void SetCircleROI(const std::vector& input); - - std::vector GetBoxROI() const; - std::vector GetCircleROI() const; + void SetROIDefinition(const ROIDefinition& input); + ROIDefinition GetROIDefintion() const; std::vector GetXFELPulseID() const; std::vector GetXFELEventCode() const; diff --git a/broker/OpenAPIConvert.cpp b/broker/OpenAPIConvert.cpp index df7c68c0..df515043 100644 --- a/broker/OpenAPIConvert.cpp +++ b/broker/OpenAPIConvert.cpp @@ -198,7 +198,6 @@ org::openapitools::server::model::Broker_status Convert(const BrokerStatus& inpu break; case JFJochState::Error: ret.setState("Error"); - ret.setErrorMessage(input.error.value_or("Unknown error")); break; case JFJochState::Busy: ret.setState("Busy"); @@ -207,6 +206,24 @@ org::openapitools::server::model::Broker_status Convert(const BrokerStatus& inpu ret.setState("Pedestal"); break; } + + if (input.message.has_value()) + ret.setMessage(input.message.value()); + + switch (input.message_severity) { + case BrokerStatus::MessageSeverity::Info: + ret.setMessageSeverity("info"); + break; + case BrokerStatus::MessageSeverity::Success: + ret.setMessageSeverity("success"); + break; + case BrokerStatus::MessageSeverity::Warning: + ret.setMessageSeverity("warning"); + break; + default: + ret.setMessageSeverity("error"); + break; + } if (input.progress.has_value()) ret.setProgress(input.progress.value()); @@ -311,9 +328,9 @@ org::openapitools::server::model::Detector_status Convert(const DetectorStatus & org::openapitools::server::model::Detector_list Convert(const DetectorList &input) { org::openapitools::server::model::Detector_list ret; - std::vector dets; + std::vector dets; for (int i = 0; i < input.detector.size(); i++) { - org::openapitools::server::model::Detector_list_detectors_inner d; + org::openapitools::server::model::Detector_list_element d; d.setId(i); d.setDescription(input.detector[i].description); d.setNmodules(input.detector[i].nmodules); @@ -322,6 +339,9 @@ org::openapitools::server::model::Detector_list Convert(const DetectorList &inpu d.setSerialNumber(input.detector[i].serial_number); d.setBaseIpv4Addr(input.detector[i].base_ipv4_addr); d.setUdpInterfaceCount(input.detector[i].udp_interface_count); + d.setMinFrameTimeUs(input.detector[i].min_frame_time.count()); + d.setMinCountTimeUs(input.detector[i].min_count_time.count()); + d.setReadoutTimeUs(input.detector[i].readout_time.count()); dets.emplace_back(std::move(d)); } ret.setDetectors(dets); @@ -364,18 +384,13 @@ org::openapitools::server::model::Azim_int_settings Convert(const AzimuthalInteg return ret; } -std::vector Convert(const org::openapitools::server::model::Roi_box_list& input) { - std::vector ret; - for (const auto &i: input.getRois()) - ret.emplace_back(ROIBox(i.getName(), i.getMinXPxl(), i.getMaxXPxl(), i.getMinYPxl(), i.getMaxYPxl())); - return ret; -} - -std::vector Convert(const org::openapitools::server::model::Roi_circle_list& input) { - std::vector ret; - for (const auto &i: input.getRois()) - ret.emplace_back(ROICircle(i.getName(), i.getCenterXPxl(), i.getCenterYPxl(), i.getRadiusPxl())); - return ret; +ROIDefinition Convert(const org::openapitools::server::model::Roi_definitions& input) { + ROIDefinition output{}; + for (const auto &i: input.getBox().getRois()) + output.boxes.emplace_back(ROIBox(i.getName(), i.getMinXPxl(), i.getMaxXPxl(), i.getMinYPxl(), i.getMaxYPxl())); + for (const auto &i: input.getCircle().getRois()) + output.circles.emplace_back(ROICircle(i.getName(), i.getCenterXPxl(), i.getCenterYPxl(), i.getRadiusPxl())); + return output; } org::openapitools::server::model::Roi_circle_list Convert(const std::vector &input) { @@ -393,7 +408,6 @@ org::openapitools::server::model::Roi_circle_list Convert(const std::vector &input) { org::openapitools::server::model::Roi_box_list ret{}; std::vector tmp; @@ -410,6 +424,13 @@ org::openapitools::server::model::Roi_box_list Convert(const std::vector return ret; } +org::openapitools::server::model::Roi_definitions Convert(const ROIDefinition &input) { + org::openapitools::server::model::Roi_definitions ret{}; + ret.setCircle(Convert(input.circles)); + ret.setBox(Convert(input.boxes)); + return ret; +} + PreviewJPEGSettings Convert(const org::openapitools::server::model::Preview_settings& input) { PreviewJPEGSettings ret{}; ret.show_spots = input.isShowSpots(); diff --git a/broker/OpenAPIConvert.h b/broker/OpenAPIConvert.h index 8edecd50..a2b6e8cd 100644 --- a/broker/OpenAPIConvert.h +++ b/broker/OpenAPIConvert.h @@ -15,8 +15,7 @@ #include "gen/model/Detector_status.h" #include "gen/model/Plots.h" #include "gen/model/Azim_int_settings.h" -#include "gen/model/Roi_box_list.h" -#include "gen/model/Roi_circle_list.h" +#include "gen/model/Roi_definitions.h" #include "gen/model/Image_format_settings.h" #include "gen/model/Preview_settings.h" #include "gen/model/Dataset_settings.h" @@ -51,10 +50,8 @@ org::openapitools::server::model::Detector_list Convert(const DetectorList &inpu org::openapitools::server::model::Plots Convert(const MultiLinePlot& input); AzimuthalIntegrationSettings Convert(const org::openapitools::server::model::Azim_int_settings& input); org::openapitools::server::model::Azim_int_settings Convert(const AzimuthalIntegrationSettings& settings); -std::vector Convert(const org::openapitools::server::model::Roi_box_list& input); -std::vector Convert(const org::openapitools::server::model::Roi_circle_list& input); -org::openapitools::server::model::Roi_circle_list Convert(const std::vector &input); -org::openapitools::server::model::Roi_box_list Convert(const std::vector &input); +ROIDefinition Convert(const org::openapitools::server::model::Roi_definitions& input); +org::openapitools::server::model::Roi_definitions Convert(const ROIDefinition &input); PreviewJPEGSettings Convert(const org::openapitools::server::model::Preview_settings& input); ImageFormatSettings Convert(const org::openapitools::server::model::Image_format_settings& input); org::openapitools::server::model::Image_format_settings Convert(const ImageFormatSettings& input); diff --git a/broker/gen/api/ApiBase.h b/broker/gen/api/ApiBase.h index f632660c..b6f852c6 100644 --- a/broker/gen/api/ApiBase.h +++ b/broker/gen/api/ApiBase.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 fc69ddf3..eab85174 100644 --- a/broker/gen/api/DefaultApi.cpp +++ b/broker/gen/api/DefaultApi.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -48,6 +48,8 @@ void DefaultApi::setupRoutes() { Routes::Put(*router, base + "/config/internal_generator_image.tiff", Routes::bind(&DefaultApi::config_internal_generator_image_tiff_put_handler, this)); Routes::Get(*router, base + "/config/mask", Routes::bind(&DefaultApi::config_mask_get_handler, this)); Routes::Get(*router, base + "/config/mask.tiff", Routes::bind(&DefaultApi::config_mask_tiff_get_handler, this)); + Routes::Get(*router, base + "/config/roi", Routes::bind(&DefaultApi::config_roi_get_handler, this)); + Routes::Put(*router, base + "/config/roi", Routes::bind(&DefaultApi::config_roi_put_handler, this)); Routes::Get(*router, base + "/config/select_detector", Routes::bind(&DefaultApi::config_select_detector_get_handler, this)); Routes::Put(*router, base + "/config/select_detector", Routes::bind(&DefaultApi::config_select_detector_put_handler, this)); Routes::Get(*router, base + "/config/spot_finding", Routes::bind(&DefaultApi::config_spot_finding_get_handler, this)); @@ -84,10 +86,6 @@ void DefaultApi::setupRoutes() { Routes::Post(*router, base + "/preview/image.jpeg", Routes::bind(&DefaultApi::preview_image_jpeg_post_handler, this)); Routes::Get(*router, base + "/preview/image.tiff", Routes::bind(&DefaultApi::preview_image_tiff_get_handler, this)); Routes::Get(*router, base + "/preview/pedestal.tiff", Routes::bind(&DefaultApi::preview_pedestal_tiff_get_handler, this)); - Routes::Get(*router, base + "/roi/box", Routes::bind(&DefaultApi::roi_box_get_handler, this)); - Routes::Put(*router, base + "/roi/box", Routes::bind(&DefaultApi::roi_box_put_handler, this)); - Routes::Get(*router, base + "/roi/circle", Routes::bind(&DefaultApi::roi_circle_get_handler, this)); - Routes::Put(*router, base + "/roi/circle", Routes::bind(&DefaultApi::roi_circle_put_handler, this)); Routes::Post(*router, base + "/start", Routes::bind(&DefaultApi::start_post_handler, this)); Routes::Get(*router, base + "/statistics/calibration", Routes::bind(&DefaultApi::statistics_calibration_get_handler, this)); Routes::Get(*router, base + "/statistics/data_collection", Routes::bind(&DefaultApi::statistics_data_collection_get_handler, this)); @@ -463,6 +461,56 @@ void DefaultApi::config_mask_tiff_get_handler(const Pistache::Rest::Request &, P response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); } +} +void DefaultApi::config_roi_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { + try { + + + try { + this->config_roi_get(response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + +} +void DefaultApi::config_roi_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { + try { + + + // Getting the body param + + Roi_definitions roiDefinitions; + + try { + nlohmann::json::parse(request.body()).get_to(roiDefinitions); + roiDefinitions.validate(); + } catch (std::exception &e) { + this->handleParsingException(e, response); + return; + } + + try { + this->config_roi_put(roiDefinitions, response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + } void DefaultApi::config_select_detector_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { try { @@ -1467,106 +1515,6 @@ void DefaultApi::preview_pedestal_tiff_get_handler(const Pistache::Rest::Request response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); } -} -void DefaultApi::roi_box_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { - try { - - - try { - this->roi_box_get(response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::roi_box_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { - try { - - - // Getting the body param - - Roi_box_list roiBoxList; - - try { - nlohmann::json::parse(request.body()).get_to(roiBoxList); - roiBoxList.validate(); - } catch (std::exception &e) { - this->handleParsingException(e, response); - return; - } - - try { - this->roi_box_put(roiBoxList, response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::roi_circle_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { - try { - - - try { - this->roi_circle_get(response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::roi_circle_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { - try { - - - // Getting the body param - - Roi_circle_list roiCircleList; - - try { - nlohmann::json::parse(request.body()).get_to(roiCircleList); - roiCircleList.validate(); - } catch (std::exception &e) { - this->handleParsingException(e, response); - return; - } - - try { - this->roi_circle_put(roiCircleList, response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - } void DefaultApi::start_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { try { diff --git a/broker/gen/api/DefaultApi.h b/broker/gen/api/DefaultApi.h index 16f674f2..cb7fe218 100644 --- a/broker/gen/api/DefaultApi.h +++ b/broker/gen/api/DefaultApi.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -44,8 +44,7 @@ #include "Measurement_statistics.h" #include "Plots.h" #include "Preview_settings.h" -#include "Roi_box_list.h" -#include "Roi_circle_list.h" +#include "Roi_definitions.h" #include "Spot_finding_settings.h" #include "Zeromq_metadata_settings.h" #include "Zeromq_preview_settings.h" @@ -81,6 +80,8 @@ private: void config_internal_generator_image_tiff_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); void config_mask_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); void config_mask_tiff_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); + void config_roi_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); + void config_roi_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); void config_select_detector_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); void config_select_detector_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); void config_spot_finding_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); @@ -117,10 +118,6 @@ private: void preview_image_jpeg_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); void preview_image_tiff_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); void preview_pedestal_tiff_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); - void roi_box_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); - void roi_box_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); - void roi_circle_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); - void roi_circle_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); void start_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); void statistics_calibration_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); void statistics_data_collection_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); @@ -271,6 +268,21 @@ private: /// virtual void config_mask_tiff_get(Pistache::Http::ResponseWriter &response) = 0; /// + /// Get ROI definitions + /// + /// + /// + /// + virtual void config_roi_get(Pistache::Http::ResponseWriter &response) = 0; + /// + /// Upload ROI definitions + /// + /// + /// + /// + /// (optional) + virtual void config_roi_put(const org::openapitools::server::model::Roi_definitions &roiDefinitions, Pistache::Http::ResponseWriter &response) = 0; + /// /// List available detectors /// /// @@ -557,36 +569,6 @@ private: /// Storage cell number (optional, default to 0) virtual void preview_pedestal_tiff_get(const std::optional &gainLevel, const std::optional &sc, Pistache::Http::ResponseWriter &response) = 0; /// - /// Get box ROIs - /// - /// - /// - /// - virtual void roi_box_get(Pistache::Http::ResponseWriter &response) = 0; - /// - /// Upload box ROIs - /// - /// - /// - /// - /// (optional) - virtual void roi_box_put(const org::openapitools::server::model::Roi_box_list &roiBoxList, Pistache::Http::ResponseWriter &response) = 0; - /// - /// Get circular ROI - /// - /// - /// - /// - virtual void roi_circle_get(Pistache::Http::ResponseWriter &response) = 0; - /// - /// Upload circular ROI - /// - /// - /// - /// - /// (optional) - virtual void roi_circle_put(const org::openapitools::server::model::Roi_circle_list &roiCircleList, Pistache::Http::ResponseWriter &response) = 0; - /// /// Start detector /// /// diff --git a/broker/gen/model/Azim_int_settings.cpp b/broker/gen/model/Azim_int_settings.cpp index c4e00943..25242749 100644 --- a/broker/gen/model/Azim_int_settings.cpp +++ b/broker/gen/model/Azim_int_settings.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 78c2e684..069d7fe4 100644 --- a/broker/gen/model/Azim_int_settings.h +++ b/broker/gen/model/Azim_int_settings.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 929d979e..8aa28721 100644 --- a/broker/gen/model/Broker_status.cpp +++ b/broker/gen/model/Broker_status.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -24,8 +24,10 @@ Broker_status::Broker_status() m_State = ""; m_Progress = 0.0f; m_ProgressIsSet = false; - m_Error_message = ""; - m_Error_messageIsSet = false; + m_Message = ""; + m_MessageIsSet = false; + m_Message_severity = "error"; + m_Message_severityIsSet = false; } @@ -67,7 +69,7 @@ bool Broker_status::validate(std::stringstream& msg, const std::string& pathPref } } - + return success; } @@ -83,7 +85,10 @@ bool Broker_status::operator==(const Broker_status& rhs) const ((!progressIsSet() && !rhs.progressIsSet()) || (progressIsSet() && rhs.progressIsSet() && getProgress() == rhs.getProgress())) && - ((!errorMessageIsSet() && !rhs.errorMessageIsSet()) || (errorMessageIsSet() && rhs.errorMessageIsSet() && getErrorMessage() == rhs.getErrorMessage())) + ((!messageIsSet() && !rhs.messageIsSet()) || (messageIsSet() && rhs.messageIsSet() && getMessage() == rhs.getMessage())) && + + + ((!messageSeverityIsSet() && !rhs.messageSeverityIsSet()) || (messageSeverityIsSet() && rhs.messageSeverityIsSet() && getMessageSeverity() == rhs.getMessageSeverity())) ; } @@ -99,8 +104,10 @@ void to_json(nlohmann::json& j, const Broker_status& o) j["state"] = o.m_State; if(o.progressIsSet()) j["progress"] = o.m_Progress; - if(o.errorMessageIsSet()) - j["error_message"] = o.m_Error_message; + if(o.messageIsSet()) + j["message"] = o.m_Message; + if(o.messageSeverityIsSet()) + j["message_severity"] = o.m_Message_severity; } @@ -112,10 +119,15 @@ void from_json(const nlohmann::json& j, Broker_status& o) j.at("progress").get_to(o.m_Progress); o.m_ProgressIsSet = true; } - if(j.find("error_message") != j.end()) + if(j.find("message") != j.end()) { - j.at("error_message").get_to(o.m_Error_message); - o.m_Error_messageIsSet = true; + j.at("message").get_to(o.m_Message); + o.m_MessageIsSet = true; + } + if(j.find("message_severity") != j.end()) + { + j.at("message_severity").get_to(o.m_Message_severity); + o.m_Message_severityIsSet = true; } } @@ -145,22 +157,39 @@ void Broker_status::unsetProgress() { m_ProgressIsSet = false; } -std::string Broker_status::getErrorMessage() const +std::string Broker_status::getMessage() const { - return m_Error_message; + return m_Message; } -void Broker_status::setErrorMessage(std::string const& value) +void Broker_status::setMessage(std::string const& value) { - m_Error_message = value; - m_Error_messageIsSet = true; + m_Message = value; + m_MessageIsSet = true; } -bool Broker_status::errorMessageIsSet() const +bool Broker_status::messageIsSet() const { - return m_Error_messageIsSet; + return m_MessageIsSet; } -void Broker_status::unsetError_message() +void Broker_status::unsetMessage() { - m_Error_messageIsSet = false; + m_MessageIsSet = false; +} +std::string Broker_status::getMessageSeverity() const +{ + return m_Message_severity; +} +void Broker_status::setMessageSeverity(std::string const& value) +{ + m_Message_severity = value; + m_Message_severityIsSet = true; +} +bool Broker_status::messageSeverityIsSet() const +{ + return m_Message_severityIsSet; +} +void Broker_status::unsetMessage_severity() +{ + m_Message_severityIsSet = false; } diff --git a/broker/gen/model/Broker_status.h b/broker/gen/model/Broker_status.h index e935b095..63871903 100644 --- a/broker/gen/model/Broker_status.h +++ b/broker/gen/model/Broker_status.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -71,12 +71,19 @@ public: bool progressIsSet() const; void unsetProgress(); /// - /// Last error message in case detector is in the Error state This matters especially for async functions (start/initialize), where API won't return reason for the error during async operation. + /// Message to display besides state of the jfjoch_broker; mostly used for errors and warnings This matters especially for async functions (start/initialize), where API won't return reason for the error during async operation. /// - std::string getErrorMessage() const; - void setErrorMessage(std::string const& value); - bool errorMessageIsSet() const; - void unsetError_message(); + std::string getMessage() const; + void setMessage(std::string const& value); + bool messageIsSet() const; + void unsetMessage(); + /// + /// Level of the message to display + /// + std::string getMessageSeverity() const; + void setMessageSeverity(std::string const& value); + bool messageSeverityIsSet() const; + void unsetMessage_severity(); friend void to_json(nlohmann::json& j, const Broker_status& o); friend void from_json(const nlohmann::json& j, Broker_status& o); @@ -85,8 +92,10 @@ protected: float m_Progress; bool m_ProgressIsSet; - std::string m_Error_message; - bool m_Error_messageIsSet; + std::string m_Message; + bool m_MessageIsSet; + std::string m_Message_severity; + bool m_Message_severityIsSet; }; diff --git a/broker/gen/model/Calibration_statistics_inner.cpp b/broker/gen/model/Calibration_statistics_inner.cpp index 1958c468..c02f1c6a 100644 --- a/broker/gen/model/Calibration_statistics_inner.cpp +++ b/broker/gen/model/Calibration_statistics_inner.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 a16782df..6f6e0478 100644 --- a/broker/gen/model/Calibration_statistics_inner.h +++ b/broker/gen/model/Calibration_statistics_inner.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 f37582d3..638bb0bc 100644 --- a/broker/gen/model/Dataset_settings.cpp +++ b/broker/gen/model/Dataset_settings.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 284c4436..4b1353af 100644 --- a/broker/gen/model/Dataset_settings.h +++ b/broker/gen/model/Dataset_settings.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 c3ae4dca..53b6e022 100644 --- a/broker/gen/model/Dataset_settings_unit_cell.cpp +++ b/broker/gen/model/Dataset_settings_unit_cell.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 f5f0d346..fd1a60e6 100644 --- a/broker/gen/model/Dataset_settings_unit_cell.h +++ b/broker/gen/model/Dataset_settings_unit_cell.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 ab79b514..25080fa5 100644 --- a/broker/gen/model/Detector.cpp +++ b/broker/gen/model/Detector.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -32,6 +32,8 @@ Detector::Detector() m_Module_syncIsSet = false; m_Sensor_thickness_um = 320.0f; m_Sensor_thickness_umIsSet = false; + m_Readout_time_us = 0L; + m_Readout_time_usIsSet = false; m_Calibration_fileIsSet = false; m_HostnameIsSet = false; m_Sensor_material = "Si"; @@ -146,6 +148,20 @@ bool Detector::validate(std::stringstream& msg, const std::string& pathPrefix) c } + if (readoutTimeUsIsSet()) + { + const int64_t& value = m_Readout_time_us; + const std::string currentValuePath = _pathPrefix + ".readoutTimeUs"; + + + if (value < 1ll) + { + success = false; + msg << currentValuePath << ": must be greater than or equal to 1;"; + } + + } + if (calibrationFileIsSet()) { const std::vector& value = m_Calibration_file; @@ -260,6 +276,9 @@ bool Detector::operator==(const Detector& rhs) const ((!sensorThicknessUmIsSet() && !rhs.sensorThicknessUmIsSet()) || (sensorThicknessUmIsSet() && rhs.sensorThicknessUmIsSet() && getSensorThicknessUm() == rhs.getSensorThicknessUm())) && + ((!readoutTimeUsIsSet() && !rhs.readoutTimeUsIsSet()) || (readoutTimeUsIsSet() && rhs.readoutTimeUsIsSet() && getReadoutTimeUs() == rhs.getReadoutTimeUs())) && + + ((!calibrationFileIsSet() && !rhs.calibrationFileIsSet()) || (calibrationFileIsSet() && rhs.calibrationFileIsSet() && getCalibrationFile() == rhs.getCalibrationFile())) && @@ -306,6 +325,8 @@ void to_json(nlohmann::json& j, const Detector& o) j["module_sync"] = o.m_Module_sync; if(o.sensorThicknessUmIsSet()) j["sensor_thickness_um"] = o.m_Sensor_thickness_um; + if(o.readoutTimeUsIsSet()) + j["readout_time_us"] = o.m_Readout_time_us; if(o.calibrationFileIsSet() || !o.m_Calibration_file.empty()) j["calibration_file"] = o.m_Calibration_file; if(o.hostnameIsSet() || !o.m_Hostname.empty()) @@ -354,6 +375,11 @@ void from_json(const nlohmann::json& j, Detector& o) j.at("sensor_thickness_um").get_to(o.m_Sensor_thickness_um); o.m_Sensor_thickness_umIsSet = true; } + if(j.find("readout_time_us") != j.end()) + { + j.at("readout_time_us").get_to(o.m_Readout_time_us); + o.m_Readout_time_usIsSet = true; + } if(j.find("calibration_file") != j.end()) { j.at("calibration_file").get_to(o.m_Calibration_file); @@ -498,6 +524,23 @@ void Detector::unsetSensor_thickness_um() { m_Sensor_thickness_umIsSet = false; } +int64_t Detector::getReadoutTimeUs() const +{ + return m_Readout_time_us; +} +void Detector::setReadoutTimeUs(int64_t const value) +{ + m_Readout_time_us = value; + m_Readout_time_usIsSet = true; +} +bool Detector::readoutTimeUsIsSet() const +{ + return m_Readout_time_usIsSet; +} +void Detector::unsetReadout_time_us() +{ + m_Readout_time_usIsSet = false; +} std::vector Detector::getCalibrationFile() const { return m_Calibration_file; diff --git a/broker/gen/model/Detector.h b/broker/gen/model/Detector.h index ba566a71..c585f07f 100644 --- a/broker/gen/model/Detector.h +++ b/broker/gen/model/Detector.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -108,7 +108,14 @@ public: bool sensorThicknessUmIsSet() const; void unsetSensor_thickness_um(); /// - /// Gain file (JUNGFRAU) or trimbit file (EIGER). One entry per module. Either empty or number of module entries. + /// Minimum difference between frame time and count time in microseconds Defaults are 3 us for EIGER and 20 us for JUNGFRAU + /// + int64_t getReadoutTimeUs() const; + void setReadoutTimeUs(int64_t const value); + bool readoutTimeUsIsSet() const; + void unsetReadout_time_us(); + /// + /// Can be empty for all detectors - default calibration used. For JUNGFRAU: list of gain files, one entry per module. For EIGER: one directory (with detector settings) or list of trim bit files, one entry per half-module. /// std::vector getCalibrationFile() const; void setCalibrationFile(std::vector const& value); @@ -181,6 +188,8 @@ protected: bool m_Module_syncIsSet; float m_Sensor_thickness_um; bool m_Sensor_thickness_umIsSet; + int64_t m_Readout_time_us; + bool m_Readout_time_usIsSet; std::vector m_Calibration_file; bool m_Calibration_fileIsSet; std::vector m_Hostname; diff --git a/broker/gen/model/Detector_list.cpp b/broker/gen/model/Detector_list.cpp index 151ec92b..009a95bf 100644 --- a/broker/gen/model/Detector_list.cpp +++ b/broker/gen/model/Detector_list.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -47,14 +47,14 @@ bool Detector_list::validate(std::stringstream& msg, const std::string& pathPref /* Detectors */ { - const std::vector& value = m_Detectors; + const std::vector& value = m_Detectors; const std::string currentValuePath = _pathPrefix + ".detectors"; { // Recursive validation of array elements const std::string oldValuePath = currentValuePath; int i = 0; - for (const org::openapitools::server::model::Detector_list_detectors_inner& value : value) + for (const org::openapitools::server::model::Detector_list_element& value : value) { const std::string currentValuePath = oldValuePath + "[" + std::to_string(i) + "]"; @@ -103,11 +103,11 @@ void from_json(const nlohmann::json& j, Detector_list& o) } -std::vector Detector_list::getDetectors() const +std::vector Detector_list::getDetectors() const { return m_Detectors; } -void Detector_list::setDetectors(std::vector const& value) +void Detector_list::setDetectors(std::vector const& value) { m_Detectors = value; } diff --git a/broker/gen/model/Detector_list.h b/broker/gen/model/Detector_list.h index 99eb8e8a..f0cd83c5 100644 --- a/broker/gen/model/Detector_list.h +++ b/broker/gen/model/Detector_list.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -19,7 +19,7 @@ #define Detector_list_H_ -#include "Detector_list_detectors_inner.h" +#include "Detector_list_element.h" #include #include @@ -62,8 +62,8 @@ public: /// /// /// - std::vector getDetectors() const; - void setDetectors(std::vector const& value); + std::vector getDetectors() const; + void setDetectors(std::vector const& value); /// /// /// @@ -73,7 +73,7 @@ public: friend void to_json(nlohmann::json& j, const Detector_list& o); friend void from_json(const nlohmann::json& j, Detector_list& o); protected: - std::vector m_Detectors; + std::vector m_Detectors; int64_t m_Current_id; diff --git a/broker/gen/model/Detector_list_detectors_inner.cpp b/broker/gen/model/Detector_list_detectors_inner.cpp index 23a30ea6..38eaeb74 100644 --- a/broker/gen/model/Detector_list_detectors_inner.cpp +++ b/broker/gen/model/Detector_list_detectors_inner.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -29,6 +29,9 @@ Detector_list_detectors_inner::Detector_list_detectors_inner() m_Nmodules = 0L; m_Width = 0L; m_Height = 0L; + m_Readout_time_us = 0L; + m_Min_frame_time_us = 0L; + m_Min_count_time_us = 0L; } @@ -65,7 +68,7 @@ bool Detector_list_detectors_inner::validate(std::stringstream& msg, const std:: } } - + return success; } @@ -96,6 +99,15 @@ bool Detector_list_detectors_inner::operator==(const Detector_list_detectors_inn && (getHeight() == rhs.getHeight()) + && + + (getReadoutTimeUs() == rhs.getReadoutTimeUs()) + && + + (getMinFrameTimeUs() == rhs.getMinFrameTimeUs()) + && + + (getMinCountTimeUs() == rhs.getMinCountTimeUs()) ; @@ -117,6 +129,9 @@ void to_json(nlohmann::json& j, const Detector_list_detectors_inner& o) j["nmodules"] = o.m_Nmodules; j["width"] = o.m_Width; j["height"] = o.m_Height; + j["readout_time_us"] = o.m_Readout_time_us; + j["min_frame_time_us"] = o.m_Min_frame_time_us; + j["min_count_time_us"] = o.m_Min_count_time_us; } @@ -130,6 +145,9 @@ void from_json(const nlohmann::json& j, Detector_list_detectors_inner& o) j.at("nmodules").get_to(o.m_Nmodules); j.at("width").get_to(o.m_Width); j.at("height").get_to(o.m_Height); + j.at("readout_time_us").get_to(o.m_Readout_time_us); + j.at("min_frame_time_us").get_to(o.m_Min_frame_time_us); + j.at("min_count_time_us").get_to(o.m_Min_count_time_us); } @@ -197,6 +215,30 @@ void Detector_list_detectors_inner::setHeight(int64_t const value) { m_Height = value; } +int64_t Detector_list_detectors_inner::getReadoutTimeUs() const +{ + return m_Readout_time_us; +} +void Detector_list_detectors_inner::setReadoutTimeUs(int64_t const value) +{ + m_Readout_time_us = value; +} +int64_t Detector_list_detectors_inner::getMinFrameTimeUs() const +{ + return m_Min_frame_time_us; +} +void Detector_list_detectors_inner::setMinFrameTimeUs(int64_t const value) +{ + m_Min_frame_time_us = value; +} +int64_t Detector_list_detectors_inner::getMinCountTimeUs() const +{ + return m_Min_count_time_us; +} +void Detector_list_detectors_inner::setMinCountTimeUs(int64_t const value) +{ + m_Min_count_time_us = value; +} } // namespace org::openapitools::server::model diff --git a/broker/gen/model/Detector_list_detectors_inner.h b/broker/gen/model/Detector_list_detectors_inner.h index 9d905fe6..a7416024 100644 --- a/broker/gen/model/Detector_list_detectors_inner.h +++ b/broker/gen/model/Detector_list_detectors_inner.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -98,6 +98,21 @@ public: /// int64_t getHeight() const; void setHeight(int64_t const value); + /// + /// + /// + int64_t getReadoutTimeUs() const; + void setReadoutTimeUs(int64_t const value); + /// + /// + /// + int64_t getMinFrameTimeUs() const; + void setMinFrameTimeUs(int64_t const value); + /// + /// + /// + int64_t getMinCountTimeUs() const; + void setMinCountTimeUs(int64_t const value); friend void to_json(nlohmann::json& j, const Detector_list_detectors_inner& o); friend void from_json(const nlohmann::json& j, Detector_list_detectors_inner& o); @@ -118,6 +133,12 @@ protected: int64_t m_Height; + int64_t m_Readout_time_us; + + int64_t m_Min_frame_time_us; + + int64_t m_Min_count_time_us; + }; diff --git a/broker/gen/model/Detector_list_element.cpp b/broker/gen/model/Detector_list_element.cpp new file mode 100644 index 00000000..c5f0b320 --- /dev/null +++ b/broker/gen/model/Detector_list_element.cpp @@ -0,0 +1,245 @@ +/** +* 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.29 +* 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_list_element.h" +#include "Helpers.h" + +#include + +namespace org::openapitools::server::model +{ + +Detector_list_element::Detector_list_element() +{ + m_Id = 0L; + m_Description = ""; + m_Serial_number = ""; + m_Base_ipv4_addr = ""; + m_Udp_interface_count = 0L; + m_Nmodules = 0L; + m_Width = 0L; + m_Height = 0L; + m_Readout_time_us = 0L; + m_Min_frame_time_us = 0L; + m_Min_count_time_us = 0L; + +} + +void Detector_list_element::validate() const +{ + std::stringstream msg; + if (!validate(msg)) + { + throw org::openapitools::server::helpers::ValidationException(msg.str()); + } +} + +bool Detector_list_element::validate(std::stringstream& msg) const +{ + return validate(msg, ""); +} + +bool Detector_list_element::validate(std::stringstream& msg, const std::string& pathPrefix) const +{ + bool success = true; + const std::string _pathPrefix = pathPrefix.empty() ? "Detector_list_element" : pathPrefix; + + + + /* Id */ { + const int64_t& value = m_Id; + const std::string currentValuePath = _pathPrefix + ".id"; + + + if (value < 0ll) + { + success = false; + msg << currentValuePath << ": must be greater than or equal to 0;"; + } + + } + + return success; +} + +bool Detector_list_element::operator==(const Detector_list_element& rhs) const +{ + return + + + (getId() == rhs.getId()) + && + + (getDescription() == rhs.getDescription()) + && + + (getSerialNumber() == rhs.getSerialNumber()) + && + + (getBaseIpv4Addr() == rhs.getBaseIpv4Addr()) + && + + (getUdpInterfaceCount() == rhs.getUdpInterfaceCount()) + && + + (getNmodules() == rhs.getNmodules()) + && + + (getWidth() == rhs.getWidth()) + && + + (getHeight() == rhs.getHeight()) + && + + (getReadoutTimeUs() == rhs.getReadoutTimeUs()) + && + + (getMinFrameTimeUs() == rhs.getMinFrameTimeUs()) + && + + (getMinCountTimeUs() == rhs.getMinCountTimeUs()) + + + ; +} + +bool Detector_list_element::operator!=(const Detector_list_element& rhs) const +{ + return !(*this == rhs); +} + +void to_json(nlohmann::json& j, const Detector_list_element& o) +{ + j = nlohmann::json::object(); + j["id"] = o.m_Id; + j["description"] = o.m_Description; + j["serial_number"] = o.m_Serial_number; + j["base_ipv4_addr"] = o.m_Base_ipv4_addr; + j["udp_interface_count"] = o.m_Udp_interface_count; + j["nmodules"] = o.m_Nmodules; + j["width"] = o.m_Width; + j["height"] = o.m_Height; + j["readout_time_us"] = o.m_Readout_time_us; + j["min_frame_time_us"] = o.m_Min_frame_time_us; + j["min_count_time_us"] = o.m_Min_count_time_us; + +} + +void from_json(const nlohmann::json& j, Detector_list_element& o) +{ + j.at("id").get_to(o.m_Id); + j.at("description").get_to(o.m_Description); + j.at("serial_number").get_to(o.m_Serial_number); + j.at("base_ipv4_addr").get_to(o.m_Base_ipv4_addr); + j.at("udp_interface_count").get_to(o.m_Udp_interface_count); + j.at("nmodules").get_to(o.m_Nmodules); + j.at("width").get_to(o.m_Width); + j.at("height").get_to(o.m_Height); + j.at("readout_time_us").get_to(o.m_Readout_time_us); + j.at("min_frame_time_us").get_to(o.m_Min_frame_time_us); + j.at("min_count_time_us").get_to(o.m_Min_count_time_us); + +} + +int64_t Detector_list_element::getId() const +{ + return m_Id; +} +void Detector_list_element::setId(int64_t const value) +{ + m_Id = value; +} +std::string Detector_list_element::getDescription() const +{ + return m_Description; +} +void Detector_list_element::setDescription(std::string const& value) +{ + m_Description = value; +} +std::string Detector_list_element::getSerialNumber() const +{ + return m_Serial_number; +} +void Detector_list_element::setSerialNumber(std::string const& value) +{ + m_Serial_number = value; +} +std::string Detector_list_element::getBaseIpv4Addr() const +{ + return m_Base_ipv4_addr; +} +void Detector_list_element::setBaseIpv4Addr(std::string const& value) +{ + m_Base_ipv4_addr = value; +} +int64_t Detector_list_element::getUdpInterfaceCount() const +{ + return m_Udp_interface_count; +} +void Detector_list_element::setUdpInterfaceCount(int64_t const value) +{ + m_Udp_interface_count = value; +} +int64_t Detector_list_element::getNmodules() const +{ + return m_Nmodules; +} +void Detector_list_element::setNmodules(int64_t const value) +{ + m_Nmodules = value; +} +int64_t Detector_list_element::getWidth() const +{ + return m_Width; +} +void Detector_list_element::setWidth(int64_t const value) +{ + m_Width = value; +} +int64_t Detector_list_element::getHeight() const +{ + return m_Height; +} +void Detector_list_element::setHeight(int64_t const value) +{ + m_Height = value; +} +int64_t Detector_list_element::getReadoutTimeUs() const +{ + return m_Readout_time_us; +} +void Detector_list_element::setReadoutTimeUs(int64_t const value) +{ + m_Readout_time_us = value; +} +int64_t Detector_list_element::getMinFrameTimeUs() const +{ + return m_Min_frame_time_us; +} +void Detector_list_element::setMinFrameTimeUs(int64_t const value) +{ + m_Min_frame_time_us = value; +} +int64_t Detector_list_element::getMinCountTimeUs() const +{ + return m_Min_count_time_us; +} +void Detector_list_element::setMinCountTimeUs(int64_t const value) +{ + m_Min_count_time_us = value; +} + + +} // namespace org::openapitools::server::model + diff --git a/broker/gen/model/Detector_list_element.h b/broker/gen/model/Detector_list_element.h new file mode 100644 index 00000000..67c3d324 --- /dev/null +++ b/broker/gen/model/Detector_list_element.h @@ -0,0 +1,147 @@ +/** +* 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.29 +* 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_list_element.h + * + * + */ + +#ifndef Detector_list_element_H_ +#define Detector_list_element_H_ + + +#include +#include + +namespace org::openapitools::server::model +{ + +/// +/// +/// +class Detector_list_element +{ +public: + Detector_list_element(); + virtual ~Detector_list_element() = default; + + + /// + /// 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_list_element& rhs) const; + bool operator!=(const Detector_list_element& rhs) const; + + ///////////////////////////////////////////// + /// Detector_list_element members + + /// + /// + /// + int64_t getId() const; + void setId(int64_t const value); + /// + /// + /// + std::string getDescription() const; + void setDescription(std::string const& value); + /// + /// + /// + std::string getSerialNumber() const; + void setSerialNumber(std::string const& value); + /// + /// + /// + std::string getBaseIpv4Addr() const; + void setBaseIpv4Addr(std::string const& value); + /// + /// Number of UDP interfaces per detector module + /// + int64_t getUdpInterfaceCount() const; + void setUdpInterfaceCount(int64_t const value); + /// + /// + /// + int64_t getNmodules() const; + void setNmodules(int64_t const value); + /// + /// + /// + int64_t getWidth() const; + void setWidth(int64_t const value); + /// + /// + /// + int64_t getHeight() const; + void setHeight(int64_t const value); + /// + /// + /// + int64_t getReadoutTimeUs() const; + void setReadoutTimeUs(int64_t const value); + /// + /// + /// + int64_t getMinFrameTimeUs() const; + void setMinFrameTimeUs(int64_t const value); + /// + /// + /// + int64_t getMinCountTimeUs() const; + void setMinCountTimeUs(int64_t const value); + + friend void to_json(nlohmann::json& j, const Detector_list_element& o); + friend void from_json(const nlohmann::json& j, Detector_list_element& o); +protected: + int64_t m_Id; + + std::string m_Description; + + std::string m_Serial_number; + + std::string m_Base_ipv4_addr; + + int64_t m_Udp_interface_count; + + int64_t m_Nmodules; + + int64_t m_Width; + + int64_t m_Height; + + int64_t m_Readout_time_us; + + int64_t m_Min_frame_time_us; + + int64_t m_Min_count_time_us; + + +}; + +} // namespace org::openapitools::server::model + +#endif /* Detector_list_element_H_ */ diff --git a/broker/gen/model/Detector_module.cpp b/broker/gen/model/Detector_module.cpp index 0e5ff3cb..cd5982c0 100644 --- a/broker/gen/model/Detector_module.cpp +++ b/broker/gen/model/Detector_module.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 85fe0f35..be03401a 100644 --- a/broker/gen/model/Detector_module.h +++ b/broker/gen/model/Detector_module.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 64e8ea86..349a30b8 100644 --- a/broker/gen/model/Detector_module_direction.cpp +++ b/broker/gen/model/Detector_module_direction.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 0fea9c44..453b65e0 100644 --- a/broker/gen/model/Detector_module_direction.h +++ b/broker/gen/model/Detector_module_direction.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 index 642c31ed..f028d1f3 100644 --- a/broker/gen/model/Detector_power_state.cpp +++ b/broker/gen/model/Detector_power_state.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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.h b/broker/gen/model/Detector_power_state.h index e4e1c752..9b47abcb 100644 --- a/broker/gen/model/Detector_power_state.h +++ b/broker/gen/model/Detector_power_state.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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.cpp b/broker/gen/model/Detector_selection.cpp index de0b8372..86ec0a77 100644 --- a/broker/gen/model/Detector_selection.cpp +++ b/broker/gen/model/Detector_selection.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 3d7f0e26..1d3213d9 100644 --- a/broker/gen/model/Detector_selection.h +++ b/broker/gen/model/Detector_selection.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 adb38f23..74fb2152 100644 --- a/broker/gen/model/Detector_settings.cpp +++ b/broker/gen/model/Detector_settings.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -80,10 +80,10 @@ bool Detector_settings::validate(std::stringstream& msg, const std::string& path const std::string currentValuePath = _pathPrefix + ".frameTimeUs"; - if (value < 450ll) + if (value < 1ll) { success = false; - msg << currentValuePath << ": must be greater than or equal to 450;"; + msg << currentValuePath << ": must be greater than or equal to 1;"; } } diff --git a/broker/gen/model/Detector_settings.h b/broker/gen/model/Detector_settings.h index 5ac8ef0d..882649e7 100644 --- a/broker/gen/model/Detector_settings.h +++ b/broker/gen/model/Detector_settings.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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_state.cpp b/broker/gen/model/Detector_state.cpp index 833fcfdb..4a368a6a 100644 --- a/broker/gen/model/Detector_state.cpp +++ b/broker/gen/model/Detector_state.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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_state.h b/broker/gen/model/Detector_state.h index a2b4044a..d098ad01 100644 --- a/broker/gen/model/Detector_state.h +++ b/broker/gen/model/Detector_state.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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_status.cpp b/broker/gen/model/Detector_status.cpp index 411fa4e0..a9745552 100644 --- a/broker/gen/model/Detector_status.cpp +++ b/broker/gen/model/Detector_status.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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_status.h b/broker/gen/model/Detector_status.h index 10d2bcbb..6a87b193 100644 --- a/broker/gen/model/Detector_status.h +++ b/broker/gen/model/Detector_status.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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_timing.cpp b/broker/gen/model/Detector_timing.cpp index e19d1b48..860aa201 100644 --- a/broker/gen/model/Detector_timing.cpp +++ b/broker/gen/model/Detector_timing.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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_timing.h b/broker/gen/model/Detector_timing.h index 1d781626..91573fd5 100644 --- a/broker/gen/model/Detector_timing.h +++ b/broker/gen/model/Detector_timing.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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.cpp b/broker/gen/model/Detector_type.cpp index 18d7a713..27720190 100644 --- a/broker/gen/model/Detector_type.cpp +++ b/broker/gen/model/Detector_type.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 a875ea5a..82b43168 100644 --- a/broker/gen/model/Detector_type.h +++ b/broker/gen/model/Detector_type.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 26c613d1..8241a1a4 100644 --- a/broker/gen/model/Error_message.cpp +++ b/broker/gen/model/Error_message.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 6d88be78..af620fed 100644 --- a/broker/gen/model/Error_message.h +++ b/broker/gen/model/Error_message.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 0e6bd84c..da55e6fd 100644 --- a/broker/gen/model/Fpga_status_inner.cpp +++ b/broker/gen/model/Fpga_status_inner.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 2e8ffb0e..e7ca0dd6 100644 --- a/broker/gen/model/Fpga_status_inner.h +++ b/broker/gen/model/Fpga_status_inner.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 bc8b1d58..e810a378 100644 --- a/broker/gen/model/Helpers.cpp +++ b/broker/gen/model/Helpers.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 d0a9343b..440a8a3f 100644 --- a/broker/gen/model/Helpers.h +++ b/broker/gen/model/Helpers.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 537fbafc..b8aaebb7 100644 --- a/broker/gen/model/Image_format_settings.cpp +++ b/broker/gen/model/Image_format_settings.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 f64d0fa6..f6b1df16 100644 --- a/broker/gen/model/Image_format_settings.h +++ b/broker/gen/model/Image_format_settings.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 f43a560c..030764b0 100644 --- a/broker/gen/model/Image_pusher_type.cpp +++ b/broker/gen/model/Image_pusher_type.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 48a6128b..68e8506c 100644 --- a/broker/gen/model/Image_pusher_type.h +++ b/broker/gen/model/Image_pusher_type.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 20bf1490..297c755e 100644 --- a/broker/gen/model/Instrument_metadata.cpp +++ b/broker/gen/model/Instrument_metadata.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 645d32f4..b799bf38 100644 --- a/broker/gen/model/Instrument_metadata.h +++ b/broker/gen/model/Instrument_metadata.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 bf9107c0..93dde112 100644 --- a/broker/gen/model/Jfjoch_settings.cpp +++ b/broker/gen/model/Jfjoch_settings.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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.h b/broker/gen/model/Jfjoch_settings.h index f54934da..4d72f37b 100644 --- a/broker/gen/model/Jfjoch_settings.h +++ b/broker/gen/model/Jfjoch_settings.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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_statistics.cpp b/broker/gen/model/Jfjoch_statistics.cpp index ed25be75..2b009319 100644 --- a/broker/gen/model/Jfjoch_statistics.cpp +++ b/broker/gen/model/Jfjoch_statistics.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -34,6 +34,7 @@ Jfjoch_statistics::Jfjoch_statistics() m_Zeromq_previewIsSet = false; m_Zeromq_metadataIsSet = false; m_Pixel_maskIsSet = false; + m_RoiIsSet = false; } @@ -98,7 +99,7 @@ bool Jfjoch_statistics::validate(std::stringstream& msg, const std::string& path } } - + return success; } @@ -144,7 +145,10 @@ bool Jfjoch_statistics::operator==(const Jfjoch_statistics& rhs) const ((!zeromqMetadataIsSet() && !rhs.zeromqMetadataIsSet()) || (zeromqMetadataIsSet() && rhs.zeromqMetadataIsSet() && getZeromqMetadata() == rhs.getZeromqMetadata())) && - ((!pixelMaskIsSet() && !rhs.pixelMaskIsSet()) || (pixelMaskIsSet() && rhs.pixelMaskIsSet() && getPixelMask() == rhs.getPixelMask())) + ((!pixelMaskIsSet() && !rhs.pixelMaskIsSet()) || (pixelMaskIsSet() && rhs.pixelMaskIsSet() && getPixelMask() == rhs.getPixelMask())) && + + + ((!roiIsSet() && !rhs.roiIsSet()) || (roiIsSet() && rhs.roiIsSet() && getRoi() == rhs.getRoi())) ; } @@ -183,6 +187,8 @@ void to_json(nlohmann::json& j, const Jfjoch_statistics& o) j["zeromq_metadata"] = o.m_Zeromq_metadata; if(o.pixelMaskIsSet()) j["pixel_mask"] = o.m_Pixel_mask; + if(o.roiIsSet()) + j["roi"] = o.m_Roi; } @@ -253,6 +259,11 @@ void from_json(const nlohmann::json& j, Jfjoch_statistics& o) j.at("pixel_mask").get_to(o.m_Pixel_mask); o.m_Pixel_maskIsSet = true; } + if(j.find("roi") != j.end()) + { + j.at("roi").get_to(o.m_Roi); + o.m_RoiIsSet = true; + } } @@ -477,6 +488,23 @@ void Jfjoch_statistics::unsetPixel_mask() { m_Pixel_maskIsSet = false; } +org::openapitools::server::model::Roi_definitions Jfjoch_statistics::getRoi() const +{ + return m_Roi; +} +void Jfjoch_statistics::setRoi(org::openapitools::server::model::Roi_definitions const& value) +{ + m_Roi = value; + m_RoiIsSet = true; +} +bool Jfjoch_statistics::roiIsSet() const +{ + return m_RoiIsSet; +} +void Jfjoch_statistics::unsetRoi() +{ + m_RoiIsSet = false; +} } // namespace org::openapitools::server::model diff --git a/broker/gen/model/Jfjoch_statistics.h b/broker/gen/model/Jfjoch_statistics.h index dd3b9889..c1347d8e 100644 --- a/broker/gen/model/Jfjoch_statistics.h +++ b/broker/gen/model/Jfjoch_statistics.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -31,6 +31,7 @@ #include "Detector_settings.h" #include #include "Detector_status.h" +#include "Roi_definitions.h" #include "Fpga_status_inner.h" #include "Instrument_metadata.h" #include @@ -162,6 +163,13 @@ public: void setPixelMask(org::openapitools::server::model::Pixel_mask_statistics const& value); bool pixelMaskIsSet() const; void unsetPixel_mask(); + /// + /// + /// + org::openapitools::server::model::Roi_definitions getRoi() const; + void setRoi(org::openapitools::server::model::Roi_definitions const& value); + bool roiIsSet() const; + void unsetRoi(); friend void to_json(nlohmann::json& j, const Jfjoch_statistics& o); friend void from_json(const nlohmann::json& j, Jfjoch_statistics& o); @@ -192,6 +200,8 @@ protected: bool m_Zeromq_metadataIsSet; org::openapitools::server::model::Pixel_mask_statistics m_Pixel_mask; bool m_Pixel_maskIsSet; + org::openapitools::server::model::Roi_definitions m_Roi; + bool m_RoiIsSet; }; diff --git a/broker/gen/model/Measurement_statistics.cpp b/broker/gen/model/Measurement_statistics.cpp index 754e2589..6243632d 100644 --- a/broker/gen/model/Measurement_statistics.cpp +++ b/broker/gen/model/Measurement_statistics.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 5c1c13ef..fc54f2c9 100644 --- a/broker/gen/model/Measurement_statistics.h +++ b/broker/gen/model/Measurement_statistics.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 b4ed5462..188aba90 100644 --- a/broker/gen/model/Pcie_devices_inner.cpp +++ b/broker/gen/model/Pcie_devices_inner.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 177f5e97..218980ac 100644 --- a/broker/gen/model/Pcie_devices_inner.h +++ b/broker/gen/model/Pcie_devices_inner.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Pixel_mask_statistics.cpp b/broker/gen/model/Pixel_mask_statistics.cpp index b20f5b5c..9317d6c2 100644 --- a/broker/gen/model/Pixel_mask_statistics.cpp +++ b/broker/gen/model/Pixel_mask_statistics.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Pixel_mask_statistics.h b/broker/gen/model/Pixel_mask_statistics.h index 3eba1e18..3d6c83e3 100644 --- a/broker/gen/model/Pixel_mask_statistics.h +++ b/broker/gen/model/Pixel_mask_statistics.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 bddcd297..130a150f 100644 --- a/broker/gen/model/Plot.cpp +++ b/broker/gen/model/Plot.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 ef1785ce..424a7014 100644 --- a/broker/gen/model/Plot.h +++ b/broker/gen/model/Plot.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 8500c108..50a78cdc 100644 --- a/broker/gen/model/Plots.cpp +++ b/broker/gen/model/Plots.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 ce3d367c..91d07c95 100644 --- a/broker/gen/model/Plots.h +++ b/broker/gen/model/Plots.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 1b335410..05a8c759 100644 --- a/broker/gen/model/Preview_settings.cpp +++ b/broker/gen/model/Preview_settings.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 167097b8..ccf3910b 100644 --- a/broker/gen/model/Preview_settings.h +++ b/broker/gen/model/Preview_settings.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 7319d334..7910c037 100644 --- a/broker/gen/model/Roi_box.cpp +++ b/broker/gen/model/Roi_box.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 e24daa43..a0b8951f 100644 --- a/broker/gen/model/Roi_box.h +++ b/broker/gen/model/Roi_box.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 c75d8609..a8c28ead 100644 --- a/broker/gen/model/Roi_box_list.cpp +++ b/broker/gen/model/Roi_box_list.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 92bbf7e3..ae49e7e9 100644 --- a/broker/gen/model/Roi_box_list.h +++ b/broker/gen/model/Roi_box_list.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 0889e045..ebc5ac5f 100644 --- a/broker/gen/model/Roi_circle.cpp +++ b/broker/gen/model/Roi_circle.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 6a535945..0a73504a 100644 --- a/broker/gen/model/Roi_circle.h +++ b/broker/gen/model/Roi_circle.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 d907c050..943e840a 100644 --- a/broker/gen/model/Roi_circle_list.cpp +++ b/broker/gen/model/Roi_circle_list.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 18b293cb..f6790fbf 100644 --- a/broker/gen/model/Roi_circle_list.h +++ b/broker/gen/model/Roi_circle_list.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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_definitions.cpp b/broker/gen/model/Roi_definitions.cpp new file mode 100644 index 00000000..2c6c59fe --- /dev/null +++ b/broker/gen/model/Roi_definitions.cpp @@ -0,0 +1,111 @@ +/** +* 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.29 +* 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 "Roi_definitions.h" +#include "Helpers.h" + +#include + +namespace org::openapitools::server::model +{ + +Roi_definitions::Roi_definitions() +{ + +} + +void Roi_definitions::validate() const +{ + std::stringstream msg; + if (!validate(msg)) + { + throw org::openapitools::server::helpers::ValidationException(msg.str()); + } +} + +bool Roi_definitions::validate(std::stringstream& msg) const +{ + return validate(msg, ""); +} + +bool Roi_definitions::validate(std::stringstream& msg, const std::string& pathPrefix) const +{ + bool success = true; + const std::string _pathPrefix = pathPrefix.empty() ? "Roi_definitions" : pathPrefix; + + + if (!m_Box.validate(msg, _pathPrefix + ".box")) { + msg << _pathPrefix << ": Box is invalid;"; + success = false; + } + if (!m_Circle.validate(msg, _pathPrefix + ".circle")) { + msg << _pathPrefix << ": Circle is invalid;"; + success = false; + } + return success; +} + +bool Roi_definitions::operator==(const Roi_definitions& rhs) const +{ + return + + + (getBox() == rhs.getBox()) + && + + (getCircle() == rhs.getCircle()) + + + ; +} + +bool Roi_definitions::operator!=(const Roi_definitions& rhs) const +{ + return !(*this == rhs); +} + +void to_json(nlohmann::json& j, const Roi_definitions& o) +{ + j = nlohmann::json::object(); + j["box"] = o.m_Box; + j["circle"] = o.m_Circle; + +} + +void from_json(const nlohmann::json& j, Roi_definitions& o) +{ + j.at("box").get_to(o.m_Box); + j.at("circle").get_to(o.m_Circle); + +} + +org::openapitools::server::model::Roi_box_list Roi_definitions::getBox() const +{ + return m_Box; +} +void Roi_definitions::setBox(org::openapitools::server::model::Roi_box_list const& value) +{ + m_Box = value; +} +org::openapitools::server::model::Roi_circle_list Roi_definitions::getCircle() const +{ + return m_Circle; +} +void Roi_definitions::setCircle(org::openapitools::server::model::Roi_circle_list const& value) +{ + m_Circle = value; +} + + +} // namespace org::openapitools::server::model + diff --git a/broker/gen/model/Roi_definitions.h b/broker/gen/model/Roi_definitions.h new file mode 100644 index 00000000..2e5be373 --- /dev/null +++ b/broker/gen/model/Roi_definitions.h @@ -0,0 +1,85 @@ +/** +* 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.29 +* 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. +*/ +/* + * Roi_definitions.h + * + * ROI defintions + */ + +#ifndef Roi_definitions_H_ +#define Roi_definitions_H_ + + +#include "Roi_circle_list.h" +#include "Roi_box_list.h" +#include + +namespace org::openapitools::server::model +{ + +/// +/// ROI defintions +/// +class Roi_definitions +{ +public: + Roi_definitions(); + virtual ~Roi_definitions() = default; + + + /// + /// 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 Roi_definitions& rhs) const; + bool operator!=(const Roi_definitions& rhs) const; + + ///////////////////////////////////////////// + /// Roi_definitions members + + /// + /// + /// + org::openapitools::server::model::Roi_box_list getBox() const; + void setBox(org::openapitools::server::model::Roi_box_list const& value); + /// + /// + /// + org::openapitools::server::model::Roi_circle_list getCircle() const; + void setCircle(org::openapitools::server::model::Roi_circle_list const& value); + + friend void to_json(nlohmann::json& j, const Roi_definitions& o); + friend void from_json(const nlohmann::json& j, Roi_definitions& o); +protected: + org::openapitools::server::model::Roi_box_list m_Box; + + org::openapitools::server::model::Roi_circle_list m_Circle; + + +}; + +} // namespace org::openapitools::server::model + +#endif /* Roi_definitions_H_ */ diff --git a/broker/gen/model/Rotation_axis.cpp b/broker/gen/model/Rotation_axis.cpp index e37fce4d..6d2d0c67 100644 --- a/broker/gen/model/Rotation_axis.cpp +++ b/broker/gen/model/Rotation_axis.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 64925774..beeac8f3 100644 --- a/broker/gen/model/Rotation_axis.h +++ b/broker/gen/model/Rotation_axis.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 cbc83b92..57b9f736 100644 --- a/broker/gen/model/Spot_finding_settings.cpp +++ b/broker/gen/model/Spot_finding_settings.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 e568ce0d..c8ce37a7 100644 --- a/broker/gen/model/Spot_finding_settings.h +++ b/broker/gen/model/Spot_finding_settings.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 cb28c7e9..fb356528 100644 --- a/broker/gen/model/Standard_detector_geometry.cpp +++ b/broker/gen/model/Standard_detector_geometry.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 f630e743..062914e4 100644 --- a/broker/gen/model/Standard_detector_geometry.h +++ b/broker/gen/model/Standard_detector_geometry.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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_metadata_settings.cpp b/broker/gen/model/Zeromq_metadata_settings.cpp index 447e4f68..3e3dd073 100644 --- a/broker/gen/model/Zeromq_metadata_settings.cpp +++ b/broker/gen/model/Zeromq_metadata_settings.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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_metadata_settings.h b/broker/gen/model/Zeromq_metadata_settings.h index e3736c0c..670cabdc 100644 --- a/broker/gen/model/Zeromq_metadata_settings.h +++ b/broker/gen/model/Zeromq_metadata_settings.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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_preview_settings.cpp b/broker/gen/model/Zeromq_preview_settings.cpp index 8ca9346e..9ac6dad8 100644 --- a/broker/gen/model/Zeromq_preview_settings.cpp +++ b/broker/gen/model/Zeromq_preview_settings.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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_preview_settings.h b/broker/gen/model/Zeromq_preview_settings.h index 0cbf011e..ecd419f4 100644 --- a/broker/gen/model/Zeromq_preview_settings.h +++ b/broker/gen/model/Zeromq_preview_settings.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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 3bf18a7f..ddea4b8e 100644 --- a/broker/gen/model/Zeromq_settings.cpp +++ b/broker/gen/model/Zeromq_settings.cpp @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * 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.h b/broker/gen/model/Zeromq_settings.h index c0f3fb49..84a12795 100644 --- a/broker/gen/model/Zeromq_settings.h +++ b/broker/gen/model/Zeromq_settings.h @@ -2,7 +2,7 @@ * 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.28 +* The version of the OpenAPI document: 1.0.0-rc.29 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/jfjoch_api.yaml b/broker/jfjoch_api.yaml index 6b124d80..5b96730a 100644 --- a/broker/jfjoch_api.yaml +++ b/broker/jfjoch_api.yaml @@ -5,7 +5,7 @@ info: 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.28 + version: 1.0.0-rc.29 contact: name: Filip Leonarski (Paul Scherrer Institute) email: filip.leonarski@psi.ch @@ -438,7 +438,7 @@ components: This is internal frame time for the JUNGFRAU detector, image time has to be integer multiply of this number. For EIGER detector this is default frame time, not used otherwise format: int64 - minimum: 450 + minimum: 1 count_time_us: type: integer description: | @@ -610,6 +610,60 @@ components: q_spacing: type: number format: float + detector_list_element: + type: object + required: + - id + - nmodules + - description + - width + - height + - serial_number + - base_ipv4_addr + - udp_interface_count + - readout_time_us + - min_frame_time_us + - min_count_time_us + properties: + id: + type: integer + format: int64 + minimum: 0 + description: + type: string + example: "JUNGFRAU 4 Mpixel" + serial_number: + type: string + example: "JF17T16V01" + base_ipv4_addr: + type: string + example: "10.10.10.1" + udp_interface_count: + type: integer + format: int64 + example: 2 + description: Number of UDP interfaces per detector module + nmodules: + type: integer + format: int64 + example: 18 + width: + type: integer + format: int64 + example: 2068 + height: + type: integer + format: int64 + example: 2164 + readout_time_us: + type: integer + format: int64 + min_frame_time_us: + type: integer + format: int64 + min_count_time_us: + type: integer + format: int64 detector_list: type: object required: @@ -619,47 +673,7 @@ components: detectors: type: array items: - type: object - required: - - id - - nmodules - - description - - width - - height - - serial_number - - base_ipv4_addr - - udp_interface_count - properties: - id: - type: integer - format: int64 - minimum: 0 - description: - type: string - example: "JUNGFRAU 4 Mpixel" - serial_number: - type: string - example: "JF17T16V01" - base_ipv4_addr: - type: string - example: "10.10.10.1" - udp_interface_count: - type: integer - format: int64 - example: 2 - description: Number of UDP interfaces per detector module - nmodules: - type: integer - format: int64 - example: 18 - width: - type: integer - format: int64 - example: 2068 - height: - type: integer - format: int64 - example: 2164 + $ref: '#/components/schemas/detector_list_element' current_id: type: integer format: int64 @@ -806,12 +820,17 @@ components: example: 1.0 minimum: 0.0 maximum: 1.0 - error_message: + message: type: string description: | - Last error message in case detector is in the Error state + Message to display besides state of the jfjoch_broker; mostly used for errors and warnings This matters especially for async functions (start/initialize), where API won't return reason for the error during async operation. + message_severity: + type: string + enum: ["success", "info", "warning", "error"] + default: "error" + description: Level of the message to display plot: type: object required: @@ -916,6 +935,8 @@ components: $ref: '#/components/schemas/zeromq_metadata_settings' pixel_mask: $ref: '#/components/schemas/pixel_mask_statistics' + roi: + $ref: '#/components/schemas/roi_definitions' preview_settings: type: object description: "Settings for JPEG rendering of preview images" @@ -1052,6 +1073,17 @@ components: maxItems: 32 items: $ref: "#/components/schemas/roi_box" + roi_definitions: + type: object + required: + - box + - circle + description: "ROI defintions" + properties: + box: + $ref: '#/components/schemas/roi_box_list' + circle: + $ref: '#/components/schemas/roi_circle_list' instrument_metadata: type: object description: "Metadata for a measurement instrument" @@ -1183,11 +1215,19 @@ components: format: float minimum: 0 default: 320 + readout_time_us: + type: integer + format: int64 + minimum: 1 + description: | + Minimum difference between frame time and count time in microseconds + Defaults are 3 us for EIGER and 20 us for JUNGFRAU calibration_file: type: array description: | - Gain file (JUNGFRAU) or trimbit file (EIGER). - One entry per module. Either empty or number of module entries. + Can be empty for all detectors - default calibration used. + For JUNGFRAU: list of gain files, one entry per module. + For EIGER: one directory (with detector settings) or list of trim bit files, one entry per half-module. items: type: string hostname: @@ -1969,56 +2009,23 @@ paths: schema: type: string description: Exception error - /roi/box: + /config/roi: get: - summary: Get box ROIs + summary: Get ROI definitions responses: "200": description: "OK" content: application/json: schema: - $ref: '#/components/schemas/roi_box_list' + $ref: '#/components/schemas/roi_definitions' put: - summary: Upload box ROIs + summary: Upload ROI definitions requestBody: content: application/json: schema: - $ref: "#/components/schemas/roi_box_list" - responses: - "200": - description: Everything OK - "400": - description: Input parsing or validation error - content: - text/plain: - schema: - type: string - description: Exception error - "500": - description: Error within Jungfraujoch code - see output message. - content: - application/json: - schema: - $ref: '#/components/schemas/error_message' - /roi/circle: - get: - summary: Get circular ROI - responses: - "200": - description: "OK" - content: - application/json: - schema: - $ref: '#/components/schemas/roi_circle_list' - put: - summary: Upload circular ROI - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/roi_circle_list" + $ref: "#/components/schemas/roi_definitions" responses: "200": description: Everything OK diff --git a/broker/redoc-static.html b/broker/redoc-static.html index 23861859..72d1cd8e 100644 --- a/broker/redoc-static.html +++ b/broker/redoc-static.html @@ -349,7 +349,7 @@ data-styled.g137[id="sc-kqGpvY"]{content:"bAFwPb,"}/*!sc*/ -

Jungfraujoch (1.0.0-rc.28)

Download OpenAPI specification:Download

Filip Leonarski (Paul Scherrer Institute): filip.leonarski@psi.ch License: GPL-3.0

Jungfraujoch (1.0.0-rc.29)

Download OpenAPI specification:Download

Filip Leonarski (Paul Scherrer Institute): filip.leonarski@psi.ch License: GPL-3.0

API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). @@ -399,7 +399,7 @@ If storage cells are used, the execution time might be few minutes. " class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

Error within Jungfraujoch code - see output message.

Response samples

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

Collect dark current for the detector

http://localhost:5232/initialize

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.

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

Error within Jungfraujoch code - see output message.

Response samples

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

Start detector

http://localhost:5232/pedestal

Response samples

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

Start detector

Error within Jungfraujoch code - see output message.

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

http://localhost:5232/start

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

Timeout reached, need to restart operation

Response samples

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

Send soft trigger to the detector

http://localhost:5232/wait_till_done

Response samples

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

Send soft trigger to the detector

Generate soft trigger

Responses

Response samples

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

Change detector configuration

http://localhost:5232/deactivate

Response samples

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

Change detector configuration

Request Body schema: application/json
frame_time_us
required
integer <int64> >= 450
Request Body schema: application/json
frame_time_us
required
integer <int64> >= 1

Interval between consecutive frames. @@ -647,13 +647,13 @@ If value is not provided bit depth is adjusted automatically based on the image " class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

Error within Jungfraujoch code - see output message.

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,
  • "eiger_bit_depth": 8,
  • "jungfrau_pedestal_g0_frames": 2000,
  • "jungfrau_pedestal_g1_frames": 300,
  • "jungfrau_pedestal_g2_frames": 300,
  • "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

http://localhost:5232/config/detector

Request samples

Content type
application/json
{
  • "frame_time_us": 1,
  • "count_time_us": 0,
  • "internal_frame_generator": false,
  • "internal_frame_generator_images": 1,
  • "detector_trigger_delay_ns": 0,
  • "timing": "auto",
  • "eiger_threshold_keV": 1,
  • "eiger_bit_depth": 8,
  • "jungfrau_pedestal_g0_frames": 2000,
  • "jungfrau_pedestal_g1_frames": 300,
  • "jungfrau_pedestal_g2_frames": 300,
  • "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,
  • "internal_frame_generator": false,
  • "internal_frame_generator_images": 1,
  • "detector_trigger_delay_ns": 0,
  • "timing": "auto",
  • "eiger_threshold_keV": 1,
  • "eiger_bit_depth": 8,
  • "jungfrau_pedestal_g0_frames": 2000,
  • "jungfrau_pedestal_g1_frames": 300,
  • "jungfrau_pedestal_g2_frames": 300,
  • "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

http://localhost:5232/config/detector

Response samples

Content type
application/json
{
  • "frame_time_us": 1,
  • "count_time_us": 0,
  • "internal_frame_generator": false,
  • "internal_frame_generator_images": 1,
  • "detector_trigger_delay_ns": 0,
  • "timing": "auto",
  • "eiger_threshold_keV": 1,
  • "eiger_bit_depth": 8,
  • "jungfrau_pedestal_g0_frames": 2000,
  • "jungfrau_pedestal_g1_frames": 300,
  • "jungfrau_pedestal_g2_frames": 300,
  • "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: ""

Error within Jungfraujoch code - see output message.

Request samples

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

Response samples

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

Get instrument metadata

http://localhost:5232/config/instrument

Request samples

Content type
application/json
{
  • "source_name": "Swiss Light Source",
  • "source_type": "Synchrotron X-ray Source",
  • "instrument_name": "CristallinaMX",
  • "pulsed_source": false,
  • "electron_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,
  • "electron_source": false
}

Change image output format

http://localhost:5232/config/instrument

Response samples

Content type
application/json
{
  • "source_name": "Swiss Light Source",
  • "source_type": "Synchrotron X-ray Source",
  • "instrument_name": "CristallinaMX",
  • "pulsed_source": false,
  • "electron_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

Error within Jungfraujoch code - see output message.

Request samples

Content type
application/json
{
  • "summation": true,
  • "geometry_transform": true,
  • "jungfrau_conversion": true,
  • "jungfrau_conversion_factor_keV": 0.001,
  • "bit_depth_image": 8,
  • "signed_output": true,
  • "mask_module_edges": true,
  • "mask_chip_edges": true,
  • "jungfrau_mask_pixels_without_g0": true,
  • "apply_mask": false,
  • "jungfrau_pedestal_g0_rms_limit": 100
}

Response samples

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

Get image output format

http://localhost:5232/config/image_format

Request samples

Content type
application/json
{
  • "summation": true,
  • "geometry_transform": true,
  • "jungfrau_conversion": true,
  • "jungfrau_conversion_factor_keV": 0.001,
  • "bit_depth_image": 8,
  • "signed_output": true,
  • "mask_module_edges": true,
  • "mask_chip_edges": true,
  • "jungfrau_mask_pixels_without_g0": true,
  • "apply_mask": false,
  • "jungfrau_pedestal_g0_rms_limit": 100
}

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": 8,
  • "signed_output": true,
  • "mask_module_edges": true,
  • "mask_chip_edges": true,
  • "jungfrau_mask_pixels_without_g0": true,
  • "apply_mask": false,
  • "jungfrau_pedestal_g0_rms_limit": 100
}

Configure format for raw data collection

http://localhost:5232/config/image_format

Response samples

Content type
application/json
{
  • "summation": true,
  • "geometry_transform": true,
  • "jungfrau_conversion": true,
  • "jungfrau_conversion_factor_keV": 0.001,
  • "bit_depth_image": 8,
  • "signed_output": true,
  • "mask_module_edges": true,
  • "mask_chip_edges": true,
  • "jungfrau_mask_pixels_without_g0": true,
  • "apply_mask": false,
  • "jungfrau_pedestal_g0_rms_limit": 100
}

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

http://localhost:5232/config/image_format/raw

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

http://localhost:5232/config/image_format/conversion

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

Input parsing or validation error

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

http://localhost:5232/config/spot_finding

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

http://localhost:5232/config/spot_finding

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.

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

Error within Jungfraujoch code - see output message.

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

http://localhost:5232/config/azim_int

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

http://localhost:5232/config/azim_int

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. @@ -859,13 +859,13 @@ Changing detector will set detector to Inactive state and will requ " class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

Error within Jungfraujoch code - see output message.

Request samples

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

Response samples

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

List available detectors

http://localhost:5232/config/select_detector

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
}

Set ZeroMQ preview settings

http://localhost:5232/config/select_detector

Response samples

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

Set ZeroMQ preview settings

Error within Jungfraujoch code - see output message.

Request samples

Content type
application/json
{
  • "enabled": true,
  • "period_ms": 1000,
  • "socket_address": "string"
}

Response samples

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

Get ZeroMQ preview settings

Responses

Request samples

Content type
application/json
{
  • "enabled": true,
  • "period_ms": 1000,
  • "socket_address": "string"
}

Response samples

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

Get ZeroMQ preview settings

Responses

Response samples

Content type
application/json
{
  • "enabled": true,
  • "period_ms": 1000,
  • "socket_address": "string"
}

Set ZeroMQ metadata settings

http://localhost:5232/config/zeromq_preview

Response samples

Content type
application/json
{
  • "enabled": true,
  • "period_ms": 1000,
  • "socket_address": "string"
}

Set ZeroMQ metadata settings

Jungfraujoch can generate metadata message stream on ZeroMQ PUB socket. This stream covers all images. @@ -927,21 +927,21 @@ Address follows ZeroMQ convention for sockets - in practice ipc:// " class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

Error within Jungfraujoch code - see output message.

Request samples

Content type
application/json
{
  • "enabled": true,
  • "period_ms": 1000,
  • "socket_address": "string"
}

Response samples

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

Get ZeroMQ metadata socket settings

Responses

Request samples

Content type
application/json
{
  • "enabled": true,
  • "period_ms": 1000,
  • "socket_address": "string"
}

Response samples

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

Get ZeroMQ metadata socket settings

Responses

Response samples

Content type
application/json
{
  • "enabled": true,
  • "period_ms": 1000,
  • "socket_address": "string"
}

Get Jungfraujoch status

http://localhost:5232/config/zeromq_metadata

Response samples

Content type
application/json
{
  • "enabled": true,
  • "period_ms": 1000,
  • "socket_address": "string"
}

Get Jungfraujoch status

Status of the data acquisition

Responses

Response samples

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

Get status of FPGA devices

Responses

Response samples

Content type
application/json
{
  • "state": "Inactive",
  • "progress": 1,
  • "message": "string",
  • "message_severity": "success"
}

Get status of FPGA devices

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Return XFEL pulse IDs for the current data acquisition

http://localhost:5232/fpga_status

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

http://localhost:5232/xfel/pulse_id

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

http://localhost:5232/xfel/event_code

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 ROI definitions

Responses

Upload box ROIs

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

Responses

Response samples

Content type
application/json
{
  • "box": {
    },
  • "circle": {
    }
}

Upload ROI definitions

Request Body schema: application/json
required
object (roi_box_list)

List of box ROIs

+
required
object (roi_circle_list)

List of circular ROIs

+

Responses

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

Request samples

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

Response samples

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

Generate background estimate plot

http://localhost:5232/config/roi

Request samples

Content type
application/json
{
  • "box": {
    },
  • "circle": {
    }
}

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)

@@ -1003,7 +995,7 @@ Address follows ZeroMQ convention for sockets - in practice ipc:// " class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

Input parsing or validation error

Response samples

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

Generate spot count plot

http://localhost:5232/plot/bkg_estimate

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)

@@ -1015,7 +1007,7 @@ Address follows ZeroMQ convention for sockets - in practice ipc:// " class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

Input parsing or validation error

Response samples

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

Generate indexing rate plot

http://localhost:5232/plot/spot_count

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)

@@ -1027,7 +1019,7 @@ Address follows ZeroMQ convention for sockets - in practice ipc:// " class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

Input parsing or validation error

Response samples

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

Generate indexing unit cell length plots

http://localhost:5232/plot/indexing_rate

Response samples

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

Generate indexing unit cell length plots

Crystal unit cell based on indexing results; binning is configurable

query Parameters
binning
integer

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

@@ -1039,7 +1031,7 @@ Address follows ZeroMQ convention for sockets - in practice ipc:// " class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

Input parsing or validation error

Response samples

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

Generate indexing unit cell angle plot

http://localhost:5232/plot/indexing_unit_cell

Response samples

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

Generate indexing unit cell angle plot

Crystal unit cell based on indexing results; binning is configurable

query Parameters
binning
integer

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

@@ -1051,7 +1043,7 @@ Address follows ZeroMQ convention for sockets - in practice ipc:// " class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

Input parsing or validation error

Response samples

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

Generate error pixels plot

http://localhost:5232/plot/indexing_unit_cell_angle

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)

@@ -1063,7 +1055,7 @@ Address follows ZeroMQ convention for sockets - in practice ipc:// " class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

Input parsing or validation error

Response samples

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

Generate strong pixels plot

http://localhost:5232/plot/error_pixel

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)

@@ -1075,7 +1067,7 @@ Address follows ZeroMQ convention for sockets - in practice ipc:// " class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

Input parsing or validation error

Response samples

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

Generate ROI sum plot

http://localhost:5232/plot/strong_pixel

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)

@@ -1087,7 +1079,7 @@ Address follows ZeroMQ convention for sockets - in practice ipc:// " class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

Input parsing or validation error

Response samples

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

Generate plot of ROI max count

http://localhost:5232/plot/roi_sum

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)

@@ -1099,7 +1091,7 @@ Address follows ZeroMQ convention for sockets - in practice ipc:// " class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

Input parsing or validation error

Response samples

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

Generate plot of ROI valid pixels

http://localhost:5232/plot/roi_max_count

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)

@@ -1111,7 +1103,7 @@ Address follows ZeroMQ convention for sockets - in practice ipc:// " class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

Input parsing or validation error

Response samples

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

Generate receiver delay plot

http://localhost:5232/plot/roi_valid_pixels

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)

@@ -1123,7 +1115,7 @@ Address follows ZeroMQ convention for sockets - in practice ipc:// " class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

Input parsing or validation error

Response samples

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

Generate receiver free send buffer plot

http://localhost:5232/plot/receiver_delay

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)

@@ -1135,7 +1127,7 @@ Address follows ZeroMQ convention for sockets - in practice ipc:// " class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

Input parsing or validation error

Response samples

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

Generate image collection efficiency plot

http://localhost:5232/plot/receiver_free_send_buffers

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)

@@ -1147,7 +1139,7 @@ Address follows ZeroMQ convention for sockets - in practice ipc:// " class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

Input parsing or validation error

Response samples

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

Generate radial integration profile

http://localhost:5232/plot/image_collection_efficiency

Response samples

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

Generate radial integration profile

Generate average radial integration profile

query Parameters
compression
boolean
Default: true

Enable DEFLATE compression of output data.

@@ -1155,13 +1147,13 @@ Address follows ZeroMQ convention for sockets - in practice ipc:// " class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

Everything OK

Response samples

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

Get general statistics

query Parameters
compression
boolean
Default: true
http://localhost:5232/plot/azim_int

Response samples

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

Get general statistics

query Parameters
compression
boolean
Default: true

Enable DEFLATE compression of output data.

Responses

Response samples

Content type
application/json
{
  • "detector": {
    },
  • "detector_list": {
    },
  • "detector_settings": {
    },
  • "image_format_settings": {
    },
  • "instrument_metadata": {
    },
  • "data_processing_settings": {
    },
  • "measurement": {
    },
  • "broker": {
    },
  • "fpga": [
    ],
  • "calibration": [
    ],
  • "zeromq_preview": {
    },
  • "zeromq_metadata": {
    },
  • "pixel_mask": {
    }
}

Get data collection statistics

http://localhost:5232/statistics

Response samples

Content type
application/json
{
  • "detector": {
    },
  • "detector_list": {
    },
  • "detector_settings": {
    },
  • "image_format_settings": {
    },
  • "instrument_metadata": {
    },
  • "data_processing_settings": {
    },
  • "measurement": {
    },
  • "broker": {
    },
  • "fpga": [
    ],
  • "calibration": [
    ],
  • "zeromq_preview": {
    },
  • "zeromq_metadata": {
    },
  • "pixel_mask": {
    },
  • "roi": {
    }
}

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

http://localhost:5232/statistics/data_collection

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 ]
http://localhost:5232/statistics/calibration

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

@@ -1197,7 +1189,7 @@ Address follows ZeroMQ convention for sockets - in practice ipc:// " class="sc-eeDSqt sc-eBMFzZ bSgSrX cWARBq sc-dCFGXG gKOXES">

Error within Jungfraujoch code - see output message.

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

Response samples

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

Get mask of the detector (TIFF)

http://localhost:5232/config/user_mask

Response samples

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

Get mask of the detector (TIFF)

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

@@ -1287,7 +1279,7 @@ 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">

Error within Jungfraujoch code - see output message.

Response samples

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

Get pedestal in TIFF format

query Parameters
gain_level
required
integer
http://localhost:5232/config/user_mask.tiff

Response samples

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

Get pedestal in TIFF format

query Parameters
gain_level
required
integer

Gain level (0, 1, 2)

sc
integer

Storage cell number

@@ -1303,7 +1295,7 @@ User mask is not automatically applied - i.e. pixels with user mask will have a " class="sc-eeDSqt sc-eBMFzZ bSgSrX gayXgA">

Test Jungfraujoch system

http://localhost:5232/version