Browse Source

Add function stubs

v_master
Volodymyr Shymanskyy 7 years ago
parent
commit
4dc0d71687
1 changed files with 12 additions and 1 deletions
  1. +12
    -1
      TinyGsmClientM590.h

+ 12
- 1
TinyGsmClientM590.h View File

@ -149,6 +149,13 @@ public:
return sock_connected; return sock_connected;
} }
virtual operator bool() { return connected(); } virtual operator bool() { return connected(); }
/*
* Extended API
*/
String remoteIP() TINY_GSM_ATTR_NOT_IMPLEMENTED;
private: private:
TinyGsm* at; TinyGsm* at;
uint8_t mux; uint8_t mux;
@ -435,6 +442,10 @@ public:
* Battery functions * Battery functions
*/ */
uint16_t getBattVoltage() TINY_GSM_ATTR_NOT_AVAILABLE;
int getBattPercent() TINY_GSM_ATTR_NOT_AVAILABLE;
private: private:
int modemConnect(const char* host, uint16_t port, uint8_t mux) { int modemConnect(const char* host, uint16_t port, uint8_t mux) {
@ -570,12 +581,12 @@ public:
sockets[mux]->rx.put(stream.read()); sockets[mux]->rx.put(stream.read());
} }
data = ""; data = "";
return index;
} else if (data.endsWith(GF("+TCPCLOSE:"))) { } else if (data.endsWith(GF("+TCPCLOSE:"))) {
int mux = stream.readStringUntil(',').toInt(); int mux = stream.readStringUntil(',').toInt();
stream.readStringUntil('\n'); stream.readStringUntil('\n');
sockets[mux]->sock_connected = false; sockets[mux]->sock_connected = false;
data = ""; data = "";
DBG("### Closed: ", mux);
} }
} }
} while (millis() - startMillis < timeout); } while (millis() - startMillis < timeout);


Loading…
Cancel
Save