27 #include "ns3/boolean.h" 
   28 #include "ns3/simulator.h" 
   29 #include "ns3/scheduler.h" 
   30 #include "ns3/vector.h" 
   31 #include "ns3/mobility-model.h" 
   32 #include "ns3/waypoint-mobility-model.h" 
   33 #include "ns3/mobility-helper.h" 
   46   void TestXPosition (
double expectedXPos);
 
   48   virtual void DoRun (
void);
 
   55   : 
TestCase (
"Test behavior when LazyNotify is false"),
 
   82   m_node = CreateObject<Node> ();
 
   83   m_mob = CreateObject<WaypointMobilityModel> ();
 
   87   m_mob->AddWaypoint (wpt);
 
   89   m_mob->AddWaypoint (wpt2);
 
   91   m_mob->AddWaypoint (wpt3);
 
   95   Simulator::Destroy ();
 
  107   virtual void DoRun (
void);
 
  113   : 
TestCase (
"Test behavior when LazyNotify is true")
 
  139   m_node = CreateObject<Node> ();
 
  140   m_mob = CreateObject<WaypointMobilityModel> ();
 
  144   m_mob->AddWaypoint (wpt);
 
  146   m_mob->AddWaypoint (wpt2);
 
  148   m_mob->AddWaypoint (wpt3);
 
  152   Simulator::Destroy ();
 
  164   virtual void DoRun (
void);
 
  173   : 
TestCase (
"Test behavior of Waypoint InitialPositionIsWaypoint")
 
  200   m_mob1 = CreateObject<WaypointMobilityModel> ();
 
  210   m_mob2 = CreateObject<WaypointMobilityModel> ();
 
  229   m_mob3 = CreateObject<WaypointMobilityModel> ();
 
  239   m_mob4 = CreateObject<WaypointMobilityModel> ();
 
  259   m_mob5 = CreateObject<WaypointMobilityModel> ();
 
  276   Simulator::Destroy ();
 
  287   virtual void DoRun (
void);
 
  291   : 
TestCase (
"Test behavior using MobilityHelper and PositionAllocator")
 
  314   positionAlloc->
Add (Vector (0.0, 0.0, 0.0));
 
  342   positionAlloc2->
Add (Vector (0.0, 0.0, 0.0));
 
  354   Simulator::Destroy ();
 
Smart pointer class similar to boost::intrusive_ptr. 
 
virtual ~WaypointLazyNotifyFalse()
 
AttributeValue implementation for Boolean. 
 
void CourseChangeCallback(std::string path, Ptr< const MobilityModel > model)
 
void TestXPosition(Ptr< const WaypointMobilityModel > model, double expectedXPos)
 
Ptr< T > GetObject(void) const 
Get a pointer to the requested aggregated Object. 
 
void AddWaypoint(const Waypoint &waypoint)
 
void AggregateObject(Ptr< Object > other)
Aggregate two Objects together. 
 
virtual ~WaypointMobilityModelViaHelper()
 
#define NS_TEST_EXPECT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report if not. 
 
Ptr< WaypointMobilityModel > m_mob5
 
Vector GetPosition(void) const 
 
Ptr< WaypointMobilityModel > m_mob3
 
bool SetAttributeFailSafe(std::string name, const AttributeValue &value)
Set a single attribute without raising errors. 
 
Ptr< WaypointMobilityModel > m_mob4
 
virtual void DoRun(void)
Implementation to actually run this TestCase. 
 
static void CourseChangeCallback(std::string path, Ptr< const MobilityModel > model)
 
Ptr< WaypointMobilityModel > m_mob
 
virtual void DoRun(void)
Implementation to actually run this TestCase. 
 
void TestNumWaypoints(Ptr< const WaypointMobilityModel > model, uint32_t num)
 
void Install(Ptr< Node > node) const 
"Layout" a single node according to the current position allocator type. 
 
virtual void DoRun(void)
Implementation to actually run this TestCase. 
 
void AddTestCase(TestCase *testCase, enum TestDuration duration)
Add an individual child TestCase to this test suite. 
 
WaypointLazyNotifyFalse()
 
void TestXPosition(Ptr< const WaypointMobilityModel > mob, double expectedXPos)
 
void TestXPosition(double expectedXPos)
 
virtual ~WaypointInitialPositionIsWaypoint()
 
static MobilityTestSuite mobilityTestSuite
 
virtual void DoRun(void)
Implementation to actually run this TestCase. 
 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
 
keep track of a set of node pointers. 
 
void SetMobilityModel(std::string type, std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue(), std::string n8="", const AttributeValue &v8=EmptyAttributeValue(), std::string n9="", const AttributeValue &v9=EmptyAttributeValue())
 
void SetPosition(const Vector &position)
 
Ptr< WaypointMobilityModel > m_mob1
 
Helper class used to assign positions and mobility models to nodes. 
 
#define NS_TEST_EXPECT_MSG_EQ_TOL_INTERNAL(actual, limit, tol, msg, file, line)
Test that actual and expected (limit) values are equal to plus or minus some tolerance and report if ...
 
Ptr< Node > Get(uint32_t i) const 
Get the Ptr stored in this container at a given index. 
 
void TestXPosition(double expectedXPos)
 
Ptr< WaypointMobilityModel > m_mob2
 
Time Seconds(double value)
Construct a Time in the indicated unit. 
 
void Add(Vector v)
Add a position to the list of positions. 
 
Waypoint-based mobility model. 
 
WaypointInitialPositionIsWaypoint()
 
virtual ~WaypointLazyNotifyTrue()
 
Time Now(void)
create an ns3::Time instance which contains the current simulation time. 
 
Ptr< WaypointMobilityModel > m_mob
 
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer. 
 
void SetPositionAllocator(Ptr< PositionAllocator > allocator)
Set the position allocator which will be used to allocate the initial position of every node initiali...
 
uint32_t WaypointsLeft(void) const 
Get the number of waypoints left for this object, excluding the next one. 
 
void CourseChangeCallback(std::string path, Ptr< const MobilityModel > model)
 
WaypointMobilityModelViaHelper()