|
Loom
|
Glue code to synchronize an RTC using an InternetPlat. More...
#include <NTP_Sync.h>

Public Member Functions | |
CONSTRUCTORS / DESTRUCTOR | |
| LoomNTPSync (LoomManager *manager, const uint sync_interval_hours=0) | |
| NTP Sync module constructor. More... | |
| LoomNTPSync (LoomManager *manager, JsonArrayConst p) | |
| Constructor that takes Json Array, extracts args and delegates to regular constructor. More... | |
| ~LoomNTPSync ()=default | |
| Destructor. More... | |
| void | second_stage_ctor () override |
| Sync the RTC using NTP from the internet platform specified. More... | |
OPERATION | |
| void | measure () |
| Sync the time if necessary or enabled. More... | |
| void | package (JsonObject json) override |
| Package a modules measurements or state. More... | |
| bool | dispatch (JsonObject) override |
| Route command to driver. More... | |
Public Member Functions inherited from LoomModule | |
| LoomModule (LoomManager *manager, const char *module_name="Unknown", const Type module_type=Type::Unknown) | |
| Constructor. More... | |
| virtual | ~LoomModule ()=default |
| Destructor. More... | |
| virtual void | power_down () |
| Turn off any hardware. More... | |
| virtual void | power_up () |
| Turn on any hardware. More... | |
| virtual void | add_config (JsonObject json) |
| Add configuration information to JsonObject. More... | |
| Type | get_module_type () const |
| Get module type. More... | |
| LoomManager * | get_device_manager () const |
| Get the device manager class if linked. More... | |
| void | get_module_name (char *buf) const |
| Copy module name into buffer. More... | |
| const char * | get_module_name () const |
| Get module name. More... | |
| Verbosity | get_print_verbosity () const |
| Get print verbosity. More... | |
| Verbosity | get_package_verbosity () const |
| Get package verbosity. More... | |
| bool | get_active () const |
| Get whether or not the module should be treated as active. More... | |
| Category | category () const |
| Get the category of the module. More... | |
| virtual void | link_device_manager (LoomManager *LM) |
| Add pointer back to device manager. More... | |
| void | set_print_verbosity (const Verbosity v) |
| Set print verbosity Controlls level of detail included in debug prints. More... | |
| void | set_package_verbosity (const Verbosity v) |
| Set package verbosity. More... | |
| void | set_active (const bool enable) |
| Set whether or not the module should be treated as active. More... | |
PRINT INFORMATION | |
| void | print_config () const override |
| Display the configuration settings of the module. More... | |
| void | print_state () const override |
| Display current state of the module. More... | |
Glue code to synchronize an RTC using an InternetPlat.
Always synchronizes the RTC from Loom_Interrupt_Manager::get_RTC_module().
| LoomNTPSync::LoomNTPSync | ( | LoomManager * | manager, |
| const uint | sync_interval_hours = 0 |
||
| ) |
NTP Sync module constructor.
| [in] | sync_interval_hours | Int | <0> | [0-999] | What hourly period to sync the RTC, zero for once on startup. |
| LoomNTPSync::LoomNTPSync | ( | LoomManager * | manager, |
| JsonArrayConst | p | ||
| ) |
Constructor that takes Json Array, extracts args and delegates to regular constructor.
| [in] | p | The array of constuctor args to expand |
|
default |
Destructor.
|
inlineoverridevirtual |
Route command to driver.
Reimplemented from LoomModule.
| void LoomNTPSync::measure | ( | ) |
Sync the time if necessary or enabled.
Allows the module to run regularly by emulating a sensor, which have thier measure methods called regularly.
|
inlineoverridevirtual |
Package a modules measurements or state.
| [out] | json | Object to put data into |
Implements LoomModule.
|
overridevirtual |
Display the configuration settings of the module.
Reimplemented from LoomModule.
|
overridevirtual |
Display current state of the module.
Reimplemented from LoomModule.
|
overridevirtual |
Sync the RTC using NTP from the internet platform specified.
Reimplemented from LoomModule.
1.8.11