I added functionality to get the RSSI, BER, and Cell Neighbor for reporting connection issues to M2X
Dependencies: WncControllerK64F
Diff: WNCInterface.cpp
- Revision:
- 9:9f0578ff157a
- Parent:
- 8:4b38bfb1704d
- Child:
- 25:52bad4105cac
diff -r 4b38bfb1704d -r 9f0578ff157a WNCInterface.cpp --- a/WNCInterface.cpp Fri Oct 07 00:36:47 2016 +0000 +++ b/WNCInterface.cpp Fri Oct 07 13:26:00 2016 +0000 @@ -135,8 +135,7 @@ char * WNCInterface::getIPAddress() { M_LOCK; if ( _pwnc->getWncNetworkingStats(&myNetStats) ) { - if( WNCInterface::_pwnc->getWncStatus() == FATAL_FLAG ) - FATAL_WNC_ERROR(null); + CHK_WNCFE(( WNCInterface::_pwnc->getWncStatus() == FATAL_FLAG ), null); M_ULOCK; return &myNetStats.ip[0]; } @@ -150,8 +149,7 @@ char * WNCInterface::getGateway() { M_LOCK; if ( _pwnc->getWncNetworkingStats(&myNetStats) ) { - if( WNCInterface::_pwnc->getWncStatus() == FATAL_FLAG ) - FATAL_WNC_ERROR(null); + CHK_WNCFE(( WNCInterface::_pwnc->getWncStatus() == FATAL_FLAG ), null); M_ULOCK; return &WNCInterface::myNetStats.gateway[0]; } @@ -165,8 +163,7 @@ char * WNCInterface::getNetworkMask() { M_LOCK; if ( _pwnc->getWncNetworkingStats(&myNetStats) ) { - if( WNCInterface::_pwnc->getWncStatus() == FATAL_FLAG ) - FATAL_WNC_ERROR(null); + CHK_WNCFE(( WNCInterface::_pwnc->getWncStatus() == FATAL_FLAG ), null); M_ULOCK; return &WNCInterface::myNetStats.mask[0]; } @@ -182,8 +179,7 @@ M_LOCK; if( _pwnc->getICCID(&str) ) { - if( WNCInterface::_pwnc->getWncStatus() == FATAL_FLAG ) - FATAL_WNC_ERROR(null); + CHK_WNCFE(( WNCInterface::_pwnc->getWncStatus() == FATAL_FLAG ), null); mac = str.substr(3,20); mac[2]=mac[5]=mac[8]=mac[11]=mac[14]=':'; M_ULOCK;