|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.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.InputConnectionIOException
public InputStream openInputStream()
throws IOException
openInputStream in interface javax.microedition.io.InputConnectionIOException
public DataOutputStream openDataOutputStream()
throws IOException
openDataOutputStream in interface javax.microedition.io.OutputConnectionIOException
public OutputStream openOutputStream()
throws IOException
openOutputStream in interface javax.microedition.io.OutputConnectionIOException
public void close()
throws IOException
close in interface CommConnectionclose in interface javax.microedition.io.ConnectionIOException
public void sendMessage(byte[] message)
throws EsfException,
IOException
CommConnection
sendMessage in interface CommConnectionmessage - 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 CommConnectioncommand - 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 CommConnectionEsfException
IOException
public byte[] flushSerialBuffer()
throws EsfException,
IOException
CommConnection
flushSerialBuffer in interface CommConnectionEsfException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||