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.
-
SerialIO(String)
- Make the serial port with the port given.
-
flushInputData()
- Clear any data waiting to be read.
-
flushOutputData()
- Clear any commands waiting to go out.
-
outputAvailable()
- Checks if there is any available data to be written to the serial port.
-
outputData()
- Gets the next command to be written to the serial port.
-
read()
- Read from the port.
-
setReadData(byte)
- Add data that read in from the serial port.
-
write(SerialData)
- Write the data to the port.
SerialIO
public SerialIO(String port)
- Make the serial port with the port given.
param port serial port location.
read
public synchronized byte read() throws IOException
- Read from the port.
return the byte read from the port.
flushInputData
public synchronized void flushInputData()
- Clear any data waiting to be read.
flushOutputData
public synchronized void flushOutputData()
- Clear any commands waiting to go out.
setReadData
public synchronized void setReadData(byte data)
- Add data that read in from the serial port.
- Parameters:
- data - the byte read from the port.
write
public synchronized void write(SerialData data) throws IOException
- Write the data to the port.
param data the data to write.
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.
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