LEFT | RIGHT |
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) | 3 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 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 | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
13 * | 13 * |
14 * You should have received a copy of the GNU General Public License | 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 | 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 | 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 * | 17 * |
18 * Author: Marco Miozzo <marco.miozzo@cttc.es> | 18 * Author: Marco Miozzo <marco.miozzo@cttc.es> |
19 * | 19 * |
20 */ | 20 */ |
21 #ifndef MOBILITY_BUILDING_INFO_H | 21 #ifndef MOBILITY_BUILDING_INFO_H |
22 #define MOBILITY_BUILDING_INFO_H | 22 #define MOBILITY_BUILDING_INFO_H |
23 | 23 |
24 | 24 |
25 | 25 |
26 #include <ns3/simple-ref-count.h> | 26 #include <ns3/simple-ref-count.h> |
27 #include <ns3/ptr.h> | 27 #include <ns3/ptr.h> |
28 #include <ns3/object.h> | 28 #include <ns3/object.h> |
29 #include <ns3/box.h> | 29 #include <ns3/box.h> |
30 #include <map> | 30 #include <map> |
31 #include <ns3/building.h> | 31 #include <ns3/building.h> |
32 #include <ns3/constant-velocity-helper.h> | 32 #include <ns3/constant-velocity-helper.h> |
33 | 33 |
34 | 34 |
35 | 35 |
36 namespace ns3 { | 36 namespace ns3 { |
37 | 37 |
38 | 38 |
39 /** | 39 /** |
40 * \ingroup buildings | 40 * \ingroup buildings |
41 * \brief mobility buildings information (to be used by mobility models) | 41 * \brief mobility buildings information (to be used by mobility models) |
42 * | 42 * |
43 * This model implements the managment of scenarios where users might be | 43 * This model implements the managment of scenarios where users might be |
44 * either indoor (e.g., houses, offices, etc.) and outdoor. | 44 * either indoor (e.g., houses, offices, etc.) and outdoor. |
45 * | 45 * |
46 */ | 46 */ |
47 class MobilityBuildingInfo : public Object | 47 class MobilityBuildingInfo : public Object |
48 { | 48 { |
49 public: | 49 public: |
50 /** | 50 /** |
51 * \brief Get the type ID. | 51 * \brief Get the type ID. |
52 * \return the object TypeId | 52 * \return the object TypeId |
53 */ | 53 */ |
54 static TypeId GetTypeId (void); | 54 static TypeId GetTypeId (void); |
55 MobilityBuildingInfo (); | 55 MobilityBuildingInfo (); |
56 | 56 |
57 /** | 57 /** |
58 * Constructor | 58 * Constructor |
59 * | 59 * |
60 * \param building the building | 60 * \param building the building |
61 */ | 61 */ |
62 MobilityBuildingInfo (Ptr<Building> building); | 62 MobilityBuildingInfo (Ptr<Building> building); |
63 | 63 |
64 /** | 64 /** |
65 * | 65 * |
66 * \return true if the MobilityBuildingInfo instance is indoor, false otherwis
e | 66 * \return true if the MobilityBuildingInfo instance is indoor, false otherwis
e |
67 */ | 67 */ |
68 bool IsIndoor (void); | 68 bool IsIndoor (void); |
69 | 69 |
70 /** | 70 /** |
71 * | 71 * |
72 * \return true if the MobilityBuildingInfo instance is outdoor, false otherwi
se | 72 * \return true if the MobilityBuildingInfo instance is outdoor, false otherwi
se |
73 */ | 73 */ |
74 bool IsOutdoor (void); | 74 bool IsOutdoor (void); |
75 | 75 |
76 /** | 76 /** |
77 * Mark this MobilityBuildingInfo instance as indoor | 77 * Mark this MobilityBuildingInfo instance as indoor |
78 * | 78 * |
79 * \param building the building into which the MobilityBuildingInfo instance i
s located | 79 * \param building the building into which the MobilityBuildingInfo instance i
s located |
80 * \param nfloor the floor number 1...nFloors at which the MobilityBuildingIn
fo instance is located | 80 * \param nfloor the floor number 1...nFloors at which the MobilityBuildingIn
fo instance is located |
81 * \param nroomx the X room number 1...nRoomsX at which the MobilityBuildingI
nfo instance is located | 81 * \param nroomx the X room number 1...nRoomsX at which the MobilityBuildingI
nfo instance is located |
82 * \param nroomy the Y room number 1...nRoomsY at which the MobilityBuildingI
nfo instance is located | 82 * \param nroomy the Y room number 1...nRoomsY at which the MobilityBuildingI
nfo instance is located |
83 */ | 83 */ |
84 void SetIndoor (Ptr<Building> building, uint8_t nfloor, uint8_t nroomx, uint8_
t nroomy); | 84 void SetIndoor (Ptr<Building> building, uint8_t nfloor, uint8_t nroomx, uint8_
t nroomy); |
85 | 85 |
86 | 86 |
87 /** | 87 /** |
88 * Mark this MobilityBuildingInfo instance as indoor | 88 * Mark this MobilityBuildingInfo instance as indoor |
89 * | 89 * |
90 * \param nfloor the floor number 1...nFloors at which the MobilityBuildingIn
fo instance is located | 90 * \param nfloor the floor number 1...nFloors at which the MobilityBuildingIn
fo instance is located |
91 * \param nroomx the X room number 1...nRoomsX at which the MobilityBuildingI
nfo instance is located | 91 * \param nroomx the X room number 1...nRoomsX at which the MobilityBuildingI
nfo instance is located |
92 * \param nroomy the Y room number 1...nRoomsY at which the MobilityBuildingI
nfo instance is located | 92 * \param nroomy the Y room number 1...nRoomsY at which the MobilityBuildingI
nfo instance is located |
93 */ | 93 */ |
94 void SetIndoor (uint8_t nfloor, uint8_t nroomx, uint8_t nroomy); | 94 void SetIndoor (uint8_t nfloor, uint8_t nroomx, uint8_t nroomy); |
95 | 95 |
96 /** | 96 /** |
97 * Mark this MobilityBuildingInfo instance as outdoor | 97 * Mark this MobilityBuildingInfo instance as outdoor |
98 * | 98 * |
99 */ | 99 */ |
100 void SetOutdoor (); | 100 void SetOutdoor (); |
101 | 101 |
102 /** | 102 /** |
103 * | 103 * |
104 * \return the floor number | 104 * \return the floor number |
105 */ | 105 */ |
106 uint8_t GetFloorNumber (void); | 106 uint8_t GetFloorNumber (void); |
107 | 107 |
108 /** | 108 /** |
109 * | 109 * |
110 * \return the X room number | 110 * \return the X room number |
111 */ | 111 */ |
112 uint8_t GetRoomNumberX (void); | 112 uint8_t GetRoomNumberX (void); |
113 | 113 |
114 /** | 114 /** |
115 * | 115 * |
116 * \return the Y room number | 116 * \return the Y room number |
117 */ | 117 */ |
118 uint8_t GetRoomNumberY (void); | 118 uint8_t GetRoomNumberY (void); |
119 | 119 |
120 /** | 120 /** |
121 * | 121 * |
122 * \return the building | 122 * \return the building |
123 */ | 123 */ |
124 Ptr<Building> GetBuilding (); | 124 Ptr<Building> GetBuilding (); |
125 | 125 |
126 | 126 |
127 | 127 |
128 private: | 128 private: |
129 | |
130 Ptr<Building> m_myBuilding; ///< the building | 129 Ptr<Building> m_myBuilding; ///< the building |
131 bool m_indoor; ///< Indoor vs Outdoor | 130 bool m_indoor; ///< Indoor vs Outdoor |
132 uint8_t m_nFloor; ///< Floor number | 131 uint8_t m_nFloor; ///< Floor number |
133 uint8_t m_roomX; ///< Room X number | 132 uint8_t m_roomX; ///< Room X number |
134 uint8_t m_roomY; ///< Room Y number | 133 uint8_t m_roomY; ///< Room Y number |
135 | 134 |
136 }; | 135 }; |
137 | 136 |
138 | 137 |
139 | 138 |
140 } // namespace ns3 | 139 } // namespace ns3 |
141 | 140 |
142 | 141 |
143 #endif // MOBILITY_BUILDING_INFO_H | 142 #endif // MOBILITY_BUILDING_INFO_H |
LEFT | RIGHT |