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

@@ -281,20 +281,6 @@ class TinyGsmSaraR4 : public TinyGsmModem<TinyGsmSaraR4, READ_AND_CHECK_SIZE,
bool sleepEnableImpl(bool enable = true) TINY_GSM_ATTR_NOT_AVAILABLE;
/*
* SIM card functions
*/
protected:
// This uses "CGSN" instead of "GSN"
String getIMEIImpl() {
sendAT(GF("+CGSN"));
if (waitResponse(GF(GSM_NL)) != 1) { return ""; }
String res = stream.readStringUntil('\n');
waitResponse();
res.trim();
return res;
}
/*
* Generic network functions
*/
@@ -341,6 +327,12 @@ class TinyGsmSaraR4 : public TinyGsmModem<TinyGsmSaraR4, READ_AND_CHECK_SIZE,
return restart();
}
/*
* IP Address functions
*/
protected:
// Can follow the template in all function
/*
* GPRS functions
*/
@@ -393,10 +385,20 @@ class TinyGsmSaraR4 : public TinyGsmModem<TinyGsmSaraR4, READ_AND_CHECK_SIZE,
}
/*
* IP Address functions
* SIM card functions
*/
protected:
// Can follow the template in all function
// This uses "CGSN" instead of "GSN"
String getIMEIImpl() {
sendAT(GF("+CGSN"));
if (waitResponse(GF(GSM_NL)) != 1) {
return "";
}
String res = stream.readStringUntil('\n');
waitResponse();
res.trim();
return res;
}
/*
* Phone Call functions