twoway

twoway - /* * To change this template, choose Tools |...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author Sergio2 */ /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author Sergio2 */ /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author Sergio2 */ import gnu.io.CommPort import gnu.io.CommPortIdentifier import gnu.io.SerialPort import gnu.io.SerialPortEvent import gnu.io.SerialPortEventListener import java.io.IOException import java.io.InputStream import java.io.OutputStream /** * This version of the TwoWaySerialComm example makes use of the * SerialPortEventListener to avoid polling. * */ public class TwoWaySerialComm { public TwoWaySerialComm() { super() }
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Sheet1 Page 2 void connect ( String portName ) throws Exception { CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName) if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use")
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

twoway - /* * To change this template, choose Tools |...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online