📄 node204.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>17.2.5 Trace support</TITLE><META NAME="description" CONTENT="17.2.5 Trace support"><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="node205.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node205.html"><LINK REL="previous" HREF="node203.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node203.html"><LINK REL="up" HREF="node199.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node199.html"><LINK REL="next" HREF="node205.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node205.html"></HEAD><BODY ><!--Navigation Panel--><A NAME="tex2html4418" HREF="node205.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node205.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html4412" HREF="node199.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node199.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html4406" HREF="node203.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node203.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html4414" 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="tex2html4416" 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="tex2html4419" HREF="node205.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node205.html">17.2.6 Error models</A><B> Up:</B> <A NAME="tex2html4413" HREF="node199.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node199.html">17.2 Using the satellite</A><B> Previous:</B> <A NAME="tex2html4407" HREF="node203.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node203.html">17.2.4 Routing</A>   <B> <A NAME="tex2html4415" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>   <B> <A NAME="tex2html4417" 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="SECTION031425000000000000000"></A><A NAME="sec:satellite_usage_trace"></A><BR>17.2.5 Trace support</H2><P>Tracefiles using satellite nodes and links are very similar to conventional tracing described in Chapter <A HREF="node265.html#chap:trace" tppabs="http://www.isi.edu/nsnam/ns/doc/node265.html#chap:trace">23</A>. Special SatTrace objects(<TT>class SatTrace</TT> derives from <TT>class Trace</TT>) are usedto log the geographic latitude and longitude of the node logging the trace(in the case of a satellite node, the latitude and longitude correspondto the nadir point of the satellite).<P>For example, a packet on a link from node 66 to node 26 might normally belogged as: <PRE>+ 1.0000 66 26 cbr 210 ------- 0 66.0 67.0 0 0</PRE>but in the satellite simulation, the position information is appended:<PRE>+ 1.0000 66 26 cbr 210 ------- 0 66.0 67.0 0 0 37.90 -122.30 48.90 -120.94</PRE>In this case, node 66 is at latitude 37.90 degrees, longitude -122.30degrees, while node 26 is a LEO satellite whose subsatellitepoint is at 48.90 degrees latitude, -120.94 degrees longitude (negativelatitude corresponds to south, while negative longitude corresponds towest).<P>One addition is the <TT>Class Trace/Sat/Error</TT>, which traces any packetsthat are errored by an error model. The error trace logs packets droppeddue to errors as follows, for example: <PRE>e 1.2404 12 13 cbr 210 ------- 0 12.0 13.0 0 0 -0.00 10.20 -0.00 -10.00</PRE><P>It may happen that a satellite node generates a packet that it cannotforward (such as in sat-mixed.tcl). This will show up as a drop inthe tracefile with a destination field set to -2, and the coordinatesset to -999.00:<PRE>d 848.0000 14 -2 cbr 210 ------- 1 14.0 15.0 6 21 0.00 10.00 -999.00 -999.00</PRE>This indicates that node 14, in trying to send a packet to node 15, couldnot find an available route.<P>To enable tracing of all satellite links in the simulator, use the followingcommands <EM>before</EM> instantiating nodes and links:<PRE>set f [open out.tr w]$ns trace-all $f</PRE>Then use the following line after all node and link creation (and allerror model insertion, if any) to enable tracing of all satellite links:<PRE>$ns trace-all-satlinks $f</PRE>Specifically, this will put tracing around the link layer queues in allsatellite links, and will put a receive trace between the mac and thelink layer for received packets. To enable tracing only on a specificlink on a specific node, one may use the command:<PRE>$node trace-inlink-queue $f $i$node trace-outlink-queue $f $i</PRE>where is the index of the interface to be traced. <P>The implementations of the satellite trace objects can be found in tcl/lib/ns-sat.tcl and sattrace.{cc,h}.<P><HR><!--Navigation Panel--><A NAME="tex2html4418" HREF="node205.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node205.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html4412" HREF="node199.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node199.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html4406" HREF="node203.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node203.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html4414" 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="tex2html4416" 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="tex2html4419" HREF="node205.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node205.html">17.2.6 Error models</A><B> Up:</B> <A NAME="tex2html4413" HREF="node199.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node199.html">17.2 Using the satellite</A><B> Previous:</B> <A NAME="tex2html4407" HREF="node203.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node203.html">17.2.4 Routing</A>   <B> <A NAME="tex2html4415" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>   <B> <A NAME="tex2html4417" 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 + -