LOGGER  Logger
Data Logging using ESP8266
Functions | Variables
parameters.h File Reference

Services to read and write permanent parameters stored in EEPROM. More...

#include "basetype.h"

Go to the source code of this file.

Functions

void parametersInit ()
 
void parametersSaveValue (void *pVariable, uint8_t numBytes)
 
void parametersSetValue (String name, String value)
 
void parametersSaveAll ()
 Save all variables that are stored in permanent memory.
 
String parametersDumpWebRow (void *pVariable)
 

Variables

uint8_t permanentsVersion
 < version of this include file More...
 
uint16_t permanentsSize
 

Detailed Description

Services to read and write permanent parameters stored in EEPROM.

Author
Michael Newman
Date
2February2016

Services that read and store permanent parameters in EEPROM.

Function Documentation

String parametersDumpWebRow ( void *  pVariable)

Build a row that displays a variable and allows the user to set the value of the variable. The name of the value is permanentname and the name of the value is permanentvalue.

Parameters
pVariablepointer to the variable to display
Returns
a row for a table that displays the variable
void parametersInit ( )

Call once at system startup to recover parameters from memory that survives reboots and store the recovered values in memory.

void parametersSaveValue ( void *  pVariable,
uint8_t  numBytes 
)

Call to update a variable in permanent memory. Copys the in memory value to permanent memory. The permanent memory copy will be recovered at system boot. Call this routine any time the in memory variable changes.

The variable in memory is read from pVariable and stored in EEPROM. This value will be recovered at boot and be the initial value of the variable.

Parameters
pVariablepointer to memory storage
numBytesnumber of bytes of data to copy
void parametersSetValue ( String  name,
String  value 
)

Update a variable in permanent memory by first finding the variable by its permanent name and setting the local value and then setting the value in permanent storage.

Variable Documentation

uint16_t permanentsSize

Place to store how many bytes are saved in permanent memory. Initialized to make sure we will always read the first two items

uint8_t permanentsVersion

< version of this include file

Place to store the permanents version number which is recovered from EEPROM