Humidistat
Arduino firmware for a humidistat (humidity controller)
Loading...
Searching...
No Matches
ConfigPar Class Reference

A class for storing references to variables of various types (uint8_t, uint16_t, or double). More...

#include <ConfigPar.h>

Collaboration diagram for ConfigPar:
[legend]

Classes

struct  Var
 

Public Types

enum class  ConfigParType { ui8 , ui16 , d }
 

Public Member Functions

void adjust (int16_t delta) const
 Add delta to the variable.
 
char * asprint () const
 Print "label: value" to string. Automatically allocates string on the heap. Make sure to delete it immediately afterwards.
 
uint8_t magnitude () const
 Get magnitude (number of digits before the decimal separator) of variable.
 

Public Attributes

struct ConfigPar::Var var
 
char label [10]
 

Detailed Description

A class for storing references to variables of various types (uint8_t, uint16_t, or double).

Definition at line 11 of file ConfigPar.h.

Member Enumeration Documentation

◆ ConfigParType

enum class ConfigPar::ConfigParType
strong
Enumerator
ui8 
ui16 

Definition at line 13 of file ConfigPar.h.

Member Function Documentation

◆ adjust()

void ConfigPar::adjust ( int16_t delta) const

Add delta to the variable.

Parameters
deltaAmount to add

Definition at line 8 of file ConfigPar.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ asprint()

char * ConfigPar::asprint ( ) const

Print "label: value" to string. Automatically allocates string on the heap. Make sure to delete it immediately afterwards.

Returns
Pointer to char string

Definition at line 22 of file ConfigPar.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ magnitude()

uint8_t ConfigPar::magnitude ( ) const

Get magnitude (number of digits before the decimal separator) of variable.

Returns
magnitude

Definition at line 33 of file ConfigPar.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ label

char ConfigPar::label[10]

Definition at line 40 of file ConfigPar.h.

◆ var

struct ConfigPar::Var ConfigPar::var

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