ioio.lib.impl
Class UartImpl

java.lang.Object
  extended by ioio.lib.impl.AbstractResource
      extended by ioio.lib.impl.UartImpl
All Implemented Interfaces:
Closeable, Uart

public class UartImpl
extends AbstractResource
implements Uart


Nested Class Summary
 
Nested classes/interfaces inherited from interface ioio.lib.api.Uart
Uart.Parity, Uart.StopBits
 
Constructor Summary
UartImpl(IOIOImpl ioio, int txPin, int rxPin, int uartNum)
           
 
Method Summary
 void close()
           
 void dataReceived(byte[] data, int size)
           
 void disconnected()
           
 java.io.InputStream getInputStream()
          Gets the input stream.
 java.io.OutputStream getOutputStream()
          Gets the output stream.
 void reportAdditionalBuffer(int bytesRemaining)
           
 void send(byte[] data, int size)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UartImpl

public UartImpl(IOIOImpl ioio,
                int txPin,
                int rxPin,
                int uartNum)
         throws ConnectionLostException
Throws:
ConnectionLostException
Method Detail

dataReceived

public void dataReceived(byte[] data,
                         int size)

send

public void send(byte[] data,
                 int size)

close

public void close()
Specified by:
close in interface Closeable
Overrides:
close in class AbstractResource

disconnected

public void disconnected()
Overrides:
disconnected in class AbstractResource

getInputStream

public java.io.InputStream getInputStream()
Description copied from interface: Uart
Gets the input stream.

Specified by:
getInputStream in interface Uart
Returns:
An input stream.

getOutputStream

public java.io.OutputStream getOutputStream()
Description copied from interface: Uart
Gets the output stream.

Specified by:
getOutputStream in interface Uart
Returns:
An output stream.

reportAdditionalBuffer

public void reportAdditionalBuffer(int bytesRemaining)