]> git.basschouten.com Git - openhab-addons.git/blob
8d25eddc579ce5f928ea398f91c15de5b48be345
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
7  * This program and the accompanying materials are made available under the
8  * terms of the Eclipse Public License 2.0 which is available at
9  * http://www.eclipse.org/legal/epl-2.0
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.sonnen.internal.communication;
14
15 import com.google.gson.annotations.SerializedName;
16
17 /**
18  * The {@link SonnenJsonDataDTO} is the Java class used to map the JSON
19  * response to an Object.
20  *
21  * @author Christian Feininger - Initial contribution
22  */
23 public class SonnenJsonDataDTO {
24     @SerializedName("BatteryCharging")
25     boolean batteryCharging;
26     @SerializedName("BatteryDischarging")
27     boolean batteryDischarging;
28     @SerializedName("Consumption_W")
29     int consumptionHouse;
30     @SerializedName("GridFeedIn_W")
31     int gridValue;
32     @SerializedName("Production_W")
33     int solarProduction;
34     @SerializedName("USOC")
35     int batteryChargingLevel;
36     @SerializedName("FlowConsumptionBattery")
37     boolean flowConsumptionBattery;
38     @SerializedName("FlowConsumptionGrid")
39     boolean flowConsumptionGrid;
40     @SerializedName("FlowConsumptionProduction")
41     boolean flowConsumptionProduction;
42     @SerializedName("FlowGridBattery")
43     boolean flowGridBattery;
44     @SerializedName("FlowProductionBattery")
45     boolean flowProductionBattery;
46     @SerializedName("FlowProductionGrid")
47     boolean flowProductionGrid;
48     @SerializedName("Pac_total_W")
49     int batteryCurrent;
50
51     /**
52      * @return the batteryCurrent
53      */
54     public int getbatteryCurrent() {
55         return batteryCurrent;
56     }
57
58     /**
59      * @return the batteryCharging
60      */
61     public boolean isBatteryCharging() {
62         return batteryCharging;
63     }
64
65     /**
66      * @return the batteryDischarging
67      */
68     public boolean isBatteryDischarging() {
69         return batteryDischarging;
70     }
71
72     /**
73      * @return the consumptionHouse
74      */
75     public int getConsumptionHouse() {
76         return consumptionHouse;
77     }
78
79     /**
80      * @return the gridValue. Negative value indicates receiving from Grid. Positive value indicates feeding to Grid.
81      */
82     public int getGridValue() {
83         return gridValue;
84     }
85
86     /**
87      * @return the solarProduction
88      */
89     public int getSolarProduction() {
90         return solarProduction;
91     }
92
93     /**
94      * @return the batteryChargingLevel
95      */
96     public int getBatteryChargingLevel() {
97         return batteryChargingLevel;
98     }
99
100     /**
101      * @return the flowConsumptionBattery
102      */
103     public boolean isFlowConsumptionBattery() {
104         return flowConsumptionBattery;
105     }
106
107     /**
108      * @return the flowConsumptionGrid
109      */
110     public boolean isFlowConsumptionGrid() {
111         return flowConsumptionGrid;
112     }
113
114     /**
115      * @return the flowConsumptionProduction
116      */
117     public boolean isFlowConsumptionProduction() {
118         return flowConsumptionProduction;
119     }
120
121     /**
122      * @return the flowGridBattery
123      */
124     public boolean isFlowGridBattery() {
125         return flowGridBattery;
126     }
127
128     /**
129      * @return the flowProductionBattery
130      */
131     public boolean isFlowProductionBattery() {
132         return flowProductionBattery;
133     }
134
135     /**
136      * @return the flowProductionGrid
137      */
138     public boolean isFlowProductionGrid() {
139         return flowProductionGrid;
140     }
141 }