📄 print2.ps
字号:
( case SSIMDLY:) N( pktrcv1 = StatEntry::getStatEntry\("SSIMRCV"\).value\(\);) N( sprintf\( s, "Type: %d Str: %s Value: %lf ", se.type\(\),) N( se.infoStr\(\).c_str\(\),) N( \(pktrcv1 != 0.0 ? se.value\(\)/pktrcv1 : 0.0\) \);) N( break;) N() N( case BURSTDLY:) N( pktrcv1 = StatEntry::getStatEntry\("BURSTRCV"\).value\(\);) N( sprintf\( s, "Type: %d Str: %s Value: %lf ", se.type\(\),) N( se.infoStr\(\).c_str\(\),) N( \(pktrcv1 != 0.0 ? se.value\(\)/pktrcv1 : 0.0\) \);) N( break;) N() N( case BHPDLY:) N( pktrcv1 = StatEntry::getStatEntry\("BHPRCV"\).value\(\);) N( sprintf\( s, "Type: %d Str: %s Value: %lf ", se.type\(\),) N( se.infoStr\(\).c_str\(\),) N( \(pktrcv1 != 0.0 ? se.value\(\)/pktrcv1 : 0.0\) \);) N( break;) N() N( default:) N( sprintf\( s, "Type: %d Str: %s Value: %lf ", se.type\(\), se.infoStr\(\).c_) N(str\(\), se.value\(\) \);) N( break;) N( }) N() N( Debug::debug\( s \);) N(}) N() N() N(/* Diagnostic display-content method -- displays all the entries */) N(void StatEntry::displayEntry\(\) {) N() N(stdin) (Page 18/30) (Feb 21, 04 14:03) titlebordergrestore(Printed by U-GMGPC2\\Geoffrey M. Garner) rhead(stdin) (9/15) (Saturday February 21, 2004) footerend % of iso1dictpagesave restoreshowpage%%Page: (19-20) 10%%BeginPageSetup/pagesave save defsh 0 translate 90 rotate%%EndPageSetupiso1dict begingsavellx lly 12 add translate/v 0 store/x0 x v get 3.362408 add sx cw mul add store/y0 y v get bfs th add sub storex0 y0 moveto(common/stat-collector.cc) K( Feb 20 15:46 2004 Page: 15) p n() N( map<string, StatEntry>::const_iterator iter;) N( for\( iter = mapList__.begin\(\); iter != mapList__.end\(\); iter++ \)) N( displayEntry\( \(*iter\).second \);) N(}) N() N() N(/* Returns back the reference to this object */) N(StatCollector& StatCollector::instance\(\) {) N( if\( instance__ == NULL \)) N( instance__ = new StatCollector\(\);) N( return \(*instance__\);) N(}) N() N(/* Returns back a pointer to this object */) N(StatCollector* StatCollector::getInstance\(\) {) N( if\( instance__ == NULL \)) N( instance__ = new StatCollector\(\);) N( return instance__;) N(}) N() N(/* Construct a new StatCollector object */) N(StatCollector::StatCollector\(\) {) N( /* Initialize stat entries for the predefined statEntry types */) N( for\( int i = 0; i < 43; i++ \) {) N( StatEntry::addStatEntry\( \(statType\)i, StatEntry::baseInfoList[i], 0.0 \);) N( }) N(}) N() N() N(/* add an entry to the stat table */) N(void StatCollector::addEntry\( statType type, string entry, double value \) {) N( StatEntry::addStatEntry\( type, entry, value \);) N(}) N() N(/* add a custom entry to the stat table */) N(void StatCollector::addEntry\( string entry, double value \) {) N( StatEntry::addStatEntry\( entry, value \);) N(}) N() N(/* Interface methods to the StatEntry object */) N(void StatCollector::updateEntry\( string entry, double value \) {) N( StatEntry::getStatEntry\( entry \).value\(\) = value;) N(}) N() N(/* Get the value for the specific entry */) N(double StatCollector::getValue\( string entry \) {) N( return \(StatEntry::getStatEntry\( entry \).value\(\) \);) N(}) N() N() N(/* tcl command */) N(int StatCollector::command\( int argc, const char*const* argv \) {) N( if\( argc == 2 \) {) N( if\( strcmp\( argv[1], "display-sim-list" \) == 0 \) {) N( StatEntry::displayEntry\(\);) N( return \(TCL_OK\);) N() N(stdin) (Page 19/30) (Feb 21, 04 14:03) titleborder/v 1 store/x0 x v get 3.362408 add sx cw mul add store/y0 y v get bfs th add sub storex0 y0 moveto(common/stat-collector.cc) K( Feb 20 15:46 2004 Page: 16) p n() N( }) N( }) N( else if\( argc == 4 \) {) N( if\( strcmp\( argv[1], "add-stat-type" \) == 0 \) {) N( string s\( argv[2] \);) N( addEntry\( s, atof\( argv[3] \) \);) N( return \(TCL_OK\);) N( }) N( else if\( strcmp\( argv[1], "update-stat" \) == 0 \) {) N( string s\( argv[2] \);) N( updateEntry\( s, atof\( argv[3] \) \);) N( return \(TCL_OK\);) N( }) N( }) N( return NsObject::command\( argc, argv \);) N(}) N() N() N() N(// StatCollectorClass Definition) N(static class StatCollectorClass : public TclClass {) N( public:) N( StatCollectorClass\(\) : TclClass\( "StatCollector" \){}) N( TclObject* create\( int, const char*const* \) {) N( // return \(new StatCollector\(\) \);) N( return\( StatCollector::getInstance\(\) \);) N( }) N(} class_statCollectorClass;) N() N() N() N() N() N() N(stdin) (Page 20/30) (Feb 21, 04 14:03) titlebordergrestore(Printed by U-GMGPC2\\Geoffrey M. Garner) rhead(stdin) (10/15) (Saturday February 21, 2004) footerend % of iso1dictpagesave restoreshowpage%%Page: (21-22) 11%%BeginPageSetup/pagesave save defsh 0 translate 90 rotate%%EndPageSetupiso1dict begingsavellx lly 12 add translate/v 0 store/x0 x v get 3.362408 add sx cw mul add store/y0 y v get bfs th add sub storex0 y0 moveto(integrated_agent.h) K( Feb 10 09:27 2004 Page: 17) p n() N(/* Copyright \(c\) University of Maryland, Baltimore County, 2003.) N( * Original Authors: Ramakrishna Shenai, Sunil Gowda and Krishna Sivalingam.) N( *) N( * This software is developed at the University of Maryland, Baltimore County un) N(der) N( * grants from Cisco Systems Inc and the University of Maryland, Baltimore Count) N(y.) N( *) N( * Permission to use, copy, modify, and distribute this software and its) N( * documentation in source and binary forms for non-commercial purposes) N( * and without fee is hereby granted, provided that the above copyright) N( * notice appear in all copies and that both the copyright notice and) N( * this permission notice appear in supporting documentation. and that) N( * any documentation, advertising materials, and other materials related) N( * to such distribution and use acknowledge that the software was) N( * developed by the University of Maryland, Baltimore County. The name of) N( * the University may not be used to endorse or promote products derived from) N( * this software without specific prior written permission.) N( *) N( * Copyright \(C\) 2000-2003 Washington State University. All rights reserved.) N( * This software was originally developed at Alcatel USA and subsequently modifi) N(ed) N( * at Washington State University, Pullman, WA through research work which was) N( * supported by Alcatel USA, Inc and Cisco Systems Inc.) N() N( * The following notice is in adherence to the Washington State University) N( * copyright policy follows.) N( *) N( * License is granted to copy, to use, and to make and to use derivative) N( * works for research and evaluation purposes, provided that Washington) N( * State University is acknowledged in all documentation pertaining to any such) N( * copy or derivative work. Washington State University grants no other) N( * licenses expressed or implied. The Washington State University name) N( * should not be used in any advertising without its written permission.) N( *) N( * WASHINGTON STATE UNIVERSITY MAKES NO REPRESENTATIONS CONCERNING EITHER) N( * THE MERCHANTABILITY OF THIS SOFTWARE OR THE SUITABILITY OF THIS SOFTWARE) N( * FOR ANY PARTICULAR PURPOSE. The software is provided "as is") N( * without express or implied warranty of any kind. These notices must) N( * be retained in any copies of any part of this software.) N( */) N() N(#ifndef integrated_agent_h) N(#define integrated_agent_h) N() N(#include "address.h") N(#include "agent.h") N(#include "object.h") N(#include "config.h") N(#include "ip.h") N(#include "tcp.h") N(#include "packet.h") N(#include "timer-handler.h") N() N(#include "./common/stat-collector.h") N() N(/* The maximum possible burst size \(limit\) */) N(#define MAXBURSTSIZE 41000) N() N(stdin) (Page 21/30) (Feb 21, 04 14:03) titleborder/v 1 store/x0 x v get 3.362408 add sx cw mul add store/y0 y v get bfs th add sub storex0 y0 moveto(integrated_agent.h) K( Feb 10 09:27 2004 Page: 18) p n() N(/* Maximum possible burst id after which burst id is set to 0 */) N(/*) N(#define MAXBURSTID 4294967296) N(*/) N(#define MAXBURSTID 4294967295 // GMG -- changed to 2^32-1 to avoid compilation) N( error) N() N(class BurstManager;) N(class IPKTAgent;) N() N(typedef unsigned int u_int;) N() N(/* Burst Timer is a timer support class attached to the burst manager) N( * The main function of the timer is to fire the expire method, when) N( * the prespecified time expires. This functionality is used in the) N( * temporal burstification algorithm.) N( */) N(class BurstTimer: public TimerHandler) N({) N( public:) N( /* Constructs a new burst-timer object - intended to be initialized) N( * by the associated BurstManager object instance.) N( * bm - represents the burst-manager instance.) N( */) N( BurstTimer\( BurstManager *bm \): TimerHandler\(\) { bm_ = bm; }) N( protected:) N( /* What needs to be done when the time-out occurs */) N( virtual void BurstTimer::expire\(Event *e\);) N( /* a pointer to the associated burst-manager */) N( BurstManager *bm_;) N(};) N() N() N(/* The burst manager is an integral part of the Integrated Agent present) N( * only at the edge nodes \(or edge routers\). In this implementation, only) N( * one burst-manager \(i.e only one packet queue\) is maintained for every) N( * other edge node.) N( * Example: If the reference network contains N edge nodes, then \(N-1\)) N( * burst-manager references will be maintained at every edge node.) N( *) N( * The primary functionality of this object is to aggregate incoming TCP) N( * or other IP packets and to send them out as bursts, as the temporal) N( * burstification algorithm shown below:) N( *) N( * if\( sizeof\( burst-manager-queue \) > predefined_max_burst_size \) \)) N( * or if\( timeout-event has occured \)) N( * send the burst.) N( *) N( * This implementation does not provide multiple class queues etc.. per-edge) N( * node.) N( */) N(class BurstManager : public NsObject) N({) N( public:) N( /* constructs a new BurstManager object - Note: although the burst) N( * manager can be created via otcl, we intend to create it in the) N( * Integrated agent block in C++ itself. We just use the tcl interface) N() N(stdin) (Page 22/30) (Feb 21, 04 14:03) titlebordergrestore(Printed by U-GMGPC2\\Geoffrey M. Garner) rhead(stdin) (11/15) (Saturday February 21, 2004) footerend % of iso1dictpagesave restoreshowpage%%Page: (23-24) 12%%BeginPageSetup/pagesave save defsh 0 translate 90 rotate%%EndPageSetupiso1dict begingsavellx lly 12 add translate/v 0 store/x0 x v get 3.362408 add sx cw mul add store/y0 y v get bfs th add sub storex0 y0 moveto(integrated_agent.h) K( Feb 10 09:27 2004 Page: 19) p n() N( * to configure the parameters refer BurstManagerClass implementation) N( * on how-to-configure the burst-manager parameters */) N( BurstManager\(\);) N() N( /* Intended to be called by the associated Edge node's IPKT Agent \(or) N( * Integrated Agent\).) N( * destnodeid -- represents the destination node id of the destination) N( * edge router.) N( */) N( void init\( IPKTAgent* parent, int destnodeid \);) N() N( /* Handles a recv of a packet, when a packet is received it is queued) N( * on a per-destination basis, and a burst is released based on the) N( * temporal burstification algorithm show above. */) N( void recv\( Packet *p, Handler *h\);) N() N( /* Timeout method. Intended to be called when a timeout occurs */) N( void timeout\(\);) N() N( /* Static accessor/modifiers to access static burst parameters) N( * \(i\) max burst size - Maximum burst size) N( * \(ii\) pcnt guard) N( * \(iii\) offset time) N( * \(iv\) burst timeout) N( * \(v\) delta */) N( static int& maxburstsize\(\) { return maxburstsize__; }) N( static void setMaxburstsize\( int burstSize \) { maxburstsize__ = burstSiz) N(e; }) N() N( static int& pcntguard\(\) { return pcntguard__; }) N( static void setPcntguard\( int pcntguard \) { pcntguard__ = pcntguard; }) N() N( static double& offsettime\(\) { return offsettime__; }) N( static void setOffsettime\( double offsettime \) { offsettime__ = offsetti) N(me; }) N() N( static double& burst_timeout\(\) { return burst_timeout__; }) N( static void setBursttimeout\( double timeout \) { burst_timeout__ = timeou) N(t; }) N() N( static double& delta\(\) { return delta__; }) N( static void setDelta\( double delta \) { delta__ = delta; }) N() N( protected:) N( /* Send a data burst. Makes a call to IPKT agent's send burst method) N( * with the default parameters stored there */) N( void sendBurst\(\);) N() N( /* Reset the burst queues -- method name may be misleading ... :\) */) N( void resetBurstParams\(\);) N() N( /* TCL command interface. As of now, we just interact all commands via) N( * the associated IPKTAgent/Integrated agent's command\(\) method) N( */) N( int command\( int argc, const char*const* argv \);) N() N( /* Internal use only - Obtains the number of hops between the source) N( * and destination. Employs tcl support method for this, and assumes) N( * that the routes have been computed */) N() N(stdin) (Page 23/30) (Feb 21, 04 14:03) titleborder/v 1 store/x0 x v get 3.362408 add sx cw mul add store/y0 y v get bfs th add sub storex0 y0 moveto(integrated_agent.h) K( Feb 10 09:27 2004 Page: 20) p n() N( int nhops\( nsaddr_t, nsaddr_t \);) N() N( // Holds the packets \(only the headers\) while burst are still being bui) N(lt) N( Packet* BurstBuffer_[MAXBURSTSIZE];) N( // ref to the burst time) N( BurstTimer bt_;) N( // ref to the parent iPKT agent) N( IPKTAgent* a_;) N() N( // the current bur
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -