|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.eurotech.framework.core.comm.CommConnectionImpl
public class CommConnectionImpl
Constructor Summary | |
---|---|
CommConnectionImpl(CommURI commUri,
int mode,
boolean timeouts)
|
Method Summary | |
---|---|
void |
close()
|
byte[] |
flushSerialBuffer()
Reads all bytes that are waiting in the serial port buffer and returns them in an array. |
CommURI |
getURI()
Returns the URI for this connection. |
DataInputStream |
openDataInputStream()
|
DataOutputStream |
openDataOutputStream()
|
InputStream |
openInputStream()
|
OutputStream |
openOutputStream()
|
byte[] |
sendCommand(byte[] command,
int timeout)
Sends and array of bytes to a CommConnection and returns an array of bytes that represents the 'response' to the command. |
byte[] |
sendCommand(byte[] command,
int timeout,
int demark)
|
void |
sendMessage(byte[] message)
Sends and array of bytes to a CommConnection |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CommConnectionImpl(CommURI commUri, int mode, boolean timeouts) throws IOException, javax.comm.NoSuchPortException, javax.comm.PortInUseException
IOException
javax.comm.NoSuchPortException
javax.comm.PortInUseException
Method Detail |
---|
public CommURI getURI()
CommConnection
getURI
in interface CommConnection
public DataInputStream openDataInputStream() throws IOException
openDataInputStream
in interface javax.microedition.io.InputConnection
IOException
public InputStream openInputStream() throws IOException
openInputStream
in interface javax.microedition.io.InputConnection
IOException
public DataOutputStream openDataOutputStream() throws IOException
openDataOutputStream
in interface javax.microedition.io.OutputConnection
IOException
public OutputStream openOutputStream() throws IOException
openOutputStream
in interface javax.microedition.io.OutputConnection
IOException
public void close() throws IOException
close
in interface CommConnection
close
in interface javax.microedition.io.Connection
IOException
public void sendMessage(byte[] message) throws EsfException, IOException
CommConnection
sendMessage
in interface CommConnection
message
- the array of bytes to send to the CommConnection
EsfException
IOException
public byte[] sendCommand(byte[] command, int timeout) throws EsfException, IOException
CommConnection
sendCommand
in interface CommConnection
command
- the array of bytes to send to the CommConnectiontimeout
- the maximum length of time to wait before returning a null
response in the event no response is ever returned.
EsfException
IOException
public byte[] sendCommand(byte[] command, int timeout, int demark) throws EsfException, IOException
sendCommand
in interface CommConnection
EsfException
IOException
public byte[] flushSerialBuffer() throws EsfException, IOException
CommConnection
flushSerialBuffer
in interface CommConnection
EsfException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |