A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
mobility-building-info.h
Go to the documentation of this file.
1
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2011 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
*
20
*/
21
#ifndef MOBILITY_BUILDING_INFO_H
22
#define MOBILITY_BUILDING_INFO_H
23
24
25
26
#include <ns3/simple-ref-count.h>
27
#include <ns3/ptr.h>
28
#include <ns3/object.h>
29
#include <ns3/box.h>
30
#include <map>
31
#include <ns3/building.h>
32
#include <ns3/constant-velocity-helper.h>
33
#include <ns3/mobility-model.h>
34
35
36
37
namespace
ns3
{
38
39
48
class
MobilityBuildingInfo
:
public
Object
49
{
50
public
:
56
static
TypeId
GetTypeId
(
void
);
57
MobilityBuildingInfo
();
58
64
MobilityBuildingInfo
(
Ptr<Building>
building);
65
71
bool
IsIndoor
(
void
);
72
81
void
SetIndoor
(
Ptr<Building>
building, uint8_t nfloor, uint8_t nroomx, uint8_t nroomy);
82
91
void
SetIndoor
(uint8_t nfloor, uint8_t nroomx, uint8_t nroomy);
92
96
void
SetOutdoor
();
97
103
uint8_t
GetFloorNumber
(
void
);
104
110
uint8_t
GetRoomNumberX
(
void
);
111
117
uint8_t
GetRoomNumberY
(
void
);
118
124
Ptr<Building>
GetBuilding
();
132
void
MakeConsistent
(
Ptr<MobilityModel>
mm);
133
134
protected
:
135
// inherited from Object
136
virtual
void
DoInitialize
();
137
138
139
140
private
:
141
142
Ptr<Building>
m_myBuilding
;
143
bool
m_indoor
;
144
uint8_t
m_nFloor
;
145
uint8_t
m_roomX
;
146
uint8_t
m_roomY
;
147
Vector
m_cachedPosition
;
148
149
};
150
151
152
153
}
// namespace ns3
154
155
156
#endif
// MOBILITY_BUILDING_INFO_H
ns3::MobilityBuildingInfo
mobility buildings information (to be used by mobility models)
Definition:
mobility-building-info.h:49
ns3::MobilityBuildingInfo::GetBuilding
Ptr< Building > GetBuilding()
Get the building in which the MobilityBuildingInfo instance is located.
Definition:
mobility-building-info.cc:163
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:146
ns3::MobilityBuildingInfo::IsIndoor
bool IsIndoor(void)
Is indoor method.
Definition:
mobility-building-info.cc:78
ns3::MobilityBuildingInfo::GetTypeId
static TypeId GetTypeId(void)
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:143
ns3::MobilityBuildingInfo::MobilityBuildingInfo
MobilityBuildingInfo()
Definition:
mobility-building-info.cc:56
ns3::MobilityBuildingInfo::GetRoomNumberY
uint8_t GetRoomNumberY(void)
Get the room number along y-axis at which the MobilityBuildingInfo instance is located.
Definition:
mobility-building-info.cc:155
ns3::MobilityBuildingInfo::DoInitialize
virtual void DoInitialize()
Initialize() implementation.
Definition:
mobility-building-info.cc:48
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:134
ns3::MobilityBuildingInfo::GetRoomNumberX
uint8_t GetRoomNumberX(void)
Get the room number along x-axis at which the MobilityBuildingInfo instance is located.
Definition:
mobility-building-info.cc:148
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:170
ns3::MobilityBuildingInfo::GetFloorNumber
uint8_t GetFloorNumber(void)
Get the floor number at which the MobilityBuildingInfo instance is located.
Definition:
mobility-building-info.cc:141
ns3::MobilityBuildingInfo::m_cachedPosition
Vector m_cachedPosition
The node position cached after making its mobility model consistent.
Definition:
mobility-building-info.h:147
ns3::Object
A base class which provides memory management and object aggregation.
Definition:
object.h:88
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:74
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 Tue Feb 6 2024 19:21:16 for ns-3 by
1.9.1