Skip to main content
Pigweed's logo Pigweed
code_xml
  1. Home
  2. Reference
  3. C/C++
  4. Observability
  5. pw_trace
  6. pw_trace_tokenized
  7. pw::trace::TraceBuffer Class Reference
pw::trace::TraceBuffer Class Reference

Overview

Adapter type that allows using an InlineVarLenEntryQueue with code that expects a PrefixedEntryRingBufferMulti. This type only partially implements the latter's interface. In particular, it implements those methods used by callers of pw::trace::GetBuffer.

Public Member Functions

InlineVarLenEntryQueue & queue ()
 
constexpr Status PeekFront (ByteSpan data, size_t *bytes_read_out) const
 
constexpr Status PopFront ()
 
constexpr size_t EntryCount () const
 Get the number of variable-length entries currently in the ring buffer.
 
constexpr Status CheckForCorruption ()
 
constexpr void Clear ()
 Removes all data from the ring buffer.
 
constexpr size_t TotalUsedBytes () const
 Get the size in bytes of all the current entries in the ring buffer.
 

Friends

class ::pw::trace::internal::TraceBufferImpl
 

Member Function Documentation

◆ CheckForCorruption()

constexpr Status pw::trace::TraceBuffer::CheckForCorruption ( )
inlineconstexpr

Determines if the ring buffer has corrupted entries.

This method is kept strictly for compatibility reasons. As long as access to this object is properly synchronized, it should not be possible to corrupt the queue through its public API.


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