|
1.0.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.comm.CommPort
javax.comm.SerialPort
org.eclipse.soda.dk.comm.NSSerialPort
class NSSerialPort
An RS-232 serial communications port. SerialPort describes the low-level interface to a serial communications port made available by the underlying system. SerialPort defines the minimum required functionality for serial communications ports.
| Field Summary | |
|---|---|
static int |
DATABITS_5
|
static int |
DATABITS_6
|
static int |
DATABITS_7
|
static int |
DATABITS_8
|
(package private) int |
fd
|
(package private) java.io.FileDescriptor |
FD
|
static int |
FLOWCONTROL_NONE
|
static int |
FLOWCONTROL_RTSCTS_IN
|
static int |
FLOWCONTROL_RTSCTS_OUT
|
static int |
FLOWCONTROL_XONXOFF_IN
|
static int |
FLOWCONTROL_XONXOFF_OUT
|
(package private) int |
insBufferCount
|
(package private) int |
insBufferSize
Disable read buffering for now |
(package private) boolean |
notifyOnBufferFlag
|
(package private) int |
outsBufferCount
|
(package private) int |
outsBufferSize
Disable write buffering for default |
static int |
PARITY_EVEN
|
static int |
PARITY_MARK
|
static int |
PARITY_NONE
|
static int |
PARITY_ODD
|
static int |
PARITY_SPACE
|
(package private) boolean |
rcvFraming
|
(package private) int |
rcvFramingByte
|
(package private) boolean |
rcvFramingByteReceived
|
(package private) int |
rcvThreshold
|
(package private) int |
rcvTimeout
|
static int |
STOPBITS_1
|
static int |
STOPBITS_1_5
|
static int |
STOPBITS_2
|
| Fields inherited from class javax.comm.CommPort |
|---|
name |
| Constructor Summary | |
|---|---|
NSSerialPort(java.lang.String portName,
NSCommDriver driver)
Constructor |
|
| Method Summary | |
|---|---|
void |
addEventListener(SerialPortEventListener lstnr)
Add event listener with the specified lsnr parameter. |
void |
close()
Close. |
void |
disableReceiveFraming()
Disable receive framing. |
void |
disableReceiveThreshold()
Disable receive threshold. |
void |
disableReceiveTimeout()
Disable receive timeout. |
void |
enableReceiveFraming(int rcvFramingByte)
Enable receive framing with the specified framing byte parameter. |
void |
enableReceiveThreshold(int thresh)
Enable receive threshold with the specified thresh parameter. |
void |
enableReceiveTimeout(int rt)
Enable receive timeout with the specified rcv timeout parameter. |
protected void |
finalize()
|
int |
getBaudrate()
|
int |
getBaudRate()
Gets the baud rate (int) value. |
int |
getDataBits()
Gets the data bits (int) value. |
int |
getFlowControlMode()
Gets the currently configured flow control mode. |
int |
getInputBufferSize()
Gets the input buffer size (int) value. |
java.io.InputStream |
getInputStream()
Gets the input stream value. |
int |
getOutputBufferSize()
Gets the output buffer size (int) value. |
java.io.OutputStream |
getOutputStream()
Gets the output stream value. |
int |
getParity()
Gets the parity (int) value. |
int |
getReceiveFramingByte()
Gets the receive framing byte (int) value. |
int |
getReceiveThreshold()
Gets the receive threshold (int) value. |
int |
getReceiveTimeout()
Gets the receive timeout (int) value. |
int |
getStopBits()
Gets the stop bits (int) value. |
boolean |
isCD()
Gets the cd (boolean) value. |
boolean |
isCTS()
Gets the cts (boolean) value. |
boolean |
isDSR()
Gets the dsr (boolean) value. |
boolean |
isDtr()
|
boolean |
isDTR()
Gets the dtr (boolean) value. |
boolean |
isReceiveFramingEnabled()
Gets the receive framing enabled (boolean) value. |
boolean |
isReceiveThresholdEnabled()
Gets the receive threshold enabled (boolean) value. |
boolean |
isReceiveTimeoutEnabled()
Gets the receive timeout enabled (boolean) value. |
boolean |
isRI()
Gets the ri (boolean) value. |
boolean |
isRts()
|
boolean |
isRTS()
Gets the rts (boolean) value. |
void |
notifyOnBreakInterrupt(boolean notify)
Notify on break interrupt with the specified enable parameter. |
void |
notifyOnCarrierDetect(boolean notify)
Notify on carrier detect with the specified enable parameter. |
void |
notifyOnCTS(boolean notify)
Notify on cts with the specified enable parameter. |
void |
notifyOnDataAvailable(boolean notify)
Notify on data available with the specified enable parameter. |
void |
notifyOnDSR(boolean notify)
Notify on dsr with the specified enable parameter. |
void |
notifyOnFramingError(boolean notify)
Notify on framing error with the specified enable parameter. |
void |
notifyOnOutputEmpty(boolean notify)
Notify on output empty with the specified enable parameter. |
void |
notifyOnOverrunError(boolean notify)
Notify on overrun error with the specified enable parameter. |
void |
notifyOnParityError(boolean notify)
Notify on parity error with the specified enable parameter. |
void |
notifyOnRingIndicator(boolean notify)
Notify on ring indicator with the specified enable parameter. |
void |
removeEventListener()
Remove event listener. |
(package private) void |
reportSerialEvent(int eventType,
boolean oldvalue,
boolean newvalue)
|
void |
sendBreak(int millis)
Send break with the specified millis parameter. |
void |
setDTR(boolean dtr)
Sets the dtr value. |
void |
setFlowControlMode(int flowctrl)
Sets the flow control mode. |
void |
setInputBufferSize(int size)
Sets the input buffer size value. |
void |
setOutputBufferSize(int size)
Sets the output buffer size value. |
void |
setRcvFifoTrigger(int trigger)
Sets the rcv fifo trigger value. |
void |
setRTS(boolean rts)
Sets the rts value. |
void |
setSerialPortParams(int bd,
int db,
int sb,
int par)
Set serial port params with the specified baudrate, data bits, stop bits and parity parameters. |
| Methods inherited from class javax.comm.CommPort |
|---|
getName, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int DATABITS_5
public static final int DATABITS_6
public static final int DATABITS_7
public static final int DATABITS_8
public static final int STOPBITS_1
public static final int STOPBITS_2
public static final int STOPBITS_1_5
public static final int PARITY_NONE
public static final int PARITY_ODD
public static final int PARITY_EVEN
public static final int PARITY_MARK
public static final int PARITY_SPACE
public static final int FLOWCONTROL_NONE
public static final int FLOWCONTROL_RTSCTS_IN
public static final int FLOWCONTROL_RTSCTS_OUT
public static final int FLOWCONTROL_XONXOFF_IN
public static final int FLOWCONTROL_XONXOFF_OUT
int fd
java.io.FileDescriptor FD
int rcvThreshold
int rcvTimeout
boolean rcvFraming
int rcvFramingByte
boolean rcvFramingByteReceived
int insBufferSize
int insBufferCount
int outsBufferSize
int outsBufferCount
boolean notifyOnBufferFlag
| Constructor Detail |
|---|
public NSSerialPort(java.lang.String portName,
NSCommDriver driver)
throws java.io.IOException
java.io.IOException| Method Detail |
|---|
public java.io.InputStream getInputStream()
throws java.io.IOException
CommPort
getInputStream in class CommPortInputStream) value.
java.io.IOException
public java.io.OutputStream getOutputStream()
throws java.io.IOException
CommPort
getOutputStream in class CommPortOutputStream) value.
java.io.IOExceptionpublic void close()
CommPort
close in class CommPort
protected void finalize()
throws java.io.IOException
finalize in class java.lang.Objectjava.io.IOException
public void enableReceiveThreshold(int thresh)
throws UnsupportedCommOperationException
CommPort
enableReceiveThreshold in class CommPortthresh - The thresh (int) parameter.
UnsupportedCommOperationException - Unsupported Comm Operation Exception.CommPort.disableReceiveThreshold(),
CommPort.getReceiveThreshold()public void disableReceiveThreshold()
CommPort
disableReceiveThreshold in class CommPortCommPort.enableReceiveThreshold(int),
CommPort.getReceiveThreshold()public boolean isReceiveThresholdEnabled()
CommPort
isReceiveThresholdEnabled in class CommPortboolean) value.public int getReceiveThreshold()
CommPort
getReceiveThreshold in class CommPortint) value.CommPort.disableReceiveThreshold(),
CommPort.enableReceiveThreshold(int)
public void enableReceiveTimeout(int rt)
throws UnsupportedCommOperationException
CommPort
enableReceiveTimeout in class CommPortrt - The rcv timeout (int) parameter.
UnsupportedCommOperationException - Unsupported Comm Operation Exception.CommPort.disableReceiveTimeout(),
CommPort.getReceiveTimeout()public void disableReceiveTimeout()
CommPort
disableReceiveTimeout in class CommPortCommPort.enableReceiveTimeout(int),
CommPort.getReceiveTimeout()public boolean isReceiveTimeoutEnabled()
CommPort
isReceiveTimeoutEnabled in class CommPortboolean) value.public int getReceiveTimeout()
CommPort
getReceiveTimeout in class CommPortint) value.CommPort.disableReceiveTimeout(),
CommPort.enableReceiveTimeout(int)
public void enableReceiveFraming(int rcvFramingByte)
throws UnsupportedCommOperationException
CommPort
enableReceiveFraming in class CommPortrcvFramingByte - The framing byte (int) parameter.
UnsupportedCommOperationException - Unsupported Comm Operation Exception.CommPort.disableReceiveFraming()public void disableReceiveFraming()
CommPort
disableReceiveFraming in class CommPortCommPort.enableReceiveFraming(int)public boolean isReceiveFramingEnabled()
CommPort
isReceiveFramingEnabled in class CommPortboolean) value.public int getReceiveFramingByte()
CommPort
getReceiveFramingByte in class CommPortint) value.public int getBaudrate()
public boolean isDtr()
public boolean isRts()
public void setInputBufferSize(int size)
CommPort
setInputBufferSize in class CommPortsize - The size (int) parameter.CommPort.getInputBufferSize()public int getInputBufferSize()
CommPort
getInputBufferSize in class CommPortint) value.CommPort.setInputBufferSize(int)public void setOutputBufferSize(int size)
CommPort
setOutputBufferSize in class CommPortsize - The size (int) parameter.CommPort.getOutputBufferSize()public int getOutputBufferSize()
CommPort
getOutputBufferSize in class CommPortint) value.CommPort.setOutputBufferSize(int)
public void addEventListener(SerialPortEventListener lstnr)
throws java.util.TooManyListenersException
SerialPort
addEventListener in class SerialPortlstnr - The lsnr (SerialPortEventListener) parameter.
java.util.TooManyListenersException - Too Many Listeners Exception.SerialPort.removeEventListener()public void removeEventListener()
SerialPort
removeEventListener in class SerialPortSerialPort.addEventListener(SerialPortEventListener)public int getBaudRate()
SerialPort
getBaudRate in class SerialPortint) value.public int getDataBits()
SerialPort
getDataBits in class SerialPortint) value.public int getStopBits()
SerialPort
getStopBits in class SerialPortint) value.public int getParity()
SerialPort
getParity in class SerialPortint) value.public void sendBreak(int millis)
SerialPort
sendBreak in class SerialPortmillis - The millis (int) parameter.
public void setFlowControlMode(int flowctrl)
throws UnsupportedCommOperationException
setFlowControlMode in class SerialPortflowctrl - The flowcontrol (int) parameter.
UnsupportedCommOperationException - Unsupported Comm Operation Exception.SerialPort.getFlowControlMode()public int getFlowControlMode()
getFlowControlMode in class SerialPortint) value.SerialPort.setFlowControlMode(int)public void setRcvFifoTrigger(int trigger)
SerialPort
setRcvFifoTrigger in class SerialPorttrigger - The trigger (int) parameter.
public void setSerialPortParams(int bd,
int db,
int sb,
int par)
throws UnsupportedCommOperationException
SerialPort
setSerialPortParams in class SerialPortbd - The baudrate (int) parameter.db - The data bits (int) parameter.sb - The stop bits (int) parameter.par - The parity (int) parameter.
UnsupportedCommOperationException - Unsupported Comm Operation Exception.public void setDTR(boolean dtr)
SerialPort
setDTR in class SerialPortdtr - The dtr (boolean) parameter.SerialPort.isDTR()public boolean isDTR()
SerialPort
isDTR in class SerialPortboolean) value.SerialPort.setDTR(boolean)public void setRTS(boolean rts)
SerialPort
setRTS in class SerialPortrts - The rts (boolean) parameter.SerialPort.isRTS()public boolean isRTS()
SerialPort
isRTS in class SerialPortboolean) value.SerialPort.setRTS(boolean)public boolean isCTS()
SerialPort
isCTS in class SerialPortboolean) value.SerialPort.notifyOnCTS(boolean)public boolean isDSR()
SerialPort
isDSR in class SerialPortboolean) value.SerialPort.notifyOnDSR(boolean)public boolean isRI()
SerialPort
isRI in class SerialPortboolean) value.public boolean isCD()
SerialPort
isCD in class SerialPortboolean) value.public void notifyOnDataAvailable(boolean notify)
SerialPort
notifyOnDataAvailable in class SerialPortnotify - The enable (boolean) parameter.public void notifyOnOutputEmpty(boolean notify)
SerialPort
notifyOnOutputEmpty in class SerialPortnotify - The enable (boolean) parameter.public void notifyOnCTS(boolean notify)
SerialPort
notifyOnCTS in class SerialPortnotify - The enable (boolean) parameter.public void notifyOnDSR(boolean notify)
SerialPort
notifyOnDSR in class SerialPortnotify - The enable (boolean) parameter.public void notifyOnRingIndicator(boolean notify)
SerialPort
notifyOnRingIndicator in class SerialPortnotify - The enable (boolean) parameter.public void notifyOnCarrierDetect(boolean notify)
SerialPort
notifyOnCarrierDetect in class SerialPortnotify - The enable (boolean) parameter.public void notifyOnOverrunError(boolean notify)
SerialPort
notifyOnOverrunError in class SerialPortnotify - The enable (boolean) parameter.public void notifyOnParityError(boolean notify)
SerialPort
notifyOnParityError in class SerialPortnotify - The enable (boolean) parameter.public void notifyOnFramingError(boolean notify)
SerialPort
notifyOnFramingError in class SerialPortnotify - The enable (boolean) parameter.public void notifyOnBreakInterrupt(boolean notify)
SerialPort
notifyOnBreakInterrupt in class SerialPortnotify - The enable (boolean) parameter.
void reportSerialEvent(int eventType,
boolean oldvalue,
boolean newvalue)
|
1.0.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||