A Discrete-Event Network Simulator
API
ChannelRoutingTestCase Class Reference

route packets or frames in different approaches see 1609.4-2010 chapter 5.3.4 More...

+ Inheritance diagram for ChannelRoutingTestCase:
+ Collaboration diagram for ChannelRoutingTestCase:

Public Member Functions

 ChannelRoutingTestCase (void)
 
virtual ~ChannelRoutingTestCase (void)
 
void SendIp (bool shouldSucceed, bool ipv6)
 Send IP-based packets. More...
 
void SendWsa (bool shouldSucceed, const VsaInfo &vsaInfo)
 Send VSA management frames. More...
 
void SendWsmp (bool shouldSucceed, const TxInfo &txInfo)
 Send WSMP or other packets. More...
 
- Public Member Functions inherited from ns3::TestCase
virtual ~TestCase ()
 Destructor. More...
 
std::string GetName (void) const
 

Private Member Functions

virtual void DoRun (void)
 Implementation to actually run this TestCase. More...
 
bool Receive (Ptr< NetDevice > dev, Ptr< const Packet > pkt, uint16_t mode, const Address &sender)
 Receive function. More...
 
bool ReceiveVsa (Ptr< const Packet > pkt, const Address &address, uint32_t, uint32_t)
 Receive VSA function. More...
 

Private Attributes

Ptr< WaveNetDevicem_sender
 sender 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...
 
TestCaseGetParent () 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...
 

Detailed Description

route packets or frames in different approaches see 1609.4-2010 chapter 5.3.4

Definition at line 312 of file mac-extension-test-suite.cc.

Constructor & Destructor Documentation

◆ ChannelRoutingTestCase()

ChannelRoutingTestCase::ChannelRoutingTestCase ( void  )

Definition at line 360 of file mac-extension-test-suite.cc.

◆ ~ChannelRoutingTestCase()

ChannelRoutingTestCase::~ChannelRoutingTestCase ( void  )
virtual

Definition at line 365 of file mac-extension-test-suite.cc.

Member Function Documentation

◆ DoRun()

void ChannelRoutingTestCase::DoRun ( void  )
privatevirtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Implements ns3::TestCase.

Definition at line 398 of file mac-extension-test-suite.cc.

References CCH, ns3::VsaInfo::channelNumber, TestCaseHelper::CreatWaveDevice(), first::devices, EXTENDED_ALTERNATING, m_sender, SCH1, SCH2, SCH3, SCH4, SCH5, SCH6, ns3::Seconds(), SendIp(), SendWsa(), SendWsmp(), ns3::VSA_TRANSMIT_IN_BOTHI, and ns3::WIFI_PREAMBLE_LONG.

+ Here is the call graph for this function:

◆ Receive()

bool ChannelRoutingTestCase::Receive ( Ptr< NetDevice dev,
Ptr< const Packet pkt,
uint16_t  mode,
const Address sender 
)
private

Receive function.

Parameters
devthe device
pktthe packet
modethe mode
senderthe sender address
Returns
true if successful

◆ ReceiveVsa()

bool ChannelRoutingTestCase::ReceiveVsa ( Ptr< const Packet pkt,
const Address address,
uint32_t  ,
uint32_t   
)
private

Receive VSA function.

Parameters
pktthe packet
addressthe address
Returns
true if successful

◆ SendIp()

void ChannelRoutingTestCase::SendIp ( bool  shouldSucceed,
bool  ipv6 
)

Send IP-based packets.

Parameters
shouldSucceedis used to check whether packet sent should be successful.
ipv6is IPv6?

Definition at line 379 of file mac-extension-test-suite.cc.

References m_sender, NS_TEST_EXPECT_MSG_EQ, test-ns3::result, and ns3::WaveNetDevice::Send().

Referenced by DoRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendWsa()

void ChannelRoutingTestCase::SendWsa ( bool  shouldSucceed,
const VsaInfo vsaInfo 
)

Send VSA management frames.

Parameters
shouldSucceedis used to check whether packet sent should be successful.
vsaInfoVSA info

Definition at line 391 of file mac-extension-test-suite.cc.

References m_sender, NS_TEST_EXPECT_MSG_EQ, test-ns3::result, and ns3::WaveNetDevice::StartVsa().

Referenced by DoRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendWsmp()

void ChannelRoutingTestCase::SendWsmp ( bool  shouldSucceed,
const TxInfo txInfo 
)

Send WSMP or other packets.

Parameters
shouldSucceedis used to check whether packet sent should be successful.
txInfotransmit info

Definition at line 370 of file mac-extension-test-suite.cc.

References m_sender, NS_TEST_EXPECT_MSG_EQ, test-ns3::result, and ns3::WaveNetDevice::SendX().

Referenced by DoRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_sender

Ptr<WaveNetDevice> ChannelRoutingTestCase::m_sender
private

sender

Definition at line 357 of file mac-extension-test-suite.cc.

Referenced by DoRun(), SendIp(), SendWsa(), and SendWsmp().


The documentation for this class was generated from the following file: