public class SerialPortReader
extends java.lang.Thread
SerialPortController
,
ReaderM
Constructor and Description |
---|
SerialPortReader()
Construct a serial port reader.
|
Modifier and Type | Method and Description |
---|---|
void |
closePort()
Closes the serial port connection.
|
int |
init(int portNumber)
Initialize the serial port and connect a BufferedInputStream to the serialPort.
|
java.lang.String |
readFromPort()
Takes the next single value from the buffer of Characters read
from the input stream.
|
void |
run()
Run method for this class.
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public SerialPortReader()
public int init(int portNumber)
portNumber
- The number of theportpublic void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public java.lang.String readFromPort()
public void closePort()