A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
src
buildings
model
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
57
class
BuildingsPropagationLossModel
:
public
PropagationLossModel
58
{
59
60
public
:
61
static
TypeId
GetTypeId
(
void
);
62
63
BuildingsPropagationLossModel
();
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
:
75
double
ExternalWallLoss
(
Ptr<MobilityBuildingInfo>
a)
const
;
76
double
HeightLoss
(
Ptr<MobilityBuildingInfo>
n
)
const
;
77
double
InternalWallsLoss
(
Ptr<MobilityBuildingInfo>
a,
Ptr<MobilityBuildingInfo>
b)
const
;
78
79
double
GetShadowing
(
Ptr<MobilityModel>
a,
Ptr<MobilityModel>
b)
const
;
80
81
double
m_lossInternalWall
;
// in meters
82
83
84
class
ShadowingLoss
85
{
86
public
:
87
ShadowingLoss
();
88
ShadowingLoss
(
double
shadowingValue,
Ptr<MobilityModel>
receiver);
89
double
GetLoss
()
const
;
90
Ptr<MobilityModel>
GetReceiver
(
void
)
const
;
91
protected
:
92
double
m_shadowingValue
;
93
Ptr<MobilityModel>
m_receiver
;
94
};
95
96
mutable
std::map<Ptr<MobilityModel>, std::map<Ptr<MobilityModel>,
ShadowingLoss
> >
m_shadowingLossMap
;
97
double
EvaluateSigma
(
Ptr<MobilityBuildingInfo>
a,
Ptr<MobilityBuildingInfo>
b)
const
;
98
99
100
double
m_shadowingSigmaExtWalls
;
101
double
m_shadowingSigmaOutdoor
;
102
double
m_shadowingSigmaIndoor
;
103
Ptr<NormalRandomVariable>
m_randVariable
;
104
105
virtual
int64_t
DoAssignStreams
(int64_t stream);
106
};
107
108
}
109
110
#endif
/* BUILDINGS_PROPAGATION_LOSS_MODEL_H_ */
ns3::Ptr< MobilityModel >
ns3::BuildingsPropagationLossModel::DoCalcRxPower
virtual double DoCalcRxPower(double txPowerDbm, Ptr< MobilityModel > a, Ptr< MobilityModel > b) const
Returns the Rx Power taking into account only the particular PropagationLossModel.
Definition:
buildings-propagation-loss-model.cc:217
ns3::BuildingsPropagationLossModel::m_shadowingSigmaOutdoor
double m_shadowingSigmaOutdoor
Definition:
buildings-propagation-loss-model.h:101
ns3::BuildingsPropagationLossModel::ShadowingLoss::GetLoss
double GetLoss() const
Definition:
buildings-propagation-loss-model.cc:51
ns3::BuildingsPropagationLossModel::m_randVariable
Ptr< NormalRandomVariable > m_randVariable
Definition:
buildings-propagation-loss-model.h:103
ns3::BuildingsPropagationLossModel::EvaluateSigma
double EvaluateSigma(Ptr< MobilityBuildingInfo > a, Ptr< MobilityBuildingInfo > b) const
Definition:
buildings-propagation-loss-model.cc:188
ns3::BuildingsPropagationLossModel::ShadowingLoss::ShadowingLoss
ShadowingLoss()
Definition:
buildings-propagation-loss-model.cc:40
ns3::BuildingsPropagationLossModel::BuildingsPropagationLossModel
BuildingsPropagationLossModel()
Definition:
buildings-propagation-loss-model.cc:98
ns3::BuildingsPropagationLossModel::HeightLoss
double HeightLoss(Ptr< MobilityBuildingInfo > n) const
Definition:
buildings-propagation-loss-model.cc:128
ns3::BuildingsPropagationLossModel
This model provides means for simulating the following propagation phenomena in the presence of build...
Definition:
buildings-propagation-loss-model.h:57
ns3::BuildingsPropagationLossModel::GetLoss
virtual double GetLoss(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const =0
ns3::BuildingsPropagationLossModel::ShadowingLoss::GetReceiver
Ptr< MobilityModel > GetReceiver(void) const
Definition:
buildings-propagation-loss-model.cc:57
ns3::BuildingsPropagationLossModel::ShadowingLoss
Definition:
buildings-propagation-loss-model.h:84
ns3::BuildingsPropagationLossModel::m_shadowingSigmaIndoor
double m_shadowingSigmaIndoor
Definition:
buildings-propagation-loss-model.h:102
sample-rng-plot.n
n
Definition:
sample-rng-plot.py:37
ns3::BuildingsPropagationLossModel::m_shadowingLossMap
std::map< Ptr< MobilityModel >, std::map< Ptr< MobilityModel >, ShadowingLoss > > m_shadowingLossMap
Definition:
buildings-propagation-loss-model.h:96
ns3::BuildingsPropagationLossModel::GetTypeId
static TypeId GetTypeId(void)
Definition:
buildings-propagation-loss-model.cc:63
ns3::BuildingsPropagationLossModel::ShadowingLoss::m_shadowingValue
double m_shadowingValue
Definition:
buildings-propagation-loss-model.h:92
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::BuildingsPropagationLossModel::ExternalWallLoss
double ExternalWallLoss(Ptr< MobilityBuildingInfo > a) const
Definition:
buildings-propagation-loss-model.cc:104
ns3::BuildingsPropagationLossModel::InternalWallsLoss
double InternalWallsLoss(Ptr< MobilityBuildingInfo > a, Ptr< MobilityBuildingInfo > b) const
Definition:
buildings-propagation-loss-model.cc:138
ns3::PropagationLossModel
Models the propagation loss through a transmission medium.
Definition:
propagation-loss-model.h:49
ns3::BuildingsPropagationLossModel::ShadowingLoss::m_receiver
Ptr< MobilityModel > m_receiver
Definition:
buildings-propagation-loss-model.h:93
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:58
ns3::BuildingsPropagationLossModel::GetShadowing
double GetShadowing(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const
Definition:
buildings-propagation-loss-model.cc:149
ns3::BuildingsPropagationLossModel::m_shadowingSigmaExtWalls
double m_shadowingSigmaExtWalls
Definition:
buildings-propagation-loss-model.h:100
ns3::BuildingsPropagationLossModel::m_lossInternalWall
double m_lossInternalWall
Definition:
buildings-propagation-loss-model.h:81
ns3::BuildingsPropagationLossModel::DoAssignStreams
virtual int64_t DoAssignStreams(int64_t stream)
Subclasses must implement this; those not using random variables can return zero. ...
Definition:
buildings-propagation-loss-model.cc:223
Generated on Wed Nov 7 2018 10:01:48 for ns-3 by
1.8.14