25 #include "ns3/double.h"
28 #include "ns3/mobility-model.h"
29 #include "ns3/okumura-hata-propagation-loss-model.h"
30 #include "ns3/pointer.h"
31 #include "ns3/propagation-loss-model.h"
44 m_okumuraHata = CreateObject<OkumuraHataPropagationLossModel>();
54 static TypeId tid =
TypeId(
"ns3::OhBuildingsPropagationLossModel")
57 .SetGroupName(
"Buildings")
72 NS_ASSERT_MSG(a1 && b1,
"OhBuildingsPropagationLossModel only works with MobilityBuildingInfo");
76 bool isAIndoor = a1->IsIndoor();
77 bool isBIndoor = b1->IsIndoor();
98 if (a1->GetBuilding() == b1->GetBuilding())
102 NS_LOG_INFO(
this <<
" I-I (same building)" << loss);
108 NS_LOG_INFO(
this <<
" I-O-I (different buildings): " << loss);
This model provides means for simulating the following propagation phenomena in the presence of build...
double ExternalWallLoss(Ptr< MobilityBuildingInfo > a) const
Calculate the external wall loss.
double InternalWallsLoss(Ptr< MobilityBuildingInfo > a, Ptr< MobilityBuildingInfo > b) const
Calculate the internal wall loss.
mobility buildings information (to be used by mobility models)
Ptr< T > GetObject() const
Get a pointer to the requested aggregated Object.
this model combines the OkumuraHata model with the BuildingsPropagationLossModel
Ptr< OkumuraHataPropagationLossModel > m_okumuraHata
OkumuraHata Propagation Loss Model.
~OhBuildingsPropagationLossModel() override
static TypeId GetTypeId()
Get the type ID.
double GetLoss(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const override
OhBuildingsPropagationLossModel()
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
#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.