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
EmbAJAXOutputDriverESPAsync Class Reference

Output driver implementation. This implementation works with ESPAsyncWebServer (https://github.com/me-no-dev/ESPAsyncWebServer). More...

#include <EmbAJAXOutputDriverESPAsync.h>

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

Public Member Functions

 EmbAJAXOutputDriverESPAsync (AsyncWebServer *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 works with ESPAsyncWebServer (https://github.com/me-no-dev/ESPAsyncWebServer).

To use this class, you will have to include EmbAJAXOutputDriverESPAsync.h before EmbAJAX.h

Constructor & Destructor Documentation

◆ EmbAJAXOutputDriverESPAsync()

EmbAJAXOutputDriverESPAsync::EmbAJAXOutputDriverESPAsync ( AsyncWebServer *  server)
inline

To register an (ESP)AsyncWebServer 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, AsyncWebServer on ESP32, ESPAsyncWebServer on ESP8266.

Member Function Documentation

◆ installPage()

void EmbAJAXOutputDriverESPAsync::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 EmbAJAXOutputDriverESPAsync::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: