📄 node563.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>41.1 Nam Trace Format</TITLE><META NAME="description" CONTENT="41.1 Nam Trace Format"><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="node578.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node578.html"><LINK REL="previous" HREF="node562.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node562.html"><LINK REL="up" HREF="node562.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node562.html"><LINK REL="next" HREF="node564.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node564.html"></HEAD><BODY ><!--Navigation Panel--><A NAME="tex2html10086" HREF="node564.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node564.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html10080" HREF="node562.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node562.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html10074" HREF="node562.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node562.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html10082" 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="tex2html10084" 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="tex2html10087" HREF="node564.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node564.html">41.1.1 Initialization Events</A><B> Up:</B> <A NAME="tex2html10081" HREF="node562.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node562.html">41. Nam Trace</A><B> Previous:</B> <A NAME="tex2html10075" HREF="node562.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node562.html">41. Nam Trace</A>   <B> <A NAME="tex2html10083" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>   <B> <A NAME="tex2html10085" 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="SECTION010210000000000000000"></A><A NAME="sec:namtraceformat"></A><BR>41.1 Nam Trace Format</H1>The C++ class Trace used for ns tracing is used for nam tracing aswell. Description of this class may be found under section<A HREF="node269.html#sec:tracemoncplus" tppabs="http://www.isi.edu/nsnam/ns/doc/node269.html#sec:tracemoncplus">23.3</A>. The method Trace::format() defines nam format used in nam trace files which are used by nam forvisualization of ns simulations. Trace class method Trace::format() isdescribed in section <A HREF="node270.html#sec:traceformat" tppabs="http://www.isi.edu/nsnam/ns/doc/node270.html#sec:traceformat">23.4</A> of chapter <A HREF="node265.html#chap:trace" tppabs="http://www.isi.edu/nsnam/ns/doc/node265.html#chap:trace">23</A>. Ifthe macro NAM_TRACE has been defined (by default it is defined intrace.h), then the following code is executed as part of theTrace::format() function:<P><PRE> if (namChan_ != 0) sprintf(nwrk_, "%c -t "TIME_FORMAT" -s %d -d %d -p %s -e %d -c %d-i %d -a %d -x {%s.%s %s.%s %d %s %s}", tt, Scheduler::instance().clock(), s, d, name, th-\>size(), iph-\>flowid(), th-\>uid(), iph-\>flowid(), src\_nodeaddr, src\_portaddr, dst\_nodeaddr, dst\_portaddr, seqno,flags,sname);</PRE><P>A nam trace file has a basic format to it. Each line is a nam event. The first character on the line defines the type of event and is followed by several flags to set options on that event. Each event is terminated by a newline character.<PRE><event-type> -t <time> <more flags>...</PRE>Depending on the event type, there are different flags following thetime flag. <P>There are 2 sections in that file, static intial configuration events and animation events. All events with -t * in them are configuration events and should be at the beginning of the file. One thing to note is that nam can also be fed the trace file from a stream which enables it to be used with realtime applications. See the section <B>Using Streams with Realtime Applications</B> for more information.<P>Following we describe nam trace file format for different classes events and animation objects.<P><BR><HR><!--Table of Child-Links--><A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A><UL><LI><A NAME="tex2html10088" HREF="node564.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node564.html">41.1.1 Initialization Events</A><LI><A NAME="tex2html10089" HREF="node565.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node565.html">41.1.2 Nodes</A><LI><A NAME="tex2html10090" HREF="node566.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node566.html">41.1.3 Links</A><LI><A NAME="tex2html10091" HREF="node567.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node567.html">41.1.4 Queues</A><LI><A NAME="tex2html10092" HREF="node568.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node568.html">41.1.5 Packets</A><LI><A NAME="tex2html10093" HREF="node569.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node569.html">41.1.6 Node Marking</A><LI><A NAME="tex2html10094" HREF="node570.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node570.html">41.1.7 Agent Tracing</A><LI><A NAME="tex2html10095" HREF="node571.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node571.html">41.1.8 Variable Tracing</A><LI><A NAME="tex2html10096" HREF="node572.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node572.html">41.1.9 Executing Tcl Procedures and External Code from within Nam</A><UL><LI><A NAME="tex2html10097" HREF="node573.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node573.html">41.1.9.1 Setting playback speed</A><LI><A NAME="tex2html10098" HREF="node574.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node574.html">41.1.9.2 Annotation</A><LI><A NAME="tex2html10099" HREF="node575.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node575.html">41.1.9.3 Node Exec Button</A></UL><BR><LI><A NAME="tex2html10100" HREF="node576.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node576.html">41.1.10 Using Streams for Realtime Applications</A><LI><A NAME="tex2html10101" HREF="node577.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node577.html">41.1.11 Nam Trace File Format Lookup Table</A></UL><!--End of Table of Child-Links--><HR><!--Navigation Panel--><A NAME="tex2html10086" HREF="node564.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node564.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html10080" HREF="node562.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node562.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html10074" HREF="node562.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node562.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html10082" 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="tex2html10084" 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="tex2html10087" HREF="node564.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node564.html">41.1.1 Initialization Events</A><B> Up:</B> <A NAME="tex2html10081" HREF="node562.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node562.html">41. Nam Trace</A><B> Previous:</B> <A NAME="tex2html10075" HREF="node562.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node562.html">41. Nam Trace</A>   <B> <A NAME="tex2html10083" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>   <B> <A NAME="tex2html10085" 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 + -