A Discrete-Event Network Simulator
API
outdoor-group-mobility-example.cc File Reference
#include <iostream>
#include "ns3/core-module.h"
#include <ns3/mobility-module.h>
#include "ns3/network-module.h"
#include "ns3/buildings-module.h"
+ Include dependency graph for outdoor-group-mobility-example.cc:

Go to the source code of this file.

Functions

void PrintGnuplottableBuildingListToFile (std::string filename)
 Print the buildings list in a format that can be used by Gnuplot to draw them. More...
 
void PrintPosition (Ptr< Node > node)
 Print the node position to the time series file. More...
 

Variables

std::ofstream g_timeSeries
 The time series file. More...
 

Detailed Description

Usage

$ ./ns3 run "outdoor-group-mobility-example [Program Options]"

Program Options

--useHelper
Whether to use helper code [false]

Definition in file outdoor-group-mobility-example.cc.

Function Documentation

◆ PrintGnuplottableBuildingListToFile()

void PrintGnuplottableBuildingListToFile ( std::string  filename)

Print the buildings list in a format that can be used by Gnuplot to draw them.

Parameters
filenameThe ouput filename.

Definition at line 97 of file outdoor-group-mobility-example.cc.

References NS_LOG_ERROR, ns3::Box::xMax, ns3::Box::xMin, ns3::Box::yMax, and ns3::Box::yMin.

◆ PrintPosition()

void PrintPosition ( Ptr< Node node)

Print the node position to the time series file.

Parameters
nodeThe node.

Definition at line 82 of file outdoor-group-mobility-example.cc.

References g_timeSeries, ns3::Node::GetId(), ns3::Object::GetObject(), ns3::MobilityModel::GetPosition(), ns3::Time::GetSeconds(), ns3::Now(), and NS_LOG_LOGIC.

+ Here is the call graph for this function:

Variable Documentation

◆ g_timeSeries

std::ofstream g_timeSeries

The time series file.

Definition at line 74 of file outdoor-group-mobility-example.cc.

Referenced by PrintPosition().