The TcpRateLinux Basic Test. More...
Public Member Functions | |
TcpRateLinuxBasicTest (uint32_t cWnd, SequenceNumber32 tailSeq, SequenceNumber32 nextTx, uint32_t testCase, std::string testName) | |
Constructor. More... | |
Public Member Functions inherited from ns3::TestCase | |
TestCase (const TestCase &)=delete | |
virtual | ~TestCase () |
Destructor. More... | |
std::string | GetName () const |
TestCase & | operator= (const TestCase &)=delete |
Private Member Functions | |
void | DoRun () override |
Implementation to actually run this TestCase. More... | |
void | SendSkb (TcpTxItem *skb) |
Send an application packet. More... | |
void | SkbDelivered (TcpTxItem *skb) |
Deliver an application packet. More... | |
Private Attributes | |
uint32_t | m_cWnd |
Congestion window size. More... | |
uint32_t | m_delivered |
Number of segments delivered. More... | |
Time | m_deliveredTime |
Last time of a delivery. More... | |
uint32_t | m_inFlight |
Number of packets in-flight. More... | |
SequenceNumber32 | m_nextTx |
Tx next sequence number. More... | |
TcpRateLinux | m_rateOps |
Rate information for TCP. More... | |
uint32_t | m_segmentSize |
Segment size. More... | |
std::vector< TcpTxItem * > | m_skbs |
Application packets. More... | |
SequenceNumber32 | m_tailSeq |
Tail sequence number. More... | |
uint32_t | m_testCase |
Test case type. More... | |
Additional Inherited Members | |
Public Types inherited from ns3::TestCase | |
enum | TestDuration { QUICK = 1 , EXTENSIVE = 2 , TAKES_FOREVER = 3 } |
How long the test takes to execute. More... | |
Protected Member Functions inherited from ns3::TestCase | |
TestCase (std::string name) | |
Constructor. More... | |
void | AddTestCase (TestCase *testCase, TestDuration duration=QUICK) |
Add an individual child TestCase to this test suite. More... | |
TestCase * | GetParent () const |
Get the parent of this TestCase. More... | |
bool | IsStatusFailure () const |
Check if any tests failed. More... | |
bool | IsStatusSuccess () const |
Check if all tests passed. More... | |
void | SetDataDir (std::string directory) |
Set the data directory where reference trace files can be found. More... | |
void | ReportTestFailure (std::string cond, std::string actual, std::string limit, std::string message, std::string file, int32_t line) |
Log the failure of this TestCase. More... | |
bool | MustAssertOnFailure () const |
Check if this run should assert on failure. More... | |
bool | MustContinueOnFailure () const |
Check if this run should continue on failure. More... | |
std::string | CreateDataDirFilename (std::string filename) |
Construct the full path to a file in the data directory. More... | |
std::string | CreateTempDirFilename (std::string filename) |
Construct the full path to a file in a temporary directory. More... | |
The TcpRateLinux Basic Test.
Definition at line 44 of file tcp-rate-ops-test.cc.
TcpRateLinuxBasicTest::TcpRateLinuxBasicTest | ( | uint32_t | cWnd, |
SequenceNumber32 | tailSeq, | ||
SequenceNumber32 | nextTx, | ||
uint32_t | testCase, | ||
std::string | testName | ||
) |
Constructor.
cWnd | Congestion window size |
tailSeq | Tail sequence number |
nextTx | Tx next sequence number |
testCase | test case type |
testName | test name |
Definition at line 87 of file tcp-rate-ops-test.cc.
|
overrideprivatevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 105 of file tcp-rate-ops-test.cc.
References m_skbs, ns3::Seconds(), SendSkb(), and SkbDelivered().
|
private |
Send an application packet.
skb | the data to send |
Definition at line 134 of file tcp-rate-ops-test.cc.
References ns3::TcpRateLinux::CalculateAppLimited(), ns3::TcpTxItem::GetRateInformation(), ns3::TcpTxItem::GetSeqSize(), m_cWnd, ns3::TcpTxItem::RateInformation::m_delivered, m_delivered, ns3::TcpTxItem::RateInformation::m_deliveredTime, m_deliveredTime, m_inFlight, m_nextTx, m_rateOps, m_segmentSize, m_tailSeq, ns3::Now(), NS_TEST_ASSERT_MSG_EQ, and ns3::TcpRateLinux::SkbSent().
Referenced by DoRun().
|
private |
Deliver an application packet.
skb | the data to deliver |
Definition at line 160 of file tcp-rate-ops-test.cc.
References ns3::TcpTxItem::GetRateInformation(), ns3::TcpTxItem::GetSeqSize(), m_delivered, ns3::TcpTxItem::RateInformation::m_deliveredTime, m_deliveredTime, m_inFlight, ns3::TcpTxItem::RateInformation::m_isAppLimited, m_rateOps, m_testCase, Max, ns3::Now(), NS_TEST_ASSERT_MSG_EQ, and ns3::TcpRateLinux::SkbDelivered().
Referenced by DoRun().
|
private |
Congestion window size.
Definition at line 76 of file tcp-rate-ops-test.cc.
Referenced by SendSkb().
|
private |
Number of segments delivered.
Definition at line 79 of file tcp-rate-ops-test.cc.
Referenced by SendSkb(), and SkbDelivered().
|
private |
Last time of a delivery.
Definition at line 80 of file tcp-rate-ops-test.cc.
Referenced by SendSkb(), and SkbDelivered().
|
private |
Number of packets in-flight.
Definition at line 77 of file tcp-rate-ops-test.cc.
Referenced by SendSkb(), and SkbDelivered().
|
private |
Tx next sequence number.
Definition at line 82 of file tcp-rate-ops-test.cc.
Referenced by SendSkb().
|
private |
Rate information for TCP.
Definition at line 75 of file tcp-rate-ops-test.cc.
Referenced by SendSkb(), and SkbDelivered().
|
private |
|
private |
|
private |
|
private |