Humidistat
Arduino firmware for a humidistat (humidity controller)
Loading...
Searching...
No Matches
SerialLogger< Humidistat_t > Class Template Reference

Logs humidistat data over serial. More...

#include <SerialLogger.h>

Public Member Functions

 SerialLogger (const Humidistat_t *humidistat, etl::span< const ThermistorReader, 4 > trs, uint16_t interval)
 Constructor.
 
void update ()
 Log a line every interval, once data has been received.
 

Static Public Member Functions

static void begin (uint32_t baud)
 Setup the serial interface.
 

Private Member Functions

void log ()
 Write a line to serial.
 
const char header []
 
const char header []
 
void log ()
 
void log ()
 

Private Attributes

const Humidistat_t & humidistat
 
const etl::span< const ThermistorReader, 4 > trs
 
const uint16_t interval
 Logging interval (in millis)
 
unsigned long lastTime = 0
 Last time line was written (in millis)
 
bool ready = false
 

Static Private Attributes

static const char header []
 

Detailed Description

template<class Humidistat_t>
class SerialLogger< Humidistat_t >

Logs humidistat data over serial.

Template Parameters
Humidistat_tEither SingleHumidistat or CascadeHumidistat

Definition at line 15 of file SerialLogger.h.

Constructor & Destructor Documentation

◆ SerialLogger()

template<class Humidistat_t >
SerialLogger< Humidistat_t >::SerialLogger ( const Humidistat_t * humidistat,
etl::span< const ThermistorReader, 4 > trs,
uint16_t interval )
inlineexplicit

Constructor.

Parameters
humidistatPointer to a Humidistat instance
trsSpan over 4 ThermistorReader instances
intervalLogging interval (in ms)

Definition at line 35 of file SerialLogger.h.

Member Function Documentation

◆ begin()

template<class Humidistat_t >
static void SerialLogger< Humidistat_t >::begin ( uint32_t baud)
inlinestatic

Setup the serial interface.

Definition at line 39 of file SerialLogger.h.

◆ header() [1/2]

const char SerialLogger< SingleHumidistat >::header
private

Definition at line 70 of file SerialLogger.h.

◆ header() [2/2]

const char SerialLogger< CascadeHumidistat >::header
private

Definition at line 74 of file SerialLogger.h.

◆ log() [1/3]

template<class Humidistat_t >
void SerialLogger< Humidistat_t >::log ( )
private

Write a line to serial.

Here is the caller graph for this function:

◆ log() [2/3]

void SerialLogger< SingleHumidistat >::log ( )
private

Definition at line 79 of file SerialLogger.h.

Here is the call graph for this function:

◆ log() [3/3]

void SerialLogger< CascadeHumidistat >::log ( )
private

Definition at line 103 of file SerialLogger.h.

Here is the call graph for this function:

◆ update()

template<class Humidistat_t >
void SerialLogger< Humidistat_t >::update ( )
inline

Log a line every interval, once data has been received.

Definition at line 46 of file SerialLogger.h.

Here is the call graph for this function:

Member Data Documentation

◆ header

template<class Humidistat_t >
const char SerialLogger< Humidistat_t >::header[]
staticprivate

Definition at line 21 of file SerialLogger.h.

◆ humidistat

template<class Humidistat_t >
const Humidistat_t& SerialLogger< Humidistat_t >::humidistat
private

Definition at line 17 of file SerialLogger.h.

◆ interval

template<class Humidistat_t >
const uint16_t SerialLogger< Humidistat_t >::interval
private

Logging interval (in millis)

Definition at line 23 of file SerialLogger.h.

◆ lastTime

template<class Humidistat_t >
unsigned long SerialLogger< Humidistat_t >::lastTime = 0
private

Last time line was written (in millis)

Definition at line 24 of file SerialLogger.h.

◆ ready

template<class Humidistat_t >
bool SerialLogger< Humidistat_t >::ready = false
private

Definition at line 25 of file SerialLogger.h.

◆ trs

template<class Humidistat_t >
const etl::span<const ThermistorReader, 4> SerialLogger< Humidistat_t >::trs
private

Definition at line 18 of file SerialLogger.h.


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