📄 sim.html
字号:
</DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="Sim(net.tinyos.sim.script.ScriptInterpreter, net.tinyos.sim.SimDriver)"><!-- --></A><H3>Sim</H3><PRE>public <B>Sim</B>(net.tinyos.sim.script.ScriptInterpreter interp, net.tinyos.sim.SimDriver driver)</PRE><DL><DD>Constructor for the Sim object. This should not be called explicitly, rather the pre-constructed instance <i>sim</i> should be used.<P></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="pause()"><!-- --></A><H3>pause</H3><PRE>public void <B>pause</B>()</PRE><DL><DD>Pauses the simulation.<P><DD><DL></DL></DD></DL><HR><A NAME="resume()"><!-- --></A><H3>resume</H3><PRE>public void <B>resume</B>()</PRE><DL><DD>Resumes the simulation.<P><DD><DL></DL></DD></DL><HR><A NAME="isPaused()"><!-- --></A><H3>isPaused</H3><PRE>public boolean <B>isPaused</B>()</PRE><DL><DD>Indicates whether or not the simulator is paused.<P><DD><DL></DL></DD></DL><HR><A NAME="stop()"><!-- --></A><H3>stop</H3><PRE>public void <B>stop</B>()</PRE><DL><DD>Stops the simulator execution.<P><DD><DL></DL></DD></DL><HR><A NAME="getWorldWidth()"><!-- --></A><H3>getWorldWidth</H3><PRE>public int <B>getWorldWidth</B>()</PRE><DL><DD>Returns the width of the simulator 'world' in logical space units.<P><DD><DL></DL></DD></DL><HR><A NAME="getWorldHeight()"><!-- --></A><H3>getWorldHeight</H3><PRE>public int <B>getWorldHeight</B>()</PRE><DL><DD>Returns the height of the simulator 'world' in logical space units.<P><DD><DL></DL></DD></DL><HR><A NAME="getTossimTime()"><!-- --></A><H3>getTossimTime</H3><PRE>public long <B>getTossimTime</B>()</PRE><DL><DD>Returns the current simulator time. More accurately, this reflects the timestamp carried in the last event to arrive from the simulator.<P><DD><DL></DL></DD></DL><HR><A NAME="exit(int)"><!-- --></A><H3>exit</H3><PRE>public void <B>exit</B>(int errcode)</PRE><DL><DD>Exits the simulator environment with the given error code.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>errcode</CODE> - the exit status code</DL></DD></DL><HR><A NAME="exit()"><!-- --></A><H3>exit</H3><PRE>public void <B>exit</B>()</PRE><DL><DD>Exits the simulator environment with an error code of 0.<P><DD><DL></DL></DD></DL><HR><A NAME="setSimDelay(long)"><!-- --></A><H3>setSimDelay</H3><PRE>public void <B>setSimDelay</B>(long delay_ms)</PRE><DL><DD>Sets the logical simulator delay.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>delay_ms</CODE> - delay in milliseconds</DL></DD></DL><HR><A NAME="setDBG(long)"><!-- --></A><H3>setDBG</H3><PRE>public void <B>setDBG</B>(long dbg) throws java.io.IOException</PRE><DL><DD><DL><DD><CODE>java.io.IOException</CODE></DL></DD></DL><HR><A NAME="setEventMask(short)"><!-- --></A><H3>setEventMask</H3><PRE>public void <B>setEventMask</B>(short mask) throws java.io.IOException</PRE><DL><DD><DL><DD><CODE>java.io.IOException</CODE></DL></DD></DL><HR><A NAME="dumpDBG(java.lang.String)"><!-- --></A><H3>dumpDBG</H3><PRE>public void <B>dumpDBG</B>(java.lang.String filename) throws java.io.IOException</PRE><DL><DD>Starts dumping debug messages to the given file.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>filename</CODE> - path to the file for debug output<DD><CODE>java.io.IOException</CODE></DL></DD></DL><HR><A NAME="stopDBGDump()"><!-- --></A><H3>stopDBGDump</H3><PRE>public void <B>stopDBGDump</B>() throws java.io.IOException</PRE><DL><DD>Stops dumping debug messages.<P><DD><DL><DD><CODE>java.io.IOException</CODE></DL></DD></DL><HR><A NAME="exec(java.lang.String, int, java.lang.String)"><!-- --></A><H3>exec</H3><PRE>public void <B>exec</B>(java.lang.String executable, int numMotes, java.lang.String args) throws java.io.IOException</PRE><DL><DD>Run the simulator and block until the driver connects.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>executable</CODE> - path to the executable<DD><CODE>numMotes</CODE> - number of motes to run<DD><CODE>args</CODE> - argument string<DD><CODE>java.io.IOException</CODE></DL></DD></DL><HR><A NAME="exec(java.lang.String, int)"><!-- --></A><H3>exec</H3><PRE>public void <B>exec</B>(java.lang.String executable, int numMotes) throws java.io.IOException</PRE><DL><DD>Run the simulator and block until the driver connects.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>executable</CODE> - path to the executable<DD><CODE>numMotes</CODE> - number of motes to run<DD><CODE>java.io.IOException</CODE></DL></DD></DL><HR><A NAME="reset()"><!-- --></A><H3>reset</H3><PRE>public void <B>reset</B>()</PRE><DL><DD>Reset the simulator, stopping the current simulation process and clearing out all internal state.<P><DD><DL></DL></DD></DL><HR><A NAME="newSimObject(int, double, double)"><!-- --></A><H3>newSimObject</H3><PRE>public net.tinyos.sim.script.reflect.SimObject <B>newSimObject</B>(int size, double x, double y)</PRE><DL><DD>Create a new generic SimObject.<P><DD><DL></DL></DD></DL><HR><A NAME="newSimObject()"><!-- --></A><H3>newSimObject</H3><PRE>public net.tinyos.sim.script.reflect.SimObject <B>newSimObject</B>()</PRE><DL><DD>Create a new generic SimObject.<P><DD><DL></DL></DD></DL><HR><A NAME="loadPlugin(java.lang.String)"><!-- --></A><H3>loadPlugin</H3><PRE>public void <B>loadPlugin</B>(java.lang.String pluginName)</PRE><DL><DD>Load the requested plugin.<P><DD><DL></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_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> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <A HREF="#main"><FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../serialized-form.html"><FONT CLASS="NavBarFont1"><B>Serialized</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../net/tinyos/sim/script/reflect/Sensor.html"><B>PREV CLASS</B></A> <A HREF="../../../../../net/tinyos/sim/script/reflect/SimObject.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> <A HREF="Sim.html" TARGET="_top"><B>NO FRAMES</B></A> <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: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -