![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Own fork of MbedSmartRestMain
Dependencies: C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed
Fork of MbedSmartRestMain by
DeviceInfo.cpp
- Committer:
- xinlei
- Date:
- 2016-08-08
- Revision:
- 138:f8ab852e83e7
- Parent:
- 116:5de54f09f754
File content as of revision 138:f8ab852e83e7:
#include <string.h> #include "DeviceInfo.h" #include "logging.h" extern MDMSerial *pMdm; const char * DeviceInfo::cellId() { if (!pMdm->checkNetStatus(&_netStatus)) { return NULL; } if (snprintf(_cellId, sizeof(_cellId), "%X", _netStatus.ci) < 1) return NULL; return _cellId; } DeviceInfo::SignalQuality* DeviceInfo::signalQuality(bool realTime) { if (!realTime && _signalQuality.rssi) return &_signalQuality; memset(&_signalQuality, 0, sizeof(DeviceInfo::SignalQuality)); if (!pMdm->checkNetStatus(&_netStatus)) { aError("Check network status!\n"); return NULL; } _signalQuality.rssi = _netStatus.rssi; _signalQuality.ber = _netStatus.ber; return &_signalQuality; }