It tests a number of cases related to SimpleGatewayLoraPhy's parallel reception paths. More...
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 |
| TestCase & | operator= (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< SimpleGatewayLoraPhy > | gatewayPhy |
| 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... | |
| 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. | |
It tests a number of cases related to SimpleGatewayLoraPhy's parallel reception paths.
Definition at line 433 of file lorawan-test-suite.cc.
| ReceivePathTest::ReceivePathTest | ( | ) |
Default constructor.
Definition at line 483 of file lorawan-test-suite.cc.
References ns3::TestCase::TestCase().
|
override |
Destructor.
Definition at line 489 of file lorawan-test-suite.cc.
|
overrideprivatevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 561 of file lorawan-test-suite.cc.
References ns3::Create(), NS_LOG_DEBUG, and Reset().
Callback for tracing LostPacketBecauseInterference.
| packet | The packet lost. |
| node | The receiver node id if any, 0 otherwise. |
Definition at line 543 of file lorawan-test-suite.cc.
References m_interferenceCalls, and NS_LOG_FUNCTION.
Callback for tracing LostPacketBecauseNoMoreReceivers.
| packet | The packet lost. |
| node | The receiver node id if any, 0 otherwise. |
Definition at line 535 of file lorawan-test-suite.cc.
References m_noMoreDemodulatorsCalls, and NS_LOG_FUNCTION.
|
private |
Callback for tracing OccupiedReceptionPaths.
| oldValue | The old value. |
| newValue | The new value. |
Definition at line 524 of file lorawan-test-suite.cc.
References m_maxOccupiedReceptionPaths, and NS_LOG_FUNCTION.
Callback for tracing ReceivedPacket.
| packet | The packet received. |
| node | The receiver node id if any, 0 otherwise. |
Definition at line 551 of file lorawan-test-suite.cc.
References m_receivedPacketCalls, and NS_LOG_FUNCTION.
|
private |
Reset counters and gateway PHY for new sub test case.
Definition at line 494 of file lorawan-test-suite.cc.
Referenced by DoRun().
|
private |
PHY layer of a gateway to be tested.
Definition at line 474 of file lorawan-test-suite.cc.
|
private |
Counter for LostPacketBecauseInterference calls.
Definition at line 477 of file lorawan-test-suite.cc.
Referenced by Interference().
|
private |
Max number of concurrent OccupiedReceptionPaths.
Definition at line 479 of file lorawan-test-suite.cc.
Referenced by OccupiedReceptionPaths().
|
private |
Counter for LostPacketBecauseNoMoreReceivers calls.
Definition at line 476 of file lorawan-test-suite.cc.
Referenced by NoMoreDemodulators().
|
private |
Counter for ReceivedPacket calls.
Definition at line 478 of file lorawan-test-suite.cc.
Referenced by ReceivedPacket().