mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-05-03 22:34:14 +02:00
live stream with json+blob
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
#ifndef SF_DAQ_BUFFER_ZMQLIVESENDER_HPP
|
||||
#define SF_DAQ_BUFFER_ZMQLIVESENDER_HPP
|
||||
|
||||
#include <string>
|
||||
#include "formats.hpp"
|
||||
#include "BufferUtils.hpp"
|
||||
|
||||
|
||||
class ZmqLiveSender {
|
||||
void* ctx_;
|
||||
const std::string& det_name_;
|
||||
const std::string& stream_address_;
|
||||
|
||||
void* socket_streamvis_;
|
||||
|
||||
private:
|
||||
std::string _get_data_type_mapping(int dtype) const;
|
||||
|
||||
public:
|
||||
ZmqLiveSender(void* ctx,
|
||||
const std::string& det_name,
|
||||
const std::string& stream_address);
|
||||
~ZmqLiveSender();
|
||||
|
||||
void send(const ImageMetadata& meta, const char* data,
|
||||
const size_t image_n_bytes);
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif //SF_DAQ_BUFFER_ZMQLIVESENDER_HPP
|
||||
@@ -11,4 +11,7 @@ namespace stream_config
|
||||
|
||||
// Number of pulses between each statistics print out.
|
||||
const size_t STREAM_STATS_MODULO = 1000;
|
||||
|
||||
// reduction factor
|
||||
const int REDUCTION_FACTOR = 5;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user