The new system supports:
- time-tagging of log messages
- message priority levels with a threshold below which they are not printed
- colored output of the message priority for easy identification
- compile-time disabling of all logging per C module
So far, it is integrated in the main and rx modules which generate most
messages. Other modules will be migrated in the future.
Our JSON messages can get rather large which can cause a buffer overrun
when the reading program is not scheduled at the same time. When the
kernel returns EAGAIN we abort writing the current JSON message.
However, the unfinished (and thus invalid) JSON message is still in the
pipe and will be processed by the reading program.
Increase the pipe buffer from the default 65536 to reduce the likelihood
of this happening. It's difficult to completely prevent the issue as we
don't want to slow down the main program due to slow logging.
- implicit declaration of built-in function 'strncpy'
- control reaches end of non-void function
- assignment to 'void (*)(int, siginfo_t *, void *)' from incompatible pointer type 'void (*)(int)'
sdr_rf_to_baseband() processes samples in blocks of size SDR_OVERSAMPLING. If
the total number of samples does not align with this block size, the leftover
samples are lost and phase and timing glitches result.
To mitigate this, sdr_receive() now has an additional parameter that specifies
the alignment of the returned data. The number of samples returned is always a
multiple of this alignment factor. This feature is used to ensure that the
number of returned samples is a multiple of SDR_OVERSAMPLING and therefore no
samples are lost in sdr_rf_to_baseband().
sdr_rf_to_baseband() now has an additional check that makes the function fail
if the alignment is incorrect.
- passing argument 2 of 'crc_generate_key' discards ‘const’ qualifier;
a bit ugly but signature of crc_generate_key() is wrong
- variable 'linearized_history' set but not used
- typedef is unused
- superfluous arguments to DEBUG_LOG() and fprintf()
- implicit declaration of function 'memset'
- unused arguments
- (only) time-based end-of-transmission tracking
- removed tx_done flag
- count zero-buffers correctly in time-tracking
- add 10 ms of headroom so the transmission does not stop before buffer was
completely transmitted (race condition)
- fix race condition with tx_start_time in sdr_start_tx()
- simplified packet queuing (no chunking)
- read multiple packets before starting transmission (to fill buffers initially)
Thanks to rudi_s!
If passed on, these cause a segmentation fault in the channel decoder. As
zero-length packets currently make no real sense in this protocol, they are
ignored now.