STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
LogBuffer Class Reference

#include <hotfire_log.h>

Inheritance diagram for LogBuffer:
[legend]
Collaboration diagram for LogBuffer:
[legend]

Public Member Functions

size_t write (uint8_t c) override
size_t write (const uint8_t *data, size_t size) override
const uint8_t * data () const
uint16_t length () const
bool empty () const
bool nearFull () const
uint8_t flags () const
void clear ()

Private Attributes

char buf_ [LOG_BUF_SIZE]
size_t len_ = 0
bool truncated_ = false

Detailed Description

Definition at line 49 of file hotfire_log.h.

Member Function Documentation

◆ clear()

void LogBuffer::clear ( )
inline

Definition at line 82 of file hotfire_log.h.

References len_, and truncated_.

◆ data()

const uint8_t * LogBuffer::data ( ) const
inline

Definition at line 67 of file hotfire_log.h.

References buf_.

Referenced by write().

◆ empty()

bool LogBuffer::empty ( ) const
inline

Definition at line 73 of file hotfire_log.h.

References len_.

◆ flags()

uint8_t LogBuffer::flags ( ) const
inline

Definition at line 79 of file hotfire_log.h.

References truncated_.

◆ length()

uint16_t LogBuffer::length ( ) const
inline

Definition at line 70 of file hotfire_log.h.

References len_.

◆ nearFull()

bool LogBuffer::nearFull ( ) const
inline

Definition at line 76 of file hotfire_log.h.

References len_, and LOG_BUF_SIZE.

◆ write() [1/2]

size_t LogBuffer::write ( const uint8_t * data,
size_t size )
inlineoverride

Definition at line 59 of file hotfire_log.h.

References buf_, data(), len_, LOG_BUF_SIZE, and truncated_.

◆ write() [2/2]

size_t LogBuffer::write ( uint8_t c)
inlineoverride

Definition at line 51 of file hotfire_log.h.

References buf_, len_, LOG_BUF_SIZE, and truncated_.

Member Data Documentation

◆ buf_

char LogBuffer::buf_[LOG_BUF_SIZE]
private

Definition at line 88 of file hotfire_log.h.

Referenced by data(), write(), and write().

◆ len_

size_t LogBuffer::len_ = 0
private

Definition at line 89 of file hotfire_log.h.

Referenced by clear(), empty(), length(), nearFull(), write(), and write().

◆ truncated_

bool LogBuffer::truncated_ = false
private

Definition at line 90 of file hotfire_log.h.

Referenced by clear(), flags(), write(), and write().


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