CloudConfigRK
|
Abstract base class for updating cloud config data. More...
#include <CloudConfigRK.h>
Public Member Functions | |
CloudConfigUpdate () | |
Default constructor. | |
virtual void | setup () |
Called during setup() to allow update methods to have setup time. More... | |
virtual void | loop () |
Called during loop() to allow update methods to have loop time. More... | |
virtual void | startUpdate () |
Called when subclasses should update the data from the cloud. More... | |
Data Fields | |
unsigned long | waitAfterCloudConnectedMs = 2000 |
How long to wait after cloud connected to update settings. | |
unsigned long | updateTimeoutMs = 60000 |
If a response is not received in this amount of time, an error is assumed and another attempt will be made later. More... | |
Protected Member Functions | |
virtual | ~CloudConfigUpdate () |
Destructor. Base class destructor is empty. Also, you can't delete one of these. | |
CloudConfigUpdate (const CloudConfigUpdate &)=delete | |
This class is not copyable. | |
CloudConfigUpdate & | operator= (const CloudConfigUpdate &)=delete |
This class is not copyable. | |
Abstract base class for updating cloud config data.
|
inlinevirtual |
Called during loop() to allow update methods to have loop time.
Optional for subclasses to override.
|
inlinevirtual |
Called during setup() to allow update methods to have setup time.
Optional for subclasses to override.
Reimplemented in CloudConfigUpdateSubscription, and CloudConfigUpdateFunction.
|
inlinevirtual |
Called when subclasses should update the data from the cloud.
Optional for subclasses to override, but typically useful to do so. It is called after cloud connected and after waitAfterCloudConnectedMs depending on the settings for updateFrequency.
The subclass must call ConfigConfig::instance().updateData() or ConfigConfig::instance().updateDataFailed() if this method is called.
Reimplemented in CloudConfigUpdateWebhook.
unsigned long CloudConfigUpdate::updateTimeoutMs = 60000 |
If a response is not received in this amount of time, an error is assumed and another attempt will be made later.
If subclasses take a long time to retrieve data you may need to override this value from your subclass constructor or setup method.