-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclsConfig.h
90 lines (81 loc) · 2.7 KB
/
clsConfig.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the ig-logger project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Original author: Christian Kaiser <[email protected]>
*/
#pragma once
#include "clsLocalNet.h"
class clsConfigOfInstallation
{
public:
String _sName;
String _sDirectory;
double _dTilt; // 35
double _dAspect; // 260
double _dToleranceSunrise;
double _dToleranceSunset;
double _dPeakPower;
double _dArea;
bool _bUpdateInverterClock;
public:
clsConfigOfInstallation()
{
}
clsConfigOfInstallation(const clsConfigOfInstallation& rhs)
{
*this = rhs;
}
clsConfigOfInstallation(const String& sConfigName, const String& sSection);
clsConfigOfInstallation& operator=(const clsConfigOfInstallation& rhs)
{
if (&rhs != this)
{
_sName = rhs._sName;
_sDirectory = rhs._sDirectory;
_dTilt = rhs._dTilt;
_dAspect = rhs._dAspect;
_dToleranceSunrise = rhs._dToleranceSunrise;
_dToleranceSunset = rhs._dToleranceSunset;
_dPeakPower = rhs._dPeakPower;
_dArea = rhs._dArea;
_bUpdateInverterClock = rhs._bUpdateInverterClock;
}
return(*this);
}
};
class clsConfigOfLocation
{
private:
String _sConfigName; // filename
WCValSkipListDict<String,clsConfigOfInstallation> _InstallationList;
public:
String _sDirectory;
String _sName;
double _dLongitude;
double _dLatitude;
double _dMaxSolarPowerPerSqrMeter;
void NotifyNewInverter(const clsLocalNetID& Device);
void NotifyNewSensorcard(const clsLocalNetID& Device);
public:
clsConfigOfLocation();
void NotifyNewDevice(const clsLocalNetID& Device);
WCValSkipListDict<IString,String> GetSectionData(const String& sSection) const;
const double& dMaxSolarPowerPerSqrMeter() const
{
return(_dMaxSolarPowerPerSqrMeter);
}
clsDate GetDateOfLastUpdate() const;
void SetDateOfLastUpdate(const clsDate& date) const;
const clsConfigOfInstallation Installation(const clsLocalNetID& Device);
const String& sFilename()
{
return(_sConfigName);
}
};
extern clsConfigOfLocation __LocationConfig;
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */