some fixes
This commit is contained in:
parent
39ca767847
commit
53ac161489
@ -16,8 +16,8 @@ public class FinderThreePhasePowerMeter extends MbusDevice {
|
|||||||
this.dataPoints.add(new DataPoint("current3", 13));
|
this.dataPoints.add(new DataPoint("current3", 13));
|
||||||
this.dataPoints.add(new DataPoint("activePower3", 14));
|
this.dataPoints.add(new DataPoint("activePower3", 14));
|
||||||
this.dataPoints.add(new DataPoint("reactivePower3", 15));
|
this.dataPoints.add(new DataPoint("reactivePower3", 15));
|
||||||
this.dataPoints.add(new DataPoint("activePowerTotal", 16));
|
this.dataPoints.add(new DataPoint("activePowerTotal", 17));
|
||||||
this.dataPoints.add(new DataPoint("reactivePowerTotal", 17));
|
this.dataPoints.add(new DataPoint("reactivePowerTotal", 18));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ADataObject getDataObject() throws MbusException {
|
public ADataObject getDataObject() throws MbusException {
|
||||||
|
@ -66,8 +66,8 @@ public class MbusScheduledQuerier extends Thread {
|
|||||||
logger.error("Error " + e.toString() + " in Meterbus dialog for device " + device.shortString());
|
logger.error("Error " + e.toString() + " in Meterbus dialog for device " + device.shortString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
logger.info("Cnt: " + cnt + ", SuccessCnt: " + successCnt + ", ErrCnt: " + errCnt);
|
logger.info("CycleCnt: " + cnt + ", SuccessCnt: " + successCnt + ", ErrCnt: " + errCnt);
|
||||||
this.queue.add(new MbusStatisticsDataObject("MbusgwChild", cnt, errCnt, successCnt));
|
this.queue.add(new MbusStatisticsDataObject("MbusgwChild", errCnt, successCnt));
|
||||||
try {
|
try {
|
||||||
Thread.sleep(5*1000);
|
Thread.sleep(5*1000);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
|
@ -4,16 +4,14 @@ import java.util.HashMap;
|
|||||||
|
|
||||||
public class MbusStatisticsDataObject extends ADataObject {
|
public class MbusStatisticsDataObject extends ADataObject {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
static final String TOTAL_CNT_KEY = "total";
|
|
||||||
static final String ERROR_CNT_KEY = "error";
|
static final String ERROR_CNT_KEY = "error";
|
||||||
static final String SUCCESS_CNT_KEY = "success";
|
static final String SUCCESS_CNT_KEY = "success";
|
||||||
static final String TABLE_NAME = "Statistics";
|
static final String TABLE_NAME = "Statistics";
|
||||||
static final String KIND_NAME = "Statistics";
|
static final String KIND_NAME = "Statistics";
|
||||||
|
|
||||||
public MbusStatisticsDataObject(String name, int total, int error, int success) {
|
public MbusStatisticsDataObject(String name, int error, int success) {
|
||||||
super(name, KIND_NAME);
|
super(name, KIND_NAME);
|
||||||
HashMap<String, Object> values = new HashMap<String, Object>();
|
HashMap<String, Object> values = new HashMap<String, Object>();
|
||||||
values.put(TOTAL_CNT_KEY, total);
|
|
||||||
values.put(ERROR_CNT_KEY, error);
|
values.put(ERROR_CNT_KEY, error);
|
||||||
values.put(SUCCESS_CNT_KEY, success);
|
values.put(SUCCESS_CNT_KEY, success);
|
||||||
setValues(values);
|
setValues(values);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user