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

📄 node120.html

📁 相关搜索: ns2仿真结果分析 all-awk ns2 ns2 无限网络中awk文件 ... [2.tcl.rar] - 在ns2平台上实现对AODV协议的模拟
💻 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>10.9 Commands at a glance</TITLE><META NAME="description" CONTENT="10.9 Commands at a glance"><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="node119.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node119.html"><LINK REL="up" HREF="node99.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node99.html"><LINK REL="next" HREF="node121.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node121.html"></HEAD><BODY ><!--Navigation Panel--><A NAME="tex2html3136"  HREF="node121.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node121.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html3130"  HREF="node99.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node99.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html3126"  HREF="node119.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node119.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html3132"  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="tex2html3134"  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="tex2html3137"  HREF="node121.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node121.html">11. Timers</A><B> Up:</B> <A NAME="tex2html3131"  HREF="node99.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node99.html">10. Agents</A><B> Previous:</B> <A NAME="tex2html3127"  HREF="node119.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node119.html">10.8 Different agent objects</A> &nbsp <B>  <A NAME="tex2html3133"  HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>  &nbsp <B>  <A NAME="tex2html3135"  HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html">Index</A></B> <BR><BR><!--End of Navigation Panel--><H1><A NAME="SECTION03790000000000000000"></A><A NAME="sec:agentscommand"></A><BR>10.9 Commands at a glance</H1><P>Following are the agent related commands used in simulation scripts:<DIV ALIGN="LEFT"><TT>ns_ attach-agent node agent</TT><BR>This command attaches the &lt;agent&gt; to the &lt;node&gt;. We assume here that the&lt;agent&gt; has already been created. An agent is typically created by<TT>set agent [new Agent/AgentType]</TT>where Agent/AgentType defines the class definiton of the specified agenttype.</DIV><P><DIV ALIGN="LEFT"><TT>$agent port</TT><BR>This returns the port number to which the agent is attached.</DIV><P><DIV ALIGN="LEFT"><TT>$agent dst-port</TT><BR>This returns the port number of the destination.When any connection is setup between 2 nodes, each agent stores the destination port in its instance variable called <TT>dst_port_</TT>.</DIV><P><DIV ALIGN="LEFT"><TT>$agent attach-app s_type</TT><BR>This commands attaches an application of type <TT>s_type</TT> to the agent.A handle to the application object is returned. Also note that the applicationtype must be defined as a packet type in packet.h.</DIV><P><DIV ALIGN="LEFT"><TT>$agent attach-source s_type</TT><BR>This used to be the procedure to attach source of type <TT>s_type</TT> tothe agent. But this is obsolete now. Use attach-app (described above)instead.</DIV><P><DIV ALIGN="LEFT"><TT>$agent attach-tbf tbf</TT><BR>Attaches a token bucket filter (tbf) to the agent.</DIV><P><DIV ALIGN="LEFT"><TT>$ns_ connect src dst</TT><BR>Sets up a connection between the src and dst agents. </DIV><P><DIV ALIGN="LEFT"><TT>$ns_ create-connection srctype src dsttype dst pktclass</TT><BR>This sets up a complete connection between two agents. First creates a sourceof type &lt;srctype&gt; and binds it to &lt;src&gt;. Then creates a destination of type&lt;dsttype&gt; and binds it to &lt;dst&gt;. Finally connects the src and dst agents andreturns a handle to the source agent.</DIV><P><DIV ALIGN="LEFT"><TT>$ns_ create-connection-list srctype src dsttype dst pktclass</TT><BR>This command is exactly similar to create-connection described above. Butinstead of returning only the source-agent, this returns a list of source anddestination agents.</DIV><P><DIV ALIGN="LEFT">Internal procedures:</DIV><P><DIV ALIGN="LEFT"><TT>$ns_ simplex-connect src dst</TT><BR>This is an internal method that actually sets up an unidirectional connectionbetween the &lt;src&gt; agent and &lt;dst&gt; agent. It simply sets the destination addressand destination port of the &lt;src&gt; as &lt;dst&gt;'s agent-address and agent-port.The "connect" described above calls this method twice to set up a bi-directionalconnection between the src and dst.</DIV><P><DIV ALIGN="LEFT"><TT>$agent set args</TT><BR>This is an internal procedure used to inform users of the backward compatibilityissues resulting from the upgrade to 32-bit addressing space currently usedin .</DIV><P><DIV ALIGN="LEFT"><TT>$agent attach-trace file</TT><BR>This attaches the &lt;file&gt; to the agent to allow nam-tracing of the agentevents.</DIV><P><DIV ALIGN="LEFT">In addition to the agent related procedures described here, there are additionalmethods that support different type of agents like Agent/Null, Agent/TCP,Agent/CBR, Agent/TORA, Agent/mcast etc. These additional methods alongwith the procedures described here can be found in /tcl/lib/(ns-agent.tcl,ns-lib.tcl, ns-mip.tcl, ns-mobilenode.tcl, ns-namsupp.tcl, ns-queue.tcl,ns-route.tcl, ns-sat.tcl, ns-source.tcl). They are also described in theprevious section.</DIV><P><DIV ALIGN="LEFT"></DIV> <HR><!--Navigation Panel--><A NAME="tex2html3136"  HREF="node121.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node121.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html3130"  HREF="node99.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node99.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html3126"  HREF="node119.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node119.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html3132"  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="tex2html3134"  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="tex2html3137"  HREF="node121.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node121.html">11. Timers</A><B> Up:</B> <A NAME="tex2html3131"  HREF="node99.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node99.html">10. Agents</A><B> Previous:</B> <A NAME="tex2html3127"  HREF="node119.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node119.html">10.8 Different agent objects</A> &nbsp <B>  <A NAME="tex2html3133"  HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>  &nbsp <B>  <A NAME="tex2html3135"  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 + -