|
2009-01-09 1.2.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
Define the databits5 (int) constant. |
static int |
DATABITS_6
Define the databits6 (int) constant. |
static int |
DATABITS_7
Define the databits7 (int) constant. |
static int |
DATABITS_8
Define the databits8 (int) constant. |
(package private) int |
fd
Define the fd (int) field. |
(package private) java.io.FileDescriptor |
FD
Define the fd (FileDescriptor) field. |
static int |
FLOWCONTROL_NONE
Define the flowcontrol none (int) constant. |
static int |
FLOWCONTROL_RTSCTS_IN
Define the flowcontrol rtscts in (int) constant. |
static int |
FLOWCONTROL_RTSCTS_OUT
Define the flowcontrol rtscts out (int) constant. |
static int |
FLOWCONTROL_XONXOFF_IN
Define the flowcontrol xonxoff in (int) constant. |
static int |
FLOWCONTROL_XONXOFF_OUT
Define the flowcontrol xonxoff out (int) constant. |
(package private) int |
insBufferCount
Define the ins buffer count (int) field. |
(package private) int |
insBufferSize
Disable read buffering for now |
(package private) boolean |
notifyOnBufferFlag
Define the notify on buffer flag (boolean) field. |
(package private) int |
outsBufferCount
Define the outs buffer count (int) field. |
(package private) int |
outsBufferSize
Disable write buffering for default |
static int |
PARITY_EVEN
Define the parity even (int) constant. |
static int |
PARITY_MARK
Define the parity mark (int) constant. |
static int |
PARITY_NONE
Define the parity none (int) constant. |
static int |
PARITY_ODD
Define the parity odd (int) constant. |
static int |
PARITY_SPACE
Define the parity space (int) constant. |
(package private) boolean |
rcvFraming
Define the rcv framing (boolean) field. |
(package private) int |
rcvFramingByte
Define the rcv framing byte (int) field. |
(package private) boolean |
rcvFramingByteReceived
Define the rcv framing byte received (boolean) field. |
(package private) int |
rcvThreshold
Define the rcv threshold (int) field. |
(package private) int |
rcvTimeout
Define the rcv timeout (int) field. |
static int |
STOPBITS_1
Define the stopbits1 (int) constant. |
static int |
STOPBITS_1_5
Define the stopbits15 (int) constant. |
static int |
STOPBITS_2
Define the stopbits2 (int) constant. |
| 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 lstnr 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 rcv 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 rt parameter. |
protected void |
finalize()
Finalize. |
int |
getBaudrate()
Gets the baudrate (int) value. |
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()
Gets the dtr (boolean) value. |
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()
Gets the rts (boolean) value. |
boolean |
isRTS()
Gets the rts (boolean) value. |
void |
notifyOnBreakInterrupt(boolean notify)
Notify on break interrupt with the specified notify parameter. |
void |
notifyOnCarrierDetect(boolean notify)
Notify on carrier detect with the specified notify parameter. |
void |
notifyOnCTS(boolean notify)
Notify on cts with the specified notify parameter. |
void |
notifyOnDataAvailable(boolean notify)
Notify on data available with the specified notify parameter. |
void |
notifyOnDSR(boolean notify)
Notify on dsr with the specified notify parameter. |
void |
notifyOnFramingError(boolean notify)
Notify on framing error with the specified notify parameter. |
void |
notifyOnOutputEmpty(boolean notify)
Notify on output empty with the specified notify parameter. |
void |
notifyOnOverrunError(boolean notify)
Notify on overrun error with the specified notify parameter. |
void |
notifyOnParityError(boolean notify)
Notify on parity error with the specified notify parameter. |
void |
notifyOnRingIndicator(boolean notify)
Notify on ring indicator with the specified notify parameter. |
void |
removeEventListener()
Remove event listener. |
(package private) void |
reportSerialEvent(int eventType,
boolean oldvalue,
boolean newvalue)
Report serial event with the specified event type, oldvalue and newvalue parameters. |
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 value. |
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 bd, db, sb and par 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
portName - The port name (String) parameter.driver - The driver (NSCommDriver) parameter.
java.io.IOException - IOException.| Method Detail |
|---|
public void addEventListener(SerialPortEventListener lstnr)
throws java.util.TooManyListenersException
addEventListener in class SerialPortlstnr - The lstnr (SerialPortEventListener) parameter.
java.util.TooManyListenersException - Too Many Listeners Exception.removeEventListener()public void close()
close in class CommPortpublic void disableReceiveFraming()
disableReceiveFraming in class CommPortenableReceiveFraming(int)public void disableReceiveThreshold()
disableReceiveThreshold in class CommPortenableReceiveThreshold(int),
getReceiveThreshold()public void disableReceiveTimeout()
disableReceiveTimeout in class CommPortenableReceiveTimeout(int),
getReceiveTimeout()
public void enableReceiveFraming(int rcvFramingByte)
throws UnsupportedCommOperationException
enableReceiveFraming in class CommPortrcvFramingByte - The rcv framing byte (int) parameter.
UnsupportedCommOperationException - Unsupported Comm Operation Exception.disableReceiveFraming()
public void enableReceiveThreshold(int thresh)
throws UnsupportedCommOperationException
enableReceiveThreshold in class CommPortthresh - The thresh (int) parameter.
UnsupportedCommOperationException - Unsupported Comm Operation Exception.disableReceiveThreshold(),
getReceiveThreshold()
public void enableReceiveTimeout(int rt)
throws UnsupportedCommOperationException
enableReceiveTimeout in class CommPortrt - The rt (int) parameter.
UnsupportedCommOperationException - Unsupported Comm Operation Exception.disableReceiveTimeout(),
getReceiveTimeout()
protected void finalize()
throws java.io.IOException
finalize in class java.lang.Objectjava.io.IOException - IOException.public int getBaudRate()
getBaudRate in class SerialPortint) value.public int getBaudrate()
int) value.public int getDataBits()
getDataBits in class SerialPortint) value.public int getFlowControlMode()
getFlowControlMode in class SerialPortint) value.setFlowControlMode(int)public int getInputBufferSize()
getInputBufferSize in class CommPortint) value.setInputBufferSize(int)
public java.io.InputStream getInputStream()
throws java.io.IOException
getInputStream in class CommPortInputStream) value.
java.io.IOException - IOException.public int getOutputBufferSize()
getOutputBufferSize in class CommPortint) value.setOutputBufferSize(int)
public java.io.OutputStream getOutputStream()
throws java.io.IOException
getOutputStream in class CommPortOutputStream) value.
java.io.IOException - IOException.public int getParity()
getParity in class SerialPortint) value.public int getReceiveFramingByte()
getReceiveFramingByte in class CommPortint) value.public int getReceiveThreshold()
getReceiveThreshold in class CommPortint) value.disableReceiveThreshold(),
enableReceiveThreshold(int)public int getReceiveTimeout()
getReceiveTimeout in class CommPortint) value.disableReceiveTimeout(),
enableReceiveTimeout(int)public int getStopBits()
getStopBits in class SerialPortint) value.public boolean isCD()
isCD in class SerialPortboolean) value.public boolean isCTS()
isCTS in class SerialPortboolean) value.notifyOnCTS(boolean)public boolean isDSR()
isDSR in class SerialPortboolean) value.notifyOnDSR(boolean)public boolean isDTR()
isDTR in class SerialPortboolean) value.setDTR(boolean)public boolean isDtr()
boolean) value.public boolean isRI()
isRI in class SerialPortboolean) value.public boolean isRTS()
isRTS in class SerialPortboolean) value.setRTS(boolean)public boolean isReceiveFramingEnabled()
isReceiveFramingEnabled in class CommPortboolean) value.public boolean isReceiveThresholdEnabled()
isReceiveThresholdEnabled in class CommPortboolean) value.public boolean isReceiveTimeoutEnabled()
isReceiveTimeoutEnabled in class CommPortboolean) value.public boolean isRts()
boolean) value.public void notifyOnBreakInterrupt(boolean notify)
notifyOnBreakInterrupt in class SerialPortnotify - The notify (boolean) parameter.public void notifyOnCTS(boolean notify)
notifyOnCTS in class SerialPortnotify - The notify (boolean) parameter.public void notifyOnCarrierDetect(boolean notify)
notifyOnCarrierDetect in class SerialPortnotify - The notify (boolean) parameter.public void notifyOnDSR(boolean notify)
notifyOnDSR in class SerialPortnotify - The notify (boolean) parameter.public void notifyOnDataAvailable(boolean notify)
notifyOnDataAvailable in class SerialPortnotify - The notify (boolean) parameter.public void notifyOnFramingError(boolean notify)
notifyOnFramingError in class SerialPortnotify - The notify (boolean) parameter.public void notifyOnOutputEmpty(boolean notify)
notifyOnOutputEmpty in class SerialPortnotify - The notify (boolean) parameter.public void notifyOnOverrunError(boolean notify)
notifyOnOverrunError in class SerialPortnotify - The notify (boolean) parameter.public void notifyOnParityError(boolean notify)
notifyOnParityError in class SerialPortnotify - The notify (boolean) parameter.public void notifyOnRingIndicator(boolean notify)
notifyOnRingIndicator in class SerialPortnotify - The notify (boolean) parameter.public void removeEventListener()
removeEventListener in class SerialPortaddEventListener(SerialPortEventListener)
void reportSerialEvent(int eventType,
boolean oldvalue,
boolean newvalue)
eventType - The event type (int) parameter.oldvalue - The oldvalue (boolean) parameter.newvalue - The newvalue (boolean) parameter.public void sendBreak(int millis)
sendBreak in class SerialPortmillis - The millis (int) parameter.public void setDTR(boolean dtr)
setDTR in class SerialPortdtr - The dtr (boolean) parameter.isDTR()
public void setFlowControlMode(int flowctrl)
throws UnsupportedCommOperationException
setFlowControlMode in class SerialPortflowctrl - The flowctrl (int) parameter.
UnsupportedCommOperationException - Unsupported Comm Operation Exception.getFlowControlMode()public void setInputBufferSize(int size)
setInputBufferSize in class CommPortsize - The size (int) parameter.getInputBufferSize()public void setOutputBufferSize(int size)
setOutputBufferSize in class CommPortsize - The size (int) parameter.getOutputBufferSize()public void setRTS(boolean rts)
setRTS in class SerialPortrts - The rts (boolean) parameter.isRTS()public void setRcvFifoTrigger(int trigger)
setRcvFifoTrigger in class SerialPorttrigger - The trigger (int) parameter.
public void setSerialPortParams(int bd,
int db,
int sb,
int par)
throws UnsupportedCommOperationException
setSerialPortParams in class SerialPortbd - The bd (int) parameter.db - The db (int) parameter.sb - The sb (int) parameter.par - The par (int) parameter.
UnsupportedCommOperationException - Unsupported Comm Operation Exception.
|
2009-01-09 1.2.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||