Saturday, May 29, 2010
Friday, May 28, 2010
Thursday, May 27, 2010
Class Diagram Update
Friday, May 21, 2010
Java RXTX close port solution
class CloseThread extends Thread
{
public void run()
{
serialPort.removeEventListener();
serialPort.close();
}
}
public void closePort()
{
try
{
if (serialPort != null)
{
serialPort.getInputStream().close();
serialPort.getOutputStream().close();
new CloseThread().start();
}
} catch (Exception e) {}
}
/*
Late Note(11.17.2011): I see that there are plenty of views on this article and after more than one year I realize that the context might look ambiguous. What I didn't mention before is that this is an inner class to the class in which you have the methods for communicating over the serial port, and in here serialPort is an object of the SerialPort class.
*/
/*
Late Note(11.17.2011): I see that there are plenty of views on this article and after more than one year I realize that the context might look ambiguous. What I didn't mention before is that this is an inner class to the class in which you have the methods for communicating over the serial port, and in here serialPort is an object of the SerialPort class.
*/
Labels:
close,
communication,
java,
library,
port,
rxtx,
serial,
serialport
Sunday, May 16, 2010
Subscribe to:
Posts (Atom)