Build Packages / Create release (push) Successful in 15s
Build Packages / build:viewer:macos-arm64:nocuda (push) Successful in 3m23s
Build Packages / build:rugnux:macos-arm64:nocuda (push) Successful in 2m36s
Build Packages / build:rugnux:linux-aarch64:cuda (push) Successful in 9m16s
Build Packages / build:rugnux:linux-x86_64:cuda (push) Successful in 9m19s
Build Packages / build:viewer:linux-x86_64:nocuda (push) Successful in 11m45s
Build Packages / build:viewer:linux-x86_64:cuda (push) Successful in 12m36s
Build Packages / build:jfjoch:rocky8:nocuda (push) Successful in 17m9s
Build Packages / build:jfjoch:rocky9:nocuda (push) Successful in 19m2s
Build Packages / build:viewer:windows-x86_64:nocuda (push) Successful in 19m19s
Build Packages / build:viewer:windows-x86_64:cuda (push) Successful in 23m59s
Build Packages / HDF5 consumer tests (DIALS, XDS) (push) Successful in 25m22s
Build Packages / build:jfjoch:ubuntu2404:nocuda (push) Successful in 21m34s
Build Packages / build:jfjoch:ubuntu2204:nocuda (push) Successful in 21m44s
Build Packages / Generate python client (push) Successful in 35s
Build Packages / Build documentation (push) Successful in 1m14s
Build Packages / build:jfjoch:rocky8:cuda-sls9 (push) Successful in 21m18s
Build Packages / build:rugnux:windows-x86_64:cuda (push) Successful in 13m52s
Build Packages / build:jfjoch:rocky9:cuda-sls9 (push) Successful in 21m48s
Build Packages / build:jfjoch:rocky8:cuda (push) Successful in 19m12s
Build Packages / build:jfjoch:rocky9:cuda (push) Successful in 19m49s
Build Packages / build:jfjoch:ubuntu2204:cuda (push) Successful in 16m19s
Build Packages / build:jfjoch:ubuntu2404:cuda (push) Successful in 12m44s
Build Packages / Unit tests (push) Successful in 1h17m24s
VERSION and the strings update_version.sh derives from it (API spec, generated broker model and Python client docs, frontend, docs, FPGA and PCIe driver versions). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SVmAWnzCmRKAXVUCdc4iNi
192 lines
5.0 KiB
C++
192 lines
5.0 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.175
|
|
* 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 "Grid_scan.h"
|
|
#include "Helpers.h"
|
|
|
|
#include <sstream>
|
|
|
|
namespace org::openapitools::server::model
|
|
{
|
|
|
|
Grid_scan::Grid_scan()
|
|
{
|
|
m_N_fast = 0L;
|
|
m_Step_x_um = 0.0f;
|
|
m_Step_y_um = 0.0f;
|
|
m_Vertical = false;
|
|
m_VerticalIsSet = false;
|
|
m_Snake = false;
|
|
m_SnakeIsSet = false;
|
|
|
|
}
|
|
|
|
void Grid_scan::validate() const
|
|
{
|
|
std::stringstream msg;
|
|
if (!validate(msg))
|
|
{
|
|
throw org::openapitools::server::helpers::ValidationException(msg.str());
|
|
}
|
|
}
|
|
|
|
bool Grid_scan::validate(std::stringstream& msg) const
|
|
{
|
|
return validate(msg, "");
|
|
}
|
|
|
|
bool Grid_scan::validate(std::stringstream& msg, const std::string& pathPrefix) const
|
|
{
|
|
bool success = true;
|
|
const std::string _pathPrefix = pathPrefix.empty() ? "Grid_scan" : pathPrefix;
|
|
|
|
|
|
|
|
/* N_fast */ {
|
|
const int64_t& value = m_N_fast;
|
|
const std::string currentValuePath = _pathPrefix + ".nFast";
|
|
|
|
|
|
if (value < 1ll)
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be greater than or equal to 1;";
|
|
}
|
|
|
|
}
|
|
|
|
return success;
|
|
}
|
|
|
|
bool Grid_scan::operator==(const Grid_scan& rhs) const
|
|
{
|
|
return
|
|
|
|
|
|
(getNFast() == rhs.getNFast())
|
|
&&
|
|
|
|
(getStepXUm() == rhs.getStepXUm())
|
|
&&
|
|
|
|
(getStepYUm() == rhs.getStepYUm())
|
|
&&
|
|
|
|
|
|
((!verticalIsSet() && !rhs.verticalIsSet()) || (verticalIsSet() && rhs.verticalIsSet() && isVertical() == rhs.isVertical())) &&
|
|
|
|
|
|
((!snakeIsSet() && !rhs.snakeIsSet()) || (snakeIsSet() && rhs.snakeIsSet() && isSnake() == rhs.isSnake()))
|
|
|
|
;
|
|
}
|
|
|
|
bool Grid_scan::operator!=(const Grid_scan& rhs) const
|
|
{
|
|
return !(*this == rhs);
|
|
}
|
|
|
|
void to_json(nlohmann::json& j, const Grid_scan& o)
|
|
{
|
|
j = nlohmann::json::object();
|
|
j["n_fast"] = o.m_N_fast;
|
|
j["step_x_um"] = o.m_Step_x_um;
|
|
j["step_y_um"] = o.m_Step_y_um;
|
|
if(o.verticalIsSet())
|
|
j["vertical"] = o.m_Vertical;
|
|
if(o.snakeIsSet())
|
|
j["snake"] = o.m_Snake;
|
|
|
|
}
|
|
|
|
void from_json(const nlohmann::json& j, Grid_scan& o)
|
|
{
|
|
j.at("n_fast").get_to(o.m_N_fast);
|
|
j.at("step_x_um").get_to(o.m_Step_x_um);
|
|
j.at("step_y_um").get_to(o.m_Step_y_um);
|
|
if(j.find("vertical") != j.end())
|
|
{
|
|
j.at("vertical").get_to(o.m_Vertical);
|
|
o.m_VerticalIsSet = true;
|
|
}
|
|
if(j.find("snake") != j.end())
|
|
{
|
|
j.at("snake").get_to(o.m_Snake);
|
|
o.m_SnakeIsSet = true;
|
|
}
|
|
|
|
}
|
|
|
|
int64_t Grid_scan::getNFast() const
|
|
{
|
|
return m_N_fast;
|
|
}
|
|
void Grid_scan::setNFast(int64_t const value)
|
|
{
|
|
m_N_fast = value;
|
|
}
|
|
float Grid_scan::getStepXUm() const
|
|
{
|
|
return m_Step_x_um;
|
|
}
|
|
void Grid_scan::setStepXUm(float const value)
|
|
{
|
|
m_Step_x_um = value;
|
|
}
|
|
float Grid_scan::getStepYUm() const
|
|
{
|
|
return m_Step_y_um;
|
|
}
|
|
void Grid_scan::setStepYUm(float const value)
|
|
{
|
|
m_Step_y_um = value;
|
|
}
|
|
bool Grid_scan::isVertical() const
|
|
{
|
|
return m_Vertical;
|
|
}
|
|
void Grid_scan::setVertical(bool const value)
|
|
{
|
|
m_Vertical = value;
|
|
m_VerticalIsSet = true;
|
|
}
|
|
bool Grid_scan::verticalIsSet() const
|
|
{
|
|
return m_VerticalIsSet;
|
|
}
|
|
void Grid_scan::unsetVertical()
|
|
{
|
|
m_VerticalIsSet = false;
|
|
}
|
|
bool Grid_scan::isSnake() const
|
|
{
|
|
return m_Snake;
|
|
}
|
|
void Grid_scan::setSnake(bool const value)
|
|
{
|
|
m_Snake = value;
|
|
m_SnakeIsSet = true;
|
|
}
|
|
bool Grid_scan::snakeIsSet() const
|
|
{
|
|
return m_SnakeIsSet;
|
|
}
|
|
void Grid_scan::unsetSnake()
|
|
{
|
|
m_SnakeIsSet = false;
|
|
}
|
|
|
|
|
|
} // namespace org::openapitools::server::model
|
|
|