Reorder some functions

This commit is contained in:
Sara Damiano
2020-02-11 11:08:03 -05:00
parent 06c31aa856
commit 41531c339b
14 changed files with 317 additions and 283 deletions

View File

@@ -217,19 +217,6 @@ class TinyGsmM95
return waitResponse() == 1;
}
/*
* SIM card functions
*/
protected:
String getSimCCIDImpl() {
sendAT(GF("+QCCID"));
if (waitResponse(GF(GSM_NL "+QCCID:")) != 1) { return ""; }
String res = stream.readStringUntil('\n');
waitResponse();
res.trim();
return res;
}
/*
* Generic network functions
*/
@@ -254,6 +241,18 @@ class TinyGsmM95
waitResponse();
}
/*
* IP Address functions
*/
protected:
String getLocalIPImpl() {
sendAT(GF("+QILOCIP"));
streamSkipUntil('\n');
String res = stream.readStringUntil('\n');
res.trim();
return res;
}
/*
* GPRS functions
*/
@@ -334,13 +333,16 @@ class TinyGsmM95
}
/*
* IP Address functions
* SIM card functions
*/
protected:
String getLocalIPImpl() {
sendAT(GF("+QILOCIP"));
streamSkipUntil('\n');
String getSimCCIDImpl() {
sendAT(GF("+QCCID"));
if (waitResponse(GF(GSM_NL "+QCCID:")) != 1) {
return "";
}
String res = stream.readStringUntil('\n');
waitResponse();
res.trim();
return res;
}