14 #ifndef _MASTER_HANDLER_HPP 15 #define _MASTER_HANDLER_HPP 22 #include "mgos_mqtt.h" 27 #define MAX_PAYLOAD_SIZE 150 31 #define MAX_RESPONSE_LEN 1500 34 struct mg_str * payload,
37 void handleAllReq(
struct mg_connection *mgCon,
int eventType,
void *rawMessage,
void *user_data);
header file for event handler utils
void handleAllReq(struct mg_connection *mgCon, int eventType, void *rawMessage, void *user_data)
The entry point of all events, when an mcu receives an event, whether it's a request from aws or just...
Definition: master_handler.cpp:52
void handlePolling(struct mg_connection *mgCon, ParentHandler *handlerList[], char *jsonBuf)
dummy empty function since bed room light controller has no polling need
Definition: polling_function.cpp:30
contain class declaration for the ParentHandler class
the parent handler class that is the blueprint for other child handlers to implement, it also defines a couple functions that child handler can use
Definition: parent_handler.hpp:31
void handleAwsRequest(struct mg_connection *mgCon, struct mg_str *payload, char *jsonBuf, ParentHandler *_handlerList[])
function used for finding the appropriate handler and hands the request to them or create error messa...
Definition: master_handler.cpp:105