LOGGER
Logger
Data Logging using ESP8266
|
#include <arduino.h>
#include "basetype.h"
Go to the source code of this file.
Enumerations | |
enum | ConfigMode_t { ConfigModeAPconfig, ConfigModeAPstartup, ConfigModeNormal, ConfigModeBoth } |
Mode to run in. | |
Functions | |
void | webpagesInit () |
< version of this include file More... | |
void | webEmitMainMenu (Print *pPrint) |
Emit the main menu. | |
void | webEmitHeader (Print *pPrint) |
Emit the header section of a web page. More... | |
void | webUpdateTime (const char *pTimeZone) |
void | handleRootPage () |
void | processButtonCommand (Print *pPrint, String buttonName) |
void | processPulldownSelected (Print *pPrint, String pulldownName, String pulldownValue) |
void | handleIntervalsPage () |
Display web page for intervals. | |
void | handleNetworkConfigurationPage () |
display the network configuration page | |
void | handleIOpinControlPage () |
display the I/O pin control page | |
void | handleParametersPage () |
Display all of the permanent parameters on a web page. | |
void | handleSamplesPage () |
display the sample history page More... | |
void | handleSensorsPage () |
display the sensors page | |
void | emitDaytimeInput (Print *pPrint, String prefix, int32_t defaultYear, int32_t defaultMonth, int32_t defaultDay, int32_t defaultHour, int32_t defaultMin, int32_t defaultSec) |
time_t | getTimeFromArguments (String prefix, time_t defaultTime) |
Variables | |
ConfigMode_t | savedConfigMode |
Remember what mode to run in next. | |
ConfigMode_t | runningConfigMode |
Mode we are currently running in. | |
Web page Service Routines that are application specific.
void emitDaytimeInput | ( | Print * | pPrint, |
String | prefix, | ||
int32_t | defaultYear, | ||
int32_t | defaultMonth, | ||
int32_t | defaultDay, | ||
int32_t | defaultHour, | ||
int32_t | defaultMin, | ||
int32_t | defaultSec | ||
) |
Emit a time and date selection, each field of the time and date is named: year, month, day, hour, minutes, seconds. The field names are prefixed the the prefix argument.
pPrint | where to emit the output |
prefix | string to prefix each field name with |
defaultYear | initial value for year |
defaultMonth | initial value for month |
defaultDay | initial value for day |
defaultHour | initial value for hour |
defaultMin | initial value for minutes |
defaultSec | initial value for seconds |
time_t getTimeFromArguments | ( | String | prefix, |
time_t | defaultTime | ||
) |
Read the time from a set of related arguments. A prefix is supplied and the arguments are that prefix followed by these names: year, month, day, hour, minutes, seconds. The default time is used when an argument is missing. The decision to use it is on an argument by argument basis, so a default time can be used and offset by a number of seconds by only passing the seconds argument.
prefix | argument prefix |
defaultTime | time if argument is missing |
void handleRootPage | ( | ) |
Service routine called when there is a server request for the root file.
void handleSamplesPage | ( | ) |
display the sample history page
Service routine called when there is a server request to display a list of samples. (Also used for the root page.)
void processButtonCommand | ( | Print * | pPrint, |
String | buttonName | ||
) |
Using the arguments from the web page handle a button press and perform any actions that are expected.
pPrint | where to send output |
buttonName | name of the button that was pressed |
void processPulldownSelected | ( | Print * | pPrint, |
String | pulldownName, | ||
String | pulldownValue | ||
) |
Using the arguments from the web page handle a pulldown selection and perform any actions that are expected.
pPrint | where to send output |
pulldownName | name of the selector |
pulldownValue | name of the option selected |
void webEmitHeader | ( | Print * | pPrint | ) |
Emit the header section of a web page.
NOTE: Depends on the global variable chartType set when a page is started. ??? should this be indirected through a table that establishes other things too?
void webpagesInit | ( | ) |
< version of this include file
Initialize the web services
void webUpdateTime | ( | const char * | pTimeZone | ) |
Schedule a time update. The actual update can be asyncronous and occur after this routine returns.
pTimeZone | name of the local time zone |