Cumulocity Official / Mbed 2 deprecated MbedSmartRestMain Featured

Dependencies:   C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed

Fork of MbedSmartRestMain by Vincent Wochnik

measurement/TemperatureMeasurement.h

Committer:
xinlei
Date:
2015-04-27
Revision:
96:5dfdc8568e9f
Parent:
94:61d44636f020
Child:
100:47ea098f8a47

File content as of revision 96:5dfdc8568e9f:

#ifndef TEMPERATUREMEASUREMENT_H
#define TEMPERATUREMEASUREMENT_H

#include "AbstractSmartRest.h"
#include "SmartRestTemplate.h"
#include "LM75B.h"
#include "DeviceInfo.h"

class TemperatureMeasurement
{
public:
    TemperatureMeasurement(AbstractSmartRest&, SmartRestTemplate&, long&, DeviceInfo&);

    bool init();
    bool run();

private:
    bool _init, _open;
    long& _deviceId;
    SmartRestTemplate& _tpl;
    AbstractSmartRest& _client;
    LM75B _sensor;
    float oldValue;
    time_t t_start;
    DeviceInfo& _deviceInfo;
};

#endif