de.cau.cs.kieler.krep.evalbench.comm
Class RxtxSerialConnection

java.lang.Object
  extended by de.cau.cs.kieler.krep.evalbench.comm.Connection
      extended by de.cau.cs.kieler.krep.evalbench.comm.RxtxSerialConnection
All Implemented Interfaces:
IConnection

public class RxtxSerialConnection
extends Connection

Wrapper class for the RxTx package.

Rating red

Constructor Summary
RxtxSerialConnection(String device)
           
 
Method Summary
 void dispose()
          Closes connection and removes locks on the involved device.
protected  InputStreamReader getInput()
          Retrieves the input stream for this connection.
protected  OutputStream getOutput()
          Retrieves the output stream for this connection.
static String[] getSerialPorts()
          Retrieves all available serial ports and returns a list of port names.
 
Methods inherited from class de.cau.cs.kieler.krep.evalbench.comm.Connection
hark, receive, receive, receiveByte, send, send, send
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RxtxSerialConnection

public RxtxSerialConnection(String device)
                     throws CommunicationException
Parameters:
device - name of the serial port
Throws:
CommunicationException
Method Detail

getSerialPorts

public static String[] getSerialPorts()
Retrieves all available serial ports and returns a list of port names. krep.evalbench.application.product

Returns:
list of port names

dispose

public void dispose()
Closes connection and removes locks on the involved device.


getInput

protected InputStreamReader getInput()
Retrieves the input stream for this connection.

Specified by:
getInput in class Connection
Returns:
the input stream, or null if no input stream is available

getOutput

protected OutputStream getOutput()
Retrieves the output stream for this connection.

Specified by:
getOutput in class Connection
Returns:
the output stream, or null if no output stream is available