|
Loom
|
Abstract base of logging platforms. More...
#include <LogPlat.h>

Public Member Functions | |
CONSTRUCTORS / DESTRUCTOR | |
| LoomLogPlat (LoomManager *manager, const char *module_name, const LoomModule::Type module_type, const bool enable_rate_filter=true, const uint16_t min_filter_delay=1000) | |
| Constructor. More... | |
| virtual | ~LoomLogPlat ()=default |
| Destructor. More... | |
OPERATION | |
| virtual void | package (JsonObject json) override |
| No package necessary for logging platforms. More... | |
| virtual bool | log (JsonObject json)=0 |
| Log a Json object. More... | |
| bool | log () |
| Version of log for use with LoomManager. 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 | second_stage_ctor () |
| Second stage construction. More... | |
| virtual bool | dispatch (JsonObject json) |
| Route command to driver. 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... | |
| virtual void | print_state () const |
| Display current state of the module. More... | |
Protected Attributes | |
| bool | enable_rate_filter |
| Whether or not to enable a minimum delay between logging. More... | |
| uint16_t | min_filter_delay |
| Minimum delay between logging (milliseconds) More... | |
| unsigned long | last_log_millis |
| Value of millis() at last executed log time. More... | |
Protected Attributes inherited from LoomModule | |
| const Type | module_type |
| Module type. More... | |
| LoomManager * | device_manager |
| Pointer to manager. More... | |
| const String | module_name_base |
| The name of the module (Should have a DEFAULT but can be overriden if provided to constructor) More... | |
| const char * | module_name |
| bool | active |
| Whether or not the module should be treated as active. More... | |
| Verbosity | print_verbosity |
| Print verbosity. More... | |
| Verbosity | package_verbosity |
| Package verbosity. More... | |
PRINT INFORMATION | |
| virtual void | print_config () const override |
| Display the configuration settings of the module. More... | |
| bool | check_millis () |
| Check against millis to determine if time since last log exceeds min time. More... | |
Abstract base of logging platforms.
All logging modules inherit from this class.
| LoomLogPlat::LoomLogPlat | ( | LoomManager * | manager, |
| const char * | module_name, | ||
| const LoomModule::Type | module_type, | ||
| const bool | enable_rate_filter = true, |
||
| const uint16_t | min_filter_delay = 1000 |
||
| ) |
Constructor.
| [in] | module_name | Name of the module (provided by derived classes) |
| [in] | module_type | Type of the module (provided by derived classes) |
| [in] | enable_rate_filter | Whether or not to impose maximum update rate |
| [in] | min_filter_delay | Minimum update delay, if enable_rate_filter enabled |
|
virtualdefault |
Destructor.
|
protected |
Check against millis to determine if time since last log exceeds min time.
|
pure virtual |
Log a Json object.
| [in] | json | Json Object to log |
Implemented in Loom_OLED, Loom_SD, and Loom_BatchSD.
| bool LoomLogPlat::log | ( | ) |
Version of log for use with LoomManager.
Accesses Json from LoomManager. Calls derived classes implementations of log(JsonObject json)
|
inlineoverridevirtual |
No package necessary for logging platforms.
implement with empty body.
Implements LoomModule.
Reimplemented in Loom_BatchSD.
|
overridevirtual |
Display the configuration settings of the module.
Reimplemented from LoomModule.
Reimplemented in Loom_SD, Loom_OLED, and Loom_BatchSD.
|
protected |
Whether or not to enable a minimum delay between logging.
|
protected |
Value of millis() at last executed log time.
|
protected |
Minimum delay between logging (milliseconds)
1.8.11