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
* 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 <ns3/box.h>
24
#include <ns3/building.h>
25
#include <ns3/constant-velocity-helper.h>
26
#include <ns3/mobility-model.h>
27
#include <ns3/object.h>
28
#include <ns3/ptr.h>
29
#include <ns3/simple-ref-count.h>
30
31
#include <map>
32
33
namespace
ns3
34
{
35
44
class
MobilityBuildingInfo
:
public
Object
45
{
46
public
:
52
static
TypeId
GetTypeId
();
53
MobilityBuildingInfo
();
54
60
MobilityBuildingInfo
(
Ptr<Building>
building);
61
67
bool
IsIndoor
();
68
80
void
SetIndoor
(
Ptr<Building>
building, uint8_t nfloor, uint8_t nroomx, uint8_t nroomy);
81
93
void
SetIndoor
(uint8_t nfloor, uint8_t nroomx, uint8_t nroomy);
94
98
void
SetOutdoor
();
99
105
uint8_t
GetFloorNumber
();
106
112
uint8_t
GetRoomNumberX
();
113
119
uint8_t
GetRoomNumberY
();
120
126
Ptr<Building>
GetBuilding
();
134
void
MakeConsistent
(
Ptr<MobilityModel>
mm);
135
136
protected
:
137
// inherited from Object
138
void
DoInitialize
()
override
;
139
140
private
:
141
Ptr<Building>
m_myBuilding
;
142
bool
m_indoor
;
143
uint8_t
m_nFloor
;
144
uint8_t
m_roomX
;
146
uint8_t
m_roomY
;
148
Vector
149
m_cachedPosition
;
150
};
151
152
}
// namespace ns3
153
154
#endif
// MOBILITY_BUILDING_INFO_H
ns3::MobilityBuildingInfo
mobility buildings information (to be used by mobility models)
Definition:
mobility-building-info.h:45
ns3::MobilityBuildingInfo::GetFloorNumber
uint8_t GetFloorNumber()
Get the floor number at which the MobilityBuildingInfo instance is located.
Definition:
mobility-building-info.cc:137
ns3::MobilityBuildingInfo::IsIndoor
bool IsIndoor()
Is indoor method.
Definition:
mobility-building-info.cc:76
ns3::MobilityBuildingInfo::GetBuilding
Ptr< Building > GetBuilding()
Get the building in which the MobilityBuildingInfo instance is located.
Definition:
mobility-building-info.cc:158
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:144
ns3::MobilityBuildingInfo::m_myBuilding
Ptr< Building > m_myBuilding
Building.
Definition:
mobility-building-info.h:141
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:146
ns3::MobilityBuildingInfo::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
mobility-building-info.cc:37
ns3::MobilityBuildingInfo::m_indoor
bool m_indoor
Node position (indoor/outdoor) ?
Definition:
mobility-building-info.h:142
ns3::MobilityBuildingInfo::MobilityBuildingInfo
MobilityBuildingInfo()
Definition:
mobility-building-info.cc:55
ns3::MobilityBuildingInfo::DoInitialize
void DoInitialize() override
Initialize() implementation.
Definition:
mobility-building-info.cc:48
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:144
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:151
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:91
ns3::MobilityBuildingInfo::m_nFloor
uint8_t m_nFloor
The floor number at which the MobilityBuildingInfo instance is located.
Definition:
mobility-building-info.h:143
ns3::MobilityBuildingInfo::SetOutdoor
void SetOutdoor()
Mark this MobilityBuildingInfo instance as outdoor.
Definition:
mobility-building-info.cc:130
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:165
ns3::MobilityBuildingInfo::m_cachedPosition
Vector m_cachedPosition
The node position cached after making its mobility model consistent.
Definition:
mobility-building-info.h:149
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:78
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 Jul 2 2023 18:21:30 for ns-3 by
1.9.6