Files
Jungfraujoch/broker/gen/model/Broker_status.cpp
T
leonarski_f fc68a9baed
Build Packages / Unit tests (push) Skipped
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 8m34s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 10m0s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 10m23s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 10m23s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 11m16s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 11m49s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 8m32s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 9m15s
Build Packages / XDS test (durin plugin) (push) Successful in 7m16s
Build Packages / Generate python client (push) Successful in 16s
Build Packages / build:rpm (rocky9) (push) Successful in 10m12s
Build Packages / Create release (push) Skipped
Build Packages / Build documentation (push) Successful in 47s
Build Packages / DIALS test (push) Successful in 10m18s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 5m46s
Build Packages / build:rpm (rocky8) (push) Successful in 1h41m2s
Build Packages / XDS test (neggia plugin) (push) Successful in 1h59m18s
v1.0.0-rc.146 (#56)
This is an UNSTABLE release. The release has significant modifications for data processing - in case of troubles go back to 1.0.0-rc.144.

jfjoch_process: Generate a dedicated file (_process.h5), which can be used as a replacement for the _master.h5 file for a reanalyzed dataset.
jfjoch_process: Improve the performance of scaling and merging, implement on the fly scaling.
jfjoch_writer: All final data analysis results are repopulated in the _master.h5 file.
jfjoch_scale: Dedicated tool for rescaling/merging existing data.
jfjoch_viewer: Fix bugs where pixel labels where displayed on a wrong pixel.

WARNING! Scaling and merging are experimental at the moment, and may not provide reasonable results for the time being.

Reviewed-on: #56
2026-05-28 18:48:35 +02:00

256 lines
7.2 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.146
* 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 "Broker_status.h"
#include "Helpers.h"
#include <sstream>
namespace org::openapitools::server::model
{
Broker_status::Broker_status()
{
m_State = "";
m_Progress = 0.0f;
m_ProgressIsSet = false;
m_Message = "";
m_MessageIsSet = false;
m_Message_severity = "error";
m_Message_severityIsSet = false;
m_Gpu_count = 0;
m_Gpu_countIsSet = false;
m_Broker_version = "";
m_Broker_versionIsSet = false;
}
void Broker_status::validate() const
{
std::stringstream msg;
if (!validate(msg))
{
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool Broker_status::validate(std::stringstream& msg) const
{
return validate(msg, "");
}
bool Broker_status::validate(std::stringstream& msg, const std::string& pathPrefix) const
{
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "Broker_status" : pathPrefix;
if (progressIsSet())
{
const float& value = m_Progress;
const std::string currentValuePath = _pathPrefix + ".progress";
if (value < static_cast<float>(0.0))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0.0;";
}
if (value > static_cast<float>(1.0))
{
success = false;
msg << currentValuePath << ": must be less than or equal to 1.0;";
}
}
return success;
}
bool Broker_status::operator==(const Broker_status& rhs) const
{
return
(getState() == rhs.getState())
&&
((!progressIsSet() && !rhs.progressIsSet()) || (progressIsSet() && rhs.progressIsSet() && getProgress() == rhs.getProgress())) &&
((!messageIsSet() && !rhs.messageIsSet()) || (messageIsSet() && rhs.messageIsSet() && getMessage() == rhs.getMessage())) &&
((!messageSeverityIsSet() && !rhs.messageSeverityIsSet()) || (messageSeverityIsSet() && rhs.messageSeverityIsSet() && getMessageSeverity() == rhs.getMessageSeverity())) &&
((!gpuCountIsSet() && !rhs.gpuCountIsSet()) || (gpuCountIsSet() && rhs.gpuCountIsSet() && getGpuCount() == rhs.getGpuCount())) &&
((!brokerVersionIsSet() && !rhs.brokerVersionIsSet()) || (brokerVersionIsSet() && rhs.brokerVersionIsSet() && getBrokerVersion() == rhs.getBrokerVersion()))
;
}
bool Broker_status::operator!=(const Broker_status& rhs) const
{
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const Broker_status& o)
{
j = nlohmann::json::object();
j["state"] = o.m_State;
if(o.progressIsSet())
j["progress"] = o.m_Progress;
if(o.messageIsSet())
j["message"] = o.m_Message;
if(o.messageSeverityIsSet())
j["message_severity"] = o.m_Message_severity;
if(o.gpuCountIsSet())
j["gpu_count"] = o.m_Gpu_count;
if(o.brokerVersionIsSet())
j["broker_version"] = o.m_Broker_version;
}
void from_json(const nlohmann::json& j, Broker_status& o)
{
j.at("state").get_to(o.m_State);
if(j.find("progress") != j.end())
{
j.at("progress").get_to(o.m_Progress);
o.m_ProgressIsSet = true;
}
if(j.find("message") != j.end())
{
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;
}
if(j.find("gpu_count") != j.end())
{
j.at("gpu_count").get_to(o.m_Gpu_count);
o.m_Gpu_countIsSet = true;
}
if(j.find("broker_version") != j.end())
{
j.at("broker_version").get_to(o.m_Broker_version);
o.m_Broker_versionIsSet = true;
}
}
std::string Broker_status::getState() const
{
return m_State;
}
void Broker_status::setState(std::string const& value)
{
m_State = value;
}
float Broker_status::getProgress() const
{
return m_Progress;
}
void Broker_status::setProgress(float const value)
{
m_Progress = value;
m_ProgressIsSet = true;
}
bool Broker_status::progressIsSet() const
{
return m_ProgressIsSet;
}
void Broker_status::unsetProgress()
{
m_ProgressIsSet = false;
}
std::string Broker_status::getMessage() const
{
return m_Message;
}
void Broker_status::setMessage(std::string const& value)
{
m_Message = value;
m_MessageIsSet = true;
}
bool Broker_status::messageIsSet() const
{
return m_MessageIsSet;
}
void Broker_status::unsetMessage()
{
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;
}
int32_t Broker_status::getGpuCount() const
{
return m_Gpu_count;
}
void Broker_status::setGpuCount(int32_t const value)
{
m_Gpu_count = value;
m_Gpu_countIsSet = true;
}
bool Broker_status::gpuCountIsSet() const
{
return m_Gpu_countIsSet;
}
void Broker_status::unsetGpu_count()
{
m_Gpu_countIsSet = false;
}
std::string Broker_status::getBrokerVersion() const
{
return m_Broker_version;
}
void Broker_status::setBrokerVersion(std::string const& value)
{
m_Broker_version = value;
m_Broker_versionIsSet = true;
}
bool Broker_status::brokerVersionIsSet() const
{
return m_Broker_versionIsSet;
}
void Broker_status::unsetBroker_version()
{
m_Broker_versionIsSet = false;
}
} // namespace org::openapitools::server::model