public interface PortInterface
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
cvsRev |
Modifier and Type | Method and Description |
---|---|
int |
available()
This will return the number of bytes available.
|
void |
close()
This will close a port.
|
java.lang.String |
getName()
This should return the name of the port (in a nice short form).
|
PortPoolInterface |
getPortPool()
Returns the port pool that this port was served from.
|
boolean |
hasError()
Returns true if an error has been detected on the port.
|
int |
read()
This will read a single byte.
|
int |
read(byte[] b)
This will read an array of bytes and place them into the given array.
|
int |
read(byte[] b,
int offset,
int length)
This will read an array of bytes and place them into the array of bytes
at a given offset (up to the length).
|
byte[] |
readAndWait(int length,
int timeout,
int interCharacterTimeout)
This will wait until we have received what the port thinks is everything.
|
void |
setError(java.lang.Object errorObject)
Sets an error on the port.
|
void |
setPortPool(PortPoolInterface portPool)
Sets the port pool that this port was served from.
|
void |
setThread(java.lang.Thread thread)
The thread that currently owns the port.
|
void |
write(byte b)
This will write a single byte.
|
void |
write(byte[] b)
This will write an array of bytes.
|
void |
write(byte[] b,
int offset,
int length)
This will write an array of bytes starting at offset for length number of bytes.
|
static final java.lang.String cvsRev
int available() throws java.io.IOException
java.io.IOException
void close()
java.lang.String getName()
PortPoolInterface getPortPool()
boolean hasError()
int read() throws java.io.IOException
java.io.IOException
int read(byte[] b) throws java.io.IOException
java.io.IOException
int read(byte[] b, int offset, int length) throws java.io.IOException
java.io.IOException
byte[] readAndWait(int length, int timeout, int interCharacterTimeout) throws java.io.IOException
java.io.IOException
void setError(java.lang.Object errorObject)
void setPortPool(PortPoolInterface portPool)
void setThread(java.lang.Thread thread)
void write(byte b) throws java.io.IOException
java.io.IOException
void write(byte[] b) throws java.io.IOException
java.io.IOException
void write(byte[] b, int offset, int length) throws java.io.IOException
java.io.IOException
Copyright © 1999-2025 ErgoTech Systems, Inc. All Rights Reserved.