A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ZigbeeRreqRetryTestCase Class Reference

Zigbee RREQ transmission retries test case. More...

+ Inheritance diagram for ZigbeeRreqRetryTestCase:
+ Collaboration diagram for ZigbeeRreqRetryTestCase:

Public Member Functions

 ZigbeeRreqRetryTestCase ()
 
 ~ZigbeeRreqRetryTestCase () override
 
- Public Member Functions inherited from ns3::TestCase
 TestCase (const TestCase &)=delete
 
virtual ~TestCase ()
 Destructor.
 
std::string GetName () const
 
TestCaseoperator= (const TestCase &)=delete
 

Private Member Functions

void DoRun () override
 Implementation to actually run this TestCase.
 

Static Private Member Functions

static void NwkJoinConfirm (ZigbeeRreqRetryTestCase *testcase, Ptr< ZigbeeStack > stack, NlmeJoinConfirmParams params)
 Called in response to a NLME-JOIN.request.
 
static void NwkNetworkDiscoveryConfirm (ZigbeeRreqRetryTestCase *testcase, Ptr< ZigbeeStack > stack, NlmeNetworkDiscoveryConfirmParams params)
 Called in response to a NLME-NETWORK-DISCOVERY.request.
 
static void RreqRetriesExhausted (ZigbeeRreqRetryTestCase *testcase, Ptr< ZigbeeStack > stack, uint8_t rreqid, Mac16Address dst, uint8_t rreqRetriesNum)
 Called when a maximum RREQ retries are reached.
 

Private Attributes

std::vector< std::pair< uint32_t, uint32_t > > m_rreqRetriesExhaustedList
 A list containing the RREQ ID and the allowed max retries every time the maximum RREQ retries are reached.
 

Additional Inherited Members

- Public Types inherited from ns3::TestCase
enum class  Duration { QUICK = 1 , EXTENSIVE = 2 , TAKES_FOREVER = 3 }
 How long the test takes to execute. More...
 
- Static Public Attributes inherited from ns3::TestCase
static constexpr auto QUICK = Duration::QUICK
 Deprecated test duration simple enums.
 
static constexpr auto EXTENSIVE = Duration::EXTENSIVE
 
static constexpr auto TAKES_FOREVER = Duration::TAKES_FOREVER
 
- Protected Member Functions inherited from ns3::TestCase
 TestCase (std::string name)
 Constructor.
 
void AddTestCase (TestCase *testCase, Duration duration=Duration::QUICK)
 Add an individual child TestCase to this test suite.
 
TestCaseGetParent () const
 Get the parent of this TestCase.
 
bool IsStatusFailure () const
 Check if any tests failed.
 
bool IsStatusSuccess () const
 Check if all tests passed.
 
void SetDataDir (std::string directory)
 Set the data directory where reference trace files can be found.
 
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.
 
bool MustAssertOnFailure () const
 Check if this run should assert on failure.
 
bool MustContinueOnFailure () const
 Check if this run should continue on failure.
 
std::string CreateDataDirFilename (std::string filename)
 Construct the full path to a file in the data directory.
 
std::string CreateTempDirFilename (std::string filename)
 Construct the full path to a file in a temporary directory.
 

Detailed Description

Zigbee RREQ transmission retries test case.

Definition at line 37 of file zigbee-rreq-test.cc.

Constructor & Destructor Documentation

◆ ZigbeeRreqRetryTestCase()

ZigbeeRreqRetryTestCase::ZigbeeRreqRetryTestCase ( )

Definition at line 88 of file zigbee-rreq-test.cc.

◆ ~ZigbeeRreqRetryTestCase()

ZigbeeRreqRetryTestCase::~ZigbeeRreqRetryTestCase ( )
override

Definition at line 93 of file zigbee-rreq-test.cc.

Member Function Documentation

◆ DoRun()

void ZigbeeRreqRetryTestCase::DoRun ( )
overrideprivatevirtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Implements ns3::TestCase.

Definition at line 184 of file zigbee-rreq-test.cc.

References ns3::zigbee::ALL_CHANNELS, ns3::zigbee::ChannelList::channelPageCount, ns3::zigbee::ChannelList::channelsField, ns3::NodeContainer::Create(), ns3::CreateObject(), ns3::Simulator::Destroy(), ns3::NetDeviceContainer::Get(), ns3::zigbee::ZigbeeStackContainer::Get(), ns3::LrWpanHelper::Install(), ns3::ZigbeeHelper::Install(), ns3::LOG_LEVEL_DEBUG, ns3::LOG_PREFIX_FUNC, ns3::LOG_PREFIX_NODE, ns3::LOG_PREFIX_TIME, ns3::LogComponentEnable(), ns3::LogComponentEnableAll(), ns3::zigbee::NlmeNetworkFormationRequestParams::m_beaconOrder, ns3::zigbee::NlmeRouteDiscoveryRequestParams::m_dstAddr, m_rreqRetriesExhaustedList, ns3::zigbee::NlmeNetworkDiscoveryRequestParams::m_scanChannelList, ns3::zigbee::NlmeNetworkFormationRequestParams::m_scanChannelList, ns3::zigbee::NlmeNetworkDiscoveryRequestParams::m_scanDuration, ns3::zigbee::NlmeNetworkFormationRequestParams::m_scanDuration, ns3::zigbee::NlmeNetworkFormationRequestParams::m_superFrameOrder, ns3::MakeBoundCallback(), ns3::zigbee::ZigbeeNwk::NlmeNetworkDiscoveryRequest(), ns3::zigbee::ZigbeeNwk::NlmeNetworkFormationRequest(), ns3::zigbee::ZigbeeNwk::NlmeRouteDiscoveryRequest(), nodes, NS_TEST_EXPECT_MSG_EQ, NwkJoinConfirm(), NwkNetworkDiscoveryConfirm(), RreqRetriesExhausted(), ns3::Simulator::Run(), ns3::Simulator::ScheduleWithContext(), ns3::Seconds(), ns3::RngSeedManager::SetRun(), and ns3::RngSeedManager::SetSeed().

+ Here is the call graph for this function:

◆ NwkJoinConfirm()

void ZigbeeRreqRetryTestCase::NwkJoinConfirm ( ZigbeeRreqRetryTestCase * testcase,
Ptr< ZigbeeStack > stack,
NlmeJoinConfirmParams params )
staticprivate

Called in response to a NLME-JOIN.request.

Parameters
testcaseThe pointer to the testcase
stackThe zigbee stack of the device originating the callback
paramsThe NLME-JOIN.confirm parameters

Definition at line 142 of file zigbee-rreq-test.cc.

References ns3::Time::As(), ns3::zigbee::ZigbeeNwk::NlmeStartRouterRequest(), ns3::Simulator::Now(), ns3::Time::S, and ns3::Simulator::ScheduleNow().

Referenced by DoRun().

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

◆ NwkNetworkDiscoveryConfirm()

void ZigbeeRreqRetryTestCase::NwkNetworkDiscoveryConfirm ( ZigbeeRreqRetryTestCase * testcase,
Ptr< ZigbeeStack > stack,
NlmeNetworkDiscoveryConfirmParams params )
staticprivate

Called in response to a NLME-NETWORK-DISCOVERY.request.

Parameters
testcaseThe pointer to the testcase
stackThe zigbee stack of the device originating the callback
paramsThe NLME-NETWORK-DISCOVERY.confirm parameters

Definition at line 98 of file zigbee-rreq-test.cc.

References ns3::zigbee::CapabilityInformation::GetCapability(), ns3::zigbee::NlmeJoinRequestParams::m_capabilityInfo, ns3::zigbee::NlmeJoinRequestParams::m_extendedPanId, ns3::zigbee::NlmeJoinRequestParams::m_rejoinNetwork, ns3::zigbee::ZigbeeNwk::NlmeJoinRequest(), NS_ABORT_MSG, ns3::zigbee::ROUTER, ns3::Simulator::ScheduleNow(), ns3::zigbee::CapabilityInformation::SetAllocateAddrOn(), and ns3::zigbee::CapabilityInformation::SetDeviceType().

Referenced by DoRun().

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

◆ RreqRetriesExhausted()

void ZigbeeRreqRetryTestCase::RreqRetriesExhausted ( ZigbeeRreqRetryTestCase * testcase,
Ptr< ZigbeeStack > stack,
uint8_t rreqid,
Mac16Address dst,
uint8_t rreqRetriesNum )
staticprivate

Called when a maximum RREQ retries are reached.

Parameters
testcaseThe pointer to the testcase
stackThe zigbee stack of the device originating the callback
rreqidThe RREQ ID
dstThe destination Mac16Address of the RREQ
rreqRetriesNumMaximum number of retries reached

Definition at line 169 of file zigbee-rreq-test.cc.

References m_rreqRetriesExhaustedList, and NS_LOG_DEBUG.

Referenced by DoRun().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_rreqRetriesExhaustedList

std::vector<std::pair<uint32_t, uint32_t> > ZigbeeRreqRetryTestCase::m_rreqRetriesExhaustedList
private

A list containing the RREQ ID and the allowed max retries every time the maximum RREQ retries are reached.

Definition at line 83 of file zigbee-rreq-test.cc.

Referenced by DoRun(), and RreqRetriesExhausted().


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