diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 393c857f..63728c3d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -251,6 +251,7 @@ synthesis:vivado_pcie_100g: - fpga/pcie_driver/jfjoch_fpga.h tags: - vivado + retry: 1 artifacts: paths: - "jfjoch_fpga_pcie_100g.mcs" @@ -284,6 +285,7 @@ synthesis:vivado_pcie_8x10g: allow_failure: true tags: - vivado + retry: 1 artifacts: paths: - "jfjoch_fpga_pcie_8x10g.mcs" diff --git a/VERSION b/VERSION index 101b40ba..65241f96 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.0_rc.10 +1.0.0_rc.11 diff --git a/broker/JFJochBrokerHttp.cpp b/broker/JFJochBrokerHttp.cpp index 8ce6442d..a1148582 100644 --- a/broker/JFJochBrokerHttp.cpp +++ b/broker/JFJochBrokerHttp.cpp @@ -475,8 +475,21 @@ void JFJochBrokerHttp::status_get(Pistache::Http::ResponseWriter &response) { ProcessOutput(Convert(state_machine.GetStatus()), response); } -void JFJochBrokerHttp::wait_till_done_post(Pistache::Http::ResponseWriter &response) { - auto state = state_machine.WaitTillMeasurementDone(std::chrono::seconds(5)); + + +void JFJochBrokerHttp::wait_till_done_post(const std::optional &timeout, + Pistache::Http::ResponseWriter &response) { + JFJochState state; + if (!timeout) + state = state_machine.WaitTillMeasurementDone(std::chrono::minutes(1)); + else if ((timeout.value() > 3600) || (timeout.value() < 0)) { + response.send(Pistache::Http::Code::Bad_Request); + return; + } else if (timeout.value() == 0) + state = state_machine.GetState(); + else + state = state_machine.WaitTillMeasurementDone(std::chrono::seconds(timeout.value())); + switch (state) { case JFJochState::Idle: response.send(Pistache::Http::Code::Ok); diff --git a/broker/JFJochBrokerHttp.h b/broker/JFJochBrokerHttp.h index ef9fd11b..d51b3865 100644 --- a/broker/JFJochBrokerHttp.h +++ b/broker/JFJochBrokerHttp.h @@ -90,7 +90,7 @@ class JFJochBrokerHttp : public org::openapitools::server::api::DefaultApi { void status_get(Pistache::Http::ResponseWriter &response) override; - void wait_till_done_post(Pistache::Http::ResponseWriter &response) override; + void wait_till_done_post(const std::optional &timeoutMs, Pistache::Http::ResponseWriter &response) override; void trigger_post(Pistache::Http::ResponseWriter &response) override; void pedestal_post(Pistache::Http::ResponseWriter &response) override; diff --git a/broker/JFJochBrokerParser.cpp b/broker/JFJochBrokerParser.cpp index f2db7659..c612342b 100644 --- a/broker/JFJochBrokerParser.cpp +++ b/broker/JFJochBrokerParser.cpp @@ -2,6 +2,8 @@ #include "JFJochBrokerParser.h" #include "../common/NetworkAddressConvert.h" +#include "../frame_serialize/ZMQStream2Pusher.h" +#include "../frame_serialize/DumpCBORToFilePusher.h" inline bool CHECK_ARRAY(const nlohmann::json &j, const std::string& tag) { if (j.contains(tag)) { @@ -183,6 +185,7 @@ inline int64_t TimeToUs(const std::string &unit) { inline std::chrono::microseconds GET_TIME(const nlohmann::json &j, const std::string& tag) { if (j.contains(tag)) { + // If no units provided for time, this is always microsecond if (j[tag].is_number()) return std::chrono::microseconds (std::lround(j[tag].get() * 1000.0 * 1000.0)); else if (j[tag].is_string()) { @@ -300,6 +303,35 @@ void ParseDetectorSetup(const nlohmann::json &j, const std::string& tag, JFJochB throw JFJochException(JFJochExceptionCategory::JSON, "Detector setup not found"); } +void ParseImagePusher(const nlohmann::json &input, std::unique_ptr &image_pusher) { + std::string pusher_type = ParseString(input, "stream_type", "zmq"); + if (pusher_type == "zmq") { + int32_t zmq_send_watermark = ParseInt32(input, "zmq_send_watermark", 100); + int32_t zmq_send_buffer_size = ParseInt32(input, "zmq_send_buffer_size", -1); + + auto tmp = std::make_unique(ParseStringArray(input, "zmq_image_addr"), + zmq_send_watermark, + zmq_send_buffer_size); + + std::string preview_addr = ParseString(input, "zmq_preview_addr", ""); + if (!preview_addr.empty()) + tmp->PreviewSocket(preview_addr); + + if (input.contains("zmq_preview_period")) + tmp->PreviewCounterPeriod(GET_TIME(input, "zmq_preview_period")); + + std::string writer_notification_addr = ParseString(input, "zmq_writer_notification_addr", ""); + if (!writer_notification_addr.empty()) + tmp->WriterNotificationSocket(writer_notification_addr); + + image_pusher = std::move(tmp); + } else if (pusher_type == "dump_cbor") { + image_pusher = std::make_unique(); + } else + throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, + "stream_type allowed: zmq (default), dump_cbor"); +} + void ParseFacilityConfiguration(const nlohmann::json &input, const std::string& tag, DiffractionExperiment &experiment) { if (CHECK_OBJECT(input, tag)) { auto j = input[tag]; @@ -328,12 +360,11 @@ void ParseFacilityConfiguration(const nlohmann::json &input, const std::string& experiment.PedestalG1Frames(GET_I64(j, "pedestal_g1_frames")); if (j.contains("pedestal_g2_frames")) experiment.PedestalG2Frames(GET_I64(j, "pedestal_g2_frames")); - if (j.contains("detector_trigger_delay_us")) - experiment.DetectorDelay(GET_TIME(j, "detector_trigger_delay_us")); + if (j.contains("detector_trigger_delay")) + experiment.DetectorDelay(GET_TIME(j, "detector_trigger_delay")); + + experiment.FrameTime(GET_TIME(j, "frame_time"), GET_TIME(j, "count_time")); - experiment.FrameTime(GET_TIME(j, "frame_time_us"), GET_TIME(j, "count_time_us")); - if (j.contains("preview_period_us")) - experiment.PreviewPeriod(GET_TIME(j, "preview_period_us")); experiment.UseInternalPacketGenerator(GET_BOOL(j, "internal_frame_generator", false)); if (experiment.IsUsingInternalPacketGen()) experiment.ConversionOnFPGA(false); diff --git a/broker/JFJochBrokerParser.h b/broker/JFJochBrokerParser.h index 7cce97e7..da263944 100644 --- a/broker/JFJochBrokerParser.h +++ b/broker/JFJochBrokerParser.h @@ -14,6 +14,7 @@ DetectorGeometry ParseDetectorGeometry(const nlohmann::json &j); DetectorSetup ParseDetectorSetup(const nlohmann::json &j); void ParseDetectorSetup(const nlohmann::json &j, const std::string& tag, JFJochBrokerHttp& broker); void ParseFacilityConfiguration(const nlohmann::json &j, const std::string& tag, DiffractionExperiment &experiment); +void ParseImagePusher(const nlohmann::json &j, std::unique_ptr &image_pusher); void ParseAcquisitionDeviceGroup(const nlohmann::json &input, const std::string& tag, AcquisitionDeviceGroup &aq_devices); std::vector ParseStringArray(const nlohmann::json &input, const std::string& tag); diff --git a/broker/JFJochStateMachine.cpp b/broker/JFJochStateMachine.cpp index 688686d6..81e0d256 100644 --- a/broker/JFJochStateMachine.cpp +++ b/broker/JFJochStateMachine.cpp @@ -340,12 +340,6 @@ void JFJochStateMachine::Start(const DatasetSettings& settings) { } } -void JFJochStateMachine::WaitTillMeasurementDone() { -std::unique_lock ul(m); - -c.wait(ul, [&] { return !IsRunning(); }); -} - void JFJochStateMachine::MeasurementThread() { try { auto tmp_output = services.Stop(); @@ -659,6 +653,14 @@ bool JFJochStateMachine::IsRunning() const { } } +JFJochState JFJochStateMachine::WaitTillMeasurementDone() { + std::unique_lock ul(m); + + c.wait(ul, [&] { return !IsRunning(); }); + + return state; +} + JFJochState JFJochStateMachine::WaitTillMeasurementDone(std::chrono::milliseconds timeout) { std::unique_lock ul(m); diff --git a/broker/JFJochStateMachine.h b/broker/JFJochStateMachine.h index 3d00e3d3..314e9d26 100644 --- a/broker/JFJochStateMachine.h +++ b/broker/JFJochStateMachine.h @@ -141,7 +141,7 @@ public: void Pedestal(); void Deactivate(); void Start(const DatasetSettings& settings); - void WaitTillMeasurementDone(); + JFJochState WaitTillMeasurementDone(); JFJochState WaitTillMeasurementDone(std::chrono::milliseconds timeout); void Trigger(); diff --git a/broker/gen/api/DefaultApi.cpp b/broker/gen/api/DefaultApi.cpp index 48b528fd..23cc59b1 100644 --- a/broker/gen/api/DefaultApi.cpp +++ b/broker/gen/api/DefaultApi.cpp @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -1275,12 +1275,22 @@ void DefaultApi::version_get_handler(const Pistache::Rest::Request &, Pistache:: } } -void DefaultApi::wait_till_done_post_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { +void DefaultApi::wait_till_done_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { try { + // Getting the query params + auto timeoutQuery = request.query().get("timeout"); + std::optional timeout; + if(timeoutQuery.has_value()){ + int32_t valueQuery_instance; + if(fromStringValue(timeoutQuery.value(), valueQuery_instance)){ + timeout = valueQuery_instance; + } + } + try { - this->wait_till_done_post(response); + this->wait_till_done_post(timeout, response); } catch (Pistache::Http::HttpError &e) { response.send(static_cast(e.code()), e.what()); return; diff --git a/broker/gen/api/DefaultApi.h b/broker/gen/api/DefaultApi.h index 45a15a8f..ae7c4beb 100644 --- a/broker/gen/api/DefaultApi.h +++ b/broker/gen/api/DefaultApi.h @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -479,9 +479,10 @@ private: /// Wait for acquisition done /// /// - /// 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 long period of time, the procedure is provided with a timeout of 5 seconds. + /// 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. /// - virtual void wait_till_done_post(Pistache::Http::ResponseWriter &response) = 0; + /// Timeout in seconds (0 == immediate response) (optional, default to 60) + virtual void wait_till_done_post(const std::optional &timeout, Pistache::Http::ResponseWriter &response) = 0; /// /// Return XFEL event codes for the current data acquisition /// diff --git a/broker/gen/model/Broker_status.cpp b/broker/gen/model/Broker_status.cpp index 1f415cab..0cf2b479 100644 --- a/broker/gen/model/Broker_status.cpp +++ b/broker/gen/model/Broker_status.cpp @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Broker_status.h b/broker/gen/model/Broker_status.h index 0d8212bc..a5905ea6 100644 --- a/broker/gen/model/Broker_status.h +++ b/broker/gen/model/Broker_status.h @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Calibration_statistics_inner.cpp b/broker/gen/model/Calibration_statistics_inner.cpp index aab6c727..2c472128 100644 --- a/broker/gen/model/Calibration_statistics_inner.cpp +++ b/broker/gen/model/Calibration_statistics_inner.cpp @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Calibration_statistics_inner.h b/broker/gen/model/Calibration_statistics_inner.h index 4c81705e..d9d114dd 100644 --- a/broker/gen/model/Calibration_statistics_inner.h +++ b/broker/gen/model/Calibration_statistics_inner.h @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Dataset_settings.cpp b/broker/gen/model/Dataset_settings.cpp index 4c83e300..4da92a9c 100644 --- a/broker/gen/model/Dataset_settings.cpp +++ b/broker/gen/model/Dataset_settings.cpp @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -38,6 +38,7 @@ Dataset_settings::Dataset_settings() m_Space_group_number = 0L; m_Space_group_numberIsSet = false; m_Sample_name = ""; + m_Sample_nameIsSet = false; m_Fpga_output = "auto"; m_Fpga_outputIsSet = false; m_Compression = "bslz4"; @@ -295,8 +296,8 @@ bool Dataset_settings::operator==(const Dataset_settings& rhs) const ((!spaceGroupNumberIsSet() && !rhs.spaceGroupNumberIsSet()) || (spaceGroupNumberIsSet() && rhs.spaceGroupNumberIsSet() && getSpaceGroupNumber() == rhs.getSpaceGroupNumber())) && - (getSampleName() == rhs.getSampleName()) - && + + ((!sampleNameIsSet() && !rhs.sampleNameIsSet()) || (sampleNameIsSet() && rhs.sampleNameIsSet() && getSampleName() == rhs.getSampleName())) && ((!fpgaOutputIsSet() && !rhs.fpgaOutputIsSet()) || (fpgaOutputIsSet() && rhs.fpgaOutputIsSet() && getFpgaOutput() == rhs.getFpgaOutput())) && @@ -364,7 +365,8 @@ void to_json(nlohmann::json& j, const Dataset_settings& o) j["images_per_file"] = o.m_Images_per_file; if(o.spaceGroupNumberIsSet()) j["space_group_number"] = o.m_Space_group_number; - j["sample_name"] = o.m_Sample_name; + if(o.sampleNameIsSet()) + j["sample_name"] = o.m_Sample_name; if(o.fpgaOutputIsSet()) j["fpga_output"] = o.m_Fpga_output; if(o.compressionIsSet()) @@ -430,7 +432,11 @@ void from_json(const nlohmann::json& j, Dataset_settings& o) j.at("space_group_number").get_to(o.m_Space_group_number); o.m_Space_group_numberIsSet = true; } - j.at("sample_name").get_to(o.m_Sample_name); + if(j.find("sample_name") != j.end()) + { + j.at("sample_name").get_to(o.m_Sample_name); + o.m_Sample_nameIsSet = true; + } if(j.find("fpga_output") != j.end()) { j.at("fpga_output").get_to(o.m_Fpga_output); @@ -640,6 +646,15 @@ std::string Dataset_settings::getSampleName() const void Dataset_settings::setSampleName(std::string const& value) { m_Sample_name = value; + m_Sample_nameIsSet = true; +} +bool Dataset_settings::sampleNameIsSet() const +{ + return m_Sample_nameIsSet; +} +void Dataset_settings::unsetSample_name() +{ + m_Sample_nameIsSet = false; } std::string Dataset_settings::getFpgaOutput() const { diff --git a/broker/gen/model/Dataset_settings.h b/broker/gen/model/Dataset_settings.h index a0c1b898..e4ab0d70 100644 --- a/broker/gen/model/Dataset_settings.h +++ b/broker/gen/model/Dataset_settings.h @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -76,7 +76,7 @@ public: bool ntriggerIsSet() const; void unsetNtrigger(); /// - /// Image time. If not provided (or zero value) the frame time is assumed as default. For JUNGFRAU, image time must be multiple of frame time, up to 256 * frame_time. In XFEL mode: summation happens for frames collected with multiple triggers. Ignored for storage cells and if raw data are saved. + /// Image time. If not provided (or zero value) the frame time is assumed as default. Image time must be multiple of frame time; max value is 256 * frame_time. In XFEL mode: summation happens for frames collected with multiple triggers. Ignored for storage cells and if raw data are saved. /// int64_t getImageTimeUs() const; void setImageTimeUs(int64_t const value); @@ -128,6 +128,8 @@ public: /// std::string getSampleName() const; void setSampleName(std::string const& value); + bool sampleNameIsSet() const; + void unsetSample_name(); /// /// FPGA output data type /// @@ -244,7 +246,7 @@ protected: int64_t m_Space_group_number; bool m_Space_group_numberIsSet; std::string m_Sample_name; - + bool m_Sample_nameIsSet; std::string m_Fpga_output; bool m_Fpga_outputIsSet; std::string m_Compression; diff --git a/broker/gen/model/Dataset_settings_unit_cell.cpp b/broker/gen/model/Dataset_settings_unit_cell.cpp index c63fe6e4..30e2f433 100644 --- a/broker/gen/model/Dataset_settings_unit_cell.cpp +++ b/broker/gen/model/Dataset_settings_unit_cell.cpp @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Dataset_settings_unit_cell.h b/broker/gen/model/Dataset_settings_unit_cell.h index b5fb8fa8..4f8c7728 100644 --- a/broker/gen/model/Dataset_settings_unit_cell.h +++ b/broker/gen/model/Dataset_settings_unit_cell.h @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_list.cpp b/broker/gen/model/Detector_list.cpp index e7e1a0f8..2df87068 100644 --- a/broker/gen/model/Detector_list.cpp +++ b/broker/gen/model/Detector_list.cpp @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_list.h b/broker/gen/model/Detector_list.h index cd0469e7..f2547167 100644 --- a/broker/gen/model/Detector_list.h +++ b/broker/gen/model/Detector_list.h @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_list_detectors_inner.cpp b/broker/gen/model/Detector_list_detectors_inner.cpp index 80f8fb7f..f37bb3d7 100644 --- a/broker/gen/model/Detector_list_detectors_inner.cpp +++ b/broker/gen/model/Detector_list_detectors_inner.cpp @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_list_detectors_inner.h b/broker/gen/model/Detector_list_detectors_inner.h index fe3aeae9..9e19589f 100644 --- a/broker/gen/model/Detector_list_detectors_inner.h +++ b/broker/gen/model/Detector_list_detectors_inner.h @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_selection.cpp b/broker/gen/model/Detector_selection.cpp index 4bc6787c..cd149807 100644 --- a/broker/gen/model/Detector_selection.cpp +++ b/broker/gen/model/Detector_selection.cpp @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_selection.h b/broker/gen/model/Detector_selection.h index 01943228..6f11cfc1 100644 --- a/broker/gen/model/Detector_selection.h +++ b/broker/gen/model/Detector_selection.h @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_settings.cpp b/broker/gen/model/Detector_settings.cpp index 9ad08be8..9183b8c9 100644 --- a/broker/gen/model/Detector_settings.cpp +++ b/broker/gen/model/Detector_settings.cpp @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_settings.h b/broker/gen/model/Detector_settings.h index 53aa3e43..eb6a9776 100644 --- a/broker/gen/model/Detector_settings.h +++ b/broker/gen/model/Detector_settings.h @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_status.cpp b/broker/gen/model/Detector_status.cpp index 68041369..779c6e25 100644 --- a/broker/gen/model/Detector_status.cpp +++ b/broker/gen/model/Detector_status.cpp @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_status.h b/broker/gen/model/Detector_status.h index 56266cf5..5471f534 100644 --- a/broker/gen/model/Detector_status.h +++ b/broker/gen/model/Detector_status.h @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Error_message.cpp b/broker/gen/model/Error_message.cpp index df72b607..cae36e90 100644 --- a/broker/gen/model/Error_message.cpp +++ b/broker/gen/model/Error_message.cpp @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Error_message.h b/broker/gen/model/Error_message.h index c50a5e81..e873e4d8 100644 --- a/broker/gen/model/Error_message.h +++ b/broker/gen/model/Error_message.h @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Helpers.cpp b/broker/gen/model/Helpers.cpp index e0fdbefd..946cb8b7 100644 --- a/broker/gen/model/Helpers.cpp +++ b/broker/gen/model/Helpers.cpp @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Helpers.h b/broker/gen/model/Helpers.h index 3b8721d7..7f633102 100644 --- a/broker/gen/model/Helpers.h +++ b/broker/gen/model/Helpers.h @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Measurement_statistics.cpp b/broker/gen/model/Measurement_statistics.cpp index 67dca8a7..9440c446 100644 --- a/broker/gen/model/Measurement_statistics.cpp +++ b/broker/gen/model/Measurement_statistics.cpp @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Measurement_statistics.h b/broker/gen/model/Measurement_statistics.h index f020ec10..ce7ef3ce 100644 --- a/broker/gen/model/Measurement_statistics.h +++ b/broker/gen/model/Measurement_statistics.h @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Plot.cpp b/broker/gen/model/Plot.cpp index b3c73734..9757fe8f 100644 --- a/broker/gen/model/Plot.cpp +++ b/broker/gen/model/Plot.cpp @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Plot.h b/broker/gen/model/Plot.h index 6cbf172a..cf77a0e6 100644 --- a/broker/gen/model/Plot.h +++ b/broker/gen/model/Plot.h @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Plots.cpp b/broker/gen/model/Plots.cpp index f8ca7236..139b4d3f 100644 --- a/broker/gen/model/Plots.cpp +++ b/broker/gen/model/Plots.cpp @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Plots.h b/broker/gen/model/Plots.h index 4d4dcafd..85517bc2 100644 --- a/broker/gen/model/Plots.h +++ b/broker/gen/model/Plots.h @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Preview_settings.cpp b/broker/gen/model/Preview_settings.cpp index 32349411..e7620228 100644 --- a/broker/gen/model/Preview_settings.cpp +++ b/broker/gen/model/Preview_settings.cpp @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Preview_settings.h b/broker/gen/model/Preview_settings.h index ed7afbf5..22ccb437 100644 --- a/broker/gen/model/Preview_settings.h +++ b/broker/gen/model/Preview_settings.h @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Rad_int_settings.cpp b/broker/gen/model/Rad_int_settings.cpp index 05221beb..60640622 100644 --- a/broker/gen/model/Rad_int_settings.cpp +++ b/broker/gen/model/Rad_int_settings.cpp @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Rad_int_settings.h b/broker/gen/model/Rad_int_settings.h index d38d2ace..1d2f23d7 100644 --- a/broker/gen/model/Rad_int_settings.h +++ b/broker/gen/model/Rad_int_settings.h @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Roi_box.cpp b/broker/gen/model/Roi_box.cpp index e5e4e701..cc039149 100644 --- a/broker/gen/model/Roi_box.cpp +++ b/broker/gen/model/Roi_box.cpp @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Roi_box.h b/broker/gen/model/Roi_box.h index 72a47cb4..f0bd276d 100644 --- a/broker/gen/model/Roi_box.h +++ b/broker/gen/model/Roi_box.h @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Roi_box_list.cpp b/broker/gen/model/Roi_box_list.cpp index 624e94f5..e1093453 100644 --- a/broker/gen/model/Roi_box_list.cpp +++ b/broker/gen/model/Roi_box_list.cpp @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Roi_box_list.h b/broker/gen/model/Roi_box_list.h index b0abb374..6a391eff 100644 --- a/broker/gen/model/Roi_box_list.h +++ b/broker/gen/model/Roi_box_list.h @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Roi_circle.cpp b/broker/gen/model/Roi_circle.cpp index 8f8f3578..75b2a936 100644 --- a/broker/gen/model/Roi_circle.cpp +++ b/broker/gen/model/Roi_circle.cpp @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Roi_circle.h b/broker/gen/model/Roi_circle.h index d703754c..26753d46 100644 --- a/broker/gen/model/Roi_circle.h +++ b/broker/gen/model/Roi_circle.h @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Roi_circle_list.cpp b/broker/gen/model/Roi_circle_list.cpp index 21714cc4..d2dd0b44 100644 --- a/broker/gen/model/Roi_circle_list.cpp +++ b/broker/gen/model/Roi_circle_list.cpp @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Roi_circle_list.h b/broker/gen/model/Roi_circle_list.h index ef6f6184..ce4a0dc8 100644 --- a/broker/gen/model/Roi_circle_list.h +++ b/broker/gen/model/Roi_circle_list.h @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Rotation_axis.cpp b/broker/gen/model/Rotation_axis.cpp index b41eaf63..cafed000 100644 --- a/broker/gen/model/Rotation_axis.cpp +++ b/broker/gen/model/Rotation_axis.cpp @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Rotation_axis.h b/broker/gen/model/Rotation_axis.h index 76355194..c037d34b 100644 --- a/broker/gen/model/Rotation_axis.h +++ b/broker/gen/model/Rotation_axis.h @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Spot_finding_settings.cpp b/broker/gen/model/Spot_finding_settings.cpp index 8ae56287..40193b87 100644 --- a/broker/gen/model/Spot_finding_settings.cpp +++ b/broker/gen/model/Spot_finding_settings.cpp @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Spot_finding_settings.h b/broker/gen/model/Spot_finding_settings.h index afcbe7a6..d040828f 100644 --- a/broker/gen/model/Spot_finding_settings.h +++ b/broker/gen/model/Spot_finding_settings.h @@ -2,7 +2,7 @@ * Jungfraujoch * Jungfraujoch Broker Web API * -* The version of the OpenAPI document: 1.0.0_rc.10 +* The version of the OpenAPI document: 1.0.0_rc.11 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/jfjoch_api.yaml b/broker/jfjoch_api.yaml index a3e5a710..58c1e6ce 100644 --- a/broker/jfjoch_api.yaml +++ b/broker/jfjoch_api.yaml @@ -2,7 +2,7 @@ openapi: 3.0.3 info: title: Jungfraujoch description: Jungfraujoch Broker Web API - version: 1.0.0_rc.10 + version: 1.0.0_rc.11 contact: email: filip.leonarski@psi.ch components: @@ -45,7 +45,6 @@ components: - beam_y_pxl - detector_distance_mm - incident_energy_keV - - sample_name properties: images_per_trigger: type: integer @@ -117,6 +116,7 @@ components: maximum: 194 sample_name: type: string + default: "" description: | /entry/sample/name in NXmx Sample name @@ -853,22 +853,37 @@ paths: /wait_till_done: post: summary: Wait for acquisition done + parameters: + - in: query + name: timeout + required: false + schema: + type: integer + default: 60 + minimum: 0 + maximum: 3600 + description: Timeout in seconds (0 == immediate response) description: | 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 long period of time, the procedure is provided with a timeout of 5 seconds. + 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. responses: "200": description: Detector in `Idle` state, another data collection can start immediately + "400": + description: Timeout parameter out of bounds "500": description: Error within Jungfraujoch code - see output message. content: application/json: schema: $ref: '#/components/schemas/error_message' + "502": + description: Detector is inactive mode "504": - description: 5 second timeout reached, need to restart operation + description: Timeout reached, need to restart operation /trigger: post: diff --git a/broker/jfjoch_broker.cpp b/broker/jfjoch_broker.cpp index 270335dd..ed3282d4 100644 --- a/broker/jfjoch_broker.cpp +++ b/broker/jfjoch_broker.cpp @@ -12,8 +12,6 @@ #include "JFJochBrokerHttp.h" #include "JFJochBrokerParser.h" -#include "../frame_serialize/ZMQStream2Pusher.h" -#include "../frame_serialize/DumpCBORToFilePusher.h" static Pistache::Http::Endpoint *httpEndpoint; @@ -81,25 +79,7 @@ int main (int argc, char **argv) { if (aq_devices.size() > 0) { experiment.DataStreams(aq_devices.size()); - std::string pusher_type = ParseString(input, "stream_type", "zmq"); - if (pusher_type == "zmq") { - int32_t zmq_send_watermark = ParseInt32(input, "zmq_send_watermark", 100); - int32_t zmq_send_buffer_size = ParseInt32(input, "zmq_send_buffer_size", -1); - - auto tmp = std::make_unique(ParseStringArray(input, "zmq_image_addr"), - zmq_send_watermark, - zmq_send_buffer_size); - - std::string preview_addr = ParseString(input, "zmq_preview_addr", ""); - if (!preview_addr.empty()) - tmp->PreviewSocket(preview_addr); - - image_pusher = std::move(tmp); - } else if (pusher_type == "dump_cbor") { - image_pusher = std::make_unique(); - } else - throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, - "stream_type allowed: zmq (default), dump_cbor"); + ParseImagePusher(input, image_pusher); int32_t send_buffer_size_MiB = ParseInt32(input, "send_buffer_size_MiB", 2048); receiver = std::make_unique(aq_devices, logger, *image_pusher, send_buffer_size_MiB); diff --git a/broker/redoc-static.html b/broker/redoc-static.html index 712a6996..9b13140c 100644 --- a/broker/redoc-static.html +++ b/broker/redoc-static.html @@ -366,7 +366,7 @@ data-styled.g137[id="sc-cMdfCE"]{content:"dvQijr,"}/*!sc*/ 55.627 l 55.6165,55.627 -231.245496,231.24803 c -127.185,127.1864 -231.5279,231.248 -231.873,231.248 -0.3451,0 -104.688, -104.0616 -231.873,-231.248 z - " fill="currentColor">

Jungfraujoch (1.0.0_rc.10)

Download OpenAPI specification:Download

Jungfraujoch (1.0.0_rc.11)

Download OpenAPI specification:Download

Jungfraujoch Broker Web API

Initialize detector and data acquisition

ntrigger
integer <int64> >= 1
Default: 1

Number of TTL trigger that the detector is expected to receive during data collection

-
image_time_us
integer <int64> >= 0
image_time_us
integer <int64> >= 0

Image time. If not provided (or zero value) the frame time is assumed as default. -For JUNGFRAU, image time must be multiple of frame time, up to 256 * frame_time.
In XFEL mode: summation happens for frames collected with multiple triggers. +" class="sc-iKOmoZ sc-cCzLxZ WVNwY jaVotg">

Image time. +If not provided (or zero value) the frame time is assumed as default. +Image time must be multiple of frame time; max value is 256 * frame_time.
In XFEL mode: summation happens for frames collected with multiple triggers. Ignored for storage cells and if raw data are saved.

beam_x_pxl
required
number <float>

Prefix for filenames. If left empty, no file will be saved.

images_per_file
integer <int64> >= 0
Default: 1000

Number of files in a single HDF5 data file (0 = write all images to a single data file).

-
space_group_number
integer <int64> [ 0 .. 194 ]
Default: 0
sample_name
required
string
space_group_number
integer <int64> [ 0 .. 194 ]
Default: 0
sample_name
string
Default: ""

/entry/sample/name in NXmx Sample name

@@ -498,18 +500,26 @@ Transferred over CBOR stream, though not saved in HDF5 file.

" class="sc-iKOmoZ sc-cCzLxZ WVNwY VEBGS sc-ckdEwu LxEPk">

Input parsing or validation error

Request samples

Content type
application/json
{
  • "images_per_trigger": 1,
  • "ntrigger": 1,
  • "image_time_us": 0,
  • "beam_x_pxl": 0.1,
  • "beam_y_pxl": 0.1,
  • "detector_distance_mm": 0.1,
  • "incident_energy_keV": 0.1,
  • "file_prefix": "",
  • "images_per_file": 1000,
  • "space_group_number": 0,
  • "sample_name": "string",
  • "fpga_output": "auto",
  • "compression": "bslz4",
  • "total_flux": 0.1,
  • "transmission": 1,
  • "goniometer": {
    },
  • "header_appendix": null,
  • "image_appendix": null,
  • "energy_multiplier": 1,
  • "data_reduction_factor_serialmx": 1,
  • "run_number": 0,
  • "run_name": "string",
  • "experiment_group": "string",
  • "unit_cell": {
    }
}

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

Wait for acquisition done

Request samples

Content type
application/json
{
  • "images_per_trigger": 1,
  • "ntrigger": 1,
  • "image_time_us": 0,
  • "beam_x_pxl": 0.1,
  • "beam_y_pxl": 0.1,
  • "detector_distance_mm": 0.1,
  • "incident_energy_keV": 0.1,
  • "file_prefix": "",
  • "images_per_file": 1000,
  • "space_group_number": 0,
  • "sample_name": "",
  • "fpga_output": "auto",
  • "compression": "bslz4",
  • "total_flux": 0.1,
  • "transmission": 1,
  • "goniometer": {
    },
  • "header_appendix": null,
  • "image_appendix": null,
  • "energy_multiplier": 1,
  • "data_reduction_factor_serialmx": 1,
  • "run_number": 0,
  • "run_name": "string",
  • "experiment_group": "string",
  • "unit_cell": {
    }
}

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

Wait for acquisition done

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 long period of time, the procedure is provided with a timeout of 5 seconds.

-

Responses

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

Send soft trigger to the detector

Generate soft trigger

Responses