|
EnigmaIOT
0.9.8
Secure sensor and gateway platform based on ESP8266 and ESP32
|
#include <EnigmaIOTjsonController.h>
Public Member Functions | |
| virtual void | setup (EnigmaIOTNodeClass *node, void *config=NULL)=0 |
| Initialize data structures. More... | |
| virtual void | loop ()=0 |
| This should be called periodically for module handling. More... | |
| virtual bool | processRxCommand (const uint8_t *mac, const uint8_t *buffer, uint8_t length, nodeMessageType_t command, nodePayloadEncoding_t payloadEncoding)=0 |
| Called to process a downlink command. More... | |
| void | sendDataCallback (sendData_cb cb) |
| Register send data callback to run when module needs to send a message. More... | |
| virtual void | connectInform () |
| Used to notify controller that it is registered on EnigmaIOT network. More... | |
| virtual void | disconnectInform (nodeInvalidateReason_t reason) |
| Used to notify controller that it is unregistered on EnigmaIOT network. More... | |
| virtual void | configManagerStart ()=0 |
| Called when wifi manager starts config portal. More... | |
| virtual void | configManagerExit (bool status)=0 |
| Called when wifi manager exits config portal. More... | |
| virtual bool | loadConfig ()=0 |
| Loads output module configuration. More... | |
Protected Member Functions | |
| virtual bool | sendCommandResp (const char *command, bool result)=0 |
| Sends command processing response acknowledge. More... | |
| virtual bool | sendStartAnouncement ()=0 |
| Send a message to notify node has started running. More... | |
| virtual bool | saveConfig ()=0 |
| Saves output module configuration. More... | |
| bool | sendJson (DynamicJsonDocument &json) |
| Sends a JSON encoded message to lower layer. More... | |
Protected Attributes | |
| sendData_cb | sendData |
| EnigmaIOTNodeClass * | enigmaIotNode |
Definition at line 34 of file EnigmaIOTjsonController.h.
|
pure virtual |
Called when wifi manager exits config portal.
| status | true if configuration was successful |
Implemented in CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, and CONTROLLER_CLASS_NAME.
|
pure virtual |
Called when wifi manager starts config portal.
Implemented in CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, and CONTROLLER_CLASS_NAME.
|
inlinevirtual |
Used to notify controller that it is registered on EnigmaIOT network.
Reimplemented in CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, and CONTROLLER_CLASS_NAME.
Definition at line 81 of file EnigmaIOTjsonController.h.
|
inlinevirtual |
Used to notify controller that it is unregistered on EnigmaIOT network.
Definition at line 97 of file EnigmaIOTjsonController.h.
|
pure virtual |
Loads output module configuration.
true if load was successful. false otherwise Implemented in CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, and CONTROLLER_CLASS_NAME.
|
pure virtual |
This should be called periodically for module handling.
Implemented in CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, and CONTROLLER_CLASS_NAME.
|
pure virtual |
Called to process a downlink command.
| mac | Address of sender |
| buffer | Message bytes |
| length | Message length |
| command | Type of command. nodeMessageType_t |
| payloadEncoding | Payload encoding of type nodePayloadEncoding_t |
true on success Implemented in CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, and CONTROLLER_CLASS_NAME.
|
protectedpure virtual |
Saves output module configuration.
true if save was successful. false otherwise Implemented in CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, and CONTROLLER_CLASS_NAME.
|
protectedpure virtual |
Sends command processing response acknowledge.
| command | Command name |
| result | Command execution success |
true if message sending was successful. false otherwise Implemented in CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, and CONTROLLER_CLASS_NAME.
|
inline |
Register send data callback to run when module needs to send a message.
| cb | Callback with sendData_cb format |
Definition at line 74 of file EnigmaIOTjsonController.h.
|
inlineprotected |
Sends a JSON encoded message to lower layer.
true if message sending was successful. false otherwise Definition at line 170 of file EnigmaIOTjsonController.h.
|
protectedpure virtual |
Send a message to notify node has started running.
true if message sending was successful. false otherwise Implemented in CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, and CONTROLLER_CLASS_NAME.
|
pure virtual |
Initialize data structures.
| node | Pointer to EnigmaIOT node instance |
| config | Pointer to configuration structure. If it is NULL then it tries to load configuration from flash |
Implemented in CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, CONTROLLER_CLASS_NAME, and CONTROLLER_CLASS_NAME.
|
protected |
Definition at line 37 of file EnigmaIOTjsonController.h.
|
protected |
Definition at line 36 of file EnigmaIOTjsonController.h.