public ModbusTCPMaster(String addr,int port,int timeout,boolean reconnect){
  super();
  try {
    InetAddress slaveAddress=InetAddress.getByName(addr);
    connection=new TCPMasterConnection(slaveAddress);
    connection.setPort(port);
    connection.setTimeout(timeout);
    this.timeout=timeout;
    setReconnecting(reconnect);
  }
 catch (  UnknownHostException e) {
    throw new RuntimeException("Failed to contruct ModbusTCPMaster instance.",e);
  }
}

public ModbusTCPMaster ( String addr , int port , int timeout , boolean reconnect ) { super ( ) ; try { InetAddress slaveAddress = InetAddress . getByName ( addr ) ; connection = new TCPMasterConnection ( slaveAddress ) ; connection . setPort ( port ) ; connection . setTimeout ( timeout ) ; this . timeout = timeout ; setReconnecting ( reconnect ) ; } catch ( UnknownHostException e ) { throw new RuntimeException ( "Failed to contruct ModbusTCPMaster instance." , e ) ; } }
constructs a new master facade instance for communication with a given slave .
