udpsclient: a TCP transport mode (SUBSCRIBE, no CONNECT) and a TCP mock server
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
21b1945769
commit
7b8c932ab7
3 files changed
+194
-4
No files matched your search
Vendored
+16
-1
@@ -52,7 +52,8 @@ enum {
|
||||
UDPS_PKT_CONFIG = 1, /**< Server -> client: signal metadata. */
|
||||
UDPS_PKT_ACK = 2, /**< Client -> server: keepalive. */
|
||||
UDPS_PKT_CONNECT = 3, /**< Client -> server: open a session. */
|
||||
UDPS_PKT_DISCONNECT = 4 /**< Either direction: close a session. */
|
||||
UDPS_PKT_DISCONNECT = 4, /**< Either direction: close a session. */
|
||||
UDPS_PKT_SUBSCRIBE = 5 /**< Client -> server (TCP stream service): payload = stream name. */
|
||||
};
|
||||
|
||||
/** Sample type codes (udps_signal_t::type_code). */
|
||||
@@ -279,6 +280,20 @@ typedef struct {
|
||||
* the drop-on-late behaviour. Default 0.020.
|
||||
*/
|
||||
double reorder_window_s;
|
||||
/**
|
||||
* Non-zero selects the TCP transport (a MARTe2 TCPStreamer / TCPStreamService):
|
||||
* @c server_port is the TCP port, no CONNECT or DISCONNECT frame is sent, the
|
||||
* server streams CONFIG then DATA on connect, and the reorder window is forced
|
||||
* to 0 (TCP is ordered, so a counter gap is a server-side drop). @c multicast_group,
|
||||
* @c interface_addr and @c data_port are ignored.
|
||||
*/
|
||||
int use_tcp;
|
||||
/**
|
||||
* TCP mode only: when non-empty (1..255 bytes) a SUBSCRIBE frame naming this stream is
|
||||
* sent right after every connect, as a TCPStreamService requires. A plain
|
||||
* TCPStreamer ignores it. NULL or "" sends nothing.
|
||||
*/
|
||||
const char *stream_name;
|
||||
} udps_client_config_t;
|
||||
|
||||
/** Fills @p cfg with the defaults documented in Docs/UDPS-C-Client.md. */
|
||||
|
||||
Reference in new issue
Block a user