-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSMSMonitor.h
More file actions
32 lines (26 loc) · 722 Bytes
/
Copy pathSMSMonitor.h
File metadata and controls
32 lines (26 loc) · 722 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <Arduino.h>
#include "SerialGSM.h"
class SMSMonitor {
public:
/*
* Checks GSM modem for any sms
*/
bool hasSMS();
/*
* Get next sms
* if hasSMS succeed.
* Otherwise will blank the given array or previous sms is returned
*/
void getSMS(char msg[160]);
/*
* Creates an instance of SMSMonitor
* and instantiate the SerialGSM interface
* rx_pin -> SIM900A TTL rx_pin
* tx_pin -> SIM900A TTL tx_pin
*/
SMSMonitor(SerialGSM &serial_gsm_ref);
private:
SerialGSM serial_gsm;
SerialGSM::SMS sms_buffer;
bool buffer_not_empty;
};