diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/TIMESTAMPS.rst | 1 | ||||
-rw-r--r-- | doc/example.mux | 19 | ||||
-rwxr-xr-x | doc/zmq_remote.py | 22 |
3 files changed, 26 insertions, 16 deletions
diff --git a/doc/TIMESTAMPS.rst b/doc/TIMESTAMPS.rst index d9c3563..7f48b58 100644 --- a/doc/TIMESTAMPS.rst +++ b/doc/TIMESTAMPS.rst @@ -13,7 +13,6 @@ The following table tries to summarise the differences. | Later than v2.3.1 | t_frame = t_tx = t_mux + tist_offset | negative, meaning delay before t_tx | Something larger than mod processing time | +-----------------------------+----------------------------------------------+-------------------------------------+-----------------------------------------------+ -For historical reasons, ODR-DabMod decodes absolute timestamp from MNSC, not from “EDI seconds”. The edilib tool decodes both EDI timestamp and MNSC, and can be used to verify both are identical. Issues in ODR-DabMux v2.3.1 diff --git a/doc/example.mux b/doc/example.mux index 9a5686b..383a2ab 100644 --- a/doc/example.mux +++ b/doc/example.mux @@ -36,18 +36,21 @@ general { ; This also enables time encoding using the MNSC. ; ; When TIST is enabled, and either EDI or a ZMQ output with metadata is used, - ; ODR-DabMux will download leap-second information from the IETF website, - ; and cache it locally in /var/tmp. It will refresh the data by itself - ; before it expires. + ; ODR-DabMux will download the leap-second information bulletin, + ; and cache it locally in /var/tmp. + ; It will refresh the bulletin by itself before it expires. If that fails, + ; ODR-DabMux will continue running with the current TAI-UTC clock offset. ; ; If it cannot load this information, ODR-DabMux cannot start up! ; ; If your system doesn't have access to internet, you have to take care ; to create the file before ODR-DabMux startup. Get it from - ; http://www.ietf.org/timezones/data/leap-seconds.list + ; https://raw.githubusercontent.com/eggert/tz/master/leap-seconds.list ; and save it to ; /var/tmp/odr-dabmux-leap-seconds.cache - ; Refresh the file before expiry otherwise ODR-DabMux will abort! + ; + ; ODR-DabMux will start up even with an expired bulletin in cache, but will + ; output a warning. ; ; Use the RC interface 'get clocktai expiry' command to check how long ; your file is still valid. @@ -60,7 +63,11 @@ general { ; 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: - ;tai_clock_bulletins "https://www.ietf.org/timezones/data/leap-seconds.list|https://raw.githubusercontent.com/eggert/tz/master/leap-seconds.list" + ;tai_clock_bulletins "https://raw.githubusercontent.com/eggert/tz/master/leap-seconds.list" + ; + ; Through RC, use `set clocktai url <LIST_OF_URLS>` to change the URLs used to download the bulletin + ; during runtime. + ; You may also override the bulletin using `set clocktai tai_utc_offset 37` to set a TAI-UTC offset manually. ; ; You may also use a file:// URL if you take care of updating the file ; yourself and store it locally. diff --git a/doc/zmq_remote.py b/doc/zmq_remote.py index 56465d3..7581575 100755 --- a/doc/zmq_remote.py +++ b/doc/zmq_remote.py @@ -16,7 +16,7 @@ poller = zmq.Poller() poller.register(sock, zmq.POLLIN) if len(sys.argv) < 2: - print("Usage: program url cmd [args...]") + print("Usage: program url cmd [args...]", file=sys.stderr) sys.exit(1) sock.connect(sys.argv[1]) @@ -25,7 +25,7 @@ message_parts = sys.argv[2:] # first do a ping test -print("ping") +print("ping", file=sys.stderr) sock.send(b"ping") socks = dict(poller.poll(1000)) @@ -33,9 +33,9 @@ if socks: if socks.get(sock) == zmq.POLLIN: data = sock.recv_multipart() - print("Received: {}".format(len(data))) + print("Received: {}".format(len(data)), file=sys.stderr) for i,part in enumerate(data): - print(" {}".format(part)) + print(" {}".format(part), file=sys.stderr) for i, part in enumerate(message_parts): if i == len(message_parts) - 1: @@ -43,18 +43,22 @@ if socks: else: f = zmq.SNDMORE - print("Send {}({}): '{}'".format(i, f, part)) + print("Send {}({}): '{}'".format(i, f, part), file=sys.stderr) sock.send(part.encode(), flags=f) data = sock.recv_multipart() - print("Received: {}".format(len(data))) - for i,part in enumerate(data): - print(" RX {}: {}".format(i, part.decode().replace('\n',' '))) + print("Received: {}".format(len(data)), file=sys.stderr) + for i, part in enumerate(data): + if message_parts[0] == 'showjson': + # This allows you to pipe the JSON into another tool + print(part.decode()) + else: + print(" RX {}: {}".format(i, part.decode().replace('\n',' ')), file=sys.stderr) else: - print("ZMQ error: timeout") + print("ZMQ error: timeout", file=sys.stderr) context.destroy(linger=5) # This is free and unencumbered software released into the public domain. |