STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
hotfire_log.h File Reference
#include <Arduino.h>
Include dependency graph for hotfire_log.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  LogBuffer

Macros

#define LOG_BUF_SIZE    1024
#define HF_LOG(...)
#define HF_LOGLN(...)
#define HF_LOGLN_()
#define HF_LOGF(...)
#define HF_VERBOSE(...)
#define HF_VERBOSELN(...)
#define HF_VERBOSELN_()
#define HF_VERBOSEF(...)

Variables

bool g_verbose
LogBuffer g_logbuf
uint8_t g_log_stream_level

Macro Definition Documentation

◆ HF_LOG

#define HF_LOG ( ...)
Value:
do { \
Serial.print(__VA_ARGS__); \
if (g_log_stream_level >= 1) \
g_logbuf.print(__VA_ARGS__); \
} while (0)
static SerialStub Serial
Definition Arduino.h:128
LogBuffer g_logbuf
Definition hotfire_log.h:93
uint8_t g_log_stream_level
Definition hotfire_log.h:94

Definition at line 99 of file hotfire_log.h.

Referenced by loop(), SensorHotfire::loop(), pollNetwork(), processActuatorCommands(), run_self_test_cb(), setState(), SensorHotfire::setup(), setup(), and setValve().

◆ HF_LOGF

#define HF_LOGF ( ...)
Value:
do { \
Serial.printf(__VA_ARGS__); \
if (g_log_stream_level >= 1) \
g_logbuf.printf(__VA_ARGS__); \
} while (0)

Definition at line 117 of file hotfire_log.h.

◆ HF_LOGLN

#define HF_LOGLN ( ...)
Value:
do { \
Serial.println(__VA_ARGS__); \
if (g_log_stream_level >= 1) \
g_logbuf.println(__VA_ARGS__); \
} while (0)

Definition at line 105 of file hotfire_log.h.

Referenced by SensorHotfire::loop(), processActuatorCommands(), SensorHotfire::processIncomingPacket(), run_self_test_cb(), setState(), SensorHotfire::setup(), and setValve().

◆ HF_LOGLN_

#define HF_LOGLN_ ( )
Value:
do { \
Serial.println(); \
if (g_log_stream_level >= 1) \
g_logbuf.println(); \
} while (0)

Definition at line 111 of file hotfire_log.h.

Referenced by loop(), SensorHotfire::loop(), pollNetwork(), SensorHotfire::setup(), and setup().

◆ HF_VERBOSE

◆ HF_VERBOSEF

#define HF_VERBOSEF ( ...)
Value:
do { \
if (g_verbose) \
Serial.printf(__VA_ARGS__); \
if (g_log_stream_level >= 2) \
g_logbuf.printf(__VA_ARGS__); \
} while (0)

Definition at line 146 of file hotfire_log.h.

◆ HF_VERBOSELN

◆ HF_VERBOSELN_

#define HF_VERBOSELN_ ( )
Value:
do { \
if (g_verbose) \
Serial.println(); \
if (g_log_stream_level >= 2) \
g_logbuf.println(); \
} while (0)

Definition at line 139 of file hotfire_log.h.

Referenced by SensorHotfire::loop(), SensorHotfire::processIncomingPacket(), and send_chunks_to_impl().

◆ LOG_BUF_SIZE

#define LOG_BUF_SIZE    1024

Variable Documentation

◆ g_log_stream_level

uint8_t g_log_stream_level
inline
Initial value:
=
1

Definition at line 94 of file hotfire_log.h.

Referenced by processIncomingPacket(), and SensorHotfire::processIncomingPacket().

◆ g_logbuf

LogBuffer g_logbuf
inline

◆ g_verbose

bool g_verbose
extern

Definition at line 65 of file main.cpp.

Referenced by processIncomingPacket(), and SensorHotfire::processIncomingPacket().