Files
Jungfraujoch/broker/gen/model/Detector.cpp
T
leonarski_fandjungfrau 4dc2534dbf
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 18m57s
Build Packages / Unit tests (push) Skipped
Build Packages / build:windows:nocuda (push) Successful in 16m55s
Build Packages / build:windows:cuda (push) Successful in 18m48s
Build Packages / build:viewer-tgz:cpu (push) Successful in 13m10s
Build Packages / build:viewer-tgz:cuda (push) Successful in 14m45s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 22m23s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 20m12s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 23m7s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 20m43s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 23m9s
Build Packages / XDS test (durin plugin) (push) Successful in 12m26s
Build Packages / build:rpm (rocky9) (push) Successful in 24m58s
Build Packages / Generate python client (push) Successful in 50s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 23m20s
Build Packages / Create release (push) Skipped
Build Packages / XDS test (JFJoch plugin) (push) Successful in 12m37s
Build Packages / build:rpm (rocky8) (push) Successful in 27m58s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 25m38s
Build Packages / Build documentation (push) Successful in 59s
Build Packages / DIALS test (push) Successful in 23m16s
Build Packages / XDS test (neggia plugin) (push) Successful in 6m38s
v1.0.0.rc-162 (#72)
**Files written by Jungfraujoch now import correctly in DIALS, XDS and pyFAI.** A tilted detector, a grid scan, a still recorded at a goniometer position, and saturated or unreadable pixels were each described in a way that a third-party program acted on wrongly. If you process Jungfraujoch data outside Jungfraujoch, prefer this release to any earlier one.

* HDF5: the detector tilt (`rot1`/`rot2`/`rot3`) is exported correctly in the NXmx transformation chain; untilted geometries are unaffected.
* HDF5: a still recorded at a goniometer position is no longer read back as a single image, and a grid scan records a stationary spindle so a program that requires a rotation axis can open it.
* HDF5: the sample transformation chain is written in mounting order, with a Smargon head position told apart from the spindle, one entry per image, `module_offset` as a float unit vector, and `offset_units` on every offset.
* HDF5: saturated, underloaded and unreadable pixels are described so a downstream program masks them - `saturation_value`, `underload_value`, `error_value` and `bit_depth_readout` are written correctly, and a data file missing next to a VDS master reads as the error marker rather than as zero counts.
* HDF5: the rotation axis is read back under whatever name it carries, and `mirror_y` records whether the assembled image is mirrored in Y relative to the detector's raw readout.
* A grid scan and a goniometer axis can both be set; they are no longer alternatives.
* `images_per_file` is chosen from the acquisition when it is not given: a rotation sweep of at most 20000 images goes into a single data file, a grid scan splits on whole fast-axis rows, and stills and serial keep 1000.
* The writer refuses a stream whose start message declares a different pixel format than its images carry, and a DECTRIS detector sending signed images is no longer declared unsigned.
* The image stream can carry the sample transformation chain (`transformations`, in the END message); a producer that does not send it gets the same chain built by the writer.
* rugnux: fixing the space group with `-S` no longer prevents the lattice from being found - a lattice indexed in a different setting is reindexed into that group's own setting, and a run whose crystal does not have that group's lattice stops and names the cell it indexed as, rather than reporting statistics that cannot describe it.
* rugnux: the per-image resolution estimate now predicts the resolution the merged data reach rather than the highest-resolution spot found, and is reported as `SPOT_RESOLUTION_ESTIMATE`.
* rugnux: two runs of the same command on the same images produce the same merged intensities; the azimuthal profile written alongside them is not yet reproducible in the same way.
* rugnux: the offline lattice refinement is bounded by iterations rather than by a wall clock, so a loaded machine can no longer refine to a different lattice; a live acquisition keeps its real-time bound.
* rugnux: the detector-frame modulation correction is fitted on a grid spanning the detector, so whether it is applied no longer depends on how far integration reached.
* rugnux: the geometry pre-pass no longer writes `<prefix>_01.mtz`, `_01.cif`, `_01.hkl` and `_01_image.dat`; the refined second pass writes those files under `<prefix>`, and that is the result to use.
* rugnux: `_process.h5` describes the pixel format of the images it links to, and is written on a thread of its own.
* rugnux: the detector geometry is also logged in XDS's convention (`ORGX`/`ORGY`, detector axis vectors, rotation axis), so it can be compared with an XDS refinement.
* rugnux: an image integrated in pyFAI through the `.poni` file written by `--mode calibration` comes out with the correct azimuth, and the file declares pyFAI's `orientation`, which needs pyFAI 2024.01 or newer. Radial integration is unchanged.
* rugnux: a rotation run is substantially faster throughout - beam-stop detection, first-pass indexing, geometry refinement, integration, scaling and merging - and observations outside the scaling resolution range are dropped as they are ingested. The refined geometry, the space group chosen and the merged statistics are unchanged.
* Faster spot finding and indexing, on the broker as well as in rugnux; the spots found and the lattices indexed are unchanged.
* A run reserves substantially less GPU memory: nothing is allocated for buffers that are never read, and a worker builds only the engines it uses.
* rugnux: with `-N` left at its default the per-image loop of `--mode mx` uses at most 16 workers per GPU, rather than one per hardware thread; an explicit `-N` is obeyed as given.
* CUDA 12 builds now contain device code for Volta, so the RHEL 8 packages and the portable Linux `.tgz` run on a V100; the CUDA 13 artefacts (RHEL 9, Ubuntu, Windows) remain Turing and newer.
* The build resolves a single Eigen for the whole project, and refuses to configure if Ceres picks up a different one; a build that mixed two Eigen versions was undefined behaviour and crashed at -O2.
* Documentation: a security page, and the supported GPU generations and minimum NVIDIA driver version of every released artefact.

**Breaking change to OpenAPI** - regenerate the client (`jfjoch-client` 1.0.0-rc.162, `frontend/src/client`):
* `dataset_settings.images_per_file` is no longer `default: 1000` and no longer accepts `0`; it is optional, and its minimum is 1. A client sending `0` (previously "one file for the whole run") is now rejected - omit the field instead, which for a rotation sweep gives the same single file.
* `file_writer_format` now defaults to `NXmxVDS`, matching the server's own default and the layout recommended for DIALS, XDS and CrystFEL. A generated client that fills in schema defaults and does not set the format explicitly will write VDS masters where it previously wrote legacy ones; set `NXmxLegacy` explicitly to keep them.

---------

Co-authored-by: jungfrau <jungfrau@mx-aare-test.psi.ch>
Reviewed-on: #72
Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch>
2026-08-25 08:21:39 +02:00

944 lines
27 KiB
C++

/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.162
* 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.h"
#include "Helpers.h"
#include <sstream>
namespace org::openapitools::server::model
{
Detector::Detector()
{
m_Description = "";
m_Serial_number = "Unknown";
m_Serial_numberIsSet = false;
m_TypeIsSet = false;
m_High_voltage_V = 0L;
m_High_voltage_VIsSet = false;
m_Udp_interface_count = 1L;
m_Udp_interface_countIsSet = false;
m_Module_sync = true;
m_Module_syncIsSet = false;
m_Sensor_thickness_um = 320.0f;
m_Sensor_thickness_umIsSet = false;
m_Readout_time_ns = 0L;
m_Readout_time_nsIsSet = false;
m_Min_count_time_ns = 0L;
m_Min_count_time_nsIsSet = false;
m_Min_frame_time_ns = 0L;
m_Min_frame_time_nsIsSet = false;
m_Calibration_fileIsSet = false;
m_Trim_energies_eVIsSet = false;
m_HostnameIsSet = false;
m_Sensor_material = "Si";
m_Sensor_materialIsSet = false;
m_Tx_delayIsSet = false;
m_Base_data_ipv4_address = "";
m_Base_data_ipv4_addressIsSet = false;
m_Standard_geometryIsSet = false;
m_Custom_geometryIsSet = false;
m_Roi_mode = "";
m_Roi_modeIsSet = false;
m_Mirror_y = true;
m_Mirror_yIsSet = false;
m_Temp_thresold_degC = 55L;
m_Temp_thresold_degCIsSet = false;
m_Default_settingsIsSet = false;
}
void Detector::validate() const
{
std::stringstream msg;
if (!validate(msg))
{
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool Detector::validate(std::stringstream& msg) const
{
return validate(msg, "");
}
bool Detector::validate(std::stringstream& msg, const std::string& pathPrefix) const
{
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "Detector" : pathPrefix;
/* Description */ {
const std::string& value = m_Description;
const std::string currentValuePath = _pathPrefix + ".description";
if (value.length() < 1)
{
success = false;
msg << currentValuePath << ": must be at least 1 characters long;";
}
}
if (serialNumberIsSet())
{
const std::string& value = m_Serial_number;
const std::string currentValuePath = _pathPrefix + ".serialNumber";
if (value.length() < 1)
{
success = false;
msg << currentValuePath << ": must be at least 1 characters long;";
}
}
if (highVoltageVIsSet())
{
const int64_t& value = m_High_voltage_V;
const std::string currentValuePath = _pathPrefix + ".highVoltageV";
if (value < 0ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0;";
}
if (value > 200ll)
{
success = false;
msg << currentValuePath << ": must be less than or equal to 200;";
}
}
if (udpInterfaceCountIsSet())
{
const int64_t& value = m_Udp_interface_count;
const std::string currentValuePath = _pathPrefix + ".udpInterfaceCount";
if (value < 1ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 1;";
}
if (value > 2ll)
{
success = false;
msg << currentValuePath << ": must be less than or equal to 2;";
}
}
if (sensorThicknessUmIsSet())
{
const float& value = m_Sensor_thickness_um;
const std::string currentValuePath = _pathPrefix + ".sensorThicknessUm";
if (value < static_cast<float>(0))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0;";
}
}
if (readoutTimeNsIsSet())
{
const int64_t& value = m_Readout_time_ns;
const std::string currentValuePath = _pathPrefix + ".readoutTimeNs";
if (value < 1ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 1;";
}
}
if (minCountTimeNsIsSet())
{
const int64_t& value = m_Min_count_time_ns;
const std::string currentValuePath = _pathPrefix + ".minCountTimeNs";
if (value < 0ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0;";
}
}
if (minFrameTimeNsIsSet())
{
const int64_t& value = m_Min_frame_time_ns;
const std::string currentValuePath = _pathPrefix + ".minFrameTimeNs";
if (value < 0ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0;";
}
}
if (calibrationFileIsSet())
{
const std::vector<std::string>& value = m_Calibration_file;
const std::string currentValuePath = _pathPrefix + ".calibrationFile";
{ // Recursive validation of array elements
const std::string oldValuePath = currentValuePath;
int i = 0;
for (const std::string& value : value)
{
const std::string currentValuePath = oldValuePath + "[" + std::to_string(i) + "]";
i++;
}
}
}
if (trimEnergiesEVIsSet())
{
const std::vector<int32_t>& value = m_Trim_energies_eV;
const std::string currentValuePath = _pathPrefix + ".trimEnergiesEV";
{ // Recursive validation of array elements
const std::string oldValuePath = currentValuePath;
int i = 0;
for (const int32_t& value : value)
{
const std::string currentValuePath = oldValuePath + "[" + std::to_string(i) + "]";
if (value < 100)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 100;";
}
i++;
}
}
}
if (hostnameIsSet())
{
const std::vector<std::string>& value = m_Hostname;
const std::string currentValuePath = _pathPrefix + ".hostname";
{ // Recursive validation of array elements
const std::string oldValuePath = currentValuePath;
int i = 0;
for (const std::string& value : value)
{
const std::string currentValuePath = oldValuePath + "[" + std::to_string(i) + "]";
i++;
}
}
}
if (txDelayIsSet())
{
const std::vector<int64_t>& value = m_Tx_delay;
const std::string currentValuePath = _pathPrefix + ".txDelay";
{ // Recursive validation of array elements
const std::string oldValuePath = currentValuePath;
int i = 0;
for (const int64_t& value : value)
{
const std::string currentValuePath = oldValuePath + "[" + std::to_string(i) + "]";
i++;
}
}
}
if (customGeometryIsSet())
{
const std::vector<org::openapitools::server::model::Detector_module>& value = m_Custom_geometry;
const std::string currentValuePath = _pathPrefix + ".customGeometry";
{ // Recursive validation of array elements
const std::string oldValuePath = currentValuePath;
int i = 0;
for (const org::openapitools::server::model::Detector_module& value : value)
{
const std::string currentValuePath = oldValuePath + "[" + std::to_string(i) + "]";
success = value.validate(msg, currentValuePath + ".customGeometry") && success;
i++;
}
}
}
if (tempThresoldDegCIsSet())
{
const int64_t& value = m_Temp_thresold_degC;
const std::string currentValuePath = _pathPrefix + ".tempThresoldDegC";
if (value < 40ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 40;";
}
if (value > 70ll)
{
success = false;
msg << currentValuePath << ": must be less than or equal to 70;";
}
}
return success;
}
bool Detector::operator==(const Detector& rhs) const
{
return
(getDescription() == rhs.getDescription())
&&
((!serialNumberIsSet() && !rhs.serialNumberIsSet()) || (serialNumberIsSet() && rhs.serialNumberIsSet() && getSerialNumber() == rhs.getSerialNumber())) &&
((!typeIsSet() && !rhs.typeIsSet()) || (typeIsSet() && rhs.typeIsSet() && getType() == rhs.getType())) &&
((!highVoltageVIsSet() && !rhs.highVoltageVIsSet()) || (highVoltageVIsSet() && rhs.highVoltageVIsSet() && getHighVoltageV() == rhs.getHighVoltageV())) &&
((!udpInterfaceCountIsSet() && !rhs.udpInterfaceCountIsSet()) || (udpInterfaceCountIsSet() && rhs.udpInterfaceCountIsSet() && getUdpInterfaceCount() == rhs.getUdpInterfaceCount())) &&
((!moduleSyncIsSet() && !rhs.moduleSyncIsSet()) || (moduleSyncIsSet() && rhs.moduleSyncIsSet() && isModuleSync() == rhs.isModuleSync())) &&
((!sensorThicknessUmIsSet() && !rhs.sensorThicknessUmIsSet()) || (sensorThicknessUmIsSet() && rhs.sensorThicknessUmIsSet() && getSensorThicknessUm() == rhs.getSensorThicknessUm())) &&
((!readoutTimeNsIsSet() && !rhs.readoutTimeNsIsSet()) || (readoutTimeNsIsSet() && rhs.readoutTimeNsIsSet() && getReadoutTimeNs() == rhs.getReadoutTimeNs())) &&
((!minCountTimeNsIsSet() && !rhs.minCountTimeNsIsSet()) || (minCountTimeNsIsSet() && rhs.minCountTimeNsIsSet() && getMinCountTimeNs() == rhs.getMinCountTimeNs())) &&
((!minFrameTimeNsIsSet() && !rhs.minFrameTimeNsIsSet()) || (minFrameTimeNsIsSet() && rhs.minFrameTimeNsIsSet() && getMinFrameTimeNs() == rhs.getMinFrameTimeNs())) &&
((!calibrationFileIsSet() && !rhs.calibrationFileIsSet()) || (calibrationFileIsSet() && rhs.calibrationFileIsSet() && getCalibrationFile() == rhs.getCalibrationFile())) &&
((!trimEnergiesEVIsSet() && !rhs.trimEnergiesEVIsSet()) || (trimEnergiesEVIsSet() && rhs.trimEnergiesEVIsSet() && getTrimEnergiesEV() == rhs.getTrimEnergiesEV())) &&
((!hostnameIsSet() && !rhs.hostnameIsSet()) || (hostnameIsSet() && rhs.hostnameIsSet() && getHostname() == rhs.getHostname())) &&
((!sensorMaterialIsSet() && !rhs.sensorMaterialIsSet()) || (sensorMaterialIsSet() && rhs.sensorMaterialIsSet() && getSensorMaterial() == rhs.getSensorMaterial())) &&
((!txDelayIsSet() && !rhs.txDelayIsSet()) || (txDelayIsSet() && rhs.txDelayIsSet() && getTxDelay() == rhs.getTxDelay())) &&
((!baseDataIpv4AddressIsSet() && !rhs.baseDataIpv4AddressIsSet()) || (baseDataIpv4AddressIsSet() && rhs.baseDataIpv4AddressIsSet() && getBaseDataIpv4Address() == rhs.getBaseDataIpv4Address())) &&
((!standardGeometryIsSet() && !rhs.standardGeometryIsSet()) || (standardGeometryIsSet() && rhs.standardGeometryIsSet() && getStandardGeometry() == rhs.getStandardGeometry())) &&
((!customGeometryIsSet() && !rhs.customGeometryIsSet()) || (customGeometryIsSet() && rhs.customGeometryIsSet() && getCustomGeometry() == rhs.getCustomGeometry())) &&
((!roiModeIsSet() && !rhs.roiModeIsSet()) || (roiModeIsSet() && rhs.roiModeIsSet() && getRoiMode() == rhs.getRoiMode())) &&
((!mirrorYIsSet() && !rhs.mirrorYIsSet()) || (mirrorYIsSet() && rhs.mirrorYIsSet() && isMirrorY() == rhs.isMirrorY())) &&
((!tempThresoldDegCIsSet() && !rhs.tempThresoldDegCIsSet()) || (tempThresoldDegCIsSet() && rhs.tempThresoldDegCIsSet() && getTempThresoldDegC() == rhs.getTempThresoldDegC())) &&
((!defaultSettingsIsSet() && !rhs.defaultSettingsIsSet()) || (defaultSettingsIsSet() && rhs.defaultSettingsIsSet() && getDefaultSettings() == rhs.getDefaultSettings()))
;
}
bool Detector::operator!=(const Detector& rhs) const
{
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const Detector& o)
{
j = nlohmann::json::object();
j["description"] = o.m_Description;
if(o.serialNumberIsSet())
j["serial_number"] = o.m_Serial_number;
if(o.typeIsSet())
j["type"] = o.m_Type;
if(o.highVoltageVIsSet())
j["high_voltage_V"] = o.m_High_voltage_V;
if(o.udpInterfaceCountIsSet())
j["udp_interface_count"] = o.m_Udp_interface_count;
if(o.moduleSyncIsSet())
j["module_sync"] = o.m_Module_sync;
if(o.sensorThicknessUmIsSet())
j["sensor_thickness_um"] = o.m_Sensor_thickness_um;
if(o.readoutTimeNsIsSet())
j["readout_time_ns"] = o.m_Readout_time_ns;
if(o.minCountTimeNsIsSet())
j["min_count_time_ns"] = o.m_Min_count_time_ns;
if(o.minFrameTimeNsIsSet())
j["min_frame_time_ns"] = o.m_Min_frame_time_ns;
if(o.calibrationFileIsSet() || !o.m_Calibration_file.empty())
j["calibration_file"] = o.m_Calibration_file;
if(o.trimEnergiesEVIsSet() || !o.m_Trim_energies_eV.empty())
j["trim_energies_eV"] = o.m_Trim_energies_eV;
if(o.hostnameIsSet() || !o.m_Hostname.empty())
j["hostname"] = o.m_Hostname;
if(o.sensorMaterialIsSet())
j["sensor_material"] = o.m_Sensor_material;
if(o.txDelayIsSet() || !o.m_Tx_delay.empty())
j["tx_delay"] = o.m_Tx_delay;
if(o.baseDataIpv4AddressIsSet())
j["base_data_ipv4_address"] = o.m_Base_data_ipv4_address;
if(o.standardGeometryIsSet())
j["standard_geometry"] = o.m_Standard_geometry;
if(o.customGeometryIsSet() || !o.m_Custom_geometry.empty())
j["custom_geometry"] = o.m_Custom_geometry;
if(o.roiModeIsSet())
j["roi_mode"] = o.m_Roi_mode;
if(o.mirrorYIsSet())
j["mirror_y"] = o.m_Mirror_y;
if(o.tempThresoldDegCIsSet())
j["temp_thresold_degC"] = o.m_Temp_thresold_degC;
if(o.defaultSettingsIsSet())
j["default_settings"] = o.m_Default_settings;
}
void from_json(const nlohmann::json& j, Detector& o)
{
j.at("description").get_to(o.m_Description);
if(j.find("serial_number") != j.end())
{
j.at("serial_number").get_to(o.m_Serial_number);
o.m_Serial_numberIsSet = true;
}
if(j.find("type") != j.end())
{
j.at("type").get_to(o.m_Type);
o.m_TypeIsSet = true;
}
if(j.find("high_voltage_V") != j.end())
{
j.at("high_voltage_V").get_to(o.m_High_voltage_V);
o.m_High_voltage_VIsSet = true;
}
if(j.find("udp_interface_count") != j.end())
{
j.at("udp_interface_count").get_to(o.m_Udp_interface_count);
o.m_Udp_interface_countIsSet = true;
}
if(j.find("module_sync") != j.end())
{
j.at("module_sync").get_to(o.m_Module_sync);
o.m_Module_syncIsSet = true;
}
if(j.find("sensor_thickness_um") != j.end())
{
j.at("sensor_thickness_um").get_to(o.m_Sensor_thickness_um);
o.m_Sensor_thickness_umIsSet = true;
}
if(j.find("readout_time_ns") != j.end())
{
j.at("readout_time_ns").get_to(o.m_Readout_time_ns);
o.m_Readout_time_nsIsSet = true;
}
if(j.find("min_count_time_ns") != j.end())
{
j.at("min_count_time_ns").get_to(o.m_Min_count_time_ns);
o.m_Min_count_time_nsIsSet = true;
}
if(j.find("min_frame_time_ns") != j.end())
{
j.at("min_frame_time_ns").get_to(o.m_Min_frame_time_ns);
o.m_Min_frame_time_nsIsSet = true;
}
if(j.find("calibration_file") != j.end())
{
j.at("calibration_file").get_to(o.m_Calibration_file);
o.m_Calibration_fileIsSet = true;
}
if(j.find("trim_energies_eV") != j.end())
{
j.at("trim_energies_eV").get_to(o.m_Trim_energies_eV);
o.m_Trim_energies_eVIsSet = true;
}
if(j.find("hostname") != j.end())
{
j.at("hostname").get_to(o.m_Hostname);
o.m_HostnameIsSet = true;
}
if(j.find("sensor_material") != j.end())
{
j.at("sensor_material").get_to(o.m_Sensor_material);
o.m_Sensor_materialIsSet = true;
}
if(j.find("tx_delay") != j.end())
{
j.at("tx_delay").get_to(o.m_Tx_delay);
o.m_Tx_delayIsSet = true;
}
if(j.find("base_data_ipv4_address") != j.end())
{
j.at("base_data_ipv4_address").get_to(o.m_Base_data_ipv4_address);
o.m_Base_data_ipv4_addressIsSet = true;
}
if(j.find("standard_geometry") != j.end())
{
j.at("standard_geometry").get_to(o.m_Standard_geometry);
o.m_Standard_geometryIsSet = true;
}
if(j.find("custom_geometry") != j.end())
{
j.at("custom_geometry").get_to(o.m_Custom_geometry);
o.m_Custom_geometryIsSet = true;
}
if(j.find("roi_mode") != j.end())
{
j.at("roi_mode").get_to(o.m_Roi_mode);
o.m_Roi_modeIsSet = true;
}
if(j.find("mirror_y") != j.end())
{
j.at("mirror_y").get_to(o.m_Mirror_y);
o.m_Mirror_yIsSet = true;
}
if(j.find("temp_thresold_degC") != j.end())
{
j.at("temp_thresold_degC").get_to(o.m_Temp_thresold_degC);
o.m_Temp_thresold_degCIsSet = true;
}
if(j.find("default_settings") != j.end())
{
j.at("default_settings").get_to(o.m_Default_settings);
o.m_Default_settingsIsSet = true;
}
}
std::string Detector::getDescription() const
{
return m_Description;
}
void Detector::setDescription(std::string const& value)
{
m_Description = value;
}
std::string Detector::getSerialNumber() const
{
return m_Serial_number;
}
void Detector::setSerialNumber(std::string const& value)
{
m_Serial_number = value;
m_Serial_numberIsSet = true;
}
bool Detector::serialNumberIsSet() const
{
return m_Serial_numberIsSet;
}
void Detector::unsetSerial_number()
{
m_Serial_numberIsSet = false;
}
org::openapitools::server::model::Detector_type Detector::getType() const
{
return m_Type;
}
void Detector::setType(org::openapitools::server::model::Detector_type const& value)
{
m_Type = value;
m_TypeIsSet = true;
}
bool Detector::typeIsSet() const
{
return m_TypeIsSet;
}
void Detector::unsetType()
{
m_TypeIsSet = false;
}
int64_t Detector::getHighVoltageV() const
{
return m_High_voltage_V;
}
void Detector::setHighVoltageV(int64_t const value)
{
m_High_voltage_V = value;
m_High_voltage_VIsSet = true;
}
bool Detector::highVoltageVIsSet() const
{
return m_High_voltage_VIsSet;
}
void Detector::unsetHigh_voltage_V()
{
m_High_voltage_VIsSet = false;
}
int64_t Detector::getUdpInterfaceCount() const
{
return m_Udp_interface_count;
}
void Detector::setUdpInterfaceCount(int64_t const value)
{
m_Udp_interface_count = value;
m_Udp_interface_countIsSet = true;
}
bool Detector::udpInterfaceCountIsSet() const
{
return m_Udp_interface_countIsSet;
}
void Detector::unsetUdp_interface_count()
{
m_Udp_interface_countIsSet = false;
}
bool Detector::isModuleSync() const
{
return m_Module_sync;
}
void Detector::setModuleSync(bool const value)
{
m_Module_sync = value;
m_Module_syncIsSet = true;
}
bool Detector::moduleSyncIsSet() const
{
return m_Module_syncIsSet;
}
void Detector::unsetModule_sync()
{
m_Module_syncIsSet = false;
}
float Detector::getSensorThicknessUm() const
{
return m_Sensor_thickness_um;
}
void Detector::setSensorThicknessUm(float const value)
{
m_Sensor_thickness_um = value;
m_Sensor_thickness_umIsSet = true;
}
bool Detector::sensorThicknessUmIsSet() const
{
return m_Sensor_thickness_umIsSet;
}
void Detector::unsetSensor_thickness_um()
{
m_Sensor_thickness_umIsSet = false;
}
int64_t Detector::getReadoutTimeNs() const
{
return m_Readout_time_ns;
}
void Detector::setReadoutTimeNs(int64_t const value)
{
m_Readout_time_ns = value;
m_Readout_time_nsIsSet = true;
}
bool Detector::readoutTimeNsIsSet() const
{
return m_Readout_time_nsIsSet;
}
void Detector::unsetReadout_time_ns()
{
m_Readout_time_nsIsSet = false;
}
int64_t Detector::getMinCountTimeNs() const
{
return m_Min_count_time_ns;
}
void Detector::setMinCountTimeNs(int64_t const value)
{
m_Min_count_time_ns = value;
m_Min_count_time_nsIsSet = true;
}
bool Detector::minCountTimeNsIsSet() const
{
return m_Min_count_time_nsIsSet;
}
void Detector::unsetMin_count_time_ns()
{
m_Min_count_time_nsIsSet = false;
}
int64_t Detector::getMinFrameTimeNs() const
{
return m_Min_frame_time_ns;
}
void Detector::setMinFrameTimeNs(int64_t const value)
{
m_Min_frame_time_ns = value;
m_Min_frame_time_nsIsSet = true;
}
bool Detector::minFrameTimeNsIsSet() const
{
return m_Min_frame_time_nsIsSet;
}
void Detector::unsetMin_frame_time_ns()
{
m_Min_frame_time_nsIsSet = false;
}
std::vector<std::string> Detector::getCalibrationFile() const
{
return m_Calibration_file;
}
void Detector::setCalibrationFile(std::vector<std::string> const& value)
{
m_Calibration_file = value;
m_Calibration_fileIsSet = true;
}
bool Detector::calibrationFileIsSet() const
{
return m_Calibration_fileIsSet;
}
void Detector::unsetCalibration_file()
{
m_Calibration_fileIsSet = false;
}
std::vector<int32_t> Detector::getTrimEnergiesEV() const
{
return m_Trim_energies_eV;
}
void Detector::setTrimEnergiesEV(std::vector<int32_t> const value)
{
m_Trim_energies_eV = value;
m_Trim_energies_eVIsSet = true;
}
bool Detector::trimEnergiesEVIsSet() const
{
return m_Trim_energies_eVIsSet;
}
void Detector::unsetTrim_energies_eV()
{
m_Trim_energies_eVIsSet = false;
}
std::vector<std::string> Detector::getHostname() const
{
return m_Hostname;
}
void Detector::setHostname(std::vector<std::string> const& value)
{
m_Hostname = value;
m_HostnameIsSet = true;
}
bool Detector::hostnameIsSet() const
{
return m_HostnameIsSet;
}
void Detector::unsetHostname()
{
m_HostnameIsSet = false;
}
std::string Detector::getSensorMaterial() const
{
return m_Sensor_material;
}
void Detector::setSensorMaterial(std::string const& value)
{
m_Sensor_material = value;
m_Sensor_materialIsSet = true;
}
bool Detector::sensorMaterialIsSet() const
{
return m_Sensor_materialIsSet;
}
void Detector::unsetSensor_material()
{
m_Sensor_materialIsSet = false;
}
std::vector<int64_t> Detector::getTxDelay() const
{
return m_Tx_delay;
}
void Detector::setTxDelay(std::vector<int64_t> const value)
{
m_Tx_delay = value;
m_Tx_delayIsSet = true;
}
bool Detector::txDelayIsSet() const
{
return m_Tx_delayIsSet;
}
void Detector::unsetTx_delay()
{
m_Tx_delayIsSet = false;
}
std::string Detector::getBaseDataIpv4Address() const
{
return m_Base_data_ipv4_address;
}
void Detector::setBaseDataIpv4Address(std::string const& value)
{
m_Base_data_ipv4_address = value;
m_Base_data_ipv4_addressIsSet = true;
}
bool Detector::baseDataIpv4AddressIsSet() const
{
return m_Base_data_ipv4_addressIsSet;
}
void Detector::unsetBase_data_ipv4_address()
{
m_Base_data_ipv4_addressIsSet = false;
}
org::openapitools::server::model::Standard_detector_geometry Detector::getStandardGeometry() const
{
return m_Standard_geometry;
}
void Detector::setStandardGeometry(org::openapitools::server::model::Standard_detector_geometry const& value)
{
m_Standard_geometry = value;
m_Standard_geometryIsSet = true;
}
bool Detector::standardGeometryIsSet() const
{
return m_Standard_geometryIsSet;
}
void Detector::unsetStandard_geometry()
{
m_Standard_geometryIsSet = false;
}
std::vector<org::openapitools::server::model::Detector_module> Detector::getCustomGeometry() const
{
return m_Custom_geometry;
}
void Detector::setCustomGeometry(std::vector<org::openapitools::server::model::Detector_module> const& value)
{
m_Custom_geometry = value;
m_Custom_geometryIsSet = true;
}
bool Detector::customGeometryIsSet() const
{
return m_Custom_geometryIsSet;
}
void Detector::unsetCustom_geometry()
{
m_Custom_geometryIsSet = false;
}
std::string Detector::getRoiMode() const
{
return m_Roi_mode;
}
void Detector::setRoiMode(std::string const& value)
{
m_Roi_mode = value;
m_Roi_modeIsSet = true;
}
bool Detector::roiModeIsSet() const
{
return m_Roi_modeIsSet;
}
void Detector::unsetRoi_mode()
{
m_Roi_modeIsSet = false;
}
bool Detector::isMirrorY() const
{
return m_Mirror_y;
}
void Detector::setMirrorY(bool const value)
{
m_Mirror_y = value;
m_Mirror_yIsSet = true;
}
bool Detector::mirrorYIsSet() const
{
return m_Mirror_yIsSet;
}
void Detector::unsetMirror_y()
{
m_Mirror_yIsSet = false;
}
int64_t Detector::getTempThresoldDegC() const
{
return m_Temp_thresold_degC;
}
void Detector::setTempThresoldDegC(int64_t const value)
{
m_Temp_thresold_degC = value;
m_Temp_thresold_degCIsSet = true;
}
bool Detector::tempThresoldDegCIsSet() const
{
return m_Temp_thresold_degCIsSet;
}
void Detector::unsetTemp_thresold_degC()
{
m_Temp_thresold_degCIsSet = false;
}
org::openapitools::server::model::Detector_settings Detector::getDefaultSettings() const
{
return m_Default_settings;
}
void Detector::setDefaultSettings(org::openapitools::server::model::Detector_settings const& value)
{
m_Default_settings = value;
m_Default_settingsIsSet = true;
}
bool Detector::defaultSettingsIsSet() const
{
return m_Default_settingsIsSet;
}
void Detector::unsetDefault_settings()
{
m_Default_settingsIsSet = false;
}
} // namespace org::openapitools::server::model