📄 node346.html
字号:
<html><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><!--Converted with jLaTeX2HTML 2002 (1.62) JA patch-1.4patched version by: Kenshi Muto, Debian Project.LaTeX2HTML 2002 (1.62),original version by: Nikos Drakos, CBLU, University of Leeds* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan* with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --><HTML><HEAD><TITLE>28.2.2 rtQueue../ns-2/dynamics.tcl</TITLE><META NAME="description" CONTENT="28.2.2 rtQueue../ns-2/dynamics.tcl"><META NAME="keywords" CONTENT="everything"><META NAME="resource-type" CONTENT="document"><META NAME="distribution" CONTENT="global"><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"><META NAME="Generator" CONTENT="jLaTeX2HTML v2002 JA patch-1.4"><META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"><LINK REL="STYLESHEET" HREF="everything.css" tppabs="http://www.isi.edu/nsnam/ns/doc/everything.css"><LINK REL="previous" HREF="node341.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node341.html"><LINK REL="up" HREF="node340.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node340.html"><LINK REL="next" HREF="node347.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node347.html"></HEAD><BODY ><!--Navigation Panel--><A NAME="tex2html6643" HREF="node347.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node347.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html6637" HREF="node340.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node340.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html6633" HREF="node345.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node345.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html6639" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html"><IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="file:/usr/share/latex2html/icons/contents.png"></A> <A NAME="tex2html6641" HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html"><IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="file:/usr/share/latex2html/icons/index.png"></A> <BR><B> Next:</B> <A NAME="tex2html6644" HREF="node347.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node347.html">28.3 Interaction with Unicast</A><B> Up:</B> <A NAME="tex2html6638" HREF="node340.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node340.html">28.2 The Internal Architecture</A><B> Previous:</B> <A NAME="tex2html6634" HREF="node345.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node345.html">28.2.1.0.4 Manual</A>   <B> <A NAME="tex2html6640" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>   <B> <A NAME="tex2html6642" HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html">Index</A></B> <BR><BR><!--End of Navigation Panel--><H2><A NAME="SECTION05322000000000000000"></A><A NAME="sec:rtqueue"></A><BR>28.2.2 rtQueue../ns-2/dynamics.tcl</H2><P>The simulator needs to co-ordinate multiple simultaneous networkdynamics events, especially to ensure the right coherent behaviour.Hence, the network dynamics models use their own internal route queue to schedule dynamics events.There is one instance of this object in the simulator, in theclass Simulator instance variable <TT>rtq_</TT>.<P>The queue object stores an array of queued operationsin its instance variable, <TT>rtq_</TT>.The index is the time at which the event will execute.Each element is the list of operations that will execute at that time.<P>The instance procedures[]insq../ns-2/dynamics.tclrtQueue::insq and[]insq-i../ns-2/dynamics.tclrtQueue::insq-ican insert an element into the queue.<UL><LI>The first argument is the time at which this operation will execute. []insq takes the exact time as argument; []insq-i takes the interval as argument, and schedules the operation <TT>interval</TT> seconds after the current time.</LI><LI>The following arguments specify the object, <TT>$obj</TT>, the instance procedure of that object, <TT>$iproc</TT>, and the arguments to that procedure, <TT>$args</TT>.<P>These arguments are placed into the route queue for execution at the appropriate time.</LI></UL><P>The instance procedure[]runq../ns-2/dynamics.tclrtQueue::runqexecutes <TT>eval $obj $iproc $args</TT> at the appropriate instant.After all the events for that instance are executed,[]runq will []notify each object about the execution.<P>Finally, the instance procedure[]delq../ns-2/dynamics.tclrtQueue::delqcan remove a queued action with the time and the name of the object.<P><HR><!--Navigation Panel--><A NAME="tex2html6643" HREF="node347.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node347.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html6637" HREF="node340.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node340.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html6633" HREF="node345.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node345.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html6639" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html"><IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="file:/usr/share/latex2html/icons/contents.png"></A> <A NAME="tex2html6641" HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html"><IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="file:/usr/share/latex2html/icons/index.png"></A> <BR><B> Next:</B> <A NAME="tex2html6644" HREF="node347.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node347.html">28.3 Interaction with Unicast</A><B> Up:</B> <A NAME="tex2html6638" HREF="node340.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node340.html">28.2 The Internal Architecture</A><B> Previous:</B> <A NAME="tex2html6634" HREF="node345.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node345.html">28.2.1.0.4 Manual</A>   <B> <A NAME="tex2html6640" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>   <B> <A NAME="tex2html6642" HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html">Index</A></B> <!--End of Navigation Panel--><ADDRESS>2003-09-23</ADDRESS></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -