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

📄 mote.html

📁 tinyos中文手册,是根据tinyos系统自带手册翻译过来的,虽然质量不好,但是对英文不强的人还是有用的
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Thu Jun 10 14:06:25 PDT 2004 --><TITLE>Mote</TITLE><META NAME="keywords" CONTENT="net.tinyos.sim.script.reflect.Mote,Mote class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"></HEAD><SCRIPT>function asd(){parent.document.title="Mote";}</SCRIPT><BODY BGCOLOR="white" onload="asd();"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<A HREF="#main"><FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../serialized-form.html"><FONT CLASS="NavBarFont1"><B>Serialized</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../../../net/tinyos/sim/script/reflect/Interp.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../../../net/tinyos/sim/script/reflect/Packets.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="Mote.html" TARGET="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<SCRIPT>  <!--  if(window==top) {    document.writeln('<A HREF="../../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT><A HREF="../../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><A NAME="main"></A><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">net.tinyos.sim.script.reflect</FONT><BR>Class Mote</H2><PRE>java.lang.Object  |  +--net.tinyos.sim.script.reflect.SimReflect        |        +--<A HREF="../../../../../net/tinyos/sim/script/reflect/SimObject.html">net.tinyos.sim.script.reflect.SimObject</A>              |              +--<B>net.tinyos.sim.script.reflect.Mote</B></PRE><HR><DL><DT>public class <B>Mote</B><DT>extends <A HREF="../../../../../net/tinyos/sim/script/reflect/SimObject.html">SimObject</A></DL><P>The Mote class provides access to the simulated mote objects.<p> Each mote that is simulated has a corresponding simulator object. These simulator objects are bound into the simcore module as the <i>motes</i> list. Hence for example, <tt>motes[3].turnOn()</tt> will turn on mote number 3. Generic methods that are available on all simulator objects are described in <A HREF="../../../../../net/tinyos/sim/script/reflect/SimObject.html"><CODE>SimObject</CODE></A>.<P><P><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../net/tinyos/sim/script/reflect/Mote.html#Mote(net.tinyos.sim.script.ScriptInterpreter, net.tinyos.sim.SimDriver, net.tinyos.sim.MoteSimObject)">Mote</A></B>(net.tinyos.sim.script.ScriptInterpreter&nbsp;interp,     net.tinyos.sim.SimDriver&nbsp;driver,     net.tinyos.sim.MoteSimObject&nbsp;mote)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR></TABLE>&nbsp;<!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/tinyos/sim/script/reflect/Mote.html#getByte(java.lang.String)">getByte</A></B>(java.lang.String&nbsp;var)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resolve and return the value of a mote frame variable, and return it as a byte.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;byte[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/tinyos/sim/script/reflect/Mote.html#getBytes(java.lang.String)">getBytes</A></B>(java.lang.String&nbsp;var)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resolve and return the value of a mote frame variable, and return it as a byte array.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;byte[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/tinyos/sim/script/reflect/Mote.html#getBytes(java.lang.String, long, long)">getBytes</A></B>(java.lang.String&nbsp;var,         long&nbsp;len,         long&nbsp;offset)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resolve and return the value of a mote frame variable, specifying the length and the offset, and return it as a byte array.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/tinyos/sim/script/reflect/Mote.html#getID()">getID</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the mote's ID.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/tinyos/sim/script/reflect/Mote.html#getInt(java.lang.String)">getInt</A></B>(java.lang.String&nbsp;var)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resolve and return the value of a mote frame variable, and return it as an int.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/tinyos/sim/script/reflect/Mote.html#getLong(java.lang.String)">getLong</A></B>(java.lang.String&nbsp;var)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resolve and return the value of a mote frame variable, and return it as a long.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;short</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/tinyos/sim/script/reflect/Mote.html#getShort(java.lang.String)">getShort</A></B>(java.lang.String&nbsp;var)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resolve and return the value of a mote frame variable, and return it as a short.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/tinyos/sim/script/reflect/Mote.html#isOn()">isOn</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return whether or not the mote is on.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/tinyos/sim/script/reflect/Mote.html#setLabel(java.lang.String, int, int)">setLabel</A></B>(java.lang.String&nbsp;label,         int&nbsp;xoff,         int&nbsp;yoff)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set a label in the TinyViz GUI for the given mote at a constant offset to the mote's position. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/tinyos/sim/script/reflect/Mote.html#toString()">toString</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return a string representing the mote's state (i.e. power, position).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/tinyos/sim/script/reflect/Mote.html#turnOff()">turnOff</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Turn the mote off.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/tinyos/sim/script/reflect/Mote.html#turnOn()">turnOn</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Turn the mote on.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_net.tinyos.sim.script.reflect.SimObject"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class net.tinyos.sim.script.reflect.<A HREF="../../../../../net/tinyos/sim/script/reflect/SimObject.html">SimObject</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../../net/tinyos/sim/script/reflect/SimObject.html#addAttribute(java.lang.String, net.tinyos.sim.Attribute)">addAttribute</A>, <A HREF="../../../../../net/tinyos/sim/script/reflect/SimObject.html#addAttributeChangedEvent(net.tinyos.sim.Attribute)">addAttributeChangedEvent</A>, <A HREF="../../../../../net/tinyos/sim/script/reflect/SimObject.html#getAttribute(java.lang.String)">getAttribute</A>, <A HREF="../../../../../net/tinyos/sim/script/reflect/SimObject.html#getCoord()">getCoord</A>, <A HREF="../../../../../net/tinyos/sim/script/reflect/SimObject.html#getDistance(double, double)">getDistance</A>, <A HREF="../../../../../net/tinyos/sim/script/reflect/SimObject.html#getDistance(int)">getDistance</A>, <A HREF="../../../../../net/tinyos/sim/script/reflect/SimObject.html#getDistance(net.tinyos.sim.script.reflect.SimObject)">getDistance</A>, <A HREF="../../../../../net/tinyos/sim/script/reflect/SimObject.html#getXCoord()">getXCoord</A>, <A HREF="../../../../../net/tinyos/sim/script/reflect/SimObject.html#getYCoord()">getYCoord</A>, <A HREF="../../../../../net/tinyos/sim/script/reflect/SimObject.html#isSelected()">isSelected</A>, <A HREF="../../../../../net/tinyos/sim/script/reflect/SimObject.html#move(double, double)">move</A>, <A HREF="../../../../../net/tinyos/sim/script/reflect/SimObject.html#moveTo(double, double)">moveTo</A>, <A HREF="../../../../../net/tinyos/sim/script/reflect/SimObject.html#removeAttribute(java.lang.String)">removeAttribute</A>, <A HREF="../../../../../net/tinyos/sim/script/reflect/SimObject.html#setCoord(double, double)">setCoord</A>, <A HREF="../../../../../net/tinyos/sim/script/reflect/SimObject.html#setSelected()">setSelected</A>, <A HREF="../../../../../net/tinyos/sim/script/reflect/SimObject.html#setUnselected()">setUnselected</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>equals, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== -->

⌨️ 快捷键说明

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