-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
GSMLOC.h
42 lines (35 loc) · 830 Bytes
/
GSMLOC.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
#ifndef GSMLOC_h
#define GSMLOC_h
#include <Arduino.h>
#include "DTE.h"
#include "IP.h"
struct LocationTime {
unsigned int locationCode;
char longitude[12];
char latitude[12];
char date[11];
char time[9];
};
class GSMLOC {
private:
DTE *dte;
IP *ip;
struct LocationTime locationTime;
public:
GSMLOC(DTE &dte, IP &ip);
/**
* Command AT+GSMLOC=
* @param type Type of command
* 1: View location, latitude, and time
* 2: View time
* @param cid Context Identifier, See IP Class, default 1
* @return true: If successful, false: Otherwise
*/
bool atGSMLocationAndTime(unsigned char type, unsigned char cid = 1);
/**
* getLocationTime
* @return LocationTime Struct
*/
struct LocationTime getLocationTime(unsigned char cid = 1);
};
#endif