12#include "ns3/mobility-model.h"
13#include "ns3/string.h"
26 TypeId(
"ns3::ProbabilisticV2vUrbanChannelConditionModel")
28 .SetGroupName(
"Propagation")
30 .AddAttribute(
"Density",
31 "Specifies the density of the vehicles in the scenario."
32 "It can be set to Low, Medium or High.",
74 NS_FATAL_ERROR(
"Undefined density, choose between Low, Medium and High");
113 NS_FATAL_ERROR(
"Undefined density, choose between Low, Medium and High");
129 TypeId(
"ns3::ProbabilisticV2vHighwayChannelConditionModel")
131 .SetGroupName(
"Propagation")
133 .AddAttribute(
"Density",
134 "Specifies the density of the vehicles in the scenario."
135 "It can be set to Low, Medium or High.",
185 NS_FATAL_ERROR(
"Undefined density, choose between Low, Medium and High");
222 NS_FATAL_ERROR(
"Undefined density, choose between Low, Medium and High");
Hold variables of type enum.
Computes the channel condition for the V2V Highway scenario.
static TypeId GetTypeId()
Get the type ID.
VehicleDensity m_densityHighway
vehicle density
double ComputePnlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the NLOS probability.
~ProbabilisticV2vHighwayChannelConditionModel() override
Destructor for the ProbabilisticV2vHighwayChannelConditionModel class.
ProbabilisticV2vHighwayChannelConditionModel()
Constructor for the ProbabilisticV2vHighwayChannelConditionModel class.
double ComputePlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the LOS probability.
Computes the channel condition for the V2V Urban scenario.
VehicleDensity m_densityUrban
vehicle density
static TypeId GetTypeId()
Get the type ID.
double ComputePnlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the NLOS probability.
~ProbabilisticV2vUrbanChannelConditionModel() override
Destructor for the ProbabilisticV2vUrbanChannelConditionModel class.
ProbabilisticV2vUrbanChannelConditionModel()
Constructor for the ProbabilisticV2vUrbanChannelConditionModel class.
double ComputePlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the LOS probability.
Smart pointer class similar to boost::intrusive_ptr.
Base class for the 3GPP channel condition models.
static double Calculate2dDistance(const Vector &a, const Vector &b)
Computes the 2D distance between two 3D vectors.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< const AttributeChecker > MakeEnumChecker(T v, std::string n, Ts... args)
Make an EnumChecker pre-configured with a set of allowed values by name.