[Sumover-dev] [svn commit] r4658 - vic/branches/cc/cc

sumover-dev at cs.ucl.ac.uk sumover-dev at cs.ucl.ac.uk
Mon Mar 1 20:52:46 GMT 2010


Author: soohyunc
Date: Mon Mar  1 20:52:46 2010
New Revision: 4658

Modified:
   vic/branches/cc/cc/cc_timer.cpp
   vic/branches/cc/cc/tfwc_sndr.cpp
   vic/branches/cc/cc/tfwc_sndr.h

Log:
-- added <stdlib.h> for the use of abort() function.
-- missed to place set_rtx_timer() every time send a packet
-- added option if TFWC is driven by timer-out mechanism
   (this timer-driven mechanism has not been fully implemented yet)



Modified: vic/branches/cc/cc/cc_timer.cpp
==============================================================================
--- vic/branches/cc/cc/cc_timer.cpp	(original)
+++ vic/branches/cc/cc/cc_timer.cpp	Mon Mar  1 20:52:46 2010
@@ -32,6 +32,7 @@
  */
 
 #include <assert.h>
+#include <stdlib.h>
 #include "cc_timer.h"
 
 void CcTimerHandler::sched(double delay) {

Modified: vic/branches/cc/cc/tfwc_sndr.cpp
==============================================================================
--- vic/branches/cc/cc/tfwc_sndr.cpp	(original)
+++ vic/branches/cc/cc/tfwc_sndr.cpp	Mon Mar  1 20:52:46 2010
@@ -117,6 +117,8 @@
 	I_tot0_ = 0.0;
 	I_tot1_ = 0.0;
 	tot_weight_ = 0.0;
+
+	timer_driven_ = false;
 }
 
 void TfwcSndr::tfwc_sndr_send(int seqno, double now, double offset) {
@@ -136,6 +138,9 @@
 	//assert (seqno_ > 0);
 	// number of total data packet sent
 	//ndtp_++;
+	
+	// set retransmission timer
+	set_rtx_timer();
 }
 
 /*
@@ -580,10 +585,14 @@
  * retransmission timer-out
  */
 void TfwcSndr::expire(int option) {
-	if (option == TFWC_TIMER_RTX)
+	if (option == TFWC_TIMER_RTX) {
+		if(!timer_driven_)
 		reset_rtx_timer(1);
-	else
+		else
 		reset_rtx_timer(0);
+
+		// TBA - need to add send method here
+	}
 }
 
 /*

Modified: vic/branches/cc/cc/tfwc_sndr.h
==============================================================================
--- vic/branches/cc/cc/tfwc_sndr.h	(original)
+++ vic/branches/cc/cc/tfwc_sndr.h	Mon Mar  1 20:52:46 2010
@@ -282,6 +282,7 @@
 	double I_tot1_;		// form 1 to n
 	double tot_weight_;	// total weight
 	int hsz_;		// current history size
+	bool timer_driven_;	// is TFWC being driven by timer-out?
 
 	// RTT related variables
 	double srtt_;	// smoothed RTT



More information about the Sumover-dev mailing list