A Discrete-Event Network Simulator
QKDNetSim v2.0 (NS-3 v3.41) @ (+)
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
w
Enumerator
a
b
c
d
e
f
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
Related Functions
:
a
b
c
d
e
g
h
i
j
l
m
n
o
p
q
r
s
t
u
w
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
Enumerator
c
e
i
l
o
r
s
t
v
Macros
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
mobility-building-info.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Author: Marco Miozzo <marco.miozzo@cttc.es>
18
*
19
*/
20
#ifndef MOBILITY_BUILDING_INFO_H
21
#define MOBILITY_BUILDING_INFO_H
22
23
#include "
building.h
"
24
25
#include <ns3/box.h>
26
#include <ns3/constant-velocity-helper.h>
27
#include <ns3/mobility-model.h>
28
#include <ns3/object.h>
29
#include <ns3/ptr.h>
30
#include <ns3/simple-ref-count.h>
31
32
#include <map>
33
34
namespace
ns3
35
{
36
45
class
MobilityBuildingInfo
:
public
Object
46
{
47
public
:
53
static
TypeId
GetTypeId
();
54
MobilityBuildingInfo
();
55
61
MobilityBuildingInfo
(
Ptr<Building>
building);
62
68
bool
IsIndoor
();
69
81
void
SetIndoor
(
Ptr<Building>
building, uint8_t nfloor, uint8_t nroomx, uint8_t nroomy);
82
94
void
SetIndoor
(uint8_t nfloor, uint8_t nroomx, uint8_t nroomy);
95
99
void
SetOutdoor
();
100
106
uint8_t
GetFloorNumber
();
107
113
uint8_t
GetRoomNumberX
();
114
120
uint8_t
GetRoomNumberY
();
121
127
Ptr<Building>
GetBuilding
();
135
void
MakeConsistent
(
Ptr<MobilityModel>
mm);
136
137
protected
:
138
// inherited from Object
139
void
DoInitialize
()
override
;
140
141
private
:
142
Ptr<Building>
m_myBuilding
;
143
bool
m_indoor
;
144
uint8_t
m_nFloor
;
145
uint8_t
m_roomX
;
147
uint8_t
m_roomY
;
149
Vector
150
m_cachedPosition
;
151
};
152
153
}
// namespace ns3
154
155
#endif
// MOBILITY_BUILDING_INFO_H
building.h
ns3::MobilityBuildingInfo
mobility buildings information (to be used by mobility models)
Definition:
mobility-building-info.h:46
ns3::MobilityBuildingInfo::GetFloorNumber
uint8_t GetFloorNumber()
Get the floor number at which the MobilityBuildingInfo instance is located.
Definition:
mobility-building-info.cc:139
ns3::MobilityBuildingInfo::IsIndoor
bool IsIndoor()
Is indoor method.
Definition:
mobility-building-info.cc:78
ns3::MobilityBuildingInfo::GetBuilding
Ptr< Building > GetBuilding()
Get the building in which the MobilityBuildingInfo instance is located.
Definition:
mobility-building-info.cc:160
ns3::MobilityBuildingInfo::m_roomX
uint8_t m_roomX
The room number along x-axis at which the MobilityBuildingInfo instance is located.
Definition:
mobility-building-info.h:145
ns3::MobilityBuildingInfo::m_myBuilding
Ptr< Building > m_myBuilding
Building.
Definition:
mobility-building-info.h:142
ns3::MobilityBuildingInfo::m_roomY
uint8_t m_roomY
The room number along y-axis at which the MobilityBuildingInfo instance is located.
Definition:
mobility-building-info.h:147
ns3::MobilityBuildingInfo::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
mobility-building-info.cc:39
ns3::MobilityBuildingInfo::m_indoor
bool m_indoor
Node position (indoor/outdoor) ?
Definition:
mobility-building-info.h:143
ns3::MobilityBuildingInfo::MobilityBuildingInfo
MobilityBuildingInfo()
Definition:
mobility-building-info.cc:57
ns3::MobilityBuildingInfo::DoInitialize
void DoInitialize() override
Initialize() implementation.
Definition:
mobility-building-info.cc:50
ns3::MobilityBuildingInfo::GetRoomNumberX
uint8_t GetRoomNumberX()
Get the room number along x-axis at which the MobilityBuildingInfo instance is located.
Definition:
mobility-building-info.cc:146
ns3::MobilityBuildingInfo::GetRoomNumberY
uint8_t GetRoomNumberY()
Get the room number along y-axis at which the MobilityBuildingInfo instance is located.
Definition:
mobility-building-info.cc:153
ns3::MobilityBuildingInfo::SetIndoor
void SetIndoor(Ptr< Building > building, uint8_t nfloor, uint8_t nroomx, uint8_t nroomy)
Mark this MobilityBuildingInfo instance as indoor.
Definition:
mobility-building-info.cc:93
ns3::MobilityBuildingInfo::m_nFloor
uint8_t m_nFloor
The floor number at which the MobilityBuildingInfo instance is located.
Definition:
mobility-building-info.h:144
ns3::MobilityBuildingInfo::SetOutdoor
void SetOutdoor()
Mark this MobilityBuildingInfo instance as outdoor.
Definition:
mobility-building-info.cc:132
ns3::MobilityBuildingInfo::MakeConsistent
void MakeConsistent(Ptr< MobilityModel > mm)
Make the given mobility model consistent, by determining whether its position falls inside any of the...
Definition:
mobility-building-info.cc:167
ns3::MobilityBuildingInfo::m_cachedPosition
Vector m_cachedPosition
The node position cached after making its mobility model consistent.
Definition:
mobility-building-info.h:150
ns3::Object
A base class which provides memory management and object aggregation.
Definition:
object.h:89
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:77
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
buildings
model
mobility-building-info.h
Generated on Sun Mar 3 2024 17:10:54 for ns-3 by
1.9.1