A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
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
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Marco Miozzo <marco.miozzo@cttc.es>
7
*
8
*/
9
#ifndef MOBILITY_BUILDING_INFO_H
10
#define MOBILITY_BUILDING_INFO_H
11
12
#include "
building.h
"
13
14
#include <ns3/box.h>
15
#include <ns3/constant-velocity-helper.h>
16
#include <ns3/mobility-model.h>
17
#include <ns3/object.h>
18
#include <ns3/ptr.h>
19
#include <ns3/simple-ref-count.h>
20
21
#include <map>
22
23
namespace
ns3
24
{
25
26
/**
27
* \ingroup buildings
28
* \ingroup mobility
29
30
* \brief mobility buildings information (to be used by mobility models)
31
*
32
* This model implements the management of scenarios where users might be
33
* either indoor (e.g., houses, offices, etc.) and outdoor.
34
*
35
*/
36
class
MobilityBuildingInfo
:
public
Object
37
{
38
public
:
39
/**
40
* \brief Get the type ID.
41
*
42
* \return the object TypeId
43
*/
44
static
TypeId
GetTypeId
();
45
MobilityBuildingInfo
();
46
47
/**
48
* \brief Parameterized constructor
49
*
50
* \param building The building in which the MobilityBuildingInfo instance would be placed
51
*/
52
MobilityBuildingInfo
(
Ptr<Building>
building);
53
54
/**
55
* \brief Is indoor method.
56
*
57
* \return true if the MobilityBuildingInfo instance is indoor, false otherwise
58
*/
59
bool
IsIndoor
();
60
61
/**
62
* \brief Mark this MobilityBuildingInfo instance as indoor
63
*
64
* \param building the building into which the MobilityBuildingInfo instance is located
65
* \param nfloor the floor number 1...nFloors at which the MobilityBuildingInfo instance
66
* is located
67
* \param nroomx the X room number 1...nRoomsX at which the MobilityBuildingInfo instance
68
* is located
69
* \param nroomy the Y room number 1...nRoomsY at which the MobilityBuildingInfo instance
70
* is located
71
*/
72
void
SetIndoor
(
Ptr<Building>
building, uint8_t nfloor, uint8_t nroomx, uint8_t nroomy);
73
74
/**
75
* \brief Mark this MobilityBuildingInfo instance as indoor
76
*
77
* \param nfloor the floor number 1...nFloors at which the MobilityBuildingInfo instance
78
* is located
79
* \param nroomx the X room number 1...nRoomsX at which the MobilityBuildingInfo instance
80
* is located
81
* \param nroomy the Y room number 1...nRoomsY at which the MobilityBuildingInfo instance
82
* is located
83
*/
84
85
void
SetIndoor
(uint8_t nfloor, uint8_t nroomx, uint8_t nroomy);
86
87
/**
88
* \brief Mark this MobilityBuildingInfo instance as outdoor
89
*/
90
void
SetOutdoor
();
91
92
/**
93
* \brief Get the floor number at which the MobilityBuildingInfo instance is located
94
*
95
* \return The floor number
96
*/
97
uint8_t
GetFloorNumber
();
98
99
/**
100
* \brief Get the room number along x-axis at which the MobilityBuildingInfo instance is located
101
*
102
* \return The room number
103
*/
104
uint8_t
GetRoomNumberX
();
105
106
/**
107
* \brief Get the room number along y-axis at which the MobilityBuildingInfo instance is located
108
*
109
* \return The room number
110
*/
111
uint8_t
GetRoomNumberY
();
112
113
/**
114
* \brief Get the building in which the MobilityBuildingInfo instance is located
115
*
116
* \return The building in which the MobilityBuildingInfo instance is located
117
*/
118
Ptr<Building>
GetBuilding
();
119
/**
120
* \brief Make the given mobility model consistent, by determining whether
121
* its position falls inside any of the building in BuildingList, and
122
* updating accordingly the BuildingInfo aggregated with the MobilityModel.
123
*
124
* \param mm the mobility model to be made consistent
125
*/
126
void
MakeConsistent
(
Ptr<MobilityModel>
mm);
127
128
protected
:
129
// inherited from Object
130
void
DoInitialize
()
override
;
131
132
private
:
133
Ptr<Building>
m_myBuilding
;
///< Building
134
bool
m_indoor
;
///< Node position (indoor/outdoor) ?
135
uint8_t
m_nFloor
;
///< The floor number at which the MobilityBuildingInfo instance is located
136
uint8_t
m_roomX
;
///< The room number along x-axis at which the MobilityBuildingInfo instance is
137
///< located
138
uint8_t
m_roomY
;
///< The room number along y-axis at which the MobilityBuildingInfo instance is
139
///< located
140
Vector
141
m_cachedPosition
;
///< The node position cached after making its mobility model consistent
142
};
143
144
}
// namespace ns3
145
146
#endif
// MOBILITY_BUILDING_INFO_H
building.h
ns3::MobilityBuildingInfo
mobility buildings information (to be used by mobility models)
Definition
mobility-building-info.h:37
ns3::MobilityBuildingInfo::GetFloorNumber
uint8_t GetFloorNumber()
Get the floor number at which the MobilityBuildingInfo instance is located.
Definition
mobility-building-info.cc:128
ns3::MobilityBuildingInfo::IsIndoor
bool IsIndoor()
Is indoor method.
Definition
mobility-building-info.cc:67
ns3::MobilityBuildingInfo::GetBuilding
Ptr< Building > GetBuilding()
Get the building in which the MobilityBuildingInfo instance is located.
Definition
mobility-building-info.cc:149
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:136
ns3::MobilityBuildingInfo::m_myBuilding
Ptr< Building > m_myBuilding
Building.
Definition
mobility-building-info.h:133
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:138
ns3::MobilityBuildingInfo::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
mobility-building-info.cc:28
ns3::MobilityBuildingInfo::m_indoor
bool m_indoor
Node position (indoor/outdoor) ?
Definition
mobility-building-info.h:134
ns3::MobilityBuildingInfo::MobilityBuildingInfo
MobilityBuildingInfo()
Definition
mobility-building-info.cc:46
ns3::MobilityBuildingInfo::DoInitialize
void DoInitialize() override
Initialize() implementation.
Definition
mobility-building-info.cc:39
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:135
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:142
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:82
ns3::MobilityBuildingInfo::m_nFloor
uint8_t m_nFloor
The floor number at which the MobilityBuildingInfo instance is located.
Definition
mobility-building-info.h:135
ns3::MobilityBuildingInfo::SetOutdoor
void SetOutdoor()
Mark this MobilityBuildingInfo instance as outdoor.
Definition
mobility-building-info.cc:121
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:156
ns3::MobilityBuildingInfo::m_cachedPosition
Vector m_cachedPosition
The node position cached after making its mobility model consistent.
Definition
mobility-building-info.h:141
ns3::Object
A base class which provides memory management and object aggregation.
Definition
object.h:78
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
buildings
model
mobility-building-info.h
Generated on Fri Nov 8 2024 13:58:59 for ns-3 by
1.11.0