a library to use GPRS like ethernet or wifi, which makes it possible to connect to the internet with your GPRS module

Dependencies:   BufferedSerial

Dependents:   ThinkSpeak_Test roam_v1 roam_v2 finalv3

Fork of GPRSInterface by wei zou

Revision:
1:7298a7950f65
Parent:
0:8ccbd963e74d
Child:
13:379ce1d51b88
diff -r 8ccbd963e74d -r 7298a7950f65 GPRS/GPRS.h
--- a/GPRS/GPRS.h	Tue Feb 25 02:52:48 2014 +0000
+++ b/GPRS/GPRS.h	Tue Feb 25 05:56:19 2014 +0000
@@ -49,6 +49,12 @@
      */
     GPRS(PinName tx, PinName rx, int baudRate, const char* apn, const char* userName = NULL, const char *passWord = NULL);
 
+    /** get instance of GPRS class
+     */
+    static GPRS* getInstance() {
+        return inst;
+    };
+
     /**	Connect the GPRS module to the network.
      * 	@return true if connected, false otherwise
      */
@@ -58,6 +64,11 @@
      * 	@returns true if successful
      */
     bool disconnect(void);
+    
+    /** Close a tcp connection
+     * 	@returns true if successful
+     */
+    bool close(int socket);
 
     /** Open a tcp/udp connection with the specified host on the specified port
      * 	@param socket an endpoint of an inter-process communication flow of GPRS module,for SIM900 module, it is in [0,6]
@@ -102,11 +113,6 @@
      */
     bool is_connected(int socket);
 
-    /** Close a tcp connection
-     * 	@returns true if successful
-     */
-    bool close(int socket);
-
     /** send data to socket
      *	@param socket socket
      *	@param str string to be sent
@@ -130,12 +136,6 @@
      */
     bool gethostbyname(const char* host, uint32_t* ip);
 
-    /** get instance of GPRS class
-     */
-    static GPRS* getInstance() {
-        return inst;
-    };
-
     int new_socket();
     uint16_t new_port();
     uint32_t _ip;