A Discrete-Event Network Simulator
QKDNetSim v2.0 (NS-3 v3.41) @ (+)
API
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 
46 {
47  public:
53  static TypeId GetTypeId();
55 
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 
136 
137  protected:
138  // inherited from Object
139  void DoInitialize() override;
140 
141  private:
143  bool m_indoor;
144  uint8_t m_nFloor;
145  uint8_t m_roomX;
147  uint8_t m_roomY;
149  Vector
151 };
152 
153 } // namespace ns3
154 
155 #endif // MOBILITY_BUILDING_INFO_H
mobility buildings information (to be used by mobility models)
uint8_t GetFloorNumber()
Get the floor number at which the MobilityBuildingInfo instance is located.
bool IsIndoor()
Is indoor method.
Ptr< Building > GetBuilding()
Get the building in which the MobilityBuildingInfo instance is located.
uint8_t m_roomX
The room number along x-axis at which the MobilityBuildingInfo instance is located.
Ptr< Building > m_myBuilding
Building.
uint8_t m_roomY
The room number along y-axis at which the MobilityBuildingInfo instance is located.
static TypeId GetTypeId()
Get the type ID.
bool m_indoor
Node position (indoor/outdoor) ?
void DoInitialize() override
Initialize() implementation.
uint8_t GetRoomNumberX()
Get the room number along x-axis at which the MobilityBuildingInfo instance is located.
uint8_t GetRoomNumberY()
Get the room number along y-axis at which the MobilityBuildingInfo instance is located.
void SetIndoor(Ptr< Building > building, uint8_t nfloor, uint8_t nroomx, uint8_t nroomy)
Mark this MobilityBuildingInfo instance as indoor.
uint8_t m_nFloor
The floor number at which the MobilityBuildingInfo instance is located.
void SetOutdoor()
Mark this MobilityBuildingInfo instance as outdoor.
void MakeConsistent(Ptr< MobilityModel > mm)
Make the given mobility model consistent, by determining whether its position falls inside any of the...
Vector m_cachedPosition
The node position cached after making its mobility model consistent.
A base class which provides memory management and object aggregation.
Definition: object.h:89
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.