All checks were successful
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 7m57s
Build Packages / Generate python client (push) Successful in 18s
Build Packages / Build documentation (push) Successful in 35s
Build Packages / Create release (push) Has been skipped
Build Packages / build:rpm (rocky9) (push) Successful in 8m28s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 7m6s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 8m9s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 8m44s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 7m56s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 7m25s
Build Packages / Unit tests (push) Successful in 1h11m19s
Build Packages / build:rpm (rocky8) (push) Successful in 6m31s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 6m40s
This is an UNSTABLE release. * jfjoch_broker: Add thresholding to prefer shorter vectors after FFT * jfjoch_broker: Add experimental mosaicity estimation for rotation experiments (this is work in progress) * jfjoch_viewer: Display file opening errors * jfjoch_viewer: When loading files over DBus add retry/back-off till the file is available Reviewed-on: #29 Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch> Co-committed-by: Filip Leonarski <filip.leonarski@psi.ch>
227 lines
6.3 KiB
C++
227 lines
6.3 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.122
|
|
* 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;
|
|
|
|
}
|
|
|
|
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()))
|
|
|
|
;
|
|
}
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
|
|
} // namespace org::openapitools::server::model
|
|
|