2020-09-07 13:39:22 +02:00
|
|
|
package de.hottis.mbusMaster;
|
|
|
|
|
|
|
|
public class FinderOnePhasePowerMeter extends MbusDevice {
|
|
|
|
public FinderOnePhasePowerMeter(String name, byte address, int queryPeriod) {
|
|
|
|
super(name, address, queryPeriod);
|
|
|
|
this.dataPoints.add(new DataPoint("energy", 0));
|
|
|
|
this.dataPoints.add(new DataPoint("voltage", 2));
|
|
|
|
this.dataPoints.add(new DataPoint("current", 3));
|
|
|
|
this.dataPoints.add(new DataPoint("activePower", 4));
|
|
|
|
this.dataPoints.add(new DataPoint("reactivePower", 5));
|
|
|
|
}
|
2020-09-07 18:15:49 +02:00
|
|
|
|
|
|
|
public ADataObject getDataObject() throws MbusException {
|
2020-09-07 19:46:25 +02:00
|
|
|
return new ElectricEnergyDataObject(this.getName(), this.getValue("energy"), this.getValue("activePower"), this.getErrorRatio());
|
2020-09-07 18:15:49 +02:00
|
|
|
}
|
2020-09-07 13:39:22 +02:00
|
|
|
}
|