com.dalsemi.comm
Class TINISerialPort

java.lang.Object
  |
  +--javax.comm.CommPort
        |
        +--javax.comm.SerialPort
              |
              +--com.dalsemi.comm.TINISerialPort

public class TINISerialPort
extends javax.comm.SerialPort

This class is is the actual serial port implementation used by javax.comm.SerialPort. It is recommended that you use javax.comm instead of this class unless your application needs to use a method that is implemented in this class and not in javax.comm.SerialPort.


Fields inherited from class javax.comm.SerialPort
DATABITS_5, DATABITS_6, DATABITS_7, DATABITS_8, FLOWCONTROL_NONE, FLOWCONTROL_RTSCTS_IN, FLOWCONTROL_RTSCTS_OUT, FLOWCONTROL_XONXOFF_IN, FLOWCONTROL_XONXOFF_OUT, PARITY_EVEN, PARITY_MARK, PARITY_NONE, PARITY_ODD, PARITY_SPACE, STOPBITS_1, STOPBITS_1_5, STOPBITS_2
 
Fields inherited from class javax.comm.CommPort
name
 
Constructor Summary
TINISerialPort(java.lang.String name)
          Constructor - attempts to open the requested serial port
 
Method Summary
 void addEventListener(javax.comm.SerialPortEventListener eventListener)
          Adds a serial port event listener
 void close()
          Closes the serial port
 void disableReceiveFraming()
          Disables receive framing
 void disableReceiveThreshold()
          Disables receive threshold
 void disableReceiveTimeout()
          Disables receive timeout
 void enableReceiveFraming(int framingByte)
          Enables receive framing
 void enableReceiveThreshold(int thresh)
          Enables receive threshold
 void enableReceiveTimeout(int rcvTimeout)
          Enables receive timeout
 int getBaudRate()
          Returns the baud rate in bps
 boolean getCD()
          Returns the current state of CD
 boolean getCTS()
          Returns the current state of CTS
 int getDataBits()
          Returns current the data bit (word size) setting
 boolean getDSR()
          Returns the current state of DSR
 boolean getDTR()
          Returns the current state of DTR
 int getFlowControlMode()
          Returns the current flow control mode
 int getInputBufferSize()
          Returns the input buffer size
 java.io.InputStream getInputStream()
          Returns the serial port input stream
 int getOutputBufferSize()
          Returns the current output buffer size
 java.io.OutputStream getOutputStream()
          Returns the serial port output stream
 int getParity()
          Returns the current parity setting
 int getReceiveFramingByte()
          Returns the receive framing byte
 int getReceiveThreshold()
          Returns the threshold
 int getReceiveTimeout()
          Returns the current timeout
 boolean getRI()
          Same as getDTR
 boolean getRI()
          Same as getDTR
 boolean getRTS()
          Returns the current state of RTS
 int getStopBits()
          Returns the current stop bits setting
 boolean isCD()
          Same as getCD
 boolean isCTS()
          Same as getCTS
 boolean isDSR()
          Same as getDSR
 boolean isDTR()
          Same as getDTR
 boolean isReceiveFramingEnabled()
          Returns the enable state
 boolean isReceiveThresholdEnabled()
          Returns the enable state
 boolean isReceiveTimeoutEnabled()
          Returns the enable state
 boolean isRTS()
          Same as getRTS
 void notifyOnBreakInterrupt(boolean enable)
          Indicates the desire to be notified on this type of event
 void notifyOnCarrierDetect(boolean enable)
          Indicates the desire to be notified on this type of event
 void notifyOnCTS(boolean enable)
          Indicates the desire to be notified on this type of event
 void notifyOnDataAvailable(boolean enable)
          Indicates the desire to be notified on this type of event
 void notifyOnDSR(boolean enable)
          Indicates the desire to be notified on this type of event
 void notifyOnFramingError(boolean enable)
          Indicates the desire to be notified on this type of event
 void notifyOnOutputEmpty(boolean enable)
          Indicates the desire to be notified on this type of event
 void notifyOnOverrunError(boolean enable)
          Indicates the desire to be notified on this type of event
 void notifyOnParityError(boolean enable)
          Indicates the desire to be notified on this type of event
 void notifyOnRingIndicator(boolean enable)
          Indicates the desire to be notified on this type of event
 void removeEventListener()
          Removes an event listener
 void sendBreak(int millis)
          sends a break
 void setBaudRate(int baudRate)
          Sets the baud rate
 void setBitParameters(int dataBits, int stopBits, int parity)
          Sets the serial port bit parameters
 void setDivisor(int divisor)
          Sets the baud rate divisor on the 16552
 void setDTR(boolean dtr)
          Sets DTR if dtr is true or clears DTR if false
 void setFlowControlMode(int flowcontrol)
          Sets flow control
 void setInputBufferSize(int size)
          Sets the input buffer size
 void setOutputBufferSize(int size)
          Sets the output buffer size
 void setRTS(boolean rts)
          Sets DTR if dtr is true or clears DTR if false
 void setSerialPortParams(int baudRate, int dataBits, int stopBits, int parity)
          Sets serial port parameters
 
Methods inherited from class javax.comm.SerialPort
isRI, setRcvFifoTrigger
 
Methods inherited from class javax.comm.CommPort
getName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TINISerialPort

public TINISerialPort(java.lang.String name)
Constructor - attempts to open the requested serial port
Method Detail

close

public void close()
Closes the serial port
Overrides:
close in class javax.comm.CommPort

getBaudRate

public int getBaudRate()
Returns the baud rate in bps
Overrides:
getBaudRate in class javax.comm.SerialPort

getDataBits

public int getDataBits()
Returns current the data bit (word size) setting
Overrides:
getDataBits in class javax.comm.SerialPort

getStopBits

public int getStopBits()
Returns the current stop bits setting
Overrides:
getStopBits in class javax.comm.SerialPort

getParity

public int getParity()
Returns the current parity setting
Overrides:
getParity in class javax.comm.SerialPort

setBitParameters

public void setBitParameters(int dataBits,
                             int stopBits,
                             int parity)
Sets the serial port bit parameters

sendBreak

public void sendBreak(int millis)
sends a break
Overrides:
sendBreak in class javax.comm.SerialPort

setFlowControlMode

public void setFlowControlMode(int flowcontrol)
                        throws javax.comm.UnsupportedCommOperationException
Sets flow control
Overrides:
setFlowControlMode in class javax.comm.SerialPort

getFlowControlMode

public int getFlowControlMode()
Returns the current flow control mode
Overrides:
getFlowControlMode in class javax.comm.SerialPort

setSerialPortParams

public void setSerialPortParams(int baudRate,
                                int dataBits,
                                int stopBits,
                                int parity)
                         throws javax.comm.UnsupportedCommOperationException
Sets serial port parameters
Overrides:
setSerialPortParams in class javax.comm.SerialPort

setDivisor

public void setDivisor(int divisor)
Sets the baud rate divisor on the 16552

setBaudRate

public void setBaudRate(int baudRate)
Sets the baud rate

setDTR

public void setDTR(boolean dtr)
Sets DTR if dtr is true or clears DTR if false
Overrides:
setDTR in class javax.comm.SerialPort

isDTR

public boolean isDTR()
Same as getDTR
Overrides:
isDTR in class javax.comm.SerialPort

getDTR

public boolean getDTR()
Returns the current state of DTR

setRTS

public void setRTS(boolean rts)
Sets DTR if dtr is true or clears DTR if false
Overrides:
setRTS in class javax.comm.SerialPort

isRTS

public boolean isRTS()
Same as getRTS
Overrides:
isRTS in class javax.comm.SerialPort

getRTS

public boolean getRTS()
Returns the current state of RTS

isCTS

public boolean isCTS()
Same as getCTS
Overrides:
isCTS in class javax.comm.SerialPort

getCTS

public boolean getCTS()
Returns the current state of CTS

isDSR

public boolean isDSR()
Same as getDSR
Overrides:
isDSR in class javax.comm.SerialPort

getDSR

public boolean getDSR()
Returns the current state of DSR

getRI

public boolean getRI()
Same as getDTR

getRI

public boolean getRI()
Same as getDTR

isCD

public boolean isCD()
Same as getCD
Overrides:
isCD in class javax.comm.SerialPort

getCD

public boolean getCD()
Returns the current state of CD

addEventListener

public void addEventListener(javax.comm.SerialPortEventListener eventListener)
                      throws java.util.TooManyListenersException
Adds a serial port event listener
Overrides:
addEventListener in class javax.comm.SerialPort

removeEventListener

public void removeEventListener()
Removes an event listener
Overrides:
removeEventListener in class javax.comm.SerialPort

notifyOnDataAvailable

public void notifyOnDataAvailable(boolean enable)
Indicates the desire to be notified on this type of event
Overrides:
notifyOnDataAvailable in class javax.comm.SerialPort

notifyOnOutputEmpty

public void notifyOnOutputEmpty(boolean enable)
Indicates the desire to be notified on this type of event
Overrides:
notifyOnOutputEmpty in class javax.comm.SerialPort

notifyOnCTS

public void notifyOnCTS(boolean enable)
Indicates the desire to be notified on this type of event
Overrides:
notifyOnCTS in class javax.comm.SerialPort

notifyOnDSR

public void notifyOnDSR(boolean enable)
Indicates the desire to be notified on this type of event
Overrides:
notifyOnDSR in class javax.comm.SerialPort

notifyOnRingIndicator

public void notifyOnRingIndicator(boolean enable)
Indicates the desire to be notified on this type of event
Overrides:
notifyOnRingIndicator in class javax.comm.SerialPort

notifyOnCarrierDetect

public void notifyOnCarrierDetect(boolean enable)
Indicates the desire to be notified on this type of event
Overrides:
notifyOnCarrierDetect in class javax.comm.SerialPort

notifyOnOverrunError

public void notifyOnOverrunError(boolean enable)
Indicates the desire to be notified on this type of event
Overrides:
notifyOnOverrunError in class javax.comm.SerialPort

notifyOnParityError

public void notifyOnParityError(boolean enable)
Indicates the desire to be notified on this type of event
Overrides:
notifyOnParityError in class javax.comm.SerialPort

notifyOnFramingError

public void notifyOnFramingError(boolean enable)
Indicates the desire to be notified on this type of event
Overrides:
notifyOnFramingError in class javax.comm.SerialPort

notifyOnBreakInterrupt

public void notifyOnBreakInterrupt(boolean enable)
Indicates the desire to be notified on this type of event
Overrides:
notifyOnBreakInterrupt in class javax.comm.SerialPort

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Returns the serial port input stream
Overrides:
getInputStream in class javax.comm.CommPort

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Returns the serial port output stream
Overrides:
getOutputStream in class javax.comm.CommPort

enableReceiveThreshold

public void enableReceiveThreshold(int thresh)
                            throws javax.comm.UnsupportedCommOperationException
Enables receive threshold
Overrides:
enableReceiveThreshold in class javax.comm.CommPort

disableReceiveThreshold

public void disableReceiveThreshold()
Disables receive threshold
Overrides:
disableReceiveThreshold in class javax.comm.CommPort

isReceiveThresholdEnabled

public boolean isReceiveThresholdEnabled()
Returns the enable state
Overrides:
isReceiveThresholdEnabled in class javax.comm.CommPort

getReceiveThreshold

public int getReceiveThreshold()
Returns the threshold
Overrides:
getReceiveThreshold in class javax.comm.CommPort

enableReceiveTimeout

public void enableReceiveTimeout(int rcvTimeout)
                          throws javax.comm.UnsupportedCommOperationException
Enables receive timeout
Overrides:
enableReceiveTimeout in class javax.comm.CommPort

disableReceiveTimeout

public void disableReceiveTimeout()
Disables receive timeout
Overrides:
disableReceiveTimeout in class javax.comm.CommPort

isReceiveTimeoutEnabled

public boolean isReceiveTimeoutEnabled()
Returns the enable state
Overrides:
isReceiveTimeoutEnabled in class javax.comm.CommPort

getReceiveTimeout

public int getReceiveTimeout()
Returns the current timeout
Overrides:
getReceiveTimeout in class javax.comm.CommPort

enableReceiveFraming

public void enableReceiveFraming(int framingByte)
                          throws javax.comm.UnsupportedCommOperationException
Enables receive framing
Overrides:
enableReceiveFraming in class javax.comm.CommPort

disableReceiveFraming

public void disableReceiveFraming()
Disables receive framing
Overrides:
disableReceiveFraming in class javax.comm.CommPort

isReceiveFramingEnabled

public boolean isReceiveFramingEnabled()
Returns the enable state
Overrides:
isReceiveFramingEnabled in class javax.comm.CommPort

getReceiveFramingByte

public int getReceiveFramingByte()
Returns the receive framing byte
Overrides:
getReceiveFramingByte in class javax.comm.CommPort

setInputBufferSize

public void setInputBufferSize(int size)
Sets the input buffer size
Overrides:
setInputBufferSize in class javax.comm.CommPort

getInputBufferSize

public int getInputBufferSize()
Returns the input buffer size
Overrides:
getInputBufferSize in class javax.comm.CommPort

setOutputBufferSize

public void setOutputBufferSize(int size)
Sets the output buffer size
Overrides:
setOutputBufferSize in class javax.comm.CommPort

getOutputBufferSize

public int getOutputBufferSize()
Returns the current output buffer size
Overrides:
getOutputBufferSize in class javax.comm.CommPort