2 * Copyright (c) 2010-2022 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.modbus.sunspec.internal.dto;
15 import java.util.Optional;
19 * Data object for the parsed information from a sunspec meter
21 * @author Nagy Attila Gabor - Initial contribution
24 public class MeterModelBlock {
27 * Sunspec device type id
29 public Integer sunspecDID;
34 public Integer length;
37 * AC Total Current value
39 public Short acCurrentTotal;
42 * Descriptors for phase A
44 public PhaseBlock phaseA = new PhaseBlock();
47 * Descriptors for phase B
49 public PhaseBlock phaseB = new PhaseBlock();
52 * Descriptors for phase C
54 public PhaseBlock phaseC = new PhaseBlock();
57 * AC Current scale factor
59 public Short acCurrentSF;
62 * AC Voltage Line to line value
64 public Optional<Short> acVoltageLineToNAverage;
67 * AC Voltage Line to N value
69 public Optional<Short> acVoltageLineToLineAverage;
72 * AC Voltage scale factor
74 public Short acVoltageSF;
79 public Short acFrequency;
82 * AC Frequency scale factor
84 public Optional<Short> acFrequencySF;
89 public Short acRealPowerTotal;
92 * AC Real Power Scale Factor
94 public Short acRealPowerSF;
97 * Total apparent power
99 public Optional<Short> acApparentPowerTotal;
102 * AC Apparent Power Scale Factor
104 public Optional<Short> acApparentPowerSF;
107 * Total reactive power
109 public Optional<Short> acReactivePowerTotal;
112 * AC Reactive Power Scale Factor
114 public Optional<Short> acReactivePowerSF;
119 public Optional<Short> acPowerFactor;
122 * Power factor scale factor
124 public Optional<Short> acPowerFactorSF;
127 * Total exported real energy
129 public Optional<Long> acExportedRealEnergyTotal;
132 * Total imported real energy
134 public Long acImportedRealEnergyTotal;
137 * Real Energy Scale Factor
139 public Short acRealEnergySF;
142 * Total exported apparent energy
144 public Optional<Long> acExportedApparentEnergyTotal;
147 * Total imported apparent energy
149 public Optional<Long> acImportedApparentEnergyTotal;
152 * Apparent Energy Scale Factor
154 public Optional<Short> acApparentEnergySF;
157 * Quadrant 1: Total imported reactive energy
159 public Optional<Long> acImportedReactiveEnergyQ1Total;
162 * Quadrant 2: Total imported reactive energy
164 public Optional<Long> acImportedReactiveEnergyQ2Total;
167 * Quadrant 3: Total exported reactive energy
169 public Optional<Long> acExportedReactiveEnergyQ3Total;
172 * Quadrant 4: Total exported reactive energy
174 public Optional<Long> acExportedReactiveEnergyQ4Total;
177 * Reactive Energy Scale Factor
179 public Optional<Short> acReactiveEnergySF;
182 * This subclass is used to store raw data for a single phase in
183 * multi phase meters.
185 public static class PhaseBlock {
187 * AC Phase A Current value
189 public Optional<Short> acPhaseCurrent;
192 * AC Voltage Phase Phase to N value
194 public Optional<Short> acVoltageToN;
197 * AC Voltage Phase Line to next Line value
199 public Optional<Short> acVoltageToNext;
202 * Phase A AC real power
204 public Optional<Short> acRealPower;
207 * Phase A AC apparent power
209 public Optional<Short> acApparentPower;
212 * Phase A AC reactive power
214 public Optional<Short> acReactivePower;
217 * Phase A Power factor
219 public Optional<Short> acPowerFactor;
222 * Phase A exported real energy
224 public Optional<Long> acExportedRealEnergy;
227 * Phase A imported real energy
229 public Optional<Long> acImportedRealEnergy;
232 * Phase A exported apparent energy
234 public Optional<Long> acExportedApparentEnergy;
237 * Phase A imported apparent energy
239 public Optional<Long> acImportedApparentEnergy;
242 * Quadrant 1: Phase A imported reactive energy
244 public Optional<Long> acImportedReactiveEnergyQ1;
247 * Quadrant 2: Phase A imported reactive energy
249 public Optional<Long> acImportedReactiveEnergyQ2;
252 * Quadrant 3: Phase A exported reactive energy
254 public Optional<Long> acExportedReactiveEnergyQ3;
257 * Quadrant 4: Phase A exported reactive energy
259 public Optional<Long> acExportedReactiveEnergyQ4;