669 lines
38 KiB
C++
669 lines
38 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.
|
|
*
|
|
* The version of the OpenAPI document: 1.0.0-rc.27
|
|
* 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 "Dataset_settings.h"
|
|
#include "Detector_list.h"
|
|
#include "Detector_selection.h"
|
|
#include "Detector_settings.h"
|
|
#include "Detector_status.h"
|
|
#include "Error_message.h"
|
|
#include "Fpga_status_inner.h"
|
|
#include "Image_format_settings.h"
|
|
#include "Instrument_metadata.h"
|
|
#include "Jfjoch_statistics.h"
|
|
#include "Measurement_statistics.h"
|
|
#include "Plots.h"
|
|
#include "Preview_settings.h"
|
|
#include "Roi_box_list.h"
|
|
#include "Roi_circle_list.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_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_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_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_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 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 plot_azim_int_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void plot_bkg_estimate_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void plot_error_pixel_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void plot_image_collection_efficiency_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void plot_indexing_rate_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void plot_indexing_unit_cell_angle_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void plot_indexing_unit_cell_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void plot_receiver_delay_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void plot_receiver_free_send_buffers_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void plot_roi_max_count_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void plot_roi_sum_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void plot_roi_valid_pixels_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void plot_spot_count_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void plot_strong_pixel_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void preview_calibration_tiff_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void preview_image_jpeg_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void preview_image_jpeg_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void preview_image_tiff_get_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 roi_box_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void roi_box_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void roi_circle_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
|
void roi_circle_put_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 radial integration configuration
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Can be done anytime
|
|
/// </remarks>
|
|
virtual void config_azim_int_get(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Configure radial 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 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>
|
|
/// 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 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>
|
|
/// 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>
|
|
/// 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>
|
|
/// 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>
|
|
/// 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>
|
|
/// 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>
|
|
/// 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>
|
|
/// Generate radial integration profile
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Generate average radial integration profile
|
|
/// </remarks>
|
|
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
|
|
virtual void plot_azim_int_get(const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Generate background estimate plot
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Mean intensity for d = 3 - 5 A per image; binning is configurable
|
|
/// </remarks>
|
|
/// <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 true)</param>
|
|
virtual void plot_bkg_estimate_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Generate error pixels plot
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Count of error (mean) and saturated (mean/max) pixels per image; binning is configurable
|
|
/// </remarks>
|
|
/// <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 true)</param>
|
|
virtual void plot_error_pixel_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Generate image collection efficiency plot
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Ratio of collected and expected packets per image; binning is configurable
|
|
/// </remarks>
|
|
/// <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 true)</param>
|
|
virtual void plot_image_collection_efficiency_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Generate indexing rate plot
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Image indexing rate; binning is configurable
|
|
/// </remarks>
|
|
/// <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 true)</param>
|
|
virtual void plot_indexing_rate_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Generate indexing unit cell angle plot
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Crystal unit cell based on indexing results; binning is configurable
|
|
/// </remarks>
|
|
/// <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 true)</param>
|
|
virtual void plot_indexing_unit_cell_angle_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Generate indexing unit cell length plots
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Crystal unit cell based on indexing results; binning is configurable
|
|
/// </remarks>
|
|
/// <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 true)</param>
|
|
virtual void plot_indexing_unit_cell_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Generate receiver delay plot
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Amount of frames the receiver is behind the FPGA for each image - used for internal debugging; binning is configurable
|
|
/// </remarks>
|
|
/// <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 true)</param>
|
|
virtual void plot_receiver_delay_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Generate receiver free send buffer plot
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Amount of send buffers available during frame processing - used for internal debugging; binning is configurable
|
|
/// </remarks>
|
|
/// <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 true)</param>
|
|
virtual void plot_receiver_free_send_buffers_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Generate plot of ROI max count
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Max count of ROI per image; binning is configurable
|
|
/// </remarks>
|
|
/// <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 true)</param>
|
|
virtual void plot_roi_max_count_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Generate ROI sum plot
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Sum of ROI rectangle per image; binning is configurable
|
|
/// </remarks>
|
|
/// <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 true)</param>
|
|
virtual void plot_roi_sum_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Generate plot of ROI valid pixels
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Number of pixels within a ROI area; pixels with special values (overload, bad pixel) are excluded; multipixels are counted just once; binning is configurable
|
|
/// </remarks>
|
|
/// <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 true)</param>
|
|
virtual void plot_roi_valid_pixels_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Generate spot count plot
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Number of spots per image; binning is configurable
|
|
/// </remarks>
|
|
/// <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 true)</param>
|
|
virtual void plot_spot_count_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Generate strong pixels plot
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Count of strong pixels per image (from spot finding); binning is configurable
|
|
/// </remarks>
|
|
/// <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 true)</param>
|
|
virtual void plot_strong_pixel_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Get last preview image in TIFF format for calibration with PyFAI/Dioptas
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Image is reduced to unsigned 16-bit images, all bad pixels are set to 65535 and image is mirrored in vertical direction
|
|
/// </remarks>
|
|
virtual void preview_calibration_tiff_get(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Get last preview image in JPEG format using default settings
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
virtual void preview_image_jpeg_get(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Get last preview image in JPEG format using custom settings
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
/// <param name="previewSettings"> (optional)</param>
|
|
virtual void preview_image_jpeg_post(const org::openapitools::server::model::Preview_settings &previewSettings, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Get last preview image in TIFF format
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
virtual void preview_image_tiff_get(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>
|
|
/// Get box ROIs
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
virtual void roi_box_get(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Upload box ROIs
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
/// <param name="roiBoxList"> (optional)</param>
|
|
virtual void roi_box_put(const org::openapitools::server::model::Roi_box_list &roiBoxList, Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Get circular ROI
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
virtual void roi_circle_get(Pistache::Http::ResponseWriter &response) = 0;
|
|
/// <summary>
|
|
/// Upload circular ROI
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
/// <param name="roiCircleList"> (optional)</param>
|
|
virtual void roi_circle_put(const org::openapitools::server::model::Roi_circle_list &roiCircleList, 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 true)</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_ */
|
|
|