23 #include <ns3/node-list.h>
24 #include <ns3/building.h>
25 #include <ns3/building-list.h>
26 #include <ns3/mobility-model.h>
27 #include <ns3/mobility-building-info.h>
28 #include <ns3/abort.h>
73 NS_ABORT_MSG_UNLESS (0 != bmm,
"node " << (*nit)->GetId () <<
" has a MobilityModel that does not have a MobilityBuildingInfo");
86 NS_LOG_LOGIC (
"checking building " << (*bit)->GetId () <<
" with boundaries " << (*bit)->GetBoundaries ());
88 if ((*bit)->IsInside (pos))
90 NS_LOG_LOGIC (
"MobilityBuildingInfo " << bmm <<
" pos " << mm->
GetPosition () <<
" falls inside building " << (*bit)->GetId ());
91 NS_ABORT_MSG_UNLESS (found ==
false,
" MobilityBuildingInfo already inside another building!");
93 uint16_t floor = (*bit)->GetFloor (pos);
94 uint16_t roomX = (*bit)->GetRoomX (pos);
95 uint16_t roomY = (*bit)->GetRoomY (pos);
96 bmm->SetIndoor (*bit, floor, roomX, roomY);
std::vector< Ptr< Node > >::const_iterator Iterator
Vector GetPosition(void) const
Iterator End(void) const
Get an iterator which indicates past-the-last Node in the container.
static Iterator End(void)
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
static Iterator Begin(void)
#define NS_ABORT_MSG_UNLESS(cond, msg)
Abnormal program termination if cond is false.
static void MakeConsistent(Ptr< MobilityModel > bmm)
Make the given mobility model consistent, by determining whether its position falls inside any of the...
Keep track of the current position and velocity of an object.
NS_LOG_COMPONENT_DEFINE("BuildingsHelper")
static void MakeMobilityModelConsistent()
This method goes through the whole NodeList and, for each node in the list, calls BuildingsHelper::Ma...
static Iterator End(void)
std::vector< Ptr< Building > >::const_iterator Iterator
void AggregateObject(Ptr< Object > other)
#define NS_LOG_LOGIC(msg)
keep track of a set of node pointers.
std::vector< Ptr< Node > >::const_iterator Iterator
Iterator Begin(void) const
Get an iterator which refers to the first Node in the container.
uint32_t GetId(void) const
static Iterator Begin(void)
mobility buildings information (to be used by mobility models)
Ptr< T > GetObject(void) const
static void Install(Ptr< Node > node)
Install the MobilityBuildingInfo to a node.