public abstract class CommPort extends Object
| Constructor and Description |
|---|
CommPort() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the communications port.
|
abstract void |
disableReceiveFraming()
Disables receive framing.
|
abstract void |
disableReceiveThreshold()
Disables receive threshold.
|
abstract void |
disableReceiveTimeout()
Disables receive timeout.
|
abstract void |
enableReceiveFraming(int framingByte)
Enables receive framing.
|
abstract void |
enableReceiveThreshold(int threshold)
Enables receive threshold.
|
abstract void |
enableReceiveTimeout(int rcvTimeout)
Enables receive timeout.
|
abstract int |
getInputBufferSize()
Returns the input buffer size in bytes.
|
abstract InputStream |
getInputStream()
Returns an input stream.
|
String |
getName()
Returns the port name.
|
abstract int |
getOutputBufferSize()
Returns the output buffer size in bytes.
|
abstract OutputStream |
getOutputStream()
Returns an output stream.
|
abstract int |
getReceiveFramingByte()
Returns the current byte used for receive framing.
|
abstract int |
getReceiveThreshold()
Returns the integer value of the receive threshold.
|
abstract int |
getReceiveTimeout()
Returns the integer value of the receive timeout.
|
abstract boolean |
isReceiveFramingEnabled()
Returns
true if receive framing is enabled. |
abstract boolean |
isReceiveThresholdEnabled()
Returns
true if receive threshold is enabled. |
abstract boolean |
isReceiveTimeoutEnabled()
Returns
true if receive timeout is enabled. |
abstract void |
setInputBufferSize(int size)
Sets the input buffer size.
|
abstract void |
setOutputBufferSize(int size)
Sets the output buffer size.
|
protected String name
public void close()
public abstract void disableReceiveFraming()
public abstract void disableReceiveThreshold()
public abstract void disableReceiveTimeout()
public abstract void enableReceiveFraming(int framingByte)
throws UnsupportedCommOperationException
framingByte - the framing byteUnsupportedCommOperationException - the unsupported comm operation exceptionpublic abstract void enableReceiveThreshold(int threshold)
throws UnsupportedCommOperationException
threshold - the thresholdUnsupportedCommOperationException - the unsupported comm operation exceptionpublic abstract void enableReceiveTimeout(int rcvTimeout)
throws UnsupportedCommOperationException
rcvTimeout - Timeout value in millisecondsUnsupportedCommOperationException - the unsupported comm operation exceptionpublic abstract int getInputBufferSize()
public abstract InputStream getInputStream() throws IOException
null if the port is unidirectional and doesn't support receiving data.IOException - the io exceptionpublic String getName()
public abstract int getOutputBufferSize()
public abstract OutputStream getOutputStream() throws IOException
null if the port is unidirectional and doesn't support sending data.IOException - the io exceptionpublic abstract int getReceiveFramingByte()
public abstract int getReceiveThreshold()
public abstract int getReceiveTimeout()
public abstract boolean isReceiveFramingEnabled()
true if receive framing is enabled.true if receive framing is enabled.public abstract boolean isReceiveThresholdEnabled()
true if receive threshold is enabled.true if receive threshold is enabled.public abstract boolean isReceiveTimeoutEnabled()
true if receive timeout is enabled.true if receive timeout is enabled.public abstract void setInputBufferSize(int size)
size - the sizepublic abstract void setOutputBufferSize(int size)
size - the sizeCopyright © 2017. All rights reserved.