Official reference client implementation for Cumulocity SmartREST on u-blox C027.
Dependencies: C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed
Fork of MbedSmartRestMain by
DeviceInfo.h@97:ea056f6be2e8, 2015-04-27 (annotated)
- Committer:
- xinlei
- Date:
- Mon Apr 27 13:02:50 2015 +0000
- Revision:
- 97:ea056f6be2e8
- Parent:
- 77:f6717e4eccc4
- Child:
- 108:f1ee3e1eb126
MDMSerial now singleton
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Cumulocity | 41:804f6a0bda26 | 1 | #ifndef DEVICEINFO_H |
Cumulocity | 41:804f6a0bda26 | 2 | #define DEVICEINFO_H |
Cumulocity | 41:804f6a0bda26 | 3 | |
Cumulocity | 41:804f6a0bda26 | 4 | #include "MDM.h" |
Cumulocity | 41:804f6a0bda26 | 5 | |
Cumulocity | 41:804f6a0bda26 | 6 | class DeviceInfo |
Cumulocity | 41:804f6a0bda26 | 7 | { |
Cumulocity | 41:804f6a0bda26 | 8 | public: |
xinlei | 97:ea056f6be2e8 | 9 | DeviceInfo(MDMParser::DevStatus& devStatus); |
Cumulocity | 41:804f6a0bda26 | 10 | |
Cumulocity | 41:804f6a0bda26 | 11 | typedef struct { |
Cumulocity | 41:804f6a0bda26 | 12 | int rssi; // RSSI in dBm |
Cumulocity | 41:804f6a0bda26 | 13 | int ber; // BER in % |
Cumulocity | 41:804f6a0bda26 | 14 | } SignalQuality; |
Cumulocity | 41:804f6a0bda26 | 15 | |
Cumulocity | 41:804f6a0bda26 | 16 | const char * imsi(); |
Cumulocity | 41:804f6a0bda26 | 17 | const char * imei(); |
Cumulocity | 41:804f6a0bda26 | 18 | const char * cellId(); |
Cumulocity | 41:804f6a0bda26 | 19 | const char * iccid(); |
xinlei | 77:f6717e4eccc4 | 20 | SignalQuality * signalQuality(bool realTime=true); |
Cumulocity | 41:804f6a0bda26 | 21 | |
Cumulocity | 41:804f6a0bda26 | 22 | protected: |
Cumulocity | 41:804f6a0bda26 | 23 | bool refreshNetStatus(); |
Cumulocity | 41:804f6a0bda26 | 24 | |
Cumulocity | 41:804f6a0bda26 | 25 | private: |
Cumulocity | 41:804f6a0bda26 | 26 | MDMParser::DevStatus _devStatus; |
Cumulocity | 41:804f6a0bda26 | 27 | MDMParser::NetStatus _netStatus; |
Cumulocity | 41:804f6a0bda26 | 28 | char _cellId[9]; |
Cumulocity | 41:804f6a0bda26 | 29 | SignalQuality _signalQuality; |
Cumulocity | 41:804f6a0bda26 | 30 | }; |
Cumulocity | 41:804f6a0bda26 | 31 | |
Cumulocity | 41:804f6a0bda26 | 32 | #endif |