Package com.serotonin.modbus4j.ip

Examples of com.serotonin.modbus4j.ip.IpParameters


        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;
    }
View Full Code Here

TOP

Related Classes of com.serotonin.modbus4j.ip.IpParameters

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.