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
SdHandler Class Reference
The SdHandler class writes messages to file and handles SD card status. More...
#include <SdHandler.h>
Inherits AbstractHandler.
Public Types | |
enum | request_t { sdreq_SdNone, sdreq_LogData, sdreq_LogSystem } |
Public Member Functions | |
void | run () |
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. | |
void | setRequest (int request, void *data=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 SdHandler class writes messages to file and handles SD card status.
A data CSV file is written with timestamps and the result from the GroveDht22. A system log, not yet fully implemented, tracks system events for debugging purposes.
Definition at line 15 of file SdHandler.h.
Member Enumeration Documentation
enum request_t |
- Enumerator:
Definition at line 27 of file SdHandler.h.
Member Function Documentation
void run | ( | ) | [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.
Implements AbstractHandler.
Definition at line 41 of file SdHandler.cpp.
void setRequest | ( | int | request, |
void * | data = 0 |
||
) | [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
Implements AbstractHandler.
Definition at line 147 of file SdHandler.cpp.
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