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 dependency graph for three-gpp-v2v-channel-example.cc:

Go to the source code of this file.

Functions

static void ComputeSnr (Ptr< MobilityModel > txMob, Ptr< MobilityModel > rxMob, Ptr< const SpectrumValue > txPsd, double noiseFigure)
 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...
 

Function Documentation

◆ ComputeSnr()

static void ComputeSnr ( Ptr< MobilityModel txMob,
Ptr< MobilityModel rxMob,
Ptr< const SpectrumValue txPsd,
double  noiseFigure 
)
static

Compute the average SNR.

Parameters
txMobthe tx mobility model
rxMobthe rx mobility model
txPsdthe PSD of the transmitting signal
noiseFigurethe noise figure in dB

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

References ns3::PropagationLossModel::CalcRxPower(), ns3::SpectrumValue::Copy(), f(), ns3::ChannelCondition::GetLosCondition(), ns3::MobilityModel::GetPosition(), ns3::Time::GetSeconds(), ns3::SpectrumValue::GetSpectrumModel(), 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 64 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 136 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 55 of file three-gpp-v2v-channel-example.cc.

Referenced by ComputeSnr().

◆ m_propagationLossModel

Ptr<ThreeGppPropagationLossModel> m_propagationLossModel
static

the PropagationLossModel object

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

Referenced by ComputeSnr().

◆ m_spectrumLossModel

Ptr<ThreeGppSpectrumPropagationLossModel> m_spectrumLossModel
static

the SpectrumPropagationLossModel object

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

Referenced by ComputeSnr().