A Discrete-Event Network Simulator
API
three-gpp-v2v-channel-example.cc File Reference
#include "ns3/buildings-module.h"
#include "ns3/mobility-module.h"
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include <fstream>
#include "ns3/uniform-planar-array.h"
#include "ns3/three-gpp-spectrum-propagation-loss-model.h"
#include "ns3/three-gpp-v2v-propagation-loss-model.h"
#include "ns3/three-gpp-channel-model.h"
#include "ns3/spectrum-signal-parameters.h"
+ Include dependency graph for three-gpp-v2v-channel-example.cc:

Go to the source code of this file.

Classes

struct  ComputeSnrParams
 A structure that holds the parameters for the ComputeSnr function. More...
 

Functions

static void ComputeSnr (const ComputeSnrParams &params)
 Compute the average SNR. More...
 
static void DoBeamforming (Ptr< NetDevice > thisDevice, Ptr< PhasedArrayModel > thisAntenna, Ptr< NetDevice > otherDevice)
 Perform the beamforming using the DFT beamforming method. More...
 
void PrintGnuplottableBuildingListToFile (std::string filename)
 Generates a GNU-plottable file representig the buildings deployed in the scenario. More...
 

Variables

static Ptr< ChannelConditionModelm_condModel
 the ChannelConditionModel object More...
 
static Ptr< ThreeGppPropagationLossModelm_propagationLossModel
 the PropagationLossModel object More...
 
static Ptr< ThreeGppSpectrumPropagationLossModelm_spectrumLossModel
 the SpectrumPropagationLossModel object More...
 

Detailed Description

Usage

$ ./ns3 run "three-gpp-v2v-channel-example [Program Options]"

Program Options

--frequency
operating frequency in Hz [2.8e+10]
--txPow
tx power in dBm [30]
--noiseFigure
noise figure in dB [9]
--scenario
3GPP propagation scenario, V2V-Urban or V2V-Highway [V2V-Urban]

Definition in file three-gpp-v2v-channel-example.cc.

Function Documentation

◆ ComputeSnr()

◆ DoBeamforming()

static void DoBeamforming ( Ptr< NetDevice thisDevice,
Ptr< PhasedArrayModel thisAntenna,
Ptr< NetDevice otherDevice 
)
static

Perform the beamforming using the DFT beamforming method.

Parameters
thisDevicethe device performing the beamforming
thisAntennathe antenna object associated to thisDevice
otherDevicethe device towards which point the beam

Definition at line 80 of file three-gpp-v2v-channel-example.cc.

References ns3::PhasedArrayModel::GetBeamformingVector(), ns3::NetDevice::GetNode(), ns3::Object::GetObject(), GetPosition(), and ns3::PhasedArrayModel::SetBeamformingVector().

+ Here is the call graph for this function:

◆ PrintGnuplottableBuildingListToFile()

void PrintGnuplottableBuildingListToFile ( std::string  filename)

Generates a GNU-plottable file representig the buildings deployed in the scenario.

Parameters
filenamethe name of the output file

Definition at line 147 of file three-gpp-v2v-channel-example.cc.

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

Variable Documentation

◆ m_condModel

Ptr<ChannelConditionModel> m_condModel
static

the ChannelConditionModel object

Definition at line 56 of file three-gpp-v2v-channel-example.cc.

Referenced by ComputeSnr().

◆ m_propagationLossModel

Ptr<ThreeGppPropagationLossModel> m_propagationLossModel
static

the PropagationLossModel object

Definition at line 54 of file three-gpp-v2v-channel-example.cc.

Referenced by ComputeSnr().

◆ m_spectrumLossModel

Ptr<ThreeGppSpectrumPropagationLossModel> m_spectrumLossModel
static

the SpectrumPropagationLossModel object

Definition at line 55 of file three-gpp-v2v-channel-example.cc.

Referenced by ComputeSnr().