feat(tcp): TCPStreamer DataSources, in-process TCPStreamService, stream multiplexing and TCPStreamJoin

Add TCPStreamer/TCPStreamerClient (TCP transport behind the UDPSServerI/UDPSClientI
seam), an optional single in-process TCPStreamService serving many streams over
worker threads, multiplexed SUBSCRIBE (comma list, stream index in fragmentIdx),
and TCPStreamJoin, which merges several streams into one sample-and-hold stream
paced by a master. StreamHub takes a comma list of streams over one connection.
Includes GTests, E2E scenarios s58-s73 and docs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Martino FerrariandClaude Opus 4.6 committed 2026-11-06 13:41:27 +01:00
1 parent 5562877c99
commit 50d85363a3
79 files changed
+12348 -138

No files matched your search

@@ -39,6 +39,7 @@
#include "SingleThreadService.h"
#include "StreamString.h"
#include "UDPSServer.h"
#include "UDPSTransportI.h"
/*---------------------------------------------------------------------------*/
/* Class declaration */
@@ -333,6 +334,33 @@ public:
*/
uint32 GetDroppedPublications() const;
protected:
/**
* @brief MaxPayloadSize used when the configuration does not specify one.
* @details Transport specific (a datagram budget for UDP, a frame budget for
* TCP), hence overridable. Called from Initialise(), not the constructor.
*/
virtual uint32 DefaultMaxPayloadSize() const;
/**
* @brief Configures the transport from the already-resolved Port and
* MaxPayloadSize plus whatever transport keys @p data carries.
* @details The default implementation configures the UDPSServer (unicast /
* multicast). A subclass that installs another transport with SetServer()
* overrides this to configure it instead.
*/
virtual bool InitialiseTransport(StructuredDataI &data);
/**
* @brief Replaces the transport. Takes ownership; only valid before Start().
*/
void SetServer(UDPSServerI *newServer);
/**
* @brief The transport currently in use (owned by this object).
*/
UDPSServerI *Transport() const;
private:
/**
* @brief Serializes the CONFIG payload into buf and sets payloadSize.
@@ -417,8 +445,8 @@ private:
uint8 *wireBuffer; /**< Pre-allocated buffer for the serialized DATA payload */
uint32 totalWireBytes; /**< Total bytes of all signals after quantization + 8-byte timestamp prefix */
/* Networking — handled by UDPSServer */
UDPSServer server; /**< Multi-client session manager (unicast and multicast) */
/* Networking — handled by a UDPSServerI (UDPSServer by default) */
UDPSServerI *server; /**< Owned transport; see SetServer() */
/* Thread management */
SingleThreadService executor; /**< Background thread service */