# shthermostat.h

Go to the documentation of this file.

    00001 /*
    00002  * SmartHome server: Plug-in thermostat
    00003  *
    00004  * Copyright (C) 2010 Daniel Pisi <dan.pisi@gmail.com>
    00005  *
    00006  * This program is free software; you can redistribute it and/or modify it
    00007  * under the terms of version 2 of the GNU General Public License
    00008  * as published by the Free Software Foundation.
    00009  *
    00010  */
    00011
    00018 #ifndef SHTHERMOSTAT_H
    00019 #define SHTHERMOSTAT_H
    00020
    00021 #include <QtCore/QCoreApplication>
    00022 #include <QtPlugin>
    00023 #include <QObject>
    00024 #include "shobjecthelper.h"
    00025
    00026 // -----------------------------------------------------------------------------
    00027
    00032 class ShThermostat : public ShObjectHelper
    00033 {
    00034     Q_OBJECT
    00035     Q_INTERFACES(ShObject)
    00036
    00037 public:
    00038     ShThermostat();
    00039     virtual ~ShThermostat() {};
    00040     virtual bool init(QString param);
    00041     virtual void updatePins(const QList<ShPin> &pins) {};
    00042     virtual void processMessage(ShMessagePtr message);
    00043
    00044 private:
    00045     void updateOutput();
    00046
    00047     double mDesiredTemp;
    00048     double mMeasuredTemp;
    00049     double mHysteresis;
    00050     int    mOutput;
    00051 };
    00052 // -----------------------------------------------------------------------------
    00053
    00054 #endif // SHTHERMOSTAT_H

All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends