Build Packages / Unit tests (push) Successful in 1h28m28s
Build Packages / build:windows:nocuda (push) Successful in 14m45s
Build Packages / build:windows:cuda (push) Successful in 13m13s
Build Packages / build:viewer-tgz:cpu (push) Successful in 6m47s
Build Packages / build:viewer-tgz:cuda (push) Successful in 7m22s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 13m52s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 14m16s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 13m19s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 12m50s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 14m40s
Build Packages / build:rpm (rocky8) (push) Successful in 11m18s
Build Packages / build:rpm (rocky9) (push) Successful in 12m4s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 11m55s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 11m22s
Build Packages / DIALS test (push) Successful in 13m37s
Build Packages / XDS test (durin plugin) (push) Successful in 8m47s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 9m4s
Build Packages / XDS test (neggia plugin) (push) Successful in 7m45s
Build Packages / Generate python client (push) Successful in 34s
Build Packages / Build documentation (push) Successful in 1m4s
Build Packages / Create release (push) Skipped
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 7m16s
This is an UNSTABLE release. It includes many experimental features, as well as many AI generated fixes. We recommend using rc.152 for production use. * rugnux: Rebrand the offline data-processing subsystem as `rugnux` and consolidate all offline analysis into the single `rugnux` binary - `jfjoch_process` is now `rugnux`, the former `jfjoch_azint` is now `rugnux --azint-only`, and `jfjoch_scale` is now `rugnux --scale` (see the new docs/NAMING.md and docs/RUGNUX.md). Scaling and merging are on by default for rotation and stills (`--no-merge` disables them), replacing the previous opt-in `-M, --scale-merge`. * rugnux: CLI fixes - default `-N` to all hardware threads, parse numeric option arguments strictly (reject non-numeric or trailing input instead of silently yielding 0), require `--wavelength > 0`, and correct the reproduced command line and `--scale` reference-cell handling. * rugnux: De-novo space-group improvements - recover genuine high symmetry and centred Bravais lattices from intensities, add an automatic CC1/2 high-resolution cutoff, and report L-test twinning statistics. * rugnux: Index weakly-diffracting low-resolution rotation data that previously failed (e.g. F-cubic crystals that diffract only to ~4 A on a detector reaching ~1.5 A). The per-frame indexing gate now measures the indexed fraction only within the resolution range the lattice actually diffracts to, so the many sub-diffraction ice/noise spots no longer make the fraction floor unreachable; the two-pass first pass tries several image-sampling schemes (spread across the whole rotation vs a consecutive wedge whose native stride keeps a reflection's rocking curve continuous, letting the FFT resolve a long axis) and keeps the one that indexes the most frames; and the de-novo space-group search no longer discards all reflections (and crashes) when every resolution shell falls below <I/sigma> = 1. * rugnux: Lower the low-resolution R-meas for strongly-diffracting rotation data - drop edge-of-sweep truncated fulls whose rocking curve was captured below `--min-captured-fraction` (default 0.7 for rotation), and report R-meas only over the observations kept by outlier rejection (matching XDS). The 0.7 default also strips the partiality-extrapolated fulls that dominate the intensity second moment on weakly-diffracting crystals, so the de-novo space-group search is no longer starved by the error-model I/sigma floor and recovers the correct symmetry (e.g. the F-cubic Benas crystals: Benas_3 -> F432, Benas_7 -> P6122, instead of P4/P1); on the reference battery every other crystal keeps its space group. * rugnux: Write the refined geometry (beam, tilt, axis) to _process.h5 and place non-standard mmCIF items under a reserved `jfjoch` prefix. * jfjoch_broker: Ordinary acquisition failures (receiver/writer/analysis problems, missed packets, writer disconnect) now return to the Idle state with an Error-severity message, so a run can be retried without an expensive re-initialisation; only failures that leave the detector in an undefined state (new JFJochCriticalException, e.g. PCIe/FPGA faults) go to the Error state and force re-initialisation. * jfjoch_broker: A synchronous /start now reports its failure to the HTTP caller instead of returning HTTP 200, and an incomplete or truncated dataset (missing packets, writer disconnect) is reported as an error rather than a "reduce frame rate" warning. * jfjoch_broker: Drop uncollected placeholder rows (number = -1) from the scan_result REST endpoint. * jfjoch_broker: Fix the inverted per-image compression ratio reported by the Lite receiver (was compressed/uncompressed instead of uncompressed/compressed). * jfjoch_broker: Bragg integration adds a quantization-noise variance floor with a box-sum fallback, and treats the type-maximum marker as an invalid pixel for unsigned image types. * jfjoch_writer: Detect file-overwrite conflicts at start for back-channel transports, and reset the writer when end-of-collection finalisation fails. * jfjoch_viewer: Preview overlays follow the geometry (resolution/ROI arcs, true beam centre, predictions, coral secondary-lattice spots, legend), add save-as-JPEG, and fix an HTTP live-follow memory leak. * Frontend: Improved aesthetics and usability, and added in-browser pixel-mask and JUNGFRAU-pedestal visualisation. * CI: Name the Windows installer jfjoch-viewer-* instead of jfjoch-*.Reviewed-on: #67 Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch>
944 lines
27 KiB
C++
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.157
|
|
* 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
|
|
|