live stream with json+blob

This commit is contained in:
lhdamiani
2021-08-19 12:07:26 +02:00
parent 9ac7690241
commit 9331d066aa
5 changed files with 167 additions and 22 deletions
+31
View File
@@ -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;
}