OSDN Git Service

lejos_NXJ_win32_0_5_0beta.zip
[nxt-jsp/lejos_nxj.git] / nxtOSEK / lejos_nxj / docs / apidocs / lejos / nxt / comm / NXTCommand.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <!--NewPage-->
3 <HTML>
4 <HEAD>
5 <!-- Generated by javadoc (build 1.5.0_09) on Tue Jan 08 20:46:02 GMT 2008 -->
6 <TITLE>
7 NXTCommand (leJOS NXT API documentation)
8 </TITLE>
9
10 <META NAME="keywords" CONTENT="lejos.nxt.comm.NXTCommand class">
11
12 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
13
14 <SCRIPT type="text/javascript">
15 function windowTitle()
16 {
17     parent.document.title="NXTCommand (leJOS NXT API documentation)";
18 }
19 </SCRIPT>
20 <NOSCRIPT>
21 </NOSCRIPT>
22
23 </HEAD>
24
25 <BODY BGCOLOR="white" onload="windowTitle();">
26
27
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="">
32 <TR>
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>&nbsp;</TD>
38   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
39   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
40   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
41   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
42   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
43   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
44   </TR>
45 </TABLE>
46 </TD>
47 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
48 </EM>
49 </TD>
50 </TR>
51
52 <TR>
53 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
54 &nbsp;<A HREF="../../../lejos/nxt/comm/NXTComm.html" title="class in lejos.nxt.comm"><B>PREV CLASS</B></A>&nbsp;
55 &nbsp;<A HREF="../../../lejos/nxt/comm/NXTProtocol.html" title="interface in lejos.nxt.comm"><B>NEXT CLASS</B></A></FONT></TD>
56 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
57   <A HREF="../../../index.html?lejos/nxt/comm/NXTCommand.html" target="_top"><B>FRAMES</B></A>  &nbsp;
58 &nbsp;<A HREF="NXTCommand.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
59 &nbsp;<SCRIPT type="text/javascript">
60   <!--
61   if(window==top) {
62     document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
63   }
64   //-->
65 </SCRIPT>
66 <NOSCRIPT>
67   <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
68 </NOSCRIPT>
69
70
71 </FONT></TD>
72 </TR>
73 <TR>
74 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
75   SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
76 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
77 DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
78 </TR>
79 </TABLE>
80 <A NAME="skip-navbar_top"></A>
81 <!-- ========= END OF TOP NAVBAR ========= -->
82
83 <HR>
84 <!-- ======== START OF CLASS DATA ======== -->
85 <H2>
86 <FONT SIZE="-1">
87 lejos.nxt.comm</FONT>
88 <BR>
89 Class NXTCommand</H2>
90 <PRE>
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.nxt.comm.NXTCommand</B>
93 </PRE>
94 <DL>
95 <DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../lejos/nxt/comm/NXTProtocol.html" title="interface in lejos.nxt.comm">NXTProtocol</A></DD>
96 </DL>
97 <HR>
98 <DL>
99 <DT><PRE>public class <B>NXTCommand</B><DT>extends <A HREF="../../../java/lang/Object.html" title="class in java.lang">Object</A><DT>implements <A HREF="../../../lejos/nxt/comm/NXTProtocol.html" title="interface in lejos.nxt.comm">NXTProtocol</A></DL>
100 </PRE>
101
102 <P>
103 Remote access to a NXT via Bluetooth using LCP.
104 <P>
105
106 <P>
107 <HR>
108
109 <P>
110 <!-- =========== FIELD SUMMARY =========== -->
111
112 <A NAME="field_summary"><!-- --></A>
113 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
114 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
115 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
116 <B>Field Summary</B></FONT></TH>
117 </TR>
118 </TABLE>
119 &nbsp;<A NAME="fields_inherited_from_class_lejos.nxt.comm.NXTProtocol"><!-- --></A>
120 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
121 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
122 <TH ALIGN="left"><B>Fields inherited from interface lejos.nxt.comm.<A HREF="../../../lejos/nxt/comm/NXTProtocol.html" title="interface in lejos.nxt.comm">NXTProtocol</A></B></TH>
123 </TR>
124 <TR BGCOLOR="white" CLASS="TableRowColor">
125 <TD><CODE><A HREF="../../../lejos/nxt/comm/NXTProtocol.html#ANGLE">ANGLE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#ANGLESTEPSMODE">ANGLESTEPSMODE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#BOOLEANMODE">BOOLEANMODE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#BOOT">BOOT</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#BRAKE">BRAKE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#CELSIUSMODE">CELSIUSMODE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#CLOSE">CLOSE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#CUSTOM">CUSTOM</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#DELETE">DELETE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#DELETE_USER_FLASH">DELETE_USER_FLASH</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#DIRECT_COMMAND_NOREPLY">DIRECT_COMMAND_NOREPLY</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#DIRECT_COMMAND_REPLY">DIRECT_COMMAND_REPLY</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#FAHRENHEITMODE">FAHRENHEITMODE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#FIND_FIRST">FIND_FIRST</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#FIND_NEXT">FIND_NEXT</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#GET_BATTERY_LEVEL">GET_BATTERY_LEVEL</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#GET_CURRENT_PROGRAM_NAME">GET_CURRENT_PROGRAM_NAME</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#GET_DEVICE_INFO">GET_DEVICE_INFO</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#GET_FIRMWARE_VERSION">GET_FIRMWARE_VERSION</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#GET_INPUT_VALUES">GET_INPUT_VALUES</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#GET_OUTPUT_STATE">GET_OUTPUT_STATE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#HIGH_SPEED_BUFFER">HIGH_SPEED_BUFFER</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#KEEP_ALIVE">KEEP_ALIVE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#LIGHT_ACTIVE">LIGHT_ACTIVE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#LIGHT_INACTIVE">LIGHT_INACTIVE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#LOWSPEED">LOWSPEED</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#LOWSPEED_9V">LOWSPEED_9V</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#LS_GET_STATUS">LS_GET_STATUS</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#LS_READ">LS_READ</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#LS_WRITE">LS_WRITE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#MESSAGE_READ">MESSAGE_READ</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#MESSAGE_WRITE">MESSAGE_WRITE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#MODEMASK">MODEMASK</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#MOTOR_RUN_STATE_IDLE">MOTOR_RUN_STATE_IDLE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#MOTOR_RUN_STATE_RAMPDOWN">MOTOR_RUN_STATE_RAMPDOWN</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#MOTOR_RUN_STATE_RAMPUP">MOTOR_RUN_STATE_RAMPUP</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#MOTOR_RUN_STATE_RUNNING">MOTOR_RUN_STATE_RUNNING</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#MOTORON">MOTORON</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#NO_OF_SENSOR_TYPES">NO_OF_SENSOR_TYPES</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#NO_SENSOR">NO_SENSOR</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#OPEN_APPEND_DATA">OPEN_APPEND_DATA</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#OPEN_READ">OPEN_READ</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#OPEN_READ_LINEAR">OPEN_READ_LINEAR</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#OPEN_WRITE">OPEN_WRITE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#OPEN_WRITE_DATA">OPEN_WRITE_DATA</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#OPEN_WRITE_LINEAR">OPEN_WRITE_LINEAR</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#PCTFULLSCALEMODE">PCTFULLSCALEMODE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#PERIODCOUNTERMODE">PERIODCOUNTERMODE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#PLAY_SOUND_FILE">PLAY_SOUND_FILE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#PLAY_TONE">PLAY_TONE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#POLL">POLL</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#POLL_BUFFER">POLL_BUFFER</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#POLL_LENGTH">POLL_LENGTH</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#RAWMODE">RAWMODE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#READ">READ</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#REFLECTION">REFLECTION</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#REGULATED">REGULATED</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#REGULATION_MODE_IDLE">REGULATION_MODE_IDLE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#REGULATION_MODE_MOTOR_SPEED">REGULATION_MODE_MOTOR_SPEED</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#REGULATION_MODE_MOTOR_SYNC">REGULATION_MODE_MOTOR_SYNC</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#REPLY_COMMAND">REPLY_COMMAND</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#RESET_MOTOR_POSITION">RESET_MOTOR_POSITION</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#RESET_SCALED_INPUT_VALUE">RESET_SCALED_INPUT_VALUE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#SET_BRICK_NAME">SET_BRICK_NAME</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#SET_INPUT_MODE">SET_INPUT_MODE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#SET_OUTPUT_STATE">SET_OUTPUT_STATE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#SLOPEMASK">SLOPEMASK</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#SOUND_DB">SOUND_DB</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#SOUND_DBA">SOUND_DBA</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#START_PROGRAM">START_PROGRAM</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#STOP_PROGRAM">STOP_PROGRAM</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#STOP_SOUND_PLAYBACK">STOP_SOUND_PLAYBACK</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#SWITCH">SWITCH</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#SYSTEM_COMMAND_NOREPLY">SYSTEM_COMMAND_NOREPLY</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#SYSTEM_COMMAND_REPLY">SYSTEM_COMMAND_REPLY</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#TEMPERATURE">TEMPERATURE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#TRANSITIONCNTMODE">TRANSITIONCNTMODE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#WRITE">WRITE</A></CODE></TD>
126 </TR>
127 </TABLE>
128 &nbsp;
129 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
130
131 <A NAME="constructor_summary"><!-- --></A>
132 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
133 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
134 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
135 <B>Constructor Summary</B></FONT></TH>
136 </TR>
137 <TR BGCOLOR="white" CLASS="TableRowColor">
138 <TD><CODE><B><A HREF="../../../lejos/nxt/comm/NXTCommand.html#NXTCommand()">NXTCommand</A></B>()</CODE>
139
140 <BR>
141 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
142 </TR>
143 </TABLE>
144 &nbsp;
145 <!-- ========== METHOD SUMMARY =========== -->
146
147 <A NAME="method_summary"><!-- --></A>
148 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
149 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
150 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
151 <B>Method Summary</B></FONT></TH>
152 </TR>
153 <TR BGCOLOR="white" CLASS="TableRowColor">
154 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
155 <CODE>&nbsp;void</CODE></FONT></TD>
156 <TD><CODE><B><A HREF="../../../lejos/nxt/comm/NXTCommand.html#close()">close</A></B>()</CODE>
157
158 <BR>
159 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Call the close() command when your program ends, otherwise you
160  will have to turn the NXT brick off/on before you run another
161  program using iCommand.</TD>
162 </TR>
163 <TR BGCOLOR="white" CLASS="TableRowColor">
164 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
165 <CODE>&nbsp;byte</CODE></FONT></TD>
166 <TD><CODE><B><A HREF="../../../lejos/nxt/comm/NXTCommand.html#deleteUserFlash()">deleteUserFlash</A></B>()</CODE>
167
168 <BR>
169 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Deletes user flash memory (not including system modules).</TD>
170 </TR>
171 <TR BGCOLOR="white" CLASS="TableRowColor">
172 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
173 <CODE>&nbsp;int</CODE></FONT></TD>
174 <TD><CODE><B><A HREF="../../../lejos/nxt/comm/NXTCommand.html#getBatteryLevel()">getBatteryLevel</A></B>()</CODE>
175
176 <BR>
177 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
178 </TR>
179 <TR BGCOLOR="white" CLASS="TableRowColor">
180 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
181 <CODE>&nbsp;<A HREF="../../../lejos/nxt/comm/DeviceInfo.html" title="class in lejos.nxt.comm">DeviceInfo</A></CODE></FONT></TD>
182 <TD><CODE><B><A HREF="../../../lejos/nxt/comm/NXTCommand.html#getDeviceInfo()">getDeviceInfo</A></B>()</CODE>
183
184 <BR>
185 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
186 </TR>
187 <TR BGCOLOR="white" CLASS="TableRowColor">
188 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
189 <CODE>&nbsp;<A HREF="../../../lejos/nxt/comm/FirmwareInfo.html" title="class in lejos.nxt.comm">FirmwareInfo</A></CODE></FONT></TD>
190 <TD><CODE><B><A HREF="../../../lejos/nxt/comm/NXTCommand.html#getFirmwareVersion()">getFirmwareVersion</A></B>()</CODE>
191
192 <BR>
193 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
194 </TR>
195 <TR BGCOLOR="white" CLASS="TableRowColor">
196 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
197 <CODE>&nbsp;<A HREF="../../../lejos/nxt/comm/InputValues.html" title="class in lejos.nxt.comm">InputValues</A></CODE></FONT></TD>
198 <TD><CODE><B><A HREF="../../../lejos/nxt/comm/NXTCommand.html#getInputValues(int)">getInputValues</A></B>(int&nbsp;port)</CODE>
199
200 <BR>
201 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
202 </TR>
203 <TR BGCOLOR="white" CLASS="TableRowColor">
204 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
205 <CODE>&nbsp;int</CODE></FONT></TD>
206 <TD><CODE><B><A HREF="../../../lejos/nxt/comm/NXTCommand.html#getTachoCount(int)">getTachoCount</A></B>(int&nbsp;port)</CODE>
207
208 <BR>
209 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves tacho count.</TD>
210 </TR>
211 <TR BGCOLOR="white" CLASS="TableRowColor">
212 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
213 <CODE>&nbsp;void</CODE></FONT></TD>
214 <TD><CODE><B><A HREF="../../../lejos/nxt/comm/NXTCommand.html#open(java.lang.String)">open</A></B>(<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;name)</CODE>
215
216 <BR>
217 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
218 </TR>
219 <TR BGCOLOR="white" CLASS="TableRowColor">
220 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
221 <CODE>&nbsp;byte</CODE></FONT></TD>
222 <TD><CODE><B><A HREF="../../../lejos/nxt/comm/NXTCommand.html#playTone(int, int)">playTone</A></B>(int&nbsp;frequency,
223          int&nbsp;duration)</CODE>
224
225 <BR>
226 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Plays a tone on NXT speaker.</TD>
227 </TR>
228 <TR BGCOLOR="white" CLASS="TableRowColor">
229 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
230 <CODE>&nbsp;byte</CODE></FONT></TD>
231 <TD><CODE><B><A HREF="../../../lejos/nxt/comm/NXTCommand.html#resetMotorPosition(int, boolean)">resetMotorPosition</A></B>(int&nbsp;port,
232                    boolean&nbsp;relative)</CODE>
233
234 <BR>
235 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resets the tachometer</TD>
236 </TR>
237 <TR BGCOLOR="white" CLASS="TableRowColor">
238 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
239 <CODE>&nbsp;byte</CODE></FONT></TD>
240 <TD><CODE><B><A HREF="../../../lejos/nxt/comm/NXTCommand.html#setInputMode(int, int, int)">setInputMode</A></B>(int&nbsp;port,
241              int&nbsp;sensorType,
242              int&nbsp;sensorMode)</CODE>
243
244 <BR>
245 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tells the NXT what type of sensor you are using and the mode to operate in.</TD>
246 </TR>
247 <TR BGCOLOR="white" CLASS="TableRowColor">
248 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
249 <CODE>&nbsp;byte</CODE></FONT></TD>
250 <TD><CODE><B><A HREF="../../../lejos/nxt/comm/NXTCommand.html#setOutputState(int, byte, int, int, int, int, int)">setOutputState</A></B>(int&nbsp;port,
251                byte&nbsp;power,
252                int&nbsp;mode,
253                int&nbsp;regulationMode,
254                int&nbsp;turnRatio,
255                int&nbsp;runState,
256                int&nbsp;tachoLimit)</CODE>
257
258 <BR>
259 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
260 </TR>
261 <TR BGCOLOR="white" CLASS="TableRowColor">
262 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
263 <CODE>&nbsp;void</CODE></FONT></TD>
264 <TD><CODE><B><A HREF="../../../lejos/nxt/comm/NXTCommand.html#setVerify(boolean)">setVerify</A></B>(boolean&nbsp;verify)</CODE>
265
266 <BR>
267 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
268 </TR>
269 </TABLE>
270 &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
271 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
272 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
273 <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>
274 </TR>
275 <TR BGCOLOR="white" CLASS="TableRowColor">
276 <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>
277 </TR>
278 </TABLE>
279 &nbsp;
280 <P>
281
282 <!-- ========= CONSTRUCTOR DETAIL ======== -->
283
284 <A NAME="constructor_detail"><!-- --></A>
285 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
286 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
287 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
288 <B>Constructor Detail</B></FONT></TH>
289 </TR>
290 </TABLE>
291
292 <A NAME="NXTCommand()"><!-- --></A><H3>
293 NXTCommand</H3>
294 <PRE>
295 public <B>NXTCommand</B>()</PRE>
296 <DL>
297 </DL>
298
299 <!-- ============ METHOD DETAIL ========== -->
300
301 <A NAME="method_detail"><!-- --></A>
302 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
303 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
304 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
305 <B>Method Detail</B></FONT></TH>
306 </TR>
307 </TABLE>
308
309 <A NAME="open(java.lang.String)"><!-- --></A><H3>
310 open</H3>
311 <PRE>
312 public void <B>open</B>(<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;name)
313           throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
314 <DL>
315 <DD><DL>
316 </DL>
317 </DD>
318 <DD><DL>
319
320 <DT><B>Throws:</B>
321 <DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE></DL>
322 </DD>
323 </DL>
324 <HR>
325
326 <A NAME="setOutputState(int, byte, int, int, int, int, int)"><!-- --></A><H3>
327 setOutputState</H3>
328 <PRE>
329 public byte <B>setOutputState</B>(int&nbsp;port,
330                            byte&nbsp;power,
331                            int&nbsp;mode,
332                            int&nbsp;regulationMode,
333                            int&nbsp;turnRatio,
334                            int&nbsp;runState,
335                            int&nbsp;tachoLimit)
336                     throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
337 <DL>
338 <DD><DL>
339 </DL>
340 </DD>
341 <DD><DL>
342 <DT><B>Parameters:</B><DD><CODE>port</CODE> - - Output port (0 - 2 or 0xFF for all three)<DD><CODE>power</CODE> - - Setpoint for power. (-100 to 100)<DD><CODE>mode</CODE> - - Setting the modes MOTORON, BRAKE, and/or REGULATED. This parameter is a bitfield, so to put it in brake mode and regulated, use BRAKEMODE + REGULATED<DD><CODE>regulationMode</CODE> - - see NXTProtocol for enumerations<DD><CODE>turnRatio</CODE> - - Need two motors? (-100 to 100)<DD><CODE>runState</CODE> - - see NXTProtocol for enumerations<DD><CODE>tachoLimit</CODE> - - Number of degrees(?) to rotate before stopping.
343 <DT><B>Throws:</B>
344 <DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE></DL>
345 </DD>
346 </DL>
347 <HR>
348
349 <A NAME="getTachoCount(int)"><!-- --></A><H3>
350 getTachoCount</H3>
351 <PRE>
352 public int <B>getTachoCount</B>(int&nbsp;port)
353                   throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
354 <DL>
355 <DD>Retrieves tacho count.
356 <P>
357 <DD><DL>
358 </DL>
359 </DD>
360 <DD><DL>
361 <DT><B>Parameters:</B><DD><CODE>port</CODE> - - 0 to 3
362 <DT><B>Returns:</B><DD>tacho count
363 <DT><B>Throws:</B>
364 <DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE></DL>
365 </DD>
366 </DL>
367 <HR>
368
369 <A NAME="resetMotorPosition(int, boolean)"><!-- --></A><H3>
370 resetMotorPosition</H3>
371 <PRE>
372 public byte <B>resetMotorPosition</B>(int&nbsp;port,
373                                boolean&nbsp;relative)
374                         throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
375 <DL>
376 <DD>Resets the tachometer
377 <P>
378 <DD><DL>
379 </DL>
380 </DD>
381 <DD><DL>
382 <DT><B>Parameters:</B><DD><CODE>port</CODE> - Output port (0-2)<DD><CODE>relative</CODE> - TRUE: position relative to last movement, FALSE: absolute position
383 <DT><B>Throws:</B>
384 <DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE></DL>
385 </DD>
386 </DL>
387 <HR>
388
389 <A NAME="setVerify(boolean)"><!-- --></A><H3>
390 setVerify</H3>
391 <PRE>
392 public void <B>setVerify</B>(boolean&nbsp;verify)</PRE>
393 <DL>
394 <DD><DL>
395 </DL>
396 </DD>
397 <DD><DL>
398 </DL>
399 </DD>
400 </DL>
401 <HR>
402
403 <A NAME="close()"><!-- --></A><H3>
404 close</H3>
405 <PRE>
406 public void <B>close</B>()
407            throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
408 <DL>
409 <DD>Call the close() command when your program ends, otherwise you
410  will have to turn the NXT brick off/on before you run another
411  program using iCommand.
412 <P>
413 <DD><DL>
414 </DL>
415 </DD>
416 <DD><DL>
417
418 <DT><B>Throws:</B>
419 <DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE></DL>
420 </DD>
421 </DL>
422 <HR>
423
424 <A NAME="getBatteryLevel()"><!-- --></A><H3>
425 getBatteryLevel</H3>
426 <PRE>
427 public int <B>getBatteryLevel</B>()
428                     throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
429 <DL>
430 <DD><DL>
431 </DL>
432 </DD>
433 <DD><DL>
434
435 <DT><B>Throws:</B>
436 <DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE></DL>
437 </DD>
438 </DL>
439 <HR>
440
441 <A NAME="getInputValues(int)"><!-- --></A><H3>
442 getInputValues</H3>
443 <PRE>
444 public <A HREF="../../../lejos/nxt/comm/InputValues.html" title="class in lejos.nxt.comm">InputValues</A> <B>getInputValues</B>(int&nbsp;port)
445                            throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
446 <DL>
447 <DD><DL>
448 </DL>
449 </DD>
450 <DD><DL>
451
452 <DT><B>Throws:</B>
453 <DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE></DL>
454 </DD>
455 </DL>
456 <HR>
457
458 <A NAME="setInputMode(int, int, int)"><!-- --></A><H3>
459 setInputMode</H3>
460 <PRE>
461 public byte <B>setInputMode</B>(int&nbsp;port,
462                          int&nbsp;sensorType,
463                          int&nbsp;sensorMode)
464                   throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
465 <DL>
466 <DD>Tells the NXT what type of sensor you are using and the mode to operate in.
467 <P>
468 <DD><DL>
469 </DL>
470 </DD>
471 <DD><DL>
472 <DT><B>Parameters:</B><DD><CODE>port</CODE> - - 0 to 3<DD><CODE>sensorType</CODE> - - Enumeration for sensor type (see NXTProtocol)<DD><CODE>sensorMode</CODE> - - Enumeration for sensor mode (see NXTProtocol)
473 <DT><B>Throws:</B>
474 <DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE></DL>
475 </DD>
476 </DL>
477 <HR>
478
479 <A NAME="playTone(int, int)"><!-- --></A><H3>
480 playTone</H3>
481 <PRE>
482 public byte <B>playTone</B>(int&nbsp;frequency,
483                      int&nbsp;duration)
484               throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
485 <DL>
486 <DD>Plays a tone on NXT speaker. If a new tone is sent while the previous tone is playing,
487  the new tone command will stop the old tone command.
488 <P>
489 <DD><DL>
490 </DL>
491 </DD>
492 <DD><DL>
493 <DT><B>Parameters:</B><DD><CODE>frequency</CODE> - <DD><CODE>duration</CODE> - - In milliseconds.
494 <DT><B>Returns:</B><DD>- Returns true if command worked, false if it failed.
495 <DT><B>Throws:</B>
496 <DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE></DL>
497 </DD>
498 </DL>
499 <HR>
500
501 <A NAME="getDeviceInfo()"><!-- --></A><H3>
502 getDeviceInfo</H3>
503 <PRE>
504 public <A HREF="../../../lejos/nxt/comm/DeviceInfo.html" title="class in lejos.nxt.comm">DeviceInfo</A> <B>getDeviceInfo</B>()
505                          throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
506 <DL>
507 <DD><DL>
508 </DL>
509 </DD>
510 <DD><DL>
511
512 <DT><B>Throws:</B>
513 <DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE></DL>
514 </DD>
515 </DL>
516 <HR>
517
518 <A NAME="getFirmwareVersion()"><!-- --></A><H3>
519 getFirmwareVersion</H3>
520 <PRE>
521 public <A HREF="../../../lejos/nxt/comm/FirmwareInfo.html" title="class in lejos.nxt.comm">FirmwareInfo</A> <B>getFirmwareVersion</B>()
522                                 throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
523 <DL>
524 <DD><DL>
525 </DL>
526 </DD>
527 <DD><DL>
528
529 <DT><B>Throws:</B>
530 <DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE></DL>
531 </DD>
532 </DL>
533 <HR>
534
535 <A NAME="deleteUserFlash()"><!-- --></A><H3>
536 deleteUserFlash</H3>
537 <PRE>
538 public byte <B>deleteUserFlash</B>()
539                      throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
540 <DL>
541 <DD>Deletes user flash memory (not including system modules).
542 <P>
543 <DD><DL>
544 </DL>
545 </DD>
546 <DD><DL>
547
548 <DT><B>Returns:</B><DD>0 for success
549 <DT><B>Throws:</B>
550 <DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE></DL>
551 </DD>
552 </DL>
553 <!-- ========= END OF CLASS DATA ========= -->
554 <HR>
555
556
557 <!-- ======= START OF BOTTOM NAVBAR ====== -->
558 <A NAME="navbar_bottom"><!-- --></A>
559 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
560 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
561 <TR>
562 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
563 <A NAME="navbar_bottom_firstrow"><!-- --></A>
564 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
565   <TR ALIGN="center" VALIGN="top">
566   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
567   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
568   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
569   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
570   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
571   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
572   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
573   </TR>
574 </TABLE>
575 </TD>
576 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
577 </EM>
578 </TD>
579 </TR>
580
581 <TR>
582 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
583 &nbsp;<A HREF="../../../lejos/nxt/comm/NXTComm.html" title="class in lejos.nxt.comm"><B>PREV CLASS</B></A>&nbsp;
584 &nbsp;<A HREF="../../../lejos/nxt/comm/NXTProtocol.html" title="interface in lejos.nxt.comm"><B>NEXT CLASS</B></A></FONT></TD>
585 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
586   <A HREF="../../../index.html?lejos/nxt/comm/NXTCommand.html" target="_top"><B>FRAMES</B></A>  &nbsp;
587 &nbsp;<A HREF="NXTCommand.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
588 &nbsp;<SCRIPT type="text/javascript">
589   <!--
590   if(window==top) {
591     document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
592   }
593   //-->
594 </SCRIPT>
595 <NOSCRIPT>
596   <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
597 </NOSCRIPT>
598
599
600 </FONT></TD>
601 </TR>
602 <TR>
603 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
604   SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
605 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
606 DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
607 </TR>
608 </TABLE>
609 <A NAME="skip-navbar_bottom"></A>
610 <!-- ======== END OF BOTTOM NAVBAR ======= -->
611
612 <HR>
613
614 </BODY>
615 </HTML>