Expected behavior when where are only localhost subscribers #1123
-
Hi, I am pretty much excited about the upcoming 5.12 release regarding the amazing zero-copy implementation among other efficiency / low-latency improvemtn things. In the similar vein, we have a use case that some heavy data (e.g. raw images) are being passed on a local host, and only processed data (detections, trajectories) are to be transmitted over UDP to another host (through eCAL network mode) However I have a question. What is the current behaviour of eCAL when there is local subscribers but no cross-host subscribers? Would eCAL still send / spam the router over multicast? The expected behaviour would be that if there is no subscriber over the network, UDP and TCP are not being sent, only memfile / inproc memories are being used. This is to save the precious bandwidth in wireless comms. Currently the logic i can see is here ecal/ecal/core/src/pubsub/ecal_publisher.cpp Line 342 in fcf750b |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
I do come accross the |
Beta Was this translation helpful? Give feedback.
-
Hi @chengguizi, ; --------------------------------------------------
; PUBLISHER SETTINGS
; --------------------------------------------------
; use_inproc = 0, 1, 2 Use inner process transport layer (0 = off, 1 = on, 2 = auto, default = 0)
; use_shm = 0, 1, 2 Use shared memory transport layer (0 = off, 1 = on, 2 = auto, default = 2)
; use_tcp = 0, 1, 2 Use tcp transport layer (0 = off, 1 = on, 2 = auto, default = 0)
; use_udp_mc = 0, 1, 2 Use udp multicast transport layer (0 = off, 1 = on, 2 = auto, default = 2)
;
; memfile_minsize = x * 4096 kB Default memory file size for new publisher
;
; memfile_reserve = 50 .. x % Dynamic file size reserve before recreating memory file if topic size changes
;
; memfile_ack_timeout = 0 .. x ms Publisher timeout for ack event from subscriber that memory file content is processed
;
; memfile_buffer_count = 1 .. x Number of parallel used memory file buffers for 1:n publish/subscribe ipc connections (default = 1)
; memfile_zero_copy = 0, 1 Allow matching subscriber to access memory file without copying its content in advance (blocking mode)
;
; share_ttype = 0, 1 Share topic type via registration layer
; share_tdesc = 0, 1 Share topic description via registration layer (switch off to disable reflection)
; --------------------------------------------------
[publisher]
use_inproc = 0
use_shm = 2
use_tcp = 0
use_udp_mc = 2 Here you can configure the publication behavior. There are 3 modes Setting a layer to You can configure this behavior as described globally for a complete host, using the |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Hi @chengguizi,
thank you for asking. So there is a simple logic for using the eCAL transport layers. In the global eCAL configuration file
ecal.ini
there is a publisher settings section like this