From e3ce636d2aba25350586e1317d11b574072cb1dd Mon Sep 17 00:00:00 2001 From: Tom Henderson Date: Sun, 2 May 2021 16:19:40 -0700 Subject: [PATCH] buildings: Remove deprecated methods --- src/buildings/helper/buildings-helper.cc | 46 ------------------- src/buildings/helper/buildings-helper.h | 26 ----------- src/buildings/model/mobility-building-info.cc | 8 ---- src/buildings/model/mobility-building-info.h | 14 ------ 4 files changed, 94 deletions(-) diff --git a/src/buildings/helper/buildings-helper.cc b/src/buildings/helper/buildings-helper.cc index 96197ec76..eacc9efcf 100644 --- a/src/buildings/helper/buildings-helper.cc +++ b/src/buildings/helper/buildings-helper.cc @@ -58,50 +58,4 @@ BuildingsHelper::Install (Ptr node) model->AggregateObject (buildingInfo); } - -void -BuildingsHelper::MakeMobilityModelConsistent () -{ - NS_LOG_FUNCTION_NOARGS (); - for (NodeList::Iterator nit = NodeList::Begin (); nit != NodeList::End (); ++nit) - { - Ptr mm = (*nit)->GetObject (); - if (mm != 0) - { - Ptr bmm = mm->GetObject (); - NS_ABORT_MSG_UNLESS (0 != bmm, "node " << (*nit)->GetId () << " has a MobilityModel that does not have a MobilityBuildingInfo"); - bmm->MakeConsistent (mm); - } - } -} - - -void -BuildingsHelper::MakeConsistent (Ptr mm) -{ - Ptr bmm = mm->GetObject (); - bool found = false; - for (BuildingList::Iterator bit = BuildingList::Begin (); bit != BuildingList::End (); ++bit) - { - NS_LOG_LOGIC ("checking building " << (*bit)->GetId () << " with boundaries " << (*bit)->GetBoundaries ()); - Vector pos = mm->GetPosition (); - if ((*bit)->IsInside (pos)) - { - NS_LOG_LOGIC ("MobilityBuildingInfo " << bmm << " pos " << mm->GetPosition () << " falls inside building " << (*bit)->GetId ()); - NS_ABORT_MSG_UNLESS (found == false, " MobilityBuildingInfo already inside another building!"); - found = true; - uint16_t floor = (*bit)->GetFloor (pos); - uint16_t roomX = (*bit)->GetRoomX (pos); - uint16_t roomY = (*bit)->GetRoomY (pos); - bmm->SetIndoor (*bit, floor, roomX, roomY); - } - } - if (!found) - { - NS_LOG_LOGIC ("MobilityBuildingInfo " << bmm << " pos " << mm->GetPosition () << " is outdoor"); - bmm->SetOutdoor (); - } - -} - } // namespace ns3 diff --git a/src/buildings/helper/buildings-helper.h b/src/buildings/helper/buildings-helper.h index 2119b8835..403762ee3 100644 --- a/src/buildings/helper/buildings-helper.h +++ b/src/buildings/helper/buildings-helper.h @@ -48,34 +48,8 @@ public: * \param c the NodeContainer including the nodes to be updated */ static void Install (NodeContainer c); // for any nodes - /** - * \brief This method goes through the whole NodeList and, for each node in - * the list, calls BuildingsHelper::MakeConsistent() passing to it - * the MobilityModel of that node. - * - * \deprecated This method will go away in future release of ns-3. - * A node position will be make consistent by the method \c IsInside () of - * \c MobilityBuildingInfo class. - * - */ - NS_DEPRECATED_3_31 - static void MakeMobilityModelConsistent (); - /** - * \brief Make the given mobility model consistent, by determining whether - * its position falls inside any of the building in BuildingList, and - * updating accordingly the BuildingInfo aggregated with the MobilityModel. - * - * \param mm the mobility model to be made consistent - * - * \deprecated This method will go away in future release of ns-3. - * See instead \c MakeConsistent method of \c MobilityBuildingInfo class. - */ - NS_DEPRECATED - static void MakeConsistent (Ptr mm); - }; - } #endif /* BUILDINGS_HELPER_H */ diff --git a/src/buildings/model/mobility-building-info.cc b/src/buildings/model/mobility-building-info.cc index 4011f6c29..8e50cded1 100644 --- a/src/buildings/model/mobility-building-info.cc +++ b/src/buildings/model/mobility-building-info.cc @@ -89,14 +89,6 @@ MobilityBuildingInfo::IsIndoor (void) return m_indoor; } -bool -MobilityBuildingInfo::IsOutdoor (void) -{ - NS_LOG_FUNCTION (this); - bool isIndoor = IsIndoor (); - return (!isIndoor); -} - void MobilityBuildingInfo::SetIndoor (Ptr building, uint8_t nfloor, uint8_t nroomx, uint8_t nroomy) { diff --git a/src/buildings/model/mobility-building-info.h b/src/buildings/model/mobility-building-info.h index e645dd127..12f7e21a8 100644 --- a/src/buildings/model/mobility-building-info.h +++ b/src/buildings/model/mobility-building-info.h @@ -70,20 +70,6 @@ public: */ bool IsIndoor (void); - /** - * - * \brief Is outdoor function - * - * \return true if the MobilityBuildingInfo instance is outdoor, false otherwise - * - * \deprecated This method will go away in a future release of ns-3. - * Calling \c IsIndoor () method of \c MobilityBuildingInfo class - * will satisfy the need to determine if a node is inside or outside - * a building. - */ - NS_DEPRECATED_3_31 - bool IsOutdoor (void); - /** * \brief Mark this MobilityBuildingInfo instance as indoor *