1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5 <!-- Generated by javadoc (build 1.5.0_09) on Tue Jan 08 20:46:01 GMT 2008 -->
7 RCXAbstractPort (leJOS NXT API documentation)
10 <META NAME="keywords" CONTENT="lejos.rcxcomm.RCXAbstractPort class">
12 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
14 <SCRIPT type="text/javascript">
15 function windowTitle()
17 parent.document.title="RCXAbstractPort (leJOS NXT API documentation)";
25 <BODY BGCOLOR="white" onload="windowTitle();">
28 <!-- ========= START OF TOP NAVBAR ======= -->
29 <A NAME="navbar_top"><!-- --></A>
30 <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
31 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
33 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
34 <A NAME="navbar_top_firstrow"><!-- --></A>
35 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
36 <TR ALIGN="center" VALIGN="top">
37 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
38 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
39 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
42 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
47 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
53 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
54 <A HREF="../../lejos/rcxcomm/PacketHandler.html" title="class in lejos.rcxcomm"><B>PREV CLASS</B></A>
55 <A HREF="../../lejos/rcxcomm/RCXPort.html" title="class in lejos.rcxcomm"><B>NEXT CLASS</B></A></FONT></TD>
56 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
57 <A HREF="../../index.html?lejos/rcxcomm/RCXAbstractPort.html" target="_top"><B>FRAMES</B></A>
58 <A HREF="RCXAbstractPort.html" target="_top"><B>NO FRAMES</B></A>
59 <SCRIPT type="text/javascript">
62 document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
67 <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
74 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
75 SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
76 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
77 DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
80 <A NAME="skip-navbar_top"></A>
81 <!-- ========= END OF TOP NAVBAR ========= -->
84 <!-- ======== START OF CLASS DATA ======== -->
89 Class RCXAbstractPort</H2>
91 <A HREF="../../java/lang/Object.html" title="class in java.lang">java.lang.Object</A>
92 <IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>lejos.rcxcomm.RCXAbstractPort</B>
95 <DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../lejos/rcxcomm/RCXPort.html" title="class in lejos.rcxcomm">RCXPort</A></DD>
99 <DT><PRE>public abstract class <B>RCXAbstractPort</B><DT>extends <A HREF="../../java/lang/Object.html" title="class in java.lang">Object</A></DL>
103 RCXAbstractPort provides an interface similar to java.net.Socket
104 Adapted from original code created by the LEGO3 Team at DTU-IAU
105 RCXAbstractPort implements input and output stream handling and input
106 buffering. It uses a packet handler for sending and receivng packets.
107 This version is abstract because it has no packet handler defined.
108 Specific versions of RCXAbstractPort override the constructor and
109 set up the packet handler to use a specific protocol stack.
114 <DT><B>Author:</B></DT>
115 <DD>Brian Bagnall, Lawrie Griffiths</DD>
120 <!-- =========== FIELD SUMMARY =========== -->
122 <A NAME="field_summary"><!-- --></A>
123 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
124 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
125 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
126 <B>Field Summary</B></FONT></TH>
128 <TR BGCOLOR="white" CLASS="TableRowColor">
129 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
130 <CODE>protected <A HREF="../../lejos/rcxcomm/PacketHandler.html" title="class in lejos.rcxcomm">PacketHandler</A></CODE></FONT></TD>
131 <TD><CODE><B><A HREF="../../lejos/rcxcomm/RCXAbstractPort.html#packetHandler">packetHandler</A></B></CODE>
134 </TD>
138 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
140 <A NAME="constructor_summary"><!-- --></A>
141 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
142 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
143 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
144 <B>Constructor Summary</B></FONT></TH>
146 <TR BGCOLOR="white" CLASS="TableRowColor">
147 <TD><CODE><B><A HREF="../../lejos/rcxcomm/RCXAbstractPort.html#RCXAbstractPort(lejos.rcxcomm.PacketHandler)">RCXAbstractPort</A></B>(<A HREF="../../lejos/rcxcomm/PacketHandler.html" title="class in lejos.rcxcomm">PacketHandler</A> handler)</CODE>
150 Constructor for the RCXAbstractPort.</TD>
154 <!-- ========== METHOD SUMMARY =========== -->
156 <A NAME="method_summary"><!-- --></A>
157 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
158 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
159 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
160 <B>Method Summary</B></FONT></TH>
162 <TR BGCOLOR="white" CLASS="TableRowColor">
163 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
164 <CODE> void</CODE></FONT></TD>
165 <TD><CODE><B><A HREF="../../lejos/rcxcomm/RCXAbstractPort.html#close()">close</A></B>()</CODE>
168 Closes this RCXPort, stopping the Listener thread.</TD>
170 <TR BGCOLOR="white" CLASS="TableRowColor">
171 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
172 <CODE> <A HREF="../../java/io/InputStream.html" title="class in java.io">InputStream</A></CODE></FONT></TD>
173 <TD><CODE><B><A HREF="../../lejos/rcxcomm/RCXAbstractPort.html#getInputStream()">getInputStream</A></B>()</CODE>
176 Returns an input stream for this RCXPort.</TD>
178 <TR BGCOLOR="white" CLASS="TableRowColor">
179 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
180 <CODE> <A HREF="../../java/io/OutputStream.html" title="class in java.io">OutputStream</A></CODE></FONT></TD>
181 <TD><CODE><B><A HREF="../../lejos/rcxcomm/RCXAbstractPort.html#getOutputStream()">getOutputStream</A></B>()</CODE>
184 Returns an output stream for this RCXPort.</TD>
186 <TR BGCOLOR="white" CLASS="TableRowColor">
187 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
188 <CODE> int</CODE></FONT></TD>
189 <TD><CODE><B><A HREF="../../lejos/rcxcomm/RCXAbstractPort.html#getTimeOut()">getTimeOut</A></B>()</CODE>
192 Getter for property timeOut.</TD>
194 <TR BGCOLOR="white" CLASS="TableRowColor">
195 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
196 <CODE> void</CODE></FONT></TD>
197 <TD><CODE><B><A HREF="../../lejos/rcxcomm/RCXAbstractPort.html#reset()">reset</A></B>()</CODE>
200 Resets sequence numbers for this port</TD>
202 <TR BGCOLOR="white" CLASS="TableRowColor">
203 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
204 <CODE> void</CODE></FONT></TD>
205 <TD><CODE><B><A HREF="../../lejos/rcxcomm/RCXAbstractPort.html#setTimeOut(int)">setTimeOut</A></B>(int timeOut)</CODE>
208 Setter for property timeOut.</TD>
211 <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
212 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
213 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
214 <TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="../../java/lang/Object.html" title="class in java.lang">Object</A></B></TH>
216 <TR BGCOLOR="white" CLASS="TableRowColor">
217 <TD><CODE><A HREF="../../java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../java/lang/Object.html#toString()">toString</A>, <A HREF="../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../java/lang/Object.html#wait(long)">wait</A></CODE></TD>
223 <!-- ============ FIELD DETAIL =========== -->
225 <A NAME="field_detail"><!-- --></A>
226 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
227 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
228 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
229 <B>Field Detail</B></FONT></TH>
233 <A NAME="packetHandler"><!-- --></A><H3>
236 protected <A HREF="../../lejos/rcxcomm/PacketHandler.html" title="class in lejos.rcxcomm">PacketHandler</A> <B>packetHandler</B></PRE>
242 <!-- ========= CONSTRUCTOR DETAIL ======== -->
244 <A NAME="constructor_detail"><!-- --></A>
245 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
246 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
247 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
248 <B>Constructor Detail</B></FONT></TH>
252 <A NAME="RCXAbstractPort(lejos.rcxcomm.PacketHandler)"><!-- --></A><H3>
255 public <B>RCXAbstractPort</B>(<A HREF="../../lejos/rcxcomm/PacketHandler.html" title="class in lejos.rcxcomm">PacketHandler</A> handler)
256 throws <A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
258 <DD>Constructor for the RCXAbstractPort.
259 Opens the port, and sets the protocol packet handler.
262 <DT><B>Parameters:</B><DD><CODE>handler</CODE> - the packet handler
264 <DD><CODE><A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></CODE></DL>
267 <!-- ============ METHOD DETAIL ========== -->
269 <A NAME="method_detail"><!-- --></A>
270 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
271 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
272 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
273 <B>Method Detail</B></FONT></TH>
277 <A NAME="getInputStream()"><!-- --></A><H3>
280 public <A HREF="../../java/io/InputStream.html" title="class in java.io">InputStream</A> <B>getInputStream</B>()</PRE>
282 <DD>Returns an input stream for this RCXPort.
286 <DT><B>Returns:</B><DD>an input stream for reading bytes from this RCXPort.</DL>
291 <A NAME="getOutputStream()"><!-- --></A><H3>
294 public <A HREF="../../java/io/OutputStream.html" title="class in java.io">OutputStream</A> <B>getOutputStream</B>()</PRE>
296 <DD>Returns an output stream for this RCXPort.
300 <DT><B>Returns:</B><DD>an output stream for writing bytes to this RCXPort.</DL>
305 <A NAME="reset()"><!-- --></A><H3>
308 public void <B>reset</B>()</PRE>
310 <DD>Resets sequence numbers for this port
318 <A NAME="close()"><!-- --></A><H3>
321 public void <B>close</B>()</PRE>
323 <DD>Closes this RCXPort, stopping the Listener thread.
331 <A NAME="getTimeOut()"><!-- --></A><H3>
334 public int <B>getTimeOut</B>()</PRE>
336 <DD>Getter for property timeOut.
340 <DT><B>Returns:</B><DD>Value of property timeOut.</DL>
345 <A NAME="setTimeOut(int)"><!-- --></A><H3>
348 public void <B>setTimeOut</B>(int timeOut)</PRE>
350 <DD>Setter for property timeOut.
353 <DT><B>Parameters:</B><DD><CODE>timeOut</CODE> - New value of property timeOut.</DL>
356 <!-- ========= END OF CLASS DATA ========= -->
360 <!-- ======= START OF BOTTOM NAVBAR ====== -->
361 <A NAME="navbar_bottom"><!-- --></A>
362 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
363 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
365 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
366 <A NAME="navbar_bottom_firstrow"><!-- --></A>
367 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
368 <TR ALIGN="center" VALIGN="top">
369 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
370 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
371 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
372 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
373 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
374 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
375 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
379 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
385 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
386 <A HREF="../../lejos/rcxcomm/PacketHandler.html" title="class in lejos.rcxcomm"><B>PREV CLASS</B></A>
387 <A HREF="../../lejos/rcxcomm/RCXPort.html" title="class in lejos.rcxcomm"><B>NEXT CLASS</B></A></FONT></TD>
388 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
389 <A HREF="../../index.html?lejos/rcxcomm/RCXAbstractPort.html" target="_top"><B>FRAMES</B></A>
390 <A HREF="RCXAbstractPort.html" target="_top"><B>NO FRAMES</B></A>
391 <SCRIPT type="text/javascript">
394 document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
399 <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
406 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
407 SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
408 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
409 DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
412 <A NAME="skip-navbar_bottom"></A>
413 <!-- ======== END OF BOTTOM NAVBAR ======= -->