|
eWON JTK | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ewon.ewonitf.CommDriver
public class CommDriver
Constructor Summary | |
---|---|
CommDriver()
|
Method Summary | |
---|---|
static int |
availableImpl(int hPort)
return the number of bytes available for reading on the given serial port. |
static void |
closeImpl(int hPort)
Close a serial port. |
static void |
configurePortImpl(int port,
int baud,
int flags)
Configure a serial port optional parameters. |
static void |
configuretimeoutsImpl(int port,
int rxTimeout,
int txTimeout)
Configure the timeouts for the serial port blocking operations |
static int |
getModemSignalImpl(int port,
int signal)
Get the postion of a port signal |
static int |
getTxBufferUsedImpl(int hPort)
|
static int |
openByNameImpl(String name,
int baud,
int flags)
Open a serial port by system dependent device name. |
static int |
openByNumberImpl(int port,
int baud,
int flags)
Open a serial port by logical number. |
static int |
readBytesImpl(int hPort,
byte[] b,
int off,
int len)
Read from a serial port without blocking. |
static void |
setBreakImpl(int hPort,
boolean breakOn)
Enable or disable break on the serial port output. |
static void |
setModemSignalImpl(int port,
int signal,
boolean value)
Set the postion of a port signal |
static int |
writeBytesImpl(int hPort,
byte[] b,
int off,
int len)
Write to a serial port without blocking. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CommDriver()
Method Detail |
---|
public static void configuretimeoutsImpl(int port, int rxTimeout, int txTimeout) throws IOException
IOException
public static int openByNumberImpl(int port, int baud, int flags) throws IOException
port
- logical number of the port 0 being the firstbaud
- baud rate to set the port atflags
- options for the serial port
IOException
- if an I/O error occurs.public static int openByNameImpl(String name, int baud, int flags) throws IOException
name
- device name of the portbaud
- baud rate to set the port atflags
- options for the serial port
IOException
- if an I/O error occurs.public static void configurePortImpl(int port, int baud, int flags) throws IOException
port
- device port returned from openbaud
- baud rate to set the port atflags
- options for the serial port
IOException
- if an I/O error occurspublic static void closeImpl(int hPort) throws IOException
hPort
- handle to a native serial port
IOException
- if an I/O error occurspublic static int availableImpl(int hPort) throws IOException
hPort
- handle to a native serial port
IOException
- if an I/O error occurspublic static int getTxBufferUsedImpl(int hPort) throws IOException
IOException
public static void setBreakImpl(int hPort, boolean breakOn) throws IOException
IOException
public static void setModemSignalImpl(int port, int signal, boolean value) throws IOException
IOException
public static int getModemSignalImpl(int port, int signal) throws IOException
IOException
public static int readBytesImpl(int hPort, byte[] b, int off, int len) throws IOException
hPort
- handle to a native serial portb
- I/O bufferoff
- starting offset for datalen
- length of data
IOException
- if an I/O error occurspublic static int writeBytesImpl(int hPort, byte[] b, int off, int len) throws IOException
hPort
- handle to a native serial portb
- I/O bufferoff
- starting offset for datalen
- length of data
IOException
- if an I/O error occurs.
|
eWON JTK | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |