RemoteLogRK
Data Fields
RemoteLogBufHeader Struct Reference

Structure typically stored in retained memory. More...

#include <RemoteLogRK.h>

Data Fields

uint32_t magic
 magic bytes, RemoteLog::BUF_MAGIC = 0x312ad071
 
uint8_t version
 version is 1
 
uint8_t headerSize
 sizeof(RemoteLogBufHeader), currently 32. Limited to 255 because of uint8_t
 
uint16_t bufLen
 Total size of buffer including RemoteLogBufHeader and data.
 
size_t writeIndex
 Index into data buffer to write to next. More...
 
size_t readIndexes [REMOTELOG_MAX_SERVERS]
 Index into data buffer to read from for each server. More...
 
uint32_t reserved
 Reserved for future use, currently always 0.
 

Detailed Description

Structure typically stored in retained memory.

Recommended size 2.5K (2560 bytes). Larger is better. Can be stored in regular RAM if desired. Should not be smaller than 256 bytes. Can't be larger than 65535 bytes as the size is stored in a uint16_t.

The RemoteLogBufHeader structure (not including data) cannot exceed 256 bytes as the headerSize member is a uint8_t. It's currently 32 bytes.

Field Documentation

◆ readIndexes

size_t RemoteLogBufHeader::readIndexes[REMOTELOG_MAX_SERVERS]

Index into data buffer to read from for each server.

This can be larger than the buffer size as it is always taken modulo buffer size. This happens when the buffer wraps around to the beginning.

◆ writeIndex

size_t RemoteLogBufHeader::writeIndex

Index into data buffer to write to next.

This can be larger than the buffer size as it is always taken modulo buffer size. This happens when the buffer wraps around to the beginning.


The documentation for this struct was generated from the following file: