C027_SupportTest_xively_locationで使用しているC027用ライブラリ

Fork of C027_Support by u-blox

下記のプログラムC027_SupportTest_xively_locationで使用しているC027用ライブラリです。

Import programC027_SupportTest_xively_location

インターフェース2014年10月号のu-blox C027で3G通信する記事で使用したプログラム。   CQ publishing Interface 2014.10 issue, C027 3G test program.

オリジナルのライブラリは下記を参照してください。

Import libraryC027_Support

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.

Revision:
21:c4d64830bf02
Parent:
13:e2446fcdc246
Child:
40:295099ff5338
--- a/Pipe.h	Mon Mar 24 07:38:05 2014 +0000
+++ b/Pipe.h	Tue Apr 08 09:15:37 2014 +0000
@@ -25,6 +25,17 @@
         if (_a) 
             delete [] _a;
     }
+    void dump(void)
+    {
+        int o = _r;
+        printf("pipe: %d/%d ", size(), _s);
+        while (o != _w) {
+            T t = _b[o]; 
+            printf("%0*X", sizeof(T)*2, t);
+            o = _inc(o); 
+        }
+        printf("\n");
+    }
     // writing thread
     bool writeable(void) // = not full
     {
@@ -128,10 +139,12 @@
     // the following functions are useful if you like to inspect or parse the buffer
     
     //! reset the parsing index and return the number of available elments 
-    virtual int start(void) 
+    virtual int set(int ix) 
     {
-        _o = _r; 
-        return size(); 
+        int sz = size();
+        ix = (ix > sz) ? sz : ix;
+        _o = _inc(_r, ix); 
+        return sz - ix;
     }
     //! get the next element and increment 
     virtual T next(void)