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

📄 javax.comm.serialportevent.html

📁 java串口通讯api
💻 HTML
字号:
<!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.SerialPortEvent
</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.SerialPort.html#_top_">Previous</a>  <a href="Package-javax.comm.html">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class javax.comm.SerialPortEvent
</h1>
<pre>
java.lang.Object
   |
   +----java.util.EventObject
           |
           +----javax.comm.SerialPortEvent
</pre>
<hr>
<dl>
  <dt> public class <b>SerialPortEvent</b>
  <dt> extends EventObject
</dl>
A serial port event.
<p>
<dl>
    <dt> <b>See Also:</b>
    <dd> <a href="javax.comm.SerialPort.html#_top_">SerialPort</a>, SeriallPortEventListener, EventObject
</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="#BI"><b>BI</b></a>
  <dd>  Break interrupt.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#CD"><b>CD</b></a>
  <dd>  Carrier detect.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#CTS"><b>CTS</b></a>
  <dd>  Clear to send.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#DATA_AVAILABLE"><b>DATA_AVAILABLE</b></a>
  <dd>  Data available at the serial port.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#DSR"><b>DSR</b></a>
  <dd>  Data set ready.
  <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#eventType"><b>eventType</b></a>
  <dd>  The type of event.
<b>Deprecated.</b>
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#FE"><b>FE</b></a>
  <dd>  Framing error.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#OE"><b>OE</b></a>
  <dd>  Overrun error.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#OUTPUT_BUFFER_EMPTY"><b>OUTPUT_BUFFER_EMPTY</b></a>
  <dd>  Output buffer is empty.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#PE"><b>PE</b></a>
  <dd>  Parity error.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#RI"><b>RI</b></a>
  <dd>  Ring indicator.
</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="#SerialPortEvent(javax.comm.SerialPort, int, boolean, boolean)"><b>SerialPortEvent</b></a>(SerialPort, int, boolean, boolean)
  <dd>  Constructs a <CODE>SerialPortEvent</CODE> with the specified serial port, event type, old and new values.
</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="#getEventType()"><b>getEventType</b></a>()
  <dd>  Gets the type of this event.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getNewValue()"><b>getNewValue</b></a>()
  <dd>  Gets the new value of the state change that caused the <CODE>SerialPortEvent</CODE> to be propagated.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getOldValue()"><b>getOldValue</b></a>()
  <dd>  Gets the old value of the state change that caused the <CODE>SerialPortEvent</CODE> to be propagated.
</dl>
<a name="variables"></a>
<h2>
  <img src="images/variables.gif" width=153 height=38 alt="Variables">
</h2>
<a name="eventType"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a>
<b>eventType</b>
<pre>
 public int eventType
</pre>
<dl>
<dd><b> Note: eventType is deprecated.</b>
<i>Replaced by <CODE>getEventType</CODE> method.</i>
<p>
  <dd> The type of event.<p>
</dl>
<a name="DATA_AVAILABLE"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>DATA_AVAILABLE</b>
<pre>
 public static final int DATA_AVAILABLE
</pre>
<dl>
  <dd> Data available at the serial port. This event will be generated once when new data arrive at the serial port. Even if the user doesn't  read the data, it won't be generated again until next time new data  arrive.<p>
</dl>
<a name="OUTPUT_BUFFER_EMPTY"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>OUTPUT_BUFFER_EMPTY</b>
<pre>
 public static final int OUTPUT_BUFFER_EMPTY
</pre>
<dl>
  <dd> Output buffer is empty. The event will be generated after a write is  completed, when the system buffer becomes empty again.<p>
</dl>
<a name="CTS"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>CTS</b>
<pre>
 public static final int CTS
</pre>
<dl>
  <dd> Clear to send.<p>
</dl>
<a name="DSR"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>DSR</b>
<pre>
 public static final int DSR
</pre>
<dl>
  <dd> Data set ready.<p>
</dl>
<a name="RI"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>RI</b>
<pre>
 public static final int RI
</pre>
<dl>
  <dd> Ring indicator.<p>
</dl>
<a name="CD"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>CD</b>
<pre>
 public static final int CD
</pre>
<dl>
  <dd> Carrier detect.<p>
</dl>
<a name="OE"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>OE</b>
<pre>
 public static final int OE
</pre>
<dl>
  <dd> Overrun error.<p>
</dl>
<a name="PE"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>PE</b>
<pre>
 public static final int PE
</pre>
<dl>
  <dd> Parity error.<p>
</dl>
<a name="FE"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>FE</b>
<pre>
 public static final int FE
</pre>
<dl>
  <dd> Framing error.<p>
</dl>
<a name="BI"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>BI</b>
<pre>
 public static final int BI
</pre>
<dl>
  <dd> Break interrupt.<p>
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="SerialPortEvent"></a>
<a name="SerialPortEvent(javax.comm.SerialPort, int, boolean, boolean)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>SerialPortEvent</b>
<pre>
 public SerialPortEvent(<a href="javax.comm.SerialPort.html#_top_">SerialPort</a> srcport,
                        int eventtype,
                        boolean oldvalue,
                        boolean newvalue)
</pre>
<dl>
  <dd> Constructs a <CODE>SerialPortEvent</CODE> with the specified serial port, event type, old and new values. Application programs should not directly create <CODE>SerialPortEvent</CODE> objects.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> srcport - source parallel port
    <dd> eventtype - event type
    <dd> oldvalue - old value
    <dd> newvalue - new value
  </dl></dd>
</dl>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="getEventType()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getEventType"><b>getEventType</b></a>
<pre>
 public int getEventType()
</pre>
<dl>
  <dd> Gets the type of this event.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> integer that can be equal to one of the following static variables:          <CODE>BI</CODE>,          <CODE>CD</CODE>,          <CODE>CTS</CODE>,          <CODE>DATA_AVAILABLE</CODE>,          <CODE>DSR</CODE>,          <CODE>FE</CODE>,          <CODE>OE</CODE>,          <CODE>OUTPUT_BUFFER_EMPTY</CODE>,          <CODE>PE</CODE> or          <CODE>RI</CODE>.
  </dl></dd>
</dl>
<a name="getNewValue()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getNewValue"><b>getNewValue</b></a>
<pre>
 public boolean getNewValue()
</pre>
<dl>
  <dd> Gets the new value of the state change that caused the <CODE>SerialPortEvent</CODE> to be propagated. For example, when the CD bit changes, <CODE>newValue</CODE> reflects the new value of the CD bit.
<p>
</dl>
<a name="getOldValue()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getOldValue"><b>getOldValue</b></a>
<pre>
 public boolean getOldValue()
</pre>
<dl>
  <dd> Gets the old value of the state change that caused the <CODE>SerialPortEvent</CODE> to be propagated. For example, when the CD bit changes, <CODE>oldValue</CODE> reflects the old value of the CD bit.
<p>
</dl>
<hr>
<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.SerialPort.html#_top_">Previous</a>  <a href="Package-javax.comm.html">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>

⌨️ 快捷键说明

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