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 | Static Public Attributes | List of all members
EmbAJAXConnectionIndicator Class Reference

connection status indicator More...

#include <EmbAJAX.h>

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

Public Member Functions

 EmbAJAXConnectionIndicator (const char *content_ok=default_ok, const char *content_fail=default_fail)
 
void print () const override
 
- Public Member Functions inherited from EmbAJAXBase
virtual bool sendUpdates (uint16_t since, bool first)
 
virtual EmbAJAXElementtoElement ()
 
void setVisible (bool visible)
 
void setEnabled (bool enabled)
 
virtual EmbAJAXElementfindChild (const char *id) const
 

Static Public Attributes

static constexpr const char * default_ok
 
static constexpr const char * default_fail
 

Additional Inherited Members

- Public Types inherited from EmbAJAXBase
enum  Property {
  Visibility , Enabledness , Value , FirstElementSpecificProperty ,
  HTMLAllowed
}
 
- Static Public Member Functions inherited from EmbAJAXBase
static void setDriver (EmbAJAXOutputDriverBase *driver)
 
- Protected Member Functions inherited from EmbAJAXBase
virtual void setBasicProperty (uint8_t num, bool status)
 
void printChildren (EmbAJAXBase **children, size_t num) const
 
bool sendUpdates (EmbAJAXBase **children, size_t num, uint16_t since, bool first)
 
EmbAJAXElementfindChild (EmbAJAXBase **children, size_t num, const char *id) const
 
void printPage (EmbAJAXBase **children, size_t num, const char *_title, const char *_header, uint16_t _min_interval) const
 
void handleRequest (EmbAJAXBase **children, size_t num, void(*change_callback)())
 
- Static Protected Attributes inherited from EmbAJAXBase
static EmbAJAXOutputDriverBase_driver
 
static char itoa_buf [8]
 
constexpr static const char null_string [1]
 

Detailed Description

connection status indicator

This passive element can be inserted into a page to indicate the connection status: If there is no reply from the server for 5 seconds, the connection to the server is assumed to be broken.

Note
While this is a "dynamic" display, the entire logic is implemented on the client, for obvious reasons. From the point of view of the server, this is a static element.

Constructor & Destructor Documentation

◆ EmbAJAXConnectionIndicator()

EmbAJAXConnectionIndicator::EmbAJAXConnectionIndicator ( const char *  content_ok = default_ok,
const char *  content_fail = default_fail 
)
inline

c'tor. If you don't like the default status indications, you can pass the HTML to be shown for "ok" and "fail" states.

Parameters
content_okValue to show for OK state. May contain HTML markup. Default is "OK" on a green background.
content_okValue to show for broken state. May contain HTML markup. Default is "FAIL" on a green background.

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