Rev 5 | Blame | Compare with Previous | Last modification | View Log | RSS feed
/*
* Copyright (C) 2015 by Andreas Theofilu. All rights reserved!
*
* All rights reserved. No warranty, explicit or implicit, provided.
*
* NOTICE: All information contained herein is, and remains
* the property of Andreas Theofilu and his suppliers, if any.
* The intellectual and technical concepts contained
* herein are proprietary to Andreas Theofilu and its suppliers and
* may be covered by European and Foreign Patents, patents in process,
* and are protected by trade secret or copyright law.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from Andreas Theofilu.
*
* Author: Andreas Theofilu <andreas@theosys.at>
*/
#ifndef __TEMPERATURE_H__
#define __TEMPERATURE_H__
#define MAX_TEMPS 30
#include "helper.h"
class temperature : public helper
{
public:
temperature();
~temperature();
void trun();
void doStop() { stop = true; }
double getTemp(int pos);
double getOutside() { return outside; }
void setOutside(int pos) { outPos = pos; }
private:
bool initialized;
int fd_serial;
std::string buffer;
double outside; // The outside temperature
int outPos; // The position of outside temperature
bool stop;
double allTemps[MAX_TEMPS];
};
#endif