23 #include "ns3/double.h" 
   25 #include "ns3/mobility-model.h" 
   29 #include <ns3/mobility-building-info.h> 
   41   static TypeId tid = 
TypeId (
"ns3::ItuR1238PropagationLossModel")
 
   44     .SetGroupName (
"Buildings")
 
   46     .AddAttribute (
"Frequency",
 
   47                    "The Frequency  (default is 2.106 GHz).",
 
   50                    MakeDoubleChecker<double> ());
 
   61   NS_ASSERT_MSG ((a != 0) && (b != 0), 
"ItuR1238PropagationLossModel only works with MobilityBuildingInfo");
 
   62   NS_ASSERT_MSG (a->GetBuilding ()->GetId () == b->GetBuilding ()->GetId (), 
"ITU-R 1238 applies only to nodes that are in the same building");
 
   64   int n = std::abs (a->GetFloorNumber () - b->GetFloorNumber ());
 
   65   NS_LOG_LOGIC (
this << 
" A floor " << (uint16_t)a->GetFloorNumber () << 
" B floor " << (uint16_t)b->GetFloorNumber () << 
" n " << n);
 
   82           Lf = 15 + (4 * (n - 1));
 
   91           Lf = 6 + (3 * (n - 1));
 
  111   return (txPowerDbm - 
GetLoss (a, b));
 
virtual int64_t DoAssignStreams(int64_t stream)
Subclasses must implement this; those not using random variables can return zero. ...
 
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
 
virtual double DoCalcRxPower(double txPowerDbm, Ptr< MobilityModel > a, Ptr< MobilityModel > b) const 
Returns the Rx Power taking into account only the particular PropagatinLossModel. ...
 
double GetDistanceFrom(Ptr< const MobilityModel > position) const 
 
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system. 
 
Ptr< T > GetObject(void) const 
Get a pointer to the requested aggregated Object. 
 
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name. 
 
Vector GetPosition(void) const 
 
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO. 
 
double GetLoss(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const 
 
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC. 
 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
 
static TypeId GetTypeId(void)
 
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
 
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
 
Models the propagation loss through a transmission medium. 
 
mobility buildings information (to be used by mobility models) 
 
#define NS_LOG_ERROR(msg)
Use NS_LOG to output a message of level LOG_ERROR. 
 
This class can be used to hold variables of floating point type such as 'double' or 'float'...
 
a unique identifier for an interface. 
 
TypeId SetParent(TypeId tid)
Set the parent TypeId. 
 
double m_frequency
frequency in MHz