forked from arduinocamp/gsm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTeltonikaTM1Q.h
65 lines (55 loc) · 2.03 KB
/
TeltonikaTM1Q.h
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/**
* Copyright (C) 2011 Madefree Electronics <[email protected]>
* Daniele Sdei, Marco Antonini
* http://www.madefree.eu
*
* This file is part of BeeGSM.
*
* BeeGSM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* BeeGSM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with BeeGSM. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TELTONIKATM1Q_H
#define TELTONIKATM1Q_H
#if defined(ARDUINO) && ARDUINO >= 100
#include <SoftwareSerial.h>
#else
#include <NewSoftSerial.h>
#endif
#include "GSM.h"
class TeltonikaTM1Q : public virtual GSM
{
private:
int configandwait(char* pin);
int setPIN(char *pin);
public:
TeltonikaTM1Q();
~TeltonikaTM1Q();
void debug(boolean value);
int start(char* pin=0);
int restart(char* pin=0);
int shutdown();
int getCCI(char* cci);
int getIMEI(char* imei);
int sendSMS(const char* to, const char* msg);
boolean readSMS(char* msg, int msglength, char* number, int nlength);
boolean readCall(char* number, int nlength);
boolean call(char* number, unsigned int milliseconds);
boolean readCallAuthPhoneBook(char* number, int nlength,boolean &auth);
boolean readSMSAuthPhoneBook(char* msg, int msglength, char* number, int nlength,boolean &auth);
int readPhoneBook(int index, char* number, char* text);
int findPhoneBook(char* findtext, int &index, char* number, char* text);
int writePhoneBook(char* number, char* text);
int readCellData(int &mcc, int &mnc, long &lac, long &cellid);
};
extern TeltonikaTM1Q gsm;
#endif