📄 radio.html
字号:
<A NAME="Radio(net.tinyos.sim.script.ScriptInterpreter, net.tinyos.sim.SimDriver)"><!-- --></A><H3>Radio</H3><PRE>public <B>Radio</B>(net.tinyos.sim.script.ScriptInterpreter interp, net.tinyos.sim.SimDriver driver)</PRE><DL></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="getCurModel()"><!-- --></A><H3>getCurModel</H3><PRE>public java.lang.String <B>getCurModel</B>()</PRE><DL><DD>Return the name of the current radio model.<P><DD><DL></DL></DD></DL><HR><A NAME="setCurModel(java.lang.String)"><!-- --></A><H3>setCurModel</H3><PRE>public void <B>setCurModel</B>(java.lang.String modelname)</PRE><DL><DD>Set the radio model.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>modelname</CODE> - the name of the new model (e.g. "empirical")</DL></DD></DL><HR><A NAME="setScalingFactor(double)"><!-- --></A><H3>setScalingFactor</H3><PRE>public void <B>setScalingFactor</B>(double scalingFactor)</PRE><DL><DD>Set the radio model scaling factor.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>scalingFactor</CODE> - the new scaling factor</DL></DD></DL><HR><A NAME="getLossRate(int, int)"><!-- --></A><H3>getLossRate</H3><PRE>public double <B>getLossRate</B>(int senderID, int receiverID)</PRE><DL><DD>Get the packet loss rate between two motes.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>senderID</CODE> - id of the sender mote<DD><CODE>receiverID</CODE> - id of the receiver mote</DL></DD></DL><HR><A NAME="setLossRate(int, int, double)"><!-- --></A><H3>setLossRate</H3><PRE>public void <B>setLossRate</B>(int senderID, int receiverID, double prob)</PRE><DL><DD>Set the packet loss rate between two motes.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>senderID</CODE> - id of the sender mote<DD><CODE>receiverID</CODE> - id of the receiver mote<DD><CODE>prob</CODE> - new loss probability</DL></DD></DL><HR><A NAME="printLossRates()"><!-- --></A><H3>printLossRates</H3><PRE>public void <B>printLossRates</B>()</PRE><DL><DD>Dump the current loss rate table to the console.<P><DD><DL></DL></DD></DL><HR><A NAME="packetLossToBitError(double)"><!-- --></A><H3>packetLossToBitError</H3><PRE>public double <B>packetLossToBitError</B>(double packetLoss)</PRE><DL><DD>Convert a requested packet loss probability into a bit error rate, according to the current radio model.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>packetLoss</CODE> - requested packet loss probability</DL></DD></DL><HR><A NAME="packetLossToBitError(double, java.lang.String)"><!-- --></A><H3>packetLossToBitError</H3><PRE>public double <B>packetLossToBitError</B>(double packetLoss, java.lang.String model)</PRE><DL><DD>Convert a requested packet loss probability into a bit error rate, according to the specified radio model.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>packetLoss</CODE> - requested packet loss probability<DD><CODE>model</CODE> - name of the radio model to use</DL></DD></DL><HR><A NAME="distanceToPacketLoss(double)"><!-- --></A><H3>distanceToPacketLoss</H3><PRE>public double <B>distanceToPacketLoss</B>(double distance)</PRE><DL><DD>Convert a distance into a packet loss probability according to the current radio model.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>distance</CODE> - the distance between two motes</DL></DD></DL><HR><A NAME="distanceToPacketLoss(double, java.lang.String)"><!-- --></A><H3>distanceToPacketLoss</H3><PRE>public double <B>distanceToPacketLoss</B>(double distance, java.lang.String model)</PRE><DL><DD>Convert a distance into a packet loss probability according to the specified radio model.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>distance</CODE> - the distance between two motes<DD><CODE>model</CODE> - name of the radio model to use</DL></DD></DL><HR><A NAME="setAutoPublish(boolean)"><!-- --></A><H3>setAutoPublish</H3><PRE>public void <B>setAutoPublish</B>(boolean autoPublish)</PRE><DL><DD>Set the auto publish flag in the radio model. With this flag enabled, all changes, either due to mote movement or due to programmatic settings, are propagated to the simulator. When auto publish is turned off, the updateModel() function must be called to propagate settings from the simdriver to the simulator.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>autoPublish</CODE> - value of the autoPublish feature</DL></DD></DL><HR><A NAME="updateModel()"><!-- --></A><H3>updateModel</H3><PRE>public void <B>updateModel</B>()</PRE><DL><DD>Forces a recalculation of the radio loss model by iterating over all pairs of motes.<P><DD><DL></DL></DD></DL><HR><A NAME="publishModel()"><!-- --></A><H3>publishModel</H3><PRE>public void <B>publishModel</B>()</PRE><DL><DD>Publishes all the current radio model values to the simulator. See setAutoPublish() for more information.<P><DD><DL></DL></DD></DL><HR><A NAME="disable()"><!-- --></A><H3>disable</H3><PRE>public void <B>disable</B>()</PRE><DL><DD>Disables the radio model plugin altogether.<P><DD><DL></DL></DD></DL><HR><A NAME="enable()"><!-- --></A><H3>enable</H3><PRE>public void <B>enable</B>()</PRE><DL><DD>Re-enables the radio model 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/Packets.html"><B>PREV CLASS</B></A> <A HREF="../../../../../net/tinyos/sim/script/reflect/Random.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="Radio.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 | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <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 + -