From fbdc0423da4e207c2a2df740617a2e3e8246f9b3 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Sun, 1 Mar 2026 19:45:16 +0100 Subject: [PATCH] Implement raw TCP/IP in jfjoch_broker and jfjoch_writer --- broker/JFJochBrokerParser.cpp | 2 +- image_puller/{TcpImagePuller.cpp => TCPImagePuller.cpp} | 2 +- image_puller/{TcpImagePuller.h => TCPImagePuller.h} | 0 image_pusher/{TcpStreamPusher.cpp => TCPStreamPusher.cpp} | 8 ++++---- image_pusher/{TcpStreamPusher.h => TCPStreamPusher.h} | 2 +- ...cpStreamPusherSocket.cpp => TCPStreamPusherSocket.cpp} | 2 +- .../{TcpStreamPusherSocket.h => TCPStreamPusherSocket.h} | 0 tests/{TcpTest.cpp => TCPImagePusherTest.cpp} | 4 ++-- writer/jfjoch_writer.cpp | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) rename image_puller/{TcpImagePuller.cpp => TCPImagePuller.cpp} (99%) rename image_puller/{TcpImagePuller.h => TCPImagePuller.h} (100%) rename image_pusher/{TcpStreamPusher.cpp => TCPStreamPusher.cpp} (95%) rename image_pusher/{TcpStreamPusher.h => TCPStreamPusher.h} (97%) rename image_pusher/{TcpStreamPusherSocket.cpp => TCPStreamPusherSocket.cpp} (99%) rename image_pusher/{TcpStreamPusherSocket.h => TCPStreamPusherSocket.h} (100%) rename tests/{TcpTest.cpp => TCPImagePusherTest.cpp} (97%) diff --git a/broker/JFJochBrokerParser.cpp b/broker/JFJochBrokerParser.cpp index 6e49bf91..a0d7c966 100644 --- a/broker/JFJochBrokerParser.cpp +++ b/broker/JFJochBrokerParser.cpp @@ -9,7 +9,7 @@ #include "OpenAPIConvert.h" #include "Detector_type.h" #include "../image_pusher/NonePusher.h" -#include "../image_pusher/TcpStreamPusher.h" +#include "../image_pusher/TCPStreamPusher.h" DetectorGeometryModular ParseStandardDetectorGeometry(const org::openapitools::server::model::Detector &j) { auto s = j.getStandardGeometry(); diff --git a/image_puller/TcpImagePuller.cpp b/image_puller/TCPImagePuller.cpp similarity index 99% rename from image_puller/TcpImagePuller.cpp rename to image_puller/TCPImagePuller.cpp index cfa216cb..5c9fb0a8 100644 --- a/image_puller/TcpImagePuller.cpp +++ b/image_puller/TCPImagePuller.cpp @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute // SPDX-License-Identifier: GPL-3.0-only -#include "TcpImagePuller.h" +#include "TCPImagePuller.h" #include #include diff --git a/image_puller/TcpImagePuller.h b/image_puller/TCPImagePuller.h similarity index 100% rename from image_puller/TcpImagePuller.h rename to image_puller/TCPImagePuller.h diff --git a/image_pusher/TcpStreamPusher.cpp b/image_pusher/TCPStreamPusher.cpp similarity index 95% rename from image_pusher/TcpStreamPusher.cpp rename to image_pusher/TCPStreamPusher.cpp index 0a8bff64..7d8fb88d 100644 --- a/image_pusher/TcpStreamPusher.cpp +++ b/image_pusher/TCPStreamPusher.cpp @@ -1,13 +1,13 @@ // SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute // SPDX-License-Identifier: GPL-3.0-only -#include "TcpStreamPusher.h" +#include "TCPStreamPusher.h" TCPStreamPusher::TCPStreamPusher(const std::vector &addr, - std::optional send_buffer_size, - std::optional zerocopy_threshold, - size_t send_queue_size) + std::optional send_buffer_size, + std::optional zerocopy_threshold, + size_t send_queue_size) : serialization_buffer(256 * 1024 * 1024), serializer(serialization_buffer.data(), serialization_buffer.size()) { if (addr.empty()) diff --git a/image_pusher/TcpStreamPusher.h b/image_pusher/TCPStreamPusher.h similarity index 97% rename from image_pusher/TcpStreamPusher.h rename to image_pusher/TCPStreamPusher.h index c17f59be..170490f5 100644 --- a/image_pusher/TcpStreamPusher.h +++ b/image_pusher/TCPStreamPusher.h @@ -3,7 +3,7 @@ #pragma once -#include "TcpStreamPusherSocket.h" +#include "TCPStreamPusherSocket.h" #include "ZMQWriterNotificationPuller.h" class TCPStreamPusher : public ImagePusher { diff --git a/image_pusher/TcpStreamPusherSocket.cpp b/image_pusher/TCPStreamPusherSocket.cpp similarity index 99% rename from image_pusher/TcpStreamPusherSocket.cpp rename to image_pusher/TCPStreamPusherSocket.cpp index 54e80e6a..6094827c 100644 --- a/image_pusher/TcpStreamPusherSocket.cpp +++ b/image_pusher/TCPStreamPusherSocket.cpp @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute // SPDX-License-Identifier: GPL-3.0-only -#include "TcpStreamPusherSocket.h" +#include "TCPStreamPusherSocket.h" #include #include diff --git a/image_pusher/TcpStreamPusherSocket.h b/image_pusher/TCPStreamPusherSocket.h similarity index 100% rename from image_pusher/TcpStreamPusherSocket.h rename to image_pusher/TCPStreamPusherSocket.h diff --git a/tests/TcpTest.cpp b/tests/TCPImagePusherTest.cpp similarity index 97% rename from tests/TcpTest.cpp rename to tests/TCPImagePusherTest.cpp index 90fedefe..f4608d1f 100644 --- a/tests/TcpTest.cpp +++ b/tests/TCPImagePusherTest.cpp @@ -4,8 +4,8 @@ #include #include -#include "../image_pusher/TcpStreamPusher.h" -#include "../image_puller/TcpImagePuller.h" +#include "../image_pusher/TCPStreamPusher.h" +#include "../image_puller/TCPImagePuller.h" TEST_CASE("TCPImageCommTest_2Writers", "[TCP]") { const size_t nframes = 128; diff --git a/writer/jfjoch_writer.cpp b/writer/jfjoch_writer.cpp index 39ca8cd9..9067ba29 100644 --- a/writer/jfjoch_writer.cpp +++ b/writer/jfjoch_writer.cpp @@ -8,7 +8,7 @@ #include "StreamWriter.h" #include "../common/print_license.h" #include "../image_puller/ZMQImagePuller.h" -#include "../image_puller/TcpImagePuller.h" +#include "../image_puller/TCPImagePuller.h" static Logger logger("jfjoch_writer");