Added virtual master class

This commit is contained in:
Sara Damiano
2018-09-07 18:15:42 -04:00
parent fc9922904d
commit 56dca5185b
10 changed files with 149 additions and 79 deletions

View File

@@ -39,7 +39,7 @@ enum RegStatus {
class TinyGsmESP8266
class TinyGsmESP8266 : public TinyGsmMasterModem
{
public:
@@ -198,7 +198,7 @@ public:
#else
TinyGsmESP8266(Stream& stream)
#endif
: stream(stream)
: TinyGsmMasterModem(stream), stream(stream)
{
memset(sockets, 0, sizeof(sockets));
}
@@ -366,6 +366,10 @@ public:
return retVal;
}
/*
* IP Address functions
*/
String getLocalIP() {
sendAT(GF("+CIPSTA_CUR??"));
int res1 = waitResponse(GF("ERROR"), GF("+CWJAP_CUR:"));
@@ -377,10 +381,6 @@ public:
return res2;
}
IPAddress localIP() {
return TinyGsmIpFromString(getLocalIP());
}
/*
* GPRS functions
*/