14#include "ns3/assert.h" 
   16#include "ns3/pointer.h" 
   17#include "ns3/position-allocator.h" 
   18#include "ns3/simulator.h" 
   32                            .SetGroupName(
"Buildings")
 
 
   57    : m_myBuilding(building)
 
 
   71    Vector currentPosition = mm->GetPosition();
 
 
  159    Vector pos = mm->GetPosition();
 
  162        NS_LOG_LOGIC(
"checking building " << (*bit)->GetId() << 
" with boundaries " 
  163                                          << (*bit)->GetBoundaries());
 
  164        if ((*bit)->IsInside(pos))
 
  166            NS_LOG_LOGIC(
"MobilityBuildingInfo " << 
this << 
" pos " << pos
 
  167                                                 << 
" falls inside building " << (*bit)->GetId());
 
  169                                " MobilityBuildingInfo already inside another building!");
 
  171            uint16_t floor = (*bit)->GetFloor(pos);
 
  172            uint16_t roomX = (*bit)->GetRoomX(pos);
 
  173            uint16_t roomY = (*bit)->GetRoomY(pos);
 
  179        NS_LOG_LOGIC(
"MobilityBuildingInfo " << 
this << 
" pos " << pos << 
" is outdoor");
 
 
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.
Ptr< T > GetObject() const
Get a pointer to the requested aggregated Object.
Smart pointer class similar to boost::intrusive_ptr.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
#define NS_ABORT_MSG_UNLESS(cond, msg)
Abnormal program termination if a condition is false, with a message.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Every class exported by the ns3 library is enclosed in the ns3 namespace.