diff --git a/broker/JFJochBrokerHttp.cpp b/broker/JFJochBrokerHttp.cpp index 0e350efd..459e630f 100644 --- a/broker/JFJochBrokerHttp.cpp +++ b/broker/JFJochBrokerHttp.cpp @@ -415,6 +415,7 @@ void JFJochBrokerHttp::statistics_get(const std::optional &compression, Pi statistics.setBuffer(Convert(state_machine.GetImageBufferStatus())); statistics.setIndexing(Convert(state_machine.GetIndexingSettings())); statistics.setDarkMask(Convert(state_machine.GetDarkMaskSettings())); + statistics.setImagePusher(Convert(state_machine.GetImagePusherStatus())); auto zeromq_prev = state_machine.GetPreviewSocketSettings(); if (!zeromq_prev.address.empty()) @@ -620,3 +621,7 @@ void JFJochBrokerHttp::config_dark_mask_put(const org::openapitools::server::mod void JFJochBrokerHttp::config_dark_mask_get(Pistache::Http::ResponseWriter &response) { ProcessOutput(Convert(state_machine.GetDarkMaskSettings()), response); } + +void JFJochBrokerHttp::image_pusher_status_get(Pistache::Http::ResponseWriter &response) { + ProcessOutput(Convert(state_machine.GetImagePusherStatus()), response); +} diff --git a/broker/JFJochBrokerHttp.h b/broker/JFJochBrokerHttp.h index db26adf5..d68b7e96 100644 --- a/broker/JFJochBrokerHttp.h +++ b/broker/JFJochBrokerHttp.h @@ -183,6 +183,8 @@ class JFJochBrokerHttp : public org::openapitools::server::api::DefaultApi { void config_dark_mask_get(Pistache::Http::ResponseWriter &response) override; void config_dark_mask_put(const org::openapitools::server::model::Dark_mask_settings &darkMaskSettings, Pistache::Http::ResponseWriter &response) override; + void image_pusher_status_get(Pistache::Http::ResponseWriter &response) override; + public: JFJochBrokerHttp(const DiffractionExperiment& experiment, const SpotFindingSettings &spot_finding_settings, diff --git a/broker/JFJochServices.cpp b/broker/JFJochServices.cpp index 78c884a4..6f50e097 100644 --- a/broker/JFJochServices.cpp +++ b/broker/JFJochServices.cpp @@ -280,9 +280,3 @@ ImagePusherStatus JFJochServices::GetImagePusherStatus() const { .connected_writers = 0 }; } - -uint64_t JFJochServices::GetConnectedWriters() const { - if (receiver) - return receiver->GetConnectedWriters(); - return 0; -} diff --git a/broker/OpenAPIConvert.cpp b/broker/OpenAPIConvert.cpp index 1af83240..7b8643d0 100644 --- a/broker/OpenAPIConvert.cpp +++ b/broker/OpenAPIConvert.cpp @@ -242,7 +242,6 @@ org::openapitools::server::model::Broker_status Convert(const BrokerStatus& inpu ret.setGpuCount(input.gpu_count); ret.setBrokerVersion(input.broker_version); - ret.setConnectedWriters(input.connected_writers); return ret; } diff --git a/broker/gen/model/Jfjoch_statistics.cpp b/broker/gen/model/Jfjoch_statistics.cpp index 0255df6e..4d5b6af3 100644 --- a/broker/gen/model/Jfjoch_statistics.cpp +++ b/broker/gen/model/Jfjoch_statistics.cpp @@ -40,6 +40,7 @@ Jfjoch_statistics::Jfjoch_statistics() m_Az_intIsSet = false; m_BufferIsSet = false; m_IndexingIsSet = false; + m_Image_pusherIsSet = false; } @@ -104,7 +105,7 @@ bool Jfjoch_statistics::validate(std::stringstream& msg, const std::string& path } } - + return success; } @@ -168,7 +169,10 @@ bool Jfjoch_statistics::operator==(const Jfjoch_statistics& rhs) const ((!bufferIsSet() && !rhs.bufferIsSet()) || (bufferIsSet() && rhs.bufferIsSet() && getBuffer() == rhs.getBuffer())) && - ((!indexingIsSet() && !rhs.indexingIsSet()) || (indexingIsSet() && rhs.indexingIsSet() && getIndexing() == rhs.getIndexing())) + ((!indexingIsSet() && !rhs.indexingIsSet()) || (indexingIsSet() && rhs.indexingIsSet() && getIndexing() == rhs.getIndexing())) && + + + ((!imagePusherIsSet() && !rhs.imagePusherIsSet()) || (imagePusherIsSet() && rhs.imagePusherIsSet() && getImagePusher() == rhs.getImagePusher())) ; } @@ -219,6 +223,8 @@ void to_json(nlohmann::json& j, const Jfjoch_statistics& o) j["buffer"] = o.m_Buffer; if(o.indexingIsSet()) j["indexing"] = o.m_Indexing; + if(o.imagePusherIsSet()) + j["image_pusher"] = o.m_Image_pusher; } @@ -319,6 +325,11 @@ void from_json(const nlohmann::json& j, Jfjoch_statistics& o) j.at("indexing").get_to(o.m_Indexing); o.m_IndexingIsSet = true; } + if(j.find("image_pusher") != j.end()) + { + j.at("image_pusher").get_to(o.m_Image_pusher); + o.m_Image_pusherIsSet = true; + } } @@ -645,6 +656,23 @@ void Jfjoch_statistics::unsetIndexing() { m_IndexingIsSet = false; } +org::openapitools::server::model::Image_pusher_status Jfjoch_statistics::getImagePusher() const +{ + return m_Image_pusher; +} +void Jfjoch_statistics::setImagePusher(org::openapitools::server::model::Image_pusher_status const& value) +{ + m_Image_pusher = value; + m_Image_pusherIsSet = true; +} +bool Jfjoch_statistics::imagePusherIsSet() const +{ + return m_Image_pusherIsSet; +} +void Jfjoch_statistics::unsetImage_pusher() +{ + m_Image_pusherIsSet = false; +} } // namespace org::openapitools::server::model diff --git a/broker/gen/model/Jfjoch_statistics.h b/broker/gen/model/Jfjoch_statistics.h index 271d35eb..3bedb1ab 100644 --- a/broker/gen/model/Jfjoch_statistics.h +++ b/broker/gen/model/Jfjoch_statistics.h @@ -35,6 +35,7 @@ #include #include "Indexing_settings.h" #include "Detector_status.h" +#include "Image_pusher_status.h" #include "Roi_definitions.h" #include "Fpga_status_inner.h" #include "Image_buffer_status.h" @@ -210,6 +211,13 @@ public: void setIndexing(org::openapitools::server::model::Indexing_settings const& value); bool indexingIsSet() const; void unsetIndexing(); + /// + /// + /// + org::openapitools::server::model::Image_pusher_status getImagePusher() const; + void setImagePusher(org::openapitools::server::model::Image_pusher_status const& value); + bool imagePusherIsSet() const; + void unsetImage_pusher(); friend void to_json(nlohmann::json& j, const Jfjoch_statistics& o); friend void from_json(const nlohmann::json& j, Jfjoch_statistics& o); @@ -252,6 +260,8 @@ protected: bool m_BufferIsSet; org::openapitools::server::model::Indexing_settings m_Indexing; bool m_IndexingIsSet; + org::openapitools::server::model::Image_pusher_status m_Image_pusher; + bool m_Image_pusherIsSet; }; diff --git a/broker/jfjoch_api.yaml b/broker/jfjoch_api.yaml index 930984c0..c8e2149f 100644 --- a/broker/jfjoch_api.yaml +++ b/broker/jfjoch_api.yaml @@ -1613,6 +1613,8 @@ components: $ref: '#/components/schemas/image_buffer_status' indexing: $ref: '#/components/schemas/indexing_settings' + image_pusher: + $ref: '#/components/schemas/image_pusher_status' error_message: type: object required: @@ -2980,7 +2982,6 @@ paths: format: int64 "404": description: "Not in XFEL mode or no acquisition recorded" - /image_pusher/status: get: summary: Get status of image pusher diff --git a/broker/redoc-static.html b/broker/redoc-static.html index f8a539c2..239ba0b4 100644 --- a/broker/redoc-static.html +++ b/broker/redoc-static.html @@ -793,7 +793,7 @@ This can only be done when detector is Idle, Error or
http://localhost:5232/config/roi

Request samples

Content type
application/json
{
  • "box": {
    },
  • "circle": {
    },
  • "azim": {
    }
}

Response samples

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

Get general statistics

query Parameters
compression
boolean
Default: false

Enable DEFLATE compression of output data.

Responses

Response samples

Content type
application/json
{
  • "detector": {
    },
  • "detector_list": {
    },
  • "detector_settings": {
    },
  • "image_format_settings": {
    },
  • "instrument_metadata": {
    },
  • "file_writer_settings": {
    },
  • "data_processing_settings": {
    },
  • "measurement": {
    },
  • "broker": {
    },
  • "fpga": [
    ],
  • "calibration": [
    ],
  • "zeromq_preview": {
    },
  • "zeromq_metadata": {
    },
  • "dark_mask": {
    },
  • "pixel_mask": {
    },
  • "roi": {
    },
  • "az_int": {
    },
  • "buffer": {
    },
  • "indexing": {
    }
}

Get data collection statistics

Results of the last data collection

+
http://localhost:5232/statistics

Response samples

Content type
application/json
{
  • "detector": {
    },
  • "detector_list": {
    },
  • "detector_settings": {
    },
  • "image_format_settings": {
    },
  • "instrument_metadata": {
    },
  • "file_writer_settings": {
    },
  • "data_processing_settings": {
    },
  • "measurement": {
    },
  • "broker": {
    },
  • "fpga": [
    ],
  • "calibration": [
    ],
  • "zeromq_preview": {
    },
  • "zeromq_metadata": {
    },
  • "dark_mask": {
    },
  • "pixel_mask": {
    },
  • "roi": {
    },
  • "az_int": {
    },
  • "buffer": {
    },
  • "indexing": {
    },
  • "image_pusher": {
    }
}

Get data collection statistics

Results of the last data collection

Responses