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:
54:7ba8e4c218e2
Parent:
52:8071747a7cb3
Child:
57:869bd35f44cc
--- a/MDM.h	Mon May 12 07:39:29 2014 +0000
+++ b/MDM.h	Mon May 12 13:00:27 2014 +0000
@@ -56,8 +56,11 @@
         Reg reg;        //!< Registration Status
         AcT act;        //!< Access Technology
         int rssi;       //!< Received Signal Strength Indication (in dBm, range -113..-53)
+        int ber;        //!< Bit Error Rate (BER), see 3GPP TS 45.008 [20] subclause 8.2.4
         char opr[16+1]; //!< Operator Name
         char num[32];   //!< Mobile Directory Number
+        unsigned short lac;  //!< location area code in hexadecimal format (2 bytes in hex)
+        unsigned int ci;     //!< Cell ID in hexadecimal format (2 to 4 bytes in hex)
     } NetStatus;
     //! An IP v4 address
     typedef uint32_t IP;
@@ -258,6 +261,28 @@
     bool ussdCommand(const char* cmd, char* buf);
     
     // ----------------------------------------------------------------
+    // DUMP status to standard out (printf)
+    // ----------------------------------------------------------------
+    
+    /** dump the device status to stdout using printf
+        \param status the status to convert to textual form, 
+               unavailable fields are ommited (not printed)
+    */
+    static void dumpDevStatus(MDMParser::DevStatus *status);
+
+    /** dump the network status to stdout using printf
+        \param status the status to convert to textual form, 
+               unavailable fields are ommited (not printed)
+    */
+    static void dumpNetStatus(MDMParser::NetStatus *status);
+
+    /** dump the ip address to stdout using printf
+        \param ip the ip to convert to textual form, 
+               unavailable fields are ommited (not printed)
+    */
+    static void dumpIp(MDMParser::IP ip);
+    
+    // ----------------------------------------------------------------
     // Parseing
     // ----------------------------------------------------------------
     
@@ -391,7 +416,7 @@
     static int _cbCPIN(int type, const char* buf, int len, Sim* sim);
     static int _cbCCID(int type, const char* buf, int len, char* ccid);
     // network 
-    static int _cbCSQ(int type, const char* buf, int len, int* rssi);
+    static int _cbCSQ(int type, const char* buf, int len, NetStatus* status);
     static int _cbCOPS(int type, const char* buf, int len, NetStatus* status);
     static int _cbCNUM(int type, const char* buf, int len, char* num);
     static int _cbCGATT(int type, const char* buf, int len, int* state);