Skip to content

Commit

Permalink
SLTS-16 correcting migration to new modbus
Browse files Browse the repository at this point in the history
  • Loading branch information
grzesiekb committed Sep 5, 2016
1 parent 530d6de commit 5b2c611
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ public void removeDataPoint(DataPointRT dataPoint) {

@Override
protected void doPoll(long time) {



if (!modbusMaster.isInitialized()) {
if (vo.isCreateSlaveMonitorPoints()) {
Expand Down Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Integer> nodesFound = new LinkedList<Integer>();
private String message = "";

Expand Down

0 comments on commit 5b2c611

Please sign in to comment.