Own fork of MbedSmartRestMain
Dependencies: C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed
Fork of MbedSmartRestMain by
Diff: DeviceInfo.h
- Revision:
- 41:804f6a0bda26
- Child:
- 77:f6717e4eccc4
diff -r 13c24225f189 -r 804f6a0bda26 DeviceInfo.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/DeviceInfo.h Tue Jul 15 12:44:34 2014 +0000 @@ -0,0 +1,35 @@ +#ifndef DEVICEINFO_H +#define DEVICEINFO_H + +#include <stddef.h> +#include <stdint.h> +#include "MDM.h" + +class DeviceInfo +{ +public: + DeviceInfo(MDMSerial& mdm, MDMParser::DevStatus& devStatus); + + typedef struct { + int rssi; // RSSI in dBm + int ber; // BER in % + } SignalQuality; + + const char * imsi(); + const char * imei(); + const char * cellId(); + const char * iccid(); + SignalQuality * signalQuality(); + +protected: + bool refreshNetStatus(); + +private: + MDMSerial& _mdm; + MDMParser::DevStatus _devStatus; + MDMParser::NetStatus _netStatus; + char _cellId[9]; + SignalQuality _signalQuality; +}; + +#endif \ No newline at end of file