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

📄 javax.comm.serialport.html

📁 java串口通讯api
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<b>PARITY_SPACE</b>
<pre>
 public static final int PARITY_SPACE
</pre>
<dl>
  <dd> SPACE parity scheme.<p>
</dl>
<a name="FLOWCONTROL_NONE"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>FLOWCONTROL_NONE</b>
<pre>
 public static final int FLOWCONTROL_NONE
</pre>
<dl>
  <dd> Flow control off.<p>
</dl>
<a name="FLOWCONTROL_RTSCTS_IN"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>FLOWCONTROL_RTSCTS_IN</b>
<pre>
 public static final int FLOWCONTROL_RTSCTS_IN
</pre>
<dl>
  <dd> RTS/CTS flow control on input.<p>
</dl>
<a name="FLOWCONTROL_RTSCTS_OUT"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>FLOWCONTROL_RTSCTS_OUT</b>
<pre>
 public static final int FLOWCONTROL_RTSCTS_OUT
</pre>
<dl>
  <dd> RTS/CTS flow control on output.<p>
</dl>
<a name="FLOWCONTROL_XONXOFF_IN"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>FLOWCONTROL_XONXOFF_IN</b>
<pre>
 public static final int FLOWCONTROL_XONXOFF_IN
</pre>
<dl>
  <dd> XON/XOFF flow control on input.<p>
</dl>
<a name="FLOWCONTROL_XONXOFF_OUT"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>FLOWCONTROL_XONXOFF_OUT</b>
<pre>
 public static final int FLOWCONTROL_XONXOFF_OUT
</pre>
<dl>
  <dd> XON/XOFF flow control on output.<p>
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="SerialPort"></a>
<a name="SerialPort()"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>SerialPort</b>
<pre>
 public SerialPort()
</pre>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="getBaudRate()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getBaudRate"><b>getBaudRate</b></a>
<pre>
 public abstract int getBaudRate()
</pre>
<dl>
  <dd> Gets the currently configured baud rate.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> integer value indicating the baud rate
  </dl></dd>
</dl>
<a name="getDataBits()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getDataBits"><b>getDataBits</b></a>
<pre>
 public abstract int getDataBits()
</pre>
<dl>
  <dd> Gets the currently configured number of data bits.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> integer that can be equal to DATABITS_5, DATABITS_6,		DATABITS_7, or DATABITS_8
  </dl></dd>
</dl>
<a name="getStopBits()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getStopBits"><b>getStopBits</b></a>
<pre>
 public abstract int getStopBits()
</pre>
<dl>
  <dd> Gets the currently defined stop bits.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> integer that can be equal to STOPBITS_1,		STOPBITS_2, or STOPBITS_1_5
  </dl></dd>
</dl>
<a name="getParity()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getParity"><b>getParity</b></a>
<pre>
 public abstract int getParity()
</pre>
<dl>
  <dd> Get the currently configured parity setting.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> integer that can be equal to PARITY_NONE,		PARITY_ODD, PARITY_EVEN, PARITY_MARK or PARITY_SPACE.
  </dl></dd>
</dl>
<a name="sendBreak(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="sendBreak"><b>sendBreak</b></a>
<pre>
 public abstract void sendBreak(int millis)
</pre>
<dl>
  <dd> Sends a break of <CODE>millis</CODE> milliseconds duration. Note that it may not be possible to time the duration of the break under certain Operating Systems. Hence this parameter is advisory.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> millis - duration of break to send
  </dl></dd>
</dl>
<a name="setFlowControlMode(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setFlowControlMode"><b>setFlowControlMode</b></a>
<pre>
 public abstract void setFlowControlMode(int flowcontrol) throws <a href="javax.comm.UnsupportedCommOperationException.html#_top_">UnsupportedCommOperationException</a>
</pre>
<dl>
  <dd> Sets the flow control mode.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> flow - control	Can be a bitmask combination of	<UL>  <LI>  FLOWCONTROL_NONE:          no flow control	<LI>  FLOWCONTROL_RTSCTS_IN:     RTS/CTS (hardware) flow control for input	<LI>	FLOWCONTROL_RTSCTS_OUT:	RTS/CTS (hardware) flow control for output	<LI>	FLOWCONTROL_XONXOFF_IN:	XON/XOFF (software) flow control for input	<LI>	FLOWCONTROL_XONXOFF_OUT:	XON/XOFF (software) flow control for output
    <dt> <b>Throws:</b> <a href="javax.comm.UnsupportedCommOperationException.html#_top_">UnsupportedCommOperationException</a>
    <dd> if any of the			flow control mode was not supported by the underline                  OS, or if input and output flow control are set to                   different values, i.e. one hardware and one software.                  The flow control mode will revert to the                  value before the call was made.  </UL>
  </dl></dd>
</dl>
<a name="getFlowControlMode()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getFlowControlMode"><b>getFlowControlMode</b></a>
<pre>
 public abstract int getFlowControlMode()
</pre>
<dl>
  <dd> Gets the currently configured flow control mode.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> an integer bitmask of the modes FLOWCONTROL_NONE,		FLOWCONTROL_RTSCTS_IN, FLOWCONTROL_RTSCTS_OUT,		FLOWCONTROL_XONXOFF_IN, and FLOWCONTROL_XONXOFF_OUT.
  </dl></dd>
</dl>
<a name="setRcvFifoTrigger(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setRcvFifoTrigger"><b>setRcvFifoTrigger</b></a>
<pre>
 public void setRcvFifoTrigger(int trigger)
</pre>
<dl>
<dd><b> Note: setRcvFifoTrigger() is deprecated.</b>
<i>This was advisory only.</i>
<p>
  <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.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> trigger - level
  </dl></dd>
</dl>
<a name="setSerialPortParams(int, int, int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setSerialPortParams"><b>setSerialPortParams</b></a>
<pre>
 public abstract void setSerialPortParams(int baudrate,
                                          int dataBits,
                                          int stopBits,
                                          int parity) throws <a href="javax.comm.UnsupportedCommOperationException.html#_top_">UnsupportedCommOperationException</a>
</pre>
<dl>
  <dd> Sets serial port parameters.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> baudrate - If the baudrate passed in by the application is unsupported by the driver, the driver will throw an UnsupportedCommOperationException
    <dd> dataBits - <UL> <LI> DATABITS_5:		5 bits <LI> DATABITS_6:		6 bits <LI> DATABITS_7:		7 bits <LI> DATABITS_8:		8 bits</UL>
    <dd> stopBits - <UL> <LI> STOPBITS_1:		1 stop bit <LI> STOPBITS_2:		2 stop bits <LI> STOPBITS_1_5:	1.5 stop bits </UL>
    <dd> parity - <UL> <LI> PARITY_NONE:		no parity <LI> PARITY_ODD:		odd parity <LI> PARITY_EVEN:		even parity <LI> PARITY_MARK:		mark parity <LI> PARITY_SPACE:		space parity </UL>
    <dt> <b>Throws:</b> <a href="javax.comm.UnsupportedCommOperationException.html#_top_">UnsupportedCommOperationException</a>
    <dd> if any of the			above parameters are specified incorrectly.                  All four of the parameters will revert to the                  values before the call was made. <P> DEFAULT: 9600 baud, 8 data bits, 1 stop bit, no parity
  </dl></dd>
</dl>
<a name="setDTR(boolean)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setDTR"><b>setDTR</b></a>
<pre>
 public abstract void setDTR(boolean dtr)
</pre>
<dl>
  <dd> Sets or clears the DTR (Data Terminal Ready) bit in the UART.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> dtr - <UL>  <LI>	true:	set DTR  <LI>	true:	clear DTR	</UL>
  </dl></dd>
</dl>
<a name="isDTR()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="isDTR"><b>isDTR</b></a>
<pre>
 public abstract boolean isDTR()
</pre>
<dl>
  <dd> Gets the state of the DTR (Data Terminal Ready) bit in the UART.
<p>
</dl>
<a name="setRTS(boolean)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setRTS"><b>setRTS</b></a>
<pre>
 public abstract void setRTS(boolean rts)
</pre>
<dl>
  <dd> Sets or clears the RTS (Request To Send) bit in the UART.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> rts - <UL>  <LI>	true:	set RTS  <LI>	true:	clear RTS	</UL>
  </dl></dd>
</dl>
<a name="isRTS()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="isRTS"><b>isRTS</b></a>
<pre>
 public abstract boolean isRTS()
</pre>
<dl>

⌨️ 快捷键说明

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