📄 node139.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>13.2 Configuration</TITLE><META NAME="description" CONTENT="13.2 Configuration"><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="node140.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node140.html"><LINK REL="previous" HREF="node138.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node138.html"><LINK REL="up" HREF="node137.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node137.html"><LINK REL="next" HREF="node140.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node140.html"></HEAD><BODY ><!--Navigation Panel--><A NAME="tex2html3418" HREF="node140.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node140.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html3412" HREF="node137.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node137.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html3406" HREF="node138.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node138.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html3414" 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="tex2html3416" 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="tex2html3419" HREF="node140.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node140.html">13.3 Multi-state error model</A><B> Up:</B> <A NAME="tex2html3413" HREF="node137.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node137.html">13. Error Model</A><B> Previous:</B> <A NAME="tex2html3407" HREF="node138.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node138.html">13.1 Implementation</A>   <B> <A NAME="tex2html3415" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>   <B> <A NAME="tex2html3417" 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="SECTION031020000000000000000">13.2 Configuration</A></H1><P>The previous section talked about error model, in this section wediscuss how to use error models in ns over either wired networks orwireless ones. <P>To use an error model for wired networks, at first it has to beinserted into a SimpleLink object. Because a SimpleLink is a compositeobject (Chapter <A HREF="node57.html#chap:links" tppabs="http://www.isi.edu/nsnam/ns/doc/node57.html#chap:links">6</A>), an error model can be inserted tomany places. Currently we provide the following methods to insert anerror module into three different places.<P><UL><LI>Insert an error module in a SimpleLink BEFORE the queue module. This is provided by the following two OTcl methods: <P><BR><BR><P></LI><LI>Insert an error module in a SimpleLink AFTER the queue but BEFORE the delay link. This is provided by the following two methods:<P><BR><BR><P>The nam traces generated by error models inserted using these two methods do not require special treatment and can be visualized using an older version of nam. <P></LI><LI>Insert an error module in a Link AFTER the delay link module. This can be done by <TT>Link::install-error</TT>. Currently this API doesn't produce any trace. It only serves as a placeholder for possible future extensions. </LI></UL><P>To add an error model over wireless networks, each node can insert a given statistical error model either over outgoing or incoming wireless channels.Precisely, the instanciated error model would be stuck between mac and netif modules depicted in Figure <A HREF="node173.html#fig:mobilenode-dsr" tppabs="http://www.isi.edu/nsnam/ns/doc/node173.html#fig:mobilenode-dsr">16.2</A>. For the outgoing link, the error modulewould be pointed by downtarget_ of the above mac module while for the incoming link it would be linked by uptaget_ pointer of the below netif module. And in each case the target_ of the error module points to either the netif or the mac respectively. The difference of placing over the two different locations is that the outgoing causesall the receivers to receive the packet suffering the same degree of errors since the error isdetermined before wireless channel module copies the packet. On the otherhand, the incoming error module lets each receiver get the packet corrupted with differentdegree of error since the error is independently computed in each error module.<P>The insertion into the wireless protocol stack can be done by callingnode-config command explained in Section <A HREF="#sec:nodeconfig"><IMG ALIGN="BOTTOM" BORDER="1" ALT="[*]" SRC="file:/usr/share/latex2html/icons/crossref.png"></A> withthe two options IncomingErrrProc and OutgoingErrProc. We can use these two options at the same time or each one separately. The argument of the two option is thename of the global procedure which creates an error model object,feeds it with necessary initial values appropriate for the new errormodule, and finally returns the object pointer. The following shows asimple TCL example script to add an error module into the wirelessprotocol stack.<PRE> $ns node-config -IncomingErrProc UniformErr -OutgoingErrProc UniformErr proc UniformErr {} { set err [new ErrorModel] $err unit packet return $err }</PRE><P><HR><!--Navigation Panel--><A NAME="tex2html3418" HREF="node140.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node140.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html3412" HREF="node137.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node137.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html3406" HREF="node138.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node138.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html3414" 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="tex2html3416" 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="tex2html3419" HREF="node140.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node140.html">13.3 Multi-state error model</A><B> Up:</B> <A NAME="tex2html3413" HREF="node137.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node137.html">13. Error Model</A><B> Previous:</B> <A NAME="tex2html3407" HREF="node138.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node138.html">13.1 Implementation</A>   <B> <A NAME="tex2html3415" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>   <B> <A NAME="tex2html3417" 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 + -