All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class pinball.io.SerialIO

java.lang.Object
   |
   +----pinball.io.SerialIO

public class SerialIO
extends Object
Class for allowing IO via the serial port.


Constructor Index

 o SerialIO(String)
Make the serial port with the port given.

Method Index

 o flushInputData()
Clear any data waiting to be read.
 o flushOutputData()
Clear any commands waiting to go out.
 o outputAvailable()
Checks if there is any available data to be written to the serial port.
 o outputData()
Gets the next command to be written to the serial port.
 o read()
Read from the port.
 o setReadData(byte)
Add data that read in from the serial port.
 o write(SerialData)
Write the data to the port.

Constructors

 o SerialIO
 public SerialIO(String port)
Make the serial port with the port given. param port serial port location.

Methods

 o read
 public synchronized byte read() throws IOException
Read from the port. return the byte read from the port.

 o flushInputData
 public synchronized void flushInputData()
Clear any data waiting to be read.

 o flushOutputData
 public synchronized void flushOutputData()
Clear any commands waiting to go out.

 o setReadData
 public synchronized void setReadData(byte data)
Add data that read in from the serial port.

Parameters:
data - the byte read from the port.
 o write
 public synchronized void write(SerialData data) throws IOException
Write the data to the port. param data the data to write.

 o outputAvailable
 public synchronized boolean outputAvailable()
Checks if there is any available data to be written to the serial port.

Returns:
if output data is available.
 o outputData
 public synchronized Vector outputData()
Gets the next command to be written to the serial port.

Returns:
The data to be written to the serial port.

All Packages  Class Hierarchy  This Package  Previous  Next  Index