|
Loom
|
Module taking in and translating JSON into data understood by the Google Sheets script API. More...
#include <Max_Pub.h>

Public Member Functions | |
CONSTRUCTORS / DESTRUCTOR | |
| Loom_MaxPub (LoomManager *manager, const LoomModule::Type internet_type) | |
| Constructor. More... | |
| Loom_MaxPub (LoomManager *manager, JsonArrayConst p) | |
| Constructor that takes Json Array, extracts args and delegates to regular constructor. More... | |
| void | second_stage_ctor () override |
| Second stage construction. More... | |
| ~Loom_MaxPub () | |
| Destructor. More... | |
OPERATION | |
| bool | dispatch (JsonObject json) override |
| Route command to driver. More... | |
PRINT INFORMATION | |
| void | print_config () const override |
| Display the configuration settings of the module. More... | |
GETTERS | |
| uint16_t | get_port () const |
| Get UDP port device is listening on. More... | |
Public Member Functions inherited from LoomPublishPlat | |
| LoomPublishPlat (LoomManager *manager, const char *module_name, const LoomModule::Type module_type, const LoomModule::Type internet_type) | |
| Constructor. More... | |
| virtual | ~LoomPublishPlat ()=default |
| Destructor. More... | |
| void | second_stage_ctor () override |
| Grab the internet platform specified by the ctor parameters. More... | |
| void | package (JsonObject json) override |
| No package necessary for publishing platforms. More... | |
| bool | publish (const JsonObject json) |
| Publish data. More... | |
| uint8_t | publish_batch () |
| Publish all the packets stored in the batch. More... | |
| bool | publish () |
| Version of log for use with LoomManager. More... | |
| virtual void | print_state () const override |
| Display current state of the module. 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... | |
Protected Attributes | |
| uint16_t | UDP_port |
| Which UDP port to transmit on. More... | |
| IPAddress | remoteIP |
| Which IP address to send to. More... | |
| LoomInternetPlat::UDPPtr | UDP_Inst |
| Pointer to UDP object. More... | |
Protected Attributes inherited from LoomPublishPlat | |
| LoomInternetPlat * | m_internet |
| Pointer to internet platform to use to publish. More... | |
| LoomModule::Type | internet_type |
| Type of internet platform used to publish. 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... | |
SETTERS | |
| void | set_port (const uint16_t port) |
| Set the UDP port to send on. More... | |
| void | set_ip (const IPAddress ip) |
| Set the IP address to send to. More... | |
| void | set_ip () |
| Set the IP addres to send to by getting remote IP from MaxSub if available. More... | |
| bool | send_to_internet (const JsonObject json, LoomInternetPlat *plat) override |
| Send JSON to the internet, assumes that a valid internet plat was found and can be used. More... | |
Module taking in and translating JSON into data understood by the Google Sheets script API.
| Loom_MaxPub::Loom_MaxPub | ( | LoomManager * | manager, |
| const LoomModule::Type | internet_type | ||
| ) |
Constructor.
| [in] | internet_type | Set(LoomModule::Type) | <7001> | {7001("Ethernet"), 7002("WiFi"), 7003("LTE")} | Code of the desired internet platform. |
| Loom_MaxPub::Loom_MaxPub | ( | 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 |
|
inline |
Destructor.
|
overridevirtual |
Route command to driver.
Reimplemented from LoomModule.
|
inline |
Get UDP port device is listening on.
|
overridevirtual |
Display the configuration settings of the module.
Reimplemented from LoomPublishPlat.
|
overridevirtual |
Second stage construction.
Perform any actions that need all of the devices to be initized beforehand - such as looking up an internet platform This function is guranteed to be called AFTER all modules have been constructed.
Reimplemented from LoomModule.
|
overrideprotectedvirtual |
Send JSON to the internet, assumes that a valid internet plat was found and can be used.
| [in] | json | Json object to send |
| [in] | plat | Internet platform to send on |
Implements LoomPublishPlat.
| void Loom_MaxPub::set_ip | ( | const IPAddress | ip | ) |
Set the IP address to send to.
| [in] | ip | The IP address to set to |
| void Loom_MaxPub::set_ip | ( | ) |
Set the IP addres to send to by getting remote IP from MaxSub if available.
| void Loom_MaxPub::set_port | ( | const uint16_t | port | ) |
Set the UDP port to send on.
| [in] | port | The UDP port to send on |
|
protected |
Which IP address to send to.
|
protected |
Pointer to UDP object.
|
protected |
Which UDP port to transmit on.
1.8.11