diff --git a/src/com/serotonin/mango/rt/dataSource/ebro/EBI25Constants.java b/src/com/serotonin/mango/rt/dataSource/ebro/EBI25Constants.java index d443eeddc4..f714bec481 100644 --- a/src/com/serotonin/mango/rt/dataSource/ebro/EBI25Constants.java +++ b/src/com/serotonin/mango/rt/dataSource/ebro/EBI25Constants.java @@ -164,7 +164,7 @@ public static ModbusMaster initModbusMaster(String host, int port, modbusMaster.setRetries(retries); //TODO write own exceptionListener implements MessagingExceptionHandler; if (exceptionListener != null) - modbusMaster.setExceptionHandler((com.serotonin.modbus4j.messaging.MessagingExceptionHandler) exceptionListener); + modbusMaster.setExceptionHandler((MessagingExceptionHandler) exceptionListener); modbusMaster.init(); diff --git a/src/com/serotonin/mango/rt/dataSource/modbus/ModbusDataSource.java b/src/com/serotonin/mango/rt/dataSource/modbus/ModbusDataSource.java index c573b90840..af2f0f9ee8 100644 --- a/src/com/serotonin/mango/rt/dataSource/modbus/ModbusDataSource.java +++ b/src/com/serotonin/mango/rt/dataSource/modbus/ModbusDataSource.java @@ -150,6 +150,8 @@ public void removeDataPoint(DataPointRT dataPoint) { @Override protected void doPoll(long time) { + + if (!modbusMaster.isInitialized()) { if (vo.isCreateSlaveMonitorPoints()) { @@ -335,8 +337,7 @@ protected void initialize(ModbusMaster modbusMaster) { // Add this as a listener to exceptions that occur in the // implementation. - //TODO write own exceptionListener implements MessagingExceptionHandler; - modbusMaster.setExceptionHandler((com.serotonin.modbus4j.messaging.MessagingExceptionHandler) this); + modbusMaster.setExceptionHandler((MessagingExceptionHandler) this); try { modbusMaster.init(); diff --git a/src/com/serotonin/mango/web/dwr/beans/ModbusNodeScanListener.java b/src/com/serotonin/mango/web/dwr/beans/ModbusNodeScanListener.java index c91590820c..a3fb2613a4 100644 --- a/src/com/serotonin/mango/web/dwr/beans/ModbusNodeScanListener.java +++ b/src/com/serotonin/mango/web/dwr/beans/ModbusNodeScanListener.java @@ -36,7 +36,7 @@ public class ModbusNodeScanListener implements NodeScanListener, TestingUtility { private final ResourceBundle bundle; private final ModbusMaster modbusMaster; - private com.serotonin.modbus4j.util.ProgressiveTask task; + private ProgressiveTask task; private final List nodesFound = new LinkedList(); private String message = "";