From 63d344aae7e85e8145bb295dc9e8d852471fcdba Mon Sep 17 00:00:00 2001 From: Kirill Andreev Date: Thu, 18 Jun 2009 18:25:50 +0400 Subject: [PATCH] Fixed names --- examples/mesh.cc | 2 +- src/devices/mesh/dot11s/hwmp-protocol.cc | 20 +++++++++---------- src/devices/mesh/dot11s/hwmp-protocol.h | 4 ++-- .../dot11s/peer-management-protocol-mac.cc | 4 ++-- .../mesh/dot11s/peer-management-protocol.cc | 20 +++++++++---------- .../mesh/dot11s/peer-management-protocol.h | 4 ++-- 6 files changed, 27 insertions(+), 27 deletions(-) diff --git a/examples/mesh.cc b/examples/mesh.cc index a20529e86..55d46b494 100644 --- a/examples/mesh.cc +++ b/examples/mesh.cc @@ -27,7 +27,7 @@ #include "ns3/wifi-module.h" #include "ns3/mesh-module.h" #include "ns3/mobility-module.h" -#include "ns3/dot11s-helper.h" +#include "ns3/mesh-helper.h" #include "ns3/mesh-interface-helper.h" #include diff --git a/src/devices/mesh/dot11s/hwmp-protocol.cc b/src/devices/mesh/dot11s/hwmp-protocol.cc index e713bd3ef..27ffc6ab8 100644 --- a/src/devices/mesh/dot11s/hwmp-protocol.cc +++ b/src/devices/mesh/dot11s/hwmp-protocol.cc @@ -233,7 +233,7 @@ HwmpProtocol::RequestRoute ( m_stats.txBytes += packet->GetSize (); //channel IDs where we have already sent broadcast: std::vector channels; - for(HwmpPluginMap::const_iterator plugin = m_interfaces.begin (); plugin != m_interfaces.end (); plugin ++) + for(HwmpProtocolMacMap::const_iterator plugin = m_interfaces.begin (); plugin != m_interfaces.end (); plugin ++) { bool should_send = true; for(std::vector::const_iterator chan = channels.begin(); chan != channels.end(); chan ++) @@ -317,7 +317,7 @@ HwmpProtocol::ForwardUnicast(uint32_t sourceIface, const Mac48Address source, c uint32_t dst_seqno = 0; if(result.retransmitter != Mac48Address::GetBroadcast ()) dst_seqno = result.seqnum; - for(HwmpPluginMap::const_iterator i = m_interfaces.begin (); i != m_interfaces.end (); i ++) + for(HwmpProtocolMacMap::const_iterator i = m_interfaces.begin (); i != m_interfaces.end (); i ++) i->second->RequestDestination(destination, originator_seqno, dst_seqno); } QueuedPacket pkt; @@ -486,7 +486,7 @@ HwmpProtocol::ReceivePreq (IePreq preq, Mac48Address from, uint32_t interface, M return; //Forward PREQ to all interfaces: NS_LOG_DEBUG("I am "<second->SendPreq (preq); } void @@ -553,7 +553,7 @@ HwmpProtocol::ReceivePrep (IePrep prep, Mac48Address from, uint32_t interface, M if (result.retransmitter == Mac48Address::GetBroadcast ()) return; //Forward PREP - HwmpPluginMap::const_iterator prep_sender = m_interfaces.find (result.ifIndex); + HwmpProtocolMacMap::const_iterator prep_sender = m_interfaces.find (result.ifIndex); NS_ASSERT(prep_sender != m_interfaces.end ()); prep_sender->second->SendPrep (prep, result.retransmitter); } @@ -601,7 +601,7 @@ HwmpProtocol::SendPrep ( prep.SetMetric (0); prep.SetOriginatorAddress (src); prep.SetOriginatorSeqNumber (originatorDsn); - HwmpPluginMap::const_iterator prep_sender = m_interfaces.find (interface); + HwmpProtocolMacMap::const_iterator prep_sender = m_interfaces.find (interface); NS_ASSERT(prep_sender != m_interfaces.end ()); prep_sender->second->SendPrep (prep, retransmitter); //m_prepCallback (prep, retransmitter); @@ -677,7 +677,7 @@ HwmpProtocol::MakePathError (std::vector destinations perr.AddAddressUnit(destinations[i]); m_rtable->DeleteReactivePath(destinations[i].destination); } - for(HwmpPluginMap::const_iterator i = m_interfaces.begin (); i != m_interfaces.end (); i ++) + for(HwmpProtocolMacMap::const_iterator i = m_interfaces.begin (); i != m_interfaces.end (); i ++) { std::vector receivers_for_interface; for(unsigned int j = 0; j < receivers.size(); j ++) @@ -861,7 +861,7 @@ HwmpProtocol::RetryPathDiscovery (Mac48Address dst, uint8_t numOfRetry) uint32_t dst_seqno = 0; if(result.retransmitter != Mac48Address::GetBroadcast ()) dst_seqno = result.seqnum; - for(HwmpPluginMap::const_iterator i = m_interfaces.begin (); i != m_interfaces.end (); i ++) + for(HwmpProtocolMacMap::const_iterator i = m_interfaces.begin (); i != m_interfaces.end (); i ++) i->second->RequestDestination(dst, originator_seqno, dst_seqno); m_preqTimeouts[dst] = Simulator::Schedule ( MilliSeconds (2*(m_dot11MeshHWMPnetDiameterTraversalTime.GetMilliSeconds())), @@ -897,7 +897,7 @@ HwmpProtocol::SendProactivePreq () preq.SetOriginatorAddress(GetAddress ()); preq.SetPreqID (GetNextPreqId ()); preq.SetOriginatorSeqNumber (GetNextHwmpSeqno ()); - for(HwmpPluginMap::const_iterator i = m_interfaces.begin (); i != m_interfaces.end (); i ++) + for(HwmpProtocolMacMap::const_iterator i = m_interfaces.begin (); i != m_interfaces.end (); i ++) i->second->SendPreq(preq); m_proactivePreqTimer = Simulator::Schedule (m_dot11MeshHWMPpathToRootInterval, &HwmpProtocol::SendProactivePreq, this); } @@ -988,7 +988,7 @@ HwmpProtocol::Report (std::ostream & os) const "doFlag=\"" << m_doFlag << "\"\n" "rfFlag=\"" << m_rfFlag << "\">\n"; m_stats.Print (os); - for(HwmpPluginMap::const_iterator plugin = m_interfaces.begin (); plugin != m_interfaces.end (); plugin ++) + for(HwmpProtocolMacMap::const_iterator plugin = m_interfaces.begin (); plugin != m_interfaces.end (); plugin ++) { plugin->second->Report(os); } @@ -998,7 +998,7 @@ void HwmpProtocol::ResetStats () { m_stats = Statistics::Statistics (); - for(HwmpPluginMap::const_iterator plugin = m_interfaces.begin (); plugin != m_interfaces.end (); plugin ++) + for(HwmpProtocolMacMap::const_iterator plugin = m_interfaces.begin (); plugin != m_interfaces.end (); plugin ++) plugin->second->ResetStats (); } diff --git a/src/devices/mesh/dot11s/hwmp-protocol.h b/src/devices/mesh/dot11s/hwmp-protocol.h index 747500d51..4abeb9aef 100644 --- a/src/devices/mesh/dot11s/hwmp-protocol.h +++ b/src/devices/mesh/dot11s/hwmp-protocol.h @@ -181,8 +181,8 @@ private: ///\return address of MeshPointDevice Mac48Address GetAddress (); private: - typedef std::map > HwmpPluginMap; - HwmpPluginMap m_interfaces; + typedef std::map > HwmpProtocolMacMap; + HwmpProtocolMacMap m_interfaces; Mac48Address m_address; uint32_t m_dataSeqno; uint32_t m_hwmpSeqno; diff --git a/src/devices/mesh/dot11s/peer-management-protocol-mac.cc b/src/devices/mesh/dot11s/peer-management-protocol-mac.cc index 8aebec91a..ec7de71e3 100644 --- a/src/devices/mesh/dot11s/peer-management-protocol-mac.cc +++ b/src/devices/mesh/dot11s/peer-management-protocol-mac.cc @@ -297,10 +297,10 @@ PeerManagementProtocolMac::Statistics::Print (std::ostream & os) const void PeerManagementProtocolMac::Report (std::ostream & os) const { - os << "GetAddress () << "\">\n"; m_stats.Print (os); - os << "\n"; + os << "\n"; } void PeerManagementProtocolMac::ResetStats () diff --git a/src/devices/mesh/dot11s/peer-management-protocol.cc b/src/devices/mesh/dot11s/peer-management-protocol.cc index 983394821..2af2d02ae 100644 --- a/src/devices/mesh/dot11s/peer-management-protocol.cc +++ b/src/devices/mesh/dot11s/peer-management-protocol.cc @@ -100,9 +100,9 @@ PeerManagementProtocol::Install(Ptr mp) Ptr mac = wifiNetDev->GetMac ()->GetObject (); if (mac == 0) return false; - Ptr peerPlugin = Create ((*i)->GetIfIndex(), this); - mac->InstallPlugin(peerPlugin); - m_plugins[(*i)->GetIfIndex()] = peerPlugin; + Ptr plugin = Create ((*i)->GetIfIndex(), this); + mac->InstallPlugin(plugin); + m_plugins[(*i)->GetIfIndex()] = plugin; PeerLinksOnInterface newmap; m_peerLinks[(*i)->GetIfIndex()] = newmap; } @@ -186,14 +186,14 @@ PeerManagementProtocol::UpdatePeerBeaconTiming( if(!meshBeacon) return; //BCA: - PeerManagerPluginMap::iterator plugin = m_plugins.find (interface); + PeerManagementProtocolMacMap::iterator plugin = m_plugins.find (interface); NS_ASSERT(plugin != m_plugins.end ()); Time shift = GetNextBeaconShift(interface); if(TimeToTu (shift) != 0) plugin->second->SetBeaconShift(shift); //PM STATE Machine //Check that a given beacon is not from our interface - for(PeerManagerPluginMap::const_iterator i = m_plugins.begin (); i != m_plugins.end (); i ++) + for(PeerManagementProtocolMacMap::const_iterator i = m_plugins.begin (); i != m_plugins.end (); i ++) if(i->second->GetAddress () == peerAddress) return; Ptr peerLink = FindPeerLink(interface, peerAddress); @@ -284,7 +284,7 @@ PeerManagementProtocol::InitiateLink ( NS_FATAL_ERROR ("Peer link must not exist."); } // Plugin must exist - PeerManagerPluginMap::iterator plugin = m_plugins.find (interface); + PeerManagementProtocolMacMap::iterator plugin = m_plugins.find (interface); NS_ASSERT(plugin != m_plugins.end ()); PeerLinksMap::iterator iface = m_peerLinks.find (interface); NS_ASSERT (iface != m_peerLinks.end()); @@ -373,7 +373,7 @@ PeerManagementProtocol::GetNextBeaconShift (uint32_t interface) static int minShift = 1; PeerLinksMap::iterator iface = m_peerLinks.find (interface); NS_ASSERT (iface != m_peerLinks.end()); - PeerManagerPluginMap::iterator plugin = m_plugins.find (interface); + PeerManagementProtocolMacMap::iterator plugin = m_plugins.find (interface); NS_ASSERT (plugin != m_plugins.end()); std::pair myBeacon = plugin->second->GetBeaconInfo (); if(Simulator::Now () + TuToTime (maxShift) > myBeacon.first + myBeacon.second) @@ -416,7 +416,7 @@ PeerManagementProtocol::TimeToTu (Time x) void PeerManagementProtocol::PeerLinkStatus (uint32_t interface, Mac48Address peerAddress, Mac48Address peerMeshPointAddress, PeerLink::PeerState ostate, PeerLink::PeerState nstate) { - PeerManagerPluginMap::iterator plugin = m_plugins.find (interface); + PeerManagementProtocolMacMap::iterator plugin = m_plugins.find (interface); NS_ASSERT(plugin != m_plugins.end()); NS_LOG_DEBUG( "Link between me:" << m_address << @@ -478,7 +478,7 @@ PeerManagementProtocol::Report (std::ostream & os) const { os << "\n"; m_stats.Print (os); - for(PeerManagerPluginMap::const_iterator plugins = m_plugins.begin (); plugins != m_plugins.end (); plugins ++) + for(PeerManagementProtocolMacMap::const_iterator plugins = m_plugins.begin (); plugins != m_plugins.end (); plugins ++) { //Take statistics from plugin: plugins->second->Report (os); @@ -494,7 +494,7 @@ void PeerManagementProtocol::ResetStats () { m_stats = Statistics::Statistics (); - for(PeerManagerPluginMap::const_iterator plugins = m_plugins.begin (); plugins != m_plugins.end (); plugins ++) + for(PeerManagementProtocolMacMap::const_iterator plugins = m_plugins.begin (); plugins != m_plugins.end (); plugins ++) plugins->second->ResetStats (); } diff --git a/src/devices/mesh/dot11s/peer-management-protocol.h b/src/devices/mesh/dot11s/peer-management-protocol.h index f5f132500..3df63510c 100644 --- a/src/devices/mesh/dot11s/peer-management-protocol.h +++ b/src/devices/mesh/dot11s/peer-management-protocol.h @@ -166,7 +166,7 @@ private: ///\brief This map keeps beacon information on all intefaces typedef std::map BeaconInfoMap; ///\brief this vector keeps pointers to MAC-plugins - typedef std::map > PeerManagerPluginMap; + typedef std::map > PeerManagementProtocolMacMap; ///\} private: /** @@ -201,7 +201,7 @@ private: uint32_t TimeToTu (Time x); ///\} private: - PeerManagerPluginMap m_plugins; + PeerManagementProtocolMacMap m_plugins; Mac48Address m_address; Ptr m_meshId; /**