A Discrete-Event Network Simulator
API
TestRxOffWhenIdleAfterCsmaFailure Class Reference

Test PHY going to TRX_OFF after CSMA failure (MAC->RxOnWhenIdle(false)) More...

+ Inheritance diagram for TestRxOffWhenIdleAfterCsmaFailure:
+ Collaboration diagram for TestRxOffWhenIdleAfterCsmaFailure:

Public Member Functions

 TestRxOffWhenIdleAfterCsmaFailure ()
 
virtual ~TestRxOffWhenIdleAfterCsmaFailure ()
 
- 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

void DataConfirm (McpsDataConfirmParams params)
 Function called when a Data confirm is invoked (After Tx Attempt) More...
 
void DataIndication (McpsDataIndicationParams params, Ptr< Packet > p)
 Function called when a Data indication is invoked. More...
 
virtual void DoRun (void)
 Implementation to actually run this TestCase. More...
 
void StateChangeNotificationDev0 (std::string context, Time now, LrWpanPhyEnumeration oldState, LrWpanPhyEnumeration newState)
 Function called when a the PHY state changes in Dev0 [00:01]. More...
 
void StateChangeNotificationDev2 (std::string context, Time now, LrWpanPhyEnumeration oldState, LrWpanPhyEnumeration newState)
 Function called when a the PHY state changes in Dev2 [00:03]. More...
 

Private Attributes

LrWpanPhyEnumeration m_dev0State
 Stores the PHY state of device 0 [00:01]. 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

Test PHY going to TRX_OFF after CSMA failure (MAC->RxOnWhenIdle(false))

Definition at line 42 of file lr-wpan-mac-test.cc.

Constructor & Destructor Documentation

◆ TestRxOffWhenIdleAfterCsmaFailure()

TestRxOffWhenIdleAfterCsmaFailure::TestRxOffWhenIdleAfterCsmaFailure ( )

Definition at line 85 of file lr-wpan-mac-test.cc.

◆ ~TestRxOffWhenIdleAfterCsmaFailure()

TestRxOffWhenIdleAfterCsmaFailure::~TestRxOffWhenIdleAfterCsmaFailure ( )
virtual

Definition at line 89 of file lr-wpan-mac-test.cc.

Member Function Documentation

◆ DataConfirm()

void TestRxOffWhenIdleAfterCsmaFailure::DataConfirm ( McpsDataConfirmParams  params)
private

Function called when a Data confirm is invoked (After Tx Attempt)

Parameters
paramsMCPS data confirm parameters

Definition at line 99 of file lr-wpan-mac-test.cc.

References ns3::IEEE_802_15_4_CHANNEL_ACCESS_FAILURE, ns3::IEEE_802_15_4_SUCCESS, ns3::McpsDataConfirmParams::m_status, and NS_LOG_DEBUG.

Referenced by DoRun().

+ Here is the caller graph for this function:

◆ DataIndication()

void TestRxOffWhenIdleAfterCsmaFailure::DataIndication ( McpsDataIndicationParams  params,
Ptr< Packet p 
)
private

Function called when a Data indication is invoked.

Parameters
paramsMCPS data indication parameters
ppacket

Definition at line 93 of file lr-wpan-mac-test.cc.

References ns3::Packet::GetSize(), and NS_LOG_DEBUG.

Referenced by DoRun().

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

◆ DoRun()

◆ StateChangeNotificationDev0()

void TestRxOffWhenIdleAfterCsmaFailure::StateChangeNotificationDev0 ( std::string  context,
Time  now,
LrWpanPhyEnumeration  oldState,
LrWpanPhyEnumeration  newState 
)
private

Function called when a the PHY state changes in Dev0 [00:01].

Parameters
contextcontext
nowtime at which the function is called
oldStateold PHY state
newStatenew PHY state

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

References ns3::Time::As(), m_dev0State, ns3::Now(), and NS_LOG_DEBUG.

Referenced by DoRun().

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

◆ StateChangeNotificationDev2()

void TestRxOffWhenIdleAfterCsmaFailure::StateChangeNotificationDev2 ( std::string  context,
Time  now,
LrWpanPhyEnumeration  oldState,
LrWpanPhyEnumeration  newState 
)
private

Function called when a the PHY state changes in Dev2 [00:03].

Parameters
contextcontext
nowtime at which the function is called
oldStateold PHY state
newStatenew PHY state

Definition at line 122 of file lr-wpan-mac-test.cc.

References ns3::Time::As(), ns3::Now(), and NS_LOG_DEBUG.

Referenced by DoRun().

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

Member Data Documentation

◆ m_dev0State

LrWpanPhyEnumeration TestRxOffWhenIdleAfterCsmaFailure::m_dev0State
private

Stores the PHY state of device 0 [00:01].

Definition at line 80 of file lr-wpan-mac-test.cc.

Referenced by DoRun(), and StateChangeNotificationDev0().


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