|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
23 #include "ns3/rtt-estimator.h"
60 virtual void RttTrace (
Time oldTime,
Time newTime);
63 virtual void ConfigureEnvironment ();
76 m_enableTs (enableTs),
79 m_pktCount (pktCount),
87 TcpGeneralTest::ConfigureEnvironment ();
133 "Default Estimate for the RTT");
158 "A retransmission is not flagged as such");
163 "Incorrectly flagging seq as retransmission");
169 "A retransmission is not flagged as such");
206 uint32_t pktCount, std::vector<uint32_t> toDrop);
218 std::vector<uint32_t> toDrop)
230 std::vector<uint32_t>::iterator it;
262 std::vector<uint32_t> toDrop;
263 toDrop.push_back (501);
266 " some data, with retr",
270 " some data, with retr",
274 toDrop.push_back (501);
276 " some data, with retr",
280 " some data, with retr",
284 toDrop.push_back (54001);
285 toDrop.push_back (58001);
286 toDrop.push_back (58501);
287 toDrop.push_back (60001);
288 toDrop.push_back (68501);
290 " a lot of data, with retr",
291 false, 1000, toDrop),
294 " a lot of data, with retr",
TcpRttEstimationWithLossTest(const std::string &desc, bool enableTs, uint32_t pktCount, std::vector< uint32_t > toDrop)
Constructor.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
SocketWho
Used as parameter of methods, specifies on what node the caller is interested (e.g.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
std::vector< uint32_t > m_toDrop
Packets to drop.
AttributeValue implementation for Boolean.
bool m_enableTs
Enable TimeStamp option.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void SetTransmitStart(Time startTime)
Set the initial time at which the application sends the first data packet.
TcpRttEstimationTest(const std::string &desc, bool enableTs, uint32_t pktCount)
Constructor.
virtual void ConfigureEnvironment()
Change the configuration of the environment.
void SetAppPktCount(uint32_t pktCount)
Set app packet count.
bool m_rttChanged
True if RTT has changed.
void SetAttribute(std::string name, const AttributeValue &value)
Set a single attribute, raising fatal errors if unsuccessful.
Ptr< ErrorModel > CreateReceiverErrorModel()
Create and return the error model to install in the receiver node.
Check Rtt calculations with packet losses.
#define NS_TEST_ASSERT_MSG_NE(actual, limit, msg)
Test that an actual and expected (limit) value are not equal and report and abort if not.
void SetMTU(uint32_t mtu)
MTU of the bottleneck link.
Smart pointer class similar to boost::intrusive_ptr.
uint32_t m_pktCount
Packet counter.
uint32_t m_dataCount
Data counter.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
static TcpRttEstimationTestSuite g_tcpRttEstimationTestSuite
Static variable for test initialization.
TCP RTT estimation TestSuite.
SequenceNumber32 m_highestTxSeq
Highest sequence number sent.
void FinalChecks()
Performs the (eventual) final checks through test asserts.
Simulation virtual time values and global simulation resolution.
TcpRttEstimationTestSuite()
virtual Ptr< TcpSocketMsgBase > CreateReceiverSocket(Ptr< Node > node)
Create and install the socket to install on the receiver.
General infrastructure for TCP testing.
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
virtual void Rx(const Ptr< const Packet > p, const TcpHeader &h, SocketWho who)
Packet received from IP layer.
@ UNIT
This test suite implements a Unit Test.
Time Seconds(double value)
Construct a Time in the indicated unit.
virtual Ptr< TcpSocketMsgBase > CreateSenderSocket(Ptr< Node > node)
Create and install the socket to install on the sender.
Time GetEstimate(void) const
gets the RTT estimate.
void AddSeqToKill(const SequenceNumber32 &seq)
Add the sequence number to the list of segments to be killed.
virtual void RttTrace(Time oldTime, Time newTime)
Rtt changes.
double GetSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
virtual void UpdatedRttHistory(const SequenceNumber32 &seq, uint32_t sz, bool isRetransmission, SocketWho who)
Updated the Rtt history.
Ptr< RttEstimator > GetRttEstimator(SocketWho who)
Get the Rtt estimator of the socket.
virtual void Tx(const Ptr< const Packet > p, const TcpHeader &h, SocketWho who)
Packet transmitted down to IP layer.
void SetPropagationDelay(Time propDelay)
Propagation delay of the bottleneck link.