increase size of bytebuffer to compensate header, add helper to get remaining size

This commit is contained in:
Andre Puschmann 2018-03-23 16:41:37 +01:00
parent bf25a5a05c
commit fffda82f1e
1 changed files with 5 additions and 0 deletions

View File

@ -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