Package javax.comm

Examples of javax.comm.SerialPort.addEventListener()


            SerialPort serial = (SerialPort)commPort.open("Bluetooth", 10000);
            serial.setSerialPortParams(115200, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
            inStream = serial.getInputStream();
            outStream = serial.getOutputStream();
            readBuffer = new byte[32];
            serial.addEventListener(this);
            serial.notifyOnDataAvailable(true);
            serial.notifyOnBreakInterrupt(true);
            serial.notifyOnCarrierDetect(true);
            serial.notifyOnCTS(true);
            serial.notifyOnFramingError(true);
View Full Code Here


         }

         // Start listening for events on the port
         if (serialPort != null) {
            try {
               serialPort.addEventListener(this); // This is first call in this
               // section in case of
               // exception
               serialPort.notifyOnDataAvailable(true); // This is the event
               // that is specific
               // when receiving a
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.