43 unsigned int seqNum = ((
AckOnlyPDU*) pdu)->getAckNackSeqNum();
44 std::vector<DTCPRxExpiryTimer*>* pduQ =
46 std::vector<DTCPRxExpiryTimer*>::iterator it;
47 bool foundAck =
false;
48 for (it = pduQ->begin(); it != pduQ->end(); ++it) {
49 if ((*it)->getPdu()->getSeqNum() == seqNum) {
51 double now = simTime().dbl();
52 double sent = (*it)->getSent();
55 newRtt = floor(newRtt * 1000000000);
56 newRtt = newRtt / 1000000000;
62 <<
"RTTEstimator: Did not find PDU on RxQ to compare times."
71 EV <<
"Current RTT: " << newRtt << endl;
79 double t =
SRTT - newRtt;
83 SRTT = (1 - alpha) *
SRTT + alpha * newRtt;
virtual bool run(DTPState *dtpState, DTCPState *dtcpState)
virtual ~RTTEstimatorPolicyTCP()
virtual int getType() const
const PDU * getCurrentPdu() const
simsignal_t sigStatTCPRTO
std::vector< DTCPRxExpiryTimer * > * getRxQ()
Register_Class(RTTEstimatorPolicyTCP)