diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/STATS.md | 7 | ||||
-rw-r--r-- | doc/TIMESTAMPS.rst | 2 | ||||
-rw-r--r-- | doc/advanced.mux | 38 | ||||
-rw-r--r-- | doc/example.mux | 8 | ||||
-rwxr-xr-x | doc/show_dabmux_stats.py | 22 |
5 files changed, 65 insertions, 12 deletions
diff --git a/doc/STATS.md b/doc/STATS.md index 385d41e..435a92e 100644 --- a/doc/STATS.md +++ b/doc/STATS.md @@ -4,12 +4,13 @@ Stats available through Management Server Interface --------- -The management server makes statistics about the inputs available through a ZMQ request/reply socket. +The management server makes statistics about the inputs and EDI/TCP outputs +available through a ZMQ request/reply socket. The `show_dabmux_stats.py` illustrates how to access this information. -Meaning of values ------------------ +Meaning of values for inputs +---------------------------- `max` and `min` indicate input buffer fullness in bytes. diff --git a/doc/TIMESTAMPS.rst b/doc/TIMESTAMPS.rst index 7f48b58..f3d5031 100644 --- a/doc/TIMESTAMPS.rst +++ b/doc/TIMESTAMPS.rst @@ -28,3 +28,5 @@ Running ODR-DabMux against the absolute timestamp firmware has uncovered a few i **Important** Do not combine odr-zmq2edi with odr-dabmux of a different version! +Do not combine digris-zmq-converter with odr-dabmux older than v4! + diff --git a/doc/advanced.mux b/doc/advanced.mux index 95e6902..0fc1b53 100644 --- a/doc/advanced.mux +++ b/doc/advanced.mux @@ -32,9 +32,12 @@ general { tist false ; On startup, the timestamp is initialised to system time. If you want - ; to add an offset, uncomment the following line and give a number - ; in seconds. - ; tist_offset 0 + ; to add an offset, uncomment the following line and give a positive + ; number in seconds. Granularity: 24ms + ; tist_offset 0.480 + + ; Specify the TIST value for the frame with FCT==0, in microseconds + ; tist_at_fct0 768000 ; The management server is a simple TCP server that can present ; statistics data (buffers, overruns, underruns, etc) @@ -201,6 +204,22 @@ subchannels { inputproto sti inputuri "rtp://127.0.0.1:32010" } + sub-udp { + type dabplus + bitrate 96 + id 1 + protection 3 + inputproto edi + + ; Receive EDI/UDP unicast on port 32010 + inputuri "udp://:32010" + + ; Receive EDI/UDP multicast stream on group 239.10.11.12 port 32010 + ;inputuri "udp://@239.10.11.12:32010" + + ; Same, but specify local interface address 192.168.0.1, to select which local interface to use + ;inputuri "udp://192.168.0.10@239.10.11.12:32010" + } sub-ri { type dabplus bitrate 96 @@ -419,6 +438,10 @@ outputs { destination "192.168.23.23" port 12000 + enable_pft true + fec 1 + verbose true + ; For compatibility: if port is not specified in the destination itself, ; it is taken from the parent 'destinations' block. } @@ -433,6 +456,8 @@ outputs { ; The multicast TTL has to be adapted according to your network ttl 1 + enable_pft true + fec 1 } example_tcp { ; example for EDI TCP server. TCP is reliable, so it is counterproductive to @@ -450,7 +475,8 @@ outputs { } } - ; The settings below apply to all destinations + ; The settings below apply to all destinations, unless they are overridden + ; inside a destination ; Enable the PFT subsystem. If false, AFPackets are sent. ; PFT is not necessary when using TCP. @@ -514,8 +540,8 @@ outputs { ;allowmetadata true ;} - ; Legacy format for ZeroMQ output example. See example.mux - ; for newer format. + ; Legacy format for ZeroMQ output example, equivalent to `allowmetadata false`. + ; See above for newer format. ;zmq "zmq+tcp://*:9100" ; Output ETI-over-TCP. This is like piping a RAW ETI NI data stream diff --git a/doc/example.mux b/doc/example.mux index 383a2ab..34cd2ee 100644 --- a/doc/example.mux +++ b/doc/example.mux @@ -57,9 +57,9 @@ general { tist false ; On startup, the timestamp is initialised to system time. If you want - ; to add an offset, uncomment the following line and give a number - ; in seconds. - ; tist_offset 0 + ; to add an offset, uncomment the following line and give a positive + ; number in seconds. Granularity: 24ms + ; tist_offset 0.480 ; The URLs used to fetch the TAI bulletin can be overridden if needed. ; URLs are given as a pipe-separated list, and the default value is: @@ -215,6 +215,8 @@ subchannels { ;inputuri "udp://:9001" ; Multicast UDP input: ;inputuri "udp://@239.10.0.1:9001" + ; Multicast UDP input with local interface (192.168.0.10) specification + ;inputuri "udp://192.168.0.10@239.10.0.1:9001" ; Two buffer-management types are available: prebuffering and timestamped. ; prebuffering will accumulate a few frames before it starts streaming, and each diff --git a/doc/show_dabmux_stats.py b/doc/show_dabmux_stats.py index 7ea60f7..3b6d869 100755 --- a/doc/show_dabmux_stats.py +++ b/doc/show_dabmux_stats.py @@ -46,6 +46,7 @@ if len(sys.argv) == 1: data = sock.recv().decode("utf-8") values = json.loads(data)['values'] + print("## INPUT STATS") tmpl = "{ident:20}{maxfill:>8}{minfill:>8}{under:>8}{over:>8}{audioleft:>8}{audioright:>8}{peakleft:>8}{peakright:>8}{state:>16}{version:>48}{uptime:>8}{offset:>8}" print(tmpl.format( ident="id", @@ -89,6 +90,27 @@ if len(sys.argv) == 1: uptime=v['uptime'], offset=v['last_tist_offset'])) + sock.send(b"output_values") + + poller = zmq.Poller() + poller.register(sock, zmq.POLLIN) + + socks = dict(poller.poll(1000)) + if socks: + if socks.get(sock) == zmq.POLLIN: + print() + print("## OUTPUT STATS") + data = sock.recv().decode("utf-8") + values = json.loads(data)['output_values'] + for identifier in values: + if identifier.startswith("edi_tcp_"): + listen_port = identifier.rsplit("_", 1)[-1] + num_connections = values[identifier]["num_connections"] + print(f"EDI TCP on port {listen_port}: {num_connections} connections") + else: + print(f"Unknown output type: {identifier}") + + elif len(sys.argv) == 2 and sys.argv[1] == "config": sock = connect() |