-
Notifications
You must be signed in to change notification settings - Fork 6
/
ViessmannHeatingData.cs
101 lines (77 loc) · 2.97 KB
/
ViessmannHeatingData.cs
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
using PhilipDaubmeier.CompactTimeSeries;
using PhilipDaubmeier.GraphIoT.Core.Database;
using PhilipDaubmeier.GraphIoT.Core.Parsers;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace PhilipDaubmeier.GraphIoT.Viessmann.Database
{
public class ViessmannHeatingLowresData : ViessmannHeatingData
{
public override TimeSeriesSpan Span => SpanMonth160Min;
[Required, Column("Month")]
public override DateTime Key { get; set; }
}
public class ViessmannHeatingMidresData : ViessmannHeatingData
{
public override TimeSeriesSpan Span => SpanDay5Min;
[Required, Column("Day")]
public override DateTime Key { get; set; }
[Required]
public double BurnerHoursTotal { get; set; } = 0d;
[Required]
public int BurnerStartsTotal { get; set; } = 0;
}
public abstract class ViessmannHeatingData : TimeSeriesDbEntityBase
{
protected override int DecimalPlaces => 1;
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public Guid Id { get; set; }
[MaxLength(800)]
[TimeSeries(typeof(double))]
public string? BurnerMinutesCurve { get; set; }
[MaxLength(800)]
[TimeSeries(typeof(int))]
public string? BurnerStartsCurve { get; set; }
[MaxLength(800)]
[TimeSeries(typeof(int))]
public string? BurnerModulationCurve { get; set; }
[MaxLength(800)]
[TimeSeries(typeof(double))]
public string? OutsideTempCurve { get; set; }
[MaxLength(800)]
[TimeSeries(typeof(double))]
public string? BoilerTempCurve { get; set; }
[MaxLength(800)]
[TimeSeries(typeof(double))]
public string? BoilerTempMainCurve { get; set; }
[MaxLength(800)]
[TimeSeries(typeof(double))]
public string? Circuit0TempCurve { get; set; }
[MaxLength(800)]
[TimeSeries(typeof(double))]
public string? Circuit1TempCurve { get; set; }
[MaxLength(800)]
[TimeSeries(typeof(double))]
public string? DhwTempCurve { get; set; }
[MaxLength(100)]
[TimeSeries(typeof(bool))]
public string? BurnerActiveCurve { get; set; }
[MaxLength(100)]
[TimeSeries(typeof(bool))]
public string? Circuit0PumpCurve { get; set; }
[MaxLength(100)]
[TimeSeries(typeof(bool))]
public string? Circuit1PumpCurve { get; set; }
[MaxLength(100)]
[TimeSeries(typeof(bool))]
public string? DhwPrimaryPumpCurve { get; set; }
[MaxLength(100)]
[TimeSeries(typeof(bool))]
public string? DhwCirculationPumpCurve { get; set; }
[NotMapped]
public TimeSeries<double> BurnerMinutesSeries => BurnerMinutesCurve.ToTimeseries<double>(Span);
[NotMapped]
public TimeSeries<int> BurnerStartsSeries => BurnerStartsCurve.ToTimeseries<int>(Span);
}
}