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

Embed: (wiki syntax)

« Back to documentation index

GprsHandler Class Reference

The GprsHandler class saves recipients and looks after incoming and outgoing messages. More...

#include <GprsHandler.h>

Inherits AbstractHandler.

Public Types

enum  request_t { gprsreq_GprsNone, gprsreq_SmsSend, gprsreq_SetRecipients }

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

MyTimersm_timer
 Handler classes use timers to pause in the state machine, and continue after delay has finished.

Detailed Description

The GprsHandler class saves recipients and looks after incoming and outgoing messages.

Options: save recipients internally to this class. Or - request sends a struct that includes recipients list and message string

Definition at line 34 of file GprsHandler.h.


Member Enumeration Documentation

enum request_t
Enumerator:
gprsreq_GprsNone 

No request (for tracking what the last request was, this is initial value for that)

gprsreq_SmsSend 

got a string to send to recipient(s)

gprsreq_SetRecipients 

got a string holding the number(s) we want to send

Definition at line 44 of file GprsHandler.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 50 of file GprsHandler.cpp.

void setRequest ( int  request,
void *  data = 0 
) [virtual]

setRequest sets a request that the handler will complete when it is able to

Parameters:
requestunique to the reimplemented class (an enum) that will be completed in the state machine
messagean optional array of information relevant to the request

Implements AbstractHandler.

Definition at line 245 of file GprsHandler.cpp.


Field Documentation

MyTimers* m_timer [protected, inherited]

Handler classes use timers to pause in the state machine, and continue after delay has finished.

Definition at line 31 of file AbstractHandler.h.