⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 javax.comm.serialport.html

📁 java串口通讯api
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Sun Nov 15 16:06:15 PST 1998 -->
<title>
  Class javax.comm.SerialPort
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-javax.comm.html">This Package</a>  <a href="javax.comm.ParallelPortEvent.html#_top_">Previous</a>  <a href="javax.comm.SerialPortEvent.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class javax.comm.SerialPort
</h1>
<pre>
java.lang.Object
   |
   +----<a href="javax.comm.CommPort.html#_top_">javax.comm.CommPort</a>
           |
           +----javax.comm.SerialPort
</pre>
<hr>
<dl>
  <dt> public abstract class <b>SerialPort</b>
  <dt> extends <a href="javax.comm.CommPort.html#_top_">CommPort</a>
</dl>
An RS-232 serial communications port. <CODE>SerialPort</CODE> describes the low-level interface to a serial communications port made available by the underlying system. <CODE>SerialPort</CODE> defines the minimum required functionality for serial communications ports.
<p>
<dl>
    <dt> <b>See Also:</b>
    <dd> <a href="javax.comm.CommPort.html#_top_">CommPort</a>, <a href="javax.comm.CommPortIdentifier.html#_top_">CommPortIdentifier</a>
</dl>
<hr>
<a name="index"></a>
<h2>
  <img src="images/variable-index.gif" width=207 height=38 alt="Variable Index">
</h2>
<dl>
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#DATABITS_5"><b>DATABITS_5</b></a>
  <dd>  5 data bit format.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#DATABITS_6"><b>DATABITS_6</b></a>
  <dd>  6 data bit format.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#DATABITS_7"><b>DATABITS_7</b></a>
  <dd>  7 data bit format.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#DATABITS_8"><b>DATABITS_8</b></a>
  <dd>  8 data bit format.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#FLOWCONTROL_NONE"><b>FLOWCONTROL_NONE</b></a>
  <dd>  Flow control off.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#FLOWCONTROL_RTSCTS_IN"><b>FLOWCONTROL_RTSCTS_IN</b></a>
  <dd>  RTS/CTS flow control on input.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#FLOWCONTROL_RTSCTS_OUT"><b>FLOWCONTROL_RTSCTS_OUT</b></a>
  <dd>  RTS/CTS flow control on output.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#FLOWCONTROL_XONXOFF_IN"><b>FLOWCONTROL_XONXOFF_IN</b></a>
  <dd>  XON/XOFF flow control on input.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#FLOWCONTROL_XONXOFF_OUT"><b>FLOWCONTROL_XONXOFF_OUT</b></a>
  <dd>  XON/XOFF flow control on output.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#PARITY_EVEN"><b>PARITY_EVEN</b></a>
  <dd>  EVEN parity scheme.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#PARITY_MARK"><b>PARITY_MARK</b></a>
  <dd>  MARK parity scheme.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#PARITY_NONE"><b>PARITY_NONE</b></a>
  <dd>  No parity bit.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#PARITY_ODD"><b>PARITY_ODD</b></a>
  <dd>  ODD parity scheme.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#PARITY_SPACE"><b>PARITY_SPACE</b></a>
  <dd>  SPACE parity scheme.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#STOPBITS_1"><b>STOPBITS_1</b></a>
  <dd>  Number of STOP bits - 1.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#STOPBITS_1_5"><b>STOPBITS_1_5</b></a>
  <dd>  Number of STOP bits - 1-1/2.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#STOPBITS_2"><b>STOPBITS_2</b></a>
  <dd>  Number of STOP bits - 2.
</dl>
<h2>
  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#SerialPort()"><b>SerialPort</b></a>()
  <dd> 
</dl>
<h2>
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#addEventListener(javax.comm.SerialPortEventListener)"><b>addEventListener</b></a>(SerialPortEventListener)
  <dd>  Registers a <CODE>SerialPortEventListener</CODE> object to listen for <CODE>SerialEvent</CODE>s.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getBaudRate()"><b>getBaudRate</b></a>()
  <dd>  Gets the currently configured baud rate.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getDataBits()"><b>getDataBits</b></a>()
  <dd>  Gets the currently configured number of data bits.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getFlowControlMode()"><b>getFlowControlMode</b></a>()
  <dd>  Gets the currently configured flow control mode.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getParity()"><b>getParity</b></a>()
  <dd>  Get the currently configured parity setting.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getStopBits()"><b>getStopBits</b></a>()
  <dd>  Gets the currently defined stop bits.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#isCD()"><b>isCD</b></a>()
  <dd>  Gets the state of the CD (Carrier Detect) bit in the UART.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#isCTS()"><b>isCTS</b></a>()
  <dd>  Gets the state of the CTS (Clear To Send) bit in the UART.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#isDSR()"><b>isDSR</b></a>()
  <dd>  Gets the state of the DSR (Data Set Ready) bit in the UART.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#isDTR()"><b>isDTR</b></a>()
  <dd>  Gets the state of the DTR (Data Terminal Ready) bit in the UART.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#isRI()"><b>isRI</b></a>()
  <dd>  Gets the state of the RI (Ring Indicator) bit in the UART.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#isRTS()"><b>isRTS</b></a>()
  <dd>  Gets the state of the RTS (Request To Send) bit in the UART.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#notifyOnBreakInterrupt(boolean)"><b>notifyOnBreakInterrupt</b></a>(boolean)
  <dd>  Expresses interest in receiving notification when there is a break interrupt on the line.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#notifyOnCarrierDetect(boolean)"><b>notifyOnCarrierDetect</b></a>(boolean)
  <dd>  Expresses interest in receiving notification when the CD (Carrier Detect) bit changes.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#notifyOnCTS(boolean)"><b>notifyOnCTS</b></a>(boolean)
  <dd>  Expresses interest in receiving notification when the CTS (Clear To Send) bit changes.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#notifyOnDataAvailable(boolean)"><b>notifyOnDataAvailable</b></a>(boolean)
  <dd>  Expresses interest in receiving notification when input data is available.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#notifyOnDSR(boolean)"><b>notifyOnDSR</b></a>(boolean)
  <dd>  Expresses interest in receiving notification when the DSR (Data Set Ready) bit changes.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#notifyOnFramingError(boolean)"><b>notifyOnFramingError</b></a>(boolean)
  <dd>  Expresses interest in receiving notification when there is a framing error.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#notifyOnOutputEmpty(boolean)"><b>notifyOnOutputEmpty</b></a>(boolean)
  <dd>  Expresses interest in receiving notification when the output buffer is empty.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#notifyOnOverrunError(boolean)"><b>notifyOnOverrunError</b></a>(boolean)
  <dd>  Expresses interest in receiving notification when there is an overrun error.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#notifyOnParityError(boolean)"><b>notifyOnParityError</b></a>(boolean)
  <dd>  Expresses interest in receiving notification when there is a parity error.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#notifyOnRingIndicator(boolean)"><b>notifyOnRingIndicator</b></a>(boolean)
  <dd>  Expresses interest in receiving notification when the RI (Ring Indicator) bit changes.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#removeEventListener()"><b>removeEventListener</b></a>()
  <dd>  Deregisters event listener registered using <CODE>addEventListener</CODE>.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#sendBreak(int)"><b>sendBreak</b></a>(int)
  <dd>  Sends a break of <CODE>millis</CODE> milliseconds duration.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setDTR(boolean)"><b>setDTR</b></a>(boolean)
  <dd>  Sets or clears the DTR (Data Terminal Ready) bit in the UART.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setFlowControlMode(int)"><b>setFlowControlMode</b></a>(int)
  <dd>  Sets the flow control mode.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setRcvFifoTrigger(int)"><b>setRcvFifoTrigger</b></a>(int)
  <dd>  Set the Receive Fifo trigger level If the uart has a FIFO and if it can have programmable trigger levels, then this method will cause the uart to raise an interrupt after trigger bytes have been received.
<b>Deprecated.</b>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setRTS(boolean)"><b>setRTS</b></a>(boolean)
  <dd>  Sets or clears the RTS (Request To Send) bit in the UART.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setSerialPortParams(int, int, int, int)"><b>setSerialPortParams</b></a>(int, int, int, int)
  <dd>  Sets serial port parameters.
</dl>
<a name="variables"></a>
<h2>
  <img src="images/variables.gif" width=153 height=38 alt="Variables">
</h2>
<a name="DATABITS_5"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>DATABITS_5</b>
<pre>
 public static final int DATABITS_5
</pre>
<dl>
  <dd> 5 data bit format.<p>
</dl>
<a name="DATABITS_6"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>DATABITS_6</b>
<pre>
 public static final int DATABITS_6
</pre>
<dl>
  <dd> 6 data bit format.<p>
</dl>
<a name="DATABITS_7"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>DATABITS_7</b>
<pre>
 public static final int DATABITS_7
</pre>
<dl>
  <dd> 7 data bit format.<p>
</dl>
<a name="DATABITS_8"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>DATABITS_8</b>
<pre>
 public static final int DATABITS_8
</pre>
<dl>
  <dd> 8 data bit format.<p>
</dl>
<a name="STOPBITS_1"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>STOPBITS_1</b>
<pre>
 public static final int STOPBITS_1
</pre>
<dl>
  <dd> Number of STOP bits - 1.<p>
</dl>
<a name="STOPBITS_2"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>STOPBITS_2</b>
<pre>
 public static final int STOPBITS_2
</pre>
<dl>
  <dd> Number of STOP bits - 2.<p>
</dl>
<a name="STOPBITS_1_5"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>STOPBITS_1_5</b>
<pre>
 public static final int STOPBITS_1_5
</pre>
<dl>
  <dd> Number of STOP bits - 1-1/2. Some UARTs permit 1-1/2 STOP bits only with 5 data bit format, but permit 1 or 2 STOP bits with any format.<p>
</dl>
<a name="PARITY_NONE"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>PARITY_NONE</b>
<pre>
 public static final int PARITY_NONE
</pre>
<dl>
  <dd> No parity bit.<p>
</dl>
<a name="PARITY_ODD"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>PARITY_ODD</b>
<pre>
 public static final int PARITY_ODD
</pre>
<dl>
  <dd> ODD parity scheme. The parity bit is added so there are an odd  number of TRUE bits.<p>
</dl>
<a name="PARITY_EVEN"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>PARITY_EVEN</b>
<pre>
 public static final int PARITY_EVEN
</pre>
<dl>
  <dd> EVEN parity scheme. The parity bit is added so there are an even number of TRUE bits.<p>
</dl>
<a name="PARITY_MARK"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>PARITY_MARK</b>
<pre>
 public static final int PARITY_MARK
</pre>
<dl>
  <dd> MARK parity scheme.<p>
</dl>
<a name="PARITY_SPACE"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -