Rise
The Vieneo Province
Loading...
Searching...
No Matches
SparkoProp::TraceFile Class Reference

#include <SparkoTrace.h>

Collaboration diagram for SparkoProp::TraceFile:
[legend]

Public Member Functions

 TraceFile (const std::filesystem::path &directory, size_t maxBytes=32 *1024 *1024)
 ~TraceFile ()
 TraceFile (const TraceFile &)=delete
TraceFile & operator= (const TraceFile &)=delete
bool Failed () const
void Flush ()
void Write (double dt, const Sample &input, const Controller &c, const TraceContext &context)

Private Member Functions

void Close ()
void Put (const std::string &text)
void Open ()

Private Attributes

std::filesystem::path current
std::filesystem::path previous
FILE * file =nullptr
std::array< char, 65536 > buffer {}
size_t bytes =0
size_t limit
double flushTime =0
bool failed =false
std::string preamble
std::string header

Detailed Description

Definition at line 18 of file SparkoTrace.h.

Constructor & Destructor Documentation

◆ TraceFile() [1/2]

SparkoProp::TraceFile::TraceFile ( const std::filesystem::path & directory,
size_t maxBytes = 32*1024*1024 )
inlineexplicit

Definition at line 47 of file SparkoTrace.h.

Here is the caller graph for this function:

◆ ~TraceFile()

SparkoProp::TraceFile::~TraceFile ( )
inline

Definition at line 50 of file SparkoTrace.h.

Here is the call graph for this function:

◆ TraceFile() [2/2]

SparkoProp::TraceFile::TraceFile ( const TraceFile & )
delete
Here is the call graph for this function:

Member Function Documentation

◆ Close()

void SparkoProp::TraceFile::Close ( )
inlineprivate

Definition at line 26 of file SparkoTrace.h.

Here is the caller graph for this function:

◆ Failed()

bool SparkoProp::TraceFile::Failed ( ) const
inline

Definition at line 53 of file SparkoTrace.h.

◆ Flush()

void SparkoProp::TraceFile::Flush ( )
inline

Definition at line 54 of file SparkoTrace.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Open()

void SparkoProp::TraceFile::Open ( )
inlineprivate

Definition at line 32 of file SparkoTrace.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

TraceFile & SparkoProp::TraceFile::operator= ( const TraceFile & )
delete
Here is the call graph for this function:

◆ Put()

void SparkoProp::TraceFile::Put ( const std::string & text)
inlineprivate

Definition at line 27 of file SparkoTrace.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Write()

void SparkoProp::TraceFile::Write ( double dt,
const Sample & input,
const Controller & c,
const TraceContext & context )
inline

Definition at line 55 of file SparkoTrace.h.

Here is the call graph for this function:

Member Data Documentation

◆ buffer

std::array<char,65536> SparkoProp::TraceFile::buffer {}
private

Definition at line 21 of file SparkoTrace.h.

◆ bytes

size_t SparkoProp::TraceFile::bytes =0
private

Definition at line 22 of file SparkoTrace.h.

◆ current

std::filesystem::path SparkoProp::TraceFile::current
private

Definition at line 19 of file SparkoTrace.h.

◆ failed

bool SparkoProp::TraceFile::failed =false
private

Definition at line 24 of file SparkoTrace.h.

◆ file

FILE* SparkoProp::TraceFile::file =nullptr
private

Definition at line 20 of file SparkoTrace.h.

◆ flushTime

double SparkoProp::TraceFile::flushTime =0
private

Definition at line 23 of file SparkoTrace.h.

◆ header

std::string SparkoProp::TraceFile::header
private

Definition at line 25 of file SparkoTrace.h.

◆ limit

size_t SparkoProp::TraceFile::limit
private

Definition at line 22 of file SparkoTrace.h.

◆ preamble

std::string SparkoProp::TraceFile::preamble
private

Definition at line 25 of file SparkoTrace.h.

◆ previous

std::filesystem::path SparkoProp::TraceFile::previous
private

Definition at line 19 of file SparkoTrace.h.


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