AODV loopback UDP echo test case. More...
Public Member Functions | |
LoopbackTestCase () | |
void | DoRun () |
Implementation to actually run this TestCase. More... | |
![]() | |
virtual | ~TestCase () |
Destructor. More... | |
std::string | GetName (void) const |
Private Member Functions | |
void | EchoData (Ptr< Socket > socket) |
void | ReceivePkt (Ptr< Socket > socket) |
void | SendData (Ptr< Socket > socket) |
Private Attributes | |
uint32_t | m_count |
number of packet received; More... | |
uint16_t | m_echoReplyPort |
uint16_t | m_echoSendPort |
Ptr< Socket > | m_echoSocket |
Ptr< Socket > | m_rxSocket |
Ptr< Socket > | m_txSocket |
Additional Inherited Members | |
![]() | |
enum | TestDuration { QUICK = 1, EXTENSIVE = 2, TAKES_FOREVER = 3 } |
How long the test takes to execute. More... | |
![]() | |
TestCase (std::string name) | |
Constructor. More... | |
void | AddTestCase (TestCase *testCase, enum TestDuration duration) |
Add an individual child TestCase to this test suite. More... | |
TestCase * | GetParent () const |
Get the parent of this TestCsse. More... | |
bool | IsStatusFailure (void) const |
Check if any tests failed. More... | |
bool | IsStatusSuccess (void) 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 (void) const |
Check if this run should assert on failure. More... | |
bool | MustContinueOnFailure (void) 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... | |
AODV loopback UDP echo test case.
Definition at line 55 of file loopback.cc.
ns3::aodv::LoopbackTestCase::LoopbackTestCase | ( | ) |
Definition at line 73 of file loopback.cc.
References m_echoReplyPort, and m_echoSendPort.
|
virtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 113 of file loopback.cc.
References first::address, ns3::Object::AggregateObject(), ns3::Ipv4AddressHelper::Assign(), ns3::Socket::Bind(), ns3::Socket::Close(), ns3::YansWifiChannelHelper::Create(), ns3::NodeContainer::Create(), ns3::YansWifiChannelHelper::Default(), ns3::NqosWifiMacHelper::Default(), ns3::WifiHelper::Default(), ns3::YansWifiPhyHelper::Default(), ns3::Simulator::Destroy(), first::devices, EchoData(), ns3::NodeContainer::Get(), ns3::Node::GetId(), ns3::Ipv4Address::GetLoopback(), ns3::Socket::GetNode(), ns3::Object::GetObject(), ns3::InternetStackHelper::Install(), ns3::WifiHelper::Install(), first::interfaces, m_count, m_echoReplyPort, m_echoSendPort, m_echoSocket, m_rxSocket, m_txSocket, ns3::MakeCallback(), first::nodes, NS_TEST_ASSERT_MSG_EQ, ReceivePkt(), ns3::Simulator::Run(), ns3::Simulator::ScheduleWithContext(), ns3::Seconds(), SendData(), ns3::Ipv4AddressHelper::SetBase(), ns3::YansWifiPhyHelper::SetChannel(), ns3::MobilityModel::SetPosition(), ns3::Socket::SetRecvCallback(), ns3::WifiHelper::SetRemoteStationManager(), ns3::InternetStackHelper::SetRoutingHelper(), ns3::NqosWifiMacHelper::SetType(), ns3::Simulator::Stop(), and third::wifi.
Definition at line 88 of file loopback.cc.
References ns3::InetSocketAddress::ConvertFrom(), ns3::InetSocketAddress::GetIpv4(), m_echoReplyPort, ns3::Socket::RecvFrom(), ns3::Packet::RemoveAllByteTags(), ns3::Packet::RemoveAllPacketTags(), and ns3::Socket::SendTo().
Referenced by DoRun().
Definition at line 80 of file loopback.cc.
References m_count, and ns3::Socket::Recv().
Referenced by DoRun().
Definition at line 103 of file loopback.cc.
References ns3::Node::GetId(), ns3::Ipv4Address::GetLoopback(), ns3::Socket::GetNode(), m_echoSendPort, ns3::Simulator::ScheduleWithContext(), ns3::Seconds(), and ns3::Socket::SendTo().
Referenced by DoRun().
|
private |
number of packet received;
Definition at line 57 of file loopback.cc.
Referenced by DoRun(), and ReceivePkt().
|
private |
Definition at line 62 of file loopback.cc.
Referenced by DoRun(), EchoData(), and LoopbackTestCase().
|
private |
Definition at line 61 of file loopback.cc.
Referenced by DoRun(), LoopbackTestCase(), and SendData().
Definition at line 59 of file loopback.cc.
Referenced by DoRun().
Definition at line 60 of file loopback.cc.
Referenced by DoRun().
Definition at line 58 of file loopback.cc.
Referenced by DoRun().