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

It tests a number of cases related to SimpleGatewayLoraPhy's parallel reception paths. More...

+ Inheritance diagram for ReceivePathTest:
+ Collaboration diagram for ReceivePathTest:

Public Member Functions

 ReceivePathTest ()
 Default constructor.
 
 ~ReceivePathTest () override
 Destructor.
 
- 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.
 
void Interference (Ptr< const Packet > packet, uint32_t node)
 Callback for tracing LostPacketBecauseInterference.
 
void NoMoreDemodulators (Ptr< const Packet > packet, uint32_t node)
 Callback for tracing LostPacketBecauseNoMoreReceivers.
 
void OccupiedReceptionPaths (int oldValue, int newValue)
 Callback for tracing OccupiedReceptionPaths.
 
void ReceivedPacket (Ptr< const Packet > packet, uint32_t node)
 Callback for tracing ReceivedPacket.
 
void Reset ()
 Reset counters and gateway PHY for new sub test case.
 

Private Attributes

Ptr< SimpleGatewayLoraPhygatewayPhy
 PHY layer of a gateway to be tested.
 
int m_interferenceCalls = 0
 Counter for LostPacketBecauseInterference calls.
 
int m_maxOccupiedReceptionPaths = 0
 Max number of concurrent OccupiedReceptionPaths.
 
int m_noMoreDemodulatorsCalls = 0
 Counter for LostPacketBecauseNoMoreReceivers calls.
 
int m_receivedPacketCalls = 0
 Counter for ReceivedPacket calls.
 

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...
 
using TestDuration = Duration
 
- Static Public Attributes inherited from ns3::TestCase
static constexpr auto EXTENSIVE = Duration::EXTENSIVE
 
static constexpr auto QUICK = Duration::QUICK
 
static constexpr auto 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

It tests a number of cases related to SimpleGatewayLoraPhy's parallel reception paths.

Todo:
The test is commented out. To be fixed.

Definition at line 445 of file lorawan-test-suite.cc.

Constructor & Destructor Documentation

◆ ReceivePathTest()

ReceivePathTest::ReceivePathTest ( )

Default constructor.

Definition at line 495 of file lorawan-test-suite.cc.

◆ ~ReceivePathTest()

ReceivePathTest::~ReceivePathTest ( )
override

Destructor.

Definition at line 501 of file lorawan-test-suite.cc.

Member Function Documentation

◆ DoRun()

void ReceivePathTest::DoRun ( )
overrideprivatevirtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Implements ns3::TestCase.

Definition at line 573 of file lorawan-test-suite.cc.

References NS_LOG_DEBUG, and Reset().

+ Here is the call graph for this function:

◆ Interference()

void ReceivePathTest::Interference ( Ptr< const Packet packet,
uint32_t  node 
)
private

Callback for tracing LostPacketBecauseInterference.

Parameters
packetThe packet lost.
nodeThe receiver node id if any, 0 otherwise.

Definition at line 555 of file lorawan-test-suite.cc.

References m_interferenceCalls, and NS_LOG_FUNCTION.

◆ NoMoreDemodulators()

void ReceivePathTest::NoMoreDemodulators ( Ptr< const Packet packet,
uint32_t  node 
)
private

Callback for tracing LostPacketBecauseNoMoreReceivers.

Parameters
packetThe packet lost.
nodeThe receiver node id if any, 0 otherwise.

Definition at line 547 of file lorawan-test-suite.cc.

References m_noMoreDemodulatorsCalls, and NS_LOG_FUNCTION.

◆ OccupiedReceptionPaths()

void ReceivePathTest::OccupiedReceptionPaths ( int  oldValue,
int  newValue 
)
private

Callback for tracing OccupiedReceptionPaths.

Parameters
oldValueThe old value.
newValueThe new value.

Definition at line 536 of file lorawan-test-suite.cc.

References m_maxOccupiedReceptionPaths, and NS_LOG_FUNCTION.

◆ ReceivedPacket()

void ReceivePathTest::ReceivedPacket ( Ptr< const Packet packet,
uint32_t  node 
)
private

Callback for tracing ReceivedPacket.

Parameters
packetThe packet received.
nodeThe receiver node id if any, 0 otherwise.

Definition at line 563 of file lorawan-test-suite.cc.

References m_receivedPacketCalls, and NS_LOG_FUNCTION.

◆ Reset()

void ReceivePathTest::Reset ( )
private

Reset counters and gateway PHY for new sub test case.

Definition at line 506 of file lorawan-test-suite.cc.

Referenced by DoRun().

+ Here is the caller graph for this function:

Member Data Documentation

◆ gatewayPhy

Ptr<SimpleGatewayLoraPhy> ReceivePathTest::gatewayPhy
private

PHY layer of a gateway to be tested.

Definition at line 486 of file lorawan-test-suite.cc.

◆ m_interferenceCalls

int ReceivePathTest::m_interferenceCalls = 0
private

Counter for LostPacketBecauseInterference calls.

Definition at line 489 of file lorawan-test-suite.cc.

Referenced by Interference().

◆ m_maxOccupiedReceptionPaths

int ReceivePathTest::m_maxOccupiedReceptionPaths = 0
private

Max number of concurrent OccupiedReceptionPaths.

Definition at line 491 of file lorawan-test-suite.cc.

Referenced by OccupiedReceptionPaths().

◆ m_noMoreDemodulatorsCalls

int ReceivePathTest::m_noMoreDemodulatorsCalls = 0
private

Counter for LostPacketBecauseNoMoreReceivers calls.

Definition at line 488 of file lorawan-test-suite.cc.

Referenced by NoMoreDemodulators().

◆ m_receivedPacketCalls

int ReceivePathTest::m_receivedPacketCalls = 0
private

Counter for ReceivedPacket calls.

Definition at line 490 of file lorawan-test-suite.cc.

Referenced by ReceivedPacket().


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