Own fork of MbedSmartRestMain

Dependencies:   C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed

Fork of MbedSmartRestMain by Cumulocity Official

Committer:
xinlei
Date:
Mon Aug 08 11:05:57 2016 +0000
Revision:
138:f8ab852e83e7
Parent:
136:a52821cdb108
Etisalat and Teleena APN.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
xinlei 100:dbcd3bc51758 1 #ifndef SIGNAL_H
xinlei 100:dbcd3bc51758 2 #define SIGNAL_H
xinlei 100:dbcd3bc51758 3 #include "mbed.h"
xinlei 100:dbcd3bc51758 4 #include "DeviceInfo.h"
xinlei 100:dbcd3bc51758 5 #include "AbstractReporter.h"
xinlei 100:dbcd3bc51758 6
xinlei 100:dbcd3bc51758 7
xinlei 100:dbcd3bc51758 8 class Signal: public AbstractReporter
xinlei 100:dbcd3bc51758 9 {
xinlei 100:dbcd3bc51758 10 public:
xinlei 123:311fa85af2b3 11 Signal(DeviceInfo& d): deviceInfo(d), timer() {
xinlei 100:dbcd3bc51758 12 oldValues[0] = 0;
xinlei 100:dbcd3bc51758 13 oldValues[1] = 0;
xinlei 123:311fa85af2b3 14 timer.start();
xinlei 100:dbcd3bc51758 15 }
xinlei 100:dbcd3bc51758 16 virtual ~Signal() {}
xinlei 100:dbcd3bc51758 17 virtual bool init() { return true; }
xinlei 100:dbcd3bc51758 18 virtual const char* name() const { return "dBm"; }
xinlei 136:a52821cdb108 19 virtual int read(char*, size_t, char*, size_t);
xinlei 100:dbcd3bc51758 20 private:
xinlei 100:dbcd3bc51758 21 int oldValues[2];
xinlei 100:dbcd3bc51758 22 DeviceInfo& deviceInfo;
xinlei 123:311fa85af2b3 23 Timer timer;
xinlei 100:dbcd3bc51758 24 };
xinlei 100:dbcd3bc51758 25
xinlei 100:dbcd3bc51758 26 #endif /* SIGNAL_H */