51#include "ns3/buildings-module.h"
52#include "ns3/core-module.h"
53#include "ns3/mobility-module.h"
54#include "ns3/network-module.h"
84 <<
model->GetPosition() << std::endl;
106 Box box = (*it)->GetBoundaries();
107 outFile <<
"set object " << index <<
" rect from " <<
box.xMin <<
"," <<
box.yMin <<
" to "
108 <<
box.xMax <<
"," <<
box.yMax << std::endl;
120 cmd.AddValue(
"useHelper",
"Whether to use helper code",
useHelper);
123 g_timeSeries.open(
"outdoor-group-mobility-time-series.mob");
148 building->SetBoundaries(
Box(45, 55, 5, 15, 0, 10));
151 building->SetBoundaries(
Box(45, 55, 35, 45, 0, 10));
154 building->SetBoundaries(
Box(17.5, 22.5, 22.5, 27.5, 0, 10));
157 building->SetBoundaries(
Box(77.5, 82.5, 22.5, 27.5, 0, 10));
185 outdoorMm->SetPosition(Vector(10, 10, 0));
198 child0->SetPosition(Vector(1, 0, 0));
208 child1->SetPosition(Vector(-1, 0, 0));
214 child2->SetPosition(Vector(0, 1, 0));
237 group.SetMemberMobilityModel(
"ns3::ConstantPositionMobilityModel");
254 ascii.CreateFileStream(
"outdoor-group-mobility-course-change.mob"));
Manage ASCII trace files for device models.
Parse command-line arguments.
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Helper class used to assign positions and mobility models to nodes for a group mobility configuration...
void SetReferenceMobilityModel(Ptr< MobilityModel > mobility)
Set the reference mobility model which will be installed as the parent mobility model during GroupMob...
static void EnableAsciiAll(Ptr< OutputStreamWrapper > stream)
Keep track of the current position and velocity of an object.
keep track of a set of node pointers.
Iterator End() const
Get an iterator which indicates past-the-last Node in the container.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
Iterator Begin() const
Get an iterator which refers to the first Node in the container.
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
void AggregateObject(Ptr< Object > other)
Aggregate two Objects together.
Smart pointer class similar to boost::intrusive_ptr.
AttributeValue implementation for Rectangle.
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
static Time Now()
Return the current simulation virtual time.
static void Run()
Run the simulation.
static void Stop()
Tell the Simulator the calling event should be the last one executed.
Simulation virtual time values and global simulation resolution.
double GetSeconds() const
Get an approximation of the time stored in this instance in the indicated unit.
#define NS_LOG_ERROR(msg)
Use NS_LOG to output a message of level LOG_ERROR.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Time NanoSeconds(uint64_t value)
Construct a Time in the indicated unit.
Time Seconds(double value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void PrintGnuplottableBuildingListToFile(std::string filename)
Print the buildings list in a format that can be used by Gnuplot to draw them.
std::ofstream g_timeSeries
The time series file.
void PrintPosition(Ptr< Node > node)
Print the node position to the time series file.