From fffda82f1ee3c48175274e2ff67fcecc244ef06c Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Fri, 23 Mar 2018 16:41:37 +0100 Subject: [PATCH] increase size of bytebuffer to compensate header, add helper to get remaining size --- lib/include/srslte/common/common.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/include/srslte/common/common.h b/lib/include/srslte/common/common.h index 8089634b7..de9f6d5aa 100644 --- a/lib/include/srslte/common/common.h +++ b/lib/include/srslte/common/common.h @@ -147,6 +147,11 @@ public: { return msg-buffer; } + // Returns the remaining space from what is reported to be the length of msg + uint32_t get_tailroom() + { + return (sizeof(buffer) - (msg-buffer) - N_bytes); + } long get_latency_us() { #ifdef ENABLE_TIMESTAMP