Files
Jungfraujoch/broker/gen/model/Detector_list_element.cpp
T
leonarski_fandClaude Opus 5 8f618e24cf
Build Packages / build:windows:nocuda (pull_request) Successful in 16m6s
Build Packages / build:windows:nocuda (push) Successful in 10m58s
Build Packages / build:windows:cuda (pull_request) Successful in 16m56s
Build Packages / build:windows:cuda (push) Successful in 18m24s
Build Packages / build:viewer-tgz:cpu (pull_request) Successful in 11m45s
Build Packages / build:viewer-tgz:cuda (pull_request) Successful in 12m57s
Build Packages / build:rpm (rocky9_nocuda) (pull_request) Successful in 21m5s
Build Packages / build:rpm (ubuntu2404_nocuda) (pull_request) Successful in 20m30s
Build Packages / build:rpm (rocky8_nocuda) (pull_request) Successful in 23m56s
Build Packages / build:rpm (ubuntu2204_nocuda) (pull_request) Successful in 24m47s
Build Packages / build:rpm (rocky9_sls9) (pull_request) Successful in 21m37s
Build Packages / build:rpm (rocky8_sls9) (pull_request) Successful in 23m52s
Build Packages / XDS test (durin plugin) (pull_request) Successful in 11m53s
Build Packages / build:rpm (rocky9) (pull_request) Successful in 21m0s
Build Packages / build:rpm (rocky8) (pull_request) Successful in 24m30s
Build Packages / Generate python client (pull_request) Successful in 23s
Build Packages / build:rpm (ubuntu2404) (pull_request) Successful in 19m48s
Build Packages / Create release (pull_request) Skipped
Build Packages / build:rpm (ubuntu2204) (pull_request) Successful in 23m14s
Build Packages / Build documentation (pull_request) Successful in 1m21s
Build Packages / XDS test (JFJoch plugin) (pull_request) Successful in 9m14s
Build Packages / DIALS test (pull_request) Successful in 21m55s
Build Packages / XDS test (neggia plugin) (pull_request) Successful in 7m36s
Build Packages / build:viewer-tgz:cpu (push) Successful in 10m48s
Build Packages / build:viewer-tgz:cuda (push) Successful in 13m11s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 17m53s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 21m15s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 21m50s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 16m52s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 18m48s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 17m1s
Build Packages / build:rpm (rocky9) (push) Successful in 18m58s
Build Packages / build:rpm (rocky8) (push) Successful in 23m25s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 21m27s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 17m51s
Build Packages / Generate python client (push) Successful in 29s
Build Packages / Build documentation (push) Successful in 52s
Build Packages / Create release (push) Skipped
Build Packages / XDS test (durin plugin) (push) Successful in 8m36s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 7m47s
Build Packages / XDS test (neggia plugin) (push) Successful in 7m1s
Build Packages / DIALS test (push) Successful in 17m47s
Build Packages / Unit tests (pull_request) Successful in 2h0m50s
Build Packages / Unit tests (push) Successful in 1h20m51s
v1.0.0-rc.163
Version bump: VERSION, the OpenAPI spec version and its three generated clients
(C++ server model, python client, TypeScript frontend client), the Redoc html,
docs/conf.py, the FPGA HDL version registers and the PCIe driver/DKMS version
strings, all rewritten by update_version.sh.

The API itself is unchanged in this release - the only difference in the
generated clients is the version string.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014QPzDRu2tbgFM1cCe3qYjc
2026-08-25 12:59:49 +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.163
* 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