|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
26 #include "ns3/mobility-model.h"
27 #include "ns3/double.h"
28 #include "ns3/pointer.h"
29 #include "ns3/okumura-hata-propagation-loss-model.h"
30 #include "ns3/itu-r-1411-los-propagation-loss-model.h"
31 #include "ns3/itu-r-1411-nlos-over-rooftop-propagation-loss-model.h"
32 #include "ns3/itu-r-1238-propagation-loss-model.h"
33 #include "ns3/kun-2600-mhz-propagation-loss-model.h"
34 #include <ns3/mobility-building-info.h>
50 m_okumuraHata = CreateObject<OkumuraHataPropagationLossModel> ();
51 m_ituR1411Los = CreateObject<ItuR1411LosPropagationLossModel> ();
53 m_ituR1238 = CreateObject<ItuR1238PropagationLossModel> ();
54 m_kun2600Mhz = CreateObject<Kun2600MhzPropagationLossModel> ();
64 static TypeId tid =
TypeId (
"ns3::HybridBuildingsPropagationLossModel")
68 .AddConstructor<HybridBuildingsPropagationLossModel> ()
69 .SetGroupName (
"Buildings")
71 .AddAttribute (
"Frequency",
72 "The Frequency (default is 2.106 GHz).",
75 MakeDoubleChecker<double> ())
77 .AddAttribute (
"Los2NlosThr",
78 " Threshold from LoS to NLoS in ITU 1411 [m].",
81 MakeDoubleChecker<double> ())
83 .AddAttribute (
"Environment",
84 "Environment Scenario",
91 .AddAttribute (
"CitySize",
92 "Dimension of the city",
99 .AddAttribute (
"RooftopLevel",
100 "The height of the rooftop level in meters",
103 MakeDoubleChecker<double> (0.0, 90.0))
153 NS_ASSERT_MSG ((a1 != 0) && (b1 != 0),
"HybridBuildingsPropagationLossModel only works with MobilityBuildingInfo");
156 bool isAIndoor = a1->IsIndoor ();
157 bool isBIndoor = b1->IsIndoor ();
171 NS_LOG_INFO (
this <<
" 0-0 (>1000): below rooftop -> ITUR1411 : " << loss);
177 NS_LOG_INFO (
this <<
" O-O (>1000): above rooftop -> OH : " << loss);
184 NS_LOG_INFO (
this <<
" 0-0 (<1000) Street canyon -> ITUR1411 : " << loss);
196 NS_LOG_INFO (
this <<
" 0-I (>1000): below rooftop -> ITUR1411 : " << loss);
201 NS_LOG_INFO (
this <<
" O-I (>1000): above the rooftop -> OH : " << loss);
207 NS_LOG_INFO (
this <<
" 0-I (<1000) ITUR1411 + BEL : " << loss);
216 if (a1->GetBuilding () == b1->GetBuilding ())
220 NS_LOG_INFO (
this <<
" I-I (same building) ITUR1238 : " << loss);
227 NS_LOG_INFO (
this <<
" I-I (different) ITUR1238 + 2*BEL : " << loss);
239 NS_LOG_INFO (
this <<
" I-O (>1000): down rooftop -> ITUR1411 : " << loss);
245 NS_LOG_INFO (
this <<
" =I-O (>1000) over rooftop OH + BEL + HG: " << loss);
251 NS_LOG_INFO (
this <<
" I-O (<1000) ITUR1411 + BEL + HG: " << loss);
a unique identifier for an interface.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
void SetEnvironment(EnvironmentType env)
set the environment type
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< const AttributeChecker > MakeEnumChecker(int v, std::string n, Ts... args)
Make an EnumChecker pre-configured with a set of allowed values by name.
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
double GetDistanceFrom(Ptr< const MobilityModel > position) const
void SetRooftopHeight(double rooftopHeight)
set the rooftop height
static TypeId GetTypeId(void)
HybridBuildingsPropagationLossModel()
TypeId SetParent(TypeId tid)
Set the parent TypeId.
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Hold variables of type enum.
double OkumuraHata(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const
double ExternalWallLoss(Ptr< MobilityBuildingInfo > a) const
double HeightLoss(Ptr< MobilityBuildingInfo > n) const
This model provides means for simulating the following propagation phenomena in the presence of build...
mobility buildings information (to be used by mobility models)
CitySize
The size of the city in which propagation takes place.
Ptr< ItuR1411NlosOverRooftopPropagationLossModel > m_ituR1411NlosOverRooftop
Ptr< ItuR1238PropagationLossModel > m_ituR1238
void SetFrequency(double freq)
set the propagation frequency
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Ptr< Kun2600MhzPropagationLossModel > m_kun2600Mhz
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
EnvironmentType
The type of propagation environment.
void SetCitySize(CitySize size)
set the size of the city
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Ptr< const AttributeAccessor > MakeEnumAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
~HybridBuildingsPropagationLossModel()
double InternalWallsLoss(Ptr< MobilityBuildingInfo > a, Ptr< MobilityBuildingInfo > b) const
Ptr< ItuR1411LosPropagationLossModel > m_ituR1411Los
double ItuR1238(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const
double ItuR1411(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const
Vector GetPosition(void) const
virtual double GetLoss(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const
Ptr< OkumuraHataPropagationLossModel > m_okumuraHata
double m_itu1411NlosThreshold
in meters (switch Los -> NLoS)