fome-fw/firmware/development/engine_sniffer.h

44 lines
804 B
C
Raw Normal View History

2015-07-10 06:01:56 -07:00
/**
2015-07-15 18:01:45 -07:00
* @file engine_sniffer.h
2015-07-10 06:01:56 -07:00
* @brief Dev console wave sniffer
*
* @date Jun 23, 2013
2015-12-31 13:02:30 -08:00
* @author Andrey Belomutskiy, (c) 2012-2016
2015-07-10 06:01:56 -07:00
*/
#ifndef WAVE_CHART_H_
#define WAVE_CHART_H_
#include "global.h"
2015-07-15 18:01:45 -07:00
#if EFI_ENGINE_SNIFFER || defined(__DOXYGEN__)
2015-07-10 06:01:56 -07:00
#include "datalogging.h"
/**
* @brief Dev console sniffer data buffer
*/
class WaveChart {
public:
WaveChart();
void init();
2016-01-30 19:03:36 -08:00
void addEvent3(const char *name, const char *msg);
void reset();
void publishIfFull();
void publish();
bool isFull();
2016-01-11 16:02:19 -08:00
bool isStartedTooLongAgo();
2015-07-10 06:01:56 -07:00
private:
Logging logging;
uint32_t counter;
efitime_t startTimeNt;
volatile int isInitialized;
};
void initWaveChart(WaveChart *chart);
void showWaveChartHistogram(void);
void setChartSize(int newSize);
2015-07-15 18:01:45 -07:00
#endif /* EFI_ENGINE_SNIFFER */
2015-07-10 06:01:56 -07:00
#endif /* WAVE_CHART_H_ */