50 double newRtt = dtpState->
getRtt();
62 unsigned int seqNum = ((
AckOnlyPDU*) pdu)->getAckNackSeqNum();
63 std::vector<DTCPRxExpiryTimer*>* pduQ = dtcpState->
getRxQ();
64 std::vector<DTCPRxExpiryTimer*>::iterator it;
65 bool foundAck =
false;
66 for (it = pduQ->begin(); it != pduQ->end(); ++it)
68 if ((*it)->getPdu()->getSeqNum() == seqNum)
71 double now = simTime().dbl();
72 double sent = (*it)->getSent();
75 newRtt = floor(newRtt * 1000000000);
76 newRtt = newRtt / 1000000000;
83 EV <<
"RTTEstimator: Did not find PDU on RxQ to compare times." << endl;
93 double tmp = floor(((alpha * dtpState->
getRtt()) + ((1 - alpha) * newRtt)) * 1000000000);
95 dtpState->
setRtt(((
double) tmp / 1000000000));
96 EV <<
"Current RTT: " << dtpState->
getRtt() << endl;
virtual ~RTTEstimatorPolicyBase()
double getATime() const
Gets A-Timer parameter.
const QoSCube * getQoSCube() const
virtual int getType() const
const PDU * getCurrentPdu() const
void defaultAction(DTPState *dtpState, DTCPState *dtcpState)
std::vector< DTCPRxExpiryTimer * > * getRxQ()