SunSPOT host API V3.0


com.sun.spot.client
Class SerialPortWrapper

java.lang.Object
  extended by com.sun.spot.client.SerialPortWrapper

public class SerialPortWrapper
extends Object

SerialPortWrapper wraps an RXTX SerialPort to centralise the parameters for opening it, and to provide easy access to its streams. The read stream also works around a timeout bug in RXTX. TODO replace duplicate code in spotfinder and in host-agent


Constructor Summary
SerialPortWrapper(String port, IUI ui)
           
 
Method Summary
 void close()
           
 int getByte()
           
 InputStream getInputStream()
           
 OutputStream getOutputStream()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SerialPortWrapper

public SerialPortWrapper(String port,
                         IUI ui)
                  throws IOException
Throws:
IOException
Method Detail

getOutputStream

public OutputStream getOutputStream()

getInputStream

public InputStream getInputStream()

getByte

public int getByte()
            throws IOException
Throws:
IOException

close

public void close()

SunSPOT host API V3.0


Copyright © 2006, 2007 Sun Microsystems, Inc. All Rights Reserved.