Package purejavacomm

Examples of purejavacomm.SerialPort.enableReceiveTimeout()


    SerialPort p = (SerialPort) CommPortIdentifier.getPortIdentifier(
        args[0]).open(TwoPortSerialTest.class.getName(), 0);

    p.setSerialPortParams(baudRate, dataBits + requiredExtraBits,
        SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
    p.enableReceiveTimeout(10000);

    InputStream in = p.getInputStream();
    while (in.available() != 0) {
      in.read();
    }
View Full Code Here


      flowControl = SerialPort.FLOWCONTROL_NONE;
    }

    result.setSerialPortParams( baudrate, databits, stopbits, parity );
    result.setFlowControlMode( flowControl );
    result.enableReceiveTimeout( 100 );
    result.enableReceiveThreshold( 0 );

    result.notifyOnDataAvailable( true );
    result.addEventListener( new SerialPortEventListener()
    {
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.