Own fork of MbedSmartRestMain

Dependencies:   C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed

Fork of MbedSmartRestMain by Cumulocity Official

measurement/Signal.h

Committer:
xinlei
Date:
2016-08-08
Revision:
138:f8ab852e83e7
Parent:
136:a52821cdb108

File content as of revision 138:f8ab852e83e7:

#ifndef SIGNAL_H
#define SIGNAL_H
#include "mbed.h"
#include "DeviceInfo.h"
#include "AbstractReporter.h"


class Signal: public AbstractReporter
{
public:
        Signal(DeviceInfo& d): deviceInfo(d), timer() {
                oldValues[0] = 0;
                oldValues[1] = 0;
                timer.start();
        }
        virtual ~Signal() {}
        virtual bool init() { return true; }
        virtual const char* name() const { return "dBm"; }
        virtual int read(char*, size_t, char*, size_t);
private:
        int oldValues[2];
        DeviceInfo& deviceInfo;
        Timer timer;
};

#endif /* SIGNAL_H */