A Discrete-Event Network Simulator
API
LrWpanAckTestCase Class Reference

LrWpan ACK Test. More...

+ Inheritance diagram for LrWpanAckTestCase:
+ Collaboration diagram for LrWpanAckTestCase:

Public Types

enum  TestMode_e { EXTENDED_ADDRESS_UNICAST , SHORT_ADDRESS_UNICAST , SHORT_ADDRESS_MULTICAST , SHORT_ADDRESS_BROADCAST }
 Test modes. More...
 
- Public Types inherited from ns3::TestCase
enum  TestDuration { QUICK = 1 , EXTENSIVE = 2 , TAKES_FOREVER = 3 }
 How long the test takes to execute. More...
 

Public Member Functions

 LrWpanAckTestCase (const char *const prefix, TestMode_e mode)
 Create test case. More...
 
void DataConfirmDev0 (McpsDataConfirmParams params)
 Function called when DataConfirm is hit on dev0. More...
 
void DataConfirmDev1 (McpsDataConfirmParams params)
 Function called when DataConfirm is hit on dev1. More...
 
void DataIndicationDev0 (McpsDataIndicationParams params, Ptr< Packet > p)
 Function called when DataIndication is hit on dev0. More...
 
void DataIndicationDev1 (McpsDataIndicationParams params, Ptr< Packet > p)
 Function called when DataIndication is hit on dev1. More...
 
- Public Member Functions inherited from ns3::TestCase
 TestCase (const TestCase &)=delete
 
virtual ~TestCase ()
 Destructor. More...
 
std::string GetName (void) const
 
TestCaseoperator= (const TestCase &)=delete
 

Private Member Functions

virtual void DoRun (void)
 Implementation to actually run this TestCase. More...
 

Private Attributes

Ptr< LrWpanNetDevicem_dev0
 1st LrWpanNetDevice. More...
 
Ptr< LrWpanNetDevicem_dev1
 2nd LrWpanNetDevice. More...
 
TestMode_e m_mode
 Test mode. More...
 
std::string m_prefix
 Filename prefix. More...
 
Time m_replyArrivalTime
 Reply arrival time. More...
 
Time m_replySentTime
 Reply successfully sent time. More...
 
Time m_replyTime
 Reply time. More...
 
Time m_requestSentTime
 Request successfully sent time. More...
 
Time m_requestTime
 Request time. More...
 

Additional Inherited Members

- 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

LrWpan ACK Test.

Definition at line 55 of file lr-wpan-ack-test.cc.

Member Enumeration Documentation

◆ TestMode_e

Test modes.

Enumerator
EXTENDED_ADDRESS_UNICAST 

extended addresses

SHORT_ADDRESS_UNICAST 

short addresses, unicast

SHORT_ADDRESS_MULTICAST 

short addresses, multicast

SHORT_ADDRESS_BROADCAST 

short addresses, broadcast

Definition at line 62 of file lr-wpan-ack-test.cc.

Constructor & Destructor Documentation

◆ LrWpanAckTestCase()

LrWpanAckTestCase::LrWpanAckTestCase ( const char *const  prefix,
TestMode_e  mode 
)

Create test case.

Parameters
prefixUnique file names prefix
modeTest mode

Definition at line 115 of file lr-wpan-ack-test.cc.

References m_mode, m_prefix, m_replyArrivalTime, m_replySentTime, m_replyTime, m_requestSentTime, m_requestTime, and ns3::Seconds().

+ Here is the call graph for this function:

Member Function Documentation

◆ DataConfirmDev0()

void LrWpanAckTestCase::DataConfirmDev0 ( McpsDataConfirmParams  params)

Function called when DataConfirm is hit on dev0.

Parameters
paramsThe MCPS params.

Definition at line 159 of file lr-wpan-ack-test.cc.

References m_requestSentTime, and ns3::Now().

Referenced by DoRun().

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

◆ DataConfirmDev1()

void LrWpanAckTestCase::DataConfirmDev1 ( McpsDataConfirmParams  params)

Function called when DataConfirm is hit on dev1.

Parameters
paramsThe MCPS params.

Definition at line 165 of file lr-wpan-ack-test.cc.

References m_replySentTime, and ns3::Now().

Referenced by DoRun().

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

◆ DataIndicationDev0()

void LrWpanAckTestCase::DataIndicationDev0 ( McpsDataIndicationParams  params,
Ptr< Packet p 
)

Function called when DataIndication is hit on dev0.

Parameters
paramsThe MCPS params.
pthe packet.

Definition at line 128 of file lr-wpan-ack-test.cc.

References m_replyArrivalTime, and ns3::Now().

Referenced by DoRun().

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

◆ DataIndicationDev1()

void LrWpanAckTestCase::DataIndicationDev1 ( McpsDataIndicationParams  params,
Ptr< Packet p 
)

◆ DoRun()

Member Data Documentation

◆ m_dev0

Ptr<LrWpanNetDevice> LrWpanAckTestCase::m_dev0
private

1st LrWpanNetDevice.

Definition at line 111 of file lr-wpan-ack-test.cc.

Referenced by DoRun().

◆ m_dev1

Ptr<LrWpanNetDevice> LrWpanAckTestCase::m_dev1
private

2nd LrWpanNetDevice.

Definition at line 112 of file lr-wpan-ack-test.cc.

Referenced by DataIndicationDev1(), and DoRun().

◆ m_mode

TestMode_e LrWpanAckTestCase::m_mode
private

Test mode.

Definition at line 110 of file lr-wpan-ack-test.cc.

Referenced by LrWpanAckTestCase(), DataIndicationDev1(), and DoRun().

◆ m_prefix

std::string LrWpanAckTestCase::m_prefix
private

Filename prefix.

Definition at line 104 of file lr-wpan-ack-test.cc.

Referenced by LrWpanAckTestCase(), and DoRun().

◆ m_replyArrivalTime

Time LrWpanAckTestCase::m_replyArrivalTime
private

Reply arrival time.

Definition at line 109 of file lr-wpan-ack-test.cc.

Referenced by LrWpanAckTestCase(), DataIndicationDev0(), and DoRun().

◆ m_replySentTime

Time LrWpanAckTestCase::m_replySentTime
private

Reply successfully sent time.

Definition at line 108 of file lr-wpan-ack-test.cc.

Referenced by LrWpanAckTestCase(), DataConfirmDev1(), and DoRun().

◆ m_replyTime

Time LrWpanAckTestCase::m_replyTime
private

Reply time.

Definition at line 107 of file lr-wpan-ack-test.cc.

Referenced by LrWpanAckTestCase(), DataIndicationDev1(), and DoRun().

◆ m_requestSentTime

Time LrWpanAckTestCase::m_requestSentTime
private

Request successfully sent time.

Definition at line 106 of file lr-wpan-ack-test.cc.

Referenced by LrWpanAckTestCase(), DataConfirmDev0(), and DoRun().

◆ m_requestTime

Time LrWpanAckTestCase::m_requestTime
private

Request time.

Definition at line 105 of file lr-wpan-ack-test.cc.

Referenced by LrWpanAckTestCase(), and DoRun().


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