WPILibC++ 2023.4.3-108-ge5452e3
wpi::log::DataLogReader Class Reference

Data log reader (reads logs written by the DataLog class). More...

#include <wpi/DataLogReader.h>

Public Types

using iterator = DataLogIterator
 

Public Member Functions

 DataLogReader (std::unique_ptr< MemoryBuffer > buffer)
 Constructs from a memory buffer. More...
 
 operator bool () const
 Returns true if the data log is valid (e.g. More...
 
bool IsValid () const
 Returns true if the data log is valid (e.g. More...
 
uint16_t GetVersion () const
 Gets the data log version. More...
 
std::string_view GetExtraHeader () const
 Gets the extra header data. More...
 
std::string_view GetBufferIdentifier () const
 Gets the buffer identifier, typically the filename. More...
 
iterator begin () const
 Returns iterator to first record. More...
 
iterator end () const
 Returns end iterator. More...
 

Friends

class DataLogIterator
 

Detailed Description

Data log reader (reads logs written by the DataLog class).

Member Typedef Documentation

◆ iterator

Constructor & Destructor Documentation

◆ DataLogReader()

wpi::log::DataLogReader::DataLogReader ( std::unique_ptr< MemoryBuffer buffer)
explicit

Constructs from a memory buffer.

Member Function Documentation

◆ begin()

iterator wpi::log::DataLogReader::begin ( ) const

Returns iterator to first record.

◆ end()

iterator wpi::log::DataLogReader::end ( ) const
inline

Returns end iterator.

◆ GetBufferIdentifier()

std::string_view wpi::log::DataLogReader::GetBufferIdentifier ( ) const
inline

Gets the buffer identifier, typically the filename.

Returns
Identifier string

◆ GetExtraHeader()

std::string_view wpi::log::DataLogReader::GetExtraHeader ( ) const

Gets the extra header data.

Returns
Extra header data

◆ GetVersion()

uint16_t wpi::log::DataLogReader::GetVersion ( ) const

Gets the data log version.

Returns 0 if data log is invalid.

Returns
Version number; most significant byte is major, least significant is minor (so version 1.0 will be 0x0100)

◆ IsValid()

bool wpi::log::DataLogReader::IsValid ( ) const

Returns true if the data log is valid (e.g.

has a valid header).

◆ operator bool()

wpi::log::DataLogReader::operator bool ( ) const
inlineexplicit

Returns true if the data log is valid (e.g.

has a valid header).

Friends And Related Function Documentation

◆ DataLogIterator

friend class DataLogIterator
friend

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