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 | Protected Member Functions | Protected Attributes | Friends | List of all members
EmbAJAXContainer< NUM > Class Template Reference

Base class for groups of objects. More...

#include <EmbAJAX.h>

Inheritance diagram for EmbAJAXContainer< NUM >:
Inheritance graph
[legend]
Collaboration diagram for EmbAJAXContainer< NUM >:
Collaboration graph
[legend]

Public Member Functions

 EmbAJAXContainer (EmbAJAXBase *children[NUM])
 
void print () const override
 
bool sendUpdates (uint16_t since, bool first) override
 
EmbAJAXElementfindChild (const char *id) const override final
 
- Public Member Functions inherited from EmbAJAXBase
virtual EmbAJAXElementtoElement ()
 
void setVisible (bool visible)
 
void setEnabled (bool enabled)
 

Protected Member Functions

void setBasicProperty (uint8_t num, bool status) override
 
- Protected Member Functions inherited from EmbAJAXBase
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)())
 

Protected Attributes

EmbAJAXBase ** _children
 

Friends

template<size_t >
class EmbAJAXHideableContainer
 

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)
 
- Static Protected Attributes inherited from EmbAJAXBase
static EmbAJAXOutputDriverBase_driver
 
static char itoa_buf [8]
 
constexpr static const char null_string [1]
 

Detailed Description

template<size_t NUM>
class EmbAJAXContainer< NUM >

Base class for groups of objects.

Member Function Documentation

◆ findChild()

template<size_t NUM>
EmbAJAXElement* EmbAJAXContainer< NUM >::findChild ( const char *  id) const
inlinefinaloverridevirtual

Recursively look for a child (hopefully, there is only one) of the given id, and return a pointer to it.

Reimplemented from EmbAJAXBase.

◆ sendUpdates()

template<size_t NUM>
bool EmbAJAXContainer< NUM >::sendUpdates ( uint16_t  since,
bool  first 
)
inlineoverridevirtual

serialize pending changes for the client. Virtual so you could customize it, completely, but instead you probably want to override EmbAJAXElement::valueProperty(), only, instead.

Parameters
sincerevision number last sent to the server. Send only changes that occured since this revision.
firstif false, and this object writes any update, it should write a ',', first.
Returns
true if anything has been written, false otherwise.

Reimplemented from EmbAJAXBase.


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