| Constructor and Description |
|---|
FCOCPortTCP(java.lang.String szIPAddress)
Connect to legacy standard port 8010
|
FCOCPortTCP(java.lang.String szIPAddress,
int nTCPPort)
Connect to a defined TCP port
|
| 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
|
java.lang.String |
getIPAddress() |
com.fivecolibs.devices.FCOEPortState |
getState() |
int |
getTCPPort() |
void |
open()
Ask to open the communication port
|
void |
putData(byte[] acBuffer,
int nOffset,
int nLength)
Send data through the communication port
|
public FCOCPortTCP(java.lang.String szIPAddress,
int nTCPPort)
szIPAddress - IP address of the device to connect to.nTCPPort - TCP port to final connect topublic FCOCPortTCP(java.lang.String szIPAddress)
szIPAddress - IP address of the device to connect to.public java.lang.String getIPAddress()
public int getTCPPort()
public com.fivecolibs.devices.FCOEPortState getState()
public void open()
throws java.io.IOException
FCOIPortpublic void close()
FCOIPortpublic void putData(byte[] acBuffer,
int nOffset,
int nLength)
throws java.io.IOException
FCOIPortputData in interface FCOIPortacBuffer - 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 systempublic int getData(byte[] acBuffer,
int nOffset,
int nLength)
throws java.io.IOException
FCOIPortgetData in interface FCOIPortacBuffer - 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 systempublic int getData(byte[] acBuffer,
int nOffset,
int nLength,
int nTimeout)
throws java.io.IOException
FCOIPortgetData in interface FCOIPortacBuffer - 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 systempublic void discardInputBuffer()
FCOIPortdiscardInputBuffer in interface FCOIPort