Package gnu.io

Examples of gnu.io.SerialPort.enableReceiveTimeout()


        }

        //setting connection parameters
        try {
            serialPort.setSerialPortParams(PORT_BAUDRATE, PORT_DATABITS, PORT_STOPBITS, PORT_PARITY);
            serialPort.enableReceiveTimeout(PORT_IN_TIMEOUT);
            serialPort.enableReceiveThreshold(PORT_IN_THRESHOLD);
        } catch (UnsupportedCommOperationException e) {
            System.out.println("Parameters not allowed for port \"" + port.getName() + "\".");
            serialPort.close();
            return null;
View Full Code Here


                try {
                    ctrlCon = (SerialPort)commPort;
                    ctrlCon.setSerialPortParams
                        (9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1,
                         SerialPort.PARITY_NONE);
                    ctrlCon.enableReceiveTimeout(1000);
                } catch (UnsupportedCommOperationException e) {
                    // This is really fatal: configured port does not support
                    // configured mode.
                    log.config("Port " + portIdentifier.getName()
                               + " cannot be configured: " + e.getMessage());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.