LOGGER  Logger
Data Logging using ESP8266
Enumerations | Functions | Variables
webpages.h File Reference
#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.
 

Detailed Description

Web page Service Routines that are application specific.

Function Documentation

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.

Parameters
pPrintwhere to emit the output
prefixstring to prefix each field name with
defaultYearinitial value for year
defaultMonthinitial value for month
defaultDayinitial value for day
defaultHourinitial value for hour
defaultMininitial value for minutes
defaultSecinitial 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.

Parameters
prefixargument prefix
defaultTimetime if argument is missing
Returns
time that was input
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.

Parameters
pPrintwhere to send output
buttonNamename 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.

Parameters
pPrintwhere to send output
pulldownNamename of the selector
pulldownValuename 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.

Parameters
pTimeZonename of the local time zone