A simple WIP that logs data from a Grove sensor, and can send and receive information over USB and SMS.
Dependencies: DHT DS_1337 SDFileSystem USBDevice mbed
AbstractHandler Class Reference
The AbstractHandler class is inherited by all handlers. It forms the basis of any handler, by having a simple run function, called in main.cpp, and a setRequest function which is used to set a request specific to the reimplemented class. More...
#include <AbstractHandler.h>
Inherited by GprsHandler, GroveDht22, MeasurementHandler, SdHandler, and UsbComms.
Public Member Functions | |
virtual void | run ()=0 |
run is inherited by each Handler class. It is called from the main while loop in main.cpp. It runs through the state machine, specific to each Handler class. | |
virtual void | setRequest (int request, void *data=0)=0 |
setRequest sets a request that the handler will complete when it is able to | |
Protected Attributes | |
MyTimers * | m_timer |
Handler classes use timers to pause in the state machine, and continue after delay has finished. |
Detailed Description
The AbstractHandler class is inherited by all handlers. It forms the basis of any handler, by having a simple run function, called in main.cpp, and a setRequest function which is used to set a request specific to the reimplemented class.
Definition at line 11 of file AbstractHandler.h.
Member Function Documentation
virtual void run | ( | ) | [pure virtual] |
run is inherited by each Handler class. It is called from the main while loop in main.cpp. It runs through the state machine, specific to each Handler class.
Implemented in GprsHandler, GroveDht22, MeasurementHandler, SdHandler, and UsbComms.
virtual void setRequest | ( | int | request, |
void * | data = 0 |
||
) | [pure virtual] |
setRequest sets a request that the handler will complete when it is able to
- Parameters:
-
request unique to the reimplemented class (an enum) that will be completed in the state machine message an optional array of information relevant to the request
Implemented in GprsHandler, GroveDht22, MeasurementHandler, SdHandler, and UsbComms.
Field Documentation
Handler classes use timers to pause in the state machine, and continue after delay has finished.
Definition at line 31 of file AbstractHandler.h.
Generated on Tue Jul 12 2022 23:07:44 by 1.7.2