A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
main-propagation-loss.cc File Reference
#include "ns3/boolean.h"
#include "ns3/command-line.h"
#include "ns3/config.h"
#include "ns3/constant-position-mobility-model.h"
#include "ns3/double.h"
#include "ns3/gnuplot.h"
#include "ns3/jakes-propagation-loss-model.h"
#include "ns3/pointer.h"
#include "ns3/propagation-loss-model.h"
#include "ns3/simulator.h"
#include "ns3/string.h"
#include <map>
+ Include dependency graph for main-propagation-loss.cc:

Go to the source code of this file.

Functions

static double dround (double number, double precision)
 Round a double number to the given precision.
 
static Gnuplot TestDeterministic (Ptr< PropagationLossModel > model, double targetDistance, double step)
 Test the model by sampling over a distance.
 
static Gnuplot TestDeterministicByTime (Ptr< PropagationLossModel > model, Time timeStep, Time timeTotal, double distance)
 Test the model by sampling over time.
 
static Gnuplot TestProbabilistic (Ptr< PropagationLossModel > model, double targetDistance, double step, unsigned int samples)
 Test the model by sampling over a distance.
 

Function Documentation

◆ dround()

static double dround ( double number,
double precision )
static

Round a double number to the given precision.

e.g. dround(0.234, 0.1) = 0.2 and dround(0.257, 0.1) = 0.3

Parameters
numberThe number to round.
precisionThe precision.
Returns
the rounded number

Definition at line 34 of file main-propagation-loss.cc.

Referenced by TestProbabilistic().

+ Here is the caller graph for this function:

◆ TestDeterministic()

static Gnuplot TestDeterministic ( Ptr< PropagationLossModel > model,
double targetDistance,
double step )
static

Test the model by sampling over a distance.

Parameters
modelThe model to test.
targetDistanceThe target distance.
stepThe step.
Returns
a Gnuplot object to be plotted.

Definition at line 58 of file main-propagation-loss.cc.

References ns3::Gnuplot2dDataset::Add(), ns3::Gnuplot::AddDataset(), ns3::Gnuplot::AppendExtra(), ns3::CreateObject(), ns3::Gnuplot2dDataset::LINES, ns3::Simulator::Run(), ns3::Seconds(), ns3::Gnuplot2dDataset::SetStyle(), ns3::GnuplotDataset::SetTitle(), and ns3::Simulator::Stop().

+ Here is the call graph for this function:

◆ TestDeterministicByTime()

static Gnuplot TestDeterministicByTime ( Ptr< PropagationLossModel > model,
Time timeStep,
Time timeTotal,
double distance )
static

Test the model by sampling over time.

Parameters
modelThe model to test.
timeStepThe time step.
timeTotalThe total time.
distanceThe distance.
Returns
a Gnuplot object to be plotted.

Definition at line 193 of file main-propagation-loss.cc.

References ns3::Gnuplot2dDataset::Add(), ns3::Gnuplot::AddDataset(), ns3::Gnuplot::AppendExtra(), ns3::CreateObject(), ns3::Time::GetSeconds(), ns3::Gnuplot2dDataset::LINES, ns3::Simulator::Now(), ns3::Simulator::Run(), ns3::Gnuplot2dDataset::SetStyle(), ns3::GnuplotDataset::SetTitle(), and ns3::Simulator::Stop().

+ Here is the call graph for this function:

◆ TestProbabilistic()

static Gnuplot TestProbabilistic ( Ptr< PropagationLossModel > model,
double targetDistance,
double step,
unsigned int samples )
static

Test the model by sampling over a distance.

Parameters
modelThe model to test.
targetDistanceThe target distance.
stepThe step.
samplesNumber of samples.
Returns
a Gnuplot object to be plotted.

Definition at line 113 of file main-propagation-loss.cc.

References ns3::Gnuplot3dDataset::Add(), ns3::Gnuplot::AddDataset(), ns3::Gnuplot3dDataset::AddEmptyLine(), ns3::Gnuplot::AppendExtra(), ns3::CreateObject(), dround(), ns3::Simulator::Run(), ns3::Seconds(), ns3::GnuplotDataset::SetExtra(), ns3::Gnuplot3dDataset::SetStyle(), ns3::GnuplotDataset::SetTitle(), and ns3::Simulator::Stop().

+ Here is the call graph for this function: