Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 // | 2 // |
3 // Copyright (c) 2006 Georgia Tech Research Corporation | 3 // Copyright (c) 2006 Georgia Tech Research Corporation |
4 // | 4 // |
5 // This program is free software; you can redistribute it and/or modify | 5 // This program is free software; you can redistribute it and/or modify |
6 // it under the terms of the GNU General Public License version 2 as | 6 // it under the terms of the GNU General Public License version 2 as |
7 // published by the Free Software Foundation; | 7 // published by the Free Software Foundation; |
8 // | 8 // |
9 // This program is distributed in the hope that it will be useful, | 9 // This program is distributed in the hope that it will be useful, |
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
90 * \param seq the packet sequence number. | 90 * \param seq the packet sequence number. |
91 * \param size the packet size. | 91 * \param size the packet size. |
92 */ | 92 */ |
93 virtual void SentSeq (SequenceNumber32 seq, uint32_t size); | 93 virtual void SentSeq (SequenceNumber32 seq, uint32_t size); |
94 | 94 |
95 /** | 95 /** |
96 * \brief Note that a particular ack sequence has been received | 96 * \brief Note that a particular ack sequence has been received |
97 * \param ackSeq the ack sequence number. | 97 * \param ackSeq the ack sequence number. |
98 * \return The measured RTT for this ack. | 98 * \return The measured RTT for this ack. |
99 */ | 99 */ |
100 virtual Time AckSeq (SequenceNumber32 ackSeq); | 100 virtual Time EstimateRttFromSeq (SequenceNumber32 ackSeq); |
101 | 101 |
102 /** | 102 /** |
103 * \brief Clear all history entries | 103 * \brief Clear all history entries |
104 */ | 104 */ |
105 virtual void ClearSent (); | 105 virtual void ClearSent (); |
106 | |
107 /** | |
108 * \brief Return an uint32_t value which represent "now" | |
109 * | |
110 * The value returned is usually used as Timestamp option for the | |
111 * TCP header; when the value will be echoed back, calculating the RTT | |
112 * will be an easy matter. | |
113 * | |
114 * \return The Timestamp value to use | |
115 */ | |
116 virtual uint32_t NowToTsValue (); | |
Tom Henderson
2014/07/14 19:28:35
this method should probably be declared static sin
| |
117 | |
118 /** | |
119 * \brief Estimate the RTT from a TS echo value | |
120 * | |
121 * \param echoTime Echoed value from other side | |
122 * | |
123 * \return The measured RTT | |
124 */ | |
125 virtual Time EstimateRttFromTs (uint32_t echoTime); | |
Tom Henderson
2014/07/14 19:28:35
This is not very clear. The implementation calls
| |
126 | 106 |
127 /** | 107 /** |
128 * \brief Add a new measurement to the estimator. Pure virtual function. | 108 * \brief Add a new measurement to the estimator. Pure virtual function. |
129 * \param t the new RTT measure. | 109 * \param t the new RTT measure. |
130 */ | 110 */ |
131 virtual void Measurement (Time t) = 0; | 111 virtual void Measurement (Time t) = 0; |
132 | 112 |
133 /** | 113 /** |
134 * \brief Returns the estimated RTO. Pure virtual function. | 114 * \brief Returns the estimated RTO. Pure virtual function. |
135 * \return the estimated RTO. | 115 * \return the estimated RTO. |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
247 */ | 227 */ |
248 void Gain (double g); | 228 void Gain (double g); |
249 | 229 |
250 private: | 230 private: |
251 double m_gain; //!< Filter gain | 231 double m_gain; //!< Filter gain |
252 Time m_variance; //!< Current variance | 232 Time m_variance; //!< Current variance |
253 }; | 233 }; |
254 } // namespace ns3 | 234 } // namespace ns3 |
255 | 235 |
256 #endif /* RTT_ESTIMATOR_H */ | 236 #endif /* RTT_ESTIMATOR_H */ |
LEFT | RIGHT |