rusEFI
The most advanced open source ECU
|
#include <datalogging.h>
Public Member Functions | |
Logging ()=delete | |
Logging (const char *name, char *buffer, int bufferSize) | |
void | reset () |
void | appendFast (const char *text) |
void | appendPrintf (const char *fmt,...) __attribute__((format(printf |
void void | appendFloat (float value, int precision) |
void | terminate () |
void | appendChar (char c) |
size_t | loggingSize () const |
size_t | remainingSize () const |
Data Fields | |
const char *const | name = nullptr |
char *const | buffer = nullptr |
const int | bufferSize = 0 |
char * | linePointer = nullptr |
Definition at line 17 of file datalogging.h.
|
delete |
Definition at line 133 of file datalogging.cpp.
|
inline |
This macro breaks the normal zero=termination constraint, please take care of this outside of this function
Definition at line 40 of file datalogging.h.
Referenced by WaveChart::addEvent3().
void Logging::appendFast | ( | const char * | text | ) |
Definition at line 73 of file datalogging.cpp.
Referenced by WaveChart::addEvent3().
void Logging::appendFloat | ( | float | value, |
int | precision | ||
) |
todo: #1 this implementation is less than perfect todo: #2 The only way to avoid double promotion would probably be using *float instead of float See also http://stackoverflow.com/questions/5522051/printing-a-float-in-c-while-avoiding-variadic-parameter-promotion-to-double
Definition at line 97 of file datalogging.cpp.
Referenced by reportWave().
void Logging::appendPrintf | ( | const char * | fmt, |
... | |||
) |
Definition at line 80 of file datalogging.cpp.
Referenced by appendFloat(), printHistogram(), WaveChart::publish(), reportWave(), and WaveChart::reset().
|
inline |
Definition at line 45 of file datalogging.h.
Referenced by WaveChart::publish(), and remainingSize().
|
inline |
Definition at line 49 of file datalogging.h.
Referenced by WaveChart::addEvent3(), and appendPrintf().
void Logging::reset | ( | ) |
Definition at line 128 of file datalogging.cpp.
Referenced by Logging(), printHistogram(), WaveChart::reset(), and scheduleLogging().
|
inline |
Definition at line 33 of file datalogging.h.
Referenced by WaveChart::addEvent3().
char* const Logging::buffer = nullptr |
Zero-terminated buffer of pending debug message
Unless a larger external buffer is specified, this is just a pointer to DEFAULT_BUFFER
Definition at line 63 of file datalogging.h.
Referenced by appendPrintf(), loggingSize(), reset(), and LogBuffer< TBufferSize >::writeLogger().
const int Logging::bufferSize = 0 |
Definition at line 64 of file datalogging.h.
Referenced by appendPrintf(), and remainingSize().
char* Logging::linePointer = nullptr |
This pointer is always pointing at the position within the buffer into which next write operation would append additional data
Definition at line 70 of file datalogging.h.
Referenced by appendChar(), appendFast(), appendPrintf(), loggingSize(), reset(), and terminate().
const char* const Logging::name = nullptr |
Definition at line 56 of file datalogging.h.