forked from bartprescott/vbus-collector
-
Notifications
You must be signed in to change notification settings - Fork 4
/
datatypes.h
73 lines (59 loc) · 1.7 KB
/
datatypes.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
62
63
64
65
66
67
68
69
70
71
72
73
#ifndef DATATYPES_H
#define DATATYPES_H
// DeltaSol BS Plus
typedef union __attribute__((packed)) {
struct {
short TempSensor1;
short TempSensor2;
short TempSensor3;
short TempSensor4;
unsigned char PumpSpeed1;
unsigned char PumpSpeed2;
unsigned char RelayMask;
unsigned char ErrorMask;
unsigned short SystemTime;
unsigned char Scheme;
unsigned char OptionCollectorMax:1;
unsigned char OptionCollectorMin:1;
unsigned char OptionCollectorFrost:1;
unsigned char OptionTubeCollector:1;
unsigned char OptionRecooling:1;
unsigned char OptionHQM:1;
unsigned char rfu:2;
unsigned short OperatingHoursRelay1;
unsigned short OperatingHoursRelay2;
unsigned short HeatQuantityWH;
unsigned short HeatQuantityKWH;
unsigned short HeatQuantityMWH;
unsigned short Version;
} bsPlusPkt;
unsigned char asBytes[28];
} Data_Packet_BS;
// DeltaSol BS 2009
// http://danielwippermann.github.io/resol-vbus/#/vsf/bytes/00_0010_427B_10_0100
typedef union __attribute__((packed)) {
struct {
short TempSensor1;
short TempSensor2;
short TempSensor3;
short TempSensor4;
unsigned char PumpSpeed1;
unsigned char ignore_1;
unsigned short OperatingHoursRelay1;
unsigned char PumpSpeed2;
unsigned char ignore_2;
unsigned short OperatingHoursRelay2;
unsigned char UnitType;
unsigned char System;
unsigned char ignore_3;
unsigned char ignore_4;
unsigned short ErrorMask;
unsigned short SystemTime;
unsigned int StatusMask;
unsigned int HeatQuantityWH;
unsigned short Version;
unsigned short Variant;
} bsPlusPkt;
unsigned char asBytes[36];
} Data_Packet_DeltaSol_BS_2009;
#endif