connectionInfo = "Serial Connection to: " + port;
}
private static void configureTCP(Config configuration) {
ModbusFactory factory = new ModbusFactory();
IpParameters params = new IpParameters();
String host = configuration.getStringProperty("host", "localhost");
System.out.println("host: " + host);
int tcpport = configuration.getIntProperty("tcpport", 502);
System.out.println("tcpport: " + tcpport);
params.setHost(host);
params.setPort(tcpport);
master = factory.createTcpMaster(params, true);
connectionInfo = "TCP Connection to: " + host + ":" + tcpport;
}