A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
three-gpp-v2v-channel-example.cc File Reference
#include "ns3/buildings-module.h"
#include "ns3/core-module.h"
#include "ns3/mobility-module.h"
#include "ns3/network-module.h"
#include "ns3/spectrum-signal-parameters.h"
#include "ns3/three-gpp-channel-model.h"
#include "ns3/three-gpp-spectrum-propagation-loss-model.h"
#include "ns3/three-gpp-v2v-propagation-loss-model.h"
#include "ns3/uniform-planar-array.h"
#include <fstream>
+ 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.
 
static void DoBeamforming (Ptr< NetDevice > thisDevice, Ptr< PhasedArrayModel > thisAntenna, Ptr< NetDevice > otherDevice)
 Perform the beamforming using the DFT beamforming method.
 
void PrintGnuplottableBuildingListToFile (std::string filename)
 Generates a GNU-plottable file representing the buildings deployed in the scenario.
 

Variables

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

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()

static void ComputeSnr ( const ComputeSnrParams params)
static

Compute the average SNR.

Parameters
paramsA structure that holds a bunch of parameters needed by ComputSnr function to calculate the average SNR

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

References ns3::PropagationLossModel::CalcRxPower(), ns3::PhasedArraySpectrumPropagationLossModel::CalcRxPowerSpectralDensity(), ns3::Time::GetSeconds(), m_condModel, m_propagationLossModel, m_spectrumLossModel, ns3::Simulator::Now(), NS_LOG_DEBUG, and ns3::Sum().

+ Here is the call graph for this function:

◆ 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 82 of file three-gpp-v2v-channel-example.cc.

◆ PrintGnuplottableBuildingListToFile()

void PrintGnuplottableBuildingListToFile ( std::string  filename)

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

Parameters
filenamethe name of the output file

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

References ns3::BuildingList::Begin(), ns3::BuildingList::End(), NS_LOG_ERROR, ns3::Box::xMax, ns3::Box::xMin, ns3::Box::yMax, and ns3::Box::yMin.

+ Here is the call graph for this function:

Variable Documentation

◆ m_condModel

Ptr<ChannelConditionModel> m_condModel
static

the ChannelConditionModel object

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

Referenced by ComputeSnr().

◆ m_propagationLossModel

Ptr<ThreeGppPropagationLossModel> m_propagationLossModel
static

the PropagationLossModel object

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

Referenced by ComputeSnr().

◆ m_spectrumLossModel

Ptr<ThreeGppSpectrumPropagationLossModel> m_spectrumLossModel
static

the SpectrumPropagationLossModel object

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

Referenced by ComputeSnr().