-
Notifications
You must be signed in to change notification settings - Fork 0
/
HeaterItem.h
61 lines (54 loc) · 1.2 KB
/
HeaterItem.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
* HeaterItem.h
*
* Created: 28.01.2016 15:32:58
* Author: Ivanov
*/
#ifndef __HEATERITEM_H__
#define __HEATERITEM_H__
#include "Arduino.h"
#define ADDR_LEN 3
class HeaterItem
{
//variables
public:
boolean isEnabled;
byte address[ADDR_LEN];
byte sensorAddress[8];
byte port;
byte pin;
boolean isAuto;
uint16_t powerConsumption;
boolean isOn;
boolean wantsOn;
byte priority;
boolean isConnected;
boolean actualState;
protected:
private:
float temperature = 0;
float targetTemperature = 0;
float delta = 0;
float temperatureAdjust = 0;
//functions
public:
HeaterItem();
~HeaterItem();
bool operator>( const HeaterItem &c );
//HeaterItem& operator=( const HeaterItem &c );
void setTemperature(float temp);
float getTemperature();
void getTemperatureBytes(byte *array);
void setTargetTemperature(float temp);
float getTargetTemperature();
void setTemperatureAdjust(float temp);
float getTemperatureAdjust();
void getTemperatureAdjustBytes(byte *array);
float getDelta();
void getAddressString(char* str, uint8_t* len);
protected:
private:
HeaterItem( const HeaterItem &c );
void byteToHexStr(const byte* value, uint8_t size, char* str, uint8_t* len);
}; //HeaterItem
#endif //__HEATERITEM_H__