support library for C027 helper functions for Buffer Pipes, Buffered Serial Port (rtos capable) and GPS parsing. It includes modem APIs for USSD, SMS and Sockets.

Dependents:   HTTPClient_Cellular_HelloWorld Cellular_HelloMQTT MbedSmartRestMain Car_Bon_car_module ... more

This library is intended to be used with u-blox products such as the C027 or a shield with u-blox cellular and GPS modules like the cellular and positioning shield from Embedded Artist.

For 2G/GSM and 3G/UMTS you need to:

  • have a SIM card and know its PIN number
  • need to know you network operators APN setting These setting should be passed to the connect or init and join functions. You can also extend the APN database in MDMAPN.h.

For CDMA products you need to make sure that you have provisioned and activated the modem with either Sprint or Verizon.

Files at this revision

API Documentation at this revision

Comitter:
mazgch
Date:
Sat Nov 02 16:08:20 2013 +0000
Parent:
4:c959dd4c5fe8
Child:
6:775aef3f1d1f
Commit message:
allow to pass buffer

Changed in this revision

Pipe.h Show annotated file Show diff for this revision Revisions of this file
--- a/Pipe.h	Fri Oct 25 17:50:17 2013 +0000
+++ b/Pipe.h	Sat Nov 02 16:08:20 2013 +0000
@@ -12,17 +12,18 @@
         return i;
     }
 public:
-    Pipe(int n)
+    Pipe(int n, T* p = NULL)
     {
+        a = p ? NULL : new T[n];
         r = 0;
         w = 0;
-        n ++; // we add one more element to be able to identify empty from full
-        b = new T[n];
+        b = p ? p : a;
         s = n;
     }    
     virtual ~Pipe()
     {
-        delete [] b;
+        if (a) 
+            delete [] a;
     }
     // writing thread
     bool writeable(void) // = not full
@@ -123,6 +124,7 @@
 private:
     // buffer
     T*            b; //!< buffer
+    T*            a; //!< allocated buffer
     int           s; //!< size of buffer (s - 1) elements can be stored
     volatile int  w; //! write index 
     volatile int  r; //! read index