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

Zigbee ZDO Commands test. More...

Inheritance diagram for ZigbeeZdoCommandsTestCase:
Collaboration diagram for ZigbeeZdoCommandsTestCase:

Public Member Functions

 ZigbeeZdoCommandsTestCase ()
 ~ZigbeeZdoCommandsTestCase () override
Public Member Functions inherited from ns3::TestCase
 TestCase (const TestCase &)=delete
 Caller graph was not generated because of its size.
virtual ~TestCase ()
 Destructor.
std::string GetName () const
TestCase & operator= (const TestCase &)=delete

Private Member Functions

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

Static Private Member Functions

static void NwkNetworkDiscoveryConfirm (ZigbeeZdoCommandsTestCase *testcase, Ptr< ZigbeeStack > stack, NlmeNetworkDiscoveryConfirmParams params)
 Callback for NLME-NETWORK-DISCOVERY.confirm This callback is called when a network discovery has been performed.
static void ZdoNwkAddrRspInd (ZigbeeZdoCommandsTestCase *testcase, Ptr< ZigbeeStack > stack, NwkAddrRespIndParams params)
 Callback for ZDO NWK_addr_rsp indication This callback is called when a NWK_addr_rsp is received.

Private Attributes

Mac16Address m_requestedNwkAddr
 The 16-bit address requested by the ZDO command.

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...
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.
TestCase * GetParent () 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 ZDO Commands test.

Definition at line 42 of file zigbee-zdo-test.cc.

Constructor & Destructor Documentation

◆ ZigbeeZdoCommandsTestCase()

ZigbeeZdoCommandsTestCase::ZigbeeZdoCommandsTestCase ( )

Definition at line 78 of file zigbee-zdo-test.cc.

References ns3::TestCase::TestCase().

Referenced by NwkNetworkDiscoveryConfirm(), and ZdoNwkAddrRspInd().

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

◆ ~ZigbeeZdoCommandsTestCase()

ZigbeeZdoCommandsTestCase::~ZigbeeZdoCommandsTestCase ( )
override

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

Member Function Documentation

◆ DoRun()

void ZigbeeZdoCommandsTestCase::DoRun ( )
overrideprivatevirtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Implements ns3::TestCase.

Definition at line 132 of file zigbee-zdo-test.cc.

References ns3::zigbee::ChannelList::channelPageCount, ns3::zigbee::ChannelList::channelsField, ns3::Mac16Address::ConvertToInt(), ns3::CreateObject(), ns3::Simulator::Destroy(), ns3::NetDeviceContainer::Get(), ns3::zigbee::ZigbeeStackContainer::Get(), ns3::LrWpanHelper::Install(), ns3::ZigbeeHelper::Install(), ns3::zigbee::NlmeNetworkFormationRequestParams::m_beaconOrder, ns3::zigbee::NwkAddrRequestParams::m_dstAddr, ns3::zigbee::NwkAddrRequestParams::m_ieeeAddr, m_requestedNwkAddr, ns3::zigbee::NwkAddrRequestParams::m_requestType, 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(), nodes, NS_TEST_EXPECT_MSG_EQ, ns3::zigbee::ZigbeeZdo::NwkAddrRequest(), NwkNetworkDiscoveryConfirm(), ns3::Simulator::Run(), ns3::Simulator::ScheduleWithContext(), ns3::Seconds(), ns3::RngSeedManager::SetRun(), ns3::RngSeedManager::SetSeed(), ns3::zigbee::SINGLE_DEVICE_RESPONSE, and ZdoNwkAddrRspInd().

Here is the call graph for this function:

◆ NwkNetworkDiscoveryConfirm()

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

Callback for NLME-NETWORK-DISCOVERY.confirm This callback is called when a network discovery has been performed.

Parameters
testcaseThe ZigbeeApsDataTestCase instance
stackThe Zigbee stack that received the confirmation
paramsThe parameters of the NLME-NETWORK-DISCOVERY.confirm

Definition at line 107 of file zigbee-zdo-test.cc.

References ZigbeeZdoCommandsTestCase(), ns3::zigbee::ASSOCIATION, ns3::zigbee::ENDDEVICE, 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::Simulator::ScheduleNow(), ns3::zigbee::CapabilityInformation::SetAllocateAddrOn(), ns3::zigbee::CapabilityInformation::SetDeviceType(), and ns3::zigbee::SUCCESS.

Referenced by DoRun().

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

◆ ZdoNwkAddrRspInd()

void ZigbeeZdoCommandsTestCase::ZdoNwkAddrRspInd ( ZigbeeZdoCommandsTestCase * testcase,
Ptr< ZigbeeStack > stack,
NwkAddrRespIndParams params )
staticprivate

Callback for ZDO NWK_addr_rsp indication This callback is called when a NWK_addr_rsp is received.

Parameters
testcaseThe ZigbeeZdoCommandsTestCase instance
stackThe Zigbee stack that received the indication
paramsThe parameters of the NWK_addr_rsp indication

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

References ZigbeeZdoCommandsTestCase(), m_requestedNwkAddr, and ns3::zigbee::SUCCESS.

Referenced by DoRun().

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

Member Data Documentation

◆ m_requestedNwkAddr

Mac16Address ZigbeeZdoCommandsTestCase::m_requestedNwkAddr
private

The 16-bit address requested by the ZDO command.

Definition at line 75 of file zigbee-zdo-test.cc.

Referenced by DoRun(), and ZdoNwkAddrRspInd().


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