-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathA6Services.h
36 lines (33 loc) · 1.09 KB
/
A6Services.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
#ifndef A6SERVICE_H
#define A6SERVICE_H
#include "A6Modem.h"
class A6GPRS: public virtual A6GPRSDevice
{
public:
enum eCIPstatus {IP_INITIAL,IP_START,IP_CONFIG,IP_IND,IP_GPRSACT,IP_STATUS,TCPUDP_CONNECTING,IP_CLOSE,CONNECT_OK,IP_STATUS_UNKNOWN };
enum ePSstate { DETACHED,ATTACHED,PS_UNKNOWN };
A6GPRS(); // constructor
~A6GPRS(); // destructor
bool getIMEI(char[]);
bool getCIMI(char[]);
bool getRTC(char[]);
bool setRTC(char[]);
enum eCIPstatus getCIPstatus();
char *getCIPstatusString(enum eCIPstatus);
char *getCIPstatusString(); // current value
bool startIP(char []); // apn
bool startIP(char [],char[],char []); // apn, username, password
ePSstate getPSstate();
bool setPSstate(ePSstate);
bool stopIP();
bool getLocalIP(char []);
bool connectTCPserver(char*,int);
bool sendToServer(char[]);
bool sendToServer(char[],int); // for ascii strings
bool sendToServer(byte[],int); // for byte arrays
private:
eCIPstatus CIPstatus;
int cid; // only 1 per instance of class
};
extern A6GPRS gsm; // instance
#endif