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

📄 node40.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>5.1 Node Basics</TITLE><META NAME="description" CONTENT="5.1 Node Basics"><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="next" HREF="node41.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node41.html"><LINK REL="previous" HREF="node39.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node39.html"><LINK REL="up" HREF="node39.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node39.html"><LINK REL="next" HREF="node41.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node41.html"></HEAD><BODY ><!--Navigation Panel--><A NAME="tex2html1940"  HREF="node41.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node41.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html1934"  HREF="node39.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node39.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html1928"  HREF="node39.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node39.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html1936"  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="tex2html1938"  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="tex2html1941"  HREF="node41.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node41.html">5.2 Node Methods: Configuring</A><B> Up:</B> <A NAME="tex2html1935"  HREF="node39.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node39.html">5. Nodes and Packet</A><B> Previous:</B> <A NAME="tex2html1929"  HREF="node39.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node39.html">5. Nodes and Packet</A> &nbsp <B>  <A NAME="tex2html1937"  HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>  &nbsp <B>  <A NAME="tex2html1939"  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="SECTION03210000000000000000"></A><A NAME="sec:node:simulator"></A><BR>5.1 Node Basics</H1><P>The basic primitive for creating a node is<PRE>    set ns [new Simulator]    $ns \fcnref{\textbf{node}}{../ns-2/ns-lib.tcl}{Simulator::node}</PRE> The instance procedure <TT>node</TT> constructsa node out of more simpleclassifier objectsSectionsec:node:classifiers.The Node itself is a standalone class in OTcl.However, most of the components of the node are themselves TclObjects.The typical structure of a (unicast) node is as shown in Figure&nbsp;<A HREF="node40.html#fig:node:unicast" tppabs="http://www.isi.edu/nsnam/ns/doc/node40.html#fig:node:unicast">5.1</A>.  This simple structureconsists of two TclObjects:  an address classifer (<TT>classifer_</TT>) anda port classifier (<TT>dmux_</TT>).  The function of these classifiersis to distribute incoming packets to the correct agent or outgoing link.<DIV ALIGN="CENTER"><A NAME="fig:node:unicast"></A><A NAME="1575"></A><TABLE><CAPTION ALIGN="BOTTOM"><STRONG>Figure 5.1:</STRONG>Structure of a Unicast Node.  Notice that entry_ is simply a    label variable instead of a real object, e.g., the classifier_.</CAPTION><TR><TD><DIV ALIGN="CENTER">node</DIV></TD></TR></TABLE></DIV><P>All nodes contain at least the following components:<UL><LI>an address or <TT>id_</TT>, monotonically increasing by 1 (from initial value 0) across the simulation namespace as nodes are created,</LI><LI>a list of neighbors (<TT>neighbor_</TT>),</LI><LI>a list of agents (<TT>agent_</TT>),</LI><LI>a node type identifier (<TT>nodetype_</TT>), and</LI><LI>a routing module (described in Section&nbsp;<A HREF="node53.html#sec:node:rtarch" tppabs="http://www.isi.edu/nsnam/ns/doc/node53.html#sec:node:rtarch">5.5</A> below)</LI></UL><P>By default, nodes in  are constructed for unicast simulations.In order to enable multicast simulation, the simulation should be created with an option ``-multicast on'', e.g.:<PRE>        set ns [new Simulator -multicast on]</PRE>&#171;&#171;&#171;&lt; nodes.tex&#171;&#171;&#171;&lt; nodes.tex<B>NOTE</B>: the old way of enabling multicast, e.g., <TT>Simulator set EnableMcast_ 1</TT>, is no longer needed.=======<B>NOTE</B>: the old way of enabling multicast,	e.g., <TT>Simulator set EnableMcast_ 1</TT>,	is no longer needed.&#187;&#187;&#187;&gt; 1.8=======&#187;&#187;&#187;&gt; 1.9The internal structure of a typical multicast node is shown inFigure&nbsp;<A HREF="node40.html#fig:node:multicast" tppabs="http://www.isi.edu/nsnam/ns/doc/node40.html#fig:node:multicast">5.2</A>.<DIV ALIGN="CENTER"><A NAME="fig:node:multicast"></A><A NAME="1594"></A><TABLE><CAPTION ALIGN="BOTTOM"><STRONG>Figure 5.2:</STRONG>Internal Structure of a Multicast Node.</CAPTION><TR><TD><DIV ALIGN="CENTER">mcastNode</DIV></TD></TR></TABLE></DIV><P>When a simulation uses multicast routing,the highest bit of the address indicates whether the particularaddress is a multicast address or an unicast address.If the bit is 0, the address represents a unicast address,else the address represents a multicast address.<P><HR><!--Navigation Panel--><A NAME="tex2html1940"  HREF="node41.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node41.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html1934"  HREF="node39.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node39.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html1928"  HREF="node39.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node39.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html1936"  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="tex2html1938"  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="tex2html1941"  HREF="node41.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node41.html">5.2 Node Methods: Configuring</A><B> Up:</B> <A NAME="tex2html1935"  HREF="node39.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node39.html">5. Nodes and Packet</A><B> Previous:</B> <A NAME="tex2html1929"  HREF="node39.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node39.html">5. Nodes and Packet</A> &nbsp <B>  <A NAME="tex2html1937"  HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>  &nbsp <B>  <A NAME="tex2html1939"  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 + -