I added functionality to get the RSSI, BER, and Cell Neighbor for reporting connection issues to M2X

Dependencies:   WncControllerK64F

Revision:
9:9f0578ff157a
Parent:
7:fded23f50479
diff -r 4b38bfb1704d -r 9f0578ff157a Sms/IOTSMS.cpp
--- a/Sms/IOTSMS.cpp	Fri Oct 07 00:36:47 2016 +0000
+++ b/Sms/IOTSMS.cpp	Fri Oct 07 13:26:00 2016 +0000
@@ -52,8 +52,7 @@
   //not completing our tasks wihin the timeperiod.  So stop the timer when
   //we come in and start it when we leave.
   //
-  if( WNCInterface::_pwnc->getWncStatus() == FATAL_FLAG )
-    FATAL_WNC_ERROR(void);
+  CHK_WNCFE(( WNCInterface::_pwnc->getWncStatus() == FATAL_FLAG ), void);
     
   m_SMStimer->stop();  //stop the timer while we check for SMS messages
   M_LOCK;       
@@ -87,8 +86,7 @@
 //
 int WNCSms::init(uint32_t p, void (*cb)(WNCSmsMsg& s)) {
 
-  if( WNCInterface::_pwnc->getWncStatus() == FATAL_FLAG )
-    FATAL_WNC_ERROR(fail);
+  CHK_WNCFE(( WNCInterface::_pwnc->getWncStatus() == FATAL_FLAG ), fail);
   
   if( WNCInterface::_pwnc == NULL )  //must have already initialized WNCInterface
     return -1;
@@ -139,8 +137,7 @@
   if( !m_smsinit )
     return -1;
 
-  if( WNCInterface::_pwnc->getWncStatus() == FATAL_FLAG )
-    FATAL_WNC_ERROR(fail);
+  CHK_WNCFE(( WNCInterface::_pwnc->getWncStatus() == FATAL_FLAG ), fail);
   M_LOCK;
   int ret = WNCInterface::_pwnc->readUnreadSMSText(&m_smsmsgs, true);
   M_ULOCK;
@@ -153,19 +150,14 @@
     string iccid_str;
     static string msisdn_str;
     
-    if( WNCInterface::_pwnc->getWncStatus() == FATAL_FLAG )
-      FATAL_WNC_ERROR(null);
-
+    CHK_WNCFE(( WNCInterface::_pwnc->getWncStatus() == FATAL_FLAG ), null);
     M_LOCK;
     if( !WNCInterface::_pwnc->getICCID(&iccid_str) ) {
        M_ULOCK;
        return NULL;
        }
       
-    if( WNCInterface::_pwnc->getWncStatus() == FATAL_FLAG ) {
-       M_ULOCK;
-       FATAL_WNC_ERROR(null);
-       }
+    CHK_WNCFE(( WNCInterface::_pwnc->getWncStatus() == FATAL_FLAG ), null);
 
     if( WNCInterface::_pwnc->convertICCIDtoMSISDN(iccid_str, &msisdn_str) )
         ret = (char*)msisdn_str.c_str();