-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConstants.cs
More file actions
68 lines (54 loc) · 2.32 KB
/
Constants.cs
File metadata and controls
68 lines (54 loc) · 2.32 KB
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
using System;
namespace SolarUseOptimiser
{
public class Constants
{
public const string MAX_ERRORS = "MaxErrors";
public class ConfigSections
{
public const string HUAWEI_CONFIG_SECTION = "Huawei";
public const string GROWATT_CONFIG_SECTION = "Growatt";
public const string IOTAWATT_CONFIG_SECTION = "IoTaWatt";
public const string CHARGE_HQ_CONFIG_SECION = "ChargeHQ";
public const string ROUTING_SECTION = "Routing";
}
public class Routes
{
public class DataSources
{
public const string ROUTE_DATASOURCE_HUAWEI = "Huawei";
public const string ROUTE_DATASOURCE_GROWATT = "Growatt";
public const string ROUTE_DATASOURCE_IOTAWATT = "IoTaWatt";
}
public class Targets
{
public const string ROUTE_TARGET_CHARGEHQ = "ChargeHQ";
}
}
public class Huawei
{
// need to login every 30 minutes
public const string LOGIN_URI = "thirdData/login";
public const string STATION_LIST_URI = "thirdData/getStationList";
public const string STATION_LIST_NEW_URI = "thirdData/stations";
// can't call this more than 10 times a minute
public const string DEV_LIST_URI = "thirdData/getDevList";
// can't call this more than once every 5 minutes
public const string DEV_REAL_KPI_URI = "thirdData/getDevRealKpi";
}
public class Growatt
{
public const string LOGIN_URI = "login";
public const string PLANT_LIST = "index/getPlantListTitle";
public const string DEVICE_LIST = "panel/getDevicesByPlantList";
public const string GET_MIX_STATUS = "panel/mix/getMIXStatusData";
public const string DEV_TYPE_MIX = "mix";
public const string DEV_TYPE_INV = "inv";
public const string DEV_TYPE_TLX = "tlx";
}
public class IoTaWatt
{
public const string URL_TEMPLATE = "http://{IOTAWATT_IP_ADDRESS}/query?select=[Mains.watts,Solar.watts,Consumption.watts]&begin=s-1m&end=s&group=all&header=no";
}
}
}