Test PHY going to TRX_OFF after CSMA failure (MAC->RxOnWhenIdle(false)) More...
Public Member Functions | |
TestRxOffWhenIdleAfterCsmaFailure () | |
~TestRxOffWhenIdleAfterCsmaFailure () override | |
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 | 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... | |
void | DoRun () override |
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... | |
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... | |
Test PHY going to TRX_OFF after CSMA failure (MAC->RxOnWhenIdle(false))
Definition at line 42 of file lr-wpan-mac-test.cc.
TestRxOffWhenIdleAfterCsmaFailure::TestRxOffWhenIdleAfterCsmaFailure | ( | ) |
Definition at line 88 of file lr-wpan-mac-test.cc.
|
override |
Definition at line 93 of file lr-wpan-mac-test.cc.
|
private |
Function called when a Data confirm is invoked (After Tx Attempt)
params | MCPS data confirm parameters |
Definition at line 104 of file lr-wpan-mac-test.cc.
References ns3::CHANNEL_ACCESS_FAILURE, NS_LOG_DEBUG, two-ray-to-three-gpp-ch-calibration::params, and ns3::SUCCESS.
Referenced by DoRun().
|
private |
Function called when a Data indication is invoked.
params | MCPS data indication parameters |
p | packet |
Definition at line 98 of file lr-wpan-mac-test.cc.
References ns3::Packet::GetSize(), and NS_LOG_DEBUG.
Referenced by DoRun().
|
overrideprivatevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 143 of file lr-wpan-mac-test.cc.
References ns3::Node::AddDevice(), third::channel, DataConfirm(), DataIndication(), ns3::LrWpanNetDevice::GetCsmaCa(), ns3::LrWpanNetDevice::GetMac(), ns3::LrWpanNetDevice::GetPhy(), ns3::IEEE_802_15_4_PHY_TRX_OFF, ns3::LOG_LEVEL_DEBUG, ns3::LOG_PREFIX_FUNC, ns3::LOG_PREFIX_TIME, ns3::LogComponentEnable(), ns3::LogComponentEnableAll(), m_dev0State, ns3::MakeCallback(), NS_LOG_DEBUG, NS_TEST_EXPECT_MSG_EQ, two-ray-to-three-gpp-ch-calibration::params, ns3::Seconds(), ns3::LrWpanNetDevice::SetAddress(), ns3::LrWpanNetDevice::SetChannel(), ns3::SHORT_ADDR, StateChangeNotificationDev0(), and StateChangeNotificationDev2().
|
private |
Function called when a the PHY state changes in Dev0 [00:01].
context | context |
now | time at which the function is called |
oldState | old PHY state |
newState | new PHY state |
Definition at line 117 of file lr-wpan-mac-test.cc.
References ns3::Time::As(), m_dev0State, ns3::Now(), and NS_LOG_DEBUG.
Referenced by DoRun().
|
private |
Function called when a the PHY state changes in Dev2 [00:03].
context | context |
now | time at which the function is called |
oldState | old PHY state |
newState | new PHY state |
Definition at line 131 of file lr-wpan-mac-test.cc.
References ns3::Time::As(), ns3::Now(), and NS_LOG_DEBUG.
Referenced by DoRun().
|
private |
Stores the PHY state of device 0 [00:01].
Definition at line 85 of file lr-wpan-mac-test.cc.
Referenced by DoRun(), and StateChangeNotificationDev0().