Build Packages / Create release (push) Successful in 27s
Build Packages / build:portable:macos-arm64:nocuda (push) Successful in 5m25s
Build Packages / build:rugnux:linux-aarch64:cuda (push) Successful in 7m13s
Build Packages / build:portable:linux-x86_64:nocuda (push) Successful in 14m30s
Build Packages / build:portable:linux-x86_64:cuda (push) Successful in 17m17s
Build Packages / HDF5 consumer tests (DIALS, XDS) (push) Successful in 24m53s
Build Packages / build:portable:windows-x86_64:nocuda (push) Successful in 22m1s
Build Packages / build:portable:windows-x86_64:cuda (push) Successful in 26m13s
Build Packages / build:jfjoch:rocky8:nocuda (push) Successful in 18m53s
Build Packages / build:jfjoch:ubuntu2204:nocuda (push) Successful in 17m26s
Build Packages / build:jfjoch:rocky9:nocuda (push) Successful in 21m34s
Build Packages / build:jfjoch:ubuntu2404:nocuda (push) Successful in 22m2s
Build Packages / build:jfjoch:rocky8:cuda-sls9 (push) Successful in 27m23s
Build Packages / Generate python client (push) Successful in 31s
Build Packages / Build documentation (push) Successful in 1m18s
Build Packages / build:jfjoch:rocky9:cuda-sls9 (push) Successful in 29m49s
Build Packages / build:jfjoch:rocky8:cuda (push) Successful in 26m27s
Build Packages / build:jfjoch:ubuntu2204:cuda (push) Successful in 22m32s
Build Packages / build:jfjoch:rocky9:cuda (push) Successful in 26m30s
Build Packages / build:jfjoch:ubuntu2404:cuda (push) Successful in 24m46s
Build Packages / Unit tests (push) Successful in 2h18m13s
Build Packages / Validation Battery (push) Successful in 39m54s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015CeEGgpKdfkCTJb3YNMJcu
571 lines
16 KiB
C++
571 lines
16 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.179
|
|
* 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 "Rugnux_live_status.h"
|
|
#include "Helpers.h"
|
|
|
|
#include <sstream>
|
|
|
|
namespace org::openapitools::server::model
|
|
{
|
|
|
|
Rugnux_live_status::Rugnux_live_status()
|
|
{
|
|
m_State = "";
|
|
m_Placed_model = false;
|
|
m_Anomalous_map = false;
|
|
m_Probe = "";
|
|
m_Probe_s = 0.0;
|
|
m_Probe_sIsSet = false;
|
|
m_Start_to_first_image_s = 0.0;
|
|
m_Start_to_first_image_sIsSet = false;
|
|
m_Message = "";
|
|
m_Images_expected = 0L;
|
|
m_Expected_collection_s = 0.0;
|
|
m_Expected_collection_sIsSet = false;
|
|
m_Images_received = 0L;
|
|
m_Elapsed_s = 0.0;
|
|
m_Step_progress = 0.0f;
|
|
m_Step_progressIsSet = false;
|
|
m_Last_image_s = 0.0;
|
|
m_Last_image_sIsSet = false;
|
|
m_Cut = "";
|
|
m_CutIsSet = false;
|
|
m_Cut_s = 0.0;
|
|
m_Cut_sIsSet = false;
|
|
m_Last_image_to_written_s = 0.0;
|
|
m_Last_image_to_written_sIsSet = false;
|
|
m_Verdict = "";
|
|
m_Verdict_text = "";
|
|
|
|
}
|
|
|
|
void Rugnux_live_status::validate() const
|
|
{
|
|
std::stringstream msg;
|
|
if (!validate(msg))
|
|
{
|
|
throw org::openapitools::server::helpers::ValidationException(msg.str());
|
|
}
|
|
}
|
|
|
|
bool Rugnux_live_status::validate(std::stringstream& msg) const
|
|
{
|
|
return validate(msg, "");
|
|
}
|
|
|
|
bool Rugnux_live_status::validate(std::stringstream& msg, const std::string& pathPrefix) const
|
|
{
|
|
bool success = true;
|
|
const std::string _pathPrefix = pathPrefix.empty() ? "Rugnux_live_status" : pathPrefix;
|
|
|
|
|
|
if (stepProgressIsSet())
|
|
{
|
|
const float& value = m_Step_progress;
|
|
const std::string currentValuePath = _pathPrefix + ".stepProgress";
|
|
|
|
|
|
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;";
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/* Steps */ {
|
|
const std::vector<org::openapitools::server::model::Rugnux_live_step>& value = m_Steps;
|
|
const std::string currentValuePath = _pathPrefix + ".steps";
|
|
|
|
|
|
{ // Recursive validation of array elements
|
|
const std::string oldValuePath = currentValuePath;
|
|
int i = 0;
|
|
for (const org::openapitools::server::model::Rugnux_live_step& value : value)
|
|
{
|
|
const std::string currentValuePath = oldValuePath + "[" + std::to_string(i) + "]";
|
|
|
|
success = value.validate(msg, currentValuePath + ".steps") && success;
|
|
|
|
i++;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/* Summary */ {
|
|
const std::vector<org::openapitools::server::model::Rugnux_summary_row>& value = m_Summary;
|
|
const std::string currentValuePath = _pathPrefix + ".summary";
|
|
|
|
|
|
{ // Recursive validation of array elements
|
|
const std::string oldValuePath = currentValuePath;
|
|
int i = 0;
|
|
for (const org::openapitools::server::model::Rugnux_summary_row& value : value)
|
|
{
|
|
const std::string currentValuePath = oldValuePath + "[" + std::to_string(i) + "]";
|
|
|
|
success = value.validate(msg, currentValuePath + ".summary") && success;
|
|
|
|
i++;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/* Warnings */ {
|
|
const std::vector<std::string>& value = m_Warnings;
|
|
const std::string currentValuePath = _pathPrefix + ".warnings";
|
|
|
|
|
|
{ // 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++;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
return success;
|
|
}
|
|
|
|
bool Rugnux_live_status::operator==(const Rugnux_live_status& rhs) const
|
|
{
|
|
return
|
|
|
|
|
|
(getState() == rhs.getState())
|
|
&&
|
|
|
|
(isPlacedModel() == rhs.isPlacedModel())
|
|
&&
|
|
|
|
(isAnomalousMap() == rhs.isAnomalousMap())
|
|
&&
|
|
|
|
(getProbe() == rhs.getProbe())
|
|
&&
|
|
|
|
|
|
((!probeSIsSet() && !rhs.probeSIsSet()) || (probeSIsSet() && rhs.probeSIsSet() && getProbeS() == rhs.getProbeS())) &&
|
|
|
|
|
|
((!startToFirstImageSIsSet() && !rhs.startToFirstImageSIsSet()) || (startToFirstImageSIsSet() && rhs.startToFirstImageSIsSet() && getStartToFirstImageS() == rhs.getStartToFirstImageS())) &&
|
|
|
|
(getMessage() == rhs.getMessage())
|
|
&&
|
|
|
|
(getImagesExpected() == rhs.getImagesExpected())
|
|
&&
|
|
|
|
|
|
((!expectedCollectionSIsSet() && !rhs.expectedCollectionSIsSet()) || (expectedCollectionSIsSet() && rhs.expectedCollectionSIsSet() && getExpectedCollectionS() == rhs.getExpectedCollectionS())) &&
|
|
|
|
(getImagesReceived() == rhs.getImagesReceived())
|
|
&&
|
|
|
|
(getElapsedS() == rhs.getElapsedS())
|
|
&&
|
|
|
|
|
|
((!stepProgressIsSet() && !rhs.stepProgressIsSet()) || (stepProgressIsSet() && rhs.stepProgressIsSet() && getStepProgress() == rhs.getStepProgress())) &&
|
|
|
|
(getSteps() == rhs.getSteps())
|
|
&&
|
|
|
|
|
|
((!lastImageSIsSet() && !rhs.lastImageSIsSet()) || (lastImageSIsSet() && rhs.lastImageSIsSet() && getLastImageS() == rhs.getLastImageS())) &&
|
|
|
|
|
|
((!cutIsSet() && !rhs.cutIsSet()) || (cutIsSet() && rhs.cutIsSet() && getCut() == rhs.getCut())) &&
|
|
|
|
|
|
((!cutSIsSet() && !rhs.cutSIsSet()) || (cutSIsSet() && rhs.cutSIsSet() && getCutS() == rhs.getCutS())) &&
|
|
|
|
|
|
((!lastImageToWrittenSIsSet() && !rhs.lastImageToWrittenSIsSet()) || (lastImageToWrittenSIsSet() && rhs.lastImageToWrittenSIsSet() && getLastImageToWrittenS() == rhs.getLastImageToWrittenS())) &&
|
|
|
|
(getVerdict() == rhs.getVerdict())
|
|
&&
|
|
|
|
(getVerdictText() == rhs.getVerdictText())
|
|
&&
|
|
|
|
(getSummary() == rhs.getSummary())
|
|
&&
|
|
|
|
(getWarnings() == rhs.getWarnings())
|
|
|
|
|
|
;
|
|
}
|
|
|
|
bool Rugnux_live_status::operator!=(const Rugnux_live_status& rhs) const
|
|
{
|
|
return !(*this == rhs);
|
|
}
|
|
|
|
void to_json(nlohmann::json& j, const Rugnux_live_status& o)
|
|
{
|
|
j = nlohmann::json::object();
|
|
j["state"] = o.m_State;
|
|
j["placed_model"] = o.m_Placed_model;
|
|
j["anomalous_map"] = o.m_Anomalous_map;
|
|
j["probe"] = o.m_Probe;
|
|
if(o.probeSIsSet())
|
|
j["probe_s"] = o.m_Probe_s;
|
|
if(o.startToFirstImageSIsSet())
|
|
j["start_to_first_image_s"] = o.m_Start_to_first_image_s;
|
|
j["message"] = o.m_Message;
|
|
j["images_expected"] = o.m_Images_expected;
|
|
if(o.expectedCollectionSIsSet())
|
|
j["expected_collection_s"] = o.m_Expected_collection_s;
|
|
j["images_received"] = o.m_Images_received;
|
|
j["elapsed_s"] = o.m_Elapsed_s;
|
|
if(o.stepProgressIsSet())
|
|
j["step_progress"] = o.m_Step_progress;
|
|
j["steps"] = o.m_Steps;
|
|
if(o.lastImageSIsSet())
|
|
j["last_image_s"] = o.m_Last_image_s;
|
|
if(o.cutIsSet())
|
|
j["cut"] = o.m_Cut;
|
|
if(o.cutSIsSet())
|
|
j["cut_s"] = o.m_Cut_s;
|
|
if(o.lastImageToWrittenSIsSet())
|
|
j["last_image_to_written_s"] = o.m_Last_image_to_written_s;
|
|
j["verdict"] = o.m_Verdict;
|
|
j["verdict_text"] = o.m_Verdict_text;
|
|
j["summary"] = o.m_Summary;
|
|
j["warnings"] = o.m_Warnings;
|
|
|
|
}
|
|
|
|
void from_json(const nlohmann::json& j, Rugnux_live_status& o)
|
|
{
|
|
j.at("state").get_to(o.m_State);
|
|
j.at("placed_model").get_to(o.m_Placed_model);
|
|
j.at("anomalous_map").get_to(o.m_Anomalous_map);
|
|
j.at("probe").get_to(o.m_Probe);
|
|
if(j.find("probe_s") != j.end())
|
|
{
|
|
j.at("probe_s").get_to(o.m_Probe_s);
|
|
o.m_Probe_sIsSet = true;
|
|
}
|
|
if(j.find("start_to_first_image_s") != j.end())
|
|
{
|
|
j.at("start_to_first_image_s").get_to(o.m_Start_to_first_image_s);
|
|
o.m_Start_to_first_image_sIsSet = true;
|
|
}
|
|
j.at("message").get_to(o.m_Message);
|
|
j.at("images_expected").get_to(o.m_Images_expected);
|
|
if(j.find("expected_collection_s") != j.end())
|
|
{
|
|
j.at("expected_collection_s").get_to(o.m_Expected_collection_s);
|
|
o.m_Expected_collection_sIsSet = true;
|
|
}
|
|
j.at("images_received").get_to(o.m_Images_received);
|
|
j.at("elapsed_s").get_to(o.m_Elapsed_s);
|
|
if(j.find("step_progress") != j.end())
|
|
{
|
|
j.at("step_progress").get_to(o.m_Step_progress);
|
|
o.m_Step_progressIsSet = true;
|
|
}
|
|
j.at("steps").get_to(o.m_Steps);
|
|
if(j.find("last_image_s") != j.end())
|
|
{
|
|
j.at("last_image_s").get_to(o.m_Last_image_s);
|
|
o.m_Last_image_sIsSet = true;
|
|
}
|
|
if(j.find("cut") != j.end())
|
|
{
|
|
j.at("cut").get_to(o.m_Cut);
|
|
o.m_CutIsSet = true;
|
|
}
|
|
if(j.find("cut_s") != j.end())
|
|
{
|
|
j.at("cut_s").get_to(o.m_Cut_s);
|
|
o.m_Cut_sIsSet = true;
|
|
}
|
|
if(j.find("last_image_to_written_s") != j.end())
|
|
{
|
|
j.at("last_image_to_written_s").get_to(o.m_Last_image_to_written_s);
|
|
o.m_Last_image_to_written_sIsSet = true;
|
|
}
|
|
j.at("verdict").get_to(o.m_Verdict);
|
|
j.at("verdict_text").get_to(o.m_Verdict_text);
|
|
j.at("summary").get_to(o.m_Summary);
|
|
j.at("warnings").get_to(o.m_Warnings);
|
|
|
|
}
|
|
|
|
std::string Rugnux_live_status::getState() const
|
|
{
|
|
return m_State;
|
|
}
|
|
void Rugnux_live_status::setState(std::string const& value)
|
|
{
|
|
m_State = value;
|
|
}
|
|
bool Rugnux_live_status::isPlacedModel() const
|
|
{
|
|
return m_Placed_model;
|
|
}
|
|
void Rugnux_live_status::setPlacedModel(bool const value)
|
|
{
|
|
m_Placed_model = value;
|
|
}
|
|
bool Rugnux_live_status::isAnomalousMap() const
|
|
{
|
|
return m_Anomalous_map;
|
|
}
|
|
void Rugnux_live_status::setAnomalousMap(bool const value)
|
|
{
|
|
m_Anomalous_map = value;
|
|
}
|
|
std::string Rugnux_live_status::getProbe() const
|
|
{
|
|
return m_Probe;
|
|
}
|
|
void Rugnux_live_status::setProbe(std::string const& value)
|
|
{
|
|
m_Probe = value;
|
|
}
|
|
double Rugnux_live_status::getProbeS() const
|
|
{
|
|
return m_Probe_s;
|
|
}
|
|
void Rugnux_live_status::setProbeS(double const value)
|
|
{
|
|
m_Probe_s = value;
|
|
m_Probe_sIsSet = true;
|
|
}
|
|
bool Rugnux_live_status::probeSIsSet() const
|
|
{
|
|
return m_Probe_sIsSet;
|
|
}
|
|
void Rugnux_live_status::unsetProbe_s()
|
|
{
|
|
m_Probe_sIsSet = false;
|
|
}
|
|
double Rugnux_live_status::getStartToFirstImageS() const
|
|
{
|
|
return m_Start_to_first_image_s;
|
|
}
|
|
void Rugnux_live_status::setStartToFirstImageS(double const value)
|
|
{
|
|
m_Start_to_first_image_s = value;
|
|
m_Start_to_first_image_sIsSet = true;
|
|
}
|
|
bool Rugnux_live_status::startToFirstImageSIsSet() const
|
|
{
|
|
return m_Start_to_first_image_sIsSet;
|
|
}
|
|
void Rugnux_live_status::unsetStart_to_first_image_s()
|
|
{
|
|
m_Start_to_first_image_sIsSet = false;
|
|
}
|
|
std::string Rugnux_live_status::getMessage() const
|
|
{
|
|
return m_Message;
|
|
}
|
|
void Rugnux_live_status::setMessage(std::string const& value)
|
|
{
|
|
m_Message = value;
|
|
}
|
|
int64_t Rugnux_live_status::getImagesExpected() const
|
|
{
|
|
return m_Images_expected;
|
|
}
|
|
void Rugnux_live_status::setImagesExpected(int64_t const value)
|
|
{
|
|
m_Images_expected = value;
|
|
}
|
|
double Rugnux_live_status::getExpectedCollectionS() const
|
|
{
|
|
return m_Expected_collection_s;
|
|
}
|
|
void Rugnux_live_status::setExpectedCollectionS(double const value)
|
|
{
|
|
m_Expected_collection_s = value;
|
|
m_Expected_collection_sIsSet = true;
|
|
}
|
|
bool Rugnux_live_status::expectedCollectionSIsSet() const
|
|
{
|
|
return m_Expected_collection_sIsSet;
|
|
}
|
|
void Rugnux_live_status::unsetExpected_collection_s()
|
|
{
|
|
m_Expected_collection_sIsSet = false;
|
|
}
|
|
int64_t Rugnux_live_status::getImagesReceived() const
|
|
{
|
|
return m_Images_received;
|
|
}
|
|
void Rugnux_live_status::setImagesReceived(int64_t const value)
|
|
{
|
|
m_Images_received = value;
|
|
}
|
|
double Rugnux_live_status::getElapsedS() const
|
|
{
|
|
return m_Elapsed_s;
|
|
}
|
|
void Rugnux_live_status::setElapsedS(double const value)
|
|
{
|
|
m_Elapsed_s = value;
|
|
}
|
|
float Rugnux_live_status::getStepProgress() const
|
|
{
|
|
return m_Step_progress;
|
|
}
|
|
void Rugnux_live_status::setStepProgress(float const value)
|
|
{
|
|
m_Step_progress = value;
|
|
m_Step_progressIsSet = true;
|
|
}
|
|
bool Rugnux_live_status::stepProgressIsSet() const
|
|
{
|
|
return m_Step_progressIsSet;
|
|
}
|
|
void Rugnux_live_status::unsetStep_progress()
|
|
{
|
|
m_Step_progressIsSet = false;
|
|
}
|
|
std::vector<org::openapitools::server::model::Rugnux_live_step> Rugnux_live_status::getSteps() const
|
|
{
|
|
return m_Steps;
|
|
}
|
|
void Rugnux_live_status::setSteps(std::vector<org::openapitools::server::model::Rugnux_live_step> const& value)
|
|
{
|
|
m_Steps = value;
|
|
}
|
|
double Rugnux_live_status::getLastImageS() const
|
|
{
|
|
return m_Last_image_s;
|
|
}
|
|
void Rugnux_live_status::setLastImageS(double const value)
|
|
{
|
|
m_Last_image_s = value;
|
|
m_Last_image_sIsSet = true;
|
|
}
|
|
bool Rugnux_live_status::lastImageSIsSet() const
|
|
{
|
|
return m_Last_image_sIsSet;
|
|
}
|
|
void Rugnux_live_status::unsetLast_image_s()
|
|
{
|
|
m_Last_image_sIsSet = false;
|
|
}
|
|
std::string Rugnux_live_status::getCut() const
|
|
{
|
|
return m_Cut;
|
|
}
|
|
void Rugnux_live_status::setCut(std::string const& value)
|
|
{
|
|
m_Cut = value;
|
|
m_CutIsSet = true;
|
|
}
|
|
bool Rugnux_live_status::cutIsSet() const
|
|
{
|
|
return m_CutIsSet;
|
|
}
|
|
void Rugnux_live_status::unsetCut()
|
|
{
|
|
m_CutIsSet = false;
|
|
}
|
|
double Rugnux_live_status::getCutS() const
|
|
{
|
|
return m_Cut_s;
|
|
}
|
|
void Rugnux_live_status::setCutS(double const value)
|
|
{
|
|
m_Cut_s = value;
|
|
m_Cut_sIsSet = true;
|
|
}
|
|
bool Rugnux_live_status::cutSIsSet() const
|
|
{
|
|
return m_Cut_sIsSet;
|
|
}
|
|
void Rugnux_live_status::unsetCut_s()
|
|
{
|
|
m_Cut_sIsSet = false;
|
|
}
|
|
double Rugnux_live_status::getLastImageToWrittenS() const
|
|
{
|
|
return m_Last_image_to_written_s;
|
|
}
|
|
void Rugnux_live_status::setLastImageToWrittenS(double const value)
|
|
{
|
|
m_Last_image_to_written_s = value;
|
|
m_Last_image_to_written_sIsSet = true;
|
|
}
|
|
bool Rugnux_live_status::lastImageToWrittenSIsSet() const
|
|
{
|
|
return m_Last_image_to_written_sIsSet;
|
|
}
|
|
void Rugnux_live_status::unsetLast_image_to_written_s()
|
|
{
|
|
m_Last_image_to_written_sIsSet = false;
|
|
}
|
|
std::string Rugnux_live_status::getVerdict() const
|
|
{
|
|
return m_Verdict;
|
|
}
|
|
void Rugnux_live_status::setVerdict(std::string const& value)
|
|
{
|
|
m_Verdict = value;
|
|
}
|
|
std::string Rugnux_live_status::getVerdictText() const
|
|
{
|
|
return m_Verdict_text;
|
|
}
|
|
void Rugnux_live_status::setVerdictText(std::string const& value)
|
|
{
|
|
m_Verdict_text = value;
|
|
}
|
|
std::vector<org::openapitools::server::model::Rugnux_summary_row> Rugnux_live_status::getSummary() const
|
|
{
|
|
return m_Summary;
|
|
}
|
|
void Rugnux_live_status::setSummary(std::vector<org::openapitools::server::model::Rugnux_summary_row> const& value)
|
|
{
|
|
m_Summary = value;
|
|
}
|
|
std::vector<std::string> Rugnux_live_status::getWarnings() const
|
|
{
|
|
return m_Warnings;
|
|
}
|
|
void Rugnux_live_status::setWarnings(std::vector<std::string> const& value)
|
|
{
|
|
m_Warnings = value;
|
|
}
|
|
|
|
|
|
} // namespace org::openapitools::server::model
|
|
|