Corium 1.1.0
High-Performance Zero-Heap C++20 MPSC Application Runtime
Loading...
Searching...
No Matches
corium::wire::EventJournalWriter< EventVariant, BufferCapacity > Class Template Reference

Statically allocated binary event journal writer for zero-heap post-mortem logging and record playback. More...

#include <EventJournal.hpp>

+ Collaboration diagram for corium::wire::EventJournalWriter< EventVariant, BufferCapacity >:

Public Member Functions

size_t bytesWritten () const noexcept
 Total bytes written into buffer (header + all records).
 
std::span< const uint8_t > data () const noexcept
 Read-only view of the serialized journal data.
 
constexpr EventJournalWriter () noexcept
 
template<typename Event >
bool record (const Event &event, uint64_t timestampUs, EventPriority priority=EventPriority::Normal) noexcept
 Record a concrete typed event into the journal.
 
size_t recordCount () const noexcept
 Number of records written.
 
void reset () noexcept
 Reset journal to initial empty state.
 

Detailed Description

template<typename EventVariant, size_t BufferCapacity = 4096>
class corium::wire::EventJournalWriter< EventVariant, BufferCapacity >

Statically allocated binary event journal writer for zero-heap post-mortem logging and record playback.

Template Parameters
EventVariantVariant of supported event types.
BufferCapacityTotal byte capacity of the journal storage buffer.

Constructor & Destructor Documentation

◆ EventJournalWriter()

template<typename EventVariant , size_t BufferCapacity = 4096>
constexpr corium::wire::EventJournalWriter< EventVariant, BufferCapacity >::EventJournalWriter ( )
inlineconstexprnoexcept

Member Function Documentation

◆ bytesWritten()

template<typename EventVariant , size_t BufferCapacity = 4096>
size_t corium::wire::EventJournalWriter< EventVariant, BufferCapacity >::bytesWritten ( ) const
inlinenoexcept

Total bytes written into buffer (header + all records).

◆ data()

template<typename EventVariant , size_t BufferCapacity = 4096>
std::span< const uint8_t > corium::wire::EventJournalWriter< EventVariant, BufferCapacity >::data ( ) const
inlinenoexcept

Read-only view of the serialized journal data.

◆ record()

template<typename EventVariant , size_t BufferCapacity = 4096>
template<typename Event >
bool corium::wire::EventJournalWriter< EventVariant, BufferCapacity >::record ( const Event event,
uint64_t  timestampUs,
EventPriority  priority = EventPriority::Normal 
)
inlinenoexcept

Record a concrete typed event into the journal.

Template Parameters
EventConcrete event struct type (must be trivially copyable).
Parameters
eventEvent instance to record.
timestampUsTimestamp in microseconds.
priorityPriority of the event.
Returns
true if record was successfully written; false if journal is full.
+ Here is the call graph for this function:

◆ recordCount()

template<typename EventVariant , size_t BufferCapacity = 4096>
size_t corium::wire::EventJournalWriter< EventVariant, BufferCapacity >::recordCount ( ) const
inlinenoexcept

Number of records written.

◆ reset()

template<typename EventVariant , size_t BufferCapacity = 4096>
void corium::wire::EventJournalWriter< EventVariant, BufferCapacity >::reset ( )
inlinenoexcept

Reset journal to initial empty state.


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