Compare commits
12 Commits
1.0.0-rc.2
...
1.0.0-rc.3
| Author | SHA1 | Date | |
|---|---|---|---|
| f1e04d7d56 | |||
| d5d7072a9f | |||
| 483c12ca86 | |||
| 7564619574 | |||
| 6ec126d65a | |||
| e5a775b4a3 | |||
| 381e44e944 | |||
| 89a77ceec7 | |||
| 762bb1b9c0 | |||
| ed89fe2619 | |||
| 6f744fd86d | |||
| 71290f374a |
@@ -4,7 +4,23 @@ stages:
|
||||
- synthesis
|
||||
- release
|
||||
|
||||
build:x86:gcc:
|
||||
build:x86:gcc-11:
|
||||
stage: build
|
||||
variables:
|
||||
CC: gcc
|
||||
CXX: g++
|
||||
tags:
|
||||
- gcc
|
||||
- x86
|
||||
needs: []
|
||||
script:
|
||||
- mkdir build
|
||||
- cd build
|
||||
- source /opt/rh/gcc-toolset-11/enable
|
||||
- cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
- make -j48
|
||||
|
||||
build:x86:gcc-12:
|
||||
stage: build
|
||||
variables:
|
||||
CC: gcc
|
||||
@@ -20,6 +36,22 @@ build:x86:gcc:
|
||||
- cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
- make -j48
|
||||
|
||||
build:x86:gcc-13:
|
||||
stage: build
|
||||
variables:
|
||||
CC: gcc
|
||||
CXX: g++
|
||||
tags:
|
||||
- gcc
|
||||
- x86
|
||||
needs: []
|
||||
script:
|
||||
- mkdir build
|
||||
- cd build
|
||||
- source /opt/rh/gcc-toolset-13/enable
|
||||
- cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
- make -j48
|
||||
|
||||
build:x86:gcc_writer:
|
||||
stage: build
|
||||
variables:
|
||||
@@ -36,6 +68,22 @@ build:x86:gcc_writer:
|
||||
- cmake -DCMAKE_BUILD_TYPE=Release -DJFJOCH_WRITER_ONLY=ON ..
|
||||
- make -j48
|
||||
|
||||
build:x86:gcc_nocuda:
|
||||
stage: build
|
||||
variables:
|
||||
CC: gcc
|
||||
CXX: g++
|
||||
tags:
|
||||
- gcc
|
||||
- x86
|
||||
needs: []
|
||||
script:
|
||||
- mkdir build
|
||||
- cd build
|
||||
- source /opt/rh/gcc-toolset-12/enable
|
||||
- cmake -DCMAKE_BUILD_TYPE=Release -DJFJOCH_USE_CUDA=OFF ..
|
||||
- make -j48
|
||||
|
||||
build:x86:driver:
|
||||
stage: build
|
||||
variables:
|
||||
@@ -59,7 +107,7 @@ build:x86:python_client:
|
||||
artifacts:
|
||||
paths:
|
||||
- jfjoch_client-*whl
|
||||
- jfjoch-client-*tar.gz
|
||||
- jfjoch_client-*tar.gz
|
||||
expire_in: 1 week
|
||||
|
||||
build:x86:frontend:
|
||||
@@ -104,7 +152,7 @@ test:x86:gcc:
|
||||
CTEST_OUTPUT_ON_FAILURE: 1
|
||||
CC: gcc
|
||||
CXX: g++
|
||||
needs: ["build:x86:gcc"]
|
||||
needs: ["build:x86:gcc-12"]
|
||||
dependencies: []
|
||||
tags:
|
||||
- gcc
|
||||
@@ -131,7 +179,7 @@ test:x86:crystfel:
|
||||
CTEST_OUTPUT_ON_FAILURE: 1
|
||||
CC: gcc
|
||||
CXX: g++
|
||||
needs: ["build:x86:gcc"]
|
||||
needs: ["build:x86:gcc-12"]
|
||||
dependencies: []
|
||||
tags:
|
||||
- gcc
|
||||
@@ -154,7 +202,7 @@ test:x86:xds_durin:
|
||||
CTEST_OUTPUT_ON_FAILURE: 1
|
||||
CC: gcc
|
||||
CXX: g++
|
||||
needs: ["build:x86:gcc"]
|
||||
needs: ["build:x86:gcc-12"]
|
||||
dependencies: []
|
||||
tags:
|
||||
- gcc
|
||||
@@ -177,7 +225,7 @@ test:x86:xds_neggia:
|
||||
CTEST_OUTPUT_ON_FAILURE: 1
|
||||
CC: gcc
|
||||
CXX: g++
|
||||
needs: ["build:x86:gcc"]
|
||||
needs: ["build:x86:gcc-12"]
|
||||
dependencies: []
|
||||
tags:
|
||||
- gcc
|
||||
@@ -200,7 +248,7 @@ test:x86:xia2.ssx:
|
||||
CTEST_OUTPUT_ON_FAILURE: 1
|
||||
CC: gcc
|
||||
CXX: g++
|
||||
needs: ["build:x86:gcc"]
|
||||
needs: ["build:x86:gcc-12"]
|
||||
dependencies: []
|
||||
tags:
|
||||
- gcc
|
||||
@@ -236,7 +284,7 @@ synthesis:hls:
|
||||
- cd build
|
||||
- /usr/bin/cmake ..
|
||||
- make hls
|
||||
needs: ["build:x86:gcc", "test:x86:gcc"]
|
||||
needs: ["build:x86:gcc-12", "test:x86:gcc"]
|
||||
|
||||
synthesis:100g:
|
||||
stage: synthesis
|
||||
@@ -262,7 +310,7 @@ synthesis:100g:
|
||||
- /usr/bin/cmake ..
|
||||
- make -j4 pcie_100g
|
||||
- mv fpga/jfjoch_fpga_pcie_100g.mcs ..
|
||||
needs: ["build:x86:gcc", "test:x86:gcc"]
|
||||
needs: ["build:x86:gcc-12", "test:x86:gcc"]
|
||||
|
||||
synthesis:8x10g:
|
||||
stage: synthesis
|
||||
@@ -288,7 +336,7 @@ synthesis:8x10g:
|
||||
- /usr/bin/cmake ..
|
||||
- make -j4 pcie_8x10g
|
||||
- mv fpga/jfjoch_fpga_pcie_8x10g.mcs ..
|
||||
needs: [ "build:x86:gcc", "test:x86:gcc" ]
|
||||
needs: [ "build:x86:gcc-12", "test:x86:gcc" ]
|
||||
|
||||
release:
|
||||
stage: release
|
||||
|
||||
@@ -11,6 +11,10 @@ SET(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wno-deprecated-enum-enum-conversion")
|
||||
SET(CMAKE_C_FLAGS_RELEASE "-O3")
|
||||
|
||||
SET(JFJOCH_WRITER_ONLY OFF CACHE BOOL "Compile HDF5 writer only")
|
||||
SET(JFJOCH_INSTALL_DRIVER_SOURCE OFF CACHE BOOL "Install kernel driver source (ignored if building writer only; necessary for RPM building)")
|
||||
SET(JFJOCH_USE_CUDA ON CACHE BOOL "Compile Jungfraujoch with CUDA")
|
||||
|
||||
SET(BUILD_SHARED_LIBS OFF)
|
||||
SET(BUILD_TESTING OFF)
|
||||
|
||||
@@ -46,15 +50,19 @@ SET(CMAKE_CUDA_ARCHITECTURES 70 75 80 86 89) # V100, T4, A100, RTX A4000, L4
|
||||
SET(CMAKE_CUDA_STANDARD 17)
|
||||
SET(CMAKE_CUDA_FLAGS_RELEASE "-O3")
|
||||
|
||||
IF (CMAKE_CUDA_COMPILER)
|
||||
ENABLE_LANGUAGE(CUDA)
|
||||
MESSAGE(STATUS "CUDA VERSION: ${CMAKE_CUDA_COMPILER_VERSION}")
|
||||
ADD_COMPILE_DEFINITIONS(JFJOCH_USE_CUDA)
|
||||
FIND_LIBRARY(CUDART_LIBRARY cudart_static PATHS ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES} REQUIRED)
|
||||
ENDIF()
|
||||
SET(JFJOCH_CUDA_AVAILABLE OFF)
|
||||
|
||||
SET(JFJOCH_WRITER_ONLY OFF CACHE BOOL "Compile HDF5 writer only")
|
||||
SET(JFJOCH_INSTALL_DRIVER_SOURCE OFF CACHE BOOL "Install kernel driver source (ignored if building writer only; necessary for RPM building)")
|
||||
IF (CMAKE_CUDA_COMPILER)
|
||||
IF (JFJOCH_USE_CUDA)
|
||||
ENABLE_LANGUAGE(CUDA)
|
||||
MESSAGE(STATUS "CUDA VERSION: ${CMAKE_CUDA_COMPILER_VERSION}")
|
||||
ADD_COMPILE_DEFINITIONS(JFJOCH_USE_CUDA)
|
||||
FIND_LIBRARY(CUDART_LIBRARY cudart_static PATHS ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES} REQUIRED)
|
||||
SET(JFJOCH_CUDA_AVAILABLE ON)
|
||||
ELSE()
|
||||
MESSAGE(WARNING "CUDA Available, but disabled by user")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
INCLUDE_DIRECTORIES(include)
|
||||
INCLUDE(CheckIncludeFile)
|
||||
@@ -82,7 +90,7 @@ SET(PISTACHE_BUILD_TESTS OFF)
|
||||
FetchContent_Declare(
|
||||
pistache_http
|
||||
GIT_REPOSITORY https://github.com/fleon-psi/pistache
|
||||
GIT_TAG 784955df8bbef471924d1631606f0f2a2f93d570
|
||||
GIT_TAG 280b0f6f28f81745870bccb31f4a3a59958807f6
|
||||
EXCLUDE_FROM_ALL
|
||||
)
|
||||
|
||||
|
||||
@@ -1,16 +1,4 @@
|
||||
# Contributing
|
||||
|
||||
We actively welcome community contributions, please use a pull request feature.
|
||||
|
||||
To accept contributions into our codebase we need to have Contributor License Agreement (CLA) with you or your employer.
|
||||
The CLA is necessary because you own the copyright to your changes, even after your contribution becomes part of our codebase.
|
||||
|
||||
Since Jungfraujoch development is supported by commercialization grant from the Innosuisse agency, which allows PSI to carry the development.
|
||||
In return for the Innosuisse support, we need to allow our commercial partner (DECTRIS) to use the code without restrictions,
|
||||
and we have to ensure community contributions don't violate this requirement.
|
||||
The obligation applies only if your contributions are merged into PSI codebase.
|
||||
|
||||
If you like to make a bigger contribution, like for example new data analysis method beyond what is available currently,
|
||||
please also contact us beforehand to figure out best licensing strategy.
|
||||
|
||||
Please contact [Filip Leonarski](mailto:filip.leonarski@psi.ch) for details.
|
||||
We actively welcome community contributions.
|
||||
Please contact [Filip Leonarski](mailto:filip.leonarski@psi.ch), if you like to contribute to the project.
|
||||
|
||||
@@ -2,4 +2,5 @@
|
||||
|
||||
Application to receive data from the PSI JUNGFRAU and EIGER detectors.
|
||||
|
||||
All documentation is now placed in [docs/](docs/) subdirectory.
|
||||
All documentation is now placed in [docs/](docs/) subdirectory and for the current version hosted on
|
||||
[Jungfraujoch Read The Docs page](https://jungfraujoch.readthedocs.io).
|
||||
@@ -60,18 +60,18 @@ void JFJochBrokerHttp::status_get(Pistache::Http::ResponseWriter &response) {
|
||||
|
||||
void JFJochBrokerHttp::wait_till_done_post(const std::optional<int32_t> &timeout,
|
||||
Pistache::Http::ResponseWriter &response) {
|
||||
JFJochState state;
|
||||
BrokerStatus status;
|
||||
if (!timeout)
|
||||
state = state_machine.WaitTillMeasurementDone(std::chrono::minutes(1));
|
||||
status = state_machine.WaitTillMeasurementDone(std::chrono::minutes(1));
|
||||
else if ((timeout.value() > 3600) || (timeout.value() < 0)) {
|
||||
response.send(Pistache::Http::Code::Bad_Request);
|
||||
return;
|
||||
} else if (timeout.value() == 0)
|
||||
state = state_machine.GetState();
|
||||
status = state_machine.GetStatus();
|
||||
else
|
||||
state = state_machine.WaitTillMeasurementDone(std::chrono::seconds(timeout.value()));
|
||||
status = state_machine.WaitTillMeasurementDone(std::chrono::seconds(timeout.value()));
|
||||
|
||||
switch (state) {
|
||||
switch (status.state) {
|
||||
case JFJochState::Idle:
|
||||
response.send(Pistache::Http::Code::Ok);
|
||||
break;
|
||||
@@ -79,8 +79,7 @@ void JFJochBrokerHttp::wait_till_done_post(const std::optional<int32_t> &timeout
|
||||
response.send(Pistache::Http::Code::Bad_Gateway);
|
||||
break;
|
||||
case JFJochState::Error:
|
||||
response.send(Pistache::Http::Code::Internal_Server_Error);
|
||||
break;
|
||||
throw WrongDAQStateException(status.message.value_or("Unknown error"));
|
||||
case JFJochState::Measuring:
|
||||
case JFJochState::Busy:
|
||||
case JFJochState::Pedestal:
|
||||
@@ -292,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);
|
||||
}
|
||||
|
||||
@@ -549,6 +539,7 @@ void JFJochBrokerHttp::statistics_get(const std::optional<bool> &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())
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -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<std::mutex> &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());
|
||||
state = JFJochState::Error;
|
||||
SetState(JFJochState::Error, e.what(), BrokerStatus::MessageSeverity::Error);
|
||||
throw;
|
||||
}
|
||||
logger.Info("Pedestal sequence done");
|
||||
@@ -91,10 +95,14 @@ void JFJochStateMachine::TakePedestalInternalAll(std::unique_lock<std::mutex> &u
|
||||
|
||||
void JFJochStateMachine::TakePedestalInternalG0(std::unique_lock<std::mutex> &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<std::mutex> &ul
|
||||
local_experiment.StorageCellStart(0);
|
||||
|
||||
if (cancel_sequence) {
|
||||
state = JFJochState::Inactive;
|
||||
return;
|
||||
}
|
||||
if (local_experiment.GetPedestalG0Frames() == 0) {
|
||||
state = JFJochState::Idle;
|
||||
SetState(JFJochState::Inactive,
|
||||
"Pedestal sequence cancelled",
|
||||
BrokerStatus::MessageSeverity::Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
state = 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);
|
||||
|
||||
@@ -123,9 +132,11 @@ void JFJochStateMachine::TakePedestalInternalG0(std::unique_lock<std::mutex> &ul
|
||||
ul.lock();
|
||||
|
||||
if (ImportPedestalG0(pedestal_output.receiver_output))
|
||||
state = JFJochState::Idle;
|
||||
SetState(JFJochState::Idle);
|
||||
else
|
||||
state = JFJochState::Inactive;
|
||||
SetState(JFJochState::Error,
|
||||
"Pedestal not collected properly",
|
||||
BrokerStatus::MessageSeverity::Error);
|
||||
}
|
||||
|
||||
void JFJochStateMachine::TakePedestalInternalG1(std::unique_lock<std::mutex> &ul, int32_t storage_cell) {
|
||||
@@ -139,16 +150,19 @@ void JFJochStateMachine::TakePedestalInternalG1(std::unique_lock<std::mutex> &ul
|
||||
|
||||
|
||||
if (cancel_sequence) {
|
||||
state = JFJochState::Inactive;
|
||||
SetState(JFJochState::Inactive,
|
||||
"Pedestal sequence cancelled",
|
||||
BrokerStatus::MessageSeverity::Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
if (local_experiment.GetPedestalG1Frames() == 0) {
|
||||
state = JFJochState::Idle;
|
||||
if (local_experiment.GetPedestalG1Frames() == 0)
|
||||
return;
|
||||
}
|
||||
|
||||
state = 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<std::mutex> &ul
|
||||
auto pedestal_output = services.Stop();
|
||||
ul.lock();
|
||||
|
||||
if (ImportPedestalG1G2(pedestal_output.receiver_output, 1, storage_cell))
|
||||
state = JFJochState::Idle;
|
||||
else
|
||||
state = 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<std::mutex> &ul, int32_t storage_cell) {
|
||||
@@ -177,16 +190,19 @@ void JFJochStateMachine::TakePedestalInternalG2(std::unique_lock<std::mutex> &ul
|
||||
local_experiment.StorageCellStart(15);
|
||||
|
||||
if (cancel_sequence) {
|
||||
state = JFJochState::Inactive;
|
||||
SetState(JFJochState::Inactive,
|
||||
"Pedestal sequence cancelled",
|
||||
BrokerStatus::MessageSeverity::Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
if (local_experiment.GetPedestalG2Frames() == 0) {
|
||||
state = JFJochState::Idle;
|
||||
if (local_experiment.GetPedestalG2Frames() == 0)
|
||||
return;
|
||||
}
|
||||
|
||||
state = 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,26 +214,26 @@ void JFJochStateMachine::TakePedestalInternalG2(std::unique_lock<std::mutex> &ul
|
||||
auto pedestal_output = services.Stop();
|
||||
ul.lock();
|
||||
|
||||
if (ImportPedestalG1G2(pedestal_output.receiver_output, 2, storage_cell))
|
||||
state = JFJochState::Idle;
|
||||
else
|
||||
state = 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");
|
||||
|
||||
CheckError(); // Clear error, we don't care what was it
|
||||
ResetError(); // Clear error, we don't care what was it
|
||||
|
||||
logger.Info("Initialize");
|
||||
|
||||
state = 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<std::mutex> ul) {
|
||||
void JFJochStateMachine::InitializeThread(std::unique_lock<std::mutex> ul) {
|
||||
try {
|
||||
services.On(experiment);
|
||||
} catch (...) {
|
||||
state = JFJochState::Error;
|
||||
} 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 {
|
||||
state = JFJochState::Busy;
|
||||
SetState(JFJochState::Busy, "Preparing measurement", BrokerStatus::MessageSeverity::Info);
|
||||
services.SetSpotFindingSettings(GetSpotFindingSettings());
|
||||
services.Start(experiment, pixel_mask, *calibration);
|
||||
|
||||
state = JFJochState::Measuring;
|
||||
SetState(JFJochState::Measuring, "Measuring ...", BrokerStatus::MessageSeverity::Info);
|
||||
measurement = std::async(std::launch::async, &JFJochStateMachine::MeasurementThread, this);
|
||||
} catch (...) {
|
||||
state = JFJochState::Error;
|
||||
} catch (const std::exception &e) {
|
||||
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);
|
||||
state = 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 (...) {
|
||||
} catch (const std::exception &e) {
|
||||
std::unique_lock ul(m);
|
||||
state = JFJochState::Error;
|
||||
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) {
|
||||
void JFJochStateMachine::DebugOnly_SetState(JFJochState in_state,
|
||||
const std::optional<std::string> &message,
|
||||
BrokerStatus::MessageSeverity message_severity) {
|
||||
std::unique_lock ul(m);
|
||||
state = in_state;
|
||||
SetState(in_state, message, message_severity);
|
||||
}
|
||||
|
||||
void JFJochStateMachine::Deactivate() {
|
||||
@@ -329,18 +362,19 @@ void JFJochStateMachine::Deactivate() {
|
||||
if (measurement.valid())
|
||||
measurement.get();
|
||||
services.Off();
|
||||
state = JFJochState::Inactive;
|
||||
} catch (...) {
|
||||
state = JFJochState::Error;
|
||||
SetState(JFJochState::Inactive,
|
||||
"Detector safe to turn off",
|
||||
BrokerStatus::MessageSeverity::Info);
|
||||
} catch (const std::exception &e) {
|
||||
SetState(JFJochState::Error,
|
||||
e.what(),
|
||||
BrokerStatus::MessageSeverity::Error);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
JFJochStateMachine::~JFJochStateMachine() {
|
||||
try {
|
||||
if (measurement.valid())
|
||||
measurement.get();
|
||||
} catch (...) {}
|
||||
ResetError();
|
||||
}
|
||||
|
||||
std::optional<MeasurementStatistics> JFJochStateMachine::GetMeasurementStatistics() const {
|
||||
@@ -400,14 +434,14 @@ void JFJochStateMachine::LoadDetectorSettings(const DetectorSettings &settings)
|
||||
ImportDetectorSettings(settings);
|
||||
break;
|
||||
case JFJochState::Idle:
|
||||
state = 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");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -416,12 +450,24 @@ DiffractionExperiment &JFJochStateMachine::NotThreadSafe_Experiment() {
|
||||
}
|
||||
|
||||
BrokerStatus JFJochStateMachine::GetStatus() const {
|
||||
BrokerStatus ret{};
|
||||
ret.broker_state = state;
|
||||
std::unique_lock ul(broker_status_mutex);
|
||||
BrokerStatus ret = broker_status;
|
||||
ret.progress = services.GetReceiverProgress();
|
||||
return ret;
|
||||
}
|
||||
|
||||
void JFJochStateMachine::SetState(JFJochState curr_state,
|
||||
const std::optional<std::string> &message,
|
||||
BrokerStatus::MessageSeverity message_severity) {
|
||||
std::unique_lock ul(broker_status_mutex);
|
||||
state = curr_state;
|
||||
broker_status = BrokerStatus{
|
||||
.state = curr_state,
|
||||
.message = message,
|
||||
.message_severity = message_severity
|
||||
};
|
||||
}
|
||||
|
||||
MultiLinePlot JFJochStateMachine::GetPlots(const PlotRequest &request) const {
|
||||
return services.GetPlots(request);
|
||||
}
|
||||
@@ -438,15 +484,12 @@ SpotFindingSettings JFJochStateMachine::GetSpotFindingSettings() const {
|
||||
return data_processing_settings;
|
||||
}
|
||||
|
||||
JFJochState JFJochStateMachine::GetState() const {
|
||||
return state;
|
||||
}
|
||||
|
||||
void JFJochStateMachine::AddDetectorSetup(const DetectorSetup &setup) {
|
||||
std::unique_lock ul(m);
|
||||
|
||||
if (detector_setup.empty()) {
|
||||
experiment.Detector(setup);
|
||||
UpdateROIDefinition();
|
||||
gain_calibration = setup.GetGainCalibration();
|
||||
current_detector_setup = 0;
|
||||
pixel_mask = PixelMask(experiment);
|
||||
@@ -458,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();
|
||||
@@ -467,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));
|
||||
}
|
||||
|
||||
@@ -485,17 +531,19 @@ 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);
|
||||
state = JFJochState::Inactive;
|
||||
SetState(JFJochState::Inactive, detector_setup[id].GetDescription() + " selected; please initialize");
|
||||
current_detector_setup = id;
|
||||
} catch (JFJochException &e) {
|
||||
} catch (const JFJochException &e) {
|
||||
logger.ErrorException(e);
|
||||
state = JFJochState::Inactive;
|
||||
SetState(JFJochState::Error, e.what(), BrokerStatus::MessageSeverity::Error);
|
||||
throw; // re-throw the exception, so it is populated to caller
|
||||
}
|
||||
}
|
||||
|
||||
@@ -503,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);
|
||||
}
|
||||
@@ -528,33 +576,31 @@ bool JFJochStateMachine::IsRunning() const {
|
||||
}
|
||||
}
|
||||
|
||||
JFJochState JFJochStateMachine::WaitTillMeasurementDone() {
|
||||
BrokerStatus JFJochStateMachine::WaitTillMeasurementDone() {
|
||||
std::unique_lock ul(m);
|
||||
|
||||
c.wait(ul, [&] { return !IsRunning(); });
|
||||
|
||||
return state;
|
||||
return GetStatus();
|
||||
}
|
||||
|
||||
JFJochState JFJochStateMachine::WaitTillMeasurementDone(std::chrono::milliseconds timeout) {
|
||||
BrokerStatus JFJochStateMachine::WaitTillMeasurementDone(std::chrono::milliseconds timeout) {
|
||||
std::unique_lock ul(m);
|
||||
|
||||
c.wait_for(ul, timeout, [&] { return !IsRunning(); });
|
||||
|
||||
return state;
|
||||
return GetStatus();
|
||||
}
|
||||
|
||||
std::optional<std::string> JFJochStateMachine::CheckError() {
|
||||
void JFJochStateMachine::ResetError() noexcept {
|
||||
try {
|
||||
if (measurement.valid())
|
||||
measurement.get();
|
||||
} catch (JFJochException &e) {
|
||||
return e.what();
|
||||
} catch (...) {
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
std::string JFJochStateMachine::GetPreviewJPEG(const PreviewJPEGSettings& settings) const {
|
||||
std::string JFJochStateMachine::GetPreviewJPEG(const PreviewJPEGSettings &settings) const {
|
||||
return services.GetPreviewJPEG(settings);
|
||||
}
|
||||
|
||||
@@ -566,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);
|
||||
@@ -580,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,
|
||||
@@ -600,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);
|
||||
@@ -608,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<ROIBox> &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<ROICircle> &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<ROIBox> JFJochStateMachine::GetBoxROI() const {
|
||||
std::unique_lock ul(m);
|
||||
return experiment.ROI().GetROIBox();
|
||||
}
|
||||
|
||||
std::vector<ROICircle> 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<uint64_t> JFJochStateMachine::GetXFELPulseID() const {
|
||||
@@ -679,7 +719,7 @@ void JFJochStateMachine::SetUserPixelMask(const std::vector<uint32_t> &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);
|
||||
@@ -699,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);
|
||||
}
|
||||
@@ -713,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);
|
||||
@@ -724,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();
|
||||
}
|
||||
@@ -733,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();
|
||||
}
|
||||
|
||||
@@ -19,8 +19,10 @@
|
||||
enum class JFJochState {Inactive, Idle, Measuring, Error, Busy, Pedestal};
|
||||
|
||||
struct BrokerStatus {
|
||||
JFJochState broker_state;
|
||||
JFJochState state = JFJochState::Inactive;
|
||||
std::optional<float> progress;
|
||||
std::optional<std::string> message;
|
||||
enum class MessageSeverity {Error, Info, Warning, Success} message_severity = MessageSeverity::Error;
|
||||
};
|
||||
|
||||
struct DetectorListElement {
|
||||
@@ -31,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 {
|
||||
@@ -77,7 +82,7 @@ class JFJochStateMachine {
|
||||
std::condition_variable c;
|
||||
|
||||
// mutex m is protecting:
|
||||
volatile JFJochState state = JFJochState::Inactive;
|
||||
volatile JFJochState state = JFJochState::Inactive; // state should not be set directly, but through SetState function
|
||||
volatile bool cancel_sequence = false;
|
||||
std::unique_ptr<JFCalibration> calibration;
|
||||
PixelMask pixel_mask;
|
||||
@@ -97,21 +102,31 @@ class JFJochStateMachine {
|
||||
mutable std::mutex pixel_mask_statistics_mutex;
|
||||
PixelMaskStatistics pixel_mask_statistics;
|
||||
|
||||
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<std::string> &message = {},
|
||||
BrokerStatus::MessageSeverity message_severity = BrokerStatus::MessageSeverity::Info);
|
||||
void MeasurementThread();
|
||||
void PedestalThread(std::unique_lock<std::mutex> ul);
|
||||
void InitializeThread(std::unique_lock<std::mutex> ul);
|
||||
bool ImportPedestalG1G2(const JFJochReceiverOutput &receiver_output, size_t gain_level, size_t storage_cell = 0);
|
||||
bool ImportPedestalG0(const JFJochReceiverOutput &receiver_output);
|
||||
bool IsRunning() const; // Is state Busy/Pedestal/Measure
|
||||
std::optional<std::string> CheckError();
|
||||
void ResetError() noexcept;
|
||||
void TakePedestalInternalAll(std::unique_lock<std::mutex> &ul);
|
||||
void TakePedestalInternalG0(std::unique_lock<std::mutex> &ul);
|
||||
void TakePedestalInternalG1(std::unique_lock<std::mutex> &ul, int32_t storage_cell = 0);
|
||||
void TakePedestalInternalG2(std::unique_lock<std::mutex> &ul, int32_t storage_cell = 0);
|
||||
void ImportDetectorSettings(const DetectorSettings& input);
|
||||
void UpdateROIDefinition();
|
||||
public:
|
||||
JFJochStateMachine(JFJochServices &in_services, Logger &logger);
|
||||
~JFJochStateMachine();
|
||||
@@ -120,8 +135,8 @@ public:
|
||||
void Pedestal();
|
||||
void Deactivate();
|
||||
void Start(const DatasetSettings& settings);
|
||||
JFJochState WaitTillMeasurementDone();
|
||||
JFJochState WaitTillMeasurementDone(std::chrono::milliseconds timeout);
|
||||
BrokerStatus WaitTillMeasurementDone();
|
||||
BrokerStatus WaitTillMeasurementDone(std::chrono::milliseconds timeout);
|
||||
void Trigger();
|
||||
|
||||
void Cancel();
|
||||
@@ -149,8 +164,6 @@ public:
|
||||
void SetSpotFindingSettings(const SpotFindingSettings& settings);
|
||||
SpotFindingSettings GetSpotFindingSettings() const;
|
||||
|
||||
JFJochState GetState() const;
|
||||
|
||||
void AddDetectorSetup(const DetectorSetup& setup);
|
||||
DetectorList GetDetectorsList() const;
|
||||
void SelectDetector(int64_t id);
|
||||
@@ -170,13 +183,12 @@ public:
|
||||
DiffractionExperiment& NotThreadSafe_Experiment();
|
||||
|
||||
// Function for debug only - UNSAFE for real operation
|
||||
void DebugOnly_SetState(JFJochState state);
|
||||
void DebugOnly_SetState(JFJochState state,
|
||||
const std::optional<std::string> &message = {},
|
||||
BrokerStatus::MessageSeverity message_severity = BrokerStatus::MessageSeverity::Info);
|
||||
|
||||
void SetBoxROI(const std::vector<ROIBox>& input);
|
||||
void SetCircleROI(const std::vector<ROICircle>& input);
|
||||
|
||||
std::vector<ROIBox> GetBoxROI() const;
|
||||
std::vector<ROICircle> GetCircleROI() const;
|
||||
void SetROIDefinition(const ROIDefinition& input);
|
||||
ROIDefinition GetROIDefintion() const;
|
||||
|
||||
std::vector<uint64_t> GetXFELPulseID() const;
|
||||
std::vector<uint64_t> GetXFELEventCode() const;
|
||||
|
||||
@@ -186,7 +186,7 @@ org::openapitools::server::model::Detector_settings Convert(const DetectorSettin
|
||||
org::openapitools::server::model::Broker_status Convert(const BrokerStatus& input) {
|
||||
org::openapitools::server::model::Broker_status ret;
|
||||
|
||||
switch (input.broker_state) {
|
||||
switch (input.state) {
|
||||
case JFJochState::Inactive:
|
||||
ret.setState("Inactive");
|
||||
break;
|
||||
@@ -206,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());
|
||||
|
||||
@@ -242,6 +260,7 @@ org::openapitools::server::model::Instrument_metadata Convert(const InstrumentMe
|
||||
output.setSourceName(input.GetSourceName());
|
||||
output.setSourceType(input.GetSourceType());
|
||||
output.setPulsedSource(input.IsPulsedSource());
|
||||
output.setElectronSource(input.IsElectronSource());
|
||||
return output;
|
||||
}
|
||||
|
||||
@@ -250,7 +269,8 @@ InstrumentMetadata Convert(const org::openapitools::server::model::Instrument_me
|
||||
output.InstrumentName(input.getInstrumentName())
|
||||
.SourceName(input.getSourceName())
|
||||
.SourceType(input.getSourceType())
|
||||
.PulsedSource(input.isPulsedSource());
|
||||
.PulsedSource(input.isPulsedSource())
|
||||
.ElectronSource(input.isElectronSource());
|
||||
return output;
|
||||
}
|
||||
|
||||
@@ -308,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<org::openapitools::server::model::Detector_list_detectors_inner> dets;
|
||||
std::vector<org::openapitools::server::model::Detector_list_element> 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);
|
||||
@@ -319,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);
|
||||
@@ -361,18 +384,13 @@ org::openapitools::server::model::Azim_int_settings Convert(const AzimuthalInteg
|
||||
return ret;
|
||||
}
|
||||
|
||||
std::vector<ROIBox> Convert(const org::openapitools::server::model::Roi_box_list& input) {
|
||||
std::vector<ROIBox> 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<ROICircle> Convert(const org::openapitools::server::model::Roi_circle_list& input) {
|
||||
std::vector<ROICircle> 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<ROICircle> &input) {
|
||||
@@ -390,7 +408,6 @@ org::openapitools::server::model::Roi_circle_list Convert(const std::vector<ROIC
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
org::openapitools::server::model::Roi_box_list Convert(const std::vector<ROIBox> &input) {
|
||||
org::openapitools::server::model::Roi_box_list ret{};
|
||||
std::vector<org::openapitools::server::model::Roi_box> tmp;
|
||||
@@ -407,6 +424,13 @@ org::openapitools::server::model::Roi_box_list Convert(const std::vector<ROIBox>
|
||||
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();
|
||||
|
||||
@@ -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<ROIBox> Convert(const org::openapitools::server::model::Roi_box_list& input);
|
||||
std::vector<ROICircle> Convert(const org::openapitools::server::model::Roi_circle_list& input);
|
||||
org::openapitools::server::model::Roi_circle_list Convert(const std::vector<ROICircle> &input);
|
||||
org::openapitools::server::model::Roi_box_list Convert(const std::vector<ROIBox> &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);
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* 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<Pistache::Http::Code>(e.code()), e.what());
|
||||
return;
|
||||
} catch (std::exception &e) {
|
||||
this->handleOperationException(e, response);
|
||||
return;
|
||||
}
|
||||
|
||||
} catch (std::exception &e) {
|
||||
response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
|
||||
}
|
||||
|
||||
}
|
||||
void DefaultApi::config_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<Pistache::Http::Code>(e.code()), e.what());
|
||||
return;
|
||||
} catch (std::exception &e) {
|
||||
this->handleOperationException(e, response);
|
||||
return;
|
||||
}
|
||||
|
||||
} catch (std::exception &e) {
|
||||
response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
|
||||
}
|
||||
|
||||
}
|
||||
void DefaultApi::config_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<Pistache::Http::Code>(e.code()), e.what());
|
||||
return;
|
||||
} catch (std::exception &e) {
|
||||
this->handleOperationException(e, response);
|
||||
return;
|
||||
}
|
||||
|
||||
} catch (std::exception &e) {
|
||||
response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
|
||||
}
|
||||
|
||||
}
|
||||
void DefaultApi::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<Pistache::Http::Code>(e.code()), e.what());
|
||||
return;
|
||||
} catch (std::exception &e) {
|
||||
this->handleOperationException(e, response);
|
||||
return;
|
||||
}
|
||||
|
||||
} catch (std::exception &e) {
|
||||
response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
|
||||
}
|
||||
|
||||
}
|
||||
void DefaultApi::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<Pistache::Http::Code>(e.code()), e.what());
|
||||
return;
|
||||
} catch (std::exception &e) {
|
||||
this->handleOperationException(e, response);
|
||||
return;
|
||||
}
|
||||
|
||||
} catch (std::exception &e) {
|
||||
response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
|
||||
}
|
||||
|
||||
}
|
||||
void DefaultApi::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<Pistache::Http::Code>(e.code()), e.what());
|
||||
return;
|
||||
} catch (std::exception &e) {
|
||||
this->handleOperationException(e, response);
|
||||
return;
|
||||
}
|
||||
|
||||
} catch (std::exception &e) {
|
||||
response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
|
||||
}
|
||||
|
||||
}
|
||||
void DefaultApi::start_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) {
|
||||
try {
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* 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:
|
||||
/// </remarks>
|
||||
virtual void config_mask_tiff_get(Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Get ROI definitions
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
virtual void config_roi_get(Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Upload ROI definitions
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <param name="roiDefinitions"> (optional)</param>
|
||||
virtual void config_roi_put(const org::openapitools::server::model::Roi_definitions &roiDefinitions, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// List available detectors
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
@@ -557,36 +569,6 @@ private:
|
||||
/// <param name="sc">Storage cell number (optional, default to 0)</param>
|
||||
virtual void preview_pedestal_tiff_get(const std::optional<int32_t> &gainLevel, const std::optional<int32_t> &sc, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Get box ROIs
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
virtual void roi_box_get(Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Upload box ROIs
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <param name="roiBoxList"> (optional)</param>
|
||||
virtual void roi_box_put(const org::openapitools::server::model::Roi_box_list &roiBoxList, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Get circular ROI
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
virtual void roi_circle_get(Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Upload circular ROI
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <param name="roiCircleList"> (optional)</param>
|
||||
virtual void roi_circle_put(const org::openapitools::server::model::Roi_circle_list &roiCircleList, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Start detector
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -24,6 +24,10 @@ Broker_status::Broker_status()
|
||||
m_State = "";
|
||||
m_Progress = 0.0f;
|
||||
m_ProgressIsSet = false;
|
||||
m_Message = "";
|
||||
m_MessageIsSet = false;
|
||||
m_Message_severity = "error";
|
||||
m_Message_severityIsSet = false;
|
||||
|
||||
}
|
||||
|
||||
@@ -65,7 +69,7 @@ bool Broker_status::validate(std::stringstream& msg, const std::string& pathPref
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
@@ -78,7 +82,13 @@ bool Broker_status::operator==(const Broker_status& rhs) const
|
||||
&&
|
||||
|
||||
|
||||
((!progressIsSet() && !rhs.progressIsSet()) || (progressIsSet() && rhs.progressIsSet() && getProgress() == rhs.getProgress()))
|
||||
((!progressIsSet() && !rhs.progressIsSet()) || (progressIsSet() && rhs.progressIsSet() && getProgress() == rhs.getProgress())) &&
|
||||
|
||||
|
||||
((!messageIsSet() && !rhs.messageIsSet()) || (messageIsSet() && rhs.messageIsSet() && getMessage() == rhs.getMessage())) &&
|
||||
|
||||
|
||||
((!messageSeverityIsSet() && !rhs.messageSeverityIsSet()) || (messageSeverityIsSet() && rhs.messageSeverityIsSet() && getMessageSeverity() == rhs.getMessageSeverity()))
|
||||
|
||||
;
|
||||
}
|
||||
@@ -94,6 +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.messageIsSet())
|
||||
j["message"] = o.m_Message;
|
||||
if(o.messageSeverityIsSet())
|
||||
j["message_severity"] = o.m_Message_severity;
|
||||
|
||||
}
|
||||
|
||||
@@ -105,6 +119,16 @@ 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("message") != j.end())
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -133,6 +157,40 @@ void Broker_status::unsetProgress()
|
||||
{
|
||||
m_ProgressIsSet = false;
|
||||
}
|
||||
std::string Broker_status::getMessage() const
|
||||
{
|
||||
return m_Message;
|
||||
}
|
||||
void Broker_status::setMessage(std::string const& value)
|
||||
{
|
||||
m_Message = value;
|
||||
m_MessageIsSet = true;
|
||||
}
|
||||
bool Broker_status::messageIsSet() const
|
||||
{
|
||||
return m_MessageIsSet;
|
||||
}
|
||||
void Broker_status::unsetMessage()
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
} // namespace org::openapitools::server::model
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -70,6 +70,20 @@ public:
|
||||
void setProgress(float const value);
|
||||
bool progressIsSet() const;
|
||||
void unsetProgress();
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
std::string getMessage() const;
|
||||
void setMessage(std::string const& value);
|
||||
bool messageIsSet() const;
|
||||
void unsetMessage();
|
||||
/// <summary>
|
||||
/// Level of the message to display
|
||||
/// </summary>
|
||||
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);
|
||||
@@ -78,6 +92,10 @@ protected:
|
||||
|
||||
float m_Progress;
|
||||
bool m_ProgressIsSet;
|
||||
std::string m_Message;
|
||||
bool m_MessageIsSet;
|
||||
std::string m_Message_severity;
|
||||
bool m_Message_severityIsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* 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<std::string>& 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<std::string> Detector::getCalibrationFile() const
|
||||
{
|
||||
return m_Calibration_file;
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* 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();
|
||||
/// <summary>
|
||||
/// 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
|
||||
/// </summary>
|
||||
int64_t getReadoutTimeUs() const;
|
||||
void setReadoutTimeUs(int64_t const value);
|
||||
bool readoutTimeUsIsSet() const;
|
||||
void unsetReadout_time_us();
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
std::vector<std::string> getCalibrationFile() const;
|
||||
void setCalibrationFile(std::vector<std::string> 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<std::string> m_Calibration_file;
|
||||
bool m_Calibration_fileIsSet;
|
||||
std::vector<std::string> m_Hostname;
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* 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<org::openapitools::server::model::Detector_list_detectors_inner>& value = m_Detectors;
|
||||
const std::vector<org::openapitools::server::model::Detector_list_element>& 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<org::openapitools::server::model::Detector_list_detectors_inner> Detector_list::getDetectors() const
|
||||
std::vector<org::openapitools::server::model::Detector_list_element> Detector_list::getDetectors() const
|
||||
{
|
||||
return m_Detectors;
|
||||
}
|
||||
void Detector_list::setDetectors(std::vector<org::openapitools::server::model::Detector_list_detectors_inner> const& value)
|
||||
void Detector_list::setDetectors(std::vector<org::openapitools::server::model::Detector_list_element> const& value)
|
||||
{
|
||||
m_Detectors = value;
|
||||
}
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* 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 <vector>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
@@ -62,8 +62,8 @@ public:
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
std::vector<org::openapitools::server::model::Detector_list_detectors_inner> getDetectors() const;
|
||||
void setDetectors(std::vector<org::openapitools::server::model::Detector_list_detectors_inner> const& value);
|
||||
std::vector<org::openapitools::server::model::Detector_list_element> getDetectors() const;
|
||||
void setDetectors(std::vector<org::openapitools::server::model::Detector_list_element> const& value);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
@@ -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<org::openapitools::server::model::Detector_list_detectors_inner> m_Detectors;
|
||||
std::vector<org::openapitools::server::model::Detector_list_element> m_Detectors;
|
||||
|
||||
int64_t m_Current_id;
|
||||
|
||||
|
||||
@@ -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.26
|
||||
* 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
|
||||
|
||||
@@ -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.26
|
||||
* 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:
|
||||
/// </summary>
|
||||
int64_t getHeight() const;
|
||||
void setHeight(int64_t const value);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
int64_t getReadoutTimeUs() const;
|
||||
void setReadoutTimeUs(int64_t const value);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
int64_t getMinFrameTimeUs() const;
|
||||
void setMinFrameTimeUs(int64_t const value);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
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;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
245
broker/gen/model/Detector_list_element.cpp
Normal file
245
broker/gen/model/Detector_list_element.cpp
Normal file
@@ -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.30
|
||||
* 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 <sstream>
|
||||
|
||||
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
|
||||
|
||||
147
broker/gen/model/Detector_list_element.h
Normal file
147
broker/gen/model/Detector_list_element.h
Normal file
@@ -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.30
|
||||
* 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 <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
namespace org::openapitools::server::model
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
class Detector_list_element
|
||||
{
|
||||
public:
|
||||
Detector_list_element();
|
||||
virtual ~Detector_list_element() = default;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Validate the current data in the model. Throws a ValidationException on failure.
|
||||
/// </summary>
|
||||
void validate() const;
|
||||
|
||||
/// <summary>
|
||||
/// Validate the current data in the model. Returns false on error and writes an error
|
||||
/// message into the given stringstream.
|
||||
/// </summary>
|
||||
bool validate(std::stringstream& msg) const;
|
||||
|
||||
/// <summary>
|
||||
/// Helper overload for validate. Used when one model stores another model and calls it's validate.
|
||||
/// Not meant to be called outside that case.
|
||||
/// </summary>
|
||||
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
|
||||
|
||||
bool operator==(const Detector_list_element& rhs) const;
|
||||
bool operator!=(const Detector_list_element& rhs) const;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// Detector_list_element members
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
int64_t getId() const;
|
||||
void setId(int64_t const value);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
std::string getDescription() const;
|
||||
void setDescription(std::string const& value);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
std::string getSerialNumber() const;
|
||||
void setSerialNumber(std::string const& value);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
std::string getBaseIpv4Addr() const;
|
||||
void setBaseIpv4Addr(std::string const& value);
|
||||
/// <summary>
|
||||
/// Number of UDP interfaces per detector module
|
||||
/// </summary>
|
||||
int64_t getUdpInterfaceCount() const;
|
||||
void setUdpInterfaceCount(int64_t const value);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
int64_t getNmodules() const;
|
||||
void setNmodules(int64_t const value);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
int64_t getWidth() const;
|
||||
void setWidth(int64_t const value);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
int64_t getHeight() const;
|
||||
void setHeight(int64_t const value);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
int64_t getReadoutTimeUs() const;
|
||||
void setReadoutTimeUs(int64_t const value);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
int64_t getMinFrameTimeUs() const;
|
||||
void setMinFrameTimeUs(int64_t const value);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
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_ */
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* 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;";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -27,6 +27,8 @@ Instrument_metadata::Instrument_metadata()
|
||||
m_Instrument_name = "";
|
||||
m_Pulsed_source = false;
|
||||
m_Pulsed_sourceIsSet = false;
|
||||
m_Electron_source = false;
|
||||
m_Electron_sourceIsSet = false;
|
||||
|
||||
}
|
||||
|
||||
@@ -49,7 +51,7 @@ bool Instrument_metadata::validate(std::stringstream& msg, const std::string& pa
|
||||
bool success = true;
|
||||
const std::string _pathPrefix = pathPrefix.empty() ? "Instrument_metadata" : pathPrefix;
|
||||
|
||||
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
@@ -68,7 +70,10 @@ bool Instrument_metadata::operator==(const Instrument_metadata& rhs) const
|
||||
&&
|
||||
|
||||
|
||||
((!pulsedSourceIsSet() && !rhs.pulsedSourceIsSet()) || (pulsedSourceIsSet() && rhs.pulsedSourceIsSet() && isPulsedSource() == rhs.isPulsedSource()))
|
||||
((!pulsedSourceIsSet() && !rhs.pulsedSourceIsSet()) || (pulsedSourceIsSet() && rhs.pulsedSourceIsSet() && isPulsedSource() == rhs.isPulsedSource())) &&
|
||||
|
||||
|
||||
((!electronSourceIsSet() && !rhs.electronSourceIsSet()) || (electronSourceIsSet() && rhs.electronSourceIsSet() && isElectronSource() == rhs.isElectronSource()))
|
||||
|
||||
;
|
||||
}
|
||||
@@ -87,6 +92,8 @@ void to_json(nlohmann::json& j, const Instrument_metadata& o)
|
||||
j["instrument_name"] = o.m_Instrument_name;
|
||||
if(o.pulsedSourceIsSet())
|
||||
j["pulsed_source"] = o.m_Pulsed_source;
|
||||
if(o.electronSourceIsSet())
|
||||
j["electron_source"] = o.m_Electron_source;
|
||||
|
||||
}
|
||||
|
||||
@@ -104,6 +111,11 @@ void from_json(const nlohmann::json& j, Instrument_metadata& o)
|
||||
j.at("pulsed_source").get_to(o.m_Pulsed_source);
|
||||
o.m_Pulsed_sourceIsSet = true;
|
||||
}
|
||||
if(j.find("electron_source") != j.end())
|
||||
{
|
||||
j.at("electron_source").get_to(o.m_Electron_source);
|
||||
o.m_Electron_sourceIsSet = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -157,6 +169,23 @@ void Instrument_metadata::unsetPulsed_source()
|
||||
{
|
||||
m_Pulsed_sourceIsSet = false;
|
||||
}
|
||||
bool Instrument_metadata::isElectronSource() const
|
||||
{
|
||||
return m_Electron_source;
|
||||
}
|
||||
void Instrument_metadata::setElectronSource(bool const value)
|
||||
{
|
||||
m_Electron_source = value;
|
||||
m_Electron_sourceIsSet = true;
|
||||
}
|
||||
bool Instrument_metadata::electronSourceIsSet() const
|
||||
{
|
||||
return m_Electron_sourceIsSet;
|
||||
}
|
||||
void Instrument_metadata::unsetElectron_source()
|
||||
{
|
||||
m_Electron_sourceIsSet = false;
|
||||
}
|
||||
|
||||
|
||||
} // namespace org::openapitools::server::model
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -76,12 +76,19 @@ public:
|
||||
std::string getInstrumentName() const;
|
||||
void setInstrumentName(std::string const& value);
|
||||
/// <summary>
|
||||
/// Settings specific to XFEL (e.g., every image has to come from TTL trigger, save pulse ID and event code)
|
||||
/// Settings specific to XFEL (e.g., every image has to come from TTL trigger, save pulse ID and event code)
|
||||
/// </summary>
|
||||
bool isPulsedSource() const;
|
||||
void setPulsedSource(bool const value);
|
||||
bool pulsedSourceIsSet() const;
|
||||
void unsetPulsed_source();
|
||||
/// <summary>
|
||||
/// Settings specific to electron source (e.g., wavelength definition)
|
||||
/// </summary>
|
||||
bool isElectronSource() const;
|
||||
void setElectronSource(bool const value);
|
||||
bool electronSourceIsSet() const;
|
||||
void unsetElectron_source();
|
||||
|
||||
friend void to_json(nlohmann::json& j, const Instrument_metadata& o);
|
||||
friend void from_json(const nlohmann::json& j, Instrument_metadata& o);
|
||||
@@ -94,6 +101,8 @@ protected:
|
||||
|
||||
bool m_Pulsed_source;
|
||||
bool m_Pulsed_sourceIsSet;
|
||||
bool m_Electron_source;
|
||||
bool m_Electron_sourceIsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* 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
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* 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 <vector>
|
||||
#include "Detector_status.h"
|
||||
#include "Roi_definitions.h"
|
||||
#include "Fpga_status_inner.h"
|
||||
#include "Instrument_metadata.h"
|
||||
#include <nlohmann/json.hpp>
|
||||
@@ -162,6 +163,13 @@ public:
|
||||
void setPixelMask(org::openapitools::server::model::Pixel_mask_statistics const& value);
|
||||
bool pixelMaskIsSet() const;
|
||||
void unsetPixel_mask();
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
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;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
111
broker/gen/model/Roi_definitions.cpp
Normal file
111
broker/gen/model/Roi_definitions.cpp
Normal file
@@ -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.30
|
||||
* 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 <sstream>
|
||||
|
||||
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
|
||||
|
||||
85
broker/gen/model/Roi_definitions.h
Normal file
85
broker/gen/model/Roi_definitions.h
Normal file
@@ -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.30
|
||||
* 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 <nlohmann/json.hpp>
|
||||
|
||||
namespace org::openapitools::server::model
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// ROI defintions
|
||||
/// </summary>
|
||||
class Roi_definitions
|
||||
{
|
||||
public:
|
||||
Roi_definitions();
|
||||
virtual ~Roi_definitions() = default;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Validate the current data in the model. Throws a ValidationException on failure.
|
||||
/// </summary>
|
||||
void validate() const;
|
||||
|
||||
/// <summary>
|
||||
/// Validate the current data in the model. Returns false on error and writes an error
|
||||
/// message into the given stringstream.
|
||||
/// </summary>
|
||||
bool validate(std::stringstream& msg) const;
|
||||
|
||||
/// <summary>
|
||||
/// Helper overload for validate. Used when one model stores another model and calls it's validate.
|
||||
/// Not meant to be called outside that case.
|
||||
/// </summary>
|
||||
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
|
||||
|
||||
bool operator==(const Roi_definitions& rhs) const;
|
||||
bool operator!=(const Roi_definitions& rhs) const;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// Roi_definitions members
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
org::openapitools::server::model::Roi_box_list getBox() const;
|
||||
void setBox(org::openapitools::server::model::Roi_box_list const& value);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
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_ */
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -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.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.30
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user