ns-allinone-2.35/rap/rap.cc
RapAgent::RapAgent() : Agent(PT_RAP_DATA), ipgTimer_(this), rttTimer_(this),
 	seqno_(0), sessionLossCount_(0), curseq_(0), ipg_(2.0), srtt_(2.0), 
	timeout_(2.0), lastRecv_(0), lastMiss_(0), prevRecv_(0), dctr_(0), 
	flags_(0), fixIpg_(0)
{
	bind("packetSize_", &size_);	// Default 512
	bind("seqno_", &seqno_);	// Default 0
	bind("sessionLossCount_", &sessionLossCount_); // Default 0

	bind("ipg_", &ipg_);		// Default 2 seconds
	bind("beta_", &beta_);	// Default 0.5
	bind("alpha_", &alpha_);	// Default 1.0

	bind("srtt_", &srtt_);	// Default 2 seconds
	bind("variance_", &variance_);// Default 0
	bind("delta_", &delta_);	// Default 0.5
	bind("mu_", &mu_);		// Default 1.2
	bind("phi_", &phi_);		// Default 4

	bind("timeout_", &timeout_);	// Default 2 seconds

	bind("overhead_", &overhead_); // Default 0

	bind("useFineGrain_", &useFineGrain_); // Default FALSE
	bind("kfrtt_", &kfrtt_);	// Default 0.9
	bind("kxrtt_", &kxrtt_);	// Default 0.01

	bind("debugEnable_", &debugEnable_);	// Default FALSE

	bind("rap_base_hdr_size_", &rap_base_hdr_size_);

	bind("dpthresh_", &dpthresh_);

	frtt_ = xrtt_ = srtt_;
}
//----------------------------------------------------------------------
// RapAgent::RapAgent
//	Initialize the RAP agent.
//      Bind variables which have to be accessed in both Tcl and C++.
//      Initializes time values.
//----------------------------------------------------------------------
:RapAgent
Initialize the RAP agent.
Bind variables which have to be accessed in both Tcl and C++.
Initializes time values.
: RapAgent Initialize the RAP agent . Bind variables which have to be accessed in both Tcl and C ++ . Initializes time values .
RapAgent::RapAgent() : Agent(PT_RAP_DATA), ipgTimer_(this), rttTimer_(this),
 	seqno_(0), sessionLossCount_(0), curseq_(0), ipg_(2.0), srtt_(2.0), 
	timeout_(2.0), lastRecv_(0), lastMiss_(0), prevRecv_(0), dctr_(0), 
	flags_(0), fixIpg_(0)
{
	bind("packetSize_", &size_);	
	bind("seqno_", &seqno_);	
	bind("sessionLossCount_", &sessionLossCount_); 
	bind("ipg_", &ipg_);		
	bind("beta_", &beta_);	.5
	bind("alpha_", &alpha_);	
	bind("srtt_", &srtt_);	
	bind("variance_", &variance_);
	bind("delta_", &delta_);	.5
	bind("mu_", &mu_);		
	bind("phi_", &phi_);		
	bind("timeout_", &timeout_);	
	bind("overhead_", &overhead_); 
	bind("useFineGrain_", &useFineGrain_); 
	bind("kfrtt_", &kfrtt_);	.9
	bind("kxrtt_", &kxrtt_);	.01
	bind("debugEnable_", &debugEnable_);	
	bind("rap_base_hdr_size_", &rap_base_hdr_size_);
	bind("dpthresh_", &dpthresh_);
	frtt_ = xrtt_ = srtt_;
}
RapAgent :: RapAgent ( ) : Agent ( PT_RAP_DATA ) , ipgTimer_ ( this ) , rttTimer_ ( this ) , seqno_ ( 0 ) , sessionLossCount_ ( 0 ) , curseq_ ( 0 ) , ipg_ ( 2.0 ) , srtt_ ( 2.0 ) , timeout_ ( 2.0 ) , lastRecv_ ( 0 ) , lastMiss_ ( 0 ) , prevRecv_ ( 0 ) , dctr_ ( 0 ) , flags_ ( 0 ) , fixIpg_ ( 0 ) { bind ( " " , & size_ ) ; bind ( " " , & seqno_ ) ; bind ( " " , & sessionLossCount_ ) ; bind ( " " , & ipg_ ) ; bind ( " " , & beta_ ) ; bind ( " " , & alpha_ ) ; bind ( " " , & srtt_ ) ; bind ( " " , & variance_ ) ; bind ( " " , & delta_ ) ; bind ( " " , & mu_ ) ; bind ( " " , & phi_ ) ; bind ( " " , & timeout_ ) ; bind ( " " , & overhead_ ) ; bind ( " " , & useFineGrain_ ) ; bind ( " " , & kfrtt_ ) ; bind ( " " , & kxrtt_ ) ; bind ( " " , & debugEnable_ ) ; bind ( " " , & rap_base_hdr_size_ ) ; bind ( " " , & dpthresh_ ) ; frtt_ = xrtt_ = srtt_ ; }
RapAgent::RapAgent
Initialize the RAP agent.
RapAgent :: RapAgent Initialize the RAP agent .
// Default 512 // Default 0 // Default 0 // Default 2 seconds // Default 0.5 // Default 1.0 // Default 2 seconds // Default 0 // Default 0.5 // Default 1.2 // Default 4 // Default 2 seconds // Default 0 // Default FALSE // Default 0.9 // Default 0.01 // Default FALSE