14 #ifndef _POWER_CTRL_HANDLER_HPP 15 #define _POWER_CTRL_HANDLER_HPP 23 #include "mgos_mqtt.h" 32 struct mg_str* message,
45 static bool _lightIsOn;
PowerCtrlHandler(void)
Construct a new Power Ctrl Handler:: Power Ctrl Handler object intialize a power controller handler f...
Definition: power_ctrl_handler.cpp:38
header file for event handler utils
HandlerError handleRequest(struct mg_connection *mgCon, struct mg_str *message, char *commandName, char *response)
implement the handle request function for the power control endpoint for the bedroom light controller...
Definition: power_ctrl_handler.cpp:54
static bool getLightStatus(void)
retrieve the status of the bed room lgiht
Definition: power_ctrl_handler.cpp:108
HandlerError handleReport(char *stateReport)
write a state report for the powercontroller endpoint to the given buffer
Definition: power_ctrl_handler.cpp:116
power controller class for the bed room light controller, responsible for handling an requests pertai...
Definition: power_ctrl_handler.hpp:29
contain class declaration for the ParentHandler class
HandlerError
enum defining errors that the system(including master handler and other child handler) may have ...
Definition: event_handler_util.hpp:37
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
static void setLightStatus(bool lightStatus)
set the light status variable
Definition: power_ctrl_handler.cpp:99