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

Zigbee RREQ transmission retries test case. More...

+ Inheritance diagram for ZigbeeApsDataTestCase:
+ Collaboration diagram for ZigbeeApsDataTestCase:

Public Member Functions

 ZigbeeApsDataTestCase ()
 
 ~ZigbeeApsDataTestCase () 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 ApsDataIndication (ZigbeeApsDataTestCase *testcase, Ptr< ZigbeeStack > stack, ApsdeDataIndicationParams params, Ptr< Packet > asdu)
 Callback for APSDE-DATA.indication This callback is called when a data packet is received by the APS layer.
 
static void NwkNetworkDiscoveryConfirm (ZigbeeApsDataTestCase *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 SendDataUcstDst (Ptr< ZigbeeStack > stackSrc, Ptr< ZigbeeStack > stackDst)
 Send data to a unicast destination.
 

Private Attributes

uint16_t m_dstEndpoint
 The destination endpoint.
 

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-aps-data-test.cc.

Constructor & Destructor Documentation

◆ ZigbeeApsDataTestCase()

ZigbeeApsDataTestCase::ZigbeeApsDataTestCase ( )

Definition at line 84 of file zigbee-aps-data-test.cc.

References m_dstEndpoint.

◆ ~ZigbeeApsDataTestCase()

ZigbeeApsDataTestCase::~ZigbeeApsDataTestCase ( )
override

Definition at line 90 of file zigbee-aps-data-test.cc.

Member Function Documentation

◆ ApsDataIndication()

void ZigbeeApsDataTestCase::ApsDataIndication ( ZigbeeApsDataTestCase * testcase,
Ptr< ZigbeeStack > stack,
ApsdeDataIndicationParams params,
Ptr< Packet > asdu )
staticprivate

Callback for APSDE-DATA.indication This callback is called when a data packet is received by the APS layer.

Parameters
testcaseThe ZigbeeApsDataTestCase instance
stackThe Zigbee stack that received the data
paramsThe parameters of the APSDE-DATA.indication
asduThe received packet

Definition at line 95 of file zigbee-aps-data-test.cc.

References m_dstEndpoint.

Referenced by DoRun().

+ Here is the caller graph for this function:

◆ DoRun()

void ZigbeeApsDataTestCase::DoRun ( )
overrideprivatevirtual

◆ NwkNetworkDiscoveryConfirm()

void ZigbeeApsDataTestCase::NwkNetworkDiscoveryConfirm ( ZigbeeApsDataTestCase * 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 104 of file zigbee-aps-data-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::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:

◆ SendDataUcstDst()

void ZigbeeApsDataTestCase::SendDataUcstDst ( Ptr< ZigbeeStack > stackSrc,
Ptr< ZigbeeStack > stackDst )
staticprivate

Send data to a unicast destination.

This function sends a data packet from stackSrc to stackDst.

Parameters
stackSrcThe source Zigbee stack
stackDstThe destination Zigbee stack

Definition at line 129 of file zigbee-aps-data-test.cc.

References ns3::zigbee::ZigbeeAps::ApsdeDataRequest(), ns3::Create(), ns3::zigbee::ZigbeeApsTxOptions::GetTxOptions(), ns3::zigbee::ApsdeDataRequestParams::m_clusterId, ns3::zigbee::ApsdeDataRequestParams::m_dstAddr16, ns3::zigbee::ApsdeDataRequestParams::m_dstAddrMode, ns3::zigbee::ApsdeDataRequestParams::m_dstEndPoint, ns3::zigbee::ApsdeDataRequestParams::m_profileId, ns3::zigbee::ApsdeDataRequestParams::m_srcEndPoint, ns3::zigbee::ApsdeDataRequestParams::m_txOptions, ns3::zigbee::ApsdeDataRequestParams::m_useAlias, and ns3::Simulator::ScheduleNow().

Referenced by DoRun().

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

Member Data Documentation

◆ m_dstEndpoint

uint16_t ZigbeeApsDataTestCase::m_dstEndpoint
private

The destination endpoint.

Definition at line 81 of file zigbee-aps-data-test.cc.

Referenced by ZigbeeApsDataTestCase(), ApsDataIndication(), and DoRun().


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