EmbAJAX
Simplistic framework for creating and handling displays and controls on a web page served by an embeddable device (Arduino or other microcontroller with Arduino support).
Public Member Functions | List of all members
EmbAJAXOutputDriverGeneric Class Reference

Output driver implementation. This implementation should work for most arduino web servers with minimal adjustmnets. More...

#include <EmbAJAXOutputDriverGeneric.h>

Inheritance diagram for EmbAJAXOutputDriverGeneric:
Inheritance graph
[legend]
Collaboration diagram for EmbAJAXOutputDriverGeneric:
Collaboration graph
[legend]

Public Member Functions

 EmbAJAXOutputDriverGeneric (EmbAJAXOutputDriverWebServerClass *server)
 
void printHeader (bool html) override
 
void printContent (const char *content) override
 
const char * getArg (const char *name, char *buf, int buflen) override
 
void installPage (EmbAJAXPageBase *page, const char *path, void(*change_callback)()=0) override
 
void loopHook () override
 
- Public Member Functions inherited from EmbAJAXOutputDriverBase
uint16_t revision () const
 
uint16_t setChanged ()
 
void nextRevision ()
 
void printFiltered (const char *value, QuoteMode quoted, bool HTMLescaped)
 
void printJSQuoted (const char *value)
 
void printHTMLQuoted (const char *value)
 
void printAttribute (const char *name, const char *value)
 
void printAttribute (const char *name, const int32_t value)
 
void _printContentF (const char *fmt,...)
 
void _printContentF (const __FlashStringHelper *,...)
 

Additional Inherited Members

- Public Types inherited from EmbAJAXOutputDriverBase
enum  QuoteMode { NotQuoted , JSQuoted , HTMLQuoted }
 

Detailed Description

Output driver implementation. This implementation should work for most arduino web servers with minimal adjustmnets.

Constructor & Destructor Documentation

◆ EmbAJAXOutputDriverGeneric()

EmbAJAXOutputDriverGeneric::EmbAJAXOutputDriverGeneric ( EmbAJAXOutputDriverWebServerClass *  server)
inline

To register an WebServer with EmbAJAX, simply create a (globaL) instance of this class.

Parameters
serverpointer to the server. The class of this is usually an auto-detected sensible default for the platform, e.g. ESP8266WebServer on ESP8266.

Member Function Documentation

◆ installPage()

void EmbAJAXOutputDriverGeneric::installPage ( EmbAJAXPageBase page,
const char *  path,
void(*)()  change_callback = 0 
)
inlineoverridevirtual

Set up the given page to be served on the given path.

Parameters
change_callbackSee EmbAJAXPage::handleRequest() for details.

Implements EmbAJAXOutputDriverBase.

◆ loopHook()

void EmbAJAXOutputDriverGeneric::loopHook ( )
inlineoverridevirtual

Insert this hook into loop(). Takes care of the appropriate server calls, if needed.

Implements EmbAJAXOutputDriverBase.


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