Skip to content

Commit

Permalink
Fix for #15 - RTT value was not properly propagated after introduction
Browse files Browse the repository at this point in the history
of RTO value.
DTP.cc
- in the second stage of initialization, the initial value of RTO is set
to value of RTT configured via .ned
  • Loading branch information
screw committed Aug 12, 2016
1 parent 45faf53 commit 5a980e2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions policies/DIF/EFCP/DTP/RTTEstimator/RTTEstimatorPolicyBase.cc
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,8 @@ void RTTEstimatorPolicyBase::defaultAction(DTPState* dtpState, DTCPState* dtcpSt
RTO = dtpState->getRtt() + (double)dtpState->getQoSCube()->getATime()/(double)1000 + DTP_EPSILON;

}

void RTTEstimatorPolicyBase::setRto(double rto)
{
RTO = rto;
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class RTTEstimatorPolicyBase : public EFCPPolicy
// virtual bool run(DTPState* dtpState, DTCPState* dtcpState) = 0;
double RTO; // Retransmission timeout
double getRTO();

void setRto(double rto);

protected:
virtual void initialize(){};
Expand Down
3 changes: 3 additions & 0 deletions src/DIF/EFCP/DTP/DTP.cc
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ void DTP::initialize(int step)

}

//set initial value for RTO based on RTT from .ned
rttEstimatorPolicy->setRto(state->getRtt());

}

}
Expand Down

0 comments on commit 5a980e2

Please sign in to comment.