A Discrete-Event Network Simulator
API
buildings-propagation-loss-model.h
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2011, 2012 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Marco Miozzo <marco.miozzo@cttc.es>
19  * Nicola Baldo <nbaldo@cttc.es>
20  *
21  */
22 
23 #ifndef BUILDINGS_PROPAGATION_LOSS_MODEL_H_
24 #define BUILDINGS_PROPAGATION_LOSS_MODEL_H_
25 
26 #include "ns3/nstime.h"
27 #include "ns3/propagation-loss-model.h"
28 #include "ns3/random-variable-stream.h"
29 #include <ns3/building.h>
30 #include <ns3/mobility-building-info.h>
31 
32 
33 
34 namespace ns3 {
35 
36 class ShadowingLossModel;
37 class JakesFadingLossModel;
38 
58 {
59 
60 public:
61  static TypeId GetTypeId (void);
62 
69  virtual double GetLoss (Ptr<MobilityModel> a, Ptr<MobilityModel> b) const = 0;
70 
71  // inherited from PropagationLossModel
72  virtual double DoCalcRxPower (double txPowerDbm, Ptr<MobilityModel> a, Ptr<MobilityModel> b) const;
73 
74 protected:
76  double HeightLoss (Ptr<MobilityBuildingInfo> n) const;
78 
80 
81  double m_lossInternalWall; // in meters
82 
83 
85  {
86  public:
87  ShadowingLoss ();
88  ShadowingLoss (double shadowingValue, Ptr<MobilityModel> receiver);
89  double GetLoss () const;
90  Ptr<MobilityModel> GetReceiver (void) const;
91  protected:
94  };
95 
96  mutable std::map<Ptr<MobilityModel>, std::map<Ptr<MobilityModel>, ShadowingLoss> > m_shadowingLossMap;
98 
99 
104 
105  virtual int64_t DoAssignStreams (int64_t stream);
106 };
107 
108 }
109 
110 #endif /* BUILDINGS_PROPAGATION_LOSS_MODEL_H_ */
virtual double DoCalcRxPower(double txPowerDbm, Ptr< MobilityModel > a, Ptr< MobilityModel > b) const
Returns the Rx Power taking into account only the particular PropagationLossModel.
double EvaluateSigma(Ptr< MobilityBuildingInfo > a, Ptr< MobilityBuildingInfo > b) const
double HeightLoss(Ptr< MobilityBuildingInfo > n) const
This model provides means for simulating the following propagation phenomena in the presence of build...
virtual double GetLoss(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const =0
std::map< Ptr< MobilityModel >, std::map< Ptr< MobilityModel >, ShadowingLoss > > m_shadowingLossMap
Every class exported by the ns3 library is enclosed in the ns3 namespace.
double ExternalWallLoss(Ptr< MobilityBuildingInfo > a) const
double InternalWallsLoss(Ptr< MobilityBuildingInfo > a, Ptr< MobilityBuildingInfo > b) const
Models the propagation loss through a transmission medium.
a unique identifier for an interface.
Definition: type-id.h:58
double GetShadowing(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const
virtual int64_t DoAssignStreams(int64_t stream)
Subclasses must implement this; those not using random variables can return zero. ...