616 lines
37 KiB
C++
616 lines
37 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.113
|
|
* 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.
|
|
*/
|
|
/*
|
|
* DefaultApi.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef DefaultApi_H_
|
|
#define DefaultApi_H_
|
|
|
|
|
|
#include "ApiBase.h"
|
|
|
|
#include <pistache/http.h>
|
|
#include <pistache/router.h>
|
|
#include <pistache/http_headers.h>
|
|
|
|
#include <optional>
|
|
#include <utility>
|
|
|
|
#include "Azim_int_settings.h"
|
|
#include "Broker_status.h"
|
|
#include "Calibration_statistics_inner.h"
|
|
#include "Dark_mask_settings.h"
|
|
#include "Dataset_settings.h"
|
|
#include "Detector_list.h"
|
|
#include "Detector_selection.h"
|
|
#include "Detector_settings.h"
|
|
#include "Detector_status.h"
|
|
#include "Error_message.h"
|
|
#include "File_writer_settings.h"
|
|
#include "Fpga_status_inner.h"
|
|
#include "Image_buffer_status.h"
|
|
#include "Image_format_settings.h"
|
|
#include "Indexing_settings.h"
|
|
#include "Instrument_metadata.h"
|
|
#include "Jfjoch_statistics.h"
|
|
#include "Measurement_statistics.h"
|
|
#include "Plots.h"
|
|
#include "Roi_definitions.h"
|
|
#include "Scan_result.h"
|
|
#include "Spot_finding_settings.h"
|
|
#include "Zeromq_metadata_settings.h"
|
|
#include "Zeromq_preview_settings.h"
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
namespace org::openapitools::server::api
|
|
{
|
|
|
|
class DefaultApi : public ApiBase {
|
|
public:
|
|
explicit DefaultApi(const std::shared_ptr<Pistache::Rest::Router>& rtr);
|
|
~DefaultApi() override = default;
|
|
void init() override;
|
|
|
|
static const std::string base;
|
|
|
|
private:
|
|
void setupRoutes();
|
|
|
|
void cancel_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void config_azim_int_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void config_azim_int_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void config_dark_mask_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void config_dark_mask_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void config_detector_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void config_detector_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void config_file_writer_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void config_file_writer_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void config_image_format_conversion_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void config_image_format_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void config_image_format_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void config_image_format_raw_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void config_indexing_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void config_indexing_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void config_instrument_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void config_instrument_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void config_internal_generator_image_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void config_internal_generator_image_tiff_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void config_mask_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void config_mask_tiff_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void config_roi_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void config_roi_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void config_select_detector_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void config_select_detector_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void config_spot_finding_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void config_spot_finding_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void config_user_mask_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void config_user_mask_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void config_user_mask_tiff_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void config_user_mask_tiff_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void config_zeromq_metadata_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void config_zeromq_metadata_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void config_zeromq_preview_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void config_zeromq_preview_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void deactivate_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void detector_status_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void fpga_status_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void image_buffer_clear_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void image_buffer_image_cbor_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void image_buffer_image_jpeg_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void image_buffer_image_tiff_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void image_buffer_start_cbor_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void image_buffer_status_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void initialize_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void pedestal_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void preview_pedestal_tiff_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void preview_plot_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void result_scan_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void start_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void statistics_calibration_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void statistics_data_collection_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void statistics_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void status_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void trigger_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void version_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void wait_till_done_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void xfel_event_code_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void xfel_pulse_id_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void default_api_default_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
|
|
/// <summary>
|
|
/// Helper function to handle unexpected Exceptions during Parameter parsing and validation.
|
|
/// May be overridden to return custom error formats. This is called inside a catch block.
|
|
/// Important: When overriding, do not call `throw ex;`, but instead use `throw;`.
|
|
/// </summary>
|
|
virtual void handleParsingException(const std::exception& ex, Pistache::Http::ResponseWriter &response) const noexcept;
|
|
|
|
/// <summary>
|
|
/// Helper function to handle unexpected Exceptions during Parameter parsing and validation.
|
|
/// May be overridden to return custom error formats. This is called inside a catch block.
|
|
/// Important: When overriding, do not call `throw ex;`, but instead use `throw;`.
|
|
/// </summary>
|
|
virtual std::pair<Pistache::Http::Code, std::string> handleParsingException(const std::exception& ex) const noexcept;
|
|
|
|
/// <summary>
|
|
/// Helper function to handle unexpected Exceptions during processing of the request in handler functions.
|
|
/// May be overridden to return custom error formats. This is called inside a catch block.
|
|
/// Important: When overriding, do not call `throw ex;`, but instead use `throw;`.
|
|
/// </summary>
|
|
virtual void handleOperationException(const std::exception& ex, Pistache::Http::ResponseWriter &response) const noexcept;
|
|
|
|
/// <summary>
|
|
/// Helper function to handle unexpected Exceptions during processing of the request in handler functions.
|
|
/// May be overridden to return custom error formats. This is called inside a catch block.
|
|
/// Important: When overriding, do not call `throw ex;`, but instead use `throw;`.
|
|
/// </summary>
|
|
virtual std::pair<Pistache::Http::Code, std::string> handleOperationException(const std::exception& ex) const noexcept;
|
|
|
|
/// <summary>
|
|
/// Cancel running data collection
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Command will inform FPGA network card to stop pedestal or data collection at the current stage. Any frame that is currently being processed by CPU will be finished and sent to writer. Given the command is making sure to gracefully stop data acquisition and detector, it might take some time to switch back after command finished to `Idle` state. If data collection is not running, the command has no effect.
|
|
/// </remarks>
|
|
virtual void cancel_post(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Get azimuthal integration configuration
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Can be done anytime
|
|
/// </remarks>
|
|
virtual void config_azim_int_get(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Configure azimuthal integration
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Can be done when detector is Inactive or Idle
|
|
/// </remarks>
|
|
/// <param name="azimIntSettings"> (optional)</param>
|
|
virtual void config_azim_int_put(const org::openapitools::server::model::Azim_int_settings &azimIntSettings, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Get settings for dark data collection to calculate mask
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
virtual void config_dark_mask_get(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Set configuration for dark data collection to calculate mask
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// This is only possible when operating DECTRIS detectors at the moment; it will be also available for PSI EIGER at some point. This can only be done when detector is `Idle`, `Error` or `Inactive` states.
|
|
/// </remarks>
|
|
/// <param name="darkMaskSettings"> (optional)</param>
|
|
virtual void config_dark_mask_put(const org::openapitools::server::model::Dark_mask_settings &darkMaskSettings, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Get detector configuration
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Can be done anytime
|
|
/// </remarks>
|
|
virtual void config_detector_get(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Change detector configuration
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Detector settings are ones that have effect on calibration, i.e., pedestal has to be collected again after changing these settings. This can only be done when detector is `Idle`, `Error` or `Inactive` states. If detector is in `Idle` state , pedestal procedure will be executed automatically - there must be no X-rays on the detector during the operation. If detector is in `Inactive` or `Error` states, new settings will be saved, but no calibration will be executed.
|
|
/// </remarks>
|
|
/// <param name="detectorSettings"> (optional)</param>
|
|
virtual void config_detector_put(const org::openapitools::server::model::Detector_settings &detectorSettings, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Get file writer settings
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Can be done anytime
|
|
/// </remarks>
|
|
virtual void config_file_writer_get(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Change file writer settings
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// This can only be done when detector is `Idle`, `Error` or `Inactive` states.
|
|
/// </remarks>
|
|
/// <param name="fileWriterSettings"> (optional)</param>
|
|
virtual void config_file_writer_put(const org::openapitools::server::model::File_writer_settings &fileWriterSettings, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Configure format for data collection with full conversion
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// This can only be done when detector is `Idle`, `Error` or `Inactive` states.
|
|
/// </remarks>
|
|
virtual void config_image_format_conversion_post(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Get image output format
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Can be done anytime
|
|
/// </remarks>
|
|
virtual void config_image_format_get(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Change image output format
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// This can only be done when detector is `Idle`, `Error` or `Inactive` states.
|
|
/// </remarks>
|
|
/// <param name="imageFormatSettings"> (optional)</param>
|
|
virtual void config_image_format_put(const org::openapitools::server::model::Image_format_settings &imageFormatSettings, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Configure format for raw data collection
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// This can only be done when detector is `Idle`, `Error` or `Inactive` states.
|
|
/// </remarks>
|
|
virtual void config_image_format_raw_post(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Get indexing configuration
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Can be done anytime
|
|
/// </remarks>
|
|
virtual void config_indexing_get(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Change indexing algorithm settings
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// This can only be done when detector is `Idle`, `Error` or `Inactive` states.
|
|
/// </remarks>
|
|
/// <param name="indexingSettings"> (optional)</param>
|
|
virtual void config_indexing_put(const org::openapitools::server::model::Indexing_settings &indexingSettings, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Get instrument metadata
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Can be done anytime
|
|
/// </remarks>
|
|
virtual void config_instrument_get(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Change instrument metadata
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// This can only be done when detector is `Idle`, `Error` or `Inactive` states.
|
|
/// </remarks>
|
|
/// <param name="instrumentMetadata"> (optional)</param>
|
|
virtual void config_instrument_put(const org::openapitools::server::model::Instrument_metadata &instrumentMetadata, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Load binary image for internal FPGA generator
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Load image for internal FPGA generator. This can only happen in Idle state of the detector. Requires binary blob with 16-bit integer numbers of size of detector in raw/converted coordinates (depending on detector settings).
|
|
/// </remarks>
|
|
virtual void config_internal_generator_image_put(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Load TIFF image for internal FPGA generator
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Load image for internal FPGA generator. This can only happen in Idle state of the detector. Requires TIFF with 16-bit integer numbers of size of detector in raw/converted coordinates (depending on detector settings).
|
|
/// </remarks>
|
|
virtual void config_internal_generator_image_tiff_put(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Get mask of the detector (binary)
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Detector must be Initialized. Get full pixel mask of the detector. See NXmx standard for meaning of pixel values.
|
|
/// </remarks>
|
|
virtual void config_mask_get(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Get mask of the detector (TIFF)
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Should be in `Idle` state. Get full pixel mask of the detector See NXmx standard for meaning of pixel values
|
|
/// </remarks>
|
|
virtual void config_mask_tiff_get(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Get ROI definitions
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
virtual void config_roi_get(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Upload ROI definitions
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
/// <param name="roiDefinitions"> (optional)</param>
|
|
virtual void config_roi_put(const org::openapitools::server::model::Roi_definitions &roiDefinitions, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// List available detectors
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Configured detectors that can be selected by used
|
|
/// </remarks>
|
|
virtual void config_select_detector_get(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Select detector
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Jungfraujoch allows to control multiple detectors and/or region-of-interests. The command allows to choose one detector from the list (ID has to be consistent with one provided by GET response). Changing detector will set detector to `Inactive` state and will require reinitialization.
|
|
/// </remarks>
|
|
/// <param name="detectorSelection"> (optional)</param>
|
|
virtual void config_select_detector_put(const org::openapitools::server::model::Detector_selection &detectorSelection, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Get data processing configuration
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Can be done anytime
|
|
/// </remarks>
|
|
virtual void config_spot_finding_get(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Configure spot finding
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Can be done anytime, also while data collection is running
|
|
/// </remarks>
|
|
/// <param name="spotFindingSettings"> (optional)</param>
|
|
virtual void config_spot_finding_put(const org::openapitools::server::model::Spot_finding_settings &spotFindingSettings, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Detector must be Initialized. Get user mask of the detector (binary)
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Get user pixel mask of the detector in the actual detector coordinates: 0 - good pixel, 1 - masked
|
|
/// </remarks>
|
|
virtual void config_user_mask_get(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Upload user mask of the detector (binary)
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Should be in `Idle` state. Upload user mask of the detector - this is for example to account for beam stop shadow or misbehaving regions. If detector is conversion mode the mask can be both in raw (1024x512; stacked modules) or converted coordinates. In the latter case - module gaps are ignored and don't need to be assigned value. Mask is expected as binary array (4-byte; unsigned). 0 - good pixel, other value - masked User mask is stored in NXmx pixel mask (bit 8), as well as used in spot finding and azimuthal integration.
|
|
/// </remarks>
|
|
virtual void config_user_mask_put(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Detector must be Initialized. Get user mask of the detector (TIFF)
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Get user pixel mask of the detector in the actual detector coordinates: 0 - good pixel, 1 - masked
|
|
/// </remarks>
|
|
virtual void config_user_mask_tiff_get(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Upload user mask of the detector
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Should be in `Idle` state. Upload user mask of the detector - this is for example to account for beam stop shadow or misbehaving regions. If detector is conversion mode the mask can be both in raw (1024x512; stacked modules) or converted coordinates. In the latter case - module gaps are ignored and don't need to be assigned value. Mask is expected as TIFF (4-byte; unsigned). 0 - good pixel, other value - masked User mask is stored in NXmx pixel mask (bit 8), as well as used in spot finding and azimuthal integration. User mask is not automatically applied - i.e. pixels with user mask will have a valid pixel value in the images.
|
|
/// </remarks>
|
|
virtual void config_user_mask_tiff_put(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Get ZeroMQ metadata socket settings
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
virtual void config_zeromq_metadata_get(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Set ZeroMQ metadata settings
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Jungfraujoch can generate metadata message stream on ZeroMQ PUB socket. This stream covers all images. Here settings of the socket can be adjusted. While the data structure contains also socket_address, this cannot be changed via HTTP and is ignore in PUT request.
|
|
/// </remarks>
|
|
/// <param name="zeromqMetadataSettings"> (optional)</param>
|
|
virtual void config_zeromq_metadata_put(const org::openapitools::server::model::Zeromq_metadata_settings &zeromqMetadataSettings, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Get ZeroMQ preview settings
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
virtual void config_zeromq_preview_get(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Set ZeroMQ preview settings
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Jungfraujoch can generate preview message stream on ZeroMQ SUB socket. Here settings of the socket can be adjusted. While the data structure contains also socket_address, this cannot be changed via HTTP and is ignore in PUT request. Options set with this PUT request have no effect on HTTP based preview.
|
|
/// </remarks>
|
|
/// <param name="zeromqPreviewSettings"> (optional)</param>
|
|
virtual void config_zeromq_preview_put(const org::openapitools::server::model::Zeromq_preview_settings &zeromqPreviewSettings, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Prepare detector to turn off
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Should be in `Idle` or `Error` state. Command deactivates data acquisition and turns off detector high voltage and ASIC. Should be used always before turning off power from the detector.
|
|
/// </remarks>
|
|
virtual void deactivate_post(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Get detector status
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Status of the JUNGFRAU detector
|
|
/// </remarks>
|
|
virtual void detector_status_get(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Get status of FPGA devices
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
virtual void fpga_status_get(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Clear image buffer
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Turns off image buffer for the last data collection. Can be only run when Jungfraujoch is not collecting data.
|
|
/// </remarks>
|
|
virtual void image_buffer_clear_post(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Get image message in CBOR format
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Contains full image data and metadata. The image must come from the latest data collection.
|
|
/// </remarks>
|
|
/// <param name="id">Image ID in the image buffer. Special values: -1 - last image in the buffer, -2: last indexed image in the buffer (optional, default to -1L)</param>
|
|
virtual void image_buffer_image_cbor_get(const std::optional<int64_t> &id, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Get preview image in JPEG format using custom settings
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
/// <param name="id">Image ID in the image buffer. Special values: -1 - last image in the buffer, -2: last indexed image in the buffer (optional, default to -1L)</param>
|
|
/// <param name="showUserMask">Show user mask (optional, default to false)</param>
|
|
/// <param name="showRoi">Show ROI areas on the image (optional, default to false)</param>
|
|
/// <param name="showSpots">Show spot finding results on the image (optional, default to true)</param>
|
|
/// <param name="showBeamCenter">Show beam center on the image (optional, default to true)</param>
|
|
/// <param name="saturation">Saturation value to set contrast in the preview image; if not provided, then autocontrast procedure is used (optional, default to 0.0f)</param>
|
|
/// <param name="jpegQuality">Quality of JPEG image (100 - highest; 0 - lowest) (optional, default to 100L)</param>
|
|
/// <param name="showResRing">Show resolution ring, provided in Angstrom (optional, default to 0.1f)</param>
|
|
/// <param name="color">Color scale for preview image: 0 - indigo, 1 - viridis, 2 - B/W, 3 - heat (optional, default to "indigo")</param>
|
|
/// <param name="showResEst">Show resolution estimation as a ring (optional, default to false)</param>
|
|
virtual void image_buffer_image_jpeg_get(const std::optional<int64_t> &id, const std::optional<bool> &showUserMask, const std::optional<bool> &showRoi, const std::optional<bool> &showSpots, const std::optional<bool> &showBeamCenter, const std::optional<float> &saturation, const std::optional<int64_t> &jpegQuality, const std::optional<float> &showResRing, const std::optional<std::string> &color, const std::optional<bool> &showResEst, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Get preview image in TIFF format
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
/// <param name="id">Image ID in the image buffer. Special values: -1 - last image in the buffer, -2: last indexed image in the buffer (optional, default to -1L)</param>
|
|
virtual void image_buffer_image_tiff_get(const std::optional<int64_t> &id, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Get Start message in CBOR format
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Contains metadata for a dataset (e.g., experimental geometry)
|
|
/// </remarks>
|
|
virtual void image_buffer_start_cbor_get(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Get status of the image buffers
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Can be run at any stage of Jungfraujoch operation, including during data collection. The status of the image buffer is volatile during data collection - if data collection goes for more images than available buffer slots, then image might be replaced in the buffer between calling /images and /image.cbor.
|
|
/// </remarks>
|
|
virtual void image_buffer_status_get(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Initialize detector and data acquisition
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Should be used in two cases: - Detector is in `Inactive` state - Detector is in `Error` state X-ray shutter must be closed. This operation will reconfigure network interface of the detector. During operation of the detector it is recommended to use the `POST /pedestal` operation instead. If storage cells are used, the execution time might be few minutes. This is async function - one needs to use `POST /wait_till_done` to ensure operation is done.
|
|
/// </remarks>
|
|
virtual void initialize_post(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Collect dark current for the detector
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Updates calibration of the JUNGFRAU detector. Must be in `Idle` state. X-ray shutter must be closed. Recommended to run once per hour for long integration times (> 100 us). This is async function - one needs to use `POST /wait_till_done` to ensure operation is done.
|
|
/// </remarks>
|
|
virtual void pedestal_post(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Get pedestal in TIFF format
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
/// <param name="gainLevel">Gain level (0, 1, 2)</param>
|
|
/// <param name="sc">Storage cell number (optional, default to 0)</param>
|
|
virtual void preview_pedestal_tiff_get(const std::optional<int32_t> &gainLevel, const std::optional<int32_t> &sc, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Generate 1D plot from Jungfraujoch
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
/// <param name="type">Type of requested plot</param>
|
|
/// <param name="binning">Binning of frames for the plot (0 = default binning) (optional, default to 0)</param>
|
|
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to false)</param>
|
|
/// <param name="fill">Fill value for elements that were missed during data collection (optional, default to 0.0f)</param>
|
|
/// <param name="experimentalCoord">If measurement has goniometer axis defined, plot X-axis will represent rotation angle If measurement has grid scan defined, plot X-axis and Y-axis will represent grid position, Z will be used as the final value For still measurement the number is ignored (optional, default to false)</param>
|
|
/// <param name="azintUnit">Unit used for azim int. (optional, default to "Q_recipA")</param>
|
|
virtual void preview_plot_get(const std::optional<std::string> &type, const std::optional<int32_t> &binning, const std::optional<bool> &compression, const std::optional<float> &fill, const std::optional<bool> &experimentalCoord, const std::optional<std::string> &azintUnit, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Get full scan result
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
virtual void result_scan_get(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Start detector
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Start data acquisition. Detector must be in `Idle` state. Doesn't run calibration procedure. When the function returns, detector is ready to accept soft/TTL triggers.
|
|
/// </remarks>
|
|
/// <param name="datasetSettings"> (optional)</param>
|
|
virtual void start_post(const org::openapitools::server::model::Dataset_settings &datasetSettings, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Get calibration statistics
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Statistics are provided for each module/storage cell separately
|
|
/// </remarks>
|
|
virtual void statistics_calibration_get(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Get data collection statistics
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Results of the last data collection
|
|
/// </remarks>
|
|
virtual void statistics_data_collection_get(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Get general statistics
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to false)</param>
|
|
virtual void statistics_get(const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Get Jungfraujoch status
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Status of the data acquisition
|
|
/// </remarks>
|
|
virtual void status_get(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Send soft trigger to the detector
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Generate soft trigger
|
|
/// </remarks>
|
|
virtual void trigger_post(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Get Jungfraujoch version of jfjoch_broker
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
virtual void version_get(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Wait for acquisition done
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Block execution of external script till initialization, data collection or pedestal is finished. Running this command does not affect (cancel) running data collection, it is only to ensure synchronous execution of other software. To not block web server for a indefinite period of time, the procedure is provided with a timeout. Extending timeout is possible, but requires to ensure safety that client will not close the connection and retry the connection.
|
|
/// </remarks>
|
|
/// <param name="timeout">Timeout in seconds (0 == immediate response) (optional, default to 60)</param>
|
|
virtual void wait_till_done_post(const std::optional<int32_t> &timeout, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Return XFEL event codes for the current data acquisition
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Return array of XFEL event codes
|
|
/// </remarks>
|
|
virtual void xfel_event_code_get(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Return XFEL pulse IDs for the current data acquisition
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Return array of XFEL pulse IDs - (-1) if image not recorded
|
|
/// </remarks>
|
|
virtual void xfel_pulse_id_get(Pistache::Http::ResponseWriter &response) = 0;
|
|
|
|
};
|
|
|
|
} // namespace org::openapitools::server::api
|
|
|
|
#endif /* DefaultApi_H_ */
|
|
|