mirror of
https://gitlab.ibr.cs.tu-bs.de/tschuber/ns-3-leo.git
synced 2025-06-09 10:31:43 +02:00
Extend waypoints tests and limit reception by angle and distance
This commit is contained in:
parent
83c5bc3b2e
commit
3fb0969930
6 changed files with 181 additions and 16 deletions
|
@ -2,9 +2,12 @@
|
|||
|
||||
#include "ns3/leo-module.h"
|
||||
#include "ns3/test.h"
|
||||
#include "ns3/log.h"
|
||||
|
||||
using namespace ns3;
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("LeoMobilityTestSuite");
|
||||
|
||||
class LeoMobilityWaypointTestCase : public TestCase
|
||||
{
|
||||
public:
|
||||
|
@ -25,7 +28,7 @@ LeoMobilityWaypointTestCase::DoRun (void)
|
|||
{
|
||||
Ptr<LeoWaypointInputFileStreamContainer> container = CreateObject<LeoWaypointInputFileStreamContainer> ();
|
||||
container->SetAttribute("File", StringValue ("contrib/leo/data/waypoints.txt"));
|
||||
container->SetAttribute("LastTime", TimeValue (Time (1)));
|
||||
container->SetAttribute("LastTime", TimeValue (Time (0)));
|
||||
|
||||
Ptr<WaypointMobilityModel> mobility = CreateObject<WaypointMobilityModel> ();
|
||||
Waypoint wp;
|
||||
|
@ -33,8 +36,9 @@ LeoMobilityWaypointTestCase::DoRun (void)
|
|||
{
|
||||
mobility->AddWaypoint (wp);
|
||||
}
|
||||
NS_LOG_INFO ("Model has " << mobility->WaypointsLeft () << " waypoints left");
|
||||
|
||||
NS_TEST_ASSERT_MSG_EQ ((mobility->WaypointsLeft () > 0), true, "Reading waypoints from empty");
|
||||
NS_TEST_ASSERT_MSG_EQ ((mobility->WaypointsLeft () > 2), true, "Reading waypoints from empty");
|
||||
}
|
||||
|
||||
class LeoMobilityTestSuite : public TestSuite
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue