public interface FCOIPort
Modifier and Type | Method and Description |
---|---|
int |
available()
Get number of available bytes in receive buffer
|
void |
close()
Ask to close the communication port
|
void |
discardInputBuffer()
Discards data from the receive buffer.
|
int |
getData(byte[] acBuffer,
int nOffset,
int nLength)
Get data from the communication port
|
int |
getData(byte[] acBuffer,
int nOffset,
int nLength,
int nTimeout)
Get data from the communication port
|
com.fivecolibs.devices.FCOEPortState |
getState() |
void |
open()
Ask to open the communication port
|
void |
putData(byte[] acBuffer,
int nOffset,
int nLength)
Send data through the communication port
|
com.fivecolibs.devices.FCOEPortState getState()
void open() throws java.io.IOException
java.io.IOException
- If open failsvoid close()
void putData(byte[] acBuffer, int nOffset, int nLength) throws java.io.IOException
acBuffer
- The buffer of data to outputnOffset
- The offset in the buffer where data will be sent fromnLength
- The length of data that will be sent beginning at the offsetjava.io.IOException
- If an exception occurs in the underlying communication systemint getData(byte[] acBuffer, int nOffset, int nLength) throws java.io.IOException
acBuffer
- Buffer where data will be put when readnOffset
- The offset in the buffer where data will be putnLength
- The maximum length of data requested to be put in the bufferjava.io.IOException
- If an exception occurs in the underlying communication systemint getData(byte[] acBuffer, int nOffset, int nLength, int nTimeout) throws java.io.IOException
acBuffer
- Buffer where data will be put when readnOffset
- The offset in the buffer where data will be putnLength
- The maximum length of data requested to be put in the buffernTimeout
- The time in millisecond to wait if the nLength is not reached.java.io.IOException
- If an exception occurs in the underlying communication systemvoid discardInputBuffer()
int available() throws java.io.IOException
java.io.IOException
- Input stream exception