Compare commits
20 Commits
1.0.0-rc.2
...
1.0.0-rc.3
| Author | SHA1 | Date | |
|---|---|---|---|
| 19be3575f0 | |||
| d7b586452a | |||
| fbdb3de175 | |||
| ddf4c75645 | |||
| aeabc81a4c | |||
| 2fec68d3b9 | |||
| 1737f410d5 | |||
| a059b66a3c | |||
| f1e04d7d56 | |||
| d5d7072a9f | |||
| 483c12ca86 | |||
| 7564619574 | |||
| 6ec126d65a | |||
| e5a775b4a3 | |||
| 381e44e944 | |||
| 89a77ceec7 | |||
| 762bb1b9c0 | |||
| ed89fe2619 | |||
| 6f744fd86d | |||
| 71290f374a |
104
.gitlab-ci.yml
104
.gitlab-ci.yml
@@ -4,7 +4,26 @@ stages:
|
||||
- synthesis
|
||||
- release
|
||||
|
||||
build:x86:gcc:
|
||||
variables:
|
||||
CMAKE_PREFIX_PATH: /opt/qt6
|
||||
|
||||
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 -DJFJOCH_VIEWER_BUILD=ON ..
|
||||
- make -j48
|
||||
|
||||
build:x86:gcc-12:
|
||||
stage: build
|
||||
variables:
|
||||
CC: gcc
|
||||
@@ -17,7 +36,23 @@ build:x86:gcc:
|
||||
- mkdir build
|
||||
- cd build
|
||||
- source /opt/rh/gcc-toolset-12/enable
|
||||
- cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
- cmake -DCMAKE_BUILD_TYPE=Release -DJFJOCH_VIEWER_BUILD=ON ..
|
||||
- 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 -DJFJOCH_VIEWER_BUILD=ON ..
|
||||
- make -j48
|
||||
|
||||
build:x86:gcc_writer:
|
||||
@@ -36,6 +71,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 +110,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:
|
||||
@@ -88,7 +139,7 @@ build:x86:rpm:
|
||||
- mkdir build
|
||||
- cd build
|
||||
- source /opt/rh/gcc-toolset-12/enable
|
||||
- cmake -DCMAKE_BUILD_TYPE=Release -DJFJOCH_INSTALL_DRIVER_SOURCE=ON ..
|
||||
- cmake -DCMAKE_BUILD_TYPE=Release -DJFJOCH_INSTALL_DRIVER_SOURCE=ON -DJFJOCH_VIEWER_BUILD=ON ..
|
||||
- make frontend
|
||||
- make -j48 package
|
||||
- mv *.rpm ..
|
||||
@@ -104,7 +155,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 +182,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 +205,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
|
||||
@@ -170,6 +221,29 @@ test:x86:xds_durin:
|
||||
- ../../build/tools/jfjoch_hdf5_test ../../tests/test_data/compression_benchmark.h5 25
|
||||
- xds_par |grep -a1 ISa |tail -n1
|
||||
|
||||
test:x86:xds_durin_new_hdf5_format:
|
||||
stage: test
|
||||
timeout: 90m
|
||||
variables:
|
||||
CTEST_OUTPUT_ON_FAILURE: 1
|
||||
CC: gcc
|
||||
CXX: g++
|
||||
needs: ["build:x86:gcc-12"]
|
||||
dependencies: []
|
||||
tags:
|
||||
- gcc
|
||||
- x86
|
||||
- xds
|
||||
script:
|
||||
- source /opt/rh/gcc-toolset-12/enable
|
||||
- mkdir -p build
|
||||
- cd build
|
||||
- cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
- make -j8 jfjoch_hdf5_test
|
||||
- cd ../tests/xds_durin
|
||||
- HDF5MASTER_NEW_FORMAT=1 ../../build/tools/jfjoch_hdf5_test ../../tests/test_data/compression_benchmark.h5 25
|
||||
- xds_par |grep -a1 ISa |tail -n1
|
||||
|
||||
test:x86:xds_neggia:
|
||||
stage: test
|
||||
timeout: 90m
|
||||
@@ -177,7 +251,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 +274,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
|
||||
@@ -231,12 +305,12 @@ synthesis:hls:
|
||||
- vivado
|
||||
script:
|
||||
- source /opt/rh/gcc-toolset-12/enable
|
||||
- source /opt/Xilinx/Vivado/2022.1/settings64.sh
|
||||
- source /opt/Xilinx/Vivado/2022.2/settings64.sh
|
||||
- mkdir -p build
|
||||
- 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
|
||||
@@ -256,13 +330,13 @@ synthesis:100g:
|
||||
expire_in: 1 week
|
||||
script:
|
||||
- source /opt/rh/gcc-toolset-12/enable
|
||||
- source /opt/Xilinx/Vivado/2022.1/settings64.sh
|
||||
- source /opt/Xilinx/Vivado/2022.2/settings64.sh
|
||||
- mkdir -p build
|
||||
- cd build
|
||||
- /usr/bin/cmake ..
|
||||
- make -j4 pcie_100g
|
||||
- mv fpga/jfjoch_fpga_pcie_100g.mcs ..
|
||||
needs: ["build:x86:gcc", "test:x86:gcc"]
|
||||
needs: ["build:x86:gcc-12", "test:x86:gcc"]
|
||||
|
||||
synthesis:8x10g:
|
||||
stage: synthesis
|
||||
@@ -282,13 +356,13 @@ synthesis:8x10g:
|
||||
expire_in: 1 week
|
||||
script:
|
||||
- source /opt/rh/gcc-toolset-12/enable
|
||||
- source /opt/Xilinx/Vivado/2022.1/settings64.sh
|
||||
- source /opt/Xilinx/Vivado/2022.2/settings64.sh
|
||||
- mkdir -p build
|
||||
- cd build
|
||||
- /usr/bin/cmake ..
|
||||
- make -j4 pcie_8x10g
|
||||
- mv fpga/jfjoch_fpga_pcie_8x10g.mcs ..
|
||||
needs: [ "build:x86:gcc", "test:x86:gcc" ]
|
||||
needs: [ "build:x86:gcc-12", "test:x86:gcc" ]
|
||||
|
||||
release:
|
||||
stage: release
|
||||
|
||||
@@ -11,6 +11,11 @@ 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(JFJOCH_VIEWER_BUILD OFF CACHE BOOL "Compile Jungfraujoch viewer")
|
||||
|
||||
SET(BUILD_SHARED_LIBS OFF)
|
||||
SET(BUILD_TESTING OFF)
|
||||
|
||||
@@ -46,15 +51,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)
|
||||
@@ -72,7 +81,7 @@ FetchContent_Declare(tiff
|
||||
|
||||
FetchContent_Declare(hdf5
|
||||
GIT_REPOSITORY https://github.com/HDFGroup/hdf5/
|
||||
GIT_TAG hdf5_1.14.4.2
|
||||
GIT_TAG hdf5_1.14.5
|
||||
GIT_SHALLOW 1
|
||||
EXCLUDE_FROM_ALL)
|
||||
|
||||
@@ -82,7 +91,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
|
||||
)
|
||||
|
||||
@@ -114,8 +123,9 @@ ADD_SUBDIRECTORY(compression)
|
||||
ADD_SUBDIRECTORY(common)
|
||||
ADD_SUBDIRECTORY(writer)
|
||||
ADD_SUBDIRECTORY(frame_serialize)
|
||||
|
||||
ADD_SUBDIRECTORY(reader)
|
||||
ADD_SUBDIRECTORY(detector_control)
|
||||
|
||||
IF (JFJOCH_WRITER_ONLY)
|
||||
MESSAGE(STATUS "Compiling HDF5 writer only")
|
||||
ELSE()
|
||||
@@ -130,6 +140,10 @@ ELSE()
|
||||
ADD_SUBDIRECTORY(preview)
|
||||
ENDIF()
|
||||
|
||||
IF (JFJOCH_VIEWER_BUILD)
|
||||
ADD_SUBDIRECTORY(viewer)
|
||||
ENDIF()
|
||||
|
||||
IF (NOT JFJOCH_WRITER_ONLY)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT frontend/dist/index.html
|
||||
COMMAND npm install
|
||||
@@ -162,9 +176,11 @@ IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
|
||||
# Set Package Name
|
||||
set(CPACK_PACKAGE_NAME "jfjoch")
|
||||
# Initialize CPACK_COMPONENTS_ALL with common components
|
||||
SET(CPACK_COMPONENTS_ALL jfjoch writer)
|
||||
SET(CPACK_PACKAGE_NAME "jfjoch")
|
||||
IF (JFJOCH_INSTALL_DRIVER_SOURCE)
|
||||
SET(CPACK_COMPONENTS_ALL jfjoch writer driver-dkms)
|
||||
LIST(APPEND CPACK_COMPONENTS_ALL driver-dkms)
|
||||
SET(CPACK_RPM_DRIVER-DKMS_PACKAGE_REQUIRES "dkms, gcc, bash, sed")
|
||||
SET(CPACK_RPM_DRIVER-DKMS_PACKAGE_ARCHITECTURE "noarch")
|
||||
SET(CPACK_RPM_DRIVER-DKMS_POST_INSTALL_SCRIPT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/fpga/pcie_driver/postinstall.sh)
|
||||
@@ -174,6 +190,10 @@ ELSE()
|
||||
SET(CPACK_COMPONENTS_ALL jfjoch writer)
|
||||
ENDIF()
|
||||
|
||||
IF (JFJOCH_VIEWER_BUILD)
|
||||
LIST(APPEND CPACK_COMPONENTS_ALL viewer)
|
||||
ENDIF()
|
||||
|
||||
SET(CPACK_GENERATOR RPM)
|
||||
SET(CPACK_RPM_COMPONENT_INSTALL ON)
|
||||
SET(CPACK_RPM_MAIN_COMPONENT jfjoch)
|
||||
@@ -184,10 +204,11 @@ SET(CPACK_RPM_PACKAGE_RELEASE 1)
|
||||
SET(CPACK_RPM_PACKAGE_SUMMARY "Jungfraujoch data acquisition system")
|
||||
SET(CPACK_RPM_PACKAGE_DESCRIPTION "Jungfraujoch")
|
||||
|
||||
SET(CPACK_PACKAGE_CONTACT "Filip Leonarski <filip.leonarski@psi.ch>")
|
||||
# Set The Vendor Name
|
||||
SET(CPACK_PACKAGE_VENDOR "Paul Scherrer Institut")
|
||||
|
||||
# Set The License Information
|
||||
SET(CPACK_RPM_PACKAGE_LICENSE "Proprietary")
|
||||
SET(CPACK_RPM_PACKAGE_LICENSE "GPLv3")
|
||||
|
||||
INCLUDE(CPack)
|
||||
|
||||
@@ -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).
|
||||
@@ -206,11 +206,15 @@ uint64_t AcquisitionCounters::GetTotalPackets(uint16_t module_number) const {
|
||||
return packets_per_module[module_number];
|
||||
}
|
||||
|
||||
uint64_t AcquisitionCounters::GetExpectedPackets() const {
|
||||
return GetExpectedPacketsPerModule() * nmodules;
|
||||
uint64_t AcquisitionCounters::GetExpectedPacketsPerImage() const {
|
||||
return expected_packets_per_module * nmodules;
|
||||
}
|
||||
|
||||
uint64_t AcquisitionCounters::GetExpectedPacketsPerModule() const {
|
||||
uint64_t AcquisitionCounters::GetTotalExpectedPackets() const {
|
||||
return GetTotalExpectedPacketsPerModule() * nmodules;
|
||||
}
|
||||
|
||||
uint64_t AcquisitionCounters::GetTotalExpectedPacketsPerModule() const {
|
||||
return expected_frames * expected_packets_per_module;
|
||||
}
|
||||
|
||||
|
||||
@@ -65,8 +65,9 @@ public:
|
||||
uint64_t GetTotalPackets(uint16_t module_number) const;
|
||||
uint64_t GetBytesReceived() const;
|
||||
|
||||
uint64_t GetExpectedPackets() const;
|
||||
uint64_t GetExpectedPacketsPerModule() const;
|
||||
uint64_t GetTotalExpectedPackets() const;
|
||||
uint64_t GetTotalExpectedPacketsPerModule() const;
|
||||
uint64_t GetExpectedPacketsPerImage() const;
|
||||
|
||||
uint64_t GetModuleNumber() const;
|
||||
};
|
||||
|
||||
@@ -181,6 +181,14 @@ void AcquisitionDevice::InitializeROIMap(const DiffractionExperiment& experiment
|
||||
}
|
||||
}
|
||||
|
||||
void AcquisitionDevice::InitializeEmptyPixelMask(const DiffractionExperiment &experiment) {
|
||||
std::vector<uint32_t> empty_mask(RAW_MODULE_SIZE);
|
||||
|
||||
size_t modules = experiment.GetModulesNum(data_stream);
|
||||
for (int m = 0; m < modules; m++)
|
||||
InitializePixelMask(empty_mask.data(), m);
|
||||
}
|
||||
|
||||
void AcquisitionDevice::InitializePixelMask(const DiffractionExperiment &experiment, const PixelMask &mask) {
|
||||
auto offset = experiment.GetFirstModuleOfDataStream(data_stream);
|
||||
size_t modules = experiment.GetModulesNum(data_stream);
|
||||
@@ -246,7 +254,7 @@ AcquisitionDeviceStatistics AcquisitionDevice::GetStatistics() const {
|
||||
ret.bytes_received = GetBytesReceived();
|
||||
ret.start_timestamp = start_time.time_since_epoch().count();
|
||||
ret.end_timestamp = end_time.time_since_epoch().count();
|
||||
ret.packets_expected = counters.GetExpectedPackets();
|
||||
ret.packets_expected = counters.GetTotalExpectedPackets();
|
||||
ret.good_packets = counters.GetTotalPackets();
|
||||
|
||||
for (int i = 0; i < counters.GetModuleNumber(); i++)
|
||||
|
||||
@@ -96,6 +96,7 @@ public:
|
||||
virtual void InitializeIntegrationMap(const uint16_t *map, const float *weights, size_t module_number);
|
||||
virtual void InitializeSpotFinderResolutionMap(const float *data, size_t module_number);
|
||||
virtual void InitializeROIMap(const uint16_t *map, size_t module_number);
|
||||
void InitializeEmptyPixelMask(const DiffractionExperiment &experiment); // Empty Mask
|
||||
void InitializePixelMask(const DiffractionExperiment &experiment, const PixelMask &mask);
|
||||
virtual void InitializePixelMask(const uint32_t *module_mask, size_t module_number);
|
||||
void InitializeROIMap(const DiffractionExperiment &experiment);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -392,6 +382,11 @@ void JFJochBrokerHttp::plot_indexing_unit_cell_angle_get(const std::optional<int
|
||||
GenericPlot(PlotType::IndexingUnitCellAngle, binning, compression, response);
|
||||
}
|
||||
|
||||
void JFJochBrokerHttp::plot_packets_received_get(const std::optional<int32_t> &binning,
|
||||
const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) {
|
||||
GenericPlot(PlotType::PacketsReceived, binning, compression, response);
|
||||
}
|
||||
|
||||
void JFJochBrokerHttp::plot_receiver_delay_get(const std::optional<int32_t> &binning,
|
||||
const std::optional<bool>& compression,
|
||||
Pistache::Http::ResponseWriter &response) {
|
||||
@@ -434,6 +429,12 @@ void JFJochBrokerHttp::plot_strong_pixel_get(const std::optional<int32_t> &binni
|
||||
GenericPlot(PlotType::StrongPixels, binning, compression, response);
|
||||
}
|
||||
|
||||
void JFJochBrokerHttp::plot_max_value_get(const std::optional<int32_t> &binning,
|
||||
const std::optional<bool>& compression,
|
||||
Pistache::Http::ResponseWriter &response) {
|
||||
GenericPlot(PlotType::MaxValue, binning, compression, response);
|
||||
}
|
||||
|
||||
void JFJochBrokerHttp::config_mask_tiff_get(Pistache::Http::ResponseWriter &response) {
|
||||
auto s = state_machine.GetFullPixelMaskTIFF();
|
||||
response.send(Pistache::Http::Code::Ok, s, Pistache::Http::Mime::MediaType::fromString("image/tiff"));
|
||||
@@ -549,6 +550,8 @@ 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()));
|
||||
statistics.setFileWriterSettings(Convert(state_machine.GetFileWriterSettings()));
|
||||
|
||||
auto zeromq_prev = state_machine.GetPreviewSocketSettings();
|
||||
if (!zeromq_prev.address.empty())
|
||||
@@ -586,3 +589,48 @@ void JFJochBrokerHttp::config_zeromq_metadata_put(
|
||||
state_machine.SetMetadataSocketSettings(Convert(zeromqMetadataSettings));
|
||||
response.send(Pistache::Http::Code::Ok);
|
||||
}
|
||||
|
||||
void JFJochBrokerHttp::image_buffer_clear_post(Pistache::Http::ResponseWriter &response) {
|
||||
state_machine.ClearImageBuffer();
|
||||
response.send(Pistache::Http::Code::Ok);
|
||||
}
|
||||
|
||||
void JFJochBrokerHttp::image_buffer_image_cbor_get(const std::optional<int64_t> &imageNumber,
|
||||
Pistache::Http::ResponseWriter &response) {
|
||||
std::vector<uint8_t> tmp_vector;
|
||||
state_machine.GetImageFromBuffer(tmp_vector, imageNumber.value_or(-1));
|
||||
std::string s = std::string((char *) tmp_vector.data(), tmp_vector.size());
|
||||
|
||||
if (!s.empty())
|
||||
response.send(Pistache::Http::Code::Ok, s,
|
||||
Pistache::Http::Mime::MediaType::fromString("application/cbor"));
|
||||
else
|
||||
response.send(Pistache::Http::Code::Not_Found);
|
||||
}
|
||||
|
||||
void JFJochBrokerHttp::image_buffer_start_cbor_get(Pistache::Http::ResponseWriter &response) {
|
||||
std::vector<uint8_t> tmp_vector;
|
||||
state_machine.GetStartMessageFromBuffer(tmp_vector);
|
||||
std::string s = std::string((char *) tmp_vector.data(), tmp_vector.size());
|
||||
|
||||
if (!s.empty())
|
||||
response.send(Pistache::Http::Code::Ok, s,
|
||||
Pistache::Http::Mime::MediaType::fromString("application/cbor"));
|
||||
else
|
||||
response.send(Pistache::Http::Code::Not_Found);
|
||||
}
|
||||
|
||||
void JFJochBrokerHttp::image_buffer_status_get(Pistache::Http::ResponseWriter &response) {
|
||||
ProcessOutput(Convert(state_machine.GetImageBufferStatus()), response);
|
||||
}
|
||||
|
||||
void JFJochBrokerHttp::config_file_writer_get(Pistache::Http::ResponseWriter &response) {
|
||||
ProcessOutput(Convert(state_machine.GetFileWriterSettings()), response);
|
||||
}
|
||||
|
||||
void JFJochBrokerHttp::config_file_writer_put(
|
||||
const org::openapitools::server::model::File_writer_settings &fileWriterSettings,
|
||||
Pistache::Http::ResponseWriter &response) {
|
||||
state_machine.LoadFileWriterSettings(Convert(fileWriterSettings));
|
||||
response.send(Pistache::Http::Code::Ok);
|
||||
}
|
||||
|
||||
@@ -78,7 +78,8 @@ class JFJochBrokerHttp : public org::openapitools::server::api::DefaultApi {
|
||||
Pistache::Http::ResponseWriter &response) override;
|
||||
void plot_strong_pixel_get(const std::optional<int32_t> &binning, const std::optional<bool>& compression,
|
||||
Pistache::Http::ResponseWriter &response) override;
|
||||
|
||||
void plot_max_value_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression,
|
||||
Pistache::Http::ResponseWriter &response) override;
|
||||
void plot_azim_int_get(const std::optional<bool>& compression, Pistache::Http::ResponseWriter &response) override;
|
||||
|
||||
void statistics_calibration_get(Pistache::Http::ResponseWriter &response) override;
|
||||
@@ -111,12 +112,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;
|
||||
@@ -188,6 +186,19 @@ class JFJochBrokerHttp : public org::openapitools::server::api::DefaultApi {
|
||||
|
||||
void plot_indexing_unit_cell_angle_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression,
|
||||
Pistache::Http::ResponseWriter &response) override;
|
||||
|
||||
void plot_packets_received_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression,
|
||||
Pistache::Http::ResponseWriter &response) override;
|
||||
|
||||
void image_buffer_clear_post(Pistache::Http::ResponseWriter &response) override;
|
||||
|
||||
void image_buffer_image_cbor_get(const std::optional<int64_t> &imageNumber,
|
||||
Pistache::Http::ResponseWriter &response) override;
|
||||
|
||||
void image_buffer_start_cbor_get(Pistache::Http::ResponseWriter &response) override;
|
||||
|
||||
void image_buffer_status_get(Pistache::Http::ResponseWriter &response) override;
|
||||
|
||||
public:
|
||||
JFJochBrokerHttp(const DiffractionExperiment& experiment, std::shared_ptr<Pistache::Rest::Router> &rtr);
|
||||
void AddDetectorSetup(const DetectorSetup &setup);
|
||||
@@ -196,6 +207,12 @@ public:
|
||||
JFJochBrokerHttp& FrontendDirectory(const std::string &directory);
|
||||
|
||||
~JFJochBrokerHttp() override = default;
|
||||
|
||||
private:
|
||||
void config_file_writer_get(Pistache::Http::ResponseWriter &response) override;
|
||||
|
||||
void config_file_writer_put(const org::openapitools::server::model::File_writer_settings &fileWriterSettings,
|
||||
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())
|
||||
@@ -105,11 +108,14 @@ void ParseFacilityConfiguration(const org::openapitools::server::model::Jfjoch_s
|
||||
if (j.instrumentIsSet())
|
||||
experiment.ImportInstrumentMetadata(Convert(j.getInstrument()));
|
||||
|
||||
if (j.fileWriterIsSet())
|
||||
experiment.ImportFileWriterSettings(Convert(j.getFileWriter()));
|
||||
|
||||
if (j.detectorSettingsIsSet())
|
||||
experiment.ImportDetectorSettings(Convert(j.getDetectorSettings()));
|
||||
|
||||
if (j.azimIntIsSet())
|
||||
experiment.ImportRadialIntegrationSettings(Convert(j.getAzimInt()));
|
||||
experiment.ImportAzimuthalIntegrationSettings(Convert(j.getAzimInt()));
|
||||
|
||||
if (j.imageFormatIsSet())
|
||||
experiment.ImportImageFormatSettings(Convert(j.getImageFormat()));
|
||||
|
||||
@@ -223,3 +223,24 @@ void JFJochServices::SetMetadataSocketSettings(const ZMQMetadataSettings &input)
|
||||
if (receiver)
|
||||
receiver->MetadataSocketSettings(input);
|
||||
}
|
||||
|
||||
void JFJochServices::GetStartMessageFromBuffer(std::vector<uint8_t> &v) {
|
||||
if (receiver)
|
||||
return receiver->GetStartMessageFromBuffer(v);
|
||||
}
|
||||
|
||||
void JFJochServices::GetImageFromBuffer(std::vector<uint8_t> &v, int64_t image_number) {
|
||||
if (receiver)
|
||||
return receiver->GetImageFromBuffer(v, image_number);
|
||||
}
|
||||
|
||||
ImageBufferStatus JFJochServices::GetImageBufferStatus() const {
|
||||
if (receiver)
|
||||
return receiver->GetImageBufferStatus();
|
||||
else return ImageBufferStatus{.total_slots = 0, .available_slots = 0};
|
||||
}
|
||||
|
||||
void JFJochServices::ClearImageBuffer() const {
|
||||
if (receiver)
|
||||
receiver->ClearImageBuffer();
|
||||
}
|
||||
@@ -56,6 +56,11 @@ public:
|
||||
|
||||
void SetMetadataSocketSettings(const ZMQMetadataSettings &input);
|
||||
ZMQMetadataSettings GetMetadataSocketSettings();
|
||||
|
||||
void GetStartMessageFromBuffer(std::vector<uint8_t> &v);
|
||||
void GetImageFromBuffer(std::vector<uint8_t> &v, int64_t image_number = -1);
|
||||
ImageBufferStatus GetImageBufferStatus() const;
|
||||
void ClearImageBuffer() const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -50,10 +51,19 @@ bool JFJochStateMachine::ImportPedestalG1G2(const JFJochReceiverOutput &receiver
|
||||
|
||||
void JFJochStateMachine::TakePedestalInternalAll(std::unique_lock<std::mutex> &ul) {
|
||||
if (experiment.GetDetectorSetup().GetDetectorType() == DetectorType::EIGER) {
|
||||
logger.Info("EIGER configuration");
|
||||
services.ConfigureDetector(experiment);
|
||||
logger.Info(" ... done ");
|
||||
return;
|
||||
try {
|
||||
logger.Info("EIGER configuration");
|
||||
services.ConfigureDetector(experiment);
|
||||
logger.Info(" ... done ");
|
||||
SetState(JFJochState::Idle,
|
||||
"EIGER detector configured",
|
||||
BrokerStatus::MessageSeverity::Success);
|
||||
return;
|
||||
} catch (const std::exception &e) {
|
||||
logger.Error("EIGER configuration error {}", e.what());
|
||||
SetState(JFJochState::Error, e.what(), BrokerStatus::MessageSeverity::Error);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
calibration = std::make_unique<JFCalibration>(experiment);
|
||||
@@ -77,12 +87,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 +104,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 +119,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 +141,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 +159,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 +183,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 +199,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 +223,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 +251,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 +264,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 +277,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 +297,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 +322,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 +358,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 +371,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 {
|
||||
@@ -368,6 +411,10 @@ std::optional<MeasurementStatistics> JFJochStateMachine::GetMeasurementStatistic
|
||||
tmp.indexing_rate = rcv_status->indexing_rate;
|
||||
tmp.bkg_estimate = rcv_status->bkg_estimate;
|
||||
tmp.collection_efficiency = rcv_status->efficiency;
|
||||
tmp.error_pixels = rcv_status->error_pixels;
|
||||
tmp.saturated_pixels = rcv_status->saturated_pixels;
|
||||
tmp.roi_beam_sum = rcv_status->roi_beam_sum;
|
||||
tmp.roi_beam_npixel = rcv_status->roi_beam_npixel;
|
||||
}
|
||||
return tmp;
|
||||
}
|
||||
@@ -400,14 +447,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 +463,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 +497,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);
|
||||
// Not thread safe, only during setup
|
||||
|
||||
if (detector_setup.empty()) {
|
||||
experiment.Detector(setup);
|
||||
UpdateROIDefinition();
|
||||
gain_calibration = setup.GetGainCalibration();
|
||||
current_detector_setup = 0;
|
||||
pixel_mask = PixelMask(experiment);
|
||||
@@ -455,10 +511,9 @@ void JFJochStateMachine::AddDetectorSetup(const DetectorSetup &setup) {
|
||||
}
|
||||
|
||||
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,10 +522,15 @@ 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));
|
||||
}
|
||||
|
||||
ret.current_id = current_detector_setup;
|
||||
{
|
||||
std::unique_lock ul(current_detector_setup_mutex);
|
||||
ret.current_id = current_detector_setup;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -485,17 +545,22 @@ 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;
|
||||
current_detector_setup = id;
|
||||
} catch (JFJochException &e) {
|
||||
SetState(JFJochState::Inactive, detector_setup[id].GetDescription() + " selected; please initialize");
|
||||
{
|
||||
std::unique_lock ul(current_detector_setup_mutex);
|
||||
current_detector_setup = id;
|
||||
}
|
||||
} 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,14 +568,16 @@ void JFJochStateMachine::SetRadialIntegrationSettings(const AzimuthalIntegration
|
||||
std::unique_lock ul(m);
|
||||
|
||||
if (IsRunning())
|
||||
throw WrongDAQStateException ("Cannot change radial integration settings during data collection");
|
||||
|
||||
experiment.ImportRadialIntegrationSettings(settings);
|
||||
throw WrongDAQStateException("Cannot change radial integration settings during data collection");
|
||||
{
|
||||
std::unique_lock ul(experiment_azimuthal_integration_settings_mutex);
|
||||
experiment.ImportAzimuthalIntegrationSettings(settings);
|
||||
}
|
||||
}
|
||||
|
||||
AzimuthalIntegrationSettings JFJochStateMachine::GetRadialIntegrationSettings() const {
|
||||
std::unique_lock ul(m);
|
||||
return experiment.GetRadialIntegrationSettings();
|
||||
std::unique_lock ul(experiment_azimuthal_integration_settings_mutex);
|
||||
return experiment.GetAzimuthalIntegrationSettings();
|
||||
}
|
||||
|
||||
bool JFJochStateMachine::IsRunning() const {
|
||||
@@ -528,33 +595,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 +631,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 +645,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 +666,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 +674,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 +738,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 +758,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 +772,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 +783,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 +792,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();
|
||||
}
|
||||
@@ -757,3 +816,38 @@ void JFJochStateMachine::SetMetadataSocketSettings(const ZMQMetadataSettings &in
|
||||
ZMQMetadataSettings JFJochStateMachine::GetMetadataSocketSettings() {
|
||||
return services.GetMetadataSocketSettings();
|
||||
}
|
||||
|
||||
void JFJochStateMachine::GetStartMessageFromBuffer(std::vector<uint8_t> &v) {
|
||||
return services.GetStartMessageFromBuffer(v);
|
||||
}
|
||||
|
||||
void JFJochStateMachine::GetImageFromBuffer(std::vector<uint8_t> &v, int64_t image_number) {
|
||||
return services.GetImageFromBuffer(v, image_number);
|
||||
}
|
||||
|
||||
ImageBufferStatus JFJochStateMachine::GetImageBufferStatus() const {
|
||||
return services.GetImageBufferStatus();
|
||||
}
|
||||
|
||||
void JFJochStateMachine::ClearImageBuffer() const {
|
||||
std::unique_lock ul(m);
|
||||
|
||||
if (IsRunning())
|
||||
throw WrongDAQStateException("Cannot clear image buffer during data collection");
|
||||
|
||||
services.ClearImageBuffer();
|
||||
}
|
||||
|
||||
FileWriterSettings JFJochStateMachine::GetFileWriterSettings() const {
|
||||
std::unique_lock ul(m);
|
||||
return experiment.GetFileWriterSettings();
|
||||
}
|
||||
|
||||
void JFJochStateMachine::LoadFileWriterSettings(const FileWriterSettings &settings) {
|
||||
std::unique_lock ul(m);
|
||||
|
||||
if (IsRunning())
|
||||
throw WrongDAQStateException("Cannot change instrument metadata during data collection");
|
||||
|
||||
experiment.ImportFileWriterSettings(settings);
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
@@ -64,30 +69,38 @@ struct MeasurementStatistics {
|
||||
std::optional<std::pair<float, float>> beam_center_drift_pxl;
|
||||
|
||||
std::string unit_cell;
|
||||
|
||||
std::optional<float> error_pixels;
|
||||
std::optional<float> saturated_pixels;
|
||||
std::optional<float> roi_beam_npixel;
|
||||
std::optional<float> roi_beam_sum;
|
||||
};
|
||||
|
||||
class JFJochStateMachine {
|
||||
Logger &logger;
|
||||
JFJochServices &services;
|
||||
|
||||
std::future<void> measurement;
|
||||
|
||||
// assuming immutable during normal operation
|
||||
std::vector<DetectorSetup> detector_setup;
|
||||
std::vector<JFModuleGainCalibration> gain_calibration;
|
||||
|
||||
mutable std::mutex experiment_detector_settings_mutex;
|
||||
mutable std::mutex experiment_azimuthal_integration_settings_mutex;
|
||||
DiffractionExperiment experiment;
|
||||
|
||||
// mutex m is protecting:
|
||||
mutable std::mutex m;
|
||||
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;
|
||||
|
||||
std::vector<JFModuleGainCalibration> gain_calibration;
|
||||
std::vector<DetectorSetup> detector_setup;
|
||||
mutable std::mutex current_detector_setup_mutex;
|
||||
int64_t current_detector_setup;
|
||||
|
||||
std::future<void> measurement;
|
||||
|
||||
mutable std::mutex calibration_statistics_mutex;
|
||||
std::vector<JFCalibrationModuleStatistics> calibration_statistics;
|
||||
|
||||
@@ -97,21 +110,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 +143,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();
|
||||
@@ -134,6 +157,9 @@ public:
|
||||
InstrumentMetadata GetInstrumentMetadata() const;
|
||||
void LoadInstrumentMetadata(const InstrumentMetadata& settings);
|
||||
|
||||
FileWriterSettings GetFileWriterSettings() const;
|
||||
void LoadFileWriterSettings(const FileWriterSettings& settings);
|
||||
|
||||
ImageFormatSettings GetImageFormatSettings() const;
|
||||
void LoadImageFormatSettings(const ImageFormatSettings& settings);
|
||||
void RawImageFormatSettings();
|
||||
@@ -149,9 +175,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);
|
||||
std::optional<DetectorStatus> GetDetectorStatus() const;
|
||||
@@ -170,13 +193,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;
|
||||
@@ -197,6 +219,12 @@ public:
|
||||
ZMQMetadataSettings GetMetadataSocketSettings();
|
||||
|
||||
PixelMaskStatistics GetPixelMaskStatistics() const;
|
||||
|
||||
void GetStartMessageFromBuffer(std::vector<uint8_t> &v);
|
||||
void GetImageFromBuffer(std::vector<uint8_t> &v, int64_t image_number = -1);
|
||||
ImageBufferStatus GetImageBufferStatus() const;
|
||||
void ClearImageBuffer() const;
|
||||
void AddDetectorSetup(const DetectorSetup& setup); // Not thread safe, only during setup
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -67,6 +67,16 @@ org::openapitools::server::model::Measurement_statistics Convert(const Measureme
|
||||
ret.setDetectorHeight(input.detector_height);
|
||||
ret.setDetectorPixelDepth(input.detector_pixel_depth);
|
||||
|
||||
if (input.roi_beam_npixel)
|
||||
ret.setRoiBeamPixels(input.roi_beam_npixel.value());
|
||||
if (input.roi_beam_sum)
|
||||
ret.setRoiBeamSum(input.roi_beam_sum.value());
|
||||
|
||||
if (input.error_pixels)
|
||||
ret.setErrorPixels(input.error_pixels.value());
|
||||
if (input.saturated_pixels)
|
||||
ret.setSaturatedPixels(input.saturated_pixels.value());
|
||||
|
||||
if (input.indexing_rate)
|
||||
ret.setIndexingRate(input.indexing_rate.value());
|
||||
|
||||
@@ -186,7 +196,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 +216,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 +270,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 +279,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 +338,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 +349,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 +394,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 +418,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 +434,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();
|
||||
@@ -563,6 +597,8 @@ std::vector<org::openapitools::server::model::Fpga_status_inner> Convert(const s
|
||||
tmp.setPowerUsageW(static_cast<float>(d.fpga_pcie_12V_I_mA * d.fpga_pcie_12V_V_mV + d.fpga_pcie_3p3V_I_mA
|
||||
* d.fpga_pcie_3p3V_V_mV) / (1000.0f * 1000.0f));
|
||||
tmp.setIdle(d.idle);
|
||||
tmp.setPcieLinkSpeed(d.pcie_link_speed);
|
||||
tmp.setPcieLinkWidth(d.pcie_link_width);
|
||||
ret.emplace_back(std::move(tmp));
|
||||
}
|
||||
return ret;
|
||||
@@ -613,3 +649,25 @@ org::openapitools::server::model::Pixel_mask_statistics Convert(const PixelMaskS
|
||||
ret.setTooHighPedestalRms(input.too_high_pedestal_rms);
|
||||
return ret;
|
||||
}
|
||||
|
||||
org::openapitools::server::model::Image_buffer_status Convert(const ImageBufferStatus& input) {
|
||||
org::openapitools::server::model::Image_buffer_status ret;
|
||||
ret.setAvailableSlots(input.available_slots);
|
||||
ret.setTotalSlots(input.total_slots);
|
||||
ret.setImageNumbers(input.images_in_the_buffer);
|
||||
return ret;
|
||||
}
|
||||
|
||||
org::openapitools::server::model::File_writer_settings Convert(const FileWriterSettings& input) {
|
||||
org::openapitools::server::model::File_writer_settings ret;
|
||||
ret.setFileWriterVersion(input.GetHDF5MasterFormatVersion());
|
||||
ret.setOverwrite(input.IsOverwriteExistingFiles());
|
||||
return ret;
|
||||
}
|
||||
|
||||
FileWriterSettings Convert(const org::openapitools::server::model::File_writer_settings &input) {
|
||||
FileWriterSettings ret;
|
||||
ret.OverwriteExistingFiles(input.isOverwrite());
|
||||
ret.HDF5MasterFormatVersion(input.getFileWriterVersion());
|
||||
return ret;
|
||||
}
|
||||
@@ -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"
|
||||
@@ -24,6 +23,8 @@
|
||||
#include "gen/model/Pixel_mask_statistics.h"
|
||||
#include "gen/model/Zeromq_preview_settings.h"
|
||||
#include "gen/model/Zeromq_metadata_settings.h"
|
||||
#include "gen/model/File_writer_settings.h"
|
||||
#include "gen/model/Image_buffer_status.h"
|
||||
|
||||
#include "../common/DatasetSettings.h"
|
||||
#include "../common/ImageFormatSettings.h"
|
||||
@@ -46,21 +47,24 @@ std::vector<org::openapitools::server::model::Calibration_statistics_inner> Conv
|
||||
org::openapitools::server::model::Instrument_metadata Convert(const InstrumentMetadata& input);
|
||||
|
||||
InstrumentMetadata Convert(const org::openapitools::server::model::Instrument_metadata &input);
|
||||
|
||||
org::openapitools::server::model::File_writer_settings Convert(const FileWriterSettings& input);
|
||||
FileWriterSettings Convert(const org::openapitools::server::model::File_writer_settings &input);
|
||||
|
||||
org::openapitools::server::model::Detector_status Convert(const DetectorStatus &input);
|
||||
org::openapitools::server::model::Detector_list Convert(const DetectorList &input);
|
||||
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);
|
||||
DatasetSettings Convert(const org::openapitools::server::model::Dataset_settings& input);
|
||||
std::vector<org::openapitools::server::model::Fpga_status_inner> Convert(const std::vector<DeviceStatus> &input);
|
||||
org::openapitools::server::model::Pixel_mask_statistics Convert(const PixelMaskStatistics& input);
|
||||
org::openapitools::server::model::Image_buffer_status Convert(const ImageBufferStatus& input);
|
||||
|
||||
org::openapitools::server::model::Zeromq_preview_settings Convert(const ZMQPreviewSettings& settings);
|
||||
ZMQPreviewSettings Convert(const org::openapitools::server::model::Zeromq_preview_settings& 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.31
|
||||
* 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.31
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -38,6 +38,8 @@ void DefaultApi::setupRoutes() {
|
||||
Routes::Put(*router, base + "/config/azim_int", Routes::bind(&DefaultApi::config_azim_int_put_handler, this));
|
||||
Routes::Get(*router, base + "/config/detector", Routes::bind(&DefaultApi::config_detector_get_handler, this));
|
||||
Routes::Put(*router, base + "/config/detector", Routes::bind(&DefaultApi::config_detector_put_handler, this));
|
||||
Routes::Get(*router, base + "/config/file_writer", Routes::bind(&DefaultApi::config_file_writer_get_handler, this));
|
||||
Routes::Put(*router, base + "/config/file_writer", Routes::bind(&DefaultApi::config_file_writer_put_handler, this));
|
||||
Routes::Post(*router, base + "/config/image_format/conversion", Routes::bind(&DefaultApi::config_image_format_conversion_post_handler, this));
|
||||
Routes::Get(*router, base + "/config/image_format", Routes::bind(&DefaultApi::config_image_format_get_handler, this));
|
||||
Routes::Put(*router, base + "/config/image_format", Routes::bind(&DefaultApi::config_image_format_put_handler, this));
|
||||
@@ -48,6 +50,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));
|
||||
@@ -63,6 +67,10 @@ void DefaultApi::setupRoutes() {
|
||||
Routes::Post(*router, base + "/deactivate", Routes::bind(&DefaultApi::deactivate_post_handler, this));
|
||||
Routes::Get(*router, base + "/detector/status", Routes::bind(&DefaultApi::detector_status_get_handler, this));
|
||||
Routes::Get(*router, base + "/fpga_status", Routes::bind(&DefaultApi::fpga_status_get_handler, this));
|
||||
Routes::Post(*router, base + "/image_buffer/clear", Routes::bind(&DefaultApi::image_buffer_clear_post_handler, this));
|
||||
Routes::Get(*router, base + "/image_buffer/image.cbor", Routes::bind(&DefaultApi::image_buffer_image_cbor_get_handler, this));
|
||||
Routes::Get(*router, base + "/image_buffer/start.cbor", Routes::bind(&DefaultApi::image_buffer_start_cbor_get_handler, this));
|
||||
Routes::Get(*router, base + "/image_buffer/status", Routes::bind(&DefaultApi::image_buffer_status_get_handler, this));
|
||||
Routes::Post(*router, base + "/initialize", Routes::bind(&DefaultApi::initialize_post_handler, this));
|
||||
Routes::Post(*router, base + "/pedestal", Routes::bind(&DefaultApi::pedestal_post_handler, this));
|
||||
Routes::Get(*router, base + "/plot/azim_int", Routes::bind(&DefaultApi::plot_azim_int_get_handler, this));
|
||||
@@ -72,6 +80,8 @@ void DefaultApi::setupRoutes() {
|
||||
Routes::Get(*router, base + "/plot/indexing_rate", Routes::bind(&DefaultApi::plot_indexing_rate_get_handler, this));
|
||||
Routes::Get(*router, base + "/plot/indexing_unit_cell_angle", Routes::bind(&DefaultApi::plot_indexing_unit_cell_angle_get_handler, this));
|
||||
Routes::Get(*router, base + "/plot/indexing_unit_cell", Routes::bind(&DefaultApi::plot_indexing_unit_cell_get_handler, this));
|
||||
Routes::Get(*router, base + "/plot/max_value", Routes::bind(&DefaultApi::plot_max_value_get_handler, this));
|
||||
Routes::Get(*router, base + "/plot/packets_received", Routes::bind(&DefaultApi::plot_packets_received_get_handler, this));
|
||||
Routes::Get(*router, base + "/plot/receiver_delay", Routes::bind(&DefaultApi::plot_receiver_delay_get_handler, this));
|
||||
Routes::Get(*router, base + "/plot/receiver_free_send_buffers", Routes::bind(&DefaultApi::plot_receiver_free_send_buffers_get_handler, this));
|
||||
Routes::Get(*router, base + "/plot/roi_max_count", Routes::bind(&DefaultApi::plot_roi_max_count_get_handler, this));
|
||||
@@ -84,10 +94,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));
|
||||
@@ -251,6 +257,56 @@ void DefaultApi::config_detector_put_handler(const Pistache::Rest::Request &requ
|
||||
response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
|
||||
}
|
||||
|
||||
}
|
||||
void DefaultApi::config_file_writer_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) {
|
||||
try {
|
||||
|
||||
|
||||
try {
|
||||
this->config_file_writer_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_file_writer_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) {
|
||||
try {
|
||||
|
||||
|
||||
// Getting the body param
|
||||
|
||||
File_writer_settings fileWriterSettings;
|
||||
|
||||
try {
|
||||
nlohmann::json::parse(request.body()).get_to(fileWriterSettings);
|
||||
fileWriterSettings.validate();
|
||||
} catch (std::exception &e) {
|
||||
this->handleParsingException(e, response);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
this->config_file_writer_put(fileWriterSettings, 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_image_format_conversion_post_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) {
|
||||
try {
|
||||
@@ -463,6 +519,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 {
|
||||
@@ -794,6 +900,92 @@ void DefaultApi::fpga_status_get_handler(const Pistache::Rest::Request &, Pistac
|
||||
response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
|
||||
}
|
||||
|
||||
}
|
||||
void DefaultApi::image_buffer_clear_post_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) {
|
||||
try {
|
||||
|
||||
|
||||
try {
|
||||
this->image_buffer_clear_post(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::image_buffer_image_cbor_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) {
|
||||
try {
|
||||
|
||||
|
||||
// Getting the query params
|
||||
auto imageNumberQuery = request.query().get("image_number");
|
||||
std::optional<int64_t> imageNumber;
|
||||
if(imageNumberQuery.has_value()){
|
||||
int64_t valueQuery_instance;
|
||||
if(fromStringValue(imageNumberQuery.value(), valueQuery_instance)){
|
||||
imageNumber = valueQuery_instance;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
this->image_buffer_image_cbor_get(imageNumber, 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::image_buffer_start_cbor_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) {
|
||||
try {
|
||||
|
||||
|
||||
try {
|
||||
this->image_buffer_start_cbor_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::image_buffer_status_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) {
|
||||
try {
|
||||
|
||||
|
||||
try {
|
||||
this->image_buffer_status_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::initialize_post_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) {
|
||||
try {
|
||||
@@ -1083,6 +1275,80 @@ void DefaultApi::plot_indexing_unit_cell_get_handler(const Pistache::Rest::Reque
|
||||
response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
|
||||
}
|
||||
|
||||
}
|
||||
void DefaultApi::plot_max_value_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) {
|
||||
try {
|
||||
|
||||
|
||||
// Getting the query params
|
||||
auto binningQuery = request.query().get("binning");
|
||||
std::optional<int32_t> binning;
|
||||
if(binningQuery.has_value()){
|
||||
int32_t valueQuery_instance;
|
||||
if(fromStringValue(binningQuery.value(), valueQuery_instance)){
|
||||
binning = valueQuery_instance;
|
||||
}
|
||||
}
|
||||
auto compressionQuery = request.query().get("compression");
|
||||
std::optional<bool> compression;
|
||||
if(compressionQuery.has_value()){
|
||||
bool valueQuery_instance;
|
||||
if(fromStringValue(compressionQuery.value(), valueQuery_instance)){
|
||||
compression = valueQuery_instance;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
this->plot_max_value_get(binning, compression, response);
|
||||
} catch (Pistache::Http::HttpError &e) {
|
||||
response.send(static_cast<Pistache::Http::Code>(e.code()), e.what());
|
||||
return;
|
||||
} catch (std::exception &e) {
|
||||
this->handleOperationException(e, response);
|
||||
return;
|
||||
}
|
||||
|
||||
} catch (std::exception &e) {
|
||||
response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
|
||||
}
|
||||
|
||||
}
|
||||
void DefaultApi::plot_packets_received_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) {
|
||||
try {
|
||||
|
||||
|
||||
// Getting the query params
|
||||
auto binningQuery = request.query().get("binning");
|
||||
std::optional<int32_t> binning;
|
||||
if(binningQuery.has_value()){
|
||||
int32_t valueQuery_instance;
|
||||
if(fromStringValue(binningQuery.value(), valueQuery_instance)){
|
||||
binning = valueQuery_instance;
|
||||
}
|
||||
}
|
||||
auto compressionQuery = request.query().get("compression");
|
||||
std::optional<bool> compression;
|
||||
if(compressionQuery.has_value()){
|
||||
bool valueQuery_instance;
|
||||
if(fromStringValue(compressionQuery.value(), valueQuery_instance)){
|
||||
compression = valueQuery_instance;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
this->plot_packets_received_get(binning, compression, response);
|
||||
} catch (Pistache::Http::HttpError &e) {
|
||||
response.send(static_cast<Pistache::Http::Code>(e.code()), e.what());
|
||||
return;
|
||||
} catch (std::exception &e) {
|
||||
this->handleOperationException(e, response);
|
||||
return;
|
||||
}
|
||||
|
||||
} catch (std::exception &e) {
|
||||
response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
|
||||
}
|
||||
|
||||
}
|
||||
void DefaultApi::plot_receiver_delay_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) {
|
||||
try {
|
||||
@@ -1467,106 +1733,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.31
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -37,15 +37,16 @@
|
||||
#include "Detector_settings.h"
|
||||
#include "Detector_status.h"
|
||||
#include "Error_message.h"
|
||||
#include "File_writer_settings.h"
|
||||
#include "Fpga_status_inner.h"
|
||||
#include "Image_buffer_status.h"
|
||||
#include "Image_format_settings.h"
|
||||
#include "Instrument_metadata.h"
|
||||
#include "Jfjoch_statistics.h"
|
||||
#include "Measurement_statistics.h"
|
||||
#include "Plots.h"
|
||||
#include "Preview_settings.h"
|
||||
#include "Roi_box_list.h"
|
||||
#include "Roi_circle_list.h"
|
||||
#include "Roi_definitions.h"
|
||||
#include "Spot_finding_settings.h"
|
||||
#include "Zeromq_metadata_settings.h"
|
||||
#include "Zeromq_preview_settings.h"
|
||||
@@ -71,6 +72,8 @@ private:
|
||||
void config_azim_int_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void config_detector_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void config_detector_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void config_file_writer_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void config_file_writer_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void config_image_format_conversion_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void config_image_format_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void config_image_format_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
@@ -81,6 +84,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);
|
||||
@@ -96,6 +101,10 @@ private:
|
||||
void deactivate_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void detector_status_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void fpga_status_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void image_buffer_clear_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void image_buffer_image_cbor_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void image_buffer_start_cbor_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void image_buffer_status_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void initialize_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void pedestal_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void plot_azim_int_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
@@ -105,6 +114,8 @@ private:
|
||||
void plot_indexing_rate_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void plot_indexing_unit_cell_angle_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void plot_indexing_unit_cell_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void plot_max_value_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void plot_packets_received_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void plot_receiver_delay_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void plot_receiver_free_send_buffers_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void plot_roi_max_count_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
@@ -117,10 +128,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);
|
||||
@@ -199,6 +206,21 @@ private:
|
||||
/// <param name="detectorSettings"> (optional)</param>
|
||||
virtual void config_detector_put(const org::openapitools::server::model::Detector_settings &detectorSettings, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Get file writer settings
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Can be done anytime
|
||||
/// </remarks>
|
||||
virtual void config_file_writer_get(Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Change file writer settings
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This can only be done when detector is `Idle`, `Error` or `Inactive` states.
|
||||
/// </remarks>
|
||||
/// <param name="fileWriterSettings"> (optional)</param>
|
||||
virtual void config_file_writer_put(const org::openapitools::server::model::File_writer_settings &fileWriterSettings, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Configure format for data collection with full conversion
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
@@ -271,6 +293,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>
|
||||
@@ -380,6 +417,35 @@ private:
|
||||
/// </remarks>
|
||||
virtual void fpga_status_get(Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Clear image buffer
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Turns off image buffer for the last data collection. Can be only run when Jungfraujoch is not collecting data.
|
||||
/// </remarks>
|
||||
virtual void image_buffer_clear_post(Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Get image message in CBOR format
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Contains full image data and metadata. The image must come from the latest data collection.
|
||||
/// </remarks>
|
||||
/// <param name="imageNumber">Image number. If omitted, the image with the highest number in the image buffer will be provided. (optional, default to 0L)</param>
|
||||
virtual void image_buffer_image_cbor_get(const std::optional<int64_t> &imageNumber, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Get Start message in CBOR format
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Contains metadata for a dataset (e.g., experimental geometry)
|
||||
/// </remarks>
|
||||
virtual void image_buffer_start_cbor_get(Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Get status of the image buffers
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Can be run at any stage of Jungfraujoch operation, including during data collection. The status of the image buffer is volatile during data collection - if data collection goes for more images than available buffer slots, then image might be replaced in the buffer between calling /images and /image.cbor.
|
||||
/// </remarks>
|
||||
virtual void image_buffer_status_get(Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Initialize detector and data acquisition
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
@@ -456,6 +522,24 @@ private:
|
||||
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
|
||||
virtual void plot_indexing_unit_cell_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Generate maximum pixel value plot
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Provides maximum viable pixel value (excluding overloads and error pixels); binning is configurable and maximum of a bin is returned
|
||||
/// </remarks>
|
||||
/// <param name="binning">Binning of frames for the plot (0 = default binning) (optional, default to 0)</param>
|
||||
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
|
||||
virtual void plot_max_value_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Generate plot with number of received packets per image
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Number of collected packets per image; binning is configurable
|
||||
/// </remarks>
|
||||
/// <param name="binning">Binning of frames for the plot (0 = default binning) (optional, default to 0)</param>
|
||||
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
|
||||
virtual void plot_packets_received_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Generate receiver delay plot
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
@@ -557,36 +641,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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -222,7 +222,7 @@ public:
|
||||
bool writeNxmxHdf5MasterIsSet() const;
|
||||
void unsetWrite_nxmx_hdf5_master();
|
||||
/// <summary>
|
||||
/// Forward image calibration (at the moment pedestal and pedestal RMS for JUNGFRAU) using the ZeroMQ stream to writer. If parameter is not provided calibration will be saved only if more than 4 images are recorded.
|
||||
/// Forward image calibration (at the moment pedestal and pedestal RMS for JUNGFRAU) using the ZeroMQ stream to writer. If parameter is not provided calibration will be saved only if more than 4 images are recorded.
|
||||
/// </summary>
|
||||
bool isSaveCalibration() const;
|
||||
void setSaveCalibration(bool const 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
154
broker/gen/model/File_writer_settings.cpp
Normal file
154
broker/gen/model/File_writer_settings.cpp
Normal file
@@ -0,0 +1,154 @@
|
||||
/**
|
||||
* 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.31
|
||||
* 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 "File_writer_settings.h"
|
||||
#include "Helpers.h"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
namespace org::openapitools::server::model
|
||||
{
|
||||
|
||||
File_writer_settings::File_writer_settings()
|
||||
{
|
||||
m_Overwrite = false;
|
||||
m_OverwriteIsSet = false;
|
||||
m_File_writer_version = 2L;
|
||||
m_File_writer_versionIsSet = false;
|
||||
|
||||
}
|
||||
|
||||
void File_writer_settings::validate() const
|
||||
{
|
||||
std::stringstream msg;
|
||||
if (!validate(msg))
|
||||
{
|
||||
throw org::openapitools::server::helpers::ValidationException(msg.str());
|
||||
}
|
||||
}
|
||||
|
||||
bool File_writer_settings::validate(std::stringstream& msg) const
|
||||
{
|
||||
return validate(msg, "");
|
||||
}
|
||||
|
||||
bool File_writer_settings::validate(std::stringstream& msg, const std::string& pathPrefix) const
|
||||
{
|
||||
bool success = true;
|
||||
const std::string _pathPrefix = pathPrefix.empty() ? "File_writer_settings" : pathPrefix;
|
||||
|
||||
|
||||
if (fileWriterVersionIsSet())
|
||||
{
|
||||
const int64_t& value = m_File_writer_version;
|
||||
const std::string currentValuePath = _pathPrefix + ".fileWriterVersion";
|
||||
|
||||
|
||||
if (value < 1ll)
|
||||
{
|
||||
success = false;
|
||||
msg << currentValuePath << ": must be greater than or equal to 1;";
|
||||
}
|
||||
if (value > 2ll)
|
||||
{
|
||||
success = false;
|
||||
msg << currentValuePath << ": must be less than or equal to 2;";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
bool File_writer_settings::operator==(const File_writer_settings& rhs) const
|
||||
{
|
||||
return
|
||||
|
||||
|
||||
|
||||
((!overwriteIsSet() && !rhs.overwriteIsSet()) || (overwriteIsSet() && rhs.overwriteIsSet() && isOverwrite() == rhs.isOverwrite())) &&
|
||||
|
||||
|
||||
((!fileWriterVersionIsSet() && !rhs.fileWriterVersionIsSet()) || (fileWriterVersionIsSet() && rhs.fileWriterVersionIsSet() && getFileWriterVersion() == rhs.getFileWriterVersion()))
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
bool File_writer_settings::operator!=(const File_writer_settings& rhs) const
|
||||
{
|
||||
return !(*this == rhs);
|
||||
}
|
||||
|
||||
void to_json(nlohmann::json& j, const File_writer_settings& o)
|
||||
{
|
||||
j = nlohmann::json::object();
|
||||
if(o.overwriteIsSet())
|
||||
j["overwrite"] = o.m_Overwrite;
|
||||
if(o.fileWriterVersionIsSet())
|
||||
j["file_writer_version"] = o.m_File_writer_version;
|
||||
|
||||
}
|
||||
|
||||
void from_json(const nlohmann::json& j, File_writer_settings& o)
|
||||
{
|
||||
if(j.find("overwrite") != j.end())
|
||||
{
|
||||
j.at("overwrite").get_to(o.m_Overwrite);
|
||||
o.m_OverwriteIsSet = true;
|
||||
}
|
||||
if(j.find("file_writer_version") != j.end())
|
||||
{
|
||||
j.at("file_writer_version").get_to(o.m_File_writer_version);
|
||||
o.m_File_writer_versionIsSet = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool File_writer_settings::isOverwrite() const
|
||||
{
|
||||
return m_Overwrite;
|
||||
}
|
||||
void File_writer_settings::setOverwrite(bool const value)
|
||||
{
|
||||
m_Overwrite = value;
|
||||
m_OverwriteIsSet = true;
|
||||
}
|
||||
bool File_writer_settings::overwriteIsSet() const
|
||||
{
|
||||
return m_OverwriteIsSet;
|
||||
}
|
||||
void File_writer_settings::unsetOverwrite()
|
||||
{
|
||||
m_OverwriteIsSet = false;
|
||||
}
|
||||
int64_t File_writer_settings::getFileWriterVersion() const
|
||||
{
|
||||
return m_File_writer_version;
|
||||
}
|
||||
void File_writer_settings::setFileWriterVersion(int64_t const value)
|
||||
{
|
||||
m_File_writer_version = value;
|
||||
m_File_writer_versionIsSet = true;
|
||||
}
|
||||
bool File_writer_settings::fileWriterVersionIsSet() const
|
||||
{
|
||||
return m_File_writer_versionIsSet;
|
||||
}
|
||||
void File_writer_settings::unsetFile_writer_version()
|
||||
{
|
||||
m_File_writer_versionIsSet = false;
|
||||
}
|
||||
|
||||
|
||||
} // namespace org::openapitools::server::model
|
||||
|
||||
87
broker/gen/model/File_writer_settings.h
Normal file
87
broker/gen/model/File_writer_settings.h
Normal file
@@ -0,0 +1,87 @@
|
||||
/**
|
||||
* 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.31
|
||||
* 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.
|
||||
*/
|
||||
/*
|
||||
* File_writer_settings.h
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef File_writer_settings_H_
|
||||
#define File_writer_settings_H_
|
||||
|
||||
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
namespace org::openapitools::server::model
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
class File_writer_settings
|
||||
{
|
||||
public:
|
||||
File_writer_settings();
|
||||
virtual ~File_writer_settings() = default;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Validate the current data in the model. Throws a ValidationException on failure.
|
||||
/// </summary>
|
||||
void validate() const;
|
||||
|
||||
/// <summary>
|
||||
/// Validate the current data in the model. Returns false on error and writes an error
|
||||
/// message into the given stringstream.
|
||||
/// </summary>
|
||||
bool validate(std::stringstream& msg) const;
|
||||
|
||||
/// <summary>
|
||||
/// Helper overload for validate. Used when one model stores another model and calls it's validate.
|
||||
/// Not meant to be called outside that case.
|
||||
/// </summary>
|
||||
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
|
||||
|
||||
bool operator==(const File_writer_settings& rhs) const;
|
||||
bool operator!=(const File_writer_settings& rhs) const;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// File_writer_settings members
|
||||
|
||||
/// <summary>
|
||||
/// Inform jfjoch_write to overwrite existing files. Otherwise files would be saved with .h5.{timestamp}.tmp suffix.
|
||||
/// </summary>
|
||||
bool isOverwrite() const;
|
||||
void setOverwrite(bool const value);
|
||||
bool overwriteIsSet() const;
|
||||
void unsetOverwrite();
|
||||
/// <summary>
|
||||
/// version 1 - legacy format with soft links to data files in the master file; necessary for DECTRIS Albula 4.0 and DECTRIS Neggia version 2 - newer format with virtual dataset linking data files in the master file, also includes better metadata handling
|
||||
/// </summary>
|
||||
int64_t getFileWriterVersion() const;
|
||||
void setFileWriterVersion(int64_t const value);
|
||||
bool fileWriterVersionIsSet() const;
|
||||
void unsetFile_writer_version();
|
||||
|
||||
friend void to_json(nlohmann::json& j, const File_writer_settings& o);
|
||||
friend void from_json(const nlohmann::json& j, File_writer_settings& o);
|
||||
protected:
|
||||
bool m_Overwrite;
|
||||
bool m_OverwriteIsSet;
|
||||
int64_t m_File_writer_version;
|
||||
bool m_File_writer_versionIsSet;
|
||||
|
||||
};
|
||||
|
||||
} // namespace org::openapitools::server::model
|
||||
|
||||
#endif /* File_writer_settings_H_ */
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.31
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -33,6 +33,8 @@ Fpga_status_inner::Fpga_status_inner()
|
||||
m_Packets_udp = 0L;
|
||||
m_Packets_sls = 0L;
|
||||
m_Idle = false;
|
||||
m_Pcie_link_speed = 0L;
|
||||
m_Pcie_link_width = 0L;
|
||||
|
||||
}
|
||||
|
||||
@@ -55,7 +57,7 @@ bool Fpga_status_inner::validate(std::stringstream& msg, const std::string& path
|
||||
bool success = true;
|
||||
const std::string _pathPrefix = pathPrefix.empty() ? "Fpga_status_inner" : pathPrefix;
|
||||
|
||||
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
@@ -98,6 +100,12 @@ bool Fpga_status_inner::operator==(const Fpga_status_inner& rhs) const
|
||||
&&
|
||||
|
||||
(isIdle() == rhs.isIdle())
|
||||
&&
|
||||
|
||||
(getPcieLinkSpeed() == rhs.getPcieLinkSpeed())
|
||||
&&
|
||||
|
||||
(getPcieLinkWidth() == rhs.getPcieLinkWidth())
|
||||
|
||||
|
||||
;
|
||||
@@ -123,6 +131,8 @@ void to_json(nlohmann::json& j, const Fpga_status_inner& o)
|
||||
j["packets_udp"] = o.m_Packets_udp;
|
||||
j["packets_sls"] = o.m_Packets_sls;
|
||||
j["idle"] = o.m_Idle;
|
||||
j["pcie_link_speed"] = o.m_Pcie_link_speed;
|
||||
j["pcie_link_width"] = o.m_Pcie_link_width;
|
||||
|
||||
}
|
||||
|
||||
@@ -140,6 +150,8 @@ void from_json(const nlohmann::json& j, Fpga_status_inner& o)
|
||||
j.at("packets_udp").get_to(o.m_Packets_udp);
|
||||
j.at("packets_sls").get_to(o.m_Packets_sls);
|
||||
j.at("idle").get_to(o.m_Idle);
|
||||
j.at("pcie_link_speed").get_to(o.m_Pcie_link_speed);
|
||||
j.at("pcie_link_width").get_to(o.m_Pcie_link_width);
|
||||
|
||||
}
|
||||
|
||||
@@ -239,6 +251,22 @@ void Fpga_status_inner::setIdle(bool const value)
|
||||
{
|
||||
m_Idle = value;
|
||||
}
|
||||
int64_t Fpga_status_inner::getPcieLinkSpeed() const
|
||||
{
|
||||
return m_Pcie_link_speed;
|
||||
}
|
||||
void Fpga_status_inner::setPcieLinkSpeed(int64_t const value)
|
||||
{
|
||||
m_Pcie_link_speed = value;
|
||||
}
|
||||
int64_t Fpga_status_inner::getPcieLinkWidth() const
|
||||
{
|
||||
return m_Pcie_link_width;
|
||||
}
|
||||
void Fpga_status_inner::setPcieLinkWidth(int64_t const value)
|
||||
{
|
||||
m_Pcie_link_width = 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.31
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -118,6 +118,16 @@ public:
|
||||
/// </summary>
|
||||
bool isIdle() const;
|
||||
void setIdle(bool const value);
|
||||
/// <summary>
|
||||
/// PCIe link speed measured by generation (expected value is 4 == PCIe Gen4)
|
||||
/// </summary>
|
||||
int64_t getPcieLinkSpeed() const;
|
||||
void setPcieLinkSpeed(int64_t const value);
|
||||
/// <summary>
|
||||
/// PCIe link width (expected value is 8 == x8)
|
||||
/// </summary>
|
||||
int64_t getPcieLinkWidth() const;
|
||||
void setPcieLinkWidth(int64_t const value);
|
||||
|
||||
friend void to_json(nlohmann::json& j, const Fpga_status_inner& o);
|
||||
friend void from_json(const nlohmann::json& j, Fpga_status_inner& o);
|
||||
@@ -146,6 +156,10 @@ protected:
|
||||
|
||||
bool m_Idle;
|
||||
|
||||
int64_t m_Pcie_link_speed;
|
||||
|
||||
int64_t m_Pcie_link_width;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -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.31
|
||||
* 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.31
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
139
broker/gen/model/Image_buffer_status.cpp
Normal file
139
broker/gen/model/Image_buffer_status.cpp
Normal file
@@ -0,0 +1,139 @@
|
||||
/**
|
||||
* 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.31
|
||||
* 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 "Image_buffer_status.h"
|
||||
#include "Helpers.h"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
namespace org::openapitools::server::model
|
||||
{
|
||||
|
||||
Image_buffer_status::Image_buffer_status()
|
||||
{
|
||||
m_Total_slots = 0L;
|
||||
m_Available_slots = 0L;
|
||||
|
||||
}
|
||||
|
||||
void Image_buffer_status::validate() const
|
||||
{
|
||||
std::stringstream msg;
|
||||
if (!validate(msg))
|
||||
{
|
||||
throw org::openapitools::server::helpers::ValidationException(msg.str());
|
||||
}
|
||||
}
|
||||
|
||||
bool Image_buffer_status::validate(std::stringstream& msg) const
|
||||
{
|
||||
return validate(msg, "");
|
||||
}
|
||||
|
||||
bool Image_buffer_status::validate(std::stringstream& msg, const std::string& pathPrefix) const
|
||||
{
|
||||
bool success = true;
|
||||
const std::string _pathPrefix = pathPrefix.empty() ? "Image_buffer_status" : pathPrefix;
|
||||
|
||||
|
||||
|
||||
/* Image_numbers */ {
|
||||
const std::vector<int64_t>& value = m_Image_numbers;
|
||||
const std::string currentValuePath = _pathPrefix + ".imageNumbers";
|
||||
|
||||
|
||||
{ // Recursive validation of array elements
|
||||
const std::string oldValuePath = currentValuePath;
|
||||
int i = 0;
|
||||
for (const int64_t& value : value)
|
||||
{
|
||||
const std::string currentValuePath = oldValuePath + "[" + std::to_string(i) + "]";
|
||||
|
||||
|
||||
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
bool Image_buffer_status::operator==(const Image_buffer_status& rhs) const
|
||||
{
|
||||
return
|
||||
|
||||
|
||||
(getImageNumbers() == rhs.getImageNumbers())
|
||||
&&
|
||||
|
||||
(getTotalSlots() == rhs.getTotalSlots())
|
||||
&&
|
||||
|
||||
(getAvailableSlots() == rhs.getAvailableSlots())
|
||||
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
bool Image_buffer_status::operator!=(const Image_buffer_status& rhs) const
|
||||
{
|
||||
return !(*this == rhs);
|
||||
}
|
||||
|
||||
void to_json(nlohmann::json& j, const Image_buffer_status& o)
|
||||
{
|
||||
j = nlohmann::json::object();
|
||||
j["image_numbers"] = o.m_Image_numbers;
|
||||
j["total_slots"] = o.m_Total_slots;
|
||||
j["available_slots"] = o.m_Available_slots;
|
||||
|
||||
}
|
||||
|
||||
void from_json(const nlohmann::json& j, Image_buffer_status& o)
|
||||
{
|
||||
j.at("image_numbers").get_to(o.m_Image_numbers);
|
||||
j.at("total_slots").get_to(o.m_Total_slots);
|
||||
j.at("available_slots").get_to(o.m_Available_slots);
|
||||
|
||||
}
|
||||
|
||||
std::vector<int64_t> Image_buffer_status::getImageNumbers() const
|
||||
{
|
||||
return m_Image_numbers;
|
||||
}
|
||||
void Image_buffer_status::setImageNumbers(std::vector<int64_t> const value)
|
||||
{
|
||||
m_Image_numbers = value;
|
||||
}
|
||||
int64_t Image_buffer_status::getTotalSlots() const
|
||||
{
|
||||
return m_Total_slots;
|
||||
}
|
||||
void Image_buffer_status::setTotalSlots(int64_t const value)
|
||||
{
|
||||
m_Total_slots = value;
|
||||
}
|
||||
int64_t Image_buffer_status::getAvailableSlots() const
|
||||
{
|
||||
return m_Available_slots;
|
||||
}
|
||||
void Image_buffer_status::setAvailableSlots(int64_t const value)
|
||||
{
|
||||
m_Available_slots = value;
|
||||
}
|
||||
|
||||
|
||||
} // namespace org::openapitools::server::model
|
||||
|
||||
91
broker/gen/model/Image_buffer_status.h
Normal file
91
broker/gen/model/Image_buffer_status.h
Normal file
@@ -0,0 +1,91 @@
|
||||
/**
|
||||
* 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.31
|
||||
* 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.
|
||||
*/
|
||||
/*
|
||||
* Image_buffer_status.h
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef Image_buffer_status_H_
|
||||
#define Image_buffer_status_H_
|
||||
|
||||
|
||||
#include <vector>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
namespace org::openapitools::server::model
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
class Image_buffer_status
|
||||
{
|
||||
public:
|
||||
Image_buffer_status();
|
||||
virtual ~Image_buffer_status() = 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 Image_buffer_status& rhs) const;
|
||||
bool operator!=(const Image_buffer_status& rhs) const;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// Image_buffer_status members
|
||||
|
||||
/// <summary>
|
||||
/// Image numbers currently present in the buffer.
|
||||
/// </summary>
|
||||
std::vector<int64_t> getImageNumbers() const;
|
||||
void setImageNumbers(std::vector<int64_t> const value);
|
||||
/// <summary>
|
||||
/// Number of slots in the image buffer. This number, compared to number of images in data collection and frame rate will determine \"retention\" rate of the image buffer.
|
||||
/// </summary>
|
||||
int64_t getTotalSlots() const;
|
||||
void setTotalSlots(int64_t const value);
|
||||
/// <summary>
|
||||
/// Slots available for the data collection
|
||||
/// </summary>
|
||||
int64_t getAvailableSlots() const;
|
||||
void setAvailableSlots(int64_t const value);
|
||||
|
||||
friend void to_json(nlohmann::json& j, const Image_buffer_status& o);
|
||||
friend void from_json(const nlohmann::json& j, Image_buffer_status& o);
|
||||
protected:
|
||||
std::vector<int64_t> m_Image_numbers;
|
||||
|
||||
int64_t m_Total_slots;
|
||||
|
||||
int64_t m_Available_slots;
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace org::openapitools::server::model
|
||||
|
||||
#endif /* Image_buffer_status_H_ */
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.26
|
||||
* The version of the OpenAPI document: 1.0.0-rc.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -24,6 +24,7 @@ Jfjoch_settings::Jfjoch_settings()
|
||||
m_PcieIsSet = false;
|
||||
m_ZeromqIsSet = false;
|
||||
m_InstrumentIsSet = false;
|
||||
m_File_writerIsSet = false;
|
||||
m_Detector_settingsIsSet = false;
|
||||
m_Azim_intIsSet = false;
|
||||
m_Image_formatIsSet = false;
|
||||
@@ -79,7 +80,7 @@ bool Jfjoch_settings::validate(std::stringstream& msg, const std::string& pathPr
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Detector */ {
|
||||
const std::vector<org::openapitools::server::model::Detector>& value = m_Detector;
|
||||
@@ -151,6 +152,9 @@ bool Jfjoch_settings::operator==(const Jfjoch_settings& rhs) const
|
||||
|
||||
((!instrumentIsSet() && !rhs.instrumentIsSet()) || (instrumentIsSet() && rhs.instrumentIsSet() && getInstrument() == rhs.getInstrument())) &&
|
||||
|
||||
|
||||
((!fileWriterIsSet() && !rhs.fileWriterIsSet()) || (fileWriterIsSet() && rhs.fileWriterIsSet() && getFileWriter() == rhs.getFileWriter())) &&
|
||||
|
||||
(getDetector() == rhs.getDetector())
|
||||
&&
|
||||
|
||||
@@ -201,6 +205,8 @@ void to_json(nlohmann::json& j, const Jfjoch_settings& o)
|
||||
j["zeromq"] = o.m_Zeromq;
|
||||
if(o.instrumentIsSet())
|
||||
j["instrument"] = o.m_Instrument;
|
||||
if(o.fileWriterIsSet())
|
||||
j["file_writer"] = o.m_File_writer;
|
||||
j["detector"] = o.m_Detector;
|
||||
if(o.detectorSettingsIsSet())
|
||||
j["detector_settings"] = o.m_Detector_settings;
|
||||
@@ -240,6 +246,11 @@ void from_json(const nlohmann::json& j, Jfjoch_settings& o)
|
||||
j.at("instrument").get_to(o.m_Instrument);
|
||||
o.m_InstrumentIsSet = true;
|
||||
}
|
||||
if(j.find("file_writer") != j.end())
|
||||
{
|
||||
j.at("file_writer").get_to(o.m_File_writer);
|
||||
o.m_File_writerIsSet = true;
|
||||
}
|
||||
j.at("detector").get_to(o.m_Detector);
|
||||
if(j.find("detector_settings") != j.end())
|
||||
{
|
||||
@@ -337,6 +348,23 @@ void Jfjoch_settings::unsetInstrument()
|
||||
{
|
||||
m_InstrumentIsSet = false;
|
||||
}
|
||||
org::openapitools::server::model::File_writer_settings Jfjoch_settings::getFileWriter() const
|
||||
{
|
||||
return m_File_writer;
|
||||
}
|
||||
void Jfjoch_settings::setFileWriter(org::openapitools::server::model::File_writer_settings const& value)
|
||||
{
|
||||
m_File_writer = value;
|
||||
m_File_writerIsSet = true;
|
||||
}
|
||||
bool Jfjoch_settings::fileWriterIsSet() const
|
||||
{
|
||||
return m_File_writerIsSet;
|
||||
}
|
||||
void Jfjoch_settings::unsetFile_writer()
|
||||
{
|
||||
m_File_writerIsSet = false;
|
||||
}
|
||||
std::vector<org::openapitools::server::model::Detector> Jfjoch_settings::getDetector() const
|
||||
{
|
||||
return m_Detector;
|
||||
|
||||
@@ -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.31
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -19,18 +19,19 @@
|
||||
#define Jfjoch_settings_H_
|
||||
|
||||
|
||||
#include "Detector.h"
|
||||
#include "Zeromq_preview_settings.h"
|
||||
#include "Image_pusher_type.h"
|
||||
#include "Pcie_devices_inner.h"
|
||||
#include <string>
|
||||
#include "Zeromq_settings.h"
|
||||
#include "File_writer_settings.h"
|
||||
#include "Azim_int_settings.h"
|
||||
#include "Image_format_settings.h"
|
||||
#include "Zeromq_metadata_settings.h"
|
||||
#include "Detector_settings.h"
|
||||
#include "Instrument_metadata.h"
|
||||
#include <vector>
|
||||
#include "Detector.h"
|
||||
#include "Image_pusher_type.h"
|
||||
#include "Zeromq_settings.h"
|
||||
#include "Instrument_metadata.h"
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
namespace org::openapitools::server::model
|
||||
@@ -93,6 +94,13 @@ public:
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
org::openapitools::server::model::File_writer_settings getFileWriter() const;
|
||||
void setFileWriter(org::openapitools::server::model::File_writer_settings const& value);
|
||||
bool fileWriterIsSet() const;
|
||||
void unsetFile_writer();
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
std::vector<org::openapitools::server::model::Detector> getDetector() const;
|
||||
void setDetector(std::vector<org::openapitools::server::model::Detector> const& value);
|
||||
/// <summary>
|
||||
@@ -171,6 +179,8 @@ protected:
|
||||
bool m_ZeromqIsSet;
|
||||
org::openapitools::server::model::Instrument_metadata m_Instrument;
|
||||
bool m_InstrumentIsSet;
|
||||
org::openapitools::server::model::File_writer_settings m_File_writer;
|
||||
bool m_File_writerIsSet;
|
||||
std::vector<org::openapitools::server::model::Detector> m_Detector;
|
||||
|
||||
org::openapitools::server::model::Detector_settings m_Detector_settings;
|
||||
|
||||
@@ -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.31
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -26,6 +26,7 @@ Jfjoch_statistics::Jfjoch_statistics()
|
||||
m_Detector_settingsIsSet = false;
|
||||
m_Image_format_settingsIsSet = false;
|
||||
m_Instrument_metadataIsSet = false;
|
||||
m_File_writer_settingsIsSet = false;
|
||||
m_Data_processing_settingsIsSet = false;
|
||||
m_MeasurementIsSet = false;
|
||||
m_BrokerIsSet = false;
|
||||
@@ -34,6 +35,7 @@ Jfjoch_statistics::Jfjoch_statistics()
|
||||
m_Zeromq_previewIsSet = false;
|
||||
m_Zeromq_metadataIsSet = false;
|
||||
m_Pixel_maskIsSet = false;
|
||||
m_RoiIsSet = false;
|
||||
|
||||
}
|
||||
|
||||
@@ -56,7 +58,7 @@ bool Jfjoch_statistics::validate(std::stringstream& msg, const std::string& path
|
||||
bool success = true;
|
||||
const std::string _pathPrefix = pathPrefix.empty() ? "Jfjoch_statistics" : pathPrefix;
|
||||
|
||||
|
||||
|
||||
if (fpgaIsSet())
|
||||
{
|
||||
const std::vector<org::openapitools::server::model::Fpga_status_inner>& value = m_Fpga;
|
||||
@@ -98,7 +100,7 @@ bool Jfjoch_statistics::validate(std::stringstream& msg, const std::string& path
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
@@ -123,6 +125,9 @@ bool Jfjoch_statistics::operator==(const Jfjoch_statistics& rhs) const
|
||||
((!instrumentMetadataIsSet() && !rhs.instrumentMetadataIsSet()) || (instrumentMetadataIsSet() && rhs.instrumentMetadataIsSet() && getInstrumentMetadata() == rhs.getInstrumentMetadata())) &&
|
||||
|
||||
|
||||
((!fileWriterSettingsIsSet() && !rhs.fileWriterSettingsIsSet()) || (fileWriterSettingsIsSet() && rhs.fileWriterSettingsIsSet() && getFileWriterSettings() == rhs.getFileWriterSettings())) &&
|
||||
|
||||
|
||||
((!dataProcessingSettingsIsSet() && !rhs.dataProcessingSettingsIsSet()) || (dataProcessingSettingsIsSet() && rhs.dataProcessingSettingsIsSet() && getDataProcessingSettings() == rhs.getDataProcessingSettings())) &&
|
||||
|
||||
|
||||
@@ -144,7 +149,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()))
|
||||
|
||||
;
|
||||
}
|
||||
@@ -167,6 +175,8 @@ void to_json(nlohmann::json& j, const Jfjoch_statistics& o)
|
||||
j["image_format_settings"] = o.m_Image_format_settings;
|
||||
if(o.instrumentMetadataIsSet())
|
||||
j["instrument_metadata"] = o.m_Instrument_metadata;
|
||||
if(o.fileWriterSettingsIsSet())
|
||||
j["file_writer_settings"] = o.m_File_writer_settings;
|
||||
if(o.dataProcessingSettingsIsSet())
|
||||
j["data_processing_settings"] = o.m_Data_processing_settings;
|
||||
if(o.measurementIsSet())
|
||||
@@ -183,6 +193,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;
|
||||
|
||||
}
|
||||
|
||||
@@ -213,6 +225,11 @@ void from_json(const nlohmann::json& j, Jfjoch_statistics& o)
|
||||
j.at("instrument_metadata").get_to(o.m_Instrument_metadata);
|
||||
o.m_Instrument_metadataIsSet = true;
|
||||
}
|
||||
if(j.find("file_writer_settings") != j.end())
|
||||
{
|
||||
j.at("file_writer_settings").get_to(o.m_File_writer_settings);
|
||||
o.m_File_writer_settingsIsSet = true;
|
||||
}
|
||||
if(j.find("data_processing_settings") != j.end())
|
||||
{
|
||||
j.at("data_processing_settings").get_to(o.m_Data_processing_settings);
|
||||
@@ -253,6 +270,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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -341,6 +363,23 @@ void Jfjoch_statistics::unsetInstrument_metadata()
|
||||
{
|
||||
m_Instrument_metadataIsSet = false;
|
||||
}
|
||||
org::openapitools::server::model::File_writer_settings Jfjoch_statistics::getFileWriterSettings() const
|
||||
{
|
||||
return m_File_writer_settings;
|
||||
}
|
||||
void Jfjoch_statistics::setFileWriterSettings(org::openapitools::server::model::File_writer_settings const& value)
|
||||
{
|
||||
m_File_writer_settings = value;
|
||||
m_File_writer_settingsIsSet = true;
|
||||
}
|
||||
bool Jfjoch_statistics::fileWriterSettingsIsSet() const
|
||||
{
|
||||
return m_File_writer_settingsIsSet;
|
||||
}
|
||||
void Jfjoch_statistics::unsetFile_writer_settings()
|
||||
{
|
||||
m_File_writer_settingsIsSet = false;
|
||||
}
|
||||
org::openapitools::server::model::Spot_finding_settings Jfjoch_statistics::getDataProcessingSettings() const
|
||||
{
|
||||
return m_Data_processing_settings;
|
||||
@@ -477,6 +516,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.31
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -26,11 +26,13 @@
|
||||
#include "Spot_finding_settings.h"
|
||||
#include "Zeromq_preview_settings.h"
|
||||
#include "Detector_list.h"
|
||||
#include "File_writer_settings.h"
|
||||
#include "Image_format_settings.h"
|
||||
#include "Zeromq_metadata_settings.h"
|
||||
#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>
|
||||
@@ -109,6 +111,13 @@ public:
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
org::openapitools::server::model::File_writer_settings getFileWriterSettings() const;
|
||||
void setFileWriterSettings(org::openapitools::server::model::File_writer_settings const& value);
|
||||
bool fileWriterSettingsIsSet() const;
|
||||
void unsetFile_writer_settings();
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
org::openapitools::server::model::Spot_finding_settings getDataProcessingSettings() const;
|
||||
void setDataProcessingSettings(org::openapitools::server::model::Spot_finding_settings const& value);
|
||||
bool dataProcessingSettingsIsSet() const;
|
||||
@@ -162,6 +171,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);
|
||||
@@ -176,6 +192,8 @@ protected:
|
||||
bool m_Image_format_settingsIsSet;
|
||||
org::openapitools::server::model::Instrument_metadata m_Instrument_metadata;
|
||||
bool m_Instrument_metadataIsSet;
|
||||
org::openapitools::server::model::File_writer_settings m_File_writer_settings;
|
||||
bool m_File_writer_settingsIsSet;
|
||||
org::openapitools::server::model::Spot_finding_settings m_Data_processing_settings;
|
||||
bool m_Data_processing_settingsIsSet;
|
||||
org::openapitools::server::model::Measurement_statistics m_Measurement;
|
||||
@@ -192,6 +210,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.31
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -57,6 +57,14 @@ Measurement_statistics::Measurement_statistics()
|
||||
m_Bkg_estimateIsSet = false;
|
||||
m_Unit_cell = "";
|
||||
m_Unit_cellIsSet = false;
|
||||
m_Error_pixels = 0.0f;
|
||||
m_Error_pixelsIsSet = false;
|
||||
m_Saturated_pixels = 0.0f;
|
||||
m_Saturated_pixelsIsSet = false;
|
||||
m_Roi_beam_pixels = 0.0f;
|
||||
m_Roi_beam_pixelsIsSet = false;
|
||||
m_Roi_beam_sum = 0.0f;
|
||||
m_Roi_beam_sumIsSet = false;
|
||||
|
||||
}
|
||||
|
||||
@@ -112,7 +120,7 @@ bool Measurement_statistics::validate(std::stringstream& msg, const std::string&
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
@@ -173,7 +181,19 @@ bool Measurement_statistics::operator==(const Measurement_statistics& rhs) const
|
||||
((!bkgEstimateIsSet() && !rhs.bkgEstimateIsSet()) || (bkgEstimateIsSet() && rhs.bkgEstimateIsSet() && getBkgEstimate() == rhs.getBkgEstimate())) &&
|
||||
|
||||
|
||||
((!unitCellIsSet() && !rhs.unitCellIsSet()) || (unitCellIsSet() && rhs.unitCellIsSet() && getUnitCell() == rhs.getUnitCell()))
|
||||
((!unitCellIsSet() && !rhs.unitCellIsSet()) || (unitCellIsSet() && rhs.unitCellIsSet() && getUnitCell() == rhs.getUnitCell())) &&
|
||||
|
||||
|
||||
((!errorPixelsIsSet() && !rhs.errorPixelsIsSet()) || (errorPixelsIsSet() && rhs.errorPixelsIsSet() && getErrorPixels() == rhs.getErrorPixels())) &&
|
||||
|
||||
|
||||
((!saturatedPixelsIsSet() && !rhs.saturatedPixelsIsSet()) || (saturatedPixelsIsSet() && rhs.saturatedPixelsIsSet() && getSaturatedPixels() == rhs.getSaturatedPixels())) &&
|
||||
|
||||
|
||||
((!roiBeamPixelsIsSet() && !rhs.roiBeamPixelsIsSet()) || (roiBeamPixelsIsSet() && rhs.roiBeamPixelsIsSet() && getRoiBeamPixels() == rhs.getRoiBeamPixels())) &&
|
||||
|
||||
|
||||
((!roiBeamSumIsSet() && !rhs.roiBeamSumIsSet()) || (roiBeamSumIsSet() && rhs.roiBeamSumIsSet() && getRoiBeamSum() == rhs.getRoiBeamSum()))
|
||||
|
||||
;
|
||||
}
|
||||
@@ -222,6 +242,14 @@ void to_json(nlohmann::json& j, const Measurement_statistics& o)
|
||||
j["bkg_estimate"] = o.m_Bkg_estimate;
|
||||
if(o.unitCellIsSet())
|
||||
j["unit_cell"] = o.m_Unit_cell;
|
||||
if(o.errorPixelsIsSet())
|
||||
j["error_pixels"] = o.m_Error_pixels;
|
||||
if(o.saturatedPixelsIsSet())
|
||||
j["saturated_pixels"] = o.m_Saturated_pixels;
|
||||
if(o.roiBeamPixelsIsSet())
|
||||
j["roi_beam_pixels"] = o.m_Roi_beam_pixels;
|
||||
if(o.roiBeamSumIsSet())
|
||||
j["roi_beam_sum"] = o.m_Roi_beam_sum;
|
||||
|
||||
}
|
||||
|
||||
@@ -317,6 +345,26 @@ void from_json(const nlohmann::json& j, Measurement_statistics& o)
|
||||
j.at("unit_cell").get_to(o.m_Unit_cell);
|
||||
o.m_Unit_cellIsSet = true;
|
||||
}
|
||||
if(j.find("error_pixels") != j.end())
|
||||
{
|
||||
j.at("error_pixels").get_to(o.m_Error_pixels);
|
||||
o.m_Error_pixelsIsSet = true;
|
||||
}
|
||||
if(j.find("saturated_pixels") != j.end())
|
||||
{
|
||||
j.at("saturated_pixels").get_to(o.m_Saturated_pixels);
|
||||
o.m_Saturated_pixelsIsSet = true;
|
||||
}
|
||||
if(j.find("roi_beam_pixels") != j.end())
|
||||
{
|
||||
j.at("roi_beam_pixels").get_to(o.m_Roi_beam_pixels);
|
||||
o.m_Roi_beam_pixelsIsSet = true;
|
||||
}
|
||||
if(j.find("roi_beam_sum") != j.end())
|
||||
{
|
||||
j.at("roi_beam_sum").get_to(o.m_Roi_beam_sum);
|
||||
o.m_Roi_beam_sumIsSet = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -626,6 +674,74 @@ void Measurement_statistics::unsetUnit_cell()
|
||||
{
|
||||
m_Unit_cellIsSet = false;
|
||||
}
|
||||
float Measurement_statistics::getErrorPixels() const
|
||||
{
|
||||
return m_Error_pixels;
|
||||
}
|
||||
void Measurement_statistics::setErrorPixels(float const value)
|
||||
{
|
||||
m_Error_pixels = value;
|
||||
m_Error_pixelsIsSet = true;
|
||||
}
|
||||
bool Measurement_statistics::errorPixelsIsSet() const
|
||||
{
|
||||
return m_Error_pixelsIsSet;
|
||||
}
|
||||
void Measurement_statistics::unsetError_pixels()
|
||||
{
|
||||
m_Error_pixelsIsSet = false;
|
||||
}
|
||||
float Measurement_statistics::getSaturatedPixels() const
|
||||
{
|
||||
return m_Saturated_pixels;
|
||||
}
|
||||
void Measurement_statistics::setSaturatedPixels(float const value)
|
||||
{
|
||||
m_Saturated_pixels = value;
|
||||
m_Saturated_pixelsIsSet = true;
|
||||
}
|
||||
bool Measurement_statistics::saturatedPixelsIsSet() const
|
||||
{
|
||||
return m_Saturated_pixelsIsSet;
|
||||
}
|
||||
void Measurement_statistics::unsetSaturated_pixels()
|
||||
{
|
||||
m_Saturated_pixelsIsSet = false;
|
||||
}
|
||||
float Measurement_statistics::getRoiBeamPixels() const
|
||||
{
|
||||
return m_Roi_beam_pixels;
|
||||
}
|
||||
void Measurement_statistics::setRoiBeamPixels(float const value)
|
||||
{
|
||||
m_Roi_beam_pixels = value;
|
||||
m_Roi_beam_pixelsIsSet = true;
|
||||
}
|
||||
bool Measurement_statistics::roiBeamPixelsIsSet() const
|
||||
{
|
||||
return m_Roi_beam_pixelsIsSet;
|
||||
}
|
||||
void Measurement_statistics::unsetRoi_beam_pixels()
|
||||
{
|
||||
m_Roi_beam_pixelsIsSet = false;
|
||||
}
|
||||
float Measurement_statistics::getRoiBeamSum() const
|
||||
{
|
||||
return m_Roi_beam_sum;
|
||||
}
|
||||
void Measurement_statistics::setRoiBeamSum(float const value)
|
||||
{
|
||||
m_Roi_beam_sum = value;
|
||||
m_Roi_beam_sumIsSet = true;
|
||||
}
|
||||
bool Measurement_statistics::roiBeamSumIsSet() const
|
||||
{
|
||||
return m_Roi_beam_sumIsSet;
|
||||
}
|
||||
void Measurement_statistics::unsetRoi_beam_sum()
|
||||
{
|
||||
m_Roi_beam_sumIsSet = 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.31
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -184,6 +184,34 @@ public:
|
||||
void setUnitCell(std::string const& value);
|
||||
bool unitCellIsSet() const;
|
||||
void unsetUnit_cell();
|
||||
/// <summary>
|
||||
/// Moving average of 1000 images counting number of error pixels on the detector
|
||||
/// </summary>
|
||||
float getErrorPixels() const;
|
||||
void setErrorPixels(float const value);
|
||||
bool errorPixelsIsSet() const;
|
||||
void unsetError_pixels();
|
||||
/// <summary>
|
||||
/// Moving average of 1000 images counting number of saturated pixels on the detector
|
||||
/// </summary>
|
||||
float getSaturatedPixels() const;
|
||||
void setSaturatedPixels(float const value);
|
||||
bool saturatedPixelsIsSet() const;
|
||||
void unsetSaturated_pixels();
|
||||
/// <summary>
|
||||
/// If there is an ROI defined with name \"beam\", this number will hold moving average of 1000 images for number of valid pixels within this ROI
|
||||
/// </summary>
|
||||
float getRoiBeamPixels() const;
|
||||
void setRoiBeamPixels(float const value);
|
||||
bool roiBeamPixelsIsSet() const;
|
||||
void unsetRoi_beam_pixels();
|
||||
/// <summary>
|
||||
/// If there is an ROI defined with name \"beam\", this number will hold moving average of 1000 images for sum of valid pixels within this ROI
|
||||
/// </summary>
|
||||
float getRoiBeamSum() const;
|
||||
void setRoiBeamSum(float const value);
|
||||
bool roiBeamSumIsSet() const;
|
||||
void unsetRoi_beam_sum();
|
||||
|
||||
friend void to_json(nlohmann::json& j, const Measurement_statistics& o);
|
||||
friend void from_json(const nlohmann::json& j, Measurement_statistics& o);
|
||||
@@ -224,6 +252,14 @@ protected:
|
||||
bool m_Bkg_estimateIsSet;
|
||||
std::string m_Unit_cell;
|
||||
bool m_Unit_cellIsSet;
|
||||
float m_Error_pixels;
|
||||
bool m_Error_pixelsIsSet;
|
||||
float m_Saturated_pixels;
|
||||
bool m_Saturated_pixelsIsSet;
|
||||
float m_Roi_beam_pixels;
|
||||
bool m_Roi_beam_pixelsIsSet;
|
||||
float m_Roi_beam_sum;
|
||||
bool m_Roi_beam_sumIsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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.31
|
||||
* 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