mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-05-11 17:25:35 +02:00
Rename source_id to module_id
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
#include "buffer_config.hpp"
|
||||
|
||||
class FrameUdpReceiver {
|
||||
const int source_id_;
|
||||
const int module_id_;
|
||||
|
||||
PacketUdpReceiver udp_receiver_;
|
||||
|
||||
@@ -27,7 +27,7 @@ class FrameUdpReceiver {
|
||||
const int n_packets, ModuleFrame& metadata, char* frame_buffer);
|
||||
|
||||
public:
|
||||
FrameUdpReceiver(const uint16_t port, const int source_id);
|
||||
FrameUdpReceiver(const uint16_t port, const int module_id);
|
||||
virtual ~FrameUdpReceiver();
|
||||
uint64_t get_frame_from_udp(ModuleFrame& metadata, char* frame_buffer);
|
||||
};
|
||||
|
||||
@@ -7,8 +7,8 @@ using namespace buffer_config;
|
||||
|
||||
FrameUdpReceiver::FrameUdpReceiver(
|
||||
const uint16_t port,
|
||||
const int source_id) :
|
||||
source_id_(source_id)
|
||||
const int module_id) :
|
||||
module_id_(module_id)
|
||||
{
|
||||
udp_receiver_.bind(port);
|
||||
|
||||
@@ -33,7 +33,7 @@ inline void FrameUdpReceiver::init_frame(
|
||||
frame_metadata.pulse_id = packet_buffer_[i_packet].bunchid;
|
||||
frame_metadata.frame_index = packet_buffer_[i_packet].framenum;
|
||||
frame_metadata.daq_rec = (uint64_t) packet_buffer_[i_packet].debug;
|
||||
frame_metadata.module_id = (int64_t) source_id_;
|
||||
frame_metadata.module_id = (int64_t) module_id_;
|
||||
}
|
||||
|
||||
inline void FrameUdpReceiver::copy_packet_to_buffers(
|
||||
|
||||
@@ -31,15 +31,16 @@ int main (int argc, char *argv[]) {
|
||||
|
||||
exit(-1);
|
||||
}
|
||||
/usr/bin/sf_buffer ${DETECTOR} ${N_MODULES} M${M} ${port} /gpfs/photonics/swissfel/buffer/${DETECTOR} ${M}
|
||||
|
||||
string detector_name = string(argv[1]);
|
||||
int n_modules = atoi(argv[2]);
|
||||
string device_name = string(argv[3]);
|
||||
int udp_port = atoi(argv[4]);
|
||||
string root_folder = string(argv[5]);
|
||||
int source_id = atoi(argv[6]);
|
||||
int module_id = atoi(argv[6]);
|
||||
|
||||
FrameUdpReceiver receiver(udp_port, source_id);
|
||||
FrameUdpReceiver receiver(udp_port, module_id);
|
||||
RamBuffer buffer(detector_name, n_modules);
|
||||
|
||||
auto ctx = zmq_ctx_new();
|
||||
|
||||
Reference in New Issue
Block a user