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:
1 parent
5562877c99
commit
50d85363a3
79 files changed
+12348
-138
No files matched your search
@@ -160,6 +160,27 @@ public:
|
||||
*/
|
||||
virtual void OnUDPSDisconnected();
|
||||
|
||||
protected:
|
||||
/**
|
||||
* @brief Configures the transport from the already-parsed members and
|
||||
* registers this object as its listener.
|
||||
* @details The default implementation configures the UDPSClient (unicast /
|
||||
* multicast). A subclass that installs another transport with SetClient()
|
||||
* overrides this to configure it instead.
|
||||
*/
|
||||
virtual bool InitialiseTransport(StructuredDataI &data);
|
||||
|
||||
/**
|
||||
* @brief Replaces the transport. Takes ownership; only valid before Start().
|
||||
*/
|
||||
void SetClient(UDPSClientI *newClient);
|
||||
|
||||
/* Configuration parameters shared with transport subclasses */
|
||||
StreamString serverAddress; /**< Server IP address. */
|
||||
uint16 port; /**< Server port. */
|
||||
uint32 cpuMask; /**< Background thread CPU affinity. */
|
||||
uint32 stackSize; /**< Background thread stack size. */
|
||||
|
||||
private:
|
||||
/**
|
||||
* @brief Decodes a single snapshot from a DATA payload into @p dst.
|
||||
@@ -171,13 +192,9 @@ private:
|
||||
void DecodeSnapshot(const uint8 *payload, uint32 size, uint8 *dst);
|
||||
|
||||
/* Configuration parameters */
|
||||
StreamString serverAddress; /**< Server IP address. */
|
||||
uint16 port; /**< Server port. */
|
||||
uint32 maxPayloadSize; /**< Max payload bytes per datagram. */
|
||||
uint32 keepAliveInterval; /**< Seconds between unicast keepalive ACKs (0 disables). */
|
||||
float32 silenceTimeout; /**< Seconds of no data before reconnect (sub-second allowed, 0 disables). */
|
||||
uint32 cpuMask; /**< Background thread CPU affinity. */
|
||||
uint32 stackSize; /**< Background thread stack size. */
|
||||
StreamString multicastGroup; /**< Multicast group IP; empty = unicast. */
|
||||
StreamString multicastInterface; /**< Local IPv4 address for multicast join; empty = INADDR_ANY. */
|
||||
uint16 dataPort; /**< UDP port for DATA datagrams (multicast). */
|
||||
@@ -191,7 +208,7 @@ private:
|
||||
uint8 publishMode; /**< UDPS_PUBLISH_* from CONFIG. */
|
||||
|
||||
/* Shared receiver (same code base as the StreamHub hub) */
|
||||
UDPSClient client; /**< Transport, reassembly and reconnect. */
|
||||
UDPSClientI *client; /**< Owned transport (UDPSClient by default); see SetClient(). */
|
||||
bool receiverUp; /**< True once the receiver thread is started. */
|
||||
|
||||
/* Double-buffering for RT safety */
|
||||
|
||||
Reference in new issue
Block a user