📄 node450.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>33.6 Session Objects</TITLE><META NAME="description" CONTENT="33.6 Session Objects"><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="node451.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node451.html"><LINK REL="previous" HREF="node446.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node446.html"><LINK REL="up" HREF="node427.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node427.html"><LINK REL="next" HREF="node451.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node451.html"></HEAD><BODY ><!--Navigation Panel--><A NAME="tex2html8301" HREF="node451.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node451.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html8295" HREF="node427.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node427.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html8289" HREF="node449.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node449.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html8297" 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="tex2html8299" 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="tex2html8302" HREF="node451.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node451.html">33.7 Extending the Base</A><B> Up:</B> <A NAME="tex2html8296" HREF="node427.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node427.html">33. Agent/SRM</A><B> Previous:</B> <A NAME="tex2html8290" HREF="node449.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node449.html">33.5.0.0.3 Mechanisms for Statistics</A>   <B> <A NAME="tex2html8298" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>   <B> <A NAME="tex2html8300" 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="SECTION06460000000000000000"></A><A NAME="sec:session"></A><BR>33.6 Session Objects</H1><P>Session objects,like the loss recovery objectsSectionsec:recovery,are derived from the base SRM.Unlike the loss recovery objects though,the agent only creates one session object for the lifetime of the agent.The constructor invokes the base class constructor as before;it then sets its instance variable <TT>sessionDelay_</TT>.The agent creates the session object when it []starts.At that time, it also invokesSRM/session::schedule../ns-2/srm.tclSRM/session::schedule,to send a session message after <TT>sessionDelay_</TT> seconds.<P>When the object sends a session message,it will schedule to send the next one after some interval.It will also update its statistics.[]send-session../ns-2/srm.tclSRM/session::send-sessionwrites out the trace entry ``<SMALL>S SESSION</SMALL>''.<P>The class overrides the[]evTrace routine that writes out the trace entries.SRM/session::evTrace../ns-2/srm.tclSRM/sesion::evTracedisable writing out the trace entry for session messages.<P>Two types of session message scheduling strategies are currentlyavailable:The function in the base class schedules sending session messages atfixed intervals of <TT>sessionDelay_</TT> jittered around a small valueto avoid synchronization among all the agents at all the nodes.SRM/session/logScaled schedules sending messagesat intervals of <TT>sessionDelay</TT> times (<TT>groupSize_</TT>)so that the frequency of session messages is inversely proportional to the size of the group.<P>The base class that sends messages at fixed intervalsis the default <TT>sessionFunction_</TT> for the agent.<P><HR><!--Navigation Panel--><A NAME="tex2html8301" HREF="node451.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node451.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html8295" HREF="node427.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node427.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html8289" HREF="node449.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node449.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html8297" 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="tex2html8299" 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="tex2html8302" HREF="node451.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node451.html">33.7 Extending the Base</A><B> Up:</B> <A NAME="tex2html8296" HREF="node427.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node427.html">33. Agent/SRM</A><B> Previous:</B> <A NAME="tex2html8290" HREF="node449.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node449.html">33.5.0.0.3 Mechanisms for Statistics</A>   <B> <A NAME="tex2html8298" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>   <B> <A NAME="tex2html8300" 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 + -