📄 node462.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>34.2 The Packet Pair Source Generator</TITLE><META NAME="description" CONTENT="34.2 The Packet Pair Source Generator"><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="node463.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node463.html"><LINK REL="previous" HREF="node460.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node460.html"><LINK REL="up" HREF="node459.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node459.html"><LINK REL="next" HREF="node463.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node463.html"></HEAD><BODY ><!--Navigation Panel--><A NAME="tex2html8478" HREF="node463.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node463.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html8472" HREF="node459.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node459.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html8466" HREF="node461.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node461.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html8474" 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="tex2html8476" 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="tex2html8479" HREF="node463.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node463.html">34.3 Architecture of the</A><B> Up:</B> <A NAME="tex2html8473" HREF="node459.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node459.html">34. PLM</A><B> Previous:</B> <A NAME="tex2html8467" HREF="node461.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node461.html">34.1.0.0.1 Creating a simple</A>   <B> <A NAME="tex2html8475" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>   <B> <A NAME="tex2html8477" 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="SECTION06520000000000000000">34.2 The Packet Pair Source Generator</A></H1>This section describes the Packet Pair source generator; the relevant files are:plm/cbr-traffic-PP.cc, tcl/lib/ns-default.tcl. The OTcl class name ofthe PP source is: Application/Traffic/CBR_PP. The Packet Pair (PP) source generator is in the fileplm/cbr-traffic-PP.cc. This source generator is a variation of the CBR source generator in cbr_traffic.cc.We just describe the salient differences between the code ofthe CBR source and the code of the PP source. The default values in tcl/lib/ns-default.tcl for the PP source generator are the samethan for the CBR source. We need for the PP source generator a new parameter <TT>PBM_</TT>:<PRE>Application/Traffic/CBR_PP set PBM_ 2 #Default value;</PRE><P>The OTcl instvar bounded variable <TT>PBM_</TT> (same name in C++ and in OTcl)specifies the number of back-to-back packets to be sent. For <TT>PBM_</TT>=1 wehave a CBR source, for <TT>PBM_</TT>=2 we have a Packet Pair source (a source whichsends two packets back-to-back), etc. The mean rate of the PP source is<TT>rate_</TT>, but the packets are sent in burst of <TT>PBM_</TT> packets. Notethat we also use the terminology Packet Pair source and Packet Pair burst for<TT>PBM_2</TT>.We compute the <TT>next_interval</TT> as:<PRE>double CBR_PP_Traffic::next_interval(int& size){/*(PP_ - 1) is the number of packets in the current burst.*/ if (PP_ \>= (PBM_ - 1)){ interval_ = PBM_*(double)(size_ \<\< 3)/(double)rate_; PP_ = 0; } else { interval_ = 1e-100; //zero PP_ += 1 ; }...}</PRE><P>The timeout method puts the <TT>NEW_BURST</TT> flag in the first packet of aburst. This is useful for the PLM protocol to identify the beginning of a PPburst.<P><PRE> void CBR_PP_Traffic::timeout() { ... if (PP_ == 0) agent_-\>sendmsg(size_, "NEW_BURST"); else agent_-\>sendmsg(size_); ... }</PRE><P><HR><!--Navigation Panel--><A NAME="tex2html8478" HREF="node463.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node463.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html8472" HREF="node459.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node459.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html8466" HREF="node461.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node461.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html8474" 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="tex2html8476" 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="tex2html8479" HREF="node463.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node463.html">34.3 Architecture of the</A><B> Up:</B> <A NAME="tex2html8473" HREF="node459.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node459.html">34. PLM</A><B> Previous:</B> <A NAME="tex2html8467" HREF="node461.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node461.html">34.1.0.0.1 Creating a simple</A>   <B> <A NAME="tex2html8475" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>   <B> <A NAME="tex2html8477" 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 + -