Files
Jungfraujoch/broker/gen/model/Detector_list_element.cpp
T
leonarski_fandClaude Opus 5 c8b05295c6
Build Packages / build:rugnux:aarch64 (cross) (push) Successful in 8m27s
Build Packages / build:windows:nocuda (push) Successful in 17m44s
Build Packages / build:rugnux-tgz (x86_64) (push) Successful in 18m14s
Build Packages / build:windows:cuda (push) Successful in 19m4s
Build Packages / build:viewer-tgz:cpu (push) Successful in 20m29s
Build Packages / build:viewer-tgz:cuda (push) Successful in 22m13s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 23m31s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 27m20s
Build Packages / build:rugnux:windows (push) Successful in 10m10s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 28m8s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 19m52s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 25m50s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 24m34s
Build Packages / build:rpm (rocky9) (push) Successful in 23m41s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 21m32s
Build Packages / Generate python client (push) Successful in 35s
Build Packages / build:rpm (rocky8) (push) Successful in 28m36s
Build Packages / Create release (push) Skipped
Build Packages / Build documentation (push) Successful in 1m22s
Build Packages / XDS test (durin plugin) (push) Successful in 9m59s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 27m18s
Build Packages / DIALS test (push) Successful in 26m22s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 10m0s
Build Packages / XDS test (neggia plugin) (push) Successful in 8m29s
Build Packages / Unit tests (push) Successful in 1h26m59s
Version 1.0.0-rc.164
Runs update_version.sh, which regenerates the C++ server model, the
TypeScript frontend client and the python client from the OpenAPI spec.
That also propagates the space_group_number bound raised to 230 in the
previous commit, so the generated clients stop rejecting cubic space
groups before the request is sent.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uwv9ScHtDH6g8tYgfSuApo
2026-08-26 17:00:06 +02:00

303 lines
8.4 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.164
* 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_Pixel_size_mm = 0.0f;
m_Pixel_size_mmIsSet = false;
m_Readout_time_ns = 0L;
m_Min_frame_time_ns = 0L;
m_Min_count_time_ns = 0L;
m_TypeIsSet = false;
}
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())
&&
((!pixelSizeMmIsSet() && !rhs.pixelSizeMmIsSet()) || (pixelSizeMmIsSet() && rhs.pixelSizeMmIsSet() && getPixelSizeMm() == rhs.getPixelSizeMm())) &&
(getReadoutTimeNs() == rhs.getReadoutTimeNs())
&&
(getMinFrameTimeNs() == rhs.getMinFrameTimeNs())
&&
(getMinCountTimeNs() == rhs.getMinCountTimeNs())
&&
((!typeIsSet() && !rhs.typeIsSet()) || (typeIsSet() && rhs.typeIsSet() && getType() == rhs.getType()))
;
}
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;
if(o.pixelSizeMmIsSet())
j["pixel_size_mm"] = o.m_Pixel_size_mm;
j["readout_time_ns"] = o.m_Readout_time_ns;
j["min_frame_time_ns"] = o.m_Min_frame_time_ns;
j["min_count_time_ns"] = o.m_Min_count_time_ns;
if(o.typeIsSet())
j["type"] = o.m_Type;
}
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);
if(j.find("pixel_size_mm") != j.end())
{
j.at("pixel_size_mm").get_to(o.m_Pixel_size_mm);
o.m_Pixel_size_mmIsSet = true;
}
j.at("readout_time_ns").get_to(o.m_Readout_time_ns);
j.at("min_frame_time_ns").get_to(o.m_Min_frame_time_ns);
j.at("min_count_time_ns").get_to(o.m_Min_count_time_ns);
if(j.find("type") != j.end())
{
j.at("type").get_to(o.m_Type);
o.m_TypeIsSet = true;
}
}
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;
}
float Detector_list_element::getPixelSizeMm() const
{
return m_Pixel_size_mm;
}
void Detector_list_element::setPixelSizeMm(float const value)
{
m_Pixel_size_mm = value;
m_Pixel_size_mmIsSet = true;
}
bool Detector_list_element::pixelSizeMmIsSet() const
{
return m_Pixel_size_mmIsSet;
}
void Detector_list_element::unsetPixel_size_mm()
{
m_Pixel_size_mmIsSet = false;
}
int64_t Detector_list_element::getReadoutTimeNs() const
{
return m_Readout_time_ns;
}
void Detector_list_element::setReadoutTimeNs(int64_t const value)
{
m_Readout_time_ns = value;
}
int64_t Detector_list_element::getMinFrameTimeNs() const
{
return m_Min_frame_time_ns;
}
void Detector_list_element::setMinFrameTimeNs(int64_t const value)
{
m_Min_frame_time_ns = value;
}
int64_t Detector_list_element::getMinCountTimeNs() const
{
return m_Min_count_time_ns;
}
void Detector_list_element::setMinCountTimeNs(int64_t const value)
{
m_Min_count_time_ns = value;
}
org::openapitools::server::model::Detector_type Detector_list_element::getType() const
{
return m_Type;
}
void Detector_list_element::setType(org::openapitools::server::model::Detector_type const& value)
{
m_Type = value;
m_TypeIsSet = true;
}
bool Detector_list_element::typeIsSet() const
{
return m_TypeIsSet;
}
void Detector_list_element::unsetType()
{
m_TypeIsSet = false;
}
} // namespace org::openapitools::server::model