diff --git a/firmware/baseband/stream_input.hpp b/firmware/baseband/stream_input.hpp index 8a810749..cb4bbe4e 100644 --- a/firmware/baseband/stream_input.hpp +++ b/firmware/baseband/stream_input.hpp @@ -52,6 +52,8 @@ public: if( (bytes_written & event_bytes_mask) < (last_bytes_written & event_bytes_mask) ) { creg::m4txevent::assert(); } + config->baseband_bytes_received += length; + config->baseband_bytes_dropped = config->baseband_bytes_received - bytes_written; return written; } diff --git a/firmware/common/message.hpp b/firmware/common/message.hpp index 1c906c61..bd53d352 100644 --- a/firmware/common/message.hpp +++ b/firmware/common/message.hpp @@ -413,6 +413,8 @@ public: struct CaptureConfig { const size_t write_size_log2; const size_t buffer_count_log2; + uint64_t baseband_bytes_received; + uint64_t baseband_bytes_dropped; FIFO* fifo; constexpr CaptureConfig( @@ -420,6 +422,8 @@ struct CaptureConfig { const size_t buffer_count_log2 ) : write_size_log2 { write_size_log2 }, buffer_count_log2 { buffer_count_log2 }, + baseband_bytes_received { 0 }, + baseband_bytes_dropped { 0 }, fifo { nullptr } { }