Examples of enableReceiveTimeout()


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

Examples of gnu.io.SerialPort.enableReceiveTimeout()

                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

Examples of org.smslib.helper.SerialPort.enableReceiveTimeout()

            serialPort = portId.open("SMSLibCommTester", 1971);
            serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_IN);
            serialPort.setSerialPortParams(bauds[i], SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
            inStream = serialPort.getInputStream();
            outStream = serialPort.getOutputStream();
            serialPort.enableReceiveTimeout(1000);
            c = inStream.read();
            while (c != -1)
              c = inStream.read();
            outStream.write('A');
            outStream.write('T');
View Full Code Here

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

Examples of purejavacomm.SerialPort.enableReceiveTimeout()

      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.