rusEFI
The most advanced open source ECU
|
rusEfi console sniffer data buffer More...
#include <engine_sniffer.h>
Public Member Functions | |
WaveChart () | |
void | init () |
void | addEvent3 (const char *name, const char *msg) |
Register an event for digital sniffer. More... | |
void | reset () |
void | startDataCollection () |
void | publishIfFull () |
void | publish () |
bool | isFull () const |
bool | isStartedTooLongAgo () const |
int | getSize () |
Data Fields | |
efitick_t | pauseEngineSnifferUntilNt = 0 |
Private Attributes | |
Logging | logging |
char | timeBuffer [_MAX_FILLER+2] |
uint32_t | counter = 0 |
bool | collectingData = false |
efitick_t | startTimeNt = 0 |
volatile int | isInitialized = false |
rusEfi console sniffer data buffer
Definition at line 35 of file engine_sniffer.h.
WaveChart::WaveChart | ( | ) |
Definition at line 77 of file engine_sniffer.cpp.
void WaveChart::addEvent3 | ( | const char * | name, |
const char * | msg | ||
) |
Register an event for digital sniffer.
We want smaller times within a chart in order to reduce packet size.
todo: migrate to binary fractions in order to eliminate this division? I do not like division
at least that's 32 bit division now
printf is a heavy method, append is used here as a performance optimization
Definition at line 158 of file engine_sniffer.cpp.
int WaveChart::getSize | ( | ) |
Definition at line 115 of file engine_sniffer.cpp.
Referenced by triggerInfo().
void WaveChart::init | ( | ) |
Definition at line 80 of file engine_sniffer.cpp.
Referenced by initWaveChart().
bool WaveChart::isFull | ( | ) | const |
Definition at line 111 of file engine_sniffer.cpp.
Referenced by addEvent3(), and publishIfFull().
bool WaveChart::isStartedTooLongAgo | ( | ) | const |
Say at 300rpm we should get at least four events per revolution. That's 300/60*4=20 events per second engineChartSize/20 is the longest meaningful chart.
Definition at line 100 of file engine_sniffer.cpp.
Referenced by publishIfFull().
void WaveChart::publish | ( | ) |
Definition at line 141 of file engine_sniffer.cpp.
Referenced by publishIfFull().
void WaveChart::publishIfFull | ( | ) |
Definition at line 134 of file engine_sniffer.cpp.
Referenced by printOverallStatus().
void WaveChart::reset | ( | ) |
Definition at line 85 of file engine_sniffer.cpp.
Referenced by init(), publishIfFull(), Engine::resetEngineSnifferIfInTestMode(), and resetNow().
void WaveChart::startDataCollection | ( | ) |
Definition at line 96 of file engine_sniffer.cpp.
Referenced by addEngineSnifferTdcEvent().
|
private |
We want to avoid visual jitter thus we want the left edge to be aligned https://github.com/rusefi/rusefi/issues/780
Definition at line 59 of file engine_sniffer.h.
Referenced by addEvent3(), reset(), and startDataCollection().
|
private |
Definition at line 54 of file engine_sniffer.h.
Referenced by addEvent3(), getSize(), isFull(), and reset().
|
private |
Definition at line 61 of file engine_sniffer.h.
Referenced by addEvent3(), and init().
|
private |
Definition at line 51 of file engine_sniffer.h.
Referenced by addEvent3(), publish(), and reset().
efitick_t WaveChart::pauseEngineSnifferUntilNt = 0 |
Definition at line 47 of file engine_sniffer.h.
Referenced by addEvent3(), and Engine::resetEngineSnifferIfInTestMode().
|
private |
Definition at line 60 of file engine_sniffer.h.
Referenced by addEvent3(), isStartedTooLongAgo(), and reset().
|
private |
Definition at line 52 of file engine_sniffer.h.
Referenced by addEvent3().