Compare commits
2 Commits
1.0.0-rc.2
...
1.0.0-rc.2
| Author | SHA1 | Date | |
|---|---|---|---|
| 483c12ca86 | |||
| 7564619574 |
@@ -79,7 +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:
|
||||
throw WrongDAQStateException(status.error.value_or("Unknown error"));
|
||||
throw WrongDAQStateException(status.message.value_or("Unknown error"));
|
||||
case JFJochState::Measuring:
|
||||
case JFJochState::Busy:
|
||||
case JFJochState::Pedestal:
|
||||
@@ -291,23 +291,14 @@ void JFJochBrokerHttp::config_internal_generator_image_tiff_put(const Pistache::
|
||||
response.send(Pistache::Http::Code::Ok);
|
||||
}
|
||||
|
||||
void JFJochBrokerHttp::roi_box_get(Pistache::Http::ResponseWriter &response) {
|
||||
ProcessOutput(Convert(state_machine.GetBoxROI()), response);
|
||||
void JFJochBrokerHttp::config_roi_get(Pistache::Http::ResponseWriter &response) {
|
||||
ProcessOutput(Convert(state_machine.GetROIDefintion()), response);
|
||||
}
|
||||
|
||||
void JFJochBrokerHttp::roi_box_put(const org::openapitools::server::model::Roi_box_list &roiBoxList,
|
||||
Pistache::Http::ResponseWriter &response) {
|
||||
state_machine.SetBoxROI(Convert(roiBoxList));
|
||||
response.send(Pistache::Http::Code::Ok);
|
||||
}
|
||||
void JFJochBrokerHttp::config_roi_put(const org::openapitools::server::model::Roi_definitions &roiDefinitions,
|
||||
|
||||
void JFJochBrokerHttp::roi_circle_get(Pistache::Http::ResponseWriter &response) {
|
||||
ProcessOutput(Convert(state_machine.GetCircleROI()), response);
|
||||
}
|
||||
|
||||
void JFJochBrokerHttp::roi_circle_put(const org::openapitools::server::model::Roi_circle_list &roiCircleList,
|
||||
Pistache::Http::ResponseWriter &response) {
|
||||
state_machine.SetCircleROI(Convert(roiCircleList));
|
||||
Pistache::Http::ResponseWriter &response) {
|
||||
state_machine.SetROIDefinition(Convert(roiDefinitions));
|
||||
response.send(Pistache::Http::Code::Ok);
|
||||
}
|
||||
|
||||
@@ -548,6 +539,7 @@ void JFJochBrokerHttp::statistics_get(const std::optional<bool> &compression, Pi
|
||||
statistics.setInstrumentMetadata(Convert(state_machine.GetInstrumentMetadata()));
|
||||
statistics.setImageFormatSettings(Convert(state_machine.GetImageFormatSettings()));
|
||||
statistics.setPixelMask(Convert(state_machine.GetPixelMaskStatistics()));
|
||||
statistics.setRoi(Convert(state_machine.GetROIDefintion()));
|
||||
|
||||
auto zeromq_prev = state_machine.GetPreviewSocketSettings();
|
||||
if (!zeromq_prev.address.empty())
|
||||
|
||||
@@ -111,12 +111,9 @@ class JFJochBrokerHttp : public org::openapitools::server::api::DefaultApi {
|
||||
Pistache::Http::ResponseWriter &response) override;
|
||||
void preview_image_tiff_get(Pistache::Http::ResponseWriter &response) override;
|
||||
|
||||
void roi_box_get(Pistache::Http::ResponseWriter &response) override;
|
||||
void roi_box_put(const org::openapitools::server::model::Roi_box_list &roiBoxList,
|
||||
Pistache::Http::ResponseWriter &response) override;
|
||||
void roi_circle_get(Pistache::Http::ResponseWriter &response) override;
|
||||
void roi_circle_put(const org::openapitools::server::model::Roi_circle_list &roiCircleList,
|
||||
Pistache::Http::ResponseWriter &response) override;
|
||||
void config_roi_get(Pistache::Http::ResponseWriter &response) override;
|
||||
void config_roi_put(const org::openapitools::server::model::Roi_definitions &roiDefinitions,
|
||||
Pistache::Http::ResponseWriter &response) override;
|
||||
|
||||
void config_internal_generator_image_put(const Pistache::Rest::Request &request,
|
||||
Pistache::Http::ResponseWriter &response) override;
|
||||
|
||||
@@ -93,6 +93,9 @@ DetectorSetup ParseDetectorSetup(const org::openapitools::server::model::Detecto
|
||||
.SerialNumber(d.getSerialNumber())
|
||||
.ModuleSync(d.isModuleSync());
|
||||
|
||||
if (d.readoutTimeUsIsSet())
|
||||
setup.ReadOutTime(std::chrono::microseconds(d.getReadoutTimeUs()));
|
||||
|
||||
if (d.baseDataIpv4AddressIsSet())
|
||||
setup.BaseIPv4Addr(d.getBaseDataIpv4Address());
|
||||
if (d.txDelayIsSet())
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
#include "JFJochStateMachine.h"
|
||||
#include "../preview/JFJochTIFF.h"
|
||||
#include "pistache/net.h"
|
||||
|
||||
JFJochStateMachine::JFJochStateMachine(JFJochServices &in_services, Logger &in_logger)
|
||||
: logger(in_logger),
|
||||
@@ -12,7 +13,7 @@ JFJochStateMachine::JFJochStateMachine(JFJochServices &in_services, Logger &in_l
|
||||
pixel_mask(experiment),
|
||||
current_detector_setup(0),
|
||||
data_processing_settings(DiffractionExperiment::DefaultDataProcessingSettings()),
|
||||
pixel_mask_statistics({0,0,0}) {
|
||||
pixel_mask_statistics({0, 0, 0}) {
|
||||
SupressTIFFErrors();
|
||||
}
|
||||
|
||||
@@ -77,12 +78,15 @@ void JFJochStateMachine::TakePedestalInternalAll(std::unique_lock<std::mutex> &u
|
||||
TakePedestalInternalG2(ul, i);
|
||||
}
|
||||
}
|
||||
SetState(JFJochState::Idle,
|
||||
"Pedestal sequence done",
|
||||
BrokerStatus::MessageSeverity::Success);
|
||||
services.ConfigureDetector(experiment);
|
||||
pixel_mask.LoadDetectorBadPixelMask(experiment, calibration.get());
|
||||
UpdatePixelMaskStatistics(pixel_mask.GetStatistics());
|
||||
} catch (const std::exception &e) {
|
||||
logger.Error("Pedestal sequence error {}", e.what());
|
||||
SetState(JFJochState::Error, e.what());
|
||||
SetState(JFJochState::Error, e.what(), BrokerStatus::MessageSeverity::Error);
|
||||
throw;
|
||||
}
|
||||
logger.Info("Pedestal sequence done");
|
||||
@@ -91,10 +95,14 @@ void JFJochStateMachine::TakePedestalInternalAll(std::unique_lock<std::mutex> &u
|
||||
|
||||
void JFJochStateMachine::TakePedestalInternalG0(std::unique_lock<std::mutex> &ul) {
|
||||
DiffractionExperiment local_experiment(experiment);
|
||||
if (local_experiment.IsFixedGainG1())
|
||||
std::string message;
|
||||
if (local_experiment.IsFixedGainG1()) {
|
||||
local_experiment.Mode(DetectorMode::PedestalG1);
|
||||
else
|
||||
message = "Pedestal G1";
|
||||
} else {
|
||||
local_experiment.Mode(DetectorMode::PedestalG0);
|
||||
message = "Pedestal G0";
|
||||
}
|
||||
|
||||
if (local_experiment.GetStorageCellNumber() == 1)
|
||||
local_experiment.StorageCellStart(15);
|
||||
@@ -102,15 +110,16 @@ void JFJochStateMachine::TakePedestalInternalG0(std::unique_lock<std::mutex> &ul
|
||||
local_experiment.StorageCellStart(0);
|
||||
|
||||
if (cancel_sequence) {
|
||||
SetState(JFJochState::Inactive);
|
||||
return;
|
||||
}
|
||||
if (local_experiment.GetPedestalG0Frames() == 0) {
|
||||
SetState(JFJochState::Idle);
|
||||
SetState(JFJochState::Inactive,
|
||||
"Pedestal sequence cancelled",
|
||||
BrokerStatus::MessageSeverity::Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
SetState(JFJochState::Pedestal);
|
||||
if (local_experiment.GetPedestalG0Frames() == 0)
|
||||
return;
|
||||
|
||||
SetState(JFJochState::Pedestal, message, BrokerStatus::MessageSeverity::Info);
|
||||
services.ConfigureDetector(local_experiment);
|
||||
services.Start(local_experiment, pixel_mask, *calibration);
|
||||
|
||||
@@ -125,7 +134,9 @@ void JFJochStateMachine::TakePedestalInternalG0(std::unique_lock<std::mutex> &ul
|
||||
if (ImportPedestalG0(pedestal_output.receiver_output))
|
||||
SetState(JFJochState::Idle);
|
||||
else
|
||||
SetState(JFJochState::Inactive);
|
||||
SetState(JFJochState::Error,
|
||||
"Pedestal not collected properly",
|
||||
BrokerStatus::MessageSeverity::Error);
|
||||
}
|
||||
|
||||
void JFJochStateMachine::TakePedestalInternalG1(std::unique_lock<std::mutex> &ul, int32_t storage_cell) {
|
||||
@@ -139,16 +150,19 @@ void JFJochStateMachine::TakePedestalInternalG1(std::unique_lock<std::mutex> &ul
|
||||
|
||||
|
||||
if (cancel_sequence) {
|
||||
SetState(JFJochState::Inactive);
|
||||
SetState(JFJochState::Inactive,
|
||||
"Pedestal sequence cancelled",
|
||||
BrokerStatus::MessageSeverity::Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
if (local_experiment.GetPedestalG1Frames() == 0) {
|
||||
SetState(JFJochState::Idle);
|
||||
if (local_experiment.GetPedestalG1Frames() == 0)
|
||||
return;
|
||||
}
|
||||
|
||||
SetState(JFJochState::Pedestal);
|
||||
|
||||
SetState(JFJochState::Pedestal,
|
||||
"Pedestal G1 SC" + std::to_string(storage_cell),
|
||||
BrokerStatus::MessageSeverity::Info);
|
||||
services.ConfigureDetector(local_experiment);
|
||||
services.Start(local_experiment, pixel_mask, *calibration);
|
||||
|
||||
@@ -160,11 +174,10 @@ void JFJochStateMachine::TakePedestalInternalG1(std::unique_lock<std::mutex> &ul
|
||||
auto pedestal_output = services.Stop();
|
||||
ul.lock();
|
||||
|
||||
if (ImportPedestalG1G2(pedestal_output.receiver_output, 1, storage_cell))
|
||||
SetState(JFJochState::Idle);
|
||||
else
|
||||
SetState(JFJochState::Inactive);
|
||||
|
||||
if (!ImportPedestalG1G2(pedestal_output.receiver_output, 1, storage_cell))
|
||||
SetState(JFJochState::Error,
|
||||
"Pedestal not collected properly",
|
||||
BrokerStatus::MessageSeverity::Error);
|
||||
}
|
||||
|
||||
void JFJochStateMachine::TakePedestalInternalG2(std::unique_lock<std::mutex> &ul, int32_t storage_cell) {
|
||||
@@ -177,16 +190,19 @@ void JFJochStateMachine::TakePedestalInternalG2(std::unique_lock<std::mutex> &ul
|
||||
local_experiment.StorageCellStart(15);
|
||||
|
||||
if (cancel_sequence) {
|
||||
SetState(JFJochState::Inactive);
|
||||
SetState(JFJochState::Inactive,
|
||||
"Pedestal sequence cancelled",
|
||||
BrokerStatus::MessageSeverity::Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
if (local_experiment.GetPedestalG2Frames() == 0) {
|
||||
SetState(JFJochState::Idle);
|
||||
if (local_experiment.GetPedestalG2Frames() == 0)
|
||||
return;
|
||||
}
|
||||
|
||||
SetState(JFJochState::Pedestal);
|
||||
|
||||
SetState(JFJochState::Pedestal,
|
||||
"Pedestal G2 SC" + std::to_string(storage_cell),
|
||||
BrokerStatus::MessageSeverity::Info);
|
||||
services.ConfigureDetector(local_experiment);
|
||||
services.Start(local_experiment, pixel_mask, *calibration);
|
||||
|
||||
@@ -198,17 +214,17 @@ void JFJochStateMachine::TakePedestalInternalG2(std::unique_lock<std::mutex> &ul
|
||||
auto pedestal_output = services.Stop();
|
||||
ul.lock();
|
||||
|
||||
if (ImportPedestalG1G2(pedestal_output.receiver_output, 2, storage_cell))
|
||||
SetState(JFJochState::Idle);
|
||||
else
|
||||
SetState(JFJochState::Inactive);
|
||||
if (!ImportPedestalG1G2(pedestal_output.receiver_output, 2, storage_cell))
|
||||
SetState(JFJochState::Error,
|
||||
"Pedestal not collected properly",
|
||||
BrokerStatus::MessageSeverity::Error);
|
||||
}
|
||||
|
||||
void JFJochStateMachine::Initialize() {
|
||||
std::unique_lock ul(m);
|
||||
|
||||
if (IsRunning())
|
||||
throw WrongDAQStateException ("Cannot initialize during measurement");
|
||||
throw WrongDAQStateException("Cannot initialize during measurement");
|
||||
|
||||
if (detector_setup.empty())
|
||||
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "Detector information not provided");
|
||||
@@ -217,7 +233,7 @@ void JFJochStateMachine::Initialize() {
|
||||
|
||||
logger.Info("Initialize");
|
||||
|
||||
SetState(JFJochState::Busy);
|
||||
SetState(JFJochState::Busy, "Configuring detector", BrokerStatus::MessageSeverity::Info);
|
||||
|
||||
measurement = std::async(std::launch::async, &JFJochStateMachine::InitializeThread, this, std::move(ul));
|
||||
}
|
||||
@@ -226,7 +242,7 @@ void JFJochStateMachine::Pedestal() {
|
||||
std::unique_lock ul(m);
|
||||
|
||||
if (state != JFJochState::Idle)
|
||||
throw WrongDAQStateException ("Must be idle to take pedestal");
|
||||
throw WrongDAQStateException("Must be idle to take pedestal");
|
||||
|
||||
measurement = std::async(std::launch::async, &JFJochStateMachine::PedestalThread, this, std::move(ul));
|
||||
}
|
||||
@@ -239,8 +255,8 @@ void JFJochStateMachine::PedestalThread(std::unique_lock<std::mutex> ul) {
|
||||
void JFJochStateMachine::InitializeThread(std::unique_lock<std::mutex> ul) {
|
||||
try {
|
||||
services.On(experiment);
|
||||
} catch (const std::exception& e) {
|
||||
SetState(JFJochState::Error, e.what());
|
||||
} catch (const std::exception &e) {
|
||||
SetState(JFJochState::Error, e.what(), BrokerStatus::MessageSeverity::Error);
|
||||
throw;
|
||||
}
|
||||
TakePedestalInternalAll(ul);
|
||||
@@ -252,11 +268,11 @@ void JFJochStateMachine::Trigger() {
|
||||
services.Trigger();
|
||||
}
|
||||
|
||||
void JFJochStateMachine::Start(const DatasetSettings& settings) {
|
||||
void JFJochStateMachine::Start(const DatasetSettings &settings) {
|
||||
std::unique_lock ul(m);
|
||||
|
||||
if (state != JFJochState::Idle)
|
||||
throw WrongDAQStateException ("Must be idle to start measurement");
|
||||
throw WrongDAQStateException("Must be idle to start measurement");
|
||||
|
||||
if (measurement.valid())
|
||||
measurement.get(); // In case measurement was running - clear thread
|
||||
@@ -272,14 +288,14 @@ void JFJochStateMachine::Start(const DatasetSettings& settings) {
|
||||
experiment.IncrementRunNumber();
|
||||
|
||||
try {
|
||||
SetState(JFJochState::Busy);
|
||||
SetState(JFJochState::Busy, "Preparing measurement", BrokerStatus::MessageSeverity::Info);
|
||||
services.SetSpotFindingSettings(GetSpotFindingSettings());
|
||||
services.Start(experiment, pixel_mask, *calibration);
|
||||
|
||||
SetState(JFJochState::Measuring);
|
||||
SetState(JFJochState::Measuring, "Measuring ...", BrokerStatus::MessageSeverity::Info);
|
||||
measurement = std::async(std::launch::async, &JFJochStateMachine::MeasurementThread, this);
|
||||
} catch (const std::exception &e) {
|
||||
SetState(JFJochState::Error, e.what());
|
||||
SetState(JFJochState::Error, e.what(), BrokerStatus::MessageSeverity::Error);
|
||||
services.Cancel();
|
||||
throw;
|
||||
}
|
||||
@@ -297,14 +313,29 @@ PixelMaskStatistics JFJochStateMachine::GetPixelMaskStatistics() const {
|
||||
|
||||
void JFJochStateMachine::MeasurementThread() {
|
||||
try {
|
||||
auto tmp_output = services.Stop();
|
||||
{
|
||||
auto tmp_output = services.Stop(); {
|
||||
std::unique_lock ul(m);
|
||||
SetState(JFJochState::Idle);
|
||||
|
||||
if (tmp_output.receiver_output.writer_queue_full_warning)
|
||||
SetState(JFJochState::Idle,
|
||||
"Stream receiver (writer or downstream analysis) cannot cope with data; reduce frame rate",
|
||||
BrokerStatus::MessageSeverity::Warning);
|
||||
else if (tmp_output.receiver_output.status.cancelled)
|
||||
SetState(JFJochState::Idle,
|
||||
"Data collection cancelled",
|
||||
BrokerStatus::MessageSeverity::Info);
|
||||
else if (tmp_output.receiver_output.efficiency != 1.0)
|
||||
SetState(JFJochState::Idle,
|
||||
"Missing packets in data collection; reduce frame rate",
|
||||
BrokerStatus::MessageSeverity::Error);
|
||||
else
|
||||
SetState(JFJochState::Idle,
|
||||
"Data collection without problems",
|
||||
BrokerStatus::MessageSeverity::Success);
|
||||
}
|
||||
} catch (const std::exception &e) {
|
||||
std::unique_lock ul(m);
|
||||
SetState(JFJochState::Error, e.what());
|
||||
SetState(JFJochState::Error, e.what(), BrokerStatus::MessageSeverity::Error);
|
||||
}
|
||||
c.notify_all();
|
||||
}
|
||||
@@ -318,9 +349,11 @@ void JFJochStateMachine::Cancel() {
|
||||
}
|
||||
}
|
||||
|
||||
void JFJochStateMachine::DebugOnly_SetState(JFJochState in_state, const std::optional<std::string> &error_message) {
|
||||
void JFJochStateMachine::DebugOnly_SetState(JFJochState in_state,
|
||||
const std::optional<std::string> &message,
|
||||
BrokerStatus::MessageSeverity message_severity) {
|
||||
std::unique_lock ul(m);
|
||||
SetState(in_state, error_message);
|
||||
SetState(in_state, message, message_severity);
|
||||
}
|
||||
|
||||
void JFJochStateMachine::Deactivate() {
|
||||
@@ -329,9 +362,13 @@ void JFJochStateMachine::Deactivate() {
|
||||
if (measurement.valid())
|
||||
measurement.get();
|
||||
services.Off();
|
||||
SetState(JFJochState::Inactive);
|
||||
SetState(JFJochState::Inactive,
|
||||
"Detector safe to turn off",
|
||||
BrokerStatus::MessageSeverity::Info);
|
||||
} catch (const std::exception &e) {
|
||||
SetState(JFJochState::Error, e.what());
|
||||
SetState(JFJochState::Error,
|
||||
e.what(),
|
||||
BrokerStatus::MessageSeverity::Error);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@@ -397,14 +434,14 @@ void JFJochStateMachine::LoadDetectorSettings(const DetectorSettings &settings)
|
||||
ImportDetectorSettings(settings);
|
||||
break;
|
||||
case JFJochState::Idle:
|
||||
SetState(JFJochState::Busy);
|
||||
SetState(JFJochState::Busy, "Loading settings", BrokerStatus::MessageSeverity::Info);
|
||||
ImportDetectorSettings(settings);
|
||||
measurement = std::async(std::launch::async, &JFJochStateMachine::PedestalThread, this, std::move(ul));
|
||||
break;
|
||||
case JFJochState::Measuring:
|
||||
case JFJochState::Busy:
|
||||
case JFJochState::Pedestal:
|
||||
throw WrongDAQStateException ("Cannot change detector settings during data collection");
|
||||
throw WrongDAQStateException("Cannot change detector settings during data collection");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -419,14 +456,16 @@ BrokerStatus JFJochStateMachine::GetStatus() const {
|
||||
return ret;
|
||||
}
|
||||
|
||||
void JFJochStateMachine::SetState(JFJochState curr_state, const std::optional<std::string> &error_message) {
|
||||
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.state = curr_state;
|
||||
if (error_message && curr_state == JFJochState::Error)
|
||||
broker_status.error = error_message;
|
||||
else
|
||||
broker_status.error = {};
|
||||
broker_status = BrokerStatus{
|
||||
.state = curr_state,
|
||||
.message = message,
|
||||
.message_severity = message_severity
|
||||
};
|
||||
}
|
||||
|
||||
MultiLinePlot JFJochStateMachine::GetPlots(const PlotRequest &request) const {
|
||||
@@ -450,6 +489,7 @@ void JFJochStateMachine::AddDetectorSetup(const DetectorSetup &setup) {
|
||||
|
||||
if (detector_setup.empty()) {
|
||||
experiment.Detector(setup);
|
||||
UpdateROIDefinition();
|
||||
gain_calibration = setup.GetGainCalibration();
|
||||
current_detector_setup = 0;
|
||||
pixel_mask = PixelMask(experiment);
|
||||
@@ -461,7 +501,7 @@ DetectorList JFJochStateMachine::GetDetectorsList() const {
|
||||
std::unique_lock ul(m);
|
||||
DetectorList ret;
|
||||
|
||||
for (const auto & i : detector_setup) {
|
||||
for (const auto &i: detector_setup) {
|
||||
DetectorListElement tmp;
|
||||
tmp.description = i.GetDescription();
|
||||
tmp.nmodules = i.GetModulesNum();
|
||||
@@ -470,6 +510,9 @@ DetectorList JFJochStateMachine::GetDetectorsList() const {
|
||||
tmp.serial_number = i.GetSerialNumber();
|
||||
tmp.base_ipv4_addr = i.GetBaseIPv4Addr();
|
||||
tmp.udp_interface_count = i.GetUDPInterfaceCount();
|
||||
tmp.min_frame_time = i.GetMinFrameTime();
|
||||
tmp.min_count_time = i.GetMinCountTime();
|
||||
tmp.readout_time = i.GetReadOutTime();
|
||||
ret.detector.emplace_back(std::move(tmp));
|
||||
}
|
||||
|
||||
@@ -488,17 +531,18 @@ void JFJochStateMachine::SelectDetector(int64_t id) {
|
||||
throw JFJochException(JFJochExceptionCategory::ArrayOutOfBounds, "Detector doesn't exist");
|
||||
|
||||
if (IsRunning())
|
||||
throw WrongDAQStateException ("Cannot change detector during data collection");
|
||||
throw WrongDAQStateException("Cannot change detector during data collection");
|
||||
|
||||
try {
|
||||
experiment.Detector(detector_setup[id]);
|
||||
UpdateROIDefinition();
|
||||
gain_calibration = detector_setup[id].GetGainCalibration();
|
||||
pixel_mask = PixelMask(experiment);
|
||||
SetState(JFJochState::Inactive);
|
||||
SetState(JFJochState::Inactive, detector_setup[id].GetDescription() + " selected; please initialize");
|
||||
current_detector_setup = id;
|
||||
} catch (const JFJochException &e) {
|
||||
logger.ErrorException(e);
|
||||
SetState(JFJochState::Inactive);
|
||||
SetState(JFJochState::Error, e.what(), BrokerStatus::MessageSeverity::Error);
|
||||
throw; // re-throw the exception, so it is populated to caller
|
||||
}
|
||||
}
|
||||
@@ -507,7 +551,7 @@ void JFJochStateMachine::SetRadialIntegrationSettings(const AzimuthalIntegration
|
||||
std::unique_lock ul(m);
|
||||
|
||||
if (IsRunning())
|
||||
throw WrongDAQStateException ("Cannot change radial integration settings during data collection");
|
||||
throw WrongDAQStateException("Cannot change radial integration settings during data collection");
|
||||
|
||||
experiment.ImportRadialIntegrationSettings(settings);
|
||||
}
|
||||
@@ -552,10 +596,11 @@ void JFJochStateMachine::ResetError() noexcept {
|
||||
try {
|
||||
if (measurement.valid())
|
||||
measurement.get();
|
||||
} catch (...) {}
|
||||
} catch (...) {
|
||||
}
|
||||
}
|
||||
|
||||
std::string JFJochStateMachine::GetPreviewJPEG(const PreviewJPEGSettings& settings) const {
|
||||
std::string JFJochStateMachine::GetPreviewJPEG(const PreviewJPEGSettings &settings) const {
|
||||
return services.GetPreviewJPEG(settings);
|
||||
}
|
||||
|
||||
@@ -567,7 +612,7 @@ std::string JFJochStateMachine::GetPedestalTIFF(size_t gain_level, size_t sc) co
|
||||
std::unique_lock ul(m);
|
||||
|
||||
if (state != JFJochState::Idle)
|
||||
throw WrongDAQStateException ("Pedestal can be only retrieved in Idle state");
|
||||
throw WrongDAQStateException("Pedestal can be only retrieved in Idle state");
|
||||
|
||||
if ((experiment.GetDetectorSetup().GetDetectorType() == DetectorType::JUNGFRAU) && calibration) {
|
||||
auto tmp = calibration->GetPedestal(gain_level, sc);
|
||||
@@ -581,11 +626,12 @@ void JFJochStateMachine::LoadInternalGeneratorImage(const void *data, size_t siz
|
||||
std::unique_lock ul(m);
|
||||
|
||||
if (state != JFJochState::Idle)
|
||||
throw WrongDAQStateException ("Can change internal generator image only when detector in Idle state");
|
||||
throw WrongDAQStateException("Can change internal generator image only when detector in Idle state");
|
||||
|
||||
if ((size != experiment.GetPixelsNum() * sizeof(uint16_t))
|
||||
&& (size != experiment.GetModulesNum() * RAW_MODULE_SIZE * sizeof(uint16_t)))
|
||||
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "Image size doesn't match current detector");
|
||||
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
|
||||
"Image size doesn't match current detector");
|
||||
|
||||
if (image_number >= experiment.GetInternalPacketGeneratorImages())
|
||||
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
|
||||
@@ -601,7 +647,7 @@ void JFJochStateMachine::LoadInternalGeneratorImageTIFF(const std::string &s, ui
|
||||
std::unique_lock ul(m);
|
||||
|
||||
if (state != JFJochState::Idle)
|
||||
throw WrongDAQStateException ("Can change internal generator image only when detector in Idle state");
|
||||
throw WrongDAQStateException("Can change internal generator image only when detector in Idle state");
|
||||
|
||||
uint32_t cols, lines;
|
||||
auto v = ReadTIFFFromString16(s, cols, lines);
|
||||
@@ -609,35 +655,28 @@ void JFJochStateMachine::LoadInternalGeneratorImageTIFF(const std::string &s, ui
|
||||
|| ((cols == RAW_MODULE_SIZE) && (lines == RAW_MODULE_LINES * experiment.GetModulesNum())))
|
||||
services.LoadInternalGeneratorImage(experiment, v, image_number);
|
||||
else
|
||||
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "Image size doesn't match current detector");
|
||||
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
|
||||
"Image size doesn't match current detector");
|
||||
}
|
||||
|
||||
void JFJochStateMachine::SetBoxROI(const std::vector<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 {
|
||||
@@ -680,7 +719,7 @@ void JFJochStateMachine::SetUserPixelMask(const std::vector<uint32_t> &v) {
|
||||
std::unique_lock ul(m);
|
||||
|
||||
if (state != JFJochState::Idle)
|
||||
throw WrongDAQStateException ("User mask can be only modified in Idle state");
|
||||
throw WrongDAQStateException("User mask can be only modified in Idle state");
|
||||
|
||||
try {
|
||||
pixel_mask.LoadUserMask(experiment, v);
|
||||
@@ -700,7 +739,7 @@ void JFJochStateMachine::LoadInstrumentMetadata(const InstrumentMetadata &settin
|
||||
std::unique_lock ul(m);
|
||||
|
||||
if (IsRunning())
|
||||
throw WrongDAQStateException ("Cannot change instrument metadata during data collection");
|
||||
throw WrongDAQStateException("Cannot change instrument metadata during data collection");
|
||||
|
||||
experiment.ImportInstrumentMetadata(settings);
|
||||
}
|
||||
@@ -714,7 +753,7 @@ void JFJochStateMachine::LoadImageFormatSettings(const ImageFormatSettings &sett
|
||||
std::unique_lock ul(m);
|
||||
|
||||
if (IsRunning())
|
||||
throw WrongDAQStateException ("Cannot change image format settings during data collection");
|
||||
throw WrongDAQStateException("Cannot change image format settings during data collection");
|
||||
|
||||
experiment.ImportImageFormatSettings(settings);
|
||||
pixel_mask.Update(settings);
|
||||
@@ -725,7 +764,7 @@ void JFJochStateMachine::RawImageFormatSettings() {
|
||||
std::unique_lock ul(m);
|
||||
|
||||
if (IsRunning())
|
||||
throw WrongDAQStateException ("Cannot change instrument metadata during data collection");
|
||||
throw WrongDAQStateException("Cannot change instrument metadata during data collection");
|
||||
|
||||
experiment.Raw();
|
||||
}
|
||||
@@ -734,7 +773,7 @@ void JFJochStateMachine::ConvImageFormatSettings() {
|
||||
std::unique_lock ul(m);
|
||||
|
||||
if (IsRunning())
|
||||
throw WrongDAQStateException ("Cannot change instrument metadata during data collection");
|
||||
throw WrongDAQStateException("Cannot change instrument metadata during data collection");
|
||||
|
||||
experiment.Conversion();
|
||||
}
|
||||
|
||||
@@ -21,7 +21,8 @@ enum class JFJochState {Inactive, Idle, Measuring, Error, Busy, Pedestal};
|
||||
struct BrokerStatus {
|
||||
JFJochState state = JFJochState::Inactive;
|
||||
std::optional<float> progress;
|
||||
std::optional<std::string> error;
|
||||
std::optional<std::string> message;
|
||||
enum class MessageSeverity {Error, Info, Warning, Success} message_severity = MessageSeverity::Error;
|
||||
};
|
||||
|
||||
struct DetectorListElement {
|
||||
@@ -32,6 +33,9 @@ struct DetectorListElement {
|
||||
int64_t nmodules;
|
||||
int64_t width;
|
||||
int64_t height;
|
||||
std::chrono::microseconds readout_time;
|
||||
std::chrono::microseconds min_frame_time;
|
||||
std::chrono::microseconds min_count_time;
|
||||
};
|
||||
|
||||
struct DetectorList {
|
||||
@@ -101,10 +105,15 @@ class JFJochStateMachine {
|
||||
mutable std::mutex broker_status_mutex;
|
||||
BrokerStatus broker_status;
|
||||
|
||||
mutable std::mutex roi_mutex;
|
||||
ROIDefinition roi;
|
||||
|
||||
void UpdatePixelMaskStatistics(const PixelMaskStatistics &input);
|
||||
|
||||
// Private functions assume that lock m is acquired
|
||||
void SetState(JFJochState curr_state, const std::optional<std::string> &error_message = {});
|
||||
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);
|
||||
@@ -117,6 +126,7 @@ class JFJochStateMachine {
|
||||
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();
|
||||
@@ -173,13 +183,12 @@ public:
|
||||
DiffractionExperiment& NotThreadSafe_Experiment();
|
||||
|
||||
// Function for debug only - UNSAFE for real operation
|
||||
void DebugOnly_SetState(JFJochState state, const std::optional<std::string> &error_message = {});
|
||||
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;
|
||||
|
||||
@@ -198,7 +198,6 @@ org::openapitools::server::model::Broker_status Convert(const BrokerStatus& inpu
|
||||
break;
|
||||
case JFJochState::Error:
|
||||
ret.setState("Error");
|
||||
ret.setErrorMessage(input.error.value_or("Unknown error"));
|
||||
break;
|
||||
case JFJochState::Busy:
|
||||
ret.setState("Busy");
|
||||
@@ -207,6 +206,24 @@ org::openapitools::server::model::Broker_status Convert(const BrokerStatus& inpu
|
||||
ret.setState("Pedestal");
|
||||
break;
|
||||
}
|
||||
|
||||
if (input.message.has_value())
|
||||
ret.setMessage(input.message.value());
|
||||
|
||||
switch (input.message_severity) {
|
||||
case BrokerStatus::MessageSeverity::Info:
|
||||
ret.setMessageSeverity("info");
|
||||
break;
|
||||
case BrokerStatus::MessageSeverity::Success:
|
||||
ret.setMessageSeverity("success");
|
||||
break;
|
||||
case BrokerStatus::MessageSeverity::Warning:
|
||||
ret.setMessageSeverity("warning");
|
||||
break;
|
||||
default:
|
||||
ret.setMessageSeverity("error");
|
||||
break;
|
||||
}
|
||||
if (input.progress.has_value())
|
||||
ret.setProgress(input.progress.value());
|
||||
|
||||
@@ -311,9 +328,9 @@ org::openapitools::server::model::Detector_status Convert(const DetectorStatus &
|
||||
|
||||
org::openapitools::server::model::Detector_list Convert(const DetectorList &input) {
|
||||
org::openapitools::server::model::Detector_list ret;
|
||||
std::vector<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);
|
||||
@@ -322,6 +339,9 @@ org::openapitools::server::model::Detector_list Convert(const DetectorList &inpu
|
||||
d.setSerialNumber(input.detector[i].serial_number);
|
||||
d.setBaseIpv4Addr(input.detector[i].base_ipv4_addr);
|
||||
d.setUdpInterfaceCount(input.detector[i].udp_interface_count);
|
||||
d.setMinFrameTimeUs(input.detector[i].min_frame_time.count());
|
||||
d.setMinCountTimeUs(input.detector[i].min_count_time.count());
|
||||
d.setReadoutTimeUs(input.detector[i].readout_time.count());
|
||||
dets.emplace_back(std::move(d));
|
||||
}
|
||||
ret.setDetectors(dets);
|
||||
@@ -364,18 +384,13 @@ org::openapitools::server::model::Azim_int_settings Convert(const AzimuthalInteg
|
||||
return ret;
|
||||
}
|
||||
|
||||
std::vector<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) {
|
||||
@@ -393,7 +408,6 @@ org::openapitools::server::model::Roi_circle_list Convert(const std::vector<ROIC
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
org::openapitools::server::model::Roi_box_list Convert(const std::vector<ROIBox> &input) {
|
||||
org::openapitools::server::model::Roi_box_list ret{};
|
||||
std::vector<org::openapitools::server::model::Roi_box> tmp;
|
||||
@@ -410,6 +424,13 @@ org::openapitools::server::model::Roi_box_list Convert(const std::vector<ROIBox>
|
||||
return ret;
|
||||
}
|
||||
|
||||
org::openapitools::server::model::Roi_definitions Convert(const ROIDefinition &input) {
|
||||
org::openapitools::server::model::Roi_definitions ret{};
|
||||
ret.setCircle(Convert(input.circles));
|
||||
ret.setBox(Convert(input.boxes));
|
||||
return ret;
|
||||
}
|
||||
|
||||
PreviewJPEGSettings Convert(const org::openapitools::server::model::Preview_settings& input) {
|
||||
PreviewJPEGSettings ret{};
|
||||
ret.show_spots = input.isShowSpots();
|
||||
|
||||
@@ -15,8 +15,7 @@
|
||||
#include "gen/model/Detector_status.h"
|
||||
#include "gen/model/Plots.h"
|
||||
#include "gen/model/Azim_int_settings.h"
|
||||
#include "gen/model/Roi_box_list.h"
|
||||
#include "gen/model/Roi_circle_list.h"
|
||||
#include "gen/model/Roi_definitions.h"
|
||||
#include "gen/model/Image_format_settings.h"
|
||||
#include "gen/model/Preview_settings.h"
|
||||
#include "gen/model/Dataset_settings.h"
|
||||
@@ -51,10 +50,8 @@ org::openapitools::server::model::Detector_list Convert(const DetectorList &inpu
|
||||
org::openapitools::server::model::Plots Convert(const MultiLinePlot& input);
|
||||
AzimuthalIntegrationSettings Convert(const org::openapitools::server::model::Azim_int_settings& input);
|
||||
org::openapitools::server::model::Azim_int_settings Convert(const AzimuthalIntegrationSettings& settings);
|
||||
std::vector<ROIBox> Convert(const org::openapitools::server::model::Roi_box_list& input);
|
||||
std::vector<ROICircle> Convert(const org::openapitools::server::model::Roi_circle_list& input);
|
||||
org::openapitools::server::model::Roi_circle_list Convert(const std::vector<ROICircle> &input);
|
||||
org::openapitools::server::model::Roi_box_list Convert(const std::vector<ROIBox> &input);
|
||||
ROIDefinition Convert(const org::openapitools::server::model::Roi_definitions& input);
|
||||
org::openapitools::server::model::Roi_definitions Convert(const ROIDefinition &input);
|
||||
PreviewJPEGSettings Convert(const org::openapitools::server::model::Preview_settings& input);
|
||||
ImageFormatSettings Convert(const org::openapitools::server::model::Image_format_settings& input);
|
||||
org::openapitools::server::model::Image_format_settings Convert(const ImageFormatSettings& input);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -48,6 +48,8 @@ void DefaultApi::setupRoutes() {
|
||||
Routes::Put(*router, base + "/config/internal_generator_image.tiff", Routes::bind(&DefaultApi::config_internal_generator_image_tiff_put_handler, this));
|
||||
Routes::Get(*router, base + "/config/mask", Routes::bind(&DefaultApi::config_mask_get_handler, this));
|
||||
Routes::Get(*router, base + "/config/mask.tiff", Routes::bind(&DefaultApi::config_mask_tiff_get_handler, this));
|
||||
Routes::Get(*router, base + "/config/roi", Routes::bind(&DefaultApi::config_roi_get_handler, this));
|
||||
Routes::Put(*router, base + "/config/roi", Routes::bind(&DefaultApi::config_roi_put_handler, this));
|
||||
Routes::Get(*router, base + "/config/select_detector", Routes::bind(&DefaultApi::config_select_detector_get_handler, this));
|
||||
Routes::Put(*router, base + "/config/select_detector", Routes::bind(&DefaultApi::config_select_detector_put_handler, this));
|
||||
Routes::Get(*router, base + "/config/spot_finding", Routes::bind(&DefaultApi::config_spot_finding_get_handler, this));
|
||||
@@ -84,10 +86,6 @@ void DefaultApi::setupRoutes() {
|
||||
Routes::Post(*router, base + "/preview/image.jpeg", Routes::bind(&DefaultApi::preview_image_jpeg_post_handler, this));
|
||||
Routes::Get(*router, base + "/preview/image.tiff", Routes::bind(&DefaultApi::preview_image_tiff_get_handler, this));
|
||||
Routes::Get(*router, base + "/preview/pedestal.tiff", Routes::bind(&DefaultApi::preview_pedestal_tiff_get_handler, this));
|
||||
Routes::Get(*router, base + "/roi/box", Routes::bind(&DefaultApi::roi_box_get_handler, this));
|
||||
Routes::Put(*router, base + "/roi/box", Routes::bind(&DefaultApi::roi_box_put_handler, this));
|
||||
Routes::Get(*router, base + "/roi/circle", Routes::bind(&DefaultApi::roi_circle_get_handler, this));
|
||||
Routes::Put(*router, base + "/roi/circle", Routes::bind(&DefaultApi::roi_circle_put_handler, this));
|
||||
Routes::Post(*router, base + "/start", Routes::bind(&DefaultApi::start_post_handler, this));
|
||||
Routes::Get(*router, base + "/statistics/calibration", Routes::bind(&DefaultApi::statistics_calibration_get_handler, this));
|
||||
Routes::Get(*router, base + "/statistics/data_collection", Routes::bind(&DefaultApi::statistics_data_collection_get_handler, this));
|
||||
@@ -463,6 +461,56 @@ void DefaultApi::config_mask_tiff_get_handler(const Pistache::Rest::Request &, P
|
||||
response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
|
||||
}
|
||||
|
||||
}
|
||||
void DefaultApi::config_roi_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) {
|
||||
try {
|
||||
|
||||
|
||||
try {
|
||||
this->config_roi_get(response);
|
||||
} catch (Pistache::Http::HttpError &e) {
|
||||
response.send(static_cast<Pistache::Http::Code>(e.code()), e.what());
|
||||
return;
|
||||
} catch (std::exception &e) {
|
||||
this->handleOperationException(e, response);
|
||||
return;
|
||||
}
|
||||
|
||||
} catch (std::exception &e) {
|
||||
response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
|
||||
}
|
||||
|
||||
}
|
||||
void DefaultApi::config_roi_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) {
|
||||
try {
|
||||
|
||||
|
||||
// Getting the body param
|
||||
|
||||
Roi_definitions roiDefinitions;
|
||||
|
||||
try {
|
||||
nlohmann::json::parse(request.body()).get_to(roiDefinitions);
|
||||
roiDefinitions.validate();
|
||||
} catch (std::exception &e) {
|
||||
this->handleParsingException(e, response);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
this->config_roi_put(roiDefinitions, response);
|
||||
} catch (Pistache::Http::HttpError &e) {
|
||||
response.send(static_cast<Pistache::Http::Code>(e.code()), e.what());
|
||||
return;
|
||||
} catch (std::exception &e) {
|
||||
this->handleOperationException(e, response);
|
||||
return;
|
||||
}
|
||||
|
||||
} catch (std::exception &e) {
|
||||
response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
|
||||
}
|
||||
|
||||
}
|
||||
void DefaultApi::config_select_detector_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) {
|
||||
try {
|
||||
@@ -1467,106 +1515,6 @@ void DefaultApi::preview_pedestal_tiff_get_handler(const Pistache::Rest::Request
|
||||
response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
|
||||
}
|
||||
|
||||
}
|
||||
void DefaultApi::roi_box_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) {
|
||||
try {
|
||||
|
||||
|
||||
try {
|
||||
this->roi_box_get(response);
|
||||
} catch (Pistache::Http::HttpError &e) {
|
||||
response.send(static_cast<Pistache::Http::Code>(e.code()), e.what());
|
||||
return;
|
||||
} catch (std::exception &e) {
|
||||
this->handleOperationException(e, response);
|
||||
return;
|
||||
}
|
||||
|
||||
} catch (std::exception &e) {
|
||||
response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
|
||||
}
|
||||
|
||||
}
|
||||
void DefaultApi::roi_box_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) {
|
||||
try {
|
||||
|
||||
|
||||
// Getting the body param
|
||||
|
||||
Roi_box_list roiBoxList;
|
||||
|
||||
try {
|
||||
nlohmann::json::parse(request.body()).get_to(roiBoxList);
|
||||
roiBoxList.validate();
|
||||
} catch (std::exception &e) {
|
||||
this->handleParsingException(e, response);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
this->roi_box_put(roiBoxList, response);
|
||||
} catch (Pistache::Http::HttpError &e) {
|
||||
response.send(static_cast<Pistache::Http::Code>(e.code()), e.what());
|
||||
return;
|
||||
} catch (std::exception &e) {
|
||||
this->handleOperationException(e, response);
|
||||
return;
|
||||
}
|
||||
|
||||
} catch (std::exception &e) {
|
||||
response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
|
||||
}
|
||||
|
||||
}
|
||||
void DefaultApi::roi_circle_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) {
|
||||
try {
|
||||
|
||||
|
||||
try {
|
||||
this->roi_circle_get(response);
|
||||
} catch (Pistache::Http::HttpError &e) {
|
||||
response.send(static_cast<Pistache::Http::Code>(e.code()), e.what());
|
||||
return;
|
||||
} catch (std::exception &e) {
|
||||
this->handleOperationException(e, response);
|
||||
return;
|
||||
}
|
||||
|
||||
} catch (std::exception &e) {
|
||||
response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
|
||||
}
|
||||
|
||||
}
|
||||
void DefaultApi::roi_circle_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) {
|
||||
try {
|
||||
|
||||
|
||||
// Getting the body param
|
||||
|
||||
Roi_circle_list roiCircleList;
|
||||
|
||||
try {
|
||||
nlohmann::json::parse(request.body()).get_to(roiCircleList);
|
||||
roiCircleList.validate();
|
||||
} catch (std::exception &e) {
|
||||
this->handleParsingException(e, response);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
this->roi_circle_put(roiCircleList, response);
|
||||
} catch (Pistache::Http::HttpError &e) {
|
||||
response.send(static_cast<Pistache::Http::Code>(e.code()), e.what());
|
||||
return;
|
||||
} catch (std::exception &e) {
|
||||
this->handleOperationException(e, response);
|
||||
return;
|
||||
}
|
||||
|
||||
} catch (std::exception &e) {
|
||||
response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
|
||||
}
|
||||
|
||||
}
|
||||
void DefaultApi::start_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) {
|
||||
try {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -44,8 +44,7 @@
|
||||
#include "Measurement_statistics.h"
|
||||
#include "Plots.h"
|
||||
#include "Preview_settings.h"
|
||||
#include "Roi_box_list.h"
|
||||
#include "Roi_circle_list.h"
|
||||
#include "Roi_definitions.h"
|
||||
#include "Spot_finding_settings.h"
|
||||
#include "Zeromq_metadata_settings.h"
|
||||
#include "Zeromq_preview_settings.h"
|
||||
@@ -81,6 +80,8 @@ private:
|
||||
void config_internal_generator_image_tiff_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void config_mask_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void config_mask_tiff_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void config_roi_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void config_roi_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void config_select_detector_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void config_select_detector_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void config_spot_finding_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
@@ -117,10 +118,6 @@ private:
|
||||
void preview_image_jpeg_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void preview_image_tiff_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void preview_pedestal_tiff_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void roi_box_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void roi_box_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void roi_circle_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void roi_circle_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void start_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void statistics_calibration_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
void statistics_data_collection_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
@@ -271,6 +268,21 @@ private:
|
||||
/// </remarks>
|
||||
virtual void config_mask_tiff_get(Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Get ROI definitions
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
virtual void config_roi_get(Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Upload ROI definitions
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <param name="roiDefinitions"> (optional)</param>
|
||||
virtual void config_roi_put(const org::openapitools::server::model::Roi_definitions &roiDefinitions, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// List available detectors
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
@@ -557,36 +569,6 @@ private:
|
||||
/// <param name="sc">Storage cell number (optional, default to 0)</param>
|
||||
virtual void preview_pedestal_tiff_get(const std::optional<int32_t> &gainLevel, const std::optional<int32_t> &sc, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Get box ROIs
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
virtual void roi_box_get(Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Upload box ROIs
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <param name="roiBoxList"> (optional)</param>
|
||||
virtual void roi_box_put(const org::openapitools::server::model::Roi_box_list &roiBoxList, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Get circular ROI
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
virtual void roi_circle_get(Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Upload circular ROI
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <param name="roiCircleList"> (optional)</param>
|
||||
virtual void roi_circle_put(const org::openapitools::server::model::Roi_circle_list &roiCircleList, Pistache::Http::ResponseWriter &response) = 0;
|
||||
/// <summary>
|
||||
/// Start detector
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -24,8 +24,10 @@ Broker_status::Broker_status()
|
||||
m_State = "";
|
||||
m_Progress = 0.0f;
|
||||
m_ProgressIsSet = false;
|
||||
m_Error_message = "";
|
||||
m_Error_messageIsSet = false;
|
||||
m_Message = "";
|
||||
m_MessageIsSet = false;
|
||||
m_Message_severity = "error";
|
||||
m_Message_severityIsSet = false;
|
||||
|
||||
}
|
||||
|
||||
@@ -67,7 +69,7 @@ bool Broker_status::validate(std::stringstream& msg, const std::string& pathPref
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
@@ -83,7 +85,10 @@ bool Broker_status::operator==(const Broker_status& rhs) const
|
||||
((!progressIsSet() && !rhs.progressIsSet()) || (progressIsSet() && rhs.progressIsSet() && getProgress() == rhs.getProgress())) &&
|
||||
|
||||
|
||||
((!errorMessageIsSet() && !rhs.errorMessageIsSet()) || (errorMessageIsSet() && rhs.errorMessageIsSet() && getErrorMessage() == rhs.getErrorMessage()))
|
||||
((!messageIsSet() && !rhs.messageIsSet()) || (messageIsSet() && rhs.messageIsSet() && getMessage() == rhs.getMessage())) &&
|
||||
|
||||
|
||||
((!messageSeverityIsSet() && !rhs.messageSeverityIsSet()) || (messageSeverityIsSet() && rhs.messageSeverityIsSet() && getMessageSeverity() == rhs.getMessageSeverity()))
|
||||
|
||||
;
|
||||
}
|
||||
@@ -99,8 +104,10 @@ void to_json(nlohmann::json& j, const Broker_status& o)
|
||||
j["state"] = o.m_State;
|
||||
if(o.progressIsSet())
|
||||
j["progress"] = o.m_Progress;
|
||||
if(o.errorMessageIsSet())
|
||||
j["error_message"] = o.m_Error_message;
|
||||
if(o.messageIsSet())
|
||||
j["message"] = o.m_Message;
|
||||
if(o.messageSeverityIsSet())
|
||||
j["message_severity"] = o.m_Message_severity;
|
||||
|
||||
}
|
||||
|
||||
@@ -112,10 +119,15 @@ void from_json(const nlohmann::json& j, Broker_status& o)
|
||||
j.at("progress").get_to(o.m_Progress);
|
||||
o.m_ProgressIsSet = true;
|
||||
}
|
||||
if(j.find("error_message") != j.end())
|
||||
if(j.find("message") != j.end())
|
||||
{
|
||||
j.at("error_message").get_to(o.m_Error_message);
|
||||
o.m_Error_messageIsSet = true;
|
||||
j.at("message").get_to(o.m_Message);
|
||||
o.m_MessageIsSet = true;
|
||||
}
|
||||
if(j.find("message_severity") != j.end())
|
||||
{
|
||||
j.at("message_severity").get_to(o.m_Message_severity);
|
||||
o.m_Message_severityIsSet = true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -145,22 +157,39 @@ void Broker_status::unsetProgress()
|
||||
{
|
||||
m_ProgressIsSet = false;
|
||||
}
|
||||
std::string Broker_status::getErrorMessage() const
|
||||
std::string Broker_status::getMessage() const
|
||||
{
|
||||
return m_Error_message;
|
||||
return m_Message;
|
||||
}
|
||||
void Broker_status::setErrorMessage(std::string const& value)
|
||||
void Broker_status::setMessage(std::string const& value)
|
||||
{
|
||||
m_Error_message = value;
|
||||
m_Error_messageIsSet = true;
|
||||
m_Message = value;
|
||||
m_MessageIsSet = true;
|
||||
}
|
||||
bool Broker_status::errorMessageIsSet() const
|
||||
bool Broker_status::messageIsSet() const
|
||||
{
|
||||
return m_Error_messageIsSet;
|
||||
return m_MessageIsSet;
|
||||
}
|
||||
void Broker_status::unsetError_message()
|
||||
void Broker_status::unsetMessage()
|
||||
{
|
||||
m_Error_messageIsSet = false;
|
||||
m_MessageIsSet = false;
|
||||
}
|
||||
std::string Broker_status::getMessageSeverity() const
|
||||
{
|
||||
return m_Message_severity;
|
||||
}
|
||||
void Broker_status::setMessageSeverity(std::string const& value)
|
||||
{
|
||||
m_Message_severity = value;
|
||||
m_Message_severityIsSet = true;
|
||||
}
|
||||
bool Broker_status::messageSeverityIsSet() const
|
||||
{
|
||||
return m_Message_severityIsSet;
|
||||
}
|
||||
void Broker_status::unsetMessage_severity()
|
||||
{
|
||||
m_Message_severityIsSet = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -71,12 +71,19 @@ public:
|
||||
bool progressIsSet() const;
|
||||
void unsetProgress();
|
||||
/// <summary>
|
||||
/// Last error message in case detector is in the Error state This matters especially for async functions (start/initialize), where API won't return reason for the error during async operation.
|
||||
/// Message to display besides state of the jfjoch_broker; mostly used for errors and warnings This matters especially for async functions (start/initialize), where API won't return reason for the error during async operation.
|
||||
/// </summary>
|
||||
std::string getErrorMessage() const;
|
||||
void setErrorMessage(std::string const& value);
|
||||
bool errorMessageIsSet() const;
|
||||
void unsetError_message();
|
||||
std::string getMessage() const;
|
||||
void setMessage(std::string const& value);
|
||||
bool messageIsSet() const;
|
||||
void unsetMessage();
|
||||
/// <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);
|
||||
@@ -85,8 +92,10 @@ protected:
|
||||
|
||||
float m_Progress;
|
||||
bool m_ProgressIsSet;
|
||||
std::string m_Error_message;
|
||||
bool m_Error_messageIsSet;
|
||||
std::string m_Message;
|
||||
bool m_MessageIsSet;
|
||||
std::string m_Message_severity;
|
||||
bool m_Message_severityIsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -32,6 +32,8 @@ Detector::Detector()
|
||||
m_Module_syncIsSet = false;
|
||||
m_Sensor_thickness_um = 320.0f;
|
||||
m_Sensor_thickness_umIsSet = false;
|
||||
m_Readout_time_us = 0L;
|
||||
m_Readout_time_usIsSet = false;
|
||||
m_Calibration_fileIsSet = false;
|
||||
m_HostnameIsSet = false;
|
||||
m_Sensor_material = "Si";
|
||||
@@ -146,6 +148,20 @@ bool Detector::validate(std::stringstream& msg, const std::string& pathPrefix) c
|
||||
|
||||
}
|
||||
|
||||
if (readoutTimeUsIsSet())
|
||||
{
|
||||
const int64_t& value = m_Readout_time_us;
|
||||
const std::string currentValuePath = _pathPrefix + ".readoutTimeUs";
|
||||
|
||||
|
||||
if (value < 1ll)
|
||||
{
|
||||
success = false;
|
||||
msg << currentValuePath << ": must be greater than or equal to 1;";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (calibrationFileIsSet())
|
||||
{
|
||||
const std::vector<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.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -108,7 +108,14 @@ public:
|
||||
bool sensorThicknessUmIsSet() const;
|
||||
void unsetSensor_thickness_um();
|
||||
/// <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.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -47,14 +47,14 @@ bool Detector_list::validate(std::stringstream& msg, const std::string& pathPref
|
||||
|
||||
|
||||
/* Detectors */ {
|
||||
const std::vector<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.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -19,7 +19,7 @@
|
||||
#define Detector_list_H_
|
||||
|
||||
|
||||
#include "Detector_list_detectors_inner.h"
|
||||
#include "Detector_list_element.h"
|
||||
#include <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.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -29,6 +29,9 @@ Detector_list_detectors_inner::Detector_list_detectors_inner()
|
||||
m_Nmodules = 0L;
|
||||
m_Width = 0L;
|
||||
m_Height = 0L;
|
||||
m_Readout_time_us = 0L;
|
||||
m_Min_frame_time_us = 0L;
|
||||
m_Min_count_time_us = 0L;
|
||||
|
||||
}
|
||||
|
||||
@@ -65,7 +68,7 @@ bool Detector_list_detectors_inner::validate(std::stringstream& msg, const std::
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
@@ -96,6 +99,15 @@ bool Detector_list_detectors_inner::operator==(const Detector_list_detectors_inn
|
||||
&&
|
||||
|
||||
(getHeight() == rhs.getHeight())
|
||||
&&
|
||||
|
||||
(getReadoutTimeUs() == rhs.getReadoutTimeUs())
|
||||
&&
|
||||
|
||||
(getMinFrameTimeUs() == rhs.getMinFrameTimeUs())
|
||||
&&
|
||||
|
||||
(getMinCountTimeUs() == rhs.getMinCountTimeUs())
|
||||
|
||||
|
||||
;
|
||||
@@ -117,6 +129,9 @@ void to_json(nlohmann::json& j, const Detector_list_detectors_inner& o)
|
||||
j["nmodules"] = o.m_Nmodules;
|
||||
j["width"] = o.m_Width;
|
||||
j["height"] = o.m_Height;
|
||||
j["readout_time_us"] = o.m_Readout_time_us;
|
||||
j["min_frame_time_us"] = o.m_Min_frame_time_us;
|
||||
j["min_count_time_us"] = o.m_Min_count_time_us;
|
||||
|
||||
}
|
||||
|
||||
@@ -130,6 +145,9 @@ void from_json(const nlohmann::json& j, Detector_list_detectors_inner& o)
|
||||
j.at("nmodules").get_to(o.m_Nmodules);
|
||||
j.at("width").get_to(o.m_Width);
|
||||
j.at("height").get_to(o.m_Height);
|
||||
j.at("readout_time_us").get_to(o.m_Readout_time_us);
|
||||
j.at("min_frame_time_us").get_to(o.m_Min_frame_time_us);
|
||||
j.at("min_count_time_us").get_to(o.m_Min_count_time_us);
|
||||
|
||||
}
|
||||
|
||||
@@ -197,6 +215,30 @@ void Detector_list_detectors_inner::setHeight(int64_t const value)
|
||||
{
|
||||
m_Height = value;
|
||||
}
|
||||
int64_t Detector_list_detectors_inner::getReadoutTimeUs() const
|
||||
{
|
||||
return m_Readout_time_us;
|
||||
}
|
||||
void Detector_list_detectors_inner::setReadoutTimeUs(int64_t const value)
|
||||
{
|
||||
m_Readout_time_us = value;
|
||||
}
|
||||
int64_t Detector_list_detectors_inner::getMinFrameTimeUs() const
|
||||
{
|
||||
return m_Min_frame_time_us;
|
||||
}
|
||||
void Detector_list_detectors_inner::setMinFrameTimeUs(int64_t const value)
|
||||
{
|
||||
m_Min_frame_time_us = value;
|
||||
}
|
||||
int64_t Detector_list_detectors_inner::getMinCountTimeUs() const
|
||||
{
|
||||
return m_Min_count_time_us;
|
||||
}
|
||||
void Detector_list_detectors_inner::setMinCountTimeUs(int64_t const value)
|
||||
{
|
||||
m_Min_count_time_us = value;
|
||||
}
|
||||
|
||||
|
||||
} // namespace org::openapitools::server::model
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -98,6 +98,21 @@ public:
|
||||
/// </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.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
#include "Detector_list_element.h"
|
||||
#include "Helpers.h"
|
||||
|
||||
#include <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.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
/*
|
||||
* Detector_list_element.h
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef Detector_list_element_H_
|
||||
#define Detector_list_element_H_
|
||||
|
||||
|
||||
#include <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.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -80,10 +80,10 @@ bool Detector_settings::validate(std::stringstream& msg, const std::string& path
|
||||
const std::string currentValuePath = _pathPrefix + ".frameTimeUs";
|
||||
|
||||
|
||||
if (value < 450ll)
|
||||
if (value < 1ll)
|
||||
{
|
||||
success = false;
|
||||
msg << currentValuePath << ": must be greater than or equal to 450;";
|
||||
msg << currentValuePath << ": must be greater than or equal to 1;";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -34,6 +34,7 @@ Jfjoch_statistics::Jfjoch_statistics()
|
||||
m_Zeromq_previewIsSet = false;
|
||||
m_Zeromq_metadataIsSet = false;
|
||||
m_Pixel_maskIsSet = false;
|
||||
m_RoiIsSet = false;
|
||||
|
||||
}
|
||||
|
||||
@@ -98,7 +99,7 @@ bool Jfjoch_statistics::validate(std::stringstream& msg, const std::string& path
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
@@ -144,7 +145,10 @@ bool Jfjoch_statistics::operator==(const Jfjoch_statistics& rhs) const
|
||||
((!zeromqMetadataIsSet() && !rhs.zeromqMetadataIsSet()) || (zeromqMetadataIsSet() && rhs.zeromqMetadataIsSet() && getZeromqMetadata() == rhs.getZeromqMetadata())) &&
|
||||
|
||||
|
||||
((!pixelMaskIsSet() && !rhs.pixelMaskIsSet()) || (pixelMaskIsSet() && rhs.pixelMaskIsSet() && getPixelMask() == rhs.getPixelMask()))
|
||||
((!pixelMaskIsSet() && !rhs.pixelMaskIsSet()) || (pixelMaskIsSet() && rhs.pixelMaskIsSet() && getPixelMask() == rhs.getPixelMask())) &&
|
||||
|
||||
|
||||
((!roiIsSet() && !rhs.roiIsSet()) || (roiIsSet() && rhs.roiIsSet() && getRoi() == rhs.getRoi()))
|
||||
|
||||
;
|
||||
}
|
||||
@@ -183,6 +187,8 @@ void to_json(nlohmann::json& j, const Jfjoch_statistics& o)
|
||||
j["zeromq_metadata"] = o.m_Zeromq_metadata;
|
||||
if(o.pixelMaskIsSet())
|
||||
j["pixel_mask"] = o.m_Pixel_mask;
|
||||
if(o.roiIsSet())
|
||||
j["roi"] = o.m_Roi;
|
||||
|
||||
}
|
||||
|
||||
@@ -253,6 +259,11 @@ void from_json(const nlohmann::json& j, Jfjoch_statistics& o)
|
||||
j.at("pixel_mask").get_to(o.m_Pixel_mask);
|
||||
o.m_Pixel_maskIsSet = true;
|
||||
}
|
||||
if(j.find("roi") != j.end())
|
||||
{
|
||||
j.at("roi").get_to(o.m_Roi);
|
||||
o.m_RoiIsSet = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -477,6 +488,23 @@ void Jfjoch_statistics::unsetPixel_mask()
|
||||
{
|
||||
m_Pixel_maskIsSet = false;
|
||||
}
|
||||
org::openapitools::server::model::Roi_definitions Jfjoch_statistics::getRoi() const
|
||||
{
|
||||
return m_Roi;
|
||||
}
|
||||
void Jfjoch_statistics::setRoi(org::openapitools::server::model::Roi_definitions const& value)
|
||||
{
|
||||
m_Roi = value;
|
||||
m_RoiIsSet = true;
|
||||
}
|
||||
bool Jfjoch_statistics::roiIsSet() const
|
||||
{
|
||||
return m_RoiIsSet;
|
||||
}
|
||||
void Jfjoch_statistics::unsetRoi()
|
||||
{
|
||||
m_RoiIsSet = false;
|
||||
}
|
||||
|
||||
|
||||
} // namespace org::openapitools::server::model
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "Detector_settings.h"
|
||||
#include <vector>
|
||||
#include "Detector_status.h"
|
||||
#include "Roi_definitions.h"
|
||||
#include "Fpga_status_inner.h"
|
||||
#include "Instrument_metadata.h"
|
||||
#include <nlohmann/json.hpp>
|
||||
@@ -162,6 +163,13 @@ public:
|
||||
void setPixelMask(org::openapitools::server::model::Pixel_mask_statistics const& value);
|
||||
bool pixelMaskIsSet() const;
|
||||
void unsetPixel_mask();
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
org::openapitools::server::model::Roi_definitions getRoi() const;
|
||||
void setRoi(org::openapitools::server::model::Roi_definitions const& value);
|
||||
bool roiIsSet() const;
|
||||
void unsetRoi();
|
||||
|
||||
friend void to_json(nlohmann::json& j, const Jfjoch_statistics& o);
|
||||
friend void from_json(const nlohmann::json& j, Jfjoch_statistics& o);
|
||||
@@ -192,6 +200,8 @@ protected:
|
||||
bool m_Zeromq_metadataIsSet;
|
||||
org::openapitools::server::model::Pixel_mask_statistics m_Pixel_mask;
|
||||
bool m_Pixel_maskIsSet;
|
||||
org::openapitools::server::model::Roi_definitions m_Roi;
|
||||
bool m_RoiIsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
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.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
#include "Roi_definitions.h"
|
||||
#include "Helpers.h"
|
||||
|
||||
#include <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.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
/*
|
||||
* Roi_definitions.h
|
||||
*
|
||||
* ROI defintions
|
||||
*/
|
||||
|
||||
#ifndef Roi_definitions_H_
|
||||
#define Roi_definitions_H_
|
||||
|
||||
|
||||
#include "Roi_circle_list.h"
|
||||
#include "Roi_box_list.h"
|
||||
#include <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.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Jungfraujoch
|
||||
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0-rc.28
|
||||
* The version of the OpenAPI document: 1.0.0-rc.29
|
||||
* Contact: filip.leonarski@psi.ch
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -5,7 +5,7 @@ info:
|
||||
API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland).
|
||||
Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU.
|
||||
Jungfraujoch uses FPGA boards to acquire data at high data rates.
|
||||
version: 1.0.0-rc.28
|
||||
version: 1.0.0-rc.29
|
||||
contact:
|
||||
name: Filip Leonarski (Paul Scherrer Institute)
|
||||
email: filip.leonarski@psi.ch
|
||||
@@ -438,7 +438,7 @@ components:
|
||||
This is internal frame time for the JUNGFRAU detector, image time has to be integer multiply of this number.
|
||||
For EIGER detector this is default frame time, not used otherwise
|
||||
format: int64
|
||||
minimum: 450
|
||||
minimum: 1
|
||||
count_time_us:
|
||||
type: integer
|
||||
description: |
|
||||
@@ -610,6 +610,60 @@ components:
|
||||
q_spacing:
|
||||
type: number
|
||||
format: float
|
||||
detector_list_element:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- nmodules
|
||||
- description
|
||||
- width
|
||||
- height
|
||||
- serial_number
|
||||
- base_ipv4_addr
|
||||
- udp_interface_count
|
||||
- readout_time_us
|
||||
- min_frame_time_us
|
||||
- min_count_time_us
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
format: int64
|
||||
minimum: 0
|
||||
description:
|
||||
type: string
|
||||
example: "JUNGFRAU 4 Mpixel"
|
||||
serial_number:
|
||||
type: string
|
||||
example: "JF17T16V01"
|
||||
base_ipv4_addr:
|
||||
type: string
|
||||
example: "10.10.10.1"
|
||||
udp_interface_count:
|
||||
type: integer
|
||||
format: int64
|
||||
example: 2
|
||||
description: Number of UDP interfaces per detector module
|
||||
nmodules:
|
||||
type: integer
|
||||
format: int64
|
||||
example: 18
|
||||
width:
|
||||
type: integer
|
||||
format: int64
|
||||
example: 2068
|
||||
height:
|
||||
type: integer
|
||||
format: int64
|
||||
example: 2164
|
||||
readout_time_us:
|
||||
type: integer
|
||||
format: int64
|
||||
min_frame_time_us:
|
||||
type: integer
|
||||
format: int64
|
||||
min_count_time_us:
|
||||
type: integer
|
||||
format: int64
|
||||
detector_list:
|
||||
type: object
|
||||
required:
|
||||
@@ -619,47 +673,7 @@ components:
|
||||
detectors:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- nmodules
|
||||
- description
|
||||
- width
|
||||
- height
|
||||
- serial_number
|
||||
- base_ipv4_addr
|
||||
- udp_interface_count
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
format: int64
|
||||
minimum: 0
|
||||
description:
|
||||
type: string
|
||||
example: "JUNGFRAU 4 Mpixel"
|
||||
serial_number:
|
||||
type: string
|
||||
example: "JF17T16V01"
|
||||
base_ipv4_addr:
|
||||
type: string
|
||||
example: "10.10.10.1"
|
||||
udp_interface_count:
|
||||
type: integer
|
||||
format: int64
|
||||
example: 2
|
||||
description: Number of UDP interfaces per detector module
|
||||
nmodules:
|
||||
type: integer
|
||||
format: int64
|
||||
example: 18
|
||||
width:
|
||||
type: integer
|
||||
format: int64
|
||||
example: 2068
|
||||
height:
|
||||
type: integer
|
||||
format: int64
|
||||
example: 2164
|
||||
$ref: '#/components/schemas/detector_list_element'
|
||||
current_id:
|
||||
type: integer
|
||||
format: int64
|
||||
@@ -806,12 +820,17 @@ components:
|
||||
example: 1.0
|
||||
minimum: 0.0
|
||||
maximum: 1.0
|
||||
error_message:
|
||||
message:
|
||||
type: string
|
||||
description: |
|
||||
Last error message in case detector is in the Error state
|
||||
Message to display besides state of the jfjoch_broker; mostly used for errors and warnings
|
||||
This matters especially for async functions (start/initialize), where API won't return reason
|
||||
for the error during async operation.
|
||||
message_severity:
|
||||
type: string
|
||||
enum: ["success", "info", "warning", "error"]
|
||||
default: "error"
|
||||
description: Level of the message to display
|
||||
plot:
|
||||
type: object
|
||||
required:
|
||||
@@ -916,6 +935,8 @@ components:
|
||||
$ref: '#/components/schemas/zeromq_metadata_settings'
|
||||
pixel_mask:
|
||||
$ref: '#/components/schemas/pixel_mask_statistics'
|
||||
roi:
|
||||
$ref: '#/components/schemas/roi_definitions'
|
||||
preview_settings:
|
||||
type: object
|
||||
description: "Settings for JPEG rendering of preview images"
|
||||
@@ -1052,6 +1073,17 @@ components:
|
||||
maxItems: 32
|
||||
items:
|
||||
$ref: "#/components/schemas/roi_box"
|
||||
roi_definitions:
|
||||
type: object
|
||||
required:
|
||||
- box
|
||||
- circle
|
||||
description: "ROI defintions"
|
||||
properties:
|
||||
box:
|
||||
$ref: '#/components/schemas/roi_box_list'
|
||||
circle:
|
||||
$ref: '#/components/schemas/roi_circle_list'
|
||||
instrument_metadata:
|
||||
type: object
|
||||
description: "Metadata for a measurement instrument"
|
||||
@@ -1183,11 +1215,19 @@ components:
|
||||
format: float
|
||||
minimum: 0
|
||||
default: 320
|
||||
readout_time_us:
|
||||
type: integer
|
||||
format: int64
|
||||
minimum: 1
|
||||
description: |
|
||||
Minimum difference between frame time and count time in microseconds
|
||||
Defaults are 3 us for EIGER and 20 us for JUNGFRAU
|
||||
calibration_file:
|
||||
type: array
|
||||
description: |
|
||||
Gain file (JUNGFRAU) or trimbit file (EIGER).
|
||||
One entry per module. Either empty or number of module entries.
|
||||
Can be empty for all detectors - default calibration used.
|
||||
For JUNGFRAU: list of gain files, one entry per module.
|
||||
For EIGER: one directory (with detector settings) or list of trim bit files, one entry per half-module.
|
||||
items:
|
||||
type: string
|
||||
hostname:
|
||||
@@ -1969,56 +2009,23 @@ paths:
|
||||
schema:
|
||||
type: string
|
||||
description: Exception error
|
||||
/roi/box:
|
||||
/config/roi:
|
||||
get:
|
||||
summary: Get box ROIs
|
||||
summary: Get ROI definitions
|
||||
responses:
|
||||
"200":
|
||||
description: "OK"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/roi_box_list'
|
||||
$ref: '#/components/schemas/roi_definitions'
|
||||
put:
|
||||
summary: Upload box ROIs
|
||||
summary: Upload ROI definitions
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/roi_box_list"
|
||||
responses:
|
||||
"200":
|
||||
description: Everything OK
|
||||
"400":
|
||||
description: Input parsing or validation error
|
||||
content:
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
description: Exception error
|
||||
"500":
|
||||
description: Error within Jungfraujoch code - see output message.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/error_message'
|
||||
/roi/circle:
|
||||
get:
|
||||
summary: Get circular ROI
|
||||
responses:
|
||||
"200":
|
||||
description: "OK"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/roi_circle_list'
|
||||
put:
|
||||
summary: Upload circular ROI
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/roi_circle_list"
|
||||
$ref: "#/components/schemas/roi_definitions"
|
||||
responses:
|
||||
"200":
|
||||
description: Everything OK
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -73,6 +73,8 @@ ADD_LIBRARY(JFJochCommon STATIC
|
||||
AutoIncrVector.h
|
||||
ModuleSummation.cpp
|
||||
ModuleSummation.h
|
||||
ROIDefinition.cpp
|
||||
ROIDefinition.h
|
||||
)
|
||||
|
||||
TARGET_LINK_LIBRARIES(JFJochCommon JFJochLogger Compression JFCalibration Threads::Threads -lrt )
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user