AWS IoT Firmware
Firmware code for AWS IoT Devices
|
power controller class for the bed room light controller, responsible for handling an requests pertaining to the power controller namespace More...
#include <power_ctrl_handler.hpp>
Public Member Functions | |
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 More... | |
HandlerError | handleReport (char *stateReport) |
write a state report for the powercontroller endpoint to the given buffer More... | |
PowerCtrlHandler (void) | |
Construct a new Power Ctrl Handler:: Power Ctrl Handler object intialize a power controller handler for the bed room light controller. | |
HandlerError | handleRequest (struct mg_connection *mgCon, struct mg_str *message, char *commandName, char *response) |
HandlerError | handleReport (char *stateReport) |
Public Member Functions inherited from ParentHandler | |
HandlerError | createReport (char *report, const char *fmt, uint8_t totalArg,...) |
used for generating a json report string based on the format given, usually child handler uses this to prepare replies to the aws lambda server More... | |
bool | canHandleRequest (char *requestNameSpace) |
used to check if a handler object can handle a request with a specific namespace More... | |
char * | getNameSpace (void) |
return the command namespace that the handler support More... | |
Static Public Member Functions | |
static void | setLightStatus (bool lightStatus) |
set the light status variable More... | |
static bool | getLightStatus (void) |
retrieve the status of the bed room lgiht More... | |
static void | buttonInterruptHandler (int pin, void *arg) |
handle the case power on switch interrupt More... | |
static void | setPcStatus (bool pcStatus) |
setter for the pc status variable More... | |
static bool | getPcStatus (void) |
used to get whether the pc is on or off More... | |
Additional Inherited Members | |
Protected Attributes inherited from ParentHandler | |
char | _nameSpace [MAX_NAMESPACE_LEN] |
namespace that the handler supports, all child classes must initialize this variable to let the master handler know which namespace it supports | |
power controller class for the bed room light controller, responsible for handling an requests pertaining to the power controller namespace
the power controller class responsible for handling power controller endpoint functionalities for the pc controller